This commit is contained in:
hayu 2026-01-06 19:10:21 +08:00
parent c9e088548d
commit f9c249e0c0
7 changed files with 20 additions and 2 deletions

View File

@ -608,6 +608,7 @@ public class BackChangeServiceImpl implements BackChangeService {
deviceInfo.setReviewStatus("5"); deviceInfo.setReviewStatus("5");
deviceInfo.setCreateUser(username); deviceInfo.setCreateUser(username);
deviceInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getDeptId()); deviceInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getDeptId());
deviceInfo.setSource("0");
int result = repairMapper.addDeviceChange(deviceInfo); int result = repairMapper.addDeviceChange(deviceInfo);
if (result < 1) { if (result < 1) {
throw new Exception("添加任务失败"); throw new Exception("添加任务失败");

View File

@ -103,4 +103,9 @@ public class CsDeviceInfo {
@ApiModelProperty(value = "所属公司id") @ApiModelProperty(value = "所属公司id")
private Long companyId; private Long companyId;
/**
* 来源维修0-退料1-在库
*/
private String source;
} }

View File

@ -150,4 +150,9 @@ public class ToBeRepair {
@ApiModelProperty(value = "是否是审核") @ApiModelProperty(value = "是否是审核")
private int isAudit; private int isAudit;
/**
* 来源维修0-退料1-在库
*/
private String source;
} }

View File

@ -458,6 +458,7 @@ public class RepairServiceImpl implements RepairService {
deviceInfo.setReviewStatus("0"); deviceInfo.setReviewStatus("0");
deviceInfo.setCreateUser(username); deviceInfo.setCreateUser(username);
deviceInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getDeptId()); deviceInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getDeptId());
deviceInfo.setSource("1");
int result = mapper.addDeviceChange(deviceInfo); int result = mapper.addDeviceChange(deviceInfo);
if (result < 1) { if (result < 1) {
throw new Exception("添加任务失败"); throw new Exception("添加任务失败");

View File

@ -272,6 +272,7 @@
WHERE WHERE
is_active = 1 is_active = 1
AND dcd.change_id = #{id} AND dcd.change_id = #{id}
and dcd.del_flag='0'
<if test="type!=null and type==2"> <if test="type!=null and type==2">
AND dcd.real_num is NOT null AND dcd.real_num is NOT null
@ -327,6 +328,7 @@
WHERE WHERE
dcd.change_id = #{id} dcd.change_id = #{id}
and dcd.dev_type='2' and dcd.dev_type='2'
and dcd.del_flag='0'
<if test="type!=null and type==2"> <if test="type!=null and type==2">
AND dcd.real_num is NOT null AND dcd.real_num is NOT null
</if> </if>

View File

@ -71,6 +71,7 @@
WHEN 'EQUIPMENT_REPAIR' THEN '设备维修' WHEN 'EQUIPMENT_REPAIR' THEN '设备维修'
WHEN 'EQUIPMENT_RETURN' THEN '设备退库' WHEN 'EQUIPMENT_RETURN' THEN '设备退库'
WHEN 'EQUIPMENT_OUT' THEN '设备出库' WHEN 'EQUIPMENT_OUT' THEN '设备出库'
WHEN 'EQUIPMENT_PUT' THEN '设备入库'
ELSE '未知业务类型' ELSE '未知业务类型'
END AS businessName, END AS businessName,
'申请' AS statusType, '申请' AS statusType,
@ -93,6 +94,7 @@
WHEN 'EQUIPMENT_REPAIR' THEN '设备维修' WHEN 'EQUIPMENT_REPAIR' THEN '设备维修'
WHEN 'EQUIPMENT_RETURN' THEN '设备退库' WHEN 'EQUIPMENT_RETURN' THEN '设备退库'
WHEN 'EQUIPMENT_OUT' THEN '设备出库' WHEN 'EQUIPMENT_OUT' THEN '设备出库'
WHEN 'EQUIPMENT_PUT' THEN '设备入库'
ELSE '未知业务类型' ELSE '未知业务类型'
END AS businessName, END AS businessName,
'审核' AS statusType, '审核' AS statusType,
@ -324,6 +326,7 @@
WHEN 'EQUIPMENT_REPAIR' THEN '设备维修' WHEN 'EQUIPMENT_REPAIR' THEN '设备维修'
WHEN 'EQUIPMENT_RETURN' THEN '设备退库' WHEN 'EQUIPMENT_RETURN' THEN '设备退库'
WHEN 'EQUIPMENT_OUT' THEN '设备出库' WHEN 'EQUIPMENT_OUT' THEN '设备出库'
WHEN 'EQUIPMENT_PUT' THEN '设备入库'
ELSE '未知业务类型' ELSE '未知业务类型'
END AS businessName END AS businessName
FROM FROM

View File

@ -2,8 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.bonus.material.repair.mapper.RepairMapper"> <mapper namespace="com.bonus.material.repair.mapper.RepairMapper">
<insert id="addDeviceChange" keyProperty="id" useGeneratedKeys="true"> <insert id="addDeviceChange" keyProperty="id" useGeneratedKeys="true">
insert into cs_device_change(type, code, review_status, create_user, create_time, del_flag, company_id) insert into cs_device_change(type, code, review_status, create_user, create_time, del_flag, company_id, source)
values (#{type}, #{code}, #{reviewStatus}, #{createUser}, NOW(), '0', #{companyId}) values (#{type}, #{code}, #{reviewStatus}, #{createUser}, NOW(), '0', #{companyId},#{source})
</insert> </insert>
<insert id="addRepairData"> <insert id="addRepairData">
insert into cs_device_change_details( insert into cs_device_change_details(
@ -275,6 +275,7 @@
cdc.create_user as createUser, cdc.create_user as createUser,
cdc.create_time as createTime, cdc.create_time as createTime,
cdc.review_status as status, cdc.review_status as status,
cdc.source,
cdc.company_id as companyId cdc.company_id as companyId
FROM cs_device_change cdc FROM cs_device_change cdc
LEFT JOIN cs_device_change_details cdcd ON cdcd.change_id = cdc.id LEFT JOIN cs_device_change_details cdcd ON cdcd.change_id = cdc.id