Commit 2162405a by liuyang

2024-10-21 生产下料默认下料组

parent ac66d60a
...@@ -41,10 +41,7 @@ import org.springframework.util.CollectionUtils; ...@@ -41,10 +41,7 @@ import org.springframework.util.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.Arrays; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -62,7 +59,8 @@ public class ServiceHPSC0061 extends ServiceBase { ...@@ -62,7 +59,8 @@ public class ServiceHPSC0061 extends ServiceBase {
@OperationLogAnnotation(operModul = "生产下料", operType = "查询", operDesc = "初始化") @OperationLogAnnotation(operModul = "生产下料", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID),
new HashMap<String,Object>(){{put("orgType", OrgTypeEnum.CUT_GROUP.getCode());}}, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005().eiMetadata);
inInfo.addBlock(CommonConstant.Field.DETAIL).addBlockMeta(new HPSC006().eiMetadata); inInfo.addBlock(CommonConstant.Field.DETAIL).addBlockMeta(new HPSC006().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
...@@ -113,7 +111,18 @@ public class ServiceHPSC0061 extends ServiceBase { ...@@ -113,7 +111,18 @@ public class ServiceHPSC0061 extends ServiceBase {
} }
queryMap.put("prodOrderNo", inInfo.getString("prodOrderNo")); queryMap.put("prodOrderNo", inInfo.getString("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);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询明细失败"); LogUtils.setMsg(inInfo, e, "查询明细失败");
} }
......
...@@ -93,9 +93,9 @@ ...@@ -93,9 +93,9 @@
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
WHERE B.PROD_ORDER_NO = #prodOrderNo# WHERE B.PROD_ORDER_NO = #prodOrderNo#
<isNotEmpty prepend=" AND " property="groupCodes"> <!--<isNotEmpty prepend=" AND " property="groupCodes">
B.GROUP_CODE IN <iterate close=")" open="(" conjunction="," property="groupCodes">#groupCodes[]#</iterate> B.GROUP_CODE IN <iterate close=")" open="(" conjunction="," property="groupCodes">#groupCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>-->
ORDER BY A.INVENT_CODE ASC ORDER BY A.INVENT_CODE ASC
</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