二级库bug修改
This commit is contained in:
parent
6b034e61d8
commit
e502bc2fbf
|
|
@ -97,9 +97,6 @@ public class SecondaryWarehouseController extends BaseController {
|
||||||
@ApiOperation(value = "班组库存台账")
|
@ApiOperation(value = "班组库存台账")
|
||||||
@GetMapping("/getDevStockCount")
|
@GetMapping("/getDevStockCount")
|
||||||
public TableDataInfo getDevStockCount(SecondaryWarehouse bean) {
|
public TableDataInfo getDevStockCount(SecondaryWarehouse bean) {
|
||||||
if (bean.getUnitId() == null) {
|
|
||||||
return getDataTable(new ArrayList<>());
|
|
||||||
}
|
|
||||||
startPage();
|
startPage();
|
||||||
return getDataTable(service.getDevStockCount(bean));
|
return getDataTable(service.getDevStockCount(bean));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -289,11 +289,11 @@ public class SecondaryWarehouseServiceImpl implements SecondaryWarehouseService
|
||||||
teamLeaseInfo.setId(bean.getId());
|
teamLeaseInfo.setId(bean.getId());
|
||||||
num = mapper.addNewOperate(teamLeaseInfo);
|
num = mapper.addNewOperate(teamLeaseInfo);
|
||||||
mapper.updateMachine(maId, 15);
|
mapper.updateMachine(maId, 15);
|
||||||
// 修改库存总量
|
// // 修改库存总量
|
||||||
Integer parentId = mapper.selectParentId(teamLeaseInfo);
|
// Integer parentId = mapper.selectParentId(teamLeaseInfo);
|
||||||
if (parentId != null) {
|
// if (parentId != null) {
|
||||||
teamLeaseInfo.setParentId(parentId);
|
// teamLeaseInfo.setParentId(parentId);
|
||||||
}
|
// }
|
||||||
mapper.deleteOutNum(teamLeaseInfo);
|
mapper.deleteOutNum(teamLeaseInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SET
|
SET
|
||||||
out_num = out_num - #{outNum}
|
out_num = out_num - #{outNum}
|
||||||
WHERE
|
WHERE
|
||||||
id = #{id}
|
parent_id = #{parentId} and type_id = #{typeId}
|
||||||
</update>
|
</update>
|
||||||
<update id="auditSeconfScrap">
|
<update id="auditSeconfScrap">
|
||||||
UPDATE second_ccrap_apply_details
|
UPDATE second_ccrap_apply_details
|
||||||
|
|
@ -60,14 +60,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
<delete id="deleteOutNum">
|
<delete id="deleteOutNum">
|
||||||
DELETE FROM lease_out_details
|
DELETE FROM lease_out_details
|
||||||
WHERE parent_id = #{parentId}
|
WHERE parent_id = #{id}
|
||||||
AND ma_id = #{maId}
|
AND ma_id = #{maId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="getList" resultType="com.bonus.sgzb.material.domain.SecondaryWarehouse">
|
<select id="getList" resultType="com.bonus.sgzb.material.domain.SecondaryWarehouse">
|
||||||
SELECT
|
SELECT
|
||||||
bui.unit_id AS unitId,
|
bui.unit_id AS unitId,
|
||||||
lod.id as id,
|
lod.parent_id AS id,
|
||||||
tta.agreement_id AS agreementId,
|
tta.agreement_id AS agreementId,
|
||||||
bui.unit_name AS unitName,
|
bui.unit_name AS unitName,
|
||||||
mt1.type_name AS typeName,
|
mt1.type_name AS typeName,
|
||||||
|
|
@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
tta.agreement_id,
|
bui.unit_id,
|
||||||
lod.type_id
|
lod.type_id
|
||||||
</select>
|
</select>
|
||||||
<select id="getList1" resultType="com.bonus.sgzb.material.domain.SecondaryWarehouse">
|
<select id="getList1" resultType="com.bonus.sgzb.material.domain.SecondaryWarehouse">
|
||||||
|
|
@ -332,6 +332,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
receive_detail rd
|
receive_detail rd
|
||||||
WHERE
|
WHERE
|
||||||
parent_id = #{id}
|
parent_id = #{id}
|
||||||
|
AND type_id = #{typeId}
|
||||||
</select>
|
</select>
|
||||||
<select id="getNewRecords" resultType="com.bonus.sgzb.material.domain.TeamLeaseInfo">
|
<select id="getNewRecords" resultType="com.bonus.sgzb.material.domain.TeamLeaseInfo">
|
||||||
select mt.type_name modelName,
|
select mt.type_name modelName,
|
||||||
|
|
@ -509,7 +510,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectParentId" resultType="java.lang.Integer">
|
<select id="selectParentId" resultType="java.lang.Integer">
|
||||||
SELECT parent_id
|
SELECT parent_id
|
||||||
FROM lease_out_details
|
FROM lease_out_details
|
||||||
WHERE id = #{id}
|
WHERE parent_id = #{id}
|
||||||
</select>
|
</select>
|
||||||
<select id="getDevStockCount" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
<select id="getDevStockCount" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
|
|
@ -520,8 +521,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
tg.NAME groupName,
|
tg.NAME groupName,
|
||||||
slc.name as name,
|
slc.name as name,
|
||||||
mt.unit_name AS nuitName,
|
mt.unit_name AS nuitName,
|
||||||
SUM(rd.out_num) receiveNum,
|
LENGTH(GROUP_CONCAT(DISTINCT rd.ma_id)) - LENGTH(REPLACE(GROUP_CONCAT(DISTINCT rd.ma_id), ',', '')) + 1 AS receiveNum,
|
||||||
GROUP_CONCAT(rd.ma_id) maIds
|
GROUP_CONCAT(DISTINCT rd.ma_id) maIds
|
||||||
FROM (
|
FROM (
|
||||||
SELECT
|
SELECT
|
||||||
rd.*,
|
rd.*,
|
||||||
|
|
@ -561,7 +562,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
AND ((rd.type = '1' AND rd.rn <= GREATEST(0, rd.type1_count - rd.type2_count))
|
AND ((rd.type = '1' AND rd.rn <= GREATEST(0, rd.type1_count - rd.type2_count))
|
||||||
OR (rd.type = '2' AND rd.rn <= GREATEST(0, rd.type2_count - rd.type1_count)))
|
OR (rd.type = '2' AND rd.rn <= GREATEST(0, rd.type2_count - rd.type1_count)))
|
||||||
GROUP BY rd.type_id, rd.parent_id
|
GROUP BY rd.type_id
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
|
|
@ -612,7 +613,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND rd4.team_group_id = rd2.team_group_id
|
AND rd4.team_group_id = rd2.team_group_id
|
||||||
AND rd4.unit_id = rd2.unit_id)))
|
AND rd4.unit_id = rd2.unit_id)))
|
||||||
)
|
)
|
||||||
GROUP BY rd.type_id, rd.parent_id
|
GROUP BY rd.type_id
|
||||||
</select>
|
</select>
|
||||||
<select id="getSecondScrapList" resultType="com.bonus.sgzb.material.domain.SecondCcrapApplyDetails">
|
<select id="getSecondScrapList" resultType="com.bonus.sgzb.material.domain.SecondCcrapApplyDetails">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue