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