2024-5-27 质量-来料/过程/库存-加逻辑删除

master
A0010407 8 months ago
parent 3dc6a44888
commit dd9bfb5496

@ -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") @RequiresPermissions("quality:qcIncome:remove")
@Log(title = "来料检验", businessType = BusinessType.DELETE) @Log(title = "来料检验", businessType = BusinessType.DELETE)
@DeleteMapping("/{recordIds}") @DeleteMapping("/{recordId}")
public AjaxResult remove(@PathVariable String[] recordIds) { public AjaxResult remove(@PathVariable String recordId) {
return toAjax(qcCheckTaskIncomeService.deleteQcCheckTaskIncomeByRecordIds(recordIds)); return toAjax(qcCheckTaskIncomeService.deleteQcCheckTaskIncomeByRecordId(recordId));
} }
/** /**

@ -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") @RequiresPermissions("quality:qcInventory:remove")
@Log(title = "库存检验任务", businessType = BusinessType.DELETE) @Log(title = "库存检验任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{recordIds}") @DeleteMapping("/{recordId}")
public AjaxResult remove(@PathVariable String[] recordIds) { public AjaxResult remove(@PathVariable String recordId) {
return toAjax(qcCheckTaskInventoryService.deleteQcCheckTaskInventoryByRecordIds(recordIds)); return toAjax(qcCheckTaskInventoryService.deleteQcCheckTaskInventoryByRecordId(recordId));
} }
} }

@ -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") @RequiresPermissions("quality:qcProduce:remove")
@Log(title = "生产过程检验任务", businessType = BusinessType.DELETE) @Log(title = "生产过程检验任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{recordIds}") @DeleteMapping("/{recordId}")
public AjaxResult remove(@PathVariable String[] recordIds) { public AjaxResult remove(@PathVariable String recordId) {
return toAjax(qcCheckTaskProduceService.deleteQcCheckTaskProduceByRecordIds(recordIds)); return toAjax(qcCheckTaskProduceService.deleteQcCheckTaskProduceByRecordId(recordId));
} }
/** /**

@ -66,4 +66,7 @@ public interface QcCheckTaskDetailMapper {
public int addBatch(@Param("list") List<QcCheckTaskDetail> items); public int addBatch(@Param("list") List<QcCheckTaskDetail> items);
List<String> getProjectStatus(String belongTo); List<String> getProjectStatus(String belongTo);
//逻辑删除详情表
void deleteQcCheckTaskDetailByBelongTo(String recordId);
} }

@ -89,9 +89,13 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
@Autowired @Autowired
private IQcCheckUnqualifiedService qcCheckUnqualifiedService; private IQcCheckUnqualifiedService qcCheckUnqualifiedService;
@Autowired @Autowired
private QcProCheckService qcProCheckService; private QcProCheckService qcProCheckService;
@Autowired
private QcCheckTaskUserMapper qcCheckTaskUserMapper;
/** /**
* *
* *
@ -379,7 +383,13 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
@Override @Override
@DS("#header.poolName") @DS("#header.poolName")
public int deleteQcCheckTaskIncomeByRecordId(String recordId) { 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 @Override

@ -59,6 +59,9 @@ public class QcCheckTaskInventoryServiceImpl implements IQcCheckTaskInventorySer
@Autowired @Autowired
private QcSampleRuleMapper qcSampleRuleMapper; private QcSampleRuleMapper qcSampleRuleMapper;
@Autowired
private QcCheckTaskUserMapper qcCheckTaskUserMapper;
/** /**
* *
* *
@ -280,6 +283,12 @@ public class QcCheckTaskInventoryServiceImpl implements IQcCheckTaskInventorySer
@Override @Override
@DS("#header.poolName") @DS("#header.poolName")
public int deleteQcCheckTaskInventoryByRecordId(String recordId) { 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;
} }
} }

@ -85,6 +85,9 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
@Autowired @Autowired
private QcSampleRuleMapper qcSampleRuleMapper; private QcSampleRuleMapper qcSampleRuleMapper;
@Autowired
private QcCheckTaskUserMapper qcCheckTaskUserMapper;
/** /**
* *
* *
@ -336,7 +339,13 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
@Override @Override
@DS("#header.poolName") @DS("#header.poolName")
public int deleteQcCheckTaskProduceByRecordId(String recordId) { 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 @Override

@ -177,6 +177,12 @@
delete from qc_check_task_detail where record_id = #{recordId} delete from qc_check_task_detail where record_id = #{recordId}
</delete> </delete>
<update id="deleteQcCheckTaskDetailByBelongTo" parameterType="String">
update qc_check_task_detail
set del_flag = '1'
where belong_to = #{recordId}
</update>
<delete id="deleteQcCheckTaskDetailByRecordIds" parameterType="String"> <delete id="deleteQcCheckTaskDetailByRecordIds" parameterType="String">
delete from qc_check_task_detail where record_id in delete from qc_check_task_detail where record_id in
<foreach item="recordId" collection="array" open="(" separator="," close=")"> <foreach item="recordId" collection="array" open="(" separator="," close=")">

@ -327,9 +327,11 @@
</foreach> </foreach>
</update> </update>
<delete id="deleteQcCheckTaskIncomeByRecordId" parameterType="String"> <update id="deleteQcCheckTaskIncomeByRecordId" parameterType="String">
delete from qc_check_task where record_id = #{recordId} update qc_check_task
</delete> set del_flag = '1'
where record_id = #{recordId}
</update>
<delete id="deleteQcCheckTaskIncomeByRecordIds" parameterType="String"> <delete id="deleteQcCheckTaskIncomeByRecordIds" parameterType="String">
delete from qc_check_task where record_id in delete from qc_check_task where record_id in

@ -221,9 +221,11 @@
where record_id = #{recordId} where record_id = #{recordId}
</update> </update>
<delete id="deleteQcCheckTaskInventoryByRecordId" parameterType="String"> <update id="deleteQcCheckTaskInventoryByRecordId" parameterType="String">
delete from qc_check_task where record_id = #{recordId} update qc_check_task
</delete> set del_flag = '1'
where record_id = #{recordId}
</update>
<delete id="deleteQcCheckTaskInventoryByRecordIds" parameterType="String"> <delete id="deleteQcCheckTaskInventoryByRecordIds" parameterType="String">
delete from qc_check_task where record_id in delete from qc_check_task where record_id in

@ -321,9 +321,11 @@
where record_id = #{recordId} where record_id = #{recordId}
</update> </update>
<delete id="deleteQcCheckTaskProduceByRecordId" parameterType="String"> <update id="deleteQcCheckTaskProduceByRecordId" parameterType="String">
delete from qc_check_task where record_id = #{recordId} update qc_check_task
</delete> set del_flag = '1'
where record_id = #{recordId}
</update>
<delete id="deleteQcCheckTaskProduceByRecordIds" parameterType="String"> <delete id="deleteQcCheckTaskProduceByRecordIds" parameterType="String">
delete from qc_check_task where record_id in delete from qc_check_task where record_id in

@ -116,9 +116,11 @@
</foreach> </foreach>
</delete> </delete>
<delete id="deleteQcCheckTaskUserByBelongTo" parameterType="String"> <update id="deleteQcCheckTaskUserByBelongTo" parameterType="String">
delete from qc_check_task_user where belong_to = #{belongTo} update qc_check_task_user
</delete> set del_flag = '1'
where belong_to = #{belongTo}
</update>
<insert id="insertQcCheckTaskUserList" parameterType="List"> <insert id="insertQcCheckTaskUserList" parameterType="List">
insert into qc_check_task_user( insert into qc_check_task_user(

Loading…
Cancel
Save