This commit is contained in:
mashuai 2025-08-12 17:09:07 +08:00
parent a0f4d1e8d5
commit 2089c4eb12
3 changed files with 17 additions and 11 deletions

View File

@ -985,9 +985,6 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
result += bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
}
}
if (isBack == 1) {
result += machineMapper.updateStatus(maCodeDto.getMaId(), MaMachineStatusEnum.IN_STORE.getStatus());
}
}
} else {
// 如果 MaCodeList 为空只插入 CheckDetails

View File

@ -556,8 +556,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = sai.agreement_id
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
WHERE
sai.end_time IS NULL
AND sai.back_id IS NULL
sai.`status` = '0'
AND sai.end_time IS NULL
AND sai.back_id IS NULL
AND sai.`is_slt` = '0'
<if test="typeId != null">
AND sai.type_id = #{typeId}
</if>
@ -707,12 +709,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectInFo" resultType="com.bonus.material.basic.domain.UseStorageInfo">
SELECT
create_time as outTime,
GROUP_CONCAT( DISTINCT create_by ) AS creator
lod.create_time AS outTime,
GROUP_CONCAT(DISTINCT
CASE
WHEN lod.create_by REGEXP '^[0-9]+$' THEN su.nick_name -- 如果是纯数字,使用昵称
ELSE lod.create_by -- 否则直接使用create_by的值
END
) AS creator
FROM
lease_out_details
WHERE parent_id = #{leaseId}
GROUP BY parent_id
lease_out_details lod
LEFT JOIN sys_user su ON lod.create_by = su.user_id
WHERE lod.parent_id = #{leaseId}
GROUP BY lod.parent_id
LIMIT 1
</select>

View File

@ -578,7 +578,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mm.type_id as typeId,
sd.dict_label as maStatus,
mm.qr_code as qrCode,
mm.ma_vender as maVender,
msi.supplier as maVender,
mm.out_fac_time as outFacTime,
mm.out_fac_code as outFacCode,
mm.assets_code as assetsCode,
@ -591,6 +591,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt ON mt.type_id = mm.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
LEFT JOIN sys_dict_data sd on mm.ma_status = sd.dict_value and sd.dict_type = "ma_machine_status"
LEFT JOIN ma_supplier_info msi on msi.supplier_id = mm.ma_vender
where mm.qr_code = #{qrCode}
</select>