请购单同步旗舰版SRM-更新采购需求数量-规则类
This commit is contained in:
parent
c1841cbf25
commit
0685e67bd9
|
|
@ -1,14 +1,16 @@
|
|||
package nc.bs.mmpac.pmo.pac0002.bp.rule;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import nc.bs.dao.BaseDAO;
|
||||
import nc.bs.dao.DAOException;
|
||||
import nc.bs.framework.common.NCLocator;
|
||||
import nc.bs.mmpac.pmo.pac0002.bp.rule.util.SyncSrmPrayBillUtil;
|
||||
import nc.bs.uapbd.util.MyHelper;
|
||||
import nc.impl.pubapp.pattern.rule.IRule;
|
||||
import nc.itf.pu.m20.IPraybillMaintain;
|
||||
import nc.jdbc.framework.processor.MapListProcessor;
|
||||
import nc.vo.bd.material.stock.MaterialStockVO;
|
||||
import nc.vo.mmpac.pmo.pac0002.entity.PMOAggVO;
|
||||
import nc.impl.pubapp.pattern.rule.IRule;
|
||||
import nc.vo.mmpac.pmo.pac0002.entity.PMOItemVO;
|
||||
import nc.vo.org.OrgVO;
|
||||
import nc.vo.pu.m20.entity.PraybillItemVO;
|
||||
|
|
@ -16,7 +18,6 @@ import nc.vo.pu.m20.entity.PraybillVO;
|
|||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pub.lang.UFDouble;
|
||||
import nc.vo.pubapp.pattern.model.transfer.bill.ClientBillToServer;
|
||||
import nccloud.framework.service.ServiceLocator;
|
||||
import nccloud.pubitf.pu.buyingreq.service.IBuyingReqQueryCardInfoService;
|
||||
import nccloud.web.pu.buyingreq.util.PublicUtil;
|
||||
|
||||
|
|
@ -83,7 +84,15 @@ public class AfterPickmRecalUpdateBuyingreqRule implements IRule<PMOAggVO> {
|
|||
// 뫘劤헝뭔데
|
||||
String sql = "update po_praybill_b set vbdef33='" + map.get("nplanoutnum") + "' where pk_praybill_b='"
|
||||
+ map2.get("pk_praybill_b") + "'";
|
||||
dao.executeUpdate(sql);
|
||||
int num = dao.executeUpdate(sql);
|
||||
if (num > 0 && "C030".equals(orgCode)) {
|
||||
SyncSrmPrayBillUtil billUtil = new SyncSrmPrayBillUtil();
|
||||
JSONObject reqData = new JSONObject();
|
||||
reqData.put("org", "C030");// 组织编码
|
||||
reqData.put("erpId", map2.get("pk_praybill_b"));// 请购单表体主键
|
||||
reqData.put("mainNum", map.get("nplanoutnum"));// 主数量
|
||||
billUtil.reqBIPBill(reqData);
|
||||
}
|
||||
// 꿴璂꽃뭔땐데
|
||||
String ordersql = "select pk_order_b from po_order_b where csourcebid ='" + map2.get("pk_praybill_b") + "' and dr = 0";
|
||||
List<Map<String, Object>> orders = (List<Map<String, Object>>) dao.executeQuery(ordersql, new MapListProcessor());
|
||||
|
|
@ -154,7 +163,6 @@ public class AfterPickmRecalUpdateBuyingreqRule implements IRule<PMOAggVO> {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -177,6 +185,7 @@ public class AfterPickmRecalUpdateBuyingreqRule implements IRule<PMOAggVO> {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean checkIfOrg(String code, Map<String, String> configParams) throws BusinessException {
|
||||
String targetCode = configParams.get("xbOrg");
|
||||
if (targetCode == null || nc.vo.am.common.util.StringUtils.isEmpty(targetCode)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue