fix:
1.订单产品需求单-配件采购计划,现在传CMMP是传的物料编码,需要传实际采购物料编码
This commit is contained in:
parent
f5b8f31c50
commit
384e827700
@ -3,7 +3,6 @@ package com.yem.wm.syn.cmmp.addnew;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yem.wm.syn.eas.YemOrderproreqbillWGService;
|
||||
import com.yem.wm.syn.utils.HttpClient;
|
||||
import com.yem.wm.utils.RequestCmmp;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
@ -13,13 +12,10 @@ import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||
import kd.bos.entity.validate.ErrorLevel;
|
||||
import kd.bos.entity.validate.ValidationErrorInfo;
|
||||
import kd.bos.exception.KDBizException;
|
||||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.sdk.util.KHttpClientUtils;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.QueryServiceHelper;
|
||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
|
||||
@ -27,10 +23,8 @@ import java.text.SimpleDateFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 涛
|
||||
@ -166,9 +160,8 @@ public class OrderProReqBill extends AbstractOperationServicePlugIn {
|
||||
for (DynamicObject esMaterial: yemEsMaterialcoll) {
|
||||
JSONObject entry = new JSONObject();
|
||||
DynamicObject yemMateriel = esMaterial.getDynamicObject("yem_materiel");
|
||||
DynamicObject yemRealpurmateriel = esMaterial.getDynamicObject("yem_realpurmateriel");
|
||||
if (yemMateriel!=null){
|
||||
//物料代码
|
||||
entry.put("mater_code",yemMateriel.getString("number"));
|
||||
//物料名称
|
||||
entry.put("mater_name",yemMateriel.getString("name"));
|
||||
//id
|
||||
@ -181,6 +174,10 @@ public class OrderProReqBill extends AbstractOperationServicePlugIn {
|
||||
entry.put("unit_fid",dynamicObject.getString("yem_easid"));
|
||||
}
|
||||
}
|
||||
if (yemRealpurmateriel!=null){
|
||||
//物料代码
|
||||
entry.put("mater_code",yemRealpurmateriel.getString("number"));
|
||||
}
|
||||
entry.put("plmcreator",creator.getString("number"));
|
||||
entry.put("plmcreatedate",localDateTime);
|
||||
//需求数量
|
||||
|
@ -12,12 +12,10 @@ import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||
import kd.bos.entity.validate.ErrorLevel;
|
||||
import kd.bos.entity.validate.ValidationErrorInfo;
|
||||
import kd.bos.exception.KDBizException;
|
||||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.QueryServiceHelper;
|
||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
|
||||
@ -27,7 +25,6 @@ import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 涛
|
||||
@ -129,11 +126,9 @@ public class OrderProReqBillCG extends AbstractOperationServicePlugIn {
|
||||
entry.put("need_code",dataEntity.getString("billno"));
|
||||
|
||||
|
||||
|
||||
DynamicObject yemRealpurmateriel = esMaterial.getDynamicObject("yem_realpurmateriel");
|
||||
DynamicObject yemMateriel = esMaterial.getDynamicObject("yem_materiel");
|
||||
if (yemMateriel!=null){
|
||||
//物料代码
|
||||
entry.put("mater_code",yemMateriel.getString("number"));
|
||||
//物料名称
|
||||
entry.put("mater_name",yemMateriel.getString("name"));
|
||||
DynamicObject baseunit = yemMateriel.getDynamicObject("baseunit");
|
||||
@ -144,6 +139,10 @@ public class OrderProReqBillCG extends AbstractOperationServicePlugIn {
|
||||
//规格型号
|
||||
entry.put("specification",yemMateriel.getString("modelnum"));
|
||||
}
|
||||
if (yemRealpurmateriel!=null){
|
||||
//物料代码
|
||||
entry.put("mater_code",yemRealpurmateriel.getString("number"));
|
||||
}
|
||||
//需求数量
|
||||
entry.put("need_num",esMaterial.getString("yem_qty"));
|
||||
//提交数量
|
||||
|
@ -15,7 +15,6 @@ import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||
import kd.bos.entity.property.ComboProp;
|
||||
import kd.bos.entity.validate.ErrorLevel;
|
||||
import kd.bos.entity.validate.ValidationErrorInfo;
|
||||
import kd.bos.exception.KDBizException;
|
||||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
import kd.bos.orm.query.QCP;
|
||||
@ -28,7 +27,10 @@ import java.text.SimpleDateFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author 涛
|
||||
@ -206,9 +208,8 @@ public class OrderProReqBillWMI extends AbstractOperationServicePlugIn {
|
||||
}
|
||||
|
||||
DynamicObject yemMateriel = esMaterial.getDynamicObject("yem_materiel");
|
||||
DynamicObject yemRealpurmateriel = esMaterial.getDynamicObject("yem_realpurmateriel");
|
||||
if (yemMateriel!=null){
|
||||
//物料代码
|
||||
entry.put("mater_code",yemMateriel.getString("number"));
|
||||
//物料名称
|
||||
entry.put("mater_name",yemMateriel.getString("name"));
|
||||
entry.put("mater_fid",yemMateriel.getString("yem_easid"));
|
||||
@ -220,7 +221,11 @@ public class OrderProReqBillWMI extends AbstractOperationServicePlugIn {
|
||||
entry.put("unit_fid",dynamicObject.getString("yem_easid"));
|
||||
}
|
||||
//规格型号
|
||||
entry.put("specification",yemMateriel.getString("modelnum"));
|
||||
entry.put("specification",yemMateriel.getString("modelnum"));
|
||||
}
|
||||
if (yemRealpurmateriel!=null){
|
||||
//物料代码
|
||||
entry.put("mater_code",yemRealpurmateriel.getString("number"));
|
||||
}
|
||||
//需求数量
|
||||
entry.put("order_num",esMaterial.getString("yem_qty"));
|
||||
|
Loading…
Reference in New Issue
Block a user