代码提交

This commit is contained in:
itcast 2025-12-24 11:28:32 +08:00
parent 6f40e1d72f
commit 61680290e4
4 changed files with 44 additions and 20 deletions

View File

@ -79,20 +79,20 @@ public class RepairServiceImpl implements RepairService {
// 1. 创建维修任务
changeId = createRepairTask(username);
//将申请的设备状态都改为维修
for (ToBeRepair detail : list) {
if ("编码管理".equals(detail.getManageMode()) && !StringHelper.isNullOrEmptyString(detail.getCode())) {
//1如果是编码管理将设备状态改为维修状态
if ("装备".equals(detail.getType())) {
int re1 = mapper.updateDevStatus(detail);
} else if ("工具".equals(detail.getType())) {
int re2 = mapper.updateToolStatus(detail);
}
} else if ("数量管理".equals(detail.getManageMode())) {
//目前数量管理的设备都是工具
//将在库数量减掉增加维修数量
int re3 = mapper.updateToolNum(detail);
}
}
// for (ToBeRepair detail : list) {
// if ("编码管理".equals(detail.getManageMode()) && !StringHelper.isNullOrEmptyString(detail.getCode())) {
// //1如果是编码管理将设备状态改为维修状态
// if ("装备".equals(detail.getType())) {
// int re1 = mapper.updateDevStatus(detail);
// } else if ("工具".equals(detail.getType())) {
// int re2 = mapper.updateToolStatus(detail);
// }
// } else if ("数量管理".equals(detail.getManageMode())) {
// //目前数量管理的设备都是工具
// //将在库数量减掉增加维修数量
// int re3 = mapper.updateToolNum(detail);
// }
// }
} else {
//退料维修任务提交
changeId = bean.getChangeId();
@ -419,8 +419,25 @@ public class RepairServiceImpl implements RepairService {
}
}
}
} else {
throw new Exception("缺少审核状态");
if ("编码管理".equals(bean.getManageMode()) && !StringHelper.isNullOrEmptyString(bean.getCode())) {
//1如果是编码管理将设备状态改为维修状态
if ("装备".equals(bean.getType())) {
int re1 = mapper.updateDevStatus(bean);
} else if ("工具".equals(bean.getType())) {
int re2 = mapper.updateToolStatus(bean);
}
} else if ("数量管理".equals(bean.getManageMode())) {
//目前数量管理的设备都是工具
//将在库数量减掉增加维修数量
int re3 = mapper.updateToolNum(bean);
} else {
throw new Exception("缺少审核状态");
}
}
}
return AjaxResult.success("审核成功");

View File

@ -214,8 +214,6 @@ public class ToBeScrapServiceImpl implements ToBeScrapService {
String errorMsg = String.format("%s已有在途单据在途数量%s本次申请数量%s", typeName, totalOccupyNumStr,applyNumStr);
// 记录日志包含关键参数便于问题排查
// 返回错误结果
return AjaxResult.error(errorMsg, AjaxResult.class);
}

View File

@ -423,6 +423,7 @@
tool_ledger tl
WHERE
tl.type_id=#{typeId}
and tl.status='2'
<if test="code != null and code!=&quot;/&quot;">
and tl.tool_code=#{code}
</if>

View File

@ -192,7 +192,9 @@
repair_url
ELSE
reason_url
END url
END url,
tl.available_num as inStockNum
FROM cs_device_change_details cdcd
LEFT JOIN tool_ledger tl
ON cdcd.dev_type = '2'
@ -242,7 +244,8 @@
repair_url
ELSE
reason_url
END url
END url,
'1' as inStockNum
FROM cs_device_change_details cdcd
LEFT JOIN ma_dev_info mdi on mdi.code = cdcd.dev_code
LEFT JOIN ma_type mt5 on mt5.type_id = mdi.type_id
@ -427,9 +430,14 @@
LEFT JOIN cs_device_change cdc ON cdc.id = cdcd.change_id
WHERE cdcd.dev_type_id = #{typeId}
AND cdc.review_status in ('1','0','5') AND cdc.type ='3'
and cdcd.del_flag ='0'
<if test="devCode!=null and devCode!=&quot;/&quot;">
AND cdcd.dev_code = #{devCode}
</if>
<if test="id!=null and id!=''">
and cdcd.id not in( #{id})
</if>
GROUP BY
cdcd.dev_type_id
</select>