Compare commits

...

2 Commits

11 changed files with 483 additions and 154 deletions

View File

@ -87,6 +87,18 @@ public class MaterialShipRequest extends FieldAccessor implements DataInfo<Mater
private String specialFlag; private String specialFlag;
private String specialComment; private String specialComment;
private String customName;
private String customerArea;
private String customerOrder;
private String bezei;
private String shipRequestDec;
private String deliveryAddress;
private String deliveryRemark;
private String carFlag;
private String orderDateStr;
private String planDate;
private Timestamp orderDate;
public String getDestination() { public String getDestination() {
return destination; return destination;
} }
@ -326,4 +338,92 @@ public class MaterialShipRequest extends FieldAccessor implements DataInfo<Mater
public void setAreaName(String areaName) { public void setAreaName(String areaName) {
this.areaName = areaName; this.areaName = areaName;
} }
public String getCustomName() {
return customName;
}
public void setCustomName(String customName) {
this.customName = customName;
}
public String getCustomerArea() {
return customerArea;
}
public void setCustomerArea(String customerArea) {
this.customerArea = customerArea;
}
public String getCustomerOrder() {
return customerOrder;
}
public void setCustomerOrder(String customerOrder) {
this.customerOrder = customerOrder;
}
public String getBezei() {
return bezei;
}
public void setBezei(String bezei) {
this.bezei = bezei;
}
public String getShipRequestDec() {
return shipRequestDec;
}
public void setShipRequestDec(String shipRequestDec) {
this.shipRequestDec = shipRequestDec;
}
public String getDeliveryAddress() {
return deliveryAddress;
}
public void setDeliveryAddress(String deliveryAddress) {
this.deliveryAddress = deliveryAddress;
}
public String getDeliveryRemark() {
return deliveryRemark;
}
public void setDeliveryRemark(String deliveryRemark) {
this.deliveryRemark = deliveryRemark;
}
public String getCarFlag() {
return carFlag;
}
public void setCarFlag(String carFlag) {
this.carFlag = carFlag;
}
public String getOrderDateStr() {
return orderDateStr;
}
public void setOrderDateStr(String orderDateStr) {
this.orderDateStr = orderDateStr;
}
public String getPlanDate() {
return planDate;
}
public void setPlanDate(String planDate) {
this.planDate = planDate;
}
public Timestamp getOrderDate() {
return orderDate;
}
public void setOrderDate(Timestamp orderDate) {
this.orderDate = orderDate;
}
} }

View File

@ -188,6 +188,17 @@ public class MaterialShipRequestDetail extends FieldAccessor implements DataInfo
@UserColumnMark @UserColumnMark
private String erpFactory; private String erpFactory;
public String getSaleOutQuantity() {
return saleOutQuantity;
}
public void setSaleOutQuantity(String saleOutQuantity) {
this.saleOutQuantity = saleOutQuantity;
}
@UserColumnMark
private String saleOutQuantity;
public String getSupplierNO() { public String getSupplierNO() {
return supplierNO; return supplierNO;

View File

@ -596,7 +596,7 @@ public class MESServiceImpl implements MESService{
jsonObject.put("userId", list.get(i).get("LASTEVENTUSER")); jsonObject.put("userId", list.get(i).get("LASTEVENTUSER"));
jsonObject.put("conversionScale", list.get(i).get("CONVERSIONSCALE")); jsonObject.put("conversionScale", list.get(i).get("CONVERSIONSCALE"));
jsonObject.put("fdescription", list.get(i).get("REMARK")); jsonObject.put("fdescription", list.get(i).get("REMARK"));
jsonObject.put("shipType", list.get(i).get("SHIPREQUESTDETAILTYPE")); jsonObject.put("shipType", list.get(i).get("SHIPREQUESTTYPE"));
jsonObject.put("shipRequestType", list.get(i).get("SHIPREQUESTTYPE")); jsonObject.put("shipRequestType", list.get(i).get("SHIPREQUESTTYPE"));
jsonObject.put("shipRequestName", shipRequestName); jsonObject.put("shipRequestName", shipRequestName);
jsonObject.put("gxId", list.get(i).get("GXID")); jsonObject.put("gxId", list.get(i).get("GXID"));

View File

@ -4631,7 +4631,7 @@ public class ToSAPServiceImpl {
public String autoTurnWareAndQms(List<MaterialPackingKey> all, public String autoTurnWareAndQms(List<MaterialPackingKey> all,
String aimERPlocation, String aimERPlocation,
String user, String user,
String pqcResult) throws Exception { String pqcResult, String commitDate) throws Exception {
String rcode; String rcode;
String undoId = ""; String undoId = "";
String rmsg = null; String rmsg = null;
@ -4665,6 +4665,26 @@ public class ToSAPServiceImpl {
if (queryForList == null || queryForList.size() < 1) { if (queryForList == null || queryForList.size() < 1) {
return ""; return "";
} }
String outputDate = "";
try {
if(commitDate.contains("-")) {
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyyMMdd");
Date date = inputFormat.parse(commitDate);
outputDate = outputFormat.format(date);
}else {
outputDate = commitDate;
}
} catch (IllegalArgumentException e) {
log.error("commitDate 参数无效: " + e.getMessage(), e);
throw e;
} catch (Exception e) {
log.error("日期解析失败: " + e.getMessage(), e);
throw new RuntimeException("日期解析失败,请检查 commitDate 格式是否为 yyyy-MM-dd", e);
}
try { try {
JSONObject sendData = new JSONObject(true); JSONObject sendData = new JSONObject(true);
@ -4690,10 +4710,11 @@ public class ToSAPServiceImpl {
*/ */
body.put("ITEM", itemArray); body.put("ITEM", itemArray);
body.put("ITEMID", uniqueID); body.put("ITEMID", uniqueID);
//过账日期 //过账日期
body.put("BUDAT", TimeStampUtil.getCurrentTime("yyyyMMdd")); body.put("BUDAT", outputDate);
//凭证日期 //凭证日期
body.put("BLDAT", TimeStampUtil.getCurrentTime("yyyyMMdd")); body.put("BLDAT", outputDate);
//凭证抬头文本 //凭证抬头文本
body.put("BKTXT", uniqueID); body.put("BKTXT", uniqueID);
//用户名 //用户名
@ -5476,8 +5497,8 @@ public class ToSAPServiceImpl {
itemData.add(item); itemData.add(item);
} }
// TimeStampUtil.getCurrentTime("yyyyMMdd")
String sendData = ToSAPMessageUtil.mm067(user, bodyData, itemData,TimeStampUtil.getCurrentTime("yyyyMMdd")); String sendData = ToSAPMessageUtil.mm067(user, bodyData, itemData,"2025-04-30");
String sapreturn = toSAPMessageUtil.sendHttpPost(toSAPMessageUtil.materialChangeLocationUrl,"",sendData); String sapreturn = toSAPMessageUtil.sendHttpPost(toSAPMessageUtil.materialChangeLocationUrl,"",sendData);
org.json.JSONObject receiveJsonObject = new org.json.JSONObject(sapreturn); org.json.JSONObject receiveJsonObject = new org.json.JSONObject(sapreturn);

View File

@ -256,10 +256,12 @@ public class NoChargeStockIn {
if (ReceiveTypeEnums.isPurchase(request.getReceiveRequestType())) { if (ReceiveTypeEnums.isPurchase(request.getReceiveRequestType())) {
Map<String,Object> args = new HashMap<>(); Map<String,Object> args = new HashMap<>();
billcode = toSAPServiceImpl.PurStockIn(request.getReceiveRequestName(), siteName, user, args,commitDate); billcode = toSAPServiceImpl.PurStockIn(request.getReceiveRequestName(), siteName, user, args,commitDate);
}else {
} }
// @TODO 其他类型 // @TODO 其他类型
if (billcode == null || "".equals(billcode)) { if (billcode == null || "".equals(billcode)) {
return AjaxResult.me().setErrorCode(500).setSuccess(false).setMessage("NC过账失败"); return AjaxResult.me().setErrorCode(500).setSuccess(false).setMessage("SAP过账失败");
} }
//8更新物料凭证 //8更新物料凭证
SDKMP.updateUndoID(receiveAct,makeEventInfo,billcode); SDKMP.updateUndoID(receiveAct,makeEventInfo,billcode);

View File

@ -978,9 +978,9 @@ public class QMSController {
MpKeyList.add(mpkey); MpKeyList.add(mpkey);
} }
String commitDate=TimeStampUtil.getCurrentTime("yyyy-MM-dd") + " 00:00:00"; // String commitDate=TimeStampUtil.getCurrentTime("yyyy-MM-dd");
UUID uuid = UUID.randomUUID(); UUID uuid = UUID.randomUUID();
billCode = toSAPService.autoTurnWareAndQms(MpKeyList,ERPLOCATION,user,pqcResult); billCode = toSAPService.autoTurnWareAndQms(MpKeyList,ERPLOCATION,user,pqcResult,"2025-04-30");
// }else { // }else {
// billCode = NCWServiceImpl.OQZkNoInvoice(LocationBoxList, sendUser); // billCode = NCWServiceImpl.OQZkNoInvoice(LocationBoxList, sendUser);

View File

@ -567,28 +567,28 @@ public class SAPToWMSController {
selectMap.put("receiverequestname", receiveRequestName); selectMap.put("receiverequestname", receiveRequestName);
List<Map<String, Object>> isResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap); List<Map<String, Object>> isResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
// 检验单据是否已存在并且未被使用过账 // 检验单据是否已存在并且未被使用过账
String isSql = "SELECT\n" + // String isSql = "SELECT\n" +
"m.RECEIVEREQUESTNAME,\n" + // "m.RECEIVEREQUESTNAME,\n" +
"SUM(md.RECEIVEDQUANTITY)\n" + // "SUM(md.RECEIVEDQUANTITY)\n" +
"FROM\n" + // "FROM\n" +
"MATERIALRECEIVEREQUEST m\n" + // "MATERIALRECEIVEREQUEST m\n" +
"LEFT JOIN MATERIALRECEIVEREQUESTDETAIL md ON\n" + // "LEFT JOIN MATERIALRECEIVEREQUESTDETAIL md ON\n" +
"md.RECEIVEREQUESTNAME = m.RECEIVEREQUESTNAME\n" + // "md.RECEIVEREQUESTNAME = m.RECEIVEREQUESTNAME\n" +
"WHERE\n" + // "WHERE\n" +
"m.RECEIVEREQUESTNAME =:receiverequestname\n" + // "m.RECEIVEREQUESTNAME =:receiverequestname\n" +
"AND md.RECEIVEDQUANTITY > 0\n" + // "AND md.RECEIVEDQUANTITY > 0\n" +
"GROUP BY m.RECEIVEREQUESTNAME"; // "GROUP BY m.RECEIVEREQUESTNAME";
List<Map<String, Object>> isList = IDMFrameServiceProxy.getSqlTemplate().queryForList(isSql, selectMap); // List<Map<String, Object>> isList = IDMFrameServiceProxy.getSqlTemplate().queryForList(isSql, selectMap);
if (isList != null && isList.size() > 0) { // if (isList != null && isList.size() > 0) {
throw new CustomException("ERROR","单据已存在,并且已存在过账,不能更新或删除!"); // throw new CustomException("ERROR","单据已存在,并且已存在过账,不能更新或删除!");
}else if(isResultList != null && isResultList.size() > 0) { // }else if(isResultList != null && isResultList.size() > 0) {
String shipquestSql="DELETE FROM MATERIALRECEIVEREQUEST WHERE receiveRequestName =?"; // String shipquestSql="DELETE FROM MATERIALRECEIVEREQUEST WHERE receiveRequestName =?";
String shipDetailSql="DELETE FROM MATERIALRECEIVEREQUESTDETAIL WHERE receiveRequestName =?"; // String shipDetailSql="DELETE FROM MATERIALRECEIVEREQUESTDETAIL WHERE receiveRequestName =?";
Object[] obj=new Object[] {receiveRequestName}; // Object[] obj=new Object[] {receiveRequestName};
IDMFrameServiceProxy.getSqlTemplate().update(shipquestSql, obj); // IDMFrameServiceProxy.getSqlTemplate().update(shipquestSql, obj);
IDMFrameServiceProxy.getSqlTemplate().update(shipDetailSql, obj); // IDMFrameServiceProxy.getSqlTemplate().update(shipDetailSql, obj);
} // }
List<Map<String, Object>> checkResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap); List<Map<String, Object>> checkResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
@ -1076,85 +1076,166 @@ public class SAPToWMSController {
String createDate = MapUtils.getString(data, "CRDAT"); // 创建日期 String createDate = MapUtils.getString(data, "CRDAT"); // 创建日期
String createTime = MapUtils.getString(data, "CRTIM"); // 创建时间 String createTime = MapUtils.getString(data, "CRTIM"); // 创建时间
String moveState = MapUtils.getString(data, "BWART"); //移动类型 BWART String moveState = MapUtils.getString(data, "BWART"); //移动类型 BWART
String areaName = MapUtils.getString(data, "AREANAME"); //车间 String areaName = MapUtils.getString(data, "FEVOR"); //车间
String sqlCheck =" SELECT * FROM materialshiprequest m WHERE shiprequestname =:SHIPREQUESTNAME ";
List<Map<String, Object>> checkResultList1 = new ArrayList<>();
List<Map<String, Object>> checkResultList2 = new ArrayList<>();
Map<String, Object> selectMap= new HashMap<String, Object>(); Map<String, Object> selectMap= new HashMap<String, Object>();
selectMap.put("SHIPREQUESTNAME", shipRequestName); selectMap.put("SHIPREQUESTNAME", shipRequestName);
List<Map<String, Object>> isResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
String isSql = "SELECT\n" + // 如果是成品中心退货
"m.SHIPREQUESTNAME ,\n" + if("07".equals(shipRequestType) || "03".equals(shipRequestType)) {
"SUM(md.SALEOUTQUANTITY) \n" + String sqlCheck =" SELECT * FROM MATERIALRECEIVEREQUEST m WHERE RECEIVEREQUESTNAME =:SHIPREQUESTNAME ";
"FROM\n" + checkResultList1 = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
"MATERIALSHIPREQUEST m\n" +
"LEFT JOIN MATERIALSHIPREQUESTDETAIL md ON\n" +
"md.SHIPREQUESTNAME = m.SHIPREQUESTNAME\n" +
"WHERE\n" +
"m.SHIPREQUESTNAME =:SHIPREQUESTNAME\n" +
"AND md.SALEOUTQUANTITY > 0\n" +
"GROUP BY m.SHIPREQUESTNAME";
List<Map<String, Object>> isList = IDMFrameServiceProxy.getSqlTemplate().queryForList(isSql, selectMap); if(checkResultList1 != null && checkResultList1.size() > 0) {
if (isList != null && isList.size() > 0) { String sql="DELETE FROM MATERIALRECEIVEREQUEST WHERE RECEIVEREQUESTNAME =?";
throw new CustomException("ERROR","单据已存在,并且已存在过账!"); String shipDetailSql="DELETE FROM MATERIALRECEIVEREQUESTDETAIL WHERE RECEIVEREQUESTNAME =?";
}else if (isResultList != null && isResultList.size() > 0) { Object[] obj=new Object[] {shipRequestName};
String shipquestSql="DELETE FROM MATERIALSHIPREQUEST WHERE shiprequestname =?"; IDMFrameServiceProxy.getSqlTemplate().update(sql, obj);
String shipDetailSql="DELETE FROM materialshiprequestdetail WHERE shiprequestname =?"; IDMFrameServiceProxy.getSqlTemplate().update(shipDetailSql, obj);
Object[] obj=new Object[] {shipRequestName}; }
IDMFrameServiceProxy.getSqlTemplate().update(shipquestSql, obj); checkResultList2 = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
IDMFrameServiceProxy.getSqlTemplate().update(shipDetailSql, obj);
}
List<Map<String, Object>> checkResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
if(checkResultList == null || checkResultList.size() == 0) {
CreateMaterialShipRequestInfo createInfo = new CreateMaterialShipRequestInfo();
createInfo.setSiteName(sitename);
createInfo.setShipRequestName(shipRequestName);
createInfo.setShipRequestType(shipRequestType);
// createInfo.setShipRequestDetailType(shiprequesttype);
createInfo.setShipRequestDetailType(moveState);
createInfo.setShipRequestState("Created");
createInfo.setSystemType("ERP");
Map<String, Object> bindMap = new HashMap<String, Object>();
bindMap.put("createUser", createUser);
bindMap.put("createTime", createDate+" "+createTime);
bindMap.put("erpFactory", erpFactory);
bindMap.put("areaName", areaName);
createInfo.setUserColumns(bindMap);
EventInfo eventInfo = new EventInfo();
eventInfo.setEventName("MaterialShipRequestSAPToWMS");
eventInfo.setEventUser(createUser);
MaterialShipRequestServiceProxy.getMaterialShipRequestService().create(eventInfo, createInfo);
}else { }else {
MaterialShipRequestSetEventInfo info = new MaterialShipRequestSetEventInfo(); String sqlCheck =" SELECT * FROM materialshiprequest m WHERE shiprequestname =:SHIPREQUESTNAME ";
MaterialShipRequestKey key = new MaterialShipRequestKey();
key.setSiteName(sitename);
key.setShipRequestName(shipRequestName);
MaterialShipRequest shipRequest=MaterialShipRequestServiceProxy.getMaterialShipRequestService().selectByKey(key); List<Map<String, Object>> isResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
if (!shipRequest.getShipRequestState().equalsIgnoreCase("Created")) { String isSql = "SELECT\n" +
throw new CustomException("ERROR","交货单已确认,禁止修改!"); "m.SHIPREQUESTNAME ,\n" +
"SUM(md.SALEOUTQUANTITY) \n" +
"FROM\n" +
"MATERIALSHIPREQUEST m\n" +
"LEFT JOIN MATERIALSHIPREQUESTDETAIL md ON\n" +
"md.SHIPREQUESTNAME = m.SHIPREQUESTNAME\n" +
"WHERE\n" +
"m.SHIPREQUESTNAME =:SHIPREQUESTNAME\n" +
"AND md.SALEOUTQUANTITY > 0\n" +
"GROUP BY m.SHIPREQUESTNAME";
List<Map<String, Object>> isList = IDMFrameServiceProxy.getSqlTemplate().queryForList(isSql, selectMap);
if (isList != null && isList.size() > 0) {
throw new CustomException("ERROR","单据已存在,并且已存在过账!");
}else if (isResultList != null && isResultList.size() > 0) {
String shipquestSql="DELETE FROM MATERIALSHIPREQUEST WHERE shiprequestname =?";
String shipDetailSql="DELETE FROM materialshiprequestdetail WHERE shiprequestname =?";
Object[] obj=new Object[] {shipRequestName};
IDMFrameServiceProxy.getSqlTemplate().update(shipquestSql, obj);
IDMFrameServiceProxy.getSqlTemplate().update(shipDetailSql, obj);
} }
Map<String, Object> bindMap = new HashMap<String, Object>(); checkResultList2 = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
//bindMap.put("salesGroup", saleGroup); }
bindMap.put("shipRequestType", shipRequestType);
bindMap.put("shipRequestDetailType", moveState);
bindMap.put("createUser", createUser);
bindMap.put("createTime", createTime);
bindMap.put("erpFactory", erpFactory);
bindMap.put("areaName", areaName);
info.setUserColumns(bindMap);
EventInfo eventInfo = new EventInfo(); if(checkResultList2 == null || checkResultList2.size() == 0) {
eventInfo.setEventName("UpdateMaterialShipRequest");
eventInfo.setEventUser(createUser); // 如果是成品中心退货
MaterialShipRequestServiceProxy.getMaterialShipRequestService().setEvent(key, eventInfo, info); if("07".equals(shipRequestType) || "03".equals(shipRequestType)) {
CreateReceiveRequestInfo reCreateInfo = new CreateReceiveRequestInfo();
reCreateInfo.setSiteName(sitename);
reCreateInfo.setReceiveRequestName(shipRequestName);
reCreateInfo.setReceiveRequestType(shipRequestType);
reCreateInfo.setReceiveRequestState("Created");
reCreateInfo.setSupplierNO(createUser);
reCreateInfo.setSystemType("ERP");
Map<String, Object> bindMap = new HashMap<String, Object>();
bindMap.put("createUser", createUser);
bindMap.put("createTime", createDate+" "+createTime);
bindMap.put("erpFactory", erpFactory);
bindMap.put("areaName", areaName);
reCreateInfo.setUserColumns(bindMap);
EventInfo reEventInfo = new EventInfo();
reEventInfo.setEventName("CreateReceiveRequest");
reEventInfo.setEventUser(createUser);
MaterialReceiveRequestServiceProxy.getMaterialReceiveRequestService().create(reEventInfo, reCreateInfo);
}else {
CreateMaterialShipRequestInfo createInfo = new CreateMaterialShipRequestInfo();
createInfo.setSiteName(sitename);
createInfo.setShipRequestName(shipRequestName);
createInfo.setShipRequestType(shipRequestType);
// createInfo.setShipRequestDetailType(shiprequesttype);
createInfo.setShipRequestDetailType(moveState);
createInfo.setShipRequestState("Created");
createInfo.setSystemType("ERP");
Map<String, Object> bindMap = new HashMap<String, Object>();
bindMap.put("createUser", createUser);
bindMap.put("createTime", createDate+" "+createTime);
bindMap.put("erpFactory", erpFactory);
bindMap.put("areaName", areaName);
createInfo.setUserColumns(bindMap);
EventInfo eventInfo = new EventInfo();
eventInfo.setEventName("MaterialShipRequestSAPToWMS");
eventInfo.setEventUser(createUser);
MaterialShipRequestServiceProxy.getMaterialShipRequestService().create(eventInfo, createInfo);
}
}else {
//如果是成品中心退货
if("07".equals(shipRequestType) || "03".equals(shipRequestType)) {
SetEventInfo reInfo = new SetEventInfo();
MaterialReceiveRequestKey key = new MaterialReceiveRequestKey();
key.setSiteName(sitename);
key.setReceiveRequestName(shipRequestName);
MaterialReceiveRequest shipRequest = MaterialReceiveRequestServiceProxy.getMaterialReceiveRequestService().selectByKey(key);
if (!shipRequest.getReceiveRequestState().equalsIgnoreCase("Created")) {
throw new CustomException("ERROR", "交货单已确认,禁止修改!");
}
Map<String, Object> bindMap = new HashMap<String, Object>();
//bindMap.put("salesGroup", saleGroup);
bindMap.put("shipRequestType", shipRequestType);
bindMap.put("shipRequestDetailType", moveState);
bindMap.put("createUser", createUser);
bindMap.put("createTime", createDate+" "+createTime);
bindMap.put("erpFactory", erpFactory);
bindMap.put("areaName", areaName);
reInfo.setUserColumns(bindMap);
EventInfo reEventInfo = new EventInfo();
reEventInfo.setEventName("UpDateMaterialtReceiveRequest");
reEventInfo.setEventUser(createUser);
MaterialReceiveRequestServiceProxy.getMaterialReceiveRequestService().setEvent(key, reEventInfo, reInfo);
}else {
MaterialShipRequestSetEventInfo info = new MaterialShipRequestSetEventInfo();
MaterialShipRequestKey key = new MaterialShipRequestKey();
key.setSiteName(sitename);
key.setShipRequestName(shipRequestName);
MaterialShipRequest shipRequest=MaterialShipRequestServiceProxy.getMaterialShipRequestService().selectByKey(key);
if (!shipRequest.getShipRequestState().equalsIgnoreCase("Created")) {
throw new CustomException("ERROR","交货单已确认,禁止修改!");
}
Map<String, Object> bindMap = new HashMap<String, Object>();
//bindMap.put("salesGroup", saleGroup);
bindMap.put("shipRequestType", shipRequestType);
bindMap.put("shipRequestDetailType", moveState);
bindMap.put("createUser", createUser);
bindMap.put("createTime", createDate+" "+createTime);
bindMap.put("erpFactory", erpFactory);
bindMap.put("areaName", areaName);
info.setUserColumns(bindMap);
EventInfo eventInfo = new EventInfo();
eventInfo.setEventName("UpdateMaterialShipRequest");
eventInfo.setEventUser(createUser);
MaterialShipRequestServiceProxy.getMaterialShipRequestService().setEvent(key, eventInfo, info);
}
} }
String bwart="";//移动类型因领料单下发未发送移动类型故再单独更新,当LGORT2为空时更新为261否则更新为311zd.2024.8.7 String bwart="";//移动类型因领料单下发未发送移动类型故再单独更新,当LGORT2为空时更新为261否则更新为311zd.2024.8.7
if (data.containsKey("ITEM")) { if (data.containsKey("ITEM")) {
@ -1204,19 +1285,39 @@ public class SAPToWMSController {
String xloek= MapUtils.getString(item, "xloek"); // 删除标识 String xloek= MapUtils.getString(item, "xloek"); // 删除标识
MaterialShipRequestDetail mrd =new MaterialShipRequestDetail(); MaterialShipRequestDetail mrd =new MaterialShipRequestDetail();
MaterialShipRequestDetailKey mrdk=new MaterialShipRequestDetailKey(); MaterialShipRequestDetailKey mrdk=new MaterialShipRequestDetailKey();
mrdk.setSiteName(sitename);
mrdk.setShipRequestName(shipRequestName);
mrdk.setShipRequestDetailName(shipRequestDetailName);
try { MaterialReceiveRequestDetail mrdrc = new MaterialReceiveRequestDetail();
mrd=MaterialShipRequestDetailServiceProxy.getMaterialShipRequestDetailService().selectByKey(mrdk); MaterialReceiveRequestDetailKey receiveKey = new MaterialReceiveRequestDetailKey();
if (mrd.getAssignedQuantity()!=0) {
throw new CustomException("ERROR","行项目已在拣配途中!"); if("07".equals(shipRequestType) || "03".equals(shipRequestType)) {
receiveKey.setSiteName(sitename);
receiveKey.setReceiveRequestName(shipRequestName);
receiveKey.setReceiveRequestDetailName(shipRequestDetailName);
try {
mrdrc = ReceiveRequestDetailServiceProxy.getReceiveRequestDetailService().selectByKey(receiveKey);
if (mrdrc.getReceivedQuantity() != 0) {
throw new CustomException("ERROR", "行项目已在拣配途中!");
}
} catch (Exception e) {
// TODO: handle exception
}
}else {
mrdk.setSiteName(sitename);
mrdk.setShipRequestName(shipRequestName);
mrdk.setShipRequestDetailName(shipRequestDetailName);
try {
mrd=MaterialShipRequestDetailServiceProxy.getMaterialShipRequestDetailService().selectByKey(mrdk);
if (mrd.getAssignedQuantity()!=0) {
throw new CustomException("ERROR","行项目已在拣配途中!");
}
} catch (Exception e) {
// TODO: handle exception
} }
} catch (Exception e) {
// TODO: handle exception
} }
@ -1232,32 +1333,37 @@ public class SAPToWMSController {
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= ""; String phase= "";
if(phaseList == null || phaseList.size() == 0) { try {
throw new CustomException("ERROR","料号在基础数据里没找到!"); if(phaseList == null || phaseList.size() == 0) {
}else { throw new CustomException("ERROR","料号在基础数据里没找到!");
phase = phaseList.get(0).get("PHASE") != null ? phaseList.get(0).get("PHASE").toString() : ""; }else {
phase = phaseList.get(0).get("PHASE") != null ? phaseList.get(0).get("PHASE").toString() : "";
}
} catch (Exception e) {
// TODO: handle exception
} }
String sqlItemCheck ="SELECT * FROM materialshiprequestdetail WHERE shiprequestname =:SHIPREQUESTNAME and shiprequestdetailname = :SHIPREQUESTDETAILNAME";
Map<String, Object> selectItemMap= new HashMap<String, Object>(); List<Map<String, Object>> checkItemResultList = new ArrayList<Map<String, Object>>();
selectItemMap.put("SHIPREQUESTNAME", shipRequestName); if("07".equals(shipRequestType) || "03".equals(shipRequestType)) {
selectItemMap.put("SHIPREQUESTDETAILNAME", shipRequestDetailName); String sqlItemCheck ="SELECT * FROM MATERIALRECEIVEREQUESTDETAIL " +
"WHERE RECEIVEREQUESTNAME =:RECEIVEREQUESTNAME and RECEIVEREQUESTDETAILNAME = :RECEIVEREQUESTDETAILNAME";
Map<String, Object> selectItemMap= new HashMap<String, Object>();
selectItemMap.put("RECEIVEREQUESTNAME", shipRequestName);
selectItemMap.put("RECEIVEREQUESTDETAILNAME", shipRequestDetailName);
checkItemResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlItemCheck, selectItemMap);
} else {
String sqlItemCheck ="SELECT * FROM materialshiprequestdetail WHERE shiprequestname =:SHIPREQUESTNAME and shiprequestdetailname = :SHIPREQUESTDETAILNAME";
Map<String, Object> selectItemMap= new HashMap<String, Object>();
selectItemMap.put("SHIPREQUESTNAME", shipRequestName);
selectItemMap.put("SHIPREQUESTDETAILNAME", shipRequestDetailName);
checkItemResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlItemCheck, selectItemMap);
}
List<Map<String, Object>> checkItemResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlItemCheck, selectItemMap);
if (checkItemResultList == null || checkItemResultList.size() == 0) { if (checkItemResultList == null || checkItemResultList.size() == 0) {
CreateMaterialShipRequestDetailInfo createInfo = new CreateMaterialShipRequestDetailInfo();
createInfo.setSiteName(sitename);
createInfo.setShipRequestName(shipRequestName);
createInfo.setShipRequestDetailName(shipRequestDetailName);
createInfo.setMaterialSpecName(materialSpecName);
// 精度丢失处理
BigDecimal bigRequestQuantity = new BigDecimal(requestQuantity.trim());
createInfo.setRequestQuantity(bigRequestQuantity.doubleValue());
createInfo.setAssignedQuantity(0);
Map<String, Object> bindMapItem = new HashMap<String, Object>(); Map<String, Object> bindMapItem = new HashMap<String, Object>();
bindMapItem.put("erpFactory", werks1); // 工厂 bindMapItem.put("erpFactory", werks1); // 工厂
@ -1287,14 +1393,51 @@ public class SAPToWMSController {
bindMapItem.put("causeOfMovement", causeOfMovement); bindMapItem.put("causeOfMovement", causeOfMovement);
bindMapItem.put("goalMaterialSpec", ummat); bindMapItem.put("goalMaterialSpec", ummat);
bindMapItem.put("phase", phase); bindMapItem.put("phase", phase);
bindMapItem.put("saleOutQuantity", 0);
if("07".equals(shipRequestType) || "03".equals(shipRequestType)) {
bindMapItem.put("receiveRequestDetailType", shipRequestType); // 原单号
CreateReceiveRequestDetailInfo createReceiveInfo = new CreateReceiveRequestDetailInfo();
createReceiveInfo.setSiteName(sitename);
createReceiveInfo.setReceiveRequestName(shipRequestName);
createReceiveInfo.setReceiveRequestDetailName(shipRequestDetailName);
createReceiveInfo.setMaterialSpecName(materialSpecName);
BigDecimal bigRequestQuantity2 = new BigDecimal(requestQuantity.trim());
createReceiveInfo.setRequestQuantity(bigRequestQuantity2.doubleValue());
createReceiveInfo.setReceivedQuantity(0);
createReceiveInfo.setUserColumns(bindMapItem);
EventInfo eventReciveInfo = new EventInfo();
eventReciveInfo.setEventUser(createUser);
eventReciveInfo.setEventName("Create");
MaterialReceiveRequestDetailKey key = new MaterialReceiveRequestDetailKey();
key.setSiteName(sitename);
key.setReceiveRequestName(shipRequestName);
key.setReceiveRequestDetailName(shipRequestDetailName);
ReceiveRequestDetailServiceProxy.getReceiveRequestDetailService().create(key,eventReciveInfo, createReceiveInfo);
}else {
CreateMaterialShipRequestDetailInfo createInfo = new CreateMaterialShipRequestDetailInfo();
createInfo.setSiteName(sitename);
createInfo.setShipRequestName(shipRequestName);
createInfo.setShipRequestDetailName(shipRequestDetailName);
createInfo.setMaterialSpecName(materialSpecName);
// 精度丢失处理
BigDecimal bigRequestQuantity = new BigDecimal(requestQuantity.trim());
createInfo.setRequestQuantity(bigRequestQuantity.doubleValue());
createInfo.setAssignedQuantity(0);
createInfo.setUserColumns(bindMapItem);
EventInfo eventInfo = new EventInfo();
eventInfo.setEventTime(TimeStampUtil.getCurrentTimestamp());
eventInfo.setEventUser(createUser);
eventInfo.setEventName("CreateMaterialShipRequest");
MaterialShipRequestDetailServiceProxy.getMaterialShipRequestDetailService().create(createInfo);
}
createInfo.setUserColumns(bindMapItem);
EventInfo eventInfo = new EventInfo();
eventInfo.setEventTime(TimeStampUtil.getCurrentTimestamp());
eventInfo.setEventUser(createUser);
eventInfo.setEventName("CreateMaterialShipRequest");
MaterialShipRequestDetailServiceProxy.getMaterialShipRequestDetailService().create(createInfo);
}else { }else {
NonPrimaryKeyValueInfo nonPrimaryKeyValueInfo = new NonPrimaryKeyValueInfo(); NonPrimaryKeyValueInfo nonPrimaryKeyValueInfo = new NonPrimaryKeyValueInfo();
@ -1329,6 +1472,7 @@ public class SAPToWMSController {
bindMapItem.put("causeOfMovement", causeOfMovement); bindMapItem.put("causeOfMovement", causeOfMovement);
bindMapItem.put("goalMaterialSpec", ummat); bindMapItem.put("goalMaterialSpec", ummat);
bindMapItem.put("phase", phase); bindMapItem.put("phase", phase);
bindMapItem.put("saleOutQuantity", 0);
nonPrimaryKeyValueInfo.setUserColumns(bindMapItem); nonPrimaryKeyValueInfo.setUserColumns(bindMapItem);
EventInfo eventInfo = new EventInfo(); EventInfo eventInfo = new EventInfo();
@ -1336,7 +1480,25 @@ public class SAPToWMSController {
eventInfo.setEventUser(createUser); eventInfo.setEventUser(createUser);
eventInfo.setEventName("updateMaterialShipRequest"); eventInfo.setEventName("updateMaterialShipRequest");
MaterialShipRequestDetailServiceProxy.getMaterialShipRequestDetailService().setEvent(mrdk, nonPrimaryKeyValueInfo);
// 如果是成本退
if("07".equals(shipRequestType) || "03".equals(shipRequestType)) {
com.cim.idm.wmspackage.receiverequestdetail.management.info.SetEventInfo setReciveInfo = new com.cim.idm.wmspackage.receiverequestdetail.management.info.SetEventInfo();
MaterialReceiveRequestDetailKey receiveRequestDetailKey = new MaterialReceiveRequestDetailKey();
MaterialReceiveRequestDetail receiveRequestDetail = new MaterialReceiveRequestDetail();
receiveRequestDetailKey.setReceiveRequestDetailName(shipRequestDetailName);
receiveRequestDetailKey.setReceiveRequestName(shipRequestName);
receiveRequestDetailKey.setSiteName(sitename);
setReciveInfo.setUserColumns(bindMapItem);
ReceiveRequestDetailServiceProxy.getReceiveRequestDetailService().setEvent(receiveRequestDetailKey, eventInfo, setReciveInfo);
}else {
MaterialShipRequestDetailServiceProxy.getMaterialShipRequestDetailService().setEvent(mrdk, nonPrimaryKeyValueInfo);
}
} }
} }
@ -1384,6 +1546,7 @@ public class SAPToWMSController {
IDMFrameServiceProxy.getTransactionManager().rollbackTransaction(); IDMFrameServiceProxy.getTransactionManager().rollbackTransaction();
Map<String, Object> errorReturn = new HashMap<>(); Map<String, Object> errorReturn = new HashMap<>();
errorReturn.put("STATUS", "E"); errorReturn.put("STATUS", "E");
log.info(e.toString());
errorReturn.put("MSGTXT", "预留单/领料单下发失败 " + e.getMessage()); errorReturn.put("MSGTXT", "预留单/领料单下发失败 " + e.getMessage());
errorReturn.put("HEAD", request.getHEAD()); errorReturn.put("HEAD", request.getHEAD());
//errorReturn.put("BODY", request.getBODY()); //errorReturn.put("BODY", request.getBODY());
@ -1524,19 +1687,36 @@ public class SAPToWMSController {
String carFlag = MapUtils.getString(data, "Z_SSEND");//是否需要专车派送 String carFlag = MapUtils.getString(data, "Z_SSEND");//是否需要专车派送
String factoryName = MapUtils.getString(data, "WERKS"); //工厂 String factoryName = MapUtils.getString(data, "WERKS"); //工厂
List<Map<String, Object>> checkResultList = new ArrayList<>(); List<Map<String, Object>> checkResultList = new ArrayList<>();
List<Map<String, Object>> checkResultList2 = new ArrayList<>();
Map<String, Object> selectMap= new HashMap<String, Object>(); Map<String, Object> selectMap= new HashMap<String, Object>();
selectMap.put("SHIPREQUESTNAME", shipRequestName); selectMap.put("SHIPREQUESTNAME", shipRequestName);
// 如果是销售退货 // 如果是销售退货
if("ZLR1".equals(shipRequestType)) { if("ZLR1".equals(shipRequestType)) {
String sqlCheck =" SELECT * FROM MATERIALRECEIVEREQUEST m WHERE RECEIVEREQUESTNAME =:SHIPREQUESTNAME "; String sqlCheck =" SELECT * FROM MATERIALRECEIVEREQUEST m WHERE RECEIVEREQUESTNAME =:SHIPREQUESTNAME ";
checkResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap); checkResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
if(checkResultList != null && checkResultList.size() > 0) {
String sql="DELETE FROM MATERIALRECEIVEREQUEST WHERE RECEIVEREQUESTNAME =?";
Object[] obj=new Object[] {shipRequestName};
IDMFrameServiceProxy.getSqlTemplate().update(sql, obj);
}
checkResultList2 = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
}else { }else {
String sqlCheck =" SELECT * FROM materialshiprequest m WHERE shiprequestname =:SHIPREQUESTNAME "; String sqlCheck =" SELECT * FROM materialshiprequest m WHERE shiprequestname =:SHIPREQUESTNAME ";
checkResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap); checkResultList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
if(checkResultList != null && checkResultList.size() > 0) {
String sql="DELETE FROM materialshiprequest WHERE shiprequestname =?";
Object[] obj=new Object[] {shipRequestName};
IDMFrameServiceProxy.getSqlTemplate().update(sql, obj);
}
checkResultList2 = IDMFrameServiceProxy.getSqlTemplate().queryForList(sqlCheck, selectMap);
} }
if(checkResultList == null || checkResultList.size() == 0) { if(checkResultList2 == null || checkResultList2.size() == 0) {
Map<String, Object> bindMap = new HashMap<String, Object>(); Map<String, Object> bindMap = new HashMap<String, Object>();
bindMap.put("shipRequestDec", shiprequestdec); bindMap.put("shipRequestDec", shiprequestdec);
@ -1547,6 +1727,7 @@ public class SAPToWMSController {
bindMap.put("orderDateStr", orderDate); bindMap.put("orderDateStr", orderDate);
bindMap.put("erpFactory", factoryName); bindMap.put("erpFactory", factoryName);
bindMap.put("planDate", planDate);//计划交货日期 bindMap.put("planDate", planDate);//计划交货日期
//NEW //NEW
bindMap.put("customerOrder", customerOrder);//客户订单号 bindMap.put("customerOrder", customerOrder);//客户订单号
bindMap.put("customerArea", customerArea);//客户大区 bindMap.put("customerArea", customerArea);//客户大区
@ -1582,6 +1763,7 @@ public class SAPToWMSController {
// shipRequestList.add(shipRequestName); // shipRequestList.add(shipRequestName);
createInfo.setSystemType("ERP"); createInfo.setSystemType("ERP");
bindMap.put("createTime", orderDate);//创建日期
createInfo.setUserColumns(bindMap); createInfo.setUserColumns(bindMap);
EventInfo eventInfo = new EventInfo(); EventInfo eventInfo = new EventInfo();
@ -1665,7 +1847,10 @@ public class SAPToWMSController {
EventInfo eventInfo = new EventInfo(); EventInfo eventInfo = new EventInfo();
eventInfo.setEventName("ModifyMaterialShipRequest"); eventInfo.setEventName("ModifyMaterialShipRequest");
eventInfo.setEventUser(createUser); eventInfo.setEventUser(createUser);
MaterialShipRequestServiceProxy.getMaterialShipRequestService().setEvent(key, eventInfo, info); MaterialShipRequestServiceProxy.getMaterialShipRequestService().setEvent(key, eventInfo, info);
} }
} }
@ -1775,6 +1960,7 @@ public class SAPToWMSController {
bindMapItem.put("sendSalesOrder", sendSaleOrder); // 销售订单 bindMapItem.put("sendSalesOrder", sendSaleOrder); // 销售订单
bindMapItem.put("sendSalesOrderDetailNo", sendSaleOrderDetailNo); // 销售订单行号 bindMapItem.put("sendSalesOrderDetailNo", sendSaleOrderDetailNo); // 销售订单行号
bindMapItem.put("sourceNo", sourceNo); // 原单号 bindMapItem.put("sourceNo", sourceNo); // 原单号
bindMapItem.put("saleOutQuantity", 0);
// 根据料号获取阶段 // 根据料号获取阶段
String materialSql = "SELECT m.PHASE FROM MATERIALSPEC m WHERE MATERIALSPECNAME = :MATERIALSPECNAME"; String materialSql = "SELECT m.PHASE FROM MATERIALSPEC m WHERE MATERIALSPECNAME = :MATERIALSPECNAME";
@ -1851,6 +2037,7 @@ public class SAPToWMSController {
bindMapItem.put("sendSalesOrder", sendSaleOrder); // 销售订单 bindMapItem.put("sendSalesOrder", sendSaleOrder); // 销售订单
bindMapItem.put("sendSalesOrderDetailNo", sendSaleOrderDetailNo); // 销售订单行号 bindMapItem.put("sendSalesOrderDetailNo", sendSaleOrderDetailNo); // 销售订单行号
bindMapItem.put("sourceNo", sourceNo); // 原单号 bindMapItem.put("sourceNo", sourceNo); // 原单号
bindMapItem.put("saleOutQuantity", 0);
nonPrimaryKeyValueInfo.setUserColumns(bindMapItem); nonPrimaryKeyValueInfo.setUserColumns(bindMapItem);
setReciveInfo.setUserColumns(bindMapItem); setReciveInfo.setUserColumns(bindMapItem);

View File

@ -14,7 +14,7 @@ public interface FgStockInDao {
//调用接口查询当前Box是否都是在库需要转库传入List<MaterialPacking> //调用接口查询当前Box是否都是在库需要转库传入List<MaterialPacking>
public List<MaterialPacking> getBoxList(@Param("boxList") List<MaterialPacking> boxList,@Param("erpFactory") String erpFactory public List<MaterialPacking> getBoxList(@Param("boxList") List<MaterialPacking> boxList,@Param("erpFactory") String erpFactory
,@Param("erpLocation") String erpLocation,@Param("locationName") String locationName) throws Exception; ,@Param("erpLocation") String erpLocation,@Param("locationName") String locationName,@Param("user") String user) throws Exception;
//批量更新BS_MES_SHIPPED表的ReceiveFlag和ReceiveTime //批量更新BS_MES_SHIPPED表的ReceiveFlag和ReceiveTime
public void updateBsMesShipped(@Param("boxList") List<MaterialPacking> boxList) throws Exception; public void updateBsMesShipped(@Param("boxList") List<MaterialPacking> boxList) throws Exception;

View File

@ -290,7 +290,7 @@ public class ProductIntoServiceImpl implements FGStockInService {
@Transactional @Transactional
public void fgStockInByManul(List<MaterialPacking> boxList, String user, String receiveRequestActNo, String commitDate, String opCode) throws Exception { public void fgStockInByManul(List<MaterialPacking> boxList, String user, String receiveRequestActNo, String commitDate, String opCode) throws Exception {
//调用mybatis查询当前要入库的信息是否是同一类型转库Or入库 //调用mybatis查询当前要入库的信息是否是同一类型转库Or入库
List<MaterialPacking> packingList = fgStockInDao.getBoxList(boxList,boxList.get(0).getErpFactory(),boxList.get(0).getErpLocation(),boxList.get(0).getLocationName()); List<MaterialPacking> packingList = fgStockInDao.getBoxList(boxList,boxList.get(0).getErpFactory(),boxList.get(0).getErpLocation(),boxList.get(0).getLocationName(),user);
if(packingList.size()==0){ if(packingList.size()==0){
throw new Exception("请选择正确的入库信息"); throw new Exception("请选择正确的入库信息");
} }
@ -330,6 +330,10 @@ public class ProductIntoServiceImpl implements FGStockInService {
aimErpLocation, aimLOcationName, user, commitDate); aimErpLocation, aimLOcationName, user, commitDate);
//更新物料凭证和库存状态 //更新物料凭证和库存状态
toSapDao.updateLocationStockState(boxList, "Stocked", undoID,aimErpFactory,aimErpLocation,aimLOcationName,user); toSapDao.updateLocationStockState(boxList, "Stocked", undoID,aimErpFactory,aimErpLocation,aimLOcationName,user);
//
MESServiceImpl mesService=new MESServiceImpl() ;
mesService.CCPRK_deleteMaterialPackingInfo(chargeList);
}else { }else {
// 直接入库 // 直接入库
//封装为Json的字符串 //封装为Json的字符串
@ -353,9 +357,6 @@ public class ProductIntoServiceImpl implements FGStockInService {
toSapDao.saveUnDoInfo( boxList, undoID, commitDate); toSapDao.saveUnDoInfo( boxList, undoID, commitDate);
//更新接口表的标记和 //更新接口表的标记和
fgStockInDao.updateBsMesShipped(boxList); fgStockInDao.updateBsMesShipped(boxList);
MESServiceImpl mesService=new MESServiceImpl() ;
mesService.CCPRK_deleteMaterialPackingInfo(chargeList);
} }

View File

@ -167,6 +167,7 @@
#{name} #{name}
</foreach> </foreach>
AND m.SITENAME = #{siteName} AND m.SITENAME = #{siteName}
AND m.DELETEDETAILFLAG !='L'
AND m3.IS_BATCH != 'N' AND m3.IS_BATCH != 'N'
<!-- AND m2.RECEIVEREQUESTTYPE IN--> <!-- AND m2.RECEIVEREQUESTTYPE IN-->
<!-- <foreach item="type" index="index" collection="typeList" open="(" separator="," close=")">--> <!-- <foreach item="type" index="index" collection="typeList" open="(" separator="," close=")">-->
@ -235,10 +236,10 @@
</foreach> </foreach>
AND m.SITENAME = #{siteName} AND m.SITENAME = #{siteName}
AND (m.REQUESTQUANTITY - m.RECEIVEDQUANTITY) > 0 AND (m.REQUESTQUANTITY - m.RECEIVEDQUANTITY) > 0
AND m2.RECEIVEREQUESTTYPE IN <!-- AND m2.RECEIVEREQUESTTYPE IN-->
<foreach item="type" index="index" collection="typeList" open="(" separator="," close=")"> <!-- <foreach item="type" index="index" collection="typeList" open="(" separator="," close=")">-->
#{type} <!-- #{type}-->
</foreach> <!-- </foreach>-->
AND (m2.RETURNFLAG IS NULL OR m2.RETURNFLAG != 'Y') AND (m2.RETURNFLAG IS NULL OR m2.RETURNFLAG != 'Y')
AND (m3.IS_BATCH IS NULL OR m3.IS_BATCH != 'Y') AND (m3.IS_BATCH IS NULL OR m3.IS_BATCH != 'Y')
</select> </select>

View File

@ -30,6 +30,8 @@
'SDK' siteName, 'SDK' siteName,
'Released' PackingState, 'Released' PackingState,
'Created' stockState, 'Created' stockState,
'Created' OldStockState,
'N' HoldState,
T.DURABLETYPE durableType, T.DURABLETYPE durableType,
#{erpFactory} ERPFactory, #{erpFactory} ERPFactory,
#{erpLocation} ERPLOCATION, #{erpLocation} ERPLOCATION,
@ -38,6 +40,7 @@
NVL(T.MAKEDATE, SYSDATE ) MAKEDATE , NVL(T.MAKEDATE, SYSDATE ) MAKEDATE ,
NVL(T.MAKEDATE, SYSDATE ) + NVL(M3.EXPIRATIONDAY, '9999') expiringDate, NVL(T.MAKEDATE, SYSDATE ) + NVL(M3.EXPIRATIONDAY, '9999') expiringDate,
SYSDATE ReceiveTime, SYSDATE ReceiveTime,
#{user} ReceiveUser,
T.REQUESTNAME productOrder, T.REQUESTNAME productOrder,
T.CAREER_ASSISTANCE , T.CAREER_ASSISTANCE ,
M3.MATERIALSPECTYPE , M3.MATERIALSPECTYPE ,
@ -56,6 +59,9 @@
M3.MATERIALTYPE , M3.MATERIALTYPE ,
T.PHASE, T.PHASE,
T.GXID, T.GXID,
T.CHARGE,
T.TRUEGG,
T.MJPC,
T.MATERIALSPECTYPE T.MATERIALSPECTYPE
FROM FROM
BS_MES_SHIPPED T BS_MES_SHIPPED T