领用出库
This commit is contained in:
parent
53ac43dcb2
commit
e837e9c01d
|
|
@ -317,8 +317,14 @@ public class DevChangeServiceImpl implements DevChangeService {
|
|||
for (CsDeviceDetails csDeviceDetails : devDetailsList) {
|
||||
CsDeviceDetails devDetails = new CsDeviceDetails();
|
||||
if (StringUtils.isNotBlank(csDeviceDetails.getDevType()) && "1".equals(csDeviceDetails.getDevType())) {
|
||||
if ("/".equals(csDeviceDetails.getDevCode())) {
|
||||
csDeviceDetails.setDevCode(null);
|
||||
}
|
||||
devDetails = mapper.getTypeMaDevInfo(csDeviceDetails);
|
||||
} else if (StringUtils.isNotBlank(csDeviceDetails.getDevType()) && "2".equals(csDeviceDetails.getDevType())) {
|
||||
if ("/".equals(csDeviceDetails.getDevCode())) {
|
||||
csDeviceDetails.setDevCode(null);
|
||||
}
|
||||
devDetails = mapper.getTypeToolInfo(csDeviceDetails);
|
||||
}
|
||||
if (devDetails != null) {
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@
|
|||
mdi.item_type_model AS typeModelName,
|
||||
mdi.manage_type AS manageType,
|
||||
mdi.code AS devCode,
|
||||
1 AS storageNum,
|
||||
mdi.device_count AS storageNum,
|
||||
1 AS devType,
|
||||
mdi.type_id AS typeId,
|
||||
mdi.ma_id AS id
|
||||
|
|
@ -264,17 +264,6 @@
|
|||
LEFT JOIN ma_type mt5 ON mt4.parent_id = mt5.type_id
|
||||
<where>
|
||||
mdi.is_active = '1' and mdi.ma_status = 1
|
||||
<!-- 过滤待审核设备-->
|
||||
AND mdi.code NOT IN (
|
||||
SELECT
|
||||
cdc.dev_code
|
||||
FROM
|
||||
cs_device_change_details cdc
|
||||
LEFT JOIN cs_device_change cd ON cdc.change_id = cd.id
|
||||
WHERE
|
||||
cdc.dev_code is not null
|
||||
AND cdc.del_flag = '0'
|
||||
AND cdc.dev_type = '1')
|
||||
<if test="typeName!=null and typeName!=''">
|
||||
AND mdi.device_name like concat('%',#{typeName},'%')
|
||||
</if>
|
||||
|
|
@ -305,17 +294,6 @@
|
|||
LEFT JOIN tool_type tt4 ON tt3.parent_id = tt4.type_id
|
||||
<where>
|
||||
tl.status = '0'
|
||||
<!-- 过滤已申请设备-->
|
||||
AND IFNULL(tl.tool_code,'/') NOT IN (
|
||||
SELECT
|
||||
cdc.dev_code
|
||||
FROM
|
||||
cs_device_change_details cdc
|
||||
LEFT JOIN cs_device_change cd ON cdc.change_id = cd.id
|
||||
WHERE
|
||||
cdc.dev_code is not null
|
||||
AND cdc.del_flag = '0'
|
||||
AND cdc.dev_type = '2')
|
||||
<if test="typeName!=null and typeName!=''">
|
||||
AND tt1.type_name like concat('%',#{typeName},'%')
|
||||
</if>
|
||||
|
|
@ -429,7 +407,7 @@
|
|||
mdi.item_type_model AS typeModelName,
|
||||
mdi.manage_type AS manageType,
|
||||
mdi.code AS devCode,
|
||||
1 AS storageNum,
|
||||
SUM(CASE WHEN mdi.ma_status = 1 THEN 1 ELSE 0 END) AS storageNum,
|
||||
1 AS devType,
|
||||
mdi.type_id AS typeId,
|
||||
mdi.ma_id AS id
|
||||
|
|
@ -464,7 +442,7 @@
|
|||
LEFT JOIN tool_type tt3 ON tt2.parent_id = tt3.type_id
|
||||
LEFT JOIN tool_type tt4 ON tt3.parent_id = tt4.type_id
|
||||
where
|
||||
tl.type_id = #{typeId}
|
||||
tl.type_id = #{typeId} and tl.status = '0'
|
||||
<if test="devCode != null and devCode != ''">
|
||||
and tl.tool_code = #{devCode}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue