fix:修改销售退货
This commit is contained in:
parent
8089a30fd1
commit
5e080ab0d7
@ -62,6 +62,9 @@ public class MaterialReceiveRequestDetail extends FieldAccessor implements DataI
|
|||||||
private String salesAssistant; // 业务助理zzywzl
|
private String salesAssistant; // 业务助理zzywzl
|
||||||
private String businessDivision; // 事业部zzsyb
|
private String businessDivision; // 事业部zzsyb
|
||||||
|
|
||||||
|
private String phase;
|
||||||
|
|
||||||
|
|
||||||
public String getLocationName() {
|
public String getLocationName() {
|
||||||
return locationName;
|
return locationName;
|
||||||
}
|
}
|
||||||
@ -538,4 +541,11 @@ public class MaterialReceiveRequestDetail extends FieldAccessor implements DataI
|
|||||||
this.businessDivision = businessDivision;
|
this.businessDivision = businessDivision;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPhase() {
|
||||||
|
return phase;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhase(String phase) {
|
||||||
|
this.phase = phase;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -359,6 +359,70 @@ public class MESServiceImpl implements MESService{
|
|||||||
|
|
||||||
return code;
|
return code;
|
||||||
|
|
||||||
|
}
|
||||||
|
// mes生产退料删除批次
|
||||||
|
public String SCTL_deleteMaterialPackingInfo(List<String> chargeList) throws CustomException{
|
||||||
|
|
||||||
|
JSONObject requestBodyMap = new JSONObject();
|
||||||
|
requestBodyMap.put("chargeList", chargeList);
|
||||||
|
String requestBody = requestBodyMap.toString();
|
||||||
|
String httpPost = mesHttpUtil.httpPost(baseUrl + "/wms/wmsMaterialDelete", requestBody);
|
||||||
|
System.out.println(httpPost);
|
||||||
|
org.json.JSONObject receiveJsonObject = new org.json.JSONObject(httpPost);
|
||||||
|
String code = receiveJsonObject.getString("code");
|
||||||
|
String msg = receiveJsonObject.getString("msg");
|
||||||
|
boolean success = receiveJsonObject.getBoolean("success");
|
||||||
|
|
||||||
|
// 写log
|
||||||
|
ErpMessageLog erplog = new ErpMessageLog();
|
||||||
|
erplog.setEventUser("");
|
||||||
|
erplog.setServerName("WmsToMES");
|
||||||
|
erplog.setEventName("生产退料删除标签delete");
|
||||||
|
erplog.setInterfaceTime(TimeStampUtil.getCurrentTime(TimeStampUtil.FORMAT_DEFAULT));
|
||||||
|
erplog.setMessageId(UUID.randomUUID().toString());
|
||||||
|
erplog.setSendMsg(requestBody);
|
||||||
|
erplog.setReturnMsg2(httpPost.toString());
|
||||||
|
erplog.setResultCode(code);
|
||||||
|
MessageLogUtil.writeMessageLog(erplog);
|
||||||
|
|
||||||
|
if (!success) {
|
||||||
|
throw new CustomException("MES删除标签接口返回报错:" + msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
// mes产品品入库删除批次
|
||||||
|
public String CCPRK_deleteMaterialPackingInfo(List<String> chargeList) throws CustomException{
|
||||||
|
|
||||||
|
JSONObject requestBodyMap = new JSONObject();
|
||||||
|
requestBodyMap.put("chargeList", chargeList);
|
||||||
|
String requestBody = requestBodyMap.toString();
|
||||||
|
String httpPost = mesHttpUtil.httpPost(baseUrl + "/wms/wmsShipDelete", requestBody);
|
||||||
|
System.out.println(httpPost);
|
||||||
|
org.json.JSONObject receiveJsonObject = new org.json.JSONObject(httpPost);
|
||||||
|
String code = receiveJsonObject.getString("code");
|
||||||
|
String msg = receiveJsonObject.getString("msg");
|
||||||
|
boolean success = receiveJsonObject.getBoolean("success");
|
||||||
|
|
||||||
|
// 写log
|
||||||
|
ErpMessageLog erplog = new ErpMessageLog();
|
||||||
|
erplog.setEventUser("");
|
||||||
|
erplog.setServerName("WmsToMES");
|
||||||
|
erplog.setEventName("生产退料删除标签delete");
|
||||||
|
erplog.setInterfaceTime(TimeStampUtil.getCurrentTime(TimeStampUtil.FORMAT_DEFAULT));
|
||||||
|
erplog.setMessageId(UUID.randomUUID().toString());
|
||||||
|
erplog.setSendMsg(requestBody);
|
||||||
|
erplog.setReturnMsg2(httpPost.toString());
|
||||||
|
erplog.setResultCode(code);
|
||||||
|
MessageLogUtil.writeMessageLog(erplog);
|
||||||
|
|
||||||
|
if (!success) {
|
||||||
|
throw new CustomException("MES删除标签接口返回报错:" + msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
return code;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//zd.2024.8.23 需MES接收的数据发送MES并更新SENDMESFLAG为Y
|
//zd.2024.8.23 需MES接收的数据发送MES并更新SENDMESFLAG为Y
|
||||||
|
@ -27,7 +27,7 @@ public class ToSAPServiceImpl {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ToSAPMessageUtil toSAPMessageUtil;
|
private ToSAPMessageUtil toSAPMessageUtil;
|
||||||
public String PurStockIn(String receiveRequestName, String siteName, String user,
|
public String PurStockIn(String receiveRequestName, String siteName, String user,
|
||||||
Map<String, ?> args ) throws Exception {
|
Map<String, ?> args) throws Exception {
|
||||||
|
|
||||||
String rcode;
|
String rcode;
|
||||||
String undoId = "";
|
String undoId = "";
|
||||||
@ -47,9 +47,9 @@ public class ToSAPServiceImpl {
|
|||||||
.append(" mp.ERPLOCATION , ").append(SystemPropHelper.CR)
|
.append(" mp.ERPLOCATION , ").append(SystemPropHelper.CR)
|
||||||
.append(" mp.SUPPLIERNAME , ").append(SystemPropHelper.CR)
|
.append(" mp.SUPPLIERNAME , ").append(SystemPropHelper.CR)
|
||||||
.append(" m2.IQCFLAG, ").append(SystemPropHelper.CR)
|
.append(" m2.IQCFLAG, ").append(SystemPropHelper.CR)
|
||||||
.append(" SUM(mp.MATERIALQUANTITY) AS MATERIALQUANTITY ,SUM(mp.FQTY) AS FQTY ").append(SystemPropHelper.CR)
|
.append(" SUM(ms.QTY) AS MATERIALQUANTITY ,SUM(mp.FQTY) AS FQTY ").append(SystemPropHelper.CR)
|
||||||
.append(" FROM MATERIALPACKING mp ").append(SystemPropHelper.CR)
|
.append(" FROM MATERIALPACKINGSUB ms ").append(SystemPropHelper.CR)
|
||||||
.append(" LEFT JOIN MATERIALPACKINGSUB ms ").append(SystemPropHelper.CR)
|
.append(" LEFT JOIN MATERIALPACKING mp ").append(SystemPropHelper.CR)
|
||||||
.append(" ON mp.MATERIALPACKINGNAME =ms.MATERIALPACKINGNAME ").append(SystemPropHelper.CR)
|
.append(" ON mp.MATERIALPACKINGNAME =ms.MATERIALPACKINGNAME ").append(SystemPropHelper.CR)
|
||||||
.append(" AND mp.RECEIVEREQUESTNAME =ms.RECEIVEREQUESTNAME ").append(SystemPropHelper.CR)
|
.append(" AND mp.RECEIVEREQUESTNAME =ms.RECEIVEREQUESTNAME ").append(SystemPropHelper.CR)
|
||||||
.append(" LEFT JOIN MATERIALRECEIVEREQUEST mcr ").append(SystemPropHelper.CR)
|
.append(" LEFT JOIN MATERIALRECEIVEREQUEST mcr ").append(SystemPropHelper.CR)
|
||||||
@ -57,7 +57,7 @@ public class ToSAPServiceImpl {
|
|||||||
.append(" AND mp.RECEIVEREQUESTNAME = mcr.RECEIVEREQUESTNAME ").append(SystemPropHelper.CR)
|
.append(" AND mp.RECEIVEREQUESTNAME = mcr.RECEIVEREQUESTNAME ").append(SystemPropHelper.CR)
|
||||||
.append(" LEFT JOIN MATERIALRECEIVEREQUESTDETAIL m ").append(SystemPropHelper.CR)
|
.append(" LEFT JOIN MATERIALRECEIVEREQUESTDETAIL m ").append(SystemPropHelper.CR)
|
||||||
.append(" ON m.SITENAME = mp.SITENAME ").append(SystemPropHelper.CR)
|
.append(" ON m.SITENAME = mp.SITENAME ").append(SystemPropHelper.CR)
|
||||||
.append(" AND m.RECEIVEREQUESTNAME = mp.RECEIVEREQUESTNAME ").append(SystemPropHelper.CR)
|
.append(" AND m.RECEIVEREQUESTNAME = ms.RECEIVEREQUESTNAME ").append(SystemPropHelper.CR)
|
||||||
.append(" AND m.RECEIVEREQUESTDETAILNAME = ms.RECEIVEREQUESTDETAILNAME ").append(SystemPropHelper.CR)
|
.append(" AND m.RECEIVEREQUESTDETAILNAME = ms.RECEIVEREQUESTDETAILNAME ").append(SystemPropHelper.CR)
|
||||||
.append(" LEFT JOIN BS_MATERIALFACTORY m2 ").append(SystemPropHelper.CR)
|
.append(" LEFT JOIN BS_MATERIALFACTORY m2 ").append(SystemPropHelper.CR)
|
||||||
.append(" ON m2.MATERIALSPECNAME = mp.MATERIALSPECNAME ").append(SystemPropHelper.CR)
|
.append(" ON m2.MATERIALSPECNAME = mp.MATERIALSPECNAME ").append(SystemPropHelper.CR)
|
||||||
@ -1259,28 +1259,51 @@ public class ToSAPServiceImpl {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public String SaleReturn(String shipRequestName, String siteName, String eventUser,String commitDate, String opcode ) throws Exception {
|
public String SaleReturn(String shipRequestName, String siteName, String eventUser,String commitDate, String opcode ) throws Exception {
|
||||||
String sql="SELECT\r\n" +
|
// String sql="SELECT\r\n" +
|
||||||
" mp.RECEIVEREQUESTDETAILNAME SHIPREQUESTDETAILNAME,\r\n" +
|
// " mp.RECEIVEREQUESTDETAILNAME SHIPREQUESTDETAILNAME,\r\n" +
|
||||||
" mp.ERPLOCATION,\r\n" +
|
// " mp.ERPLOCATION,\r\n" +
|
||||||
" count(*) AS ZROL,\r\n" +
|
// " count(*) AS ZROL,\r\n" +
|
||||||
" sum(mp.MATERIALQUANTITY) AS MATERIALQUANTITY\r\n" +
|
// " sum(mp.MATERIALQUANTITY) AS MATERIALQUANTITY\r\n" +
|
||||||
" FROM\r\n" +
|
// " FROM\r\n" +
|
||||||
" MATERIALPACKING mp\r\n" +
|
// " MATERIALPACKING mp\r\n" +
|
||||||
" LEFT JOIN MATERIALSHIPREQUEST ms ON\r\n" +
|
// " LEFT JOIN MATERIALSHIPREQUEST ms ON\r\n" +
|
||||||
" mp.RECEIVEREQUESTNAME = ms.SHIPREQUESTNAME\r\n" +
|
// " mp.RECEIVEREQUESTNAME = ms.SHIPREQUESTNAME\r\n" +
|
||||||
" AND mp.SITENAME = ms.SITENAME\r\n" +
|
// " AND mp.SITENAME = ms.SITENAME\r\n" +
|
||||||
" LEFT JOIN MATERIALSHIPREQUESTDETAIL md ON\r\n" +
|
// " LEFT JOIN MATERIALSHIPREQUESTDETAIL md ON\r\n" +
|
||||||
" mp.RECEIVEREQUESTNAME = md.SHIPREQUESTNAME\r\n" +
|
// " mp.RECEIVEREQUESTNAME = md.SHIPREQUESTNAME\r\n" +
|
||||||
" AND mp.RECEIVEREQUESTDETAILNAME = md.SHIPREQUESTDETAILNAME\r\n" +
|
// " AND mp.RECEIVEREQUESTDETAILNAME = md.SHIPREQUESTDETAILNAME\r\n" +
|
||||||
" AND mp.SITENAME = md.SITENAME\r\n" +
|
// " AND mp.SITENAME = md.SITENAME\r\n" +
|
||||||
" WHERE\r\n" +
|
// " WHERE\r\n" +
|
||||||
" 1 = 1\r\n" +
|
// " 1 = 1\r\n" +
|
||||||
" AND mp.RECEIVEREQUESTNAME = :SHIPREQUESTNAME \r\n" +
|
// " AND mp.RECEIVEREQUESTNAME = :SHIPREQUESTNAME \r\n" +
|
||||||
" AND mp.SITENAME = :SITENAME \r\n" +
|
// " AND mp.SITENAME = :SITENAME \r\n" +
|
||||||
" AND (mp.STOCKSTATE = 'StockOut' OR mp.STOCKSTATE = 'Created' ) \r\n" +
|
// " AND (mp.STOCKSTATE = 'StockOut' OR mp.STOCKSTATE = 'Created' ) \r\n" +
|
||||||
" GROUP BY\r\n" +
|
// " GROUP BY\r\n" +
|
||||||
" mp.RECEIVEREQUESTDETAILNAME ,\r\n" +
|
// " mp.RECEIVEREQUESTDETAILNAME ,\r\n" +
|
||||||
" mp.ERPLOCATION";
|
// " mp.ERPLOCATION";
|
||||||
|
|
||||||
|
String sql="SELECT \n" +
|
||||||
|
"\tmd.RECEIVEREQUESTDETAILNAME SHIPREQUESTDETAILNAME,\n" +
|
||||||
|
"\tmp.ERPLOCATION, \n" +
|
||||||
|
"\tcount(*) AS ZROL, \n" +
|
||||||
|
"\tsum(mp.MATERIALQUANTITY) AS MATERIALQUANTITY \n" +
|
||||||
|
" FROM \n" +
|
||||||
|
"\tMATERIALPACKING mp \n" +
|
||||||
|
" LEFT JOIN MATERIALRECEIVEREQUEST ms ON \n" +
|
||||||
|
"\tmp.RECEIVEREQUESTNAME = ms.RECEIVEREQUESTNAME \n" +
|
||||||
|
"\tAND mp.SITENAME = ms.SITENAME \n" +
|
||||||
|
" LEFT JOIN MATERIALRECEIVEREQUESTDETAIL md ON \n" +
|
||||||
|
"\tmp.RECEIVEREQUESTNAME = md.RECEIVEREQUESTNAME \n" +
|
||||||
|
"\tAND mp.RECEIVEREQUESTNAME = md.RECEIVEREQUESTNAME \n" +
|
||||||
|
"\tAND mp.SITENAME = md.SITENAME \n" +
|
||||||
|
" WHERE \n" +
|
||||||
|
"\t1 = 1 \n" +
|
||||||
|
"\t AND mp.RECEIVEREQUESTNAME = :SHIPREQUESTNAME \n" +
|
||||||
|
" AND mp.SITENAME = :SITENAME \n" +
|
||||||
|
" AND (mp.STOCKSTATE = 'StockOut' OR mp.STOCKSTATE = 'Created' ) \n" +
|
||||||
|
" GROUP BY \n" +
|
||||||
|
"\tmd.RECEIVEREQUESTDETAILNAME , \n" +
|
||||||
|
"\tmp.ERPLOCATION";
|
||||||
Map<String, Object> hashMap = new HashMap<String, Object>();
|
Map<String, Object> hashMap = new HashMap<String, Object>();
|
||||||
hashMap.put("SHIPREQUESTNAME", shipRequestName);
|
hashMap.put("SHIPREQUESTNAME", shipRequestName);
|
||||||
hashMap.put("SITENAME", siteName);
|
hashMap.put("SITENAME", siteName);
|
||||||
@ -1364,11 +1387,12 @@ public class ToSAPServiceImpl {
|
|||||||
|
|
||||||
//销售交货单过账不返回物料凭证,且RETURN为JsonArray
|
//销售交货单过账不返回物料凭证,且RETURN为JsonArray
|
||||||
org.json.JSONObject returnJsonObject = (org.json.JSONObject) receiveJsonObject.get("RETURN");
|
org.json.JSONObject returnJsonObject = (org.json.JSONObject) receiveJsonObject.get("RETURN");
|
||||||
|
|
||||||
rcode = returnJsonObject.get("STATUS").toString();
|
rcode = returnJsonObject.get("STATUS").toString();
|
||||||
rmsg = returnJsonObject.get("MSGTXT").toString();
|
rmsg = returnJsonObject.get("MSGTXT").toString();
|
||||||
|
|
||||||
if ("S".equals(rcode)) {
|
if ("S".equals(rcode)) {
|
||||||
undoId = "S";
|
undoId = returnJsonObject.get("KEY01").toString();
|
||||||
}
|
}
|
||||||
//将log写到表里
|
//将log写到表里
|
||||||
ErpMessageLog erplog = new ErpMessageLog();
|
ErpMessageLog erplog = new ErpMessageLog();
|
||||||
|
@ -517,7 +517,7 @@ public class ToSAPMessageUtil {
|
|||||||
log.info("*************************************************" );
|
log.info("*************************************************" );
|
||||||
log.info("******************开始发送******************" );
|
log.info("******************开始发送******************" );
|
||||||
// 调用业务接口,需实时获取token
|
// 调用业务接口,需实时获取token
|
||||||
authStr = getAccessToken(getBaseUrl());
|
authStr = getAccessToken(getBaseUrl(),url);
|
||||||
|
|
||||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||||
HttpPost httpPost = new HttpPost(url);
|
HttpPost httpPost = new HttpPost(url);
|
||||||
@ -539,11 +539,20 @@ public class ToSAPMessageUtil {
|
|||||||
return responseContent;
|
return responseContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getAccessToken(String requestUrl){
|
public static String getAccessToken(String requestUrl,String paramsUrl){
|
||||||
|
String clientId = "";
|
||||||
|
String clientSecret = "";
|
||||||
|
if(paramsUrl.contains("sd023")) {
|
||||||
|
clientId = "BC_SAPPO";
|
||||||
|
clientSecret = "VeH16jPWv03aTRMptirgGGSs3ZqnqHMxQ7WTKHiFGNg";
|
||||||
|
}else {
|
||||||
|
clientId = "BC_WMS";
|
||||||
|
clientSecret = "vBkGIRyeuud0t8W79kGMV0lZHuBIj26duPFSR-vSLvg";
|
||||||
|
}
|
||||||
|
|
||||||
String grantType = "client_credentials";
|
String grantType = "client_credentials";
|
||||||
String clientId = "BC_WMS";
|
// clientId = "BC_WMS";
|
||||||
String clientSecret = "vBkGIRyeuud0t8W79kGMV0lZHuBIj26duPFSR-vSLvg";
|
// clientSecret = "vBkGIRyeuud0t8W79kGMV0lZHuBIj26duPFSR-vSLvg";
|
||||||
String scope = "";
|
String scope = "";
|
||||||
String clientAuth = "Send client credentials in body";
|
String clientAuth = "Send client credentials in body";
|
||||||
|
|
||||||
|
@ -11,7 +11,17 @@ public enum ReceiveTypeEnums {
|
|||||||
Z002("Z002", "研发采购订单"),
|
Z002("Z002", "研发采购订单"),
|
||||||
Z003("Z003", "非生产物资采购订单"),
|
Z003("Z003", "非生产物资采购订单"),
|
||||||
Z004("Z004", "固定资产、在建工程采购订单"),
|
Z004("Z004", "固定资产、在建工程采购订单"),
|
||||||
ZLR1("ZLR1", "销售退货");
|
ZLR1("ZLR1", "销售退货"),
|
||||||
|
ZLF0("ZLF0", "销售退货"),
|
||||||
|
ZLF1("ZLF1", "销售退货"),
|
||||||
|
ZLF2("ZLF2", "销售退货"),
|
||||||
|
ZLF3("ZLF3", "销售退货"),
|
||||||
|
ZLF4("ZLF4", "销售退货"),
|
||||||
|
ZLF5("ZLF5", "销售退货"),
|
||||||
|
ZLF6("ZLF6", "销售退货"),
|
||||||
|
ZLF7("ZLF7", "销售退货"),
|
||||||
|
ZLF8("ZLF8", "销售退货"),
|
||||||
|
ZLF9("ZLF9", "销售退货");
|
||||||
|
|
||||||
private final String code;
|
private final String code;
|
||||||
private final String info;
|
private final String info;
|
||||||
@ -46,6 +56,16 @@ public enum ReceiveTypeEnums {
|
|||||||
public static List<String> getsaleReturn() {
|
public static List<String> getsaleReturn() {
|
||||||
List<String> str = new ArrayList<>();
|
List<String> str = new ArrayList<>();
|
||||||
str.add(ZLR1.getCode());
|
str.add(ZLR1.getCode());
|
||||||
|
str.add(ZLF0.getCode());
|
||||||
|
str.add(ZLF1.getCode());
|
||||||
|
str.add(ZLF2.getCode());
|
||||||
|
str.add(ZLF3.getCode());
|
||||||
|
str.add(ZLF4.getCode());
|
||||||
|
str.add(ZLF5.getCode());
|
||||||
|
str.add(ZLF6.getCode());
|
||||||
|
str.add(ZLF7.getCode());
|
||||||
|
str.add(ZLF8.getCode());
|
||||||
|
str.add(ZLF9.getCode());
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -535,13 +535,17 @@ public class MaterialReceiveActController {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return AjaxResult.me().setSuccess(false).setMessage(e.toString());
|
return AjaxResult.me().setSuccess(false).setMessage(e.toString());
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
// 调用 QMS
|
if(!ReceiveTypeEnums.isSaleReturn(requests.get(0).getReceiveRequestType())) {
|
||||||
qMSServiceImpl.PreIQCInfoSend(receiveRequestName, "SDK",opCode, erpFactory);
|
try {
|
||||||
} catch (CustomException e) {
|
// 调用 QMS
|
||||||
e.printStackTrace();
|
qMSServiceImpl.PreIQCInfoSend(receiveRequestName, "SDK",opCode, erpFactory);
|
||||||
return AjaxResult.me().setSuccess(false).setMessage(e.toString());
|
} catch (CustomException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.me().setSuccess(false).setMessage(e.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发送过账
|
// 发送过账
|
||||||
EventInfoUtil util = new EventInfoUtil();
|
EventInfoUtil util = new EventInfoUtil();
|
||||||
makeEventInfo = util.makeEventInfo("NormalStockInForSDK", user, "NormalStockInForSDK");
|
makeEventInfo = util.makeEventInfo("NormalStockInForSDK", user, "NormalStockInForSDK");
|
||||||
|
@ -566,6 +566,29 @@ public class SAPToWMSController {
|
|||||||
Map<String, Object> selectMap= new HashMap<String, Object>();
|
Map<String, Object> selectMap= new HashMap<String, Object>();
|
||||||
selectMap.put("receiverequestname", receiveRequestName);
|
selectMap.put("receiverequestname", receiveRequestName);
|
||||||
List<Map<String, Object>> checkResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
|
List<Map<String, Object>> checkResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
|
||||||
|
|
||||||
|
// 检验单据是否已存在,并且未被使用过账
|
||||||
|
String isSql = "SELECT\n" +
|
||||||
|
"\t*\n" +
|
||||||
|
"FROM\n" +
|
||||||
|
"\tMATERIALRECEIVEREQUEST m\n" +
|
||||||
|
"LEFT JOIN MATERIALRECEIVEREQUESTDETAIL md ON\n" +
|
||||||
|
"\tmd.RECEIVEREQUESTNAME = m.RECEIVEREQUESTNAME\n" +
|
||||||
|
"WHERE\n" +
|
||||||
|
"\tm.RECEIVEREQUESTNAME =:receiverequestname\n" +
|
||||||
|
"\tAND md.RECEIVEDQUANTITY > 0";
|
||||||
|
|
||||||
|
List<Map<String, Object>> isList = IDMFrameServiceProxy.getSqlTemplate().queryForList(isSql, selectMap);
|
||||||
|
if (isList != null && isList.size() > 0) {
|
||||||
|
throw new CustomException("ERROR","单据已存在,并且已存在过账!");
|
||||||
|
}else {
|
||||||
|
String shipquestSql="DELETE FROM MATERIALRECEIVEREQUEST WHERE receiveRequestName =?";
|
||||||
|
String shipDetailSql="DELETE FROM MATERIALRECEIVEREQUESTDETAIL WHERE receiveRequestName =?";
|
||||||
|
Object[] obj=new Object[] {receiveRequestName, receiveRequestName};
|
||||||
|
IDMFrameServiceProxy.getSqlTemplate().update(shipquestSql, obj);
|
||||||
|
IDMFrameServiceProxy.getSqlTemplate().update(shipDetailSql, obj);
|
||||||
|
}
|
||||||
|
|
||||||
if(checkResultList == null || checkResultList.size() == 0) {
|
if(checkResultList == null || checkResultList.size() == 0) {
|
||||||
CreateReceiveRequestInfo createInfo = new CreateReceiveRequestInfo();
|
CreateReceiveRequestInfo createInfo = new CreateReceiveRequestInfo();
|
||||||
createInfo.setSiteName(sitename);
|
createInfo.setSiteName(sitename);
|
||||||
@ -684,7 +707,9 @@ public class SAPToWMSController {
|
|||||||
createInfo.setPocategory(pstyp); //针对 供应商的, L表示委外订单, K表示寄售
|
createInfo.setPocategory(pstyp); //针对 供应商的, L表示委外订单, K表示寄售
|
||||||
createInfo.setMaterialSpecName(materialSpecName);
|
createInfo.setMaterialSpecName(materialSpecName);
|
||||||
createInfo.setErpLocation(erpLocation);
|
createInfo.setErpLocation(erpLocation);
|
||||||
createInfo.setRequestQuantity(Float.parseFloat(requestQty));
|
// 处理精度丢失
|
||||||
|
BigDecimal bigRequestQty = new BigDecimal(requestQty.trim());
|
||||||
|
createInfo.setRequestQuantity(bigRequestQty.doubleValue());
|
||||||
createInfo.setReceivedQuantity(0);
|
createInfo.setReceivedQuantity(0);
|
||||||
createInfo.setCreateUser("SAP");
|
createInfo.setCreateUser("SAP");
|
||||||
createInfo.setIqcFlag("");
|
createInfo.setIqcFlag("");
|
||||||
@ -748,7 +773,9 @@ public class SAPToWMSController {
|
|||||||
bindMapItem.put("freeFlag", freeFlag);
|
bindMapItem.put("freeFlag", freeFlag);
|
||||||
bindMapItem.put("iqcFlag", "");
|
bindMapItem.put("iqcFlag", "");
|
||||||
bindMapItem.put("erpFactory", erpFactory); // 工厂
|
bindMapItem.put("erpFactory", erpFactory); // 工厂
|
||||||
bindMapItem.put("requestQuantity", Float.parseFloat(requestQty));
|
// 处理精度丢失
|
||||||
|
BigDecimal bigRequestQty = new BigDecimal(requestQty.trim());
|
||||||
|
bindMapItem.put("requestQuantity", bigRequestQty.doubleValue());
|
||||||
bindMapItem.put("materialUnit", unit);
|
bindMapItem.put("materialUnit", unit);
|
||||||
bindMapItem.put("innerOrder", innerOrder); // 内部定单号
|
bindMapItem.put("innerOrder", innerOrder); // 内部定单号
|
||||||
bindMapItem.put("finishFlag", finishFlag); //交货完成标识
|
bindMapItem.put("finishFlag", finishFlag); //交货完成标识
|
||||||
@ -1032,6 +1059,28 @@ public class SAPToWMSController {
|
|||||||
selectMap.put("SHIPREQUESTNAME", shipRequestName);
|
selectMap.put("SHIPREQUESTNAME", shipRequestName);
|
||||||
List<Map<String, Object>> checkResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
|
List<Map<String, Object>> checkResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
|
||||||
|
|
||||||
|
String isSql = "SELECT\n" +
|
||||||
|
"\t*\n" +
|
||||||
|
"FROM\n" +
|
||||||
|
"\tMATERIALSHIPREQUEST m\n" +
|
||||||
|
"LEFT JOIN MATERIALSHIPREQUESTDETAIL md ON\n" +
|
||||||
|
"\tmd.SHIPREQUESTNAME = m.SHIPREQUESTNAME\n" +
|
||||||
|
"WHERE\n" +
|
||||||
|
"\tm.SHIPREQUESTNAME =:SHIPREQUESTNAME\n" +
|
||||||
|
"\tAND md.SALEOUTQUANTITY > 0";
|
||||||
|
|
||||||
|
List<Map<String, Object>> isList = IDMFrameServiceProxy.getSqlTemplate().queryForList(isSql, selectMap);
|
||||||
|
if (isList != null && isList.size() > 0) {
|
||||||
|
throw new CustomException("ERROR","单据已存在,并且已存在过账!");
|
||||||
|
}else {
|
||||||
|
String shipquestSql="DELETE FROM MATERIALSHIPREQUEST WHERE shiprequestname =?";
|
||||||
|
String shipDetailSql="DELETE FROM materialshiprequestdetail WHERE shiprequestname =?";
|
||||||
|
Object[] obj=new Object[] {shipRequestName, shipRequestName};
|
||||||
|
IDMFrameServiceProxy.getSqlTemplate().update(shipquestSql, obj);
|
||||||
|
IDMFrameServiceProxy.getSqlTemplate().update(shipDetailSql, obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(checkResultList == null || checkResultList.size() == 0) {
|
if(checkResultList == null || checkResultList.size() == 0) {
|
||||||
CreateMaterialShipRequestInfo createInfo = new CreateMaterialShipRequestInfo();
|
CreateMaterialShipRequestInfo createInfo = new CreateMaterialShipRequestInfo();
|
||||||
createInfo.setSiteName(sitename);
|
createInfo.setSiteName(sitename);
|
||||||
@ -1156,7 +1205,12 @@ public class SAPToWMSController {
|
|||||||
Map<String, Object> materialMap= new HashMap<String, Object>();
|
Map<String, Object> materialMap= new HashMap<String, Object>();
|
||||||
materialMap.put("MATERIALSPECNAME", materialSpecName);
|
materialMap.put("MATERIALSPECNAME", materialSpecName);
|
||||||
List<Map<String, Object>> phaseList = IDMFrameServiceProxy.getSqlTemplate().queryForList(materialSql, materialMap);
|
List<Map<String, Object>> phaseList = IDMFrameServiceProxy.getSqlTemplate().queryForList(materialSql, materialMap);
|
||||||
String phase = phaseList.get(0).get("PHASE") != null ? phaseList.get(0).get("PHASE").toString() : "";
|
String phase= "";
|
||||||
|
if(phaseList == null || phaseList.size() == 0) {
|
||||||
|
throw new CustomException("ERROR","料号在基础数据里没找到!");
|
||||||
|
}else {
|
||||||
|
phase = phaseList.get(0).get("PHASE") != null ? phaseList.get(0).get("PHASE").toString() : "";
|
||||||
|
}
|
||||||
|
|
||||||
String sqlItemCheck ="SELECT * FROM materialshiprequestdetail WHERE shiprequestname =:SHIPREQUESTNAME and shiprequestdetailname = :SHIPREQUESTDETAILNAME";
|
String sqlItemCheck ="SELECT * FROM materialshiprequestdetail WHERE shiprequestname =:SHIPREQUESTNAME and shiprequestdetailname = :SHIPREQUESTDETAILNAME";
|
||||||
|
|
||||||
@ -1173,7 +1227,9 @@ public class SAPToWMSController {
|
|||||||
createInfo.setShipRequestName(shipRequestName);
|
createInfo.setShipRequestName(shipRequestName);
|
||||||
createInfo.setShipRequestDetailName(shipRequestDetailName);
|
createInfo.setShipRequestDetailName(shipRequestDetailName);
|
||||||
createInfo.setMaterialSpecName(materialSpecName);
|
createInfo.setMaterialSpecName(materialSpecName);
|
||||||
createInfo.setRequestQuantity(Float.parseFloat(requestQuantity));
|
// 精度丢失处理
|
||||||
|
BigDecimal bigRequestQuantity = new BigDecimal(requestQuantity.trim());
|
||||||
|
createInfo.setRequestQuantity(bigRequestQuantity.doubleValue());
|
||||||
createInfo.setAssignedQuantity(0);
|
createInfo.setAssignedQuantity(0);
|
||||||
|
|
||||||
|
|
||||||
@ -1224,7 +1280,9 @@ public class SAPToWMSController {
|
|||||||
//bindMapItem.put("desc_cn", description ); // 成本中心
|
//bindMapItem.put("desc_cn", description ); // 成本中心
|
||||||
bindMapItem.put("charge", charge);
|
bindMapItem.put("charge", charge);
|
||||||
bindMapItem.put("materialSpecName", materialSpecName);
|
bindMapItem.put("materialSpecName", materialSpecName);
|
||||||
bindMapItem.put("requestQuantity", requestQuantity);
|
// 精度丢失处理
|
||||||
|
BigDecimal bigRequestQuantity = new BigDecimal(requestQuantity.trim());
|
||||||
|
bindMapItem.put("requestQuantity", bigRequestQuantity.doubleValue());
|
||||||
bindMapItem.put("unit", unit);
|
bindMapItem.put("unit", unit);
|
||||||
bindMapItem.put("erpReceiveFactory", werks2);
|
bindMapItem.put("erpReceiveFactory", werks2);
|
||||||
bindMapItem.put("erpReceiveLocation", lgort2);
|
bindMapItem.put("erpReceiveLocation", lgort2);
|
||||||
@ -1692,6 +1750,15 @@ public class SAPToWMSController {
|
|||||||
bindMapItem.put("sendSalesOrderDetailNo", sendSaleOrderDetailNo); // 销售订单行号
|
bindMapItem.put("sendSalesOrderDetailNo", sendSaleOrderDetailNo); // 销售订单行号
|
||||||
bindMapItem.put("sourceNo", sourceNo); // 原单号
|
bindMapItem.put("sourceNo", sourceNo); // 原单号
|
||||||
|
|
||||||
|
// 根据料号获取阶段
|
||||||
|
String materialSql = "SELECT m.PHASE FROM MATERIALSPEC m WHERE MATERIALSPECNAME = :MATERIALSPECNAME";
|
||||||
|
Map<String, Object> materialMap= new HashMap<String, Object>();
|
||||||
|
materialMap.put("MATERIALSPECNAME", materialSpecName);
|
||||||
|
List<Map<String, Object>> phaseList = IDMFrameServiceProxy.getSqlTemplate().queryForList(materialSql, materialMap);
|
||||||
|
String phase = phaseList.get(0).get("PHASE") != null ? phaseList.get(0).get("PHASE").toString() : "";
|
||||||
|
bindMapItem.put("phase", phase); // 原单号
|
||||||
|
|
||||||
|
|
||||||
// 如果是销售退
|
// 如果是销售退
|
||||||
if("ZLR1".equals(shipRequestType)) {
|
if("ZLR1".equals(shipRequestType)) {
|
||||||
bindMapItem.put("receiveRequestDetailType", shipRequestType); // 原单号
|
bindMapItem.put("receiveRequestDetailType", shipRequestType); // 原单号
|
||||||
@ -1700,7 +1767,8 @@ public class SAPToWMSController {
|
|||||||
createReceiveInfo.setReceiveRequestName(shipRequestName);
|
createReceiveInfo.setReceiveRequestName(shipRequestName);
|
||||||
createReceiveInfo.setReceiveRequestDetailName(shipRequestDetailName);
|
createReceiveInfo.setReceiveRequestDetailName(shipRequestDetailName);
|
||||||
createReceiveInfo.setMaterialSpecName(materialSpecName);
|
createReceiveInfo.setMaterialSpecName(materialSpecName);
|
||||||
createReceiveInfo.setRequestQuantity(Float.parseFloat(requestQuantity));
|
BigDecimal bigRequestQuantity = new BigDecimal(requestQuantity.trim());
|
||||||
|
createReceiveInfo.setRequestQuantity(bigRequestQuantity.doubleValue());
|
||||||
createReceiveInfo.setReceivedQuantity(0);
|
createReceiveInfo.setReceivedQuantity(0);
|
||||||
createReceiveInfo.setUserColumns(bindMapItem);
|
createReceiveInfo.setUserColumns(bindMapItem);
|
||||||
EventInfo eventReciveInfo = new EventInfo();
|
EventInfo eventReciveInfo = new EventInfo();
|
||||||
@ -1720,7 +1788,8 @@ public class SAPToWMSController {
|
|||||||
createInfo.setShipRequestName(shipRequestName);
|
createInfo.setShipRequestName(shipRequestName);
|
||||||
createInfo.setShipRequestDetailName(shipRequestDetailName);
|
createInfo.setShipRequestDetailName(shipRequestDetailName);
|
||||||
createInfo.setMaterialSpecName(materialSpecName);
|
createInfo.setMaterialSpecName(materialSpecName);
|
||||||
createInfo.setRequestQuantity(Float.parseFloat(requestQuantity));
|
BigDecimal bigRequestQuantity = new BigDecimal(requestQuantity.trim());
|
||||||
|
createInfo.setRequestQuantity(bigRequestQuantity.doubleValue());
|
||||||
createInfo.setAssignedQuantity(0);
|
createInfo.setAssignedQuantity(0);
|
||||||
createInfo.setUserColumns(bindMapItem);
|
createInfo.setUserColumns(bindMapItem);
|
||||||
EventInfo eventInfo = new EventInfo();
|
EventInfo eventInfo = new EventInfo();
|
||||||
@ -1735,7 +1804,8 @@ public class SAPToWMSController {
|
|||||||
Map<String, Object> bindMapItem = new HashMap<String, Object>();
|
Map<String, Object> bindMapItem = new HashMap<String, Object>();
|
||||||
bindMapItem.put("erpFactory", factoryName); // 工厂
|
bindMapItem.put("erpFactory", factoryName); // 工厂
|
||||||
bindMapItem.put("materialSpecName", materialSpecName);
|
bindMapItem.put("materialSpecName", materialSpecName);
|
||||||
bindMapItem.put("requestQuantity", requestQuantity);
|
BigDecimal bigRequestQuantity = new BigDecimal(requestQuantity.trim());
|
||||||
|
bindMapItem.put("requestQuantity", bigRequestQuantity.doubleValue());
|
||||||
|
|
||||||
//需要新建
|
//需要新建
|
||||||
bindMapItem.put("width", width); // 宽幅
|
bindMapItem.put("width", width); // 宽幅
|
||||||
|
@ -327,12 +327,12 @@ public class SaleReturnController {
|
|||||||
String erpFactory = materialPacking.getErpFactory();
|
String erpFactory = materialPacking.getErpFactory();
|
||||||
|
|
||||||
|
|
||||||
String sqlString = "SELECT * \r\n"
|
String sqlString = "SELECT * \n" +
|
||||||
+ "FROM MATERIALPACKING m \r\n"
|
"FROM MATERIALPACKING m \n" +
|
||||||
+ "LEFT JOIN MATERIALSHIPREQUEST m2 ON m.SHIPREQUESTNAME = m2.SHIPREQUESTNAME\r\n"
|
"LEFT JOIN MATERIALSHIPREQUEST m2 ON m.SHIPREQUESTNAME = m2.SHIPREQUESTNAME\n" +
|
||||||
+ "WHERE m.STOCKSTATE ='StockOut'\r\n"
|
"WHERE m.STOCKSTATE ='StockOut'\n" +
|
||||||
+ " AND m.MATERIALPACKINGNAME = :MATERIALPACKINGNAME\r\n"
|
"\tAND m.MATERIALPACKINGNAME = :MATERIALPACKINGNAME\n" +
|
||||||
+ " AND m2.SHIPREQUESTTYPE = 'ZLF1'";
|
"\tAND REGEXP_LIKE(m2.SHIPREQUESTTYPE, '^ZLF[0-9]$')";
|
||||||
|
|
||||||
Map<String,Object> hashMap = new HashMap<String,Object>();
|
Map<String,Object> hashMap = new HashMap<String,Object>();
|
||||||
hashMap.put("MATERIALPACKINGNAME", materialPackingName);
|
hashMap.put("MATERIALPACKINGNAME", materialPackingName);
|
||||||
|
@ -564,19 +564,27 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|||||||
untils.sendMaterialInfoToMES_NEW(shipRequestName, "", materialPackingKeyList);
|
untils.sendMaterialInfoToMES_NEW(shipRequestName, "", materialPackingKeyList);
|
||||||
//billCode = NCWServiceImpl.SaleOut2(shipRequestName, "SDK", eventUser,materialPackingKeyList,"");
|
//billCode = NCWServiceImpl.SaleOut2(shipRequestName, "SDK", eventUser,materialPackingKeyList,"");
|
||||||
untils.SaveUnDoInfo_ForSap(materialPackingKeyList, billCode, makeEventInfo);
|
untils.SaveUnDoInfo_ForSap(materialPackingKeyList, billCode, makeEventInfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "06"://成本中心领料
|
case "06"://成本中心领料
|
||||||
case "09"://研发领料
|
// billCode=toSAPService.orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList);
|
||||||
// billCode=toSAPService.orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList);
|
|
||||||
billCode=orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList);
|
billCode=orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList);
|
||||||
|
//抛送MES数据
|
||||||
|
untils.sendMaterialInfoToMES_NEW(shipRequestName, "", materialPackingKeyList);
|
||||||
//更新MES管芯数据
|
//更新MES管芯数据
|
||||||
new MESServiceImpl().updateDurable_ByCostcenter(shipRequestName, "SDK", eventUser, materialPackingKeyList);
|
new MESServiceImpl().updateDurable_ByCostcenter(shipRequestName, "SDK", eventUser, materialPackingKeyList);
|
||||||
//billCode = NCWServiceImpl.SaleOut2(shipRequestName, "SDK", eventUser,materialPackingKeyList,"");
|
//billCode = NCWServiceImpl.SaleOut2(shipRequestName, "SDK", eventUser,materialPackingKeyList,"");
|
||||||
untils.SaveUnDoInfo_ForSap(materialPackingKeyList, billCode, makeEventInfo);
|
untils.SaveUnDoInfo_ForSap(materialPackingKeyList, billCode, makeEventInfo);
|
||||||
break;
|
break;
|
||||||
|
case "09"://研发领料
|
||||||
|
// billCode=toSAPService.orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList);
|
||||||
|
// billCode=orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList);
|
||||||
|
// //更新MES管芯数据
|
||||||
|
// new MESServiceImpl().updateDurable_ByCostcenter(shipRequestName, "SDK", eventUser, materialPackingKeyList);
|
||||||
|
// //billCode = NCWServiceImpl.SaleOut2(shipRequestName, "SDK", eventUser,materialPackingKeyList,"");
|
||||||
|
// untils.SaveUnDoInfo_ForSap(materialPackingKeyList, billCode, makeEventInfo);
|
||||||
|
break;
|
||||||
case "ZLF0"://销售出库确认 (单据类型ZLF0~ZLF8) SD023(销售回传)
|
case "ZLF0"://销售出库确认 (单据类型ZLF0~ZLF8) SD023(销售回传)
|
||||||
case "ZLF1":
|
case "ZLF1":
|
||||||
case "ZLF2":
|
case "ZLF2":
|
||||||
|
@ -396,12 +396,12 @@ public class MESToWMSServiceImpl implements MESToWMSService {
|
|||||||
+ "PRODUCTSPECNAME, PRODUCTNAME, SDK_ID, PHASE, RECEIVE_FLAG, REMARK, SHIPTIME, "
|
+ "PRODUCTSPECNAME, PRODUCTNAME, SDK_ID, PHASE, RECEIVE_FLAG, REMARK, SHIPTIME, "
|
||||||
+ "SHIPUSER, SITENAME, MATERIALSPECTYPE,"
|
+ "SHIPUSER, SITENAME, MATERIALSPECTYPE,"
|
||||||
+ "INVENTORYTYPE, SALENO, SALEDETAILNO, ERPLOCATION, CHARGE, LOCATIONNAME, "
|
+ "INVENTORYTYPE, SALENO, SALEDETAILNO, ERPLOCATION, CHARGE, LOCATIONNAME, "
|
||||||
+ "OPERATIONTYPE, ERPFACTORY,GXID)" + SystemPropHelper.CR
|
+ "OPERATIONTYPE, MAKEDATE,ERPFACTORY,GXID)" + SystemPropHelper.CR
|
||||||
+ " VALUES(:LOTNAME,:QTY,:UNIT,:REQUESTNAME, :AREA, "
|
+ " VALUES(:LOTNAME,:QTY,:UNIT,:REQUESTNAME, :AREA, "
|
||||||
+ ":PRODUCTSPECNAME, :PRODUCTNAME, :SDK_ID, :PHASE, 'N', :REMARK, :SHIPTIME, "
|
+ ":PRODUCTSPECNAME, :PRODUCTNAME, :SDK_ID, :PHASE, 'N', :REMARK, :SHIPTIME, "
|
||||||
+ "'MES', 'SDK', :MATERIALSPECTYPE, "
|
+ "'MES', 'SDK', :MATERIALSPECTYPE, "
|
||||||
+ ":INVENTORYTYPE, :SALENO, :SALEDETAILNO, :ERPLOCATION, :CHARGE, :LOCATIONNAME, "
|
+ ":INVENTORYTYPE, :SALENO, :SALEDETAILNO, :ERPLOCATION, :CHARGE, :LOCATIONNAME, "
|
||||||
+ ":OPERATIONTYPE, :ERPFACTORY,:GXID)";
|
+ ":OPERATIONTYPE,TO_DATE(:MAKEDATE, 'YYYY-MM-DD'),:ERPFACTORY,:GXID)";
|
||||||
String receiveActNo = "";
|
String receiveActNo = "";
|
||||||
String productSpecName = "";
|
String productSpecName = "";
|
||||||
String erpFactory = "";
|
String erpFactory = "";
|
||||||
@ -428,7 +428,7 @@ public class MESToWMSServiceImpl implements MESToWMSService {
|
|||||||
String erpLocation = jo.getString("erpLocation");
|
String erpLocation = jo.getString("erpLocation");
|
||||||
String locationName = jo.getString("locationName");
|
String locationName = jo.getString("locationName");
|
||||||
String gxId = jo.getString("gxId"); // 增加管芯字段
|
String gxId = jo.getString("gxId"); // 增加管芯字段
|
||||||
// String makeDate = jo.getString("makeDate");
|
String makeDate = jo.getString("makeDate");
|
||||||
erpFactory = jo.getString("erpFactory");
|
erpFactory = jo.getString("erpFactory");
|
||||||
String materialPackingName = jo.getString("materialPackingName"); // 生成退料原条码二维码
|
String materialPackingName = jo.getString("materialPackingName"); // 生成退料原条码二维码
|
||||||
|
|
||||||
@ -473,7 +473,7 @@ public class MESToWMSServiceImpl implements MESToWMSService {
|
|||||||
bindMap.put("CHARGE", charge);
|
bindMap.put("CHARGE", charge);
|
||||||
bindMap.put("GXID", gxId);
|
bindMap.put("GXID", gxId);
|
||||||
bindMap.put("MATERIALPACKINGNAME", materialPackingName);
|
bindMap.put("MATERIALPACKINGNAME", materialPackingName);
|
||||||
// bindMap.put("makeDate", makeDate);
|
bindMap.put("MAKEDATE", makeDate);
|
||||||
|
|
||||||
if ("1".equals(operationType)) { // 自动入库
|
if ("1".equals(operationType)) { // 自动入库
|
||||||
if ("FG".equals(stockInType) || "BFG".equals(stockInType)) { // 产成品入库 增加回收例子入库
|
if ("FG".equals(stockInType) || "BFG".equals(stockInType)) { // 产成品入库 增加回收例子入库
|
||||||
|
@ -8,6 +8,7 @@ import com.cim.idm.framework.data.EventInfo;
|
|||||||
import com.cim.idm.framework.exception.IDMFrameDBErrorSignal;
|
import com.cim.idm.framework.exception.IDMFrameDBErrorSignal;
|
||||||
import com.cim.idm.framework.util.time.TimeStampUtil;
|
import com.cim.idm.framework.util.time.TimeStampUtil;
|
||||||
import com.cim.idm.service.ReturnStockInService;
|
import com.cim.idm.service.ReturnStockInService;
|
||||||
|
import com.cim.idm.service.impl.MESServiceImpl;
|
||||||
import com.cim.idm.service.impl.ToSAPServiceImpl;
|
import com.cim.idm.service.impl.ToSAPServiceImpl;
|
||||||
import com.cim.idm.utils.EventInfoUtil;
|
import com.cim.idm.utils.EventInfoUtil;
|
||||||
import com.cim.idm.wmsextend.generic.GenericServiceProxy;
|
import com.cim.idm.wmsextend.generic.GenericServiceProxy;
|
||||||
@ -675,19 +676,9 @@ public class ReturnStockIntoServiceImpl implements ReturnStockInService {
|
|||||||
}
|
}
|
||||||
SaveUnDoInfo(billCode, commitDate);
|
SaveUnDoInfo(billCode, commitDate);
|
||||||
|
|
||||||
|
// 创建MESServiceImpl实例,用于调用发送物料信息到MES系统的方法
|
||||||
// 调mes接口删除批次,暂时注释,mes接口还没写好
|
MESServiceImpl mesService=new MESServiceImpl() ;
|
||||||
JSONObject requestBodyMap = new JSONObject();
|
mesService.SCTL_deleteMaterialPackingInfo(chargeList);
|
||||||
requestBodyMap.append("chargeList", chargeList);
|
|
||||||
String requestBody = requestBodyMap.toString();
|
|
||||||
// String httpPost = mesHttpUtil.httpPost(baseUrl + "/wms/wmsMaterialDelete", requestBody);
|
|
||||||
// System.out.println(httpPost);
|
|
||||||
// org.json.JSONObject receiveJsonObject = new org.json.JSONObject(httpPost);
|
|
||||||
// String code = receiveJsonObject.getString("code");
|
|
||||||
// String msg = receiveJsonObject.getString("msg");
|
|
||||||
// if ("20000".equals(code) || "1".equals(code)) {
|
|
||||||
// throw new GlobalException("MES返回报错:" + msg);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user