销售订单推送高压mes
This commit is contained in:
parent
4085ef8585
commit
6d231e964f
|
@ -30,7 +30,7 @@ import java.util.Map;
|
||||||
*
|
*
|
||||||
* @author mzr
|
* @author mzr
|
||||||
*/
|
*/
|
||||||
public class AfterAuditSyncRuleGyMes implements IRule<SaleOrderVO> {
|
public class AfterSoSyncRuleGyMes implements IRule<SaleOrderVO> {
|
||||||
private static final String LOG_INFO_NAME = "gymeslog";
|
private static final String LOG_INFO_NAME = "gymeslog";
|
||||||
private static final Log logger = Log.getInstance(LOG_INFO_NAME);
|
private static final Log logger = Log.getInstance(LOG_INFO_NAME);
|
||||||
private static final String reqUrl = "/bip/order/saleOrderAdd";
|
private static final String reqUrl = "/bip/order/saleOrderAdd";
|
||||||
|
@ -167,7 +167,7 @@ public class AfterAuditSyncRuleGyMes implements IRule<SaleOrderVO> {
|
||||||
res = defdocVOs[0].getCode().trim();
|
res = defdocVOs[0].getCode().trim();
|
||||||
}
|
}
|
||||||
} catch (DAOException e) {
|
} catch (DAOException e) {
|
||||||
logger.error("gyMes-SaleOrder-error,getDefList[" + e.getMessage() + "]");
|
logger.error("gyMes-SaleOrder-error,getDefCode[" + e.getMessage() + "]");
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -166,11 +166,11 @@ public class ApproveSaleOrderAction {
|
||||||
processer.addAfterRule(new MobAfterApproveMessageRule());
|
processer.addAfterRule(new MobAfterApproveMessageRule());
|
||||||
processer.addAfterRule(new SaleOrderCreateRmBeforeRule());
|
processer.addAfterRule(new SaleOrderCreateRmBeforeRule());
|
||||||
// 在审批后推送到MES系统
|
// 在审批后推送到MES系统
|
||||||
processer.addAfterRule(new AfterApprovingSynchronizeRuleMES());
|
// processer.addAfterRule(new AfterApprovingSynchronizeRuleMES());
|
||||||
|
|
||||||
|
|
||||||
// 在审批后推送到QMS系统
|
// 在审批后推送到QMS系统
|
||||||
processer.addAfterRule(new AfterApprovingSynchronizeRuleQMS());
|
// processer.addAfterRule(new AfterApprovingSynchronizeRuleQMS());
|
||||||
|
// 在审批后推送到高压MES
|
||||||
|
processer.addAfterRule(new AfterSoSyncRuleGyMes());
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isExistDelivery(String ctranstype) {
|
private boolean isExistDelivery(String ctranstype) {
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
package nc.impl.so.m30.action.main;
|
||||||
|
|
||||||
|
import nc.bs.so.m30.maintain.UpdateSaleOrderBP;
|
||||||
|
import nc.bs.so.m30.plugin.Action30PlugInPoint;
|
||||||
|
import nc.bs.so.m30.rule.approve.AfterSoSyncRuleGyMes;
|
||||||
|
import nc.bs.so.m30.rule.maintainprocess.CompareDimensionModifyRule;
|
||||||
|
import nc.bs.so.m30.rule.maintainprocess.FillupDataWhenUpdateRule;
|
||||||
|
import nc.bs.so.m30.rule.maintainprocess.NullRule;
|
||||||
|
import nc.impl.pubapp.pattern.rule.IRule;
|
||||||
|
import nc.impl.pubapp.pattern.rule.processer.CompareAroundProcesser;
|
||||||
|
import nc.vo.pubapp.pattern.log.TimeLog;
|
||||||
|
import nc.vo.so.m30.entity.SaleOrderVO;
|
||||||
|
|
||||||
|
public class UpdateSaleOrderAction {
|
||||||
|
public SaleOrderVO[] update(SaleOrderVO[] bills, SaleOrderVO[] originBills) {
|
||||||
|
CompareAroundProcesser<SaleOrderVO> processer = new CompareAroundProcesser<SaleOrderVO>(Action30PlugInPoint.UpdateAction);
|
||||||
|
|
||||||
|
|
||||||
|
addBeforeRule(processer);
|
||||||
|
addAfterRule(processer);
|
||||||
|
|
||||||
|
TimeLog.logStart();
|
||||||
|
processer.before(bills, originBills);
|
||||||
|
|
||||||
|
TimeLog.info("调用修改保存前操作插入点");
|
||||||
|
|
||||||
|
TimeLog.logStart();
|
||||||
|
UpdateSaleOrderBP action = new UpdateSaleOrderBP();
|
||||||
|
SaleOrderVO[] vos = action.update(bills, originBills);
|
||||||
|
|
||||||
|
TimeLog.info("调用修改保存BP,进行保存");
|
||||||
|
|
||||||
|
TimeLog.logStart();
|
||||||
|
processer.after(vos, originBills);
|
||||||
|
|
||||||
|
TimeLog.info("调用修改保存后操作插入点");
|
||||||
|
return vos;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void addAfterRule(CompareAroundProcesser<SaleOrderVO> processer) {
|
||||||
|
processer.addAfterRule(new NullRule());
|
||||||
|
processer.addAfterRule(new CompareDimensionModifyRule());
|
||||||
|
// 在变更后推送到高压MES
|
||||||
|
processer.addAfterRule(new AfterSoSyncRuleGyMes());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void addBeforeRule(CompareAroundProcesser<SaleOrderVO> processer) {
|
||||||
|
IRule<SaleOrderVO> rule = null;
|
||||||
|
|
||||||
|
rule = new FillupDataWhenUpdateRule();
|
||||||
|
processer.addBeforeRule(rule);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue