fix:修改质检

This commit is contained in:
郭飞 2025-04-01 16:50:31 +08:00
parent 2442ae856c
commit 979b9d0258
4 changed files with 25 additions and 12 deletions

View File

@ -4815,12 +4815,14 @@ public class ToSAPServiceImpl {
.append(" m.UNIT ,").append(SystemPropHelper.CR) .append(" m.UNIT ,").append(SystemPropHelper.CR)
.append(" sum(m.MATERIALQUANTITY) MATERIALQUANTITY").append(SystemPropHelper.CR) .append(" sum(m.MATERIALQUANTITY) MATERIALQUANTITY").append(SystemPropHelper.CR)
.append(" FROM MATERIALPACKING m ").append(SystemPropHelper.CR) .append(" FROM MATERIALPACKING m ").append(SystemPropHelper.CR)
.append(" WHERE m.RECEIVEACTNO = :RECEIVEACTNO AND m.SITENAME = :SITENAME ").append(SystemPropHelper.CR) // .append(" WHERE m.RECEIVEACTNO = :RECEIVEACTNO AND m.SITENAME = :SITENAME ").append(SystemPropHelper.CR)
.append(" WHERE m.MESSAGEID = :RECEIVEACTNO AND m.SITENAME = :SITENAME").append(SystemPropHelper.CR)
.append(" AND m.MATERIALSPECNAME = :MATERIALSPECNAME ").append(SystemPropHelper.CR) .append(" AND m.MATERIALSPECNAME = :MATERIALSPECNAME ").append(SystemPropHelper.CR)
.append(" AND ( m.PACKINGGRADE IS NULL or m.PACKINGGRADE <> :pqcResult ) ").append(SystemPropHelper.CR) .append(" AND ( m.PACKINGGRADE IS NULL or m.PACKINGGRADE <> :pqcResult ) ").append(SystemPropHelper.CR)
.append("GROUP BY m.MATERIALSPECNAME ,m.ERPFACTORY ,m.ERPLOCATION ,m.PACKINGGRADE,m.UNIT "); .append("GROUP BY m.MATERIALSPECNAME ,m.ERPFACTORY ,m.ERPLOCATION ,m.PACKINGGRADE,m.UNIT ");
Map<String, Object> hashMap = new HashMap<String, Object>(); Map<String, Object> hashMap = new HashMap<String, Object>();
// hashMap.put("RECEIVEACTNO", receiveActNumber);
hashMap.put("RECEIVEACTNO", receiveActNumber); hashMap.put("RECEIVEACTNO", receiveActNumber);
hashMap.put("MATERIALSPECNAME", materialCode); hashMap.put("MATERIALSPECNAME", materialCode);
hashMap.put("SITENAME", siteName); hashMap.put("SITENAME", siteName);

View File

@ -79,17 +79,21 @@ public class ToSAPMessageUtil {
// SDK // SDK
// 获取接口返回token // 获取接口返回token
public static String authStr = ""; public static String authStr = "";
public static String baseUrl = "http://172.22.10.53:51000/RESTAdapter/OAuthServer"; // public static String baseUrl = "http://172.22.10.53:8101/RESTAdapter/OAuthServer";
// public static String baseUrl = "http://172.22.10.53:8101/RESTAdapter/OAuthServer";
// public static String baseUrl = "http://172.22.10.53:8003/RESTAdapter/OAuthServer"; // public static String baseUrl = "http://172.22.10.53:8003/RESTAdapter/OAuthServer";
// public static String DNUrl = "http://172.22.10.53:51000/RESTAdapter/sd023/api"; // public static String DNUrl = "http://172.22.10.53:51000/RESTAdapter/sd023/api";
// DN回传接口
public static String DNUrl = "http://172.22.10.53:51000/RESTAdapter/sd023/api";
// 货物移动接口
public static String materialChangeLocationUrl = "http://172.22.10.53:51000/RESTAdapter/mm067/api";
// 物料凭证冲销接口
public static String materilUndoUrl = "http://172.22.10.53:51000/RESTAdapter/mm068/api";
// 内网地址
// public static String baseUrl = "http://172.22.10.53:51000/RESTAdapter/OAuthServer"; // 内网
// public static String DNUrl = "http://172.22.10.53:51000/RESTAdapter/sd023/api";// 内网 // DN回传接口
// public static String materialChangeLocationUrl = "http://172.22.10.53:51000/RESTAdapter/mm067/api"; // 货物移动接口
// public static String materilUndoUrl = "http://172.22.10.53:51000/RESTAdapter/mm068/api"; // 物料凭证冲销接口
// 外网地址
public static String baseUrl = "http://218.93.237.50:51000/RESTAdapter/OAuthServer";
public static String DNUrl = "http://218.93.237.50:51000/RESTAdapter/sd023/api";
public static String materialChangeLocationUrl = "http://218.93.237.50:51000/RESTAdapter/mm067/api";
public static String materilUndoUrl = "http://218.93.237.50:51000/RESTAdapter/mm068/api";
public static String userName = ""; public static String userName = "";
public static String sd023(String user, Map<String,?> bodyData, List<Map<String,Object>> itemsData) { public static String sd023(String user, Map<String,?> bodyData, List<Map<String,Object>> itemsData) {

View File

@ -35,7 +35,7 @@ public class MESToWMSController {
} }
} }
@ApiOperation(value = "物料出库请求") @ApiOperation(value = "二次确认物料出库请求")
@RequestMapping(value = "/meswms_materialout_request", method = RequestMethod.POST) @RequestMapping(value = "/meswms_materialout_request", method = RequestMethod.POST)
public AjaxResult materialOutByMES(@RequestBody JSONArray in) { public AjaxResult materialOutByMES(@RequestBody JSONArray in) {
log.info("Received material out request: {}", in.toJSONString()); log.info("Received material out request: {}", in.toJSONString());

View File

@ -272,7 +272,7 @@ public class QMSController {
loginfo.setInterfaceTime(ConvertUtil.getCurrTime("yyyy-MM-dd HH:mm:ss")); loginfo.setInterfaceTime(ConvertUtil.getCurrTime("yyyy-MM-dd HH:mm:ss"));
loginfo.setSendMsg(in.toJSONString()); loginfo.setSendMsg(in.toJSONString());
loginfo.setEventName("pqcSyncdata2"); loginfo.setEventName("pqcSyncdata2");
String siteName = "SDK";
SetEventInfo setEventInfo = new SetEventInfo(); SetEventInfo setEventInfo = new SetEventInfo();
EventInfo makeEventInfo = new EventInfoUtil().makeEventInfo("iqcSyncdata", "", "iqcSyncdata"); EventInfo makeEventInfo = new EventInfoUtil().makeEventInfo("iqcSyncdata", "", "iqcSyncdata");
@ -343,7 +343,7 @@ public class QMSController {
setEventInfo.setUserColumns(bindMap); setEventInfo.setUserColumns(bindMap);
//eventInfo.setEventTime(Timestamp.valueOf(pqcResultDate)); //eventInfo.setEventTime(Timestamp.valueOf(pqcResultDate));
eventInfo.setEventUser(user); eventInfo.setEventUser(user);
if ("0".equals(tpType)) {//到货单 if ("0".equals(tpType)) {//采购到货单, 领料退库产成品入库
// 获取JSON数组 // 获取JSON数组
JSONArray jsonArray = jb.getJSONArray("lotList"); // arrayName为JSON数组的键名 JSONArray jsonArray = jb.getJSONArray("lotList"); // arrayName为JSON数组的键名
@ -361,6 +361,8 @@ public class QMSController {
} else { } else {
mpList.add(new MaterialPackingKey(queryForList.get(0).get("SITENAME").toString(), mpList.add(new MaterialPackingKey(queryForList.get(0).get("SITENAME").toString(),
queryForList.get(0).get("MATERIALPACKINGNAME").toString())); queryForList.get(0).get("MATERIALPACKINGNAME").toString()));
// MaterialPackingServiceProxy.getMaterialPackingService().setEvent(new MaterialPackingKey(queryForList.get(j).get("SITENAME").toString(),
// queryForList.get(j).get("MATERIALPACKINGNAME").toString()), makeEventInfo, setEventInfo);
success ++; success ++;
} }
} }
@ -377,12 +379,17 @@ public class QMSController {
for (int j = 0; j < queryForList.size(); j++) { for (int j = 0; j < queryForList.size(); j++) {
mpList.add(new MaterialPackingKey(queryForList.get(j).get("SITENAME").toString(), mpList.add(new MaterialPackingKey(queryForList.get(j).get("SITENAME").toString(),
queryForList.get(j).get("MATERIALPACKINGNAME").toString())); queryForList.get(j).get("MATERIALPACKINGNAME").toString()));
// MaterialPackingServiceProxy.getMaterialPackingService().setEvent(new MaterialPackingKey(queryForList.get(j).get("SITENAME").toString(),
// queryForList.get(j).get("MATERIALPACKINGNAME").toString()), makeEventInfo, setEventInfo);
success ++; success ++;
} }
} }
} else { } else {
throw new CustomException("Common","无单据信息和批次信息"); throw new CustomException("Common","无单据信息和批次信息");
} }
// 将订单的质检结果传给SAP
String undoId = toSAPService.iqcResultFeekback(siteName,commonNumber,materialCode,pqcResult,pqcResultDate,user,
exceptionHandling,specialState);
} }
else if ("6".equals(tpType)) {//投放计划单 else if ("6".equals(tpType)) {//投放计划单