根据流程生产订单BID查询V2

This commit is contained in:
mzr 2025-11-17 17:02:58 +08:00
parent c04935f925
commit 1450d8301c
1 changed files with 8 additions and 4 deletions

View File

@ -4,6 +4,7 @@ import nc.bs.dao.BaseDAO;
import nc.bs.dao.DAOException;
import nc.bs.framework.common.NCLocator;
import nc.bs.logging.Log;
import nc.bs.trade.business.HYPubBO;
import nc.itf.mmpac.pmo.pac0002.IPMOBusinessService;
import nc.itf.mmpac.pmo.pac0002.IPMOQueryService;
import nc.jdbc.framework.SQLParameter;
@ -335,11 +336,14 @@ public class PmoResource extends AbstractNCCRestResource {
if (MMCollectionUtil.isEmpty(bidList)) {
return ResultMessageUtil.exceptionToJSON("传入数据异常参数要包含pmobids信息", APIErrCodeEnum.BUSINESSEXCCODE.getCode());
} else {
HYPubBO hy = new HYPubBO();
try {
String[] pmobids = bidList.toArray(new String[0]);
IPMOQueryService pmoQuery = NCLocator.getInstance().lookup(IPMOQueryService.class);
PMOAggVO[] pmoAggVOS = pmoQuery.queryPMOAggVOByBid(pmobids);
return ResultMessageUtil.toJSON(pmoAggVOS, "流程生产订单查询成功");
List<PMOItemVO> pmoItemVOS = new ArrayList<>();
for (String bid : bidList) {
PMOItemVO pmoItemVO = (PMOItemVO) hy.queryByPrimaryKey(PMOItemVO.class, bid);
pmoItemVOS.add(pmoItemVO);
}
return ResultMessageUtil.toJSON(pmoItemVOS, "流程生产订单查询成功");
} catch (BusinessException e) {
return ResultMessageUtil.exceptionToJSON(e);
}