Compare commits
No commits in common. "36f03cab99927c143cbc83c0c4b136ee346c9941" and "175d1bfc9c7f65fd3bea152dc61e879c1c6a64ee" have entirely different histories.
36f03cab99
...
175d1bfc9c
|
@ -1,145 +0,0 @@
|
||||||
//
|
|
||||||
// Source code recreated from a .class file by IntelliJ IDEA
|
|
||||||
// (powered by FernFlower decompiler)
|
|
||||||
//
|
|
||||||
|
|
||||||
package nc.bs.mmpac.pickm.rule.subitems.datas;
|
|
||||||
|
|
||||||
import nc.bs.mmpac.pickm.adapter.BomServiceAdapter;
|
|
||||||
import nc.bs.mmpac.pickm.rule.subitems.cache.PickmSubItemBuilderDateCache;
|
|
||||||
import nc.bs.pubapp.AppBsContext;
|
|
||||||
import nc.pubitf.sc.m61.mm.SCOrderQtyResultParamForPickm;
|
|
||||||
import nc.util.mmf.framework.base.MMNumberUtil;
|
|
||||||
import nc.util.mmf.framework.base.MMValueCheck;
|
|
||||||
import nc.vo.bd.bom.bom0202.paramvo.BomItemQueryParamForPickm;
|
|
||||||
import nc.vo.bd.vermatch.enumeration.MfgTypeEnum;
|
|
||||||
import nc.vo.mmpac.mo.param.MOSubItemQueryResultVO4Pickm;
|
|
||||||
import nc.vo.mmpac.pickm.consts.PickmLangConsts;
|
|
||||||
import nc.vo.mmpac.pickm.entity.AggPickmVO;
|
|
||||||
import nc.vo.mmpac.pickm.entity.PickmHeadVO;
|
|
||||||
import nc.vo.mmpac.pickm.enumeration.FsourcetypeEnum;
|
|
||||||
import nc.vo.pub.lang.UFDouble;
|
|
||||||
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
|
||||||
|
|
||||||
public class PickmSubItemDataFromBom {
|
|
||||||
private PickmSubItemBuilderDateCache subItemdateCache;
|
|
||||||
|
|
||||||
public PickmSubItemDataFromBom(PickmSubItemBuilderDateCache cache) {
|
|
||||||
this.subItemdateCache = cache;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void getSubItemDataFromBom(AggPickmVO[] aggVOs) {
|
|
||||||
for(AggPickmVO aggPickmVO : aggVOs) {
|
|
||||||
PickmHeadVO pickmHeadVO = aggPickmVO.getParentVO();
|
|
||||||
if (FsourcetypeEnum.WWBILL_STATE.equalsValue(pickmHeadVO.getFsourcetype())) {
|
|
||||||
if(!"61-Cxx-01".equals(pickmHeadVO.getVfirsttrantype())){
|
|
||||||
if (MMValueCheck.isEmpty(pickmHeadVO.getVbomversion())) {
|
|
||||||
ExceptionUtils.wrappBusinessException(PickmLangConsts.getHIT_BOMNULL());
|
|
||||||
}
|
|
||||||
|
|
||||||
BomItemQueryParamForPickm param = this.getBomQueryParamFromSc(pickmHeadVO, pickmHeadVO.getVbomversion());
|
|
||||||
this.subItemdateCache.setBomQueryParamList(param);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (FsourcetypeEnum.MOBILL_STATE.equalsValue(pickmHeadVO.getFsourcetype())) {
|
|
||||||
if (pickmHeadVO.getVbomversion() == null && pickmHeadVO.getVpbomversion() == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pickmHeadVO.getVbomversion() != null) {
|
|
||||||
BomItemQueryParamForPickm param = this.getBomQueryParamFromMO(pickmHeadVO, pickmHeadVO.getVbomversion());
|
|
||||||
this.subItemdateCache.setBomQueryParamList(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pickmHeadVO.getVpbomversion() != null) {
|
|
||||||
BomItemQueryParamForPickm param = this.getBomQueryParamFromMO(pickmHeadVO, pickmHeadVO.getVpbomversion());
|
|
||||||
this.subItemdateCache.setBomQueryParamList(param);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FsourcetypeEnum.HAND_STATE.equalsValue(pickmHeadVO.getFsourcetype())) {
|
|
||||||
if (pickmHeadVO.getVbomversion() == null && pickmHeadVO.getVpbomversion() == null) {
|
|
||||||
ExceptionUtils.wrappBusinessException(PickmLangConsts.getHIT_BOMNULL());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pickmHeadVO.getVbomversion() != null) {
|
|
||||||
BomItemQueryParamForPickm param = this.getBomQueryParamFromHand(pickmHeadVO, pickmHeadVO.getVbomversion());
|
|
||||||
this.subItemdateCache.setBomQueryParamList(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pickmHeadVO.getVpbomversion() != null) {
|
|
||||||
BomItemQueryParamForPickm param = this.getBomQueryParamFromHand(pickmHeadVO, pickmHeadVO.getVpbomversion());
|
|
||||||
this.subItemdateCache.setBomQueryParamList(param);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.subItemdateCache.setAggBomMap(BomServiceAdapter.queryBomItemForPI_New((BomItemQueryParamForPickm[])this.subItemdateCache.getBomQueryParamList().toArray(new BomItemQueryParamForPickm[0])));
|
|
||||||
}
|
|
||||||
|
|
||||||
private BomItemQueryParamForPickm getBomQueryParamFromMO(PickmHeadVO headVO, String bomID) {
|
|
||||||
BomItemQueryParamForPickm param = new BomItemQueryParamForPickm();
|
|
||||||
String key = null;
|
|
||||||
if ("55A2".equals(headVO.getVsourcebilltype())) {
|
|
||||||
String var10000 = headVO.getCsourcebillrowid();
|
|
||||||
key = var10000 + headVO.getVsourcebilltype();
|
|
||||||
} else if ("55C2".equals(headVO.getVsourcebilltype())) {
|
|
||||||
String var6 = headVO.getCsourcebillid();
|
|
||||||
key = var6 + headVO.getVsourcebilltype();
|
|
||||||
}
|
|
||||||
|
|
||||||
MOSubItemQueryResultVO4Pickm moparam = (MOSubItemQueryResultVO4Pickm)this.subItemdateCache.getMoDataMap().get(key);
|
|
||||||
param.setCbomid(bomID);
|
|
||||||
param.setDemandDate(moparam.getTplanstarttime().getDate());
|
|
||||||
param.setCcustomerid(headVO.getCcustomerid());
|
|
||||||
param.setCprojectid(headVO.getCprojectid());
|
|
||||||
param.setManuTpye(Integer.valueOf(MfgTypeEnum.PRODUCTION.getEnumValue().getValue()));
|
|
||||||
param.setCbomQuery(false);
|
|
||||||
param.setPk_org(headVO.getPk_org());
|
|
||||||
if (MMNumberUtil.isEqualZero(headVO.getNnumber())) {
|
|
||||||
param.setNnum(UFDouble.ONE_DBL);
|
|
||||||
} else {
|
|
||||||
param.setNnum(headVO.getNnumber());
|
|
||||||
}
|
|
||||||
|
|
||||||
param.setCsrcid(key + param.getCbomid() + param.getDemandDate() + param.getCcustomerid() + param.getCprojectid());
|
|
||||||
return param;
|
|
||||||
}
|
|
||||||
|
|
||||||
private BomItemQueryParamForPickm getBomQueryParamFromSc(PickmHeadVO headVO, String bomID) {
|
|
||||||
BomItemQueryParamForPickm param = new BomItemQueryParamForPickm();
|
|
||||||
String key = headVO.getCsourcebillrowid();
|
|
||||||
SCOrderQtyResultParamForPickm scparam = this.subItemdateCache.getScDataMap(key);
|
|
||||||
param.setCbomid(bomID);
|
|
||||||
param.setDemandDate(scparam.getDplanarrvdate());
|
|
||||||
param.setCcustomerid(headVO.getCcustomerid());
|
|
||||||
param.setCprojectid(headVO.getCprojectid());
|
|
||||||
param.setManuTpye(Integer.valueOf(MfgTypeEnum.ENTRUST.getEnumValue().getValue()));
|
|
||||||
param.setCbomQuery(false);
|
|
||||||
param.setPk_org(headVO.getPk_org());
|
|
||||||
param.setNnum(headVO.getNnumber());
|
|
||||||
param.setCsrcid(key + param.getCbomid() + param.getDemandDate() + param.getCcustomerid() + param.getCprojectid());
|
|
||||||
return param;
|
|
||||||
}
|
|
||||||
|
|
||||||
private BomItemQueryParamForPickm getBomQueryParamFromHand(PickmHeadVO headVO, String bomID) {
|
|
||||||
BomItemQueryParamForPickm param = new BomItemQueryParamForPickm();
|
|
||||||
String key = headVO.getCsourcebillrowid();
|
|
||||||
param.setCbomid(bomID);
|
|
||||||
param.setDemandDate(AppBsContext.getInstance().getBusiDate());
|
|
||||||
param.setCcustomerid(headVO.getCcustomerid());
|
|
||||||
param.setCprojectid(headVO.getCprojectid());
|
|
||||||
param.setManuTpye(Integer.valueOf(MfgTypeEnum.PRODUCTION.getEnumValue().getValue()));
|
|
||||||
param.setCbomQuery(false);
|
|
||||||
param.setPk_org(headVO.getPk_org());
|
|
||||||
if (MMNumberUtil.isEqualZero(headVO.getNnumber())) {
|
|
||||||
param.setNnum(UFDouble.ONE_DBL);
|
|
||||||
} else {
|
|
||||||
param.setNnum(headVO.getNnumber());
|
|
||||||
}
|
|
||||||
|
|
||||||
param.setCsrcid(key + param.getCbomid() + param.getDemandDate() + param.getCcustomerid() + param.getCprojectid());
|
|
||||||
return param;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
package nccloud.web.pu.poorder.action;
|
|
||||||
|
|
||||||
import nc.bs.dao.BaseDAO;
|
|
||||||
import nc.impl.pubapp.pattern.data.bill.BillQuery;
|
|
||||||
import nc.itf.scmpub.reference.uap.pf.PfServiceScmUtil;
|
|
||||||
import nc.jdbc.framework.processor.MapListProcessor;
|
|
||||||
import nc.vo.pu.m21.entity.OrderVO;
|
|
||||||
import nc.vo.pub.lang.UFBoolean;
|
|
||||||
import nc.vo.sc.m61.entity.SCOrderVO;
|
|
||||||
import nc.vo.sc.m61.entity.context.SCOrderContxt;
|
|
||||||
import nccloud.framework.core.json.IJson;
|
|
||||||
import nccloud.framework.web.action.itf.ICommonAction;
|
|
||||||
import nccloud.framework.web.container.IRequest;
|
|
||||||
import nccloud.framework.web.json.JsonFactory;
|
|
||||||
import nccloud.framework.web.ui.pattern.billcard.BillCard;
|
|
||||||
import nccloud.web.sc.scorder.entity.QueryInfoSCOrder;
|
|
||||||
import nccloud.web.sc.scorder.util.SCOrderBillCardOperator;
|
|
||||||
import nccloud.web.scmpub.pub.resexp.PfResumeExceptionNccUtils;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class PushScOrderCheck implements ICommonAction {
|
|
||||||
public PushScOrderCheck() {
|
|
||||||
}
|
|
||||||
public Object doAction(IRequest request) {
|
|
||||||
|
|
||||||
String read = request.read();
|
|
||||||
|
|
||||||
Map<String, Object> paraMap = (Map) JsonFactory.create().fromJson(read, Map.class);
|
|
||||||
try {
|
|
||||||
String[] hids =paraMap.get("pk").toString().split(",");
|
|
||||||
String sql = "select csrcid from sc_order_b where dr = 0 and csrcid = '" +hids[0]+"'";
|
|
||||||
BaseDAO dao = new BaseDAO();
|
|
||||||
ArrayList<HashMap<String, Object>> al = (ArrayList<HashMap<String, Object>>)dao.executeQuery(sql, new MapListProcessor());
|
|
||||||
return al;
|
|
||||||
} catch (Exception ex) {
|
|
||||||
return PfResumeExceptionNccUtils.handleResumeException(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -387,10 +387,5 @@
|
||||||
<clazz>nccloud.web.pu.poorder.action.PushScOrderAction</clazz>
|
<clazz>nccloud.web.pu.poorder.action.PushScOrderAction</clazz>
|
||||||
<btncode>OrderTOSaleBill</btncode>
|
<btncode>OrderTOSaleBill</btncode>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
|
||||||
<name>pu.poorder.pushScOrderCheck</name>
|
|
||||||
<label>采购订单生成协同销售订单校验</label>
|
|
||||||
<clazz>nccloud.web.pu.poorder.action.PushScOrderCheck</clazz>
|
|
||||||
</action>
|
|
||||||
|
|
||||||
</actions>
|
</actions>
|
||||||
|
|
|
@ -174,7 +174,6 @@
|
||||||
<appcode>401200000,401200002,401200004,401200006</appcode>
|
<appcode>401200000,401200002,401200004,401200006</appcode>
|
||||||
<actions>
|
<actions>
|
||||||
<action>pu.poorder.pushScOrderAction</action>
|
<action>pu.poorder.pushScOrderAction</action>
|
||||||
<action>pu.poorder.pushScOrderCheck</action>
|
|
||||||
</actions>
|
</actions>
|
||||||
</authorize>
|
</authorize>
|
||||||
</authorizes>
|
</authorizes>
|
||||||
|
|
Loading…
Reference in New Issue