diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java index be1a4f80..e61a4160 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java @@ -282,13 +282,23 @@ public class QcCheckTaskIncomeController extends BaseController { } /** - * 删除来料检验 + * 批量删除来料检验 + */ +// @RequiresPermissions("quality:qcIncome:remove") +// @Log(title = "来料检验", businessType = BusinessType.DELETE) +// @DeleteMapping("/{recordIds}") +// public AjaxResult remove(@PathVariable String[] recordIds) { +// return toAjax(qcCheckTaskIncomeService.deleteQcCheckTaskIncomeByRecordIds(recordIds)); +// } + + /** + * 单个删除来料检验 */ @RequiresPermissions("quality:qcIncome:remove") @Log(title = "来料检验", businessType = BusinessType.DELETE) - @DeleteMapping("/{recordIds}") - public AjaxResult remove(@PathVariable String[] recordIds) { - return toAjax(qcCheckTaskIncomeService.deleteQcCheckTaskIncomeByRecordIds(recordIds)); + @DeleteMapping("/{recordId}") + public AjaxResult remove(@PathVariable String recordId) { + return toAjax(qcCheckTaskIncomeService.deleteQcCheckTaskIncomeByRecordId(recordId)); } /** diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskInventoryController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskInventoryController.java index 3fd27733..401986b0 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskInventoryController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskInventoryController.java @@ -105,12 +105,22 @@ public class QcCheckTaskInventoryController extends BaseController { } /** - * 删除库存检验任务 + * 批量删除库存检验任务 + */ +// @RequiresPermissions("quality:qcInventory:remove") +//// @Log(title = "库存检验任务", businessType = BusinessType.DELETE) +//// @DeleteMapping("/{recordIds}") +//// public AjaxResult remove(@PathVariable String[] recordIds) { +//// return toAjax(qcCheckTaskInventoryService.deleteQcCheckTaskInventoryByRecordIds(recordIds)); +//// } + + /** + * 单个删除库存检验任务 */ @RequiresPermissions("quality:qcInventory:remove") @Log(title = "库存检验任务", businessType = BusinessType.DELETE) - @DeleteMapping("/{recordIds}") - public AjaxResult remove(@PathVariable String[] recordIds) { - return toAjax(qcCheckTaskInventoryService.deleteQcCheckTaskInventoryByRecordIds(recordIds)); + @DeleteMapping("/{recordId}") + public AjaxResult remove(@PathVariable String recordId) { + return toAjax(qcCheckTaskInventoryService.deleteQcCheckTaskInventoryByRecordId(recordId)); } } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java index 0fcef0bb..70cf1ae5 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java @@ -131,13 +131,23 @@ public class QcCheckTaskProduceController extends BaseController { } /** - * 删除生产过程检验任务 + * 批量删除生产过程检验任务 + */ +// @RequiresPermissions("quality:qcProduce:remove") +// @Log(title = "生产过程检验任务", businessType = BusinessType.DELETE) +// @DeleteMapping("/{recordIds}") +// public AjaxResult remove(@PathVariable String[] recordIds) { +// return toAjax(qcCheckTaskProduceService.deleteQcCheckTaskProduceByRecordIds(recordIds)); +// } + + /** + * 单个删除生产过程检验任务 */ @RequiresPermissions("quality:qcProduce:remove") @Log(title = "生产过程检验任务", businessType = BusinessType.DELETE) - @DeleteMapping("/{recordIds}") - public AjaxResult remove(@PathVariable String[] recordIds) { - return toAjax(qcCheckTaskProduceService.deleteQcCheckTaskProduceByRecordIds(recordIds)); + @DeleteMapping("/{recordId}") + public AjaxResult remove(@PathVariable String recordId) { + return toAjax(qcCheckTaskProduceService.deleteQcCheckTaskProduceByRecordId(recordId)); } /** diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskDetailMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskDetailMapper.java index 8b4daf3e..6a78c32b 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskDetailMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskDetailMapper.java @@ -66,4 +66,7 @@ public interface QcCheckTaskDetailMapper { public int addBatch(@Param("list") List items); List getProjectStatus(String belongTo); + + //逻辑删除详情表 + void deleteQcCheckTaskDetailByBelongTo(String recordId); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index 0137eb85..c6ec10d6 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -89,9 +89,13 @@ public class QcCheckTaskIncomeServiceImpl implements @Autowired private IQcCheckUnqualifiedService qcCheckUnqualifiedService; + @Autowired private QcProCheckService qcProCheckService; + @Autowired + private QcCheckTaskUserMapper qcCheckTaskUserMapper; + /** * 查询来料检验 * @@ -379,7 +383,13 @@ public class QcCheckTaskIncomeServiceImpl implements @Override @DS("#header.poolName") public int deleteQcCheckTaskIncomeByRecordId(String recordId) { - return qcCheckTaskIncomeMapper.deleteQcCheckTaskIncomeByRecordId(recordId); + //1.逻辑删除qc_check_task表 + qcCheckTaskIncomeMapper.deleteQcCheckTaskIncomeByRecordId(recordId); + //2.逻辑删除qc_check_task_detail表 + qcCheckTaskDetailMapper.deleteQcCheckTaskDetailByBelongTo(recordId); + //3.逻辑删除qc_check_task_user表 + qcCheckTaskUserMapper.deleteQcCheckTaskUserByBelongTo(recordId); + return 1; } @Override diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java index d85479b7..68512ce5 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java @@ -59,6 +59,9 @@ public class QcCheckTaskInventoryServiceImpl implements IQcCheckTaskInventorySer @Autowired private QcSampleRuleMapper qcSampleRuleMapper; + @Autowired + private QcCheckTaskUserMapper qcCheckTaskUserMapper; + /** * 查询库存检验任务 * @@ -280,6 +283,12 @@ public class QcCheckTaskInventoryServiceImpl implements IQcCheckTaskInventorySer @Override @DS("#header.poolName") public int deleteQcCheckTaskInventoryByRecordId(String recordId) { - return qcCheckTaskInventoryMapper.deleteQcCheckTaskInventoryByRecordId(recordId); + //1.逻辑删除qc_check_task表 + qcCheckTaskInventoryMapper.deleteQcCheckTaskInventoryByRecordId(recordId); + //2.逻辑删除qc_check_task_detail表 + qcCheckTaskDetailMapper.deleteQcCheckTaskDetailByBelongTo(recordId); + //3.逻辑删除qc_check_task_user表 + qcCheckTaskUserMapper.deleteQcCheckTaskUserByBelongTo(recordId); + return 1; } } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java index 0e4352ce..a2e3fddc 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java @@ -85,6 +85,9 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService @Autowired private QcSampleRuleMapper qcSampleRuleMapper; + @Autowired + private QcCheckTaskUserMapper qcCheckTaskUserMapper; + /** * 查询生产过程检验任务 * @@ -336,7 +339,13 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService @Override @DS("#header.poolName") public int deleteQcCheckTaskProduceByRecordId(String recordId) { - return qcCheckTaskProduceMapper.deleteQcCheckTaskProduceByRecordId(recordId); + //1.逻辑删除qc_check_task表 + qcCheckTaskProduceMapper.deleteQcCheckTaskProduceByRecordId(recordId); + //2.逻辑删除qc_check_task_detail表 + qcCheckTaskDetailMapper.deleteQcCheckTaskDetailByBelongTo(recordId); + //3.逻辑删除qc_check_task_user表 + qcCheckTaskUserMapper.deleteQcCheckTaskUserByBelongTo(recordId); + return 1; } @Override diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml index 2315acb2..8ac51787 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml @@ -177,6 +177,12 @@ delete from qc_check_task_detail where record_id = #{recordId} + + update qc_check_task_detail + set del_flag = '1' + where belong_to = #{recordId} + + delete from qc_check_task_detail where record_id in diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml index 9d795b8b..8f6f3aeb 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml @@ -327,9 +327,11 @@ - - delete from qc_check_task where record_id = #{recordId} - + + update qc_check_task + set del_flag = '1' + where record_id = #{recordId} + delete from qc_check_task where record_id in diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskInventoryMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskInventoryMapper.xml index 22d815d6..66e62f36 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskInventoryMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskInventoryMapper.xml @@ -221,9 +221,11 @@ where record_id = #{recordId} - - delete from qc_check_task where record_id = #{recordId} - + + update qc_check_task + set del_flag = '1' + where record_id = #{recordId} + delete from qc_check_task where record_id in diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml index 975881d6..ca6b0106 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml @@ -321,9 +321,11 @@ where record_id = #{recordId} - - delete from qc_check_task where record_id = #{recordId} - + + update qc_check_task + set del_flag = '1' + where record_id = #{recordId} + delete from qc_check_task where record_id in diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskUserMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskUserMapper.xml index abfae362..c8b2f768 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskUserMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskUserMapper.xml @@ -116,9 +116,11 @@ - - delete from qc_check_task_user where belong_to = #{belongTo} - + + update qc_check_task_user + set del_flag = '1' + where belong_to = #{belongTo} + insert into qc_check_task_user(