箱变-销售订单同步启源-合同号取值调整
This commit is contained in:
parent
cd341c8df2
commit
1644b32ed8
|
@ -5,13 +5,16 @@ import com.alibaba.fastjson.JSONArray;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import nc.bs.dao.BaseDAO;
|
||||
import nc.bs.dao.DAOException;
|
||||
import nc.bs.logging.Log;
|
||||
import nc.bs.trade.business.HYPubBO;
|
||||
import nc.bs.trade.business.HYSuperDMO;
|
||||
import nc.bs.uapbd.util.MyHelper;
|
||||
import nc.bs.uapbd.util.ThirdPartyPostRequestUtil;
|
||||
import nc.impl.pubapp.pattern.rule.IRule;
|
||||
import nc.jdbc.framework.processor.ColumnProcessor;
|
||||
import nc.jdbc.framework.processor.MapProcessor;
|
||||
import nc.vo.bd.defdoc.DefdocVO;
|
||||
import nc.vo.org.OrgVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
||||
|
@ -72,7 +75,9 @@ public class AfterApprovingSynchronizeRuleQMS implements IRule<SaleOrderVO> {
|
|||
SaleOrderHVO pmoHeadVO = vo.getParentVO();
|
||||
SaleOrderBVO[] itemVOS = vo.getChildrenVO();
|
||||
singleObj.put("batchid", now);
|
||||
singleObj.put("hth", pmoHeadVO.getVdef6());
|
||||
String vdef6 = pmoHeadVO.getVdef6();
|
||||
String contractNum = getDefCode("zdy-001", vdef6);
|
||||
singleObj.put("hth", contractNum);
|
||||
singleObj.put("fplx", pmoHeadVO.getDbilldate().toString().substring(0, 10));
|
||||
if (null != pmoHeadVO.getCemployeeid()) {
|
||||
String sql = " select name from bd_psndoc where cuserid = '" + pmoHeadVO.getCemployeeid() + "' ";
|
||||
|
@ -195,5 +200,21 @@ public class AfterApprovingSynchronizeRuleQMS implements IRule<SaleOrderVO> {
|
|||
}
|
||||
|
||||
|
||||
private String getDefCode(String code, String pk_defdoc) {
|
||||
String res = "";
|
||||
String strWhere = " pk_defdoclist in (select pk_defdoclist from bd_defdoclist where code='" + code + "' and dr=0 ) and dr = 0 and pk_defdoc = '" + pk_defdoc + "'";
|
||||
try {
|
||||
DefdocVO[] defdocVOs = (DefdocVO[]) new HYSuperDMO().queryByWhereClause(DefdocVO.class, strWhere);
|
||||
if (defdocVOs != null && defdocVOs.length > 0) {
|
||||
res = defdocVOs[0].getCode().trim();
|
||||
}
|
||||
} catch (DAOException e) {
|
||||
logger.error("QMS-SaleOrder-error,getDefCode[" + e.getMessage() + "]");
|
||||
}
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue