fix:修改超发管控
This commit is contained in:
parent
e0b8e12f43
commit
6a08a66e08
@ -30,7 +30,7 @@ public class QMSServiceImpl implements QMSService{
|
|||||||
@Autowired
|
@Autowired
|
||||||
QMSHttpUtil qmsHttpUtil;
|
QMSHttpUtil qmsHttpUtil;
|
||||||
|
|
||||||
private static String baseUrl = "http://192.168.1.72:9913";
|
private static String baseUrl = "http://172.22.10.221:9913";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检信息发送QMS
|
* 质检信息发送QMS
|
||||||
|
@ -353,8 +353,8 @@ public class ToSAPServiceImpl {
|
|||||||
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)) {
|
||||||
undoId2 = returnJsonObject.get("MBLNR") == null ? "" : returnJsonObject.get("MBLNR").toString()
|
undoId2 = returnJsonObject.get("MBLNR1") == null ? "" : returnJsonObject.get("MBLNR1").toString()
|
||||||
+"_"+returnJsonObject.get("MJAHR") == null ? "" : returnJsonObject.get("MJAHR").toString();//将物料凭证号与凭证年度拼在一起
|
+"_"+returnJsonObject.get("MJAHR1") == null ? "" : returnJsonObject.get("MJAHR1").toString();//将物料凭证号与凭证年度拼在一起
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("WMS请求SAP异常:" + e.getMessage(), e);
|
log.error("WMS请求SAP异常:" + e.getMessage(), e);
|
||||||
@ -375,11 +375,10 @@ public class ToSAPServiceImpl {
|
|||||||
erplog.setResultCode(rcode);
|
erplog.setResultCode(rcode);
|
||||||
MessageLogUtil.writeMessageLog(erplog);
|
MessageLogUtil.writeMessageLog(erplog);
|
||||||
}
|
}
|
||||||
// if (!"S".equals(rcode)) {
|
if (!"S".equals(rcode)) {
|
||||||
// throw new RuntimeException("SAP返回" + rmsg);
|
throw new RuntimeException("SAP返回" + rmsg);
|
||||||
// }
|
}
|
||||||
// return undoId2;
|
return undoId2;
|
||||||
return "5000000755";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String FGStockIn2(String RECEIVEACTNO, String user) throws Exception {
|
public String FGStockIn2(String RECEIVEACTNO, String user) throws Exception {
|
||||||
|
@ -2091,13 +2091,13 @@ public class InvoiceController {
|
|||||||
"WHERE\r\n" +
|
"WHERE\r\n" +
|
||||||
" m.SHIPREQUESTNAME = :SHIPREQUESTNAME\r\n" +
|
" m.SHIPREQUESTNAME = :SHIPREQUESTNAME\r\n" +
|
||||||
" AND t.MATERIALSPECNAME = :MATERIALSPECNAME\r\n" +
|
" AND t.MATERIALSPECNAME = :MATERIALSPECNAME\r\n" +
|
||||||
" AND (:SDK_ID IS NULL\r\n" +
|
// " AND (:SDK_ID IS NULL\r\n" +
|
||||||
" OR t.SDK_ID = :SDK_ID)\r\n" +
|
// " OR t.SDK_ID = :SDK_ID)\r\n" +
|
||||||
" AND (:PHASE IS NULL\r\n" +
|
// " AND (:PHASE IS NULL\r\n" +
|
||||||
" OR t.PHASE = :PHASE)\r\n" +
|
// " OR t.PHASE = :PHASE)\r\n" +
|
||||||
" GROUP BY m.SHIPREQUESTTYPE ,\r\n" +
|
" GROUP BY m.SHIPREQUESTTYPE ,\r\n" +
|
||||||
" m.SHIPREQUESTDETAILTYPE,\r\n" +
|
" m.SHIPREQUESTDETAILTYPE,\r\n" +
|
||||||
" t.MATERIALSPECNAME,t.SDK_ID,t.PHASE\r\n" +
|
" t.MATERIALSPECNAME, t.SDK_ID,t.PHASE\r\n" +
|
||||||
"ORDER BY\r\n" +
|
"ORDER BY\r\n" +
|
||||||
" t.MATERIALSPECNAME ,\r\n" +
|
" t.MATERIALSPECNAME ,\r\n" +
|
||||||
" t.SDK_ID,\r\n" +
|
" t.SDK_ID,\r\n" +
|
||||||
@ -2105,8 +2105,8 @@ public class InvoiceController {
|
|||||||
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("MATERIALSPECNAME", materialSpecName);
|
hashMap.put("MATERIALSPECNAME", materialSpecName);
|
||||||
hashMap.put("SDK_ID", sdk_id);
|
// hashMap.put("SDK_ID", sdk_id);
|
||||||
hashMap.put("PHASE", phase);
|
// hashMap.put("PHASE", phase);
|
||||||
List<Map<String, Object>> queryForList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql, hashMap);
|
List<Map<String, Object>> queryForList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql, hashMap);
|
||||||
if(Objects.isNull(queryForList) || queryForList.isEmpty()) {
|
if(Objects.isNull(queryForList) || queryForList.isEmpty()) {
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("条码与单据无法匹配!");
|
return AjaxResult.me().setSuccess(false).setMessage("条码与单据无法匹配!");
|
||||||
@ -2123,25 +2123,27 @@ public class InvoiceController {
|
|||||||
com.cim.idm.wmspackage.materialpacking.management.data.MaterialPacking selectByKey = MaterialPackingServiceProxy.getMaterialPackingService().selectByKey(materialPackingKey);
|
com.cim.idm.wmspackage.materialpacking.management.data.MaterialPacking selectByKey = MaterialPackingServiceProxy.getMaterialPackingService().selectByKey(materialPackingKey);
|
||||||
if ("Assign".equals(type)) {
|
if ("Assign".equals(type)) {
|
||||||
System.out.println("4Y".equals(shipRequestType) + "*****************");
|
System.out.println("4Y".equals(shipRequestType) + "*****************");
|
||||||
if ("4Y".equals(shipRequestType)) {//调拨单
|
if ("NLCC".equals(shipRequestType)) {//调拨单
|
||||||
if ( "4Y-Cxx-03".equals(shipRequestDetailType)) {
|
// if ( "4Y-Cxx-03".equals(shipRequestDetailType)) {
|
||||||
|
if (dy0 < 0) {//只能超发一个
|
||||||
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
} else if ("01".equals(shipRequestType)) {//领料
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ("BLSQ4K".equals(shipRequestType)) {//领料
|
// else if ("CKSQ4I".equals(shipRequestType)) { //其他出库
|
||||||
|
// if (dy0 < 0) {//只能超发一个
|
||||||
|
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
else if ("OEM".equals(shipRequestType)) { //委外出库
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
}
|
}
|
||||||
} else if ("CKSQ4I".equals(shipRequestType)) { //其他出库
|
} else if (shipRequestType.contains("ZLF")) {
|
||||||
if (dy0 < 0) {//只能超发一个
|
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
|
||||||
}
|
|
||||||
} else if ("OEM".equals(shipRequestType)) { //委外出库
|
|
||||||
if (dy0 < 0) {//只能超发一个
|
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
|
||||||
}
|
|
||||||
} else if ("4C".equals(shipRequestType)) {
|
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("销售不允许超发!");
|
return AjaxResult.me().setSuccess(false).setMessage("销售不允许超发!");
|
||||||
}
|
}
|
||||||
|
@ -271,30 +271,40 @@ public class PurchaseReturnController {
|
|||||||
com.cim.idm.wmspackage.materialpacking.management.data.MaterialPacking selectByKey = MaterialPackingServiceProxy.getMaterialPackingService().selectByKey(materialPackingKey);
|
com.cim.idm.wmspackage.materialpacking.management.data.MaterialPacking selectByKey = MaterialPackingServiceProxy.getMaterialPackingService().selectByKey(materialPackingKey);
|
||||||
if ("Assign".equals(type)) {
|
if ("Assign".equals(type)) {
|
||||||
System.out.println("45".equals(shipRequestType) + "*****************");
|
System.out.println("45".equals(shipRequestType) + "*****************");
|
||||||
|
// if (dy0 < 0) {//只能超发一个
|
||||||
|
// return AjaxResult.me().setSuccess(false).setMessage("采购退货不允许超发!");
|
||||||
|
// }
|
||||||
|
if ("NLCC".equals(shipRequestType)) {//调拨单
|
||||||
|
// if ( "4Y-Cxx-03".equals(shipRequestDetailType)) {
|
||||||
|
if (dy0 < 0) {//只能超发一个
|
||||||
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
} else if ("01".equals(shipRequestType)) {//领料
|
||||||
|
if (dy0 < 0) {//只能超发一个
|
||||||
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// else if ("CKSQ4I".equals(shipRequestType)) { //其他出库
|
||||||
|
// if (dy0 < 0) {//只能超发一个
|
||||||
|
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
else if ("OEM".equals(shipRequestType)) { //委外出库
|
||||||
|
if (dy0 < 0) {//只能超发一个
|
||||||
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
|
}
|
||||||
|
} else if (shipRequestType.contains("ZLF")) {
|
||||||
|
if (dy0 < 0) {//只能超发一个
|
||||||
|
return AjaxResult.me().setSuccess(false).setMessage("销售不允许超发!");
|
||||||
|
}
|
||||||
|
} else if ("Z008".equals(shipRequestType)) {
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("采购退货不允许超发!");
|
return AjaxResult.me().setSuccess(false).setMessage("采购退货不允许超发!");
|
||||||
}
|
}
|
||||||
// if ("4Y".equals(shipRequestType)) {//调拨单
|
}else {
|
||||||
// if ( "4Y-Cxx-03".equals(shipRequestDetailType)) {
|
return AjaxResult.me().setSuccess(false).setMessage("单据类型不正确!");
|
||||||
// if (dy0 < 0) {//只能超发一个
|
}
|
||||||
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } else if ("BLSQ4K".equals(shipRequestType)) {//领料
|
|
||||||
// if (dy0 < 0) {//只能超发一个
|
|
||||||
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
|
||||||
// }
|
|
||||||
// } else if ("CKSQ4I".equals(shipRequestType)) { //其他出库
|
|
||||||
// if (dy0 < 0) {//只能超发一个
|
|
||||||
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
|
||||||
// }
|
|
||||||
// } else if ("4C".equals(shipRequestType)) {
|
|
||||||
// if (dy0 < 0) {//只能超发一个
|
|
||||||
// return AjaxResult.me().setSuccess(false).setMessage("销售不允许超发!");
|
|
||||||
// }
|
|
||||||
// }else {
|
|
||||||
// return AjaxResult.me().setSuccess(false).setMessage("单据类型不正确!");
|
|
||||||
// }
|
|
||||||
} else if ("Dessign".equals(type)) {
|
} else if ("Dessign".equals(type)) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -395,8 +395,8 @@ public class QMSController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 将订单的质检结果传给SAP
|
// 将订单的质检结果传给SAP
|
||||||
// String undoId = toSAPService.iqcResultFeekback(sapBoxList,siteName,commonNumber,materialCode,pqcResult,pqcResultDate,user,
|
String undoId = toSAPService.iqcResultFeekback(sapBoxList,siteName,commonNumber,materialCode,pqcResult,pqcResultDate,user,
|
||||||
// exceptionHandling,specialState);
|
exceptionHandling,specialState);
|
||||||
|
|
||||||
if(mpList.size()>0)
|
if(mpList.size()>0)
|
||||||
{
|
{
|
||||||
|
@ -520,22 +520,28 @@ public class SaleOutController {
|
|||||||
//"BLSQ4K".equals(shipRequestType) || "4Y".equals(shipRequestType) || "CKSQ4I".equals(shipRequestType)
|
//"BLSQ4K".equals(shipRequestType) || "4Y".equals(shipRequestType) || "CKSQ4I".equals(shipRequestType)
|
||||||
int dy0 = FminusQty.compareTo(Fzero);
|
int dy0 = FminusQty.compareTo(Fzero);
|
||||||
|
|
||||||
if ("4Y".equals(shipRequestType)) {//调拨单
|
if ("NLCC".equals(shipRequestType)) {//调拨单
|
||||||
if ( "4Y-Cxx-03".equals(shipRequestDetailType)) {
|
// if ( "4Y-Cxx-03".equals(shipRequestDetailType)) {
|
||||||
|
if (dy0 < 0) {//只能超发一个
|
||||||
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
} else if ("01".equals(shipRequestType)) {//领料
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ("BLSQ4K".equals(shipRequestType)) {//领料
|
// else if ("CKSQ4I".equals(shipRequestType)) { //其他出库
|
||||||
|
// if (dy0 < 0) {//只能超发一个
|
||||||
|
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
else if ("OEM".equals(shipRequestType)) { //委外出库
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
}
|
}
|
||||||
} else if ("CKSQ4I".equals(shipRequestType)) { //其他出库
|
} else if (shipRequestType.contains("ZLF")) {
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
|
||||||
}
|
|
||||||
} else if ("4C".equals(shipRequestType)) {
|
|
||||||
if (dy0 <= 0) {//只能超发一个
|
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("销售不允许超发!");
|
return AjaxResult.me().setSuccess(false).setMessage("销售不允许超发!");
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user