Compare commits

..

2 Commits

7 changed files with 18 additions and 13 deletions

View File

@ -583,8 +583,8 @@ public class MESServiceImpl implements MESService{
jsonObject.put("qrCode", list.get(i).get("MATERIALPACKINGNAME"));
jsonObject.put("consumableSpecName", list.get(i).get("MATERIALSPECNAME"));
jsonObject.put("consumableType", list.get(i).get("MATERIALTYPE"));
String product = list.get(i).get("WO").toString();
jsonObject.put("productRequestName", product.substring(4));
String product = list.get(i).get("WO") == null ? "" : list.get(i).get("WO").toString();
jsonObject.put("productRequestName", product.isEmpty() ? "" : product.substring(4));
jsonObject.put("expiringDate", list.get(i).get("EXPIRINGDATE"));
jsonObject.put("productName", list.get(i).get("DESCRIPTION"));
jsonObject.put("productStage", list.get(i).get("PHASE"));

View File

@ -1955,7 +1955,7 @@ public class InvoiceController {
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
}
// }
} else if ("01".equals(shipRequestType) || "02".equals(shipRequestType)) {//领料
} else if ("01".equals(shipRequestType) || "02".equals(shipRequestType) || "06".equals(shipRequestType)) {//领料
if (dy0 < 0) {//只能超发一个
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
}
@ -2139,7 +2139,7 @@ public class InvoiceController {
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
}
// }
} else if ("01".equals(shipRequestType)) {//领料
} else if ("01".equals(shipRequestType) || "02".equals(shipRequestType) || "06".equals(shipRequestType)) {//领料
if (dy0 < 0) {//只能超发一个
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
}

View File

@ -280,7 +280,7 @@ public class PurchaseReturnController {
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
}
// }
} else if ("01".equals(shipRequestType) || "02".equals(shipRequestType)) {//领料
} else if ("01".equals(shipRequestType) || "02".equals(shipRequestType) || "06".equals(shipRequestType)) {//领料
if (dy0 < 0) {//只能超发一个
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
}

View File

@ -354,7 +354,7 @@ public class SaleOutController {
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
}
// }
} else if ("01".equals(shipRequestType) || "02".equals(shipRequestType)) {//领料
} else if ("01".equals(shipRequestType) || "02".equals(shipRequestType) || "06".equals(shipRequestType)) {//领料 06成品中心领料
if ((allQty.subtract(minusQty)).compareTo(minQty)>0) {//只能超发一个
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
}
@ -567,7 +567,7 @@ public class SaleOutController {
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
}
// }
} else if ("01".equals(shipRequestType) || "02".equals(shipRequestType)) {//领料
} else if ("01".equals(shipRequestType) || "02".equals(shipRequestType) || "06".equals(shipRequestType)) {//领料
if (dy0 < 0) {//只能超发一个
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
}

View File

@ -569,7 +569,7 @@ public class InvoiceServiceImpl implements InvoiceService {
case "06"://成本中心领料
// billCode=toSAPService.orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList);
billCode=orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList);
// billCode=orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList,commitDate);
//抛送MES数据
untils.sendMaterialInfoToMES_NEW(shipRequestName, "", materialPackingKeyList);
//更新MES管芯数据
@ -2271,7 +2271,7 @@ public class InvoiceServiceImpl implements InvoiceService {
return undoId;
}
public String orderStockOut(String shipRequestName, String siteName, String user,List<String> boxList) throws Exception {
public String orderStockOut(String shipRequestName, String siteName, String user,List<String> boxList,String commitDate) throws Exception {
String rcode;
String undoId = "";
@ -2352,10 +2352,15 @@ public class InvoiceServiceImpl implements InvoiceService {
*/
body.put("ITEM", itemArray);
body.put("ITEMID", uniqueID);
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyyMMdd");
Date date = inputFormat.parse(commitDate);
String outputDate = outputFormat.format(date);
//过账日期
body.put("BUDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
body.put("BUDAT",outputDate);
//凭证日期
body.put("BLDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
body.put("BLDAT", outputDate);
//凭证抬头文本
body.put("BKTXT", uniqueID);
//用户名

View File

@ -671,7 +671,7 @@ public void SaveUnDoInfo_ForSap(List<String> list, String undoid, EventInfo mak
// 定义SQL查询语句用于获取物料接收位置和接收工厂信息
String sql="SELECT m.ERPRECEIVELOCATION,m.ERPRECEIVEFACTORY FROM MATERIALSHIPREQUEST a,MATERIALSHIPREQUESTDETAIL m \r\n" +
" WHERE m.SHIPREQUESTNAME =:SHIPREQUESTNAME and m.SHIPREQUESTNAME=a.SHIPREQUESTNAME "
+ " AND a.SHIPREQUESTDETAILTYPE in('311','261')";
+ " AND a.SHIPREQUESTDETAILTYPE in('311','261','201')";
// 创建参数映射用于执行SQL查询
Map<String, Object> bp=new HashMap<>();
bp.put("SHIPREQUESTNAME", invoiceNo);

View File

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