Commit 6f2b4f78 by liuyang

2024-10-23 修复生产下料默认下料组bug

parent e1b035b4
...@@ -138,9 +138,25 @@ public class ServiceHPSC0061 extends ServiceBase { ...@@ -138,9 +138,25 @@ public class ServiceHPSC0061 extends ServiceBase {
*/ */
private EiInfo refreshMain(EiInfo inInfo, String prodOrderNo) { private EiInfo refreshMain(EiInfo inInfo, String prodOrderNo) {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
List<Map> list = HPXSTools.XsOrg.queryParent(null, OrgTypeEnum.CUT_GROUP.getCode());
if (!CollectionUtils.isEmpty(list)){
List<String> orgIds = list.stream().map(m -> m.get("orgId").toString()).collect(Collectors.toList());
queryMap.put("groupCodes", orgIds);
}
queryMap.put("prodOrderNo", prodOrderNo); queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC0061> dbSc0061s = dao.query("HPSC0061.queryDetail", queryMap); List<HPSC0061> dbSc0061s = dao.query("HPSC0061.queryDetail", queryMap);
inInfo.addBlock(CommonConstant.Field.DETAIL).setRows(dbSc0061s); List<HPSC0061> list1 = new ArrayList<>();
for (HPSC0061 dbSc0061 : dbSc0061s) {
if (list.size() > 0){
dbSc0061.setGroupCode(list.get(0).get("orgId").toString());
dbSc0061.setGroupName(list.get(0).get("orgCname").toString());
}else {
dbSc0061.setGroupCode("");
dbSc0061.setGroupName("");
}
list1.add(dbSc0061);
}
inInfo.addBlock(CommonConstant.Field.DETAIL).setRows(list1);
return inInfo; return inInfo;
} }
......
...@@ -91,11 +91,8 @@ ...@@ -91,11 +91,8 @@
B.GROUP_NAME as "groupName", B.GROUP_NAME as "groupName",
IFNULL(B.COMPLETE_STATUS, 0) as "completeStatus" IFNULL(B.COMPLETE_STATUS, 0) as "completeStatus"
FROM ${hpjxSchema}.T_HPSC0061A A FROM ${hpjxSchema}.T_HPSC0061A A
LEFT JOIN ${hpjxSchema}.T_HPSC0061 B ON A.INVENT_CODE = B.INVENT_CODE LEFT JOIN ${hpjxSchema}.T_HPSC0061 B ON A.INVENT_CODE = B.INVENT_CODE and B.PROD_ORDER_NO = #prodOrderNo#
WHERE B.PROD_ORDER_NO = #prodOrderNo# WHERE 1=1
<!--<isNotEmpty prepend=" AND " property="groupCodes">
B.GROUP_CODE IN <iterate close=")" open="(" conjunction="," property="groupCodes">#groupCodes[]#</iterate>
</isNotEmpty>-->
ORDER BY A.INVENT_CODE ASC ORDER BY A.INVENT_CODE ASC
</select> </select>
...@@ -103,11 +100,8 @@ ...@@ -103,11 +100,8 @@
SELECT COUNT(1) SELECT COUNT(1)
FROM ${hpjxSchema}.T_HPSC0061A A FROM ${hpjxSchema}.T_HPSC0061A A
LEFT JOIN ${hpjxSchema}.T_HPSC0061 B LEFT JOIN ${hpjxSchema}.T_HPSC0061 B
ON A.INVENT_CODE = B.INVENT_CODE ON A.INVENT_CODE = B.INVENT_CODE and B.PROD_ORDER_NO = #prodOrderNo#
WHERE B.PROD_ORDER_NO = #prodOrderNo# WHERE 1=1
<isNotEmpty prepend=" AND " property="groupCode">
B.GROUP_CODE = #groupCode#
</isNotEmpty>
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment