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