超时修改、任务删除与单个删除分开处理

master
hansha 1 year ago
parent 54a65a0947
commit 4c42dde55f

@ -63,4 +63,6 @@ public interface IDaBirthDjService
List<DaBirthDj> searchDaBirthDjList(DaBirthDj daBirthDj);
List<DaBirthDj> searchDaBirthDjList1(DaBirthDj daBirthDj);
int deleteDaBirthDjByIds1(Long[] toArray);
}

@ -56,4 +56,6 @@ public interface IDaCzrkdjService
List<DaCzrkdj> searchDaCzrkdjList(DaCzrkdj daCzrkdj);
List<DaCzrkdj> searchDaCzrkdjList1(DaCzrkdj daCzrkdj);
int deleteDaCzrkdjByIds1(Long[] toArray);
}

@ -63,4 +63,6 @@ public interface IDaQyzService
List<DaQyz> searchDaQyzList(DaQyz daQyz);
List<DaQyz> searchDaQyzList1(DaQyz daQyz);
int deleteDaQyzByIds1(Long[] toArray);
}

@ -63,4 +63,6 @@ public interface IDaYtzmService
List<DaYtzm> searchYtzmList(DaYtzm daYtzm);
List<DaYtzm> searchYtzmList1(DaYtzm daYtzm);
int deleteDaYtzmByIds1(Long[] toArray);
}

@ -63,4 +63,6 @@ public interface IDaZfnyhkcgService
List<DaZfnyhkcg> searchDaZfnyhkcgList(DaZfnyhkcg daZfnyhkcg);
List<DaZfnyhkcg> searchDaZfnyhkcgList1(DaZfnyhkcg daZfnyhkcg);
int deleteDaZfnyhkcgByIds1(Long[] toArray);
}

@ -63,4 +63,6 @@ public interface IDaZqzService
List<DaZqz> searchDaZqzList(DaZqz daZqz);
List<DaZqz> searchDaZqzList1(DaZqz daZqz);
int deleteDaZqzByIds1(Long[] toArray);
}

@ -156,6 +156,34 @@ public class DaBirthDjServiceImpl implements IDaBirthDjService
@Override
@Transactional
public int deleteDaBirthDjByIds(Long[] ids)
{
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值
DaBirthDj daBirthDj = daBirthDjMapper.selectDaBirthDjById(ids[0]);
DaCatalog catalog = daCatalogMapper.selectDaCatalogById(daBirthDj.getMuId());
List<Long> ancestors = Arrays.stream(
catalog.getAncestors().split(",")).map(s->Long.parseLong(s.trim())).collect(Collectors.toList());
ancestors.add(daBirthDj.getMuId());
ancestors.remove(0L);
//1-修改该muId及父级catalog id中的countNum值
for(Long muId :ancestors ){
daCatalogMapper.minusDaCatalogCountNumById(muId,((Integer)ids.length).longValue());
}
//修改对应的图片为未识别 ----前端已设置只能单条删除
List<Long> picIds = Stream.of(daBirthDj.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
for(Long picId :picIds){
DaPicturesRecard pic = new DaPicturesRecard();
pic.setId(picId);
pic.setRecognize("0");//未识别
pic.setErrorCorrect("0");
daPicturesRecardMapper.updateDaPicturesRecard(pic);
}
}
int i = daBirthDjMapper.deleteDaBirthDjByIds(ids);
return i;
}
@Transactional
public int deleteDaBirthDjByIds1(Long[] ids)
{
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值

@ -165,6 +165,45 @@ public class DaCzrkdjServiceImpl implements IDaCzrkdjService {
@Override
@Transactional
public int deleteDaCzrkdjByIds(Long[] ids) {
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值
DaCzrkdj daCzrkdj = daCzrkdjMapper.selectDaCzrkdjById(ids[0]);
DaCatalog catalog = daCatalogMapper.selectDaCatalogById(daCzrkdj.getMuId());
List<Long> ancestors = Arrays.stream(
catalog.getAncestors().split(",")).map(s->Long.parseLong(s.trim())).collect(Collectors.toList());
ancestors.add(daCzrkdj.getMuId());
ancestors.remove(0L);
//1-修改该muId及父级catalog id中的countNum值
for(Long muId :ancestors ){
daCatalogMapper.minusDaCatalogCountNumById(muId,((Integer)ids.length).longValue());
}
//修改对应的图片为未识别 ----前端已设置只能单条删除
List<Long> picIds = Stream.of(daCzrkdj.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
DaCzrkdj daCzrkdj1= new DaCzrkdj();
daCzrkdj1.setPicIds(daCzrkdj.getPicIds());
List<DaCzrkdj> daCzrkdjs = daCzrkdjMapper.selectDaCzrkdjList(daCzrkdj1);
if(daCzrkdjs.size()<=1){ //当前需删除图片id不止存在一条记录时 不修改图片识别状态
for(Long picId :picIds){
DaPicturesRecard pic = new DaPicturesRecard();
pic.setId(picId);
pic.setRecognize("0");//未识别
pic.setErrorCorrect("0");
daPicturesRecardMapper.updateDaPicturesRecard(pic);
}
}
}
int i = daCzrkdjMapper.deleteDaCzrkdjByIds(ids);
return i;
}
/**
* 使
* @param ids
* @return
*/
@Transactional
public int deleteDaCzrkdjByIds1(Long[] ids) {
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值
DaCzrkdj daCzrkdj = daCzrkdjMapper.selectDaCzrkdjById(ids[0]);

@ -155,6 +155,35 @@ public class DaQyzServiceImpl implements IDaQyzService
@Override
@Transactional
public int deleteDaQyzByIds(Long[] ids)
{
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值
DaQyz daQyz = daQyzMapper.selectDaQyzById(ids[0]);
DaCatalog catalog = daCatalogMapper.selectDaCatalogById(daQyz.getMuId());
List<Long> ancestors = Arrays.stream(
catalog.getAncestors().split(",")).map(s->Long.parseLong(s.trim())).collect(Collectors.toList());
ancestors.add(daQyz.getMuId());
ancestors.remove(0L);
//1-修改该muId及父级catalog id中的countNum值
for(Long muId :ancestors ){
daCatalogMapper.minusDaCatalogCountNumById(muId,((Integer)ids.length).longValue());
}
//修改对应的图片为未识别 ----前端已设置只能单条删除
List<Long> picIds = Stream.of(daQyz.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
for(Long picId :picIds){
DaPicturesRecard pic = new DaPicturesRecard();
pic.setId(picId);
pic.setRecognize("0");//未识别
pic.setErrorCorrect("0");
daPicturesRecardMapper.updateDaPicturesRecard(pic);
}
}
int i = daQyzMapper.deleteDaQyzByIds(ids);
return i;
}
@Transactional
public int deleteDaQyzByIds1(Long[] ids)
{
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值

@ -134,7 +134,7 @@ public class DaTaskServiceImpl implements IDaTaskService
List<DaCzrkdj> daCzrkdjs = daCzrkdjService.selectDaCzrkdjList(czrkdj);
if(daCzrkdjs!=null&&daCzrkdjs.size()>0){
List<Long> czrkIds = daCzrkdjs.stream().map(DaCzrkdj::getId).collect(Collectors.toList());
daCzrkdjService.deleteDaCzrkdjByIds(czrkIds.toArray(new Long[czrkIds.size()]));
daCzrkdjService.deleteDaCzrkdjByIds1(czrkIds.toArray(new Long[czrkIds.size()]));
}
break;
case "option4":
@ -144,7 +144,7 @@ public class DaTaskServiceImpl implements IDaTaskService
List<DaBirthDj> daBirthDjs = daBirthDjService.selectDaBirthDjList(birthDj);
if(daBirthDjs!=null&&daBirthDjs.size()>0){
List<Long> cszmIds = daBirthDjs.stream().map(DaBirthDj::getId).collect(Collectors.toList());
daBirthDjService.deleteDaBirthDjByIds(cszmIds.toArray(new Long[cszmIds.size()]));
daBirthDjService.deleteDaBirthDjByIds1(cszmIds.toArray(new Long[cszmIds.size()]));
}
break;
case "option5":
@ -154,7 +154,7 @@ public class DaTaskServiceImpl implements IDaTaskService
List<DaQyz> qyzs = daQyzService.selectDaQyzList(qyz);
if(qyzs!=null&&qyzs.size()>0){
List<Long> qyzIds = qyzs.stream().map(DaQyz::getId).collect(Collectors.toList());
daQyzService.deleteDaQyzByIds(qyzIds.toArray(new Long[qyzIds.size()]));
daQyzService.deleteDaQyzByIds1(qyzIds.toArray(new Long[qyzIds.size()]));
}
break;
case "option6":
@ -164,7 +164,7 @@ public class DaTaskServiceImpl implements IDaTaskService
List<DaYtzm> ytzms = daYtzmService.selectDaYtzmList(ytzm);
if(ytzms!=null&&ytzms.size()>0){
List<Long> ytzmIds = ytzms.stream().map(DaYtzm::getId).collect(Collectors.toList());
daYtzmService.deleteDaYtzmByIds(ytzmIds.toArray(new Long[ytzmIds.size()]));
daYtzmService.deleteDaYtzmByIds1(ytzmIds.toArray(new Long[ytzmIds.size()]));
}
break;
case "option7":
@ -174,7 +174,7 @@ public class DaTaskServiceImpl implements IDaTaskService
List<DaZfnyhkcg> zfnyhkcgs = daZfnyhkcgService.selectDaZfnyhkcgList(zfnyhkcg);
if(zfnyhkcgs!=null&&zfnyhkcgs.size()>0){
List<Long> zfIds = zfnyhkcgs.stream().map(DaZfnyhkcg::getId).collect(Collectors.toList());
daZfnyhkcgService.deleteDaZfnyhkcgByIds(zfIds.toArray(new Long[zfIds.size()]));
daZfnyhkcgService.deleteDaZfnyhkcgByIds1(zfIds.toArray(new Long[zfIds.size()]));
}
break;
case "option8":
@ -184,7 +184,7 @@ public class DaTaskServiceImpl implements IDaTaskService
List<DaZqz> zqzs = daZqzService.selectDaZqzList(zqz);
if(zqzs!=null&&zqzs.size()>0){
List<Long> zqzIds = zqzs.stream().map(DaZqz::getId).collect(Collectors.toList());
daZqzService.deleteDaZqzByIds(zqzIds.toArray(new Long[zqzIds.size()]));
daZqzService.deleteDaZqzByIds1(zqzIds.toArray(new Long[zqzIds.size()]));
}
break;
}

@ -156,6 +156,34 @@ public class DaYtzmServiceImpl implements IDaYtzmService
@Override
@Transactional
public int deleteDaYtzmByIds(Long[] ids)
{
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值
DaYtzm daYtzm = daYtzmMapper.selectDaYtzmById(ids[0]);
DaCatalog catalog = daCatalogMapper.selectDaCatalogById(daYtzm.getMuId());
List<Long> ancestors = Arrays.stream(
catalog.getAncestors().split(",")).map(s->Long.parseLong(s.trim())).collect(Collectors.toList());
ancestors.add(daYtzm.getMuId());
ancestors.remove(0L);
//1-修改该muId及父级catalog id中的countNum值
for(Long muId :ancestors ){
daCatalogMapper.minusDaCatalogCountNumById(muId,((Integer)ids.length).longValue());
}
//修改对应的图片为未识别 ----前端已设置只能单条删除
List<Long> picIds = Stream.of(daYtzm.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
for(Long picId :picIds){
DaPicturesRecard pic = new DaPicturesRecard();
pic.setId(picId);
pic.setRecognize("0");//未识别
pic.setErrorCorrect("0");
daPicturesRecardMapper.updateDaPicturesRecard(pic);
}
}
int i = daYtzmMapper.deleteDaYtzmByIds(ids);
return i;
}
@Transactional
public int deleteDaYtzmByIds1(Long[] ids)
{
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值

@ -154,6 +154,34 @@ public class DaZfnyhkcgServiceImpl implements IDaZfnyhkcgService
@Override
@Transactional
public int deleteDaZfnyhkcgByIds(Long[] ids)
{
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值
DaZfnyhkcg daZfnyhkcg = daZfnyhkcgMapper.selectDaZfnyhkcgById(ids[0]);
DaCatalog catalog = daCatalogMapper.selectDaCatalogById(daZfnyhkcg.getMuId());
List<Long> ancestors = Arrays.stream(
catalog.getAncestors().split(",")).map(s->Long.parseLong(s.trim())).collect(Collectors.toList());
ancestors.add(daZfnyhkcg.getMuId());
ancestors.remove(0L);
//1-修改该muId及父级catalog id中的countNum值
for(Long muId :ancestors ){
daCatalogMapper.minusDaCatalogCountNumById(muId,((Integer)ids.length).longValue());
}
//修改对应的图片为未识别 ----前端已设置只能单条删除
List<Long> picIds = Stream.of(daZfnyhkcg.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
for(Long picId :picIds){
DaPicturesRecard pic = new DaPicturesRecard();
pic.setId(picId);
pic.setRecognize("0");//未识别
pic.setErrorCorrect("0");
daPicturesRecardMapper.updateDaPicturesRecard(pic);
}
}
int i = daZfnyhkcgMapper.deleteDaZfnyhkcgByIds(ids);
return i;
}
@Transactional
public int deleteDaZfnyhkcgByIds1(Long[] ids)
{
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值

@ -155,6 +155,34 @@ public class DaZqzServiceImpl implements IDaZqzService
@Override
@Transactional
public int deleteDaZqzByIds(Long[] ids)
{
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值
DaZqz daZqz = daZqzMapper.selectDaZqzById(ids[0]);
DaCatalog catalog = daCatalogMapper.selectDaCatalogById(daZqz.getMuId());
List<Long> ancestors = Arrays.stream(
catalog.getAncestors().split(",")).map(s->Long.parseLong(s.trim())).collect(Collectors.toList());
ancestors.add(daZqz.getMuId());
ancestors.remove(0L);
//1-修改该muId及父级catalog id中的countNum值
for(Long muId :ancestors ){
daCatalogMapper.minusDaCatalogCountNumById(muId,((Integer)ids.length).longValue());
}
//修改对应的图片为未识别 ----前端已设置只能单条删除
List<Long> picIds = Stream.of(daZqz.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
for(Long picId :picIds){
DaPicturesRecard pic = new DaPicturesRecard();
pic.setId(picId);
pic.setRecognize("0");//未识别
pic.setErrorCorrect("0");
daPicturesRecardMapper.updateDaPicturesRecard(pic);
}
}
int i = daZqzMapper.deleteDaZqzByIds(ids);
return i;
}
@Transactional
public int deleteDaZqzByIds1(Long[] ids)
{
if(ids.length>0){
//1-根据muId 查询该muId的所有父级集合当数据添加成功后-----修改该muId及父级catalog中的countNum值

@ -17,7 +17,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API,
// 10s超时
timeout: 60000
timeout: 300000
})
// request拦截器

Loading…
Cancel
Save