diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java index f4f773cd..b2a7499b 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java @@ -223,7 +223,7 @@ public class BackApplyController extends BaseController { return AjaxResult.error("退料设备明细为空,请重新选择后上传!"); } for (BackApplyInfo backApplyInfo : record.getBackApplyDetails()){ - backApplyInfo.setId(record.getTaskId()); + backApplyInfo.setParentId(record.getParentId()); boolean re =backApplyService.upload(backApplyInfo)>0; if (!re){ return AjaxResult.error("退料任务明细插入失败"); @@ -233,25 +233,6 @@ public class BackApplyController extends BaseController { }catch (Exception e){ return AjaxResult.error("创建任务失败," + e.getCause().toString() + "," + e.getMessage()); } -// try { -// if (!StringUtils.isEmpty(record.getTypeId()) && !StringUtils.isEmpty(record.getNum())){ -// String[] typeId = record.getTypeId().split(","); -// String[] num = record.getNum().split(","); -// for (int i=0;i< typeId.length;i++){ -// String typeIdStr=typeId[i]; -// String numStr=num[i]; -// record.setTypeId(typeIdStr); -// record.setNum(numStr); -// int re =backApplyService.upload(record); -// if (re<1){ -// return AjaxResult.error("提交失败"); -// } -// } -// } -// return AjaxResult.success("提交成功"); -// } catch (Exception e) { -// throw new RuntimeException(e); -// } } // 退料编号生成规则 diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml index 806c9e6e..17cc0dde 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml @@ -283,7 +283,21 @@ bai.id = #{id} - DELETE FROM back_apply_info WHERE id = #{id} + DELETE + FROM tm_task_agreement + WHERE task_id IN (SELECT task_id FROM back_apply_info WHERE id = #{id}); + + DELETE + FROM tm_task + WHERE task_id IN (SELECT task_id FROM back_apply_info WHERE id = #{id}); + + DELETE + FROM back_apply_details + WHERE parent_id IN (SELECT id FROM back_apply_info WHERE id = #{id}); + + DELETE + FROM back_apply_info + WHERE id = #{id}; @@ -422,14 +434,14 @@ + insert into repair_input_details diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ReturnOfMaterialsInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ReturnOfMaterialsInfoMapper.xml index 10d71683..4ec65e5e 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ReturnOfMaterialsInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ReturnOfMaterialsInfoMapper.xml @@ -11,7 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" iad.input_num as inputNum,mm.ma_code as maCode, tt.create_time as returnTime, iad.create_time as submitStorageTime, - iad.create_by as submitToStoragePersonnel,iad.remark as remark + us.user_name as submitToStoragePersonnel,iad.remark as remark FROM input_apply_details iad LEFT JOIN tm_task tt ON iad.task_id = tt.task_id LEFT JOIN tm_task_agreement tta on tta.task_id = tt.task_id @@ -21,9 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN ma_type mt on mt.type_id = iad.type_id LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3' LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2' - LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1' + LEFT JOIN sys_user us on us.user_id=iad.create_by LEFT JOIN ma_machine mm ON mm.ma_id = iad.ma_id - WHERE tt.task_status = '38' and mt.`level` = '4' and input_type ='2' + WHERE tt.task_status = '40' and mt.`level` = '4' and input_type ='2' and tt.`code` like concat('%', #{keyWord}, '%')