fix:添加无来源转库车间
This commit is contained in:
parent
24c0270ea7
commit
072bd7669b
@ -63,6 +63,8 @@ public class MaterialReceiveRequestDetail extends FieldAccessor implements DataI
|
||||
private String businessDivision; // 事业部zzsyb
|
||||
|
||||
private String phase;
|
||||
private String remark; // 备注
|
||||
|
||||
|
||||
|
||||
public String getLocationName() {
|
||||
@ -548,4 +550,12 @@ public class MaterialReceiveRequestDetail extends FieldAccessor implements DataI
|
||||
public void setPhase(String phase) {
|
||||
this.phase = phase;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
}
|
||||
|
@ -97,8 +97,10 @@ public class MaterialUndoController {
|
||||
materialUndoServiceImpl.orderUndo(undoId, userId,commitDate);
|
||||
} else if (inv_TYPE.contains("ZLF")) { // 销售发货出库
|
||||
materialUndoServiceImpl.orderUndo(undoId, userId,commitDate);
|
||||
} else if (inv_TYPE.contains("无来源转库")) { // 无来源转库
|
||||
} else if (lastEventName.contains("无来源转库")) { // 备货出库转现场仓,无来源转库
|
||||
materialUndoServiceImpl.wlyZkUndo(undoId, userId,preErpLocation,preLocationName);
|
||||
} else if (lastEventName.contains("生产领料出库")) { // 生产领料直接出库
|
||||
materialUndoServiceImpl.ckUndo(undoId, userId);
|
||||
} else {
|
||||
return AjaxResult.me().setSuccess(false).setMessage("单据类型不支持冲销");
|
||||
}
|
||||
|
@ -1321,7 +1321,7 @@ public class SAPToWMSController {
|
||||
String lgort1 = MapUtils.getString(item, "LGORT1"); // 发出仓库
|
||||
String werks2 = MapUtils.getString(item, "WERKS2"); // 接收工厂
|
||||
String lgort2 = MapUtils.getString(item, "LGORT2"); // 接收仓库
|
||||
|
||||
|
||||
if(StringUtils.isEmpty(moveState))
|
||||
{
|
||||
if(StringUtils.isEmpty(lgort2))
|
||||
@ -1348,6 +1348,7 @@ public class SAPToWMSController {
|
||||
String xloek= MapUtils.getString(item, "xloek"); // 删除标识
|
||||
String auart= MapUtils.getString(item, "AUART"); // 接收生产订单类型 返工ZP05 复卷ZP01
|
||||
String lifnr= MapUtils.getString(item, "LIFNR"); // 委外
|
||||
String msgtxt = MapUtils.getString(item, "MSGTXT"); // 备注
|
||||
|
||||
|
||||
MaterialShipRequestDetail mrd =new MaterialShipRequestDetail();
|
||||
@ -1460,6 +1461,7 @@ public class SAPToWMSController {
|
||||
bindMapItem.put("saleOutQuantity", 0);
|
||||
bindMapItem.put("auart", auart);
|
||||
bindMapItem.put("deliveryAddress", lifnr);
|
||||
bindMapItem.put("remark", msgtxt);
|
||||
|
||||
|
||||
|
||||
@ -1544,6 +1546,7 @@ public class SAPToWMSController {
|
||||
bindMapItem.put("phase", phase);
|
||||
bindMapItem.put("saleOutQuantity", 0);
|
||||
bindMapItem.put("auart", auart);
|
||||
bindMapItem.put("remark", msgtxt);
|
||||
|
||||
nonPrimaryKeyValueInfo.setUserColumns(bindMapItem);
|
||||
EventInfo eventInfo = new EventInfo();
|
||||
|
@ -562,7 +562,7 @@ public class InvoiceServiceImpl implements InvoiceService {
|
||||
//抛送MES数据
|
||||
untils.sendMaterialInfoToMES_NEW2(shipRequestName, "", materialPackingKeyList,billCode,eventUser);
|
||||
|
||||
WlySaveUnDoInfo( billCode,commitDate);
|
||||
WlySaveUnDoInfo( materialPackingKeyList,billCode,commitDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -956,7 +956,18 @@ public class InvoiceServiceImpl implements InvoiceService {
|
||||
return undoId;
|
||||
}
|
||||
|
||||
public void WlySaveUnDoInfo( String undoid,String commitDate) {
|
||||
public void WlySaveUnDoInfo( List<String> list,String undoid,String commitDate) {
|
||||
|
||||
// 更新事件名
|
||||
// 此SQL语句用于更新物料包装的最后事件名称、评论和时间
|
||||
String sqlu="UPDATE MATERIALPACKING m SET m.LASTEVENTNAME=:LASTEVENTNAME,m.LASTEVENTCOMMENT =:LASTEVENTCOMMENT,m.LASTEVENTTIME =SYSDATE \r\n" +
|
||||
" WHERE m.SITENAME =:SITENAME AND m.MATERIALPACKINGNAME in (:BOXLIST)";
|
||||
Map<String,Object> bpu = new HashMap<String,Object> ();
|
||||
bpu.put("LASTEVENTNAME", makeEventInfo.getEventName());
|
||||
bpu.put("LASTEVENTCOMMENT", makeEventInfo.getEventComment());
|
||||
bpu.put("SITENAME", "SDK");
|
||||
bpu.put("BOXLIST", list);
|
||||
IDMFrameServiceProxy.getSqlTemplate().update(sqlu, bpu);
|
||||
|
||||
String insertUnDOMaterialPackingInfo = "insert into BS_MATERIALPACKINGUNDOINFO (unDoID,preundoid,UNDODETAILNAME,undoidstate,UNDOIDDATE,"
|
||||
+ "SITENAME, MATERIALPACKINGNAME, MATERIALPACKINGTYPE, CONTENTMATERIALTYPE,"
|
||||
@ -3428,6 +3439,7 @@ public class InvoiceServiceImpl implements InvoiceService {
|
||||
" t.MATERIALSPECNAME,\r\n" +
|
||||
" t.ERPFACTORY,\r\n" +
|
||||
" t.ERPLOCATION,\r\n" +
|
||||
" t.LOCATIONNAME,\r\n" +
|
||||
" m2.SHIPREQUESTDETAILTYPE,\r\n" +
|
||||
" t.UNIT,\r\n" +
|
||||
" m1.COSTCENTER,\r\n" +
|
||||
@ -3497,8 +3509,8 @@ public class InvoiceServiceImpl implements InvoiceService {
|
||||
}
|
||||
makeEventInfo.setEventName("备货出库无来源转库");
|
||||
makeEventInfo.setEventComment("备货出库无来源转库");
|
||||
// WlySaveUnDoInfo( billCode,commitDate);
|
||||
untils.SaveUnDoInfo_ForSap(materialPackingKeyList, billCode, makeEventInfo);
|
||||
WlySaveUnDoInfo( materialPackingKeyList,billCode,commitDate);
|
||||
// untils.SaveUnDoInfo_ForSap(materialPackingKeyList, billCode, makeEventInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3521,7 +3533,8 @@ public class InvoiceServiceImpl implements InvoiceService {
|
||||
throw new GlobalException("发送到mes失败!");
|
||||
}
|
||||
}
|
||||
|
||||
makeEventInfo.setEventName("备货出库生产领料出库");
|
||||
makeEventInfo.setEventComment("备货出库生产领料出库");
|
||||
untils.SaveUnDoInfo_ForSap(materialPackingKeyList, billCode, makeEventInfo);
|
||||
}
|
||||
}
|
||||
|
@ -287,7 +287,6 @@ public class MaterialUndoServiceImpl implements IMaterialUndoService {
|
||||
"GROUP BY RECEIVEREQUESTNAME,RECEIVEREQUESTDETAILNAME) M ON (T.SHIPREQUESTNAME = M.RECEIVEREQUESTNAME AND T.SHIPREQUESTDETAILNAME = M.RECEIVEREQUESTDETAILNAME)\r\n" +
|
||||
"WHEN MATCHED THEN UPDATE SET T.ASSIGNEDQUANTITY = T.ASSIGNEDQUANTITY - M.QTY,T.SALEOUTQUANTITY = T.SALEOUTQUANTITY - M.QTY";
|
||||
|
||||
|
||||
//根据当前的出库数量更新saleQty
|
||||
// String sql = "SELECT M.RECEIVEREQUESTNAME,M.RECEIVEREQUESTDETAILNAME,M.QTY FROM MATERIALPACKINGSUB M WHERE M.MATERIALPACKINGNAME = :MATERIALPACKINGNAME\r\n" +
|
||||
// "UNION \r\n" +
|
||||
@ -359,6 +358,12 @@ public class MaterialUndoServiceImpl implements IMaterialUndoService {
|
||||
|
||||
for (MaterialPacking materialPacking : list) {
|
||||
Map<String, Object> hashMap = new HashMap<String, Object> ();
|
||||
if(preLocationName == null) {
|
||||
preLocationName = "";
|
||||
}
|
||||
if(preErpLocation == null) {
|
||||
preErpLocation = "";
|
||||
}
|
||||
hashMap.put("erpLocation", preErpLocation);
|
||||
hashMap.put("locationName", preLocationName);
|
||||
// hashMap.put("preErpLocation", materialPacking.getErpLocation());
|
||||
@ -381,7 +386,7 @@ public class MaterialUndoServiceImpl implements IMaterialUndoService {
|
||||
public void wlyZkUndo (String undoId, String user,String preErpLocation,String preLocationName) throws Exception {
|
||||
|
||||
String billCode = toSAPService.cancelShipInter(undoId, user);
|
||||
if (billCode == null) {
|
||||
if (billCode == null || billCode.equals("")) {
|
||||
throw new GlobalException("报送ERP失败,请联系IT处理!");
|
||||
}
|
||||
|
||||
@ -392,9 +397,15 @@ public class MaterialUndoServiceImpl implements IMaterialUndoService {
|
||||
List<MaterialPacking> list = MaterialPackingServiceProxy.getMaterialPackingService().select(condition, bindSet);
|
||||
SetEventInfo setEventInfo = new SetEventInfo();
|
||||
|
||||
|
||||
// 新加
|
||||
for (MaterialPacking materialPacking : list) {
|
||||
Map<String, Object> hashMap = new HashMap<String, Object> ();
|
||||
if(preLocationName == null) {
|
||||
preLocationName = "";
|
||||
}
|
||||
if(preErpLocation == null) {
|
||||
preErpLocation = "";
|
||||
}
|
||||
hashMap.put("erpLocation", preErpLocation);
|
||||
hashMap.put("locationName", preLocationName);
|
||||
// hashMap.put("preErpLocation", materialPacking.getErpLocation());
|
||||
|
Loading…
x
Reference in New Issue
Block a user