Compare commits
No commits in common. "eab3db5fdbfdfed68247b5c41941f13155fb6da7" and "5cd5ee8d079538678cdaf07914c74e22c77ae0b6" have entirely different histories.
eab3db5fdb
...
5cd5ee8d07
@ -371,7 +371,7 @@ public class ToSAPServiceImpl {
|
|||||||
ErpMessageLog erplog = new ErpMessageLog();
|
ErpMessageLog erplog = new ErpMessageLog();
|
||||||
erplog.setEventUser(user);
|
erplog.setEventUser(user);
|
||||||
erplog.setServerName("WmsToSAP");
|
erplog.setServerName("WmsToSAP");
|
||||||
erplog.setEventName("冲销");
|
erplog.setEventName("MatailInReverse取消入库冲销");
|
||||||
erplog.setInterfaceTime(TimeStampUtil.getCurrentTime(TimeStampUtil.FORMAT_DEFAULT));
|
erplog.setInterfaceTime(TimeStampUtil.getCurrentTime(TimeStampUtil.FORMAT_DEFAULT));
|
||||||
// erplog.setMessageId(undoId);
|
// erplog.setMessageId(undoId);
|
||||||
erplog.setMessageId(undoId);
|
erplog.setMessageId(undoId);
|
||||||
|
@ -1965,7 +1965,7 @@ public class InvoiceController {
|
|||||||
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
else if ("OEM".equals(shipRequestType) || "08".equals(shipRequestType)) { //委外出库
|
else if ("OEM".equals(shipRequestType)) { //委外出库
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
}
|
}
|
||||||
@ -2149,7 +2149,7 @@ public class InvoiceController {
|
|||||||
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
else if ("OEM".equals(shipRequestType) || "08".equals(shipRequestType)) { //委外出库
|
else if ("OEM".equals(shipRequestType)) { //委外出库
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
}
|
}
|
||||||
@ -2319,7 +2319,7 @@ public class InvoiceController {
|
|||||||
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
else if ("OEM".equals(shipRequestType) || "08".equals(shipRequestType)) { //委外出库
|
else if ("OEM".equals(shipRequestType)) { //委外出库
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ public class PurchaseReturnController {
|
|||||||
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
else if ("OEM".equals(shipRequestType) || "08".equals(shipRequestType)) { //委外出库
|
else if ("OEM".equals(shipRequestType)) { //委外出库
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
}
|
}
|
||||||
|
@ -1292,7 +1292,7 @@ public class SAPToWMSController {
|
|||||||
|
|
||||||
String xloek= MapUtils.getString(item, "xloek"); // 删除标识
|
String xloek= MapUtils.getString(item, "xloek"); // 删除标识
|
||||||
String auart= MapUtils.getString(item, "AUART"); // 接收生产订单类型 返工ZP05 复卷ZP01
|
String auart= MapUtils.getString(item, "AUART"); // 接收生产订单类型 返工ZP05 复卷ZP01
|
||||||
String lifnr= MapUtils.getString(item, "LIFNR"); // 委外
|
String lifnr= MapUtils.getString(item, "LIFNR"); //
|
||||||
|
|
||||||
|
|
||||||
MaterialShipRequestDetail mrd =new MaterialShipRequestDetail();
|
MaterialShipRequestDetail mrd =new MaterialShipRequestDetail();
|
||||||
|
@ -577,7 +577,7 @@ public class SaleOutController {
|
|||||||
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
else if ("OEM".equals(shipRequestType) || "08".equals(shipRequestType)) { //委外出库
|
else if ("OEM".equals(shipRequestType)) { //委外出库
|
||||||
if (dy0 < 0) {//只能超发一个
|
if (dy0 < 0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,6 @@ public interface ToSapDao {
|
|||||||
|
|
||||||
//基于boxList更新物料凭证及库存状态
|
//基于boxList更新物料凭证及库存状态
|
||||||
public void updateStockState(@Param("boxList") List<MaterialPacking> boxList,@Param("stockState") String stockState,@Param("undoId") String undoId,@Param("user") String user) throws Exception;
|
public void updateStockState(@Param("boxList") List<MaterialPacking> boxList,@Param("stockState") String stockState,@Param("undoId") String undoId,@Param("user") String user) throws Exception;
|
||||||
|
|
||||||
// 更新history
|
|
||||||
public void updateStockStateHistory(@Param("boxList") List<MaterialPacking> boxList,@Param("stockState") String stockState,@Param("undoId") String undoId,@Param("user") String user) throws Exception;
|
|
||||||
//基于boxList更新物料凭证及库存状态
|
//基于boxList更新物料凭证及库存状态
|
||||||
public void updateLocationStockState(@Param("boxList") List<MaterialPacking> boxList,@Param("stockState") String stockState,@Param("undoId") String undoId,@Param("aimErpFactory") String aimErpFactory,@Param("aimErpLocation") String aimErpLocation,@Param("aimLOcationName") String aimLOcationName,@Param("user") String user) throws Exception;
|
public void updateLocationStockState(@Param("boxList") List<MaterialPacking> boxList,@Param("stockState") String stockState,@Param("undoId") String undoId,@Param("aimErpFactory") String aimErpFactory,@Param("aimErpLocation") String aimErpLocation,@Param("aimLOcationName") String aimLOcationName,@Param("user") String user) throws Exception;
|
||||||
|
|
||||||
|
@ -883,7 +883,7 @@ public class MaterialShipServiceImpl implements IMaterialShipService {
|
|||||||
setEventInfo.setUserColumns(hashMapPack);
|
setEventInfo.setUserColumns(hashMapPack);
|
||||||
MaterialPackingServiceProxy.getMaterialPackingService().setEvent(mpKeyList, eventInfo, setEventInfo);
|
MaterialPackingServiceProxy.getMaterialPackingService().setEvent(mpKeyList, eventInfo, setEventInfo);
|
||||||
//抛送MES数据
|
//抛送MES数据
|
||||||
untils.sendMaterialInfoToMES_NEW2(shipRequestName, "", materialPackingKeyList,billCode,user);
|
untils.sendMaterialInfoToMES_NEW2(shipRequestName, "", materialPackingKeyList);
|
||||||
|
|
||||||
WlySaveUnDoInfo( billCode,commitDate);
|
WlySaveUnDoInfo( billCode,commitDate);
|
||||||
}
|
}
|
||||||
@ -896,7 +896,7 @@ public class MaterialShipServiceImpl implements IMaterialShipService {
|
|||||||
}
|
}
|
||||||
// billCode=toSAPService.ProductionStockOut_NEW(shipRequestName, "SDK", eventUser,materialPackingKeyList);
|
// billCode=toSAPService.ProductionStockOut_NEW(shipRequestName, "SDK", eventUser,materialPackingKeyList);
|
||||||
//抛送MES数据
|
//抛送MES数据
|
||||||
untils.sendMaterialInfoToMES_NEW(shipRequestName, "", materialPackingKeyList,billCode,user);
|
untils.sendMaterialInfoToMES_NEW(shipRequestName, "", materialPackingKeyList);
|
||||||
//billCode = NCWServiceImpl.SaleOut2(shipRequestName, "SDK", eventUser,materialPackingKeyList,"");
|
//billCode = NCWServiceImpl.SaleOut2(shipRequestName, "SDK", eventUser,materialPackingKeyList,"");
|
||||||
untils.SaveUnDoInfo_ForSap(materialPackingKeyList, billCode, eventInfo);
|
untils.SaveUnDoInfo_ForSap(materialPackingKeyList, billCode, eventInfo);
|
||||||
|
|
||||||
|
@ -351,7 +351,6 @@ public class ProductIntoServiceImpl implements FGStockInService {
|
|||||||
// undoID = toSAPService.FGStockIn(pc, user, commitDate, opCode);
|
// undoID = toSAPService.FGStockIn(pc, user, commitDate, opCode);
|
||||||
//更新物料凭证和库存状态
|
//更新物料凭证和库存状态
|
||||||
toSapDao.updateStockState(boxList, "Stocked", undoID, user);
|
toSapDao.updateStockState(boxList, "Stocked", undoID, user);
|
||||||
toSapDao.updateStockStateHistory(boxList, "Stocked", undoID, user);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//更新过账流水
|
//更新过账流水
|
||||||
|
@ -4,7 +4,6 @@ import com.cim.idm.exception.GlobalException;
|
|||||||
import com.cim.idm.framework.IDMFrameServiceProxy;
|
import com.cim.idm.framework.IDMFrameServiceProxy;
|
||||||
import com.cim.idm.framework.data.EventInfo;
|
import com.cim.idm.framework.data.EventInfo;
|
||||||
import com.cim.idm.service.impl.MESServiceImpl;
|
import com.cim.idm.service.impl.MESServiceImpl;
|
||||||
import com.cim.idm.service.impl.ToSAPServiceImpl;
|
|
||||||
import com.cim.idm.wmsextend.generic.GenericServiceProxy;
|
import com.cim.idm.wmsextend.generic.GenericServiceProxy;
|
||||||
import com.cim.idm.wmsextend.generic.errorHandler.CustomException;
|
import com.cim.idm.wmsextend.generic.errorHandler.CustomException;
|
||||||
import com.cim.idm.wmspackage.materialpacking.MaterialPackingServiceProxy;
|
import com.cim.idm.wmspackage.materialpacking.MaterialPackingServiceProxy;
|
||||||
@ -12,7 +11,6 @@ import com.cim.idm.wmspackage.materialpacking.management.data.MaterialPacking;
|
|||||||
import com.cim.idm.wmspackage.materialpacking.management.data.MaterialPackingKey;
|
import com.cim.idm.wmspackage.materialpacking.management.data.MaterialPackingKey;
|
||||||
import com.cim.idm.wmspackage.materialpacking.management.info.SetEventInfo;
|
import com.cim.idm.wmspackage.materialpacking.management.info.SetEventInfo;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -32,9 +30,6 @@ import java.util.Objects;
|
|||||||
@EnableAutoConfiguration
|
@EnableAutoConfiguration
|
||||||
public class CommonUtils {
|
public class CommonUtils {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ToSAPServiceImpl toSAPService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询库位所在的仓库
|
* 查询库位所在的仓库
|
||||||
* @param loction
|
* @param loction
|
||||||
@ -673,7 +668,7 @@ public void SaveUnDoInfo_ForSap(List<String> list, String undoid, EventInfo mak
|
|||||||
* @param receiveActNo 收货活动编号,用于指定收货活动
|
* @param receiveActNo 收货活动编号,用于指定收货活动
|
||||||
* @param boxList 箱号列表,包含所有需要发送的物料箱号
|
* @param boxList 箱号列表,包含所有需要发送的物料箱号
|
||||||
*/
|
*/
|
||||||
public void sendMaterialInfoToMES_NEW(String invoiceNo,String receiveActNo,List<String> boxList,String billCode,String user){
|
public void sendMaterialInfoToMES_NEW(String invoiceNo,String receiveActNo,List<String> boxList){
|
||||||
// 定义SQL查询语句,用于获取物料接收位置和接收工厂信息
|
// 定义SQL查询语句,用于获取物料接收位置和接收工厂信息
|
||||||
String sql="SELECT m.ERPRECEIVELOCATION,m.ERPRECEIVEFACTORY FROM MATERIALSHIPREQUEST a,MATERIALSHIPREQUESTDETAIL m \r\n" +
|
String sql="SELECT m.ERPRECEIVELOCATION,m.ERPRECEIVEFACTORY FROM MATERIALSHIPREQUEST a,MATERIALSHIPREQUESTDETAIL m \r\n" +
|
||||||
" WHERE m.SHIPREQUESTNAME =:SHIPREQUESTNAME and m.SHIPREQUESTNAME=a.SHIPREQUESTNAME "
|
" WHERE m.SHIPREQUESTNAME =:SHIPREQUESTNAME and m.SHIPREQUESTNAME=a.SHIPREQUESTNAME "
|
||||||
@ -690,27 +685,17 @@ public void SaveUnDoInfo_ForSap(List<String> list, String undoid, EventInfo mak
|
|||||||
// 创建MESServiceImpl实例,用于调用发送物料信息到MES系统的方法
|
// 创建MESServiceImpl实例,用于调用发送物料信息到MES系统的方法
|
||||||
MESServiceImpl mesService=new MESServiceImpl() ;
|
MESServiceImpl mesService=new MESServiceImpl() ;
|
||||||
// 调用MESServiceImpl的OutMaterialInfoSend_NEW方法,发送物料信息到MES系统
|
// 调用MESServiceImpl的OutMaterialInfoSend_NEW方法,发送物料信息到MES系统
|
||||||
String code = mesService.OutMaterialInfoSend_NEW(invoiceNo, "SDK", receiveActNo, "",
|
mesService.OutMaterialInfoSend_NEW(invoiceNo, "SDK", receiveActNo, "",
|
||||||
sr.get(0).get("ERPRECEIVELOCATION")==null?"":sr.get(0).get("ERPRECEIVELOCATION").toString()
|
sr.get(0).get("ERPRECEIVELOCATION")==null?"":sr.get(0).get("ERPRECEIVELOCATION").toString()
|
||||||
,sr.get(0).get("ERPRECEIVEFACTORY")==null?"":sr.get(0).get("ERPRECEIVEFACTORY").toString(),boxList );
|
,sr.get(0).get("ERPRECEIVEFACTORY")==null?"":sr.get(0).get("ERPRECEIVEFACTORY").toString(),boxList );
|
||||||
|
|
||||||
if("1".equals(code)) {
|
|
||||||
String undo = toSAPService.cancelShipInter(billCode, user);
|
|
||||||
if (undo == null ) {
|
|
||||||
throw new GlobalException("报送ERP失败,请联系IT处理!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (CustomException e) {
|
} catch (CustomException e) {
|
||||||
// 异常处理:打印异常堆栈跟踪信息
|
// 异常处理:打印异常堆栈跟踪信息
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendMaterialInfoToMES_NEW2(String invoiceNo,String receiveActNo,List<String> boxList, String billCode, String user){
|
public void sendMaterialInfoToMES_NEW2(String invoiceNo,String receiveActNo,List<String> boxList){
|
||||||
// 定义SQL查询语句,用于获取物料接收位置和接收工厂信息
|
// 定义SQL查询语句,用于获取物料接收位置和接收工厂信息
|
||||||
String sql="SELECT m.ERPRECEIVELOCATION,m.ERPRECEIVEFACTORY FROM MATERIALSHIPREQUEST a,MATERIALSHIPREQUESTDETAIL m \r\n" +
|
String sql="SELECT m.ERPRECEIVELOCATION,m.ERPRECEIVEFACTORY FROM MATERIALSHIPREQUEST a,MATERIALSHIPREQUESTDETAIL m \r\n" +
|
||||||
" WHERE m.SHIPREQUESTNAME =:SHIPREQUESTNAME and m.SHIPREQUESTNAME=a.SHIPREQUESTNAME "
|
" WHERE m.SHIPREQUESTNAME =:SHIPREQUESTNAME and m.SHIPREQUESTNAME=a.SHIPREQUESTNAME "
|
||||||
@ -727,22 +712,13 @@ public void SaveUnDoInfo_ForSap(List<String> list, String undoid, EventInfo mak
|
|||||||
// 创建MESServiceImpl实例,用于调用发送物料信息到MES系统的方法
|
// 创建MESServiceImpl实例,用于调用发送物料信息到MES系统的方法
|
||||||
MESServiceImpl mesService=new MESServiceImpl() ;
|
MESServiceImpl mesService=new MESServiceImpl() ;
|
||||||
// 调用MESServiceImpl的OutMaterialInfoSend_NEW方法,发送物料信息到MES系统
|
// 调用MESServiceImpl的OutMaterialInfoSend_NEW方法,发送物料信息到MES系统
|
||||||
String code = mesService.OutMaterialInfoSend_NEW2(invoiceNo, "SDK", receiveActNo, "",
|
mesService.OutMaterialInfoSend_NEW2(invoiceNo, "SDK", receiveActNo, "",
|
||||||
sr.get(0).get("ERPRECEIVELOCATION")==null?"":sr.get(0).get("ERPRECEIVELOCATION").toString()
|
sr.get(0).get("ERPRECEIVELOCATION")==null?"":sr.get(0).get("ERPRECEIVELOCATION").toString()
|
||||||
,sr.get(0).get("ERPRECEIVEFACTORY")==null?"":sr.get(0).get("ERPRECEIVEFACTORY").toString(),boxList );
|
,sr.get(0).get("ERPRECEIVEFACTORY")==null?"":sr.get(0).get("ERPRECEIVEFACTORY").toString(),boxList );
|
||||||
|
|
||||||
if("1".equals(code)) {
|
|
||||||
String undo = toSAPService.cancelShipInter(billCode, user);
|
|
||||||
if (undo == null ) {
|
|
||||||
throw new GlobalException("报送ERP失败,请联系IT处理!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (CustomException e) {
|
} catch (CustomException e) {
|
||||||
// 异常处理:打印异常堆栈跟踪信息
|
// 异常处理:打印异常堆栈跟踪信息
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,18 +55,6 @@
|
|||||||
#{box.materialPackingName}
|
#{box.materialPackingName}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
<!-- 更新history -->
|
|
||||||
<update id="updateStockStateHistory" parameterType="map">
|
|
||||||
UPDATE MATERIALPACKINGHISTORY
|
|
||||||
SET STOCKSTATE = #{stockState},UNDOID = #{undoId}, ERPLOCATION = #{aimErpLocation}, LOCATIONNAME = #{aimLOcationName}, ERPFACTORY = #{aimErpFactory},
|
|
||||||
EVENTTIME = SYSDATE,
|
|
||||||
EVENTUSER = #{user},
|
|
||||||
EVENTNAME = '产成品入库FGStockIn'
|
|
||||||
WHERE MATERIALPACKINGNAME IN
|
|
||||||
<foreach item="box" index="index" collection="boxList" open="(" separator="," close=")">
|
|
||||||
#{box.materialPackingName}
|
|
||||||
</foreach>
|
|
||||||
</update>
|
|
||||||
<!-- 基于形态转换更新物料编码-->
|
<!-- 基于形态转换更新物料编码-->
|
||||||
<update id="updateMaterialCode" parameterType="map">
|
<update id="updateMaterialCode" parameterType="map">
|
||||||
UPDATE MATERIALPACKING m
|
UPDATE MATERIALPACKING m
|
||||||
|
Loading…
x
Reference in New Issue
Block a user