Commit d01c84f9 authored by zhangsen's avatar zhangsen

移装告知 和 安装告知 删除业务数据时删除待办

parent 8749d659
...@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil; ...@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice; import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice;
import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService; import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
...@@ -39,6 +40,10 @@ public class JgInstallationNoticeController extends BaseController { ...@@ -39,6 +40,10 @@ public class JgInstallationNoticeController extends BaseController {
@Autowired @Autowired
private IJgInstallationNoticeService iJgInstallationNoticeService; private IJgInstallationNoticeService iJgInstallationNoticeService;
@Autowired
private CommonServiceImpl commonService;
/** /**
* 新增 * 新增
* *
...@@ -83,6 +88,8 @@ public class JgInstallationNoticeController extends BaseController { ...@@ -83,6 +88,8 @@ public class JgInstallationNoticeController extends BaseController {
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除安装告知", notes = "根据sequenceNbr删除安装告知") @ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除安装告知", notes = "根据sequenceNbr删除安装告知")
public ResponseModel<Boolean> deleteBySequenceNbr(@RequestParam(value = "sequenceNbr") Long sequenceNbr) { public ResponseModel<Boolean> deleteBySequenceNbr(@RequestParam(value = "sequenceNbr") Long sequenceNbr) {
// 删除暂存的待办
commonService.deleteTaskModel(String.valueOf(sequenceNbr));
return ResponseHelper.buildResponse(iJgInstallationNoticeService.removeById(sequenceNbr)); return ResponseHelper.buildResponse(iJgInstallationNoticeService.removeById(sequenceNbr));
} }
......
...@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto; ...@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice; import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice;
import com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService; import com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService;
import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService; import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils; import com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -44,6 +45,10 @@ public class JgTransferNoticeController extends BaseController { ...@@ -44,6 +45,10 @@ public class JgTransferNoticeController extends BaseController {
@Autowired @Autowired
private ICommonService commonService; private ICommonService commonService;
@Autowired
private CommonServiceImpl commonServiceImpl;
/** /**
* 新增移装造告知 * 新增移装造告知
* *
...@@ -93,6 +98,8 @@ public class JgTransferNoticeController extends BaseController { ...@@ -93,6 +98,8 @@ public class JgTransferNoticeController extends BaseController {
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除移装造告知", notes = "根据sequenceNbr删除移装造告知") @ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除移装造告知", notes = "根据sequenceNbr删除移装造告知")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @RequestParam(value = "sequenceNbr") Long sequenceNbr) { public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @RequestParam(value = "sequenceNbr") Long sequenceNbr) {
// 删除暂存的待办
commonServiceImpl.deleteTaskModel(String.valueOf(sequenceNbr));
return ResponseHelper.buildResponse(jgTransferNoticeService.removeById(sequenceNbr)); return ResponseHelper.buildResponse(jgTransferNoticeService.removeById(sequenceNbr));
} }
......
...@@ -387,6 +387,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -387,6 +387,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
} }
notice.setIsDelete(true); notice.setIsDelete(true);
}); });
// 删除暂存的待办
jgInstallationNotices.forEach(id -> commonService.deleteTaskModel(String.valueOf(id.getSequenceNbr())));
return this.updateBatchById(jgInstallationNotices); return this.updateBatchById(jgInstallationNotices);
} }
......
...@@ -157,6 +157,8 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -157,6 +157,8 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
} }
notice.setIsDelete(true); notice.setIsDelete(true);
}); });
// 删除暂存的待办
jgTransferNotices.forEach(id -> commonService.deleteTaskModel(String.valueOf(id.getSequenceNbr())));
return this.updateBatchById(jgTransferNotices); return this.updateBatchById(jgTransferNotices);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment