fix:修改过账日期

This commit is contained in:
郭飞 2025-05-08 19:04:44 +08:00
parent 26ef3fd081
commit 9a778c95e4
9 changed files with 23 additions and 18 deletions

View File

@ -1110,7 +1110,7 @@ public class ToSAPServiceImpl {
}
//调拨入库对于SAP,不同组织间调拨相当于采购入库移动类型 101
public String makeAlloctionStockIn(List<Map<String, Object>> queryForList, String user) throws JsonMappingException, JsonProcessingException {
public String makeAlloctionStockIn(List<Map<String, Object>> queryForList, String user, String commitDate) throws JsonMappingException, JsonProcessingException {
if (queryForList == null || queryForList.size() < 1) {
return "";
@ -1178,12 +1178,12 @@ public class ToSAPServiceImpl {
item.put("UMMAT_KDPOS", mm.get("SENDSALESORDERDETAILNO"));
itemData.add(item);
}
String sendData = ToSAPMessageUtil.mm067(user, bodyData, itemData,TimeStampUtil.getCurrentTime("yyyyMMdd"));
String sendData = ToSAPMessageUtil.mm067(user, bodyData, itemData,commitDate);
return sendData;
}
public String AlloctionStockIn(String shipRequestName, String siteName, String eventUser,String erpLocation) throws Exception {
public String AlloctionStockIn(String shipRequestName, String siteName, String eventUser,String erpLocation,String commitDate) throws Exception {
String sql=" SELECT m.SHIPREQUESTNAME ,\r\n" +
" m3.SHIPREQUESTDETAILNAME ,\r\n" +
" m.MATERIALSPECNAME ,\r\n" +
@ -1218,7 +1218,7 @@ public class ToSAPServiceImpl {
hashMap.put("ERPLOCATION", erpLocation);
List<Map<String, Object>> queryForList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql.toString(), hashMap);
String makeAlloctionStockIn = makeAlloctionStockIn(queryForList, eventUser);
String makeAlloctionStockIn = makeAlloctionStockIn(queryForList, eventUser,commitDate);
String sapreturn = "";
String rcode = "";
String rmsg = "";
@ -1882,7 +1882,7 @@ public class ToSAPServiceImpl {
// billCode = PurStockIn(receiveRequestName, siteName, eventUser, reActo, args/* ,overReceiveControls */);
break;
case "NLCC" : //调拨入库
billCode = AlloctionStockIn(receiveRequestName, siteName, eventUser,"");
billCode = AlloctionStockIn(receiveRequestName, siteName, eventUser,"","");
break;
default :
break;
@ -5101,7 +5101,7 @@ public class ToSAPServiceImpl {
hashMap.put("SHIPREQUESTNAME", opCode);
List<Map<String, Object>> queryForList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql.toString(), hashMap);
//根据不同的类型进行处理
String makeReturnStockIn = makeReturnStockIn(queryForList, eventUser);
String makeReturnStockIn = makeReturnStockIn(queryForList, eventUser,commitDate);
String sapreturn = "";
String rcode = "";
@ -5145,7 +5145,7 @@ public class ToSAPServiceImpl {
}
public String makeReturnStockIn(List<Map<String, Object>> list, String eventUser) throws JsonMappingException, JsonProcessingException {
public String makeReturnStockIn(List<Map<String, Object>> list, String eventUser, String commitDate) throws JsonMappingException, JsonProcessingException {
if (list == null || list.size() < 1) {
return "";
}
@ -5204,7 +5204,7 @@ public class ToSAPServiceImpl {
itemsData.add(item);
}
String sendData = ToSAPMessageUtil.mm067(eventUser, bodyData, itemsData,TimeStampUtil.getCurrentTime("yyyyMMdd"));
String sendData = ToSAPMessageUtil.mm067(eventUser, bodyData, itemsData,commitDate);
return sendData;
}

View File

@ -48,7 +48,7 @@ public class AllocateStockInController {
allocateStockInService.allocateStockIn(barcodeListByInvoice.getShipRequestName(),
barcodeListByInvoice.getSiteName(),
barcodeListByInvoice.getUserId(),
barcodeListByInvoice.getErpLocation(),barcodeListByInvoice.getLocationName());
barcodeListByInvoice.getErpLocation(),barcodeListByInvoice.getLocationName(),barcodeListByInvoice.getCommitDate());
} catch (Exception e) {
return RespGenerator.returnError(e.toString());
}

View File

@ -1405,6 +1405,8 @@ public class SAPToWMSController {
BigDecimal bigRequestQuantity2 = new BigDecimal(requestQuantity.trim());
createReceiveInfo.setRequestQuantity(bigRequestQuantity2.doubleValue());
createReceiveInfo.setReceivedQuantity(0);
bindMapItem.put("materialUnit", unit);
createReceiveInfo.setUserColumns(bindMapItem);
EventInfo eventReciveInfo = new EventInfo();
eventReciveInfo.setEventUser(createUser);
@ -1481,8 +1483,7 @@ public class SAPToWMSController {
eventInfo.setEventName("updateMaterialShipRequest");
// 如果是成本退
// 如果是成本中心退
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();
@ -1490,6 +1491,8 @@ public class SAPToWMSController {
receiveRequestDetailKey.setReceiveRequestDetailName(shipRequestDetailName);
receiveRequestDetailKey.setReceiveRequestName(shipRequestName);
receiveRequestDetailKey.setSiteName(sitename);
bindMapItem.put("materialUnit", unit);
setReciveInfo.setUserColumns(bindMapItem);
ReceiveRequestDetailServiceProxy.getReceiveRequestDetailService().setEvent(receiveRequestDetailKey, eventInfo, setReciveInfo);

View File

@ -27,6 +27,8 @@ public class BarcodeListByInvoice {
private String opType;
private String commitDate;
private List<Barcode> boxList;

View File

@ -11,5 +11,5 @@ public interface AllocateStockInService {
* @return
* @throws Exception
*/
public String allocateStockIn(String shipRequestName, String siteName, String user,String erpLocation ,String locationName) throws Exception;
public String allocateStockIn(String shipRequestName, String siteName, String user,String erpLocation ,String locationName, String commitDate) throws Exception;
}

View File

@ -40,10 +40,10 @@ public class AllocateStockInServiceImpl implements AllocateStockInService {
*/
@Override
@Transactional
public String allocateStockIn(String shipRequestName, String siteName, String user, String erpLocation,String locationName) throws Exception {
public String allocateStockIn(String shipRequestName, String siteName, String user, String erpLocation,String locationName,String commitDate) throws Exception {
log.debug("AllocateStockInServiceImpl.allocateStockIn {} {} {} {}", shipRequestName, siteName, user, erpLocation);
//提交SAP过账
String undoId = toSAPServiceImpl.AlloctionStockIn(shipRequestName, siteName, user, erpLocation);
String undoId = toSAPServiceImpl.AlloctionStockIn(shipRequestName, siteName, user, erpLocation,commitDate);
//基于单据获取要操作的Box
List<MaterialPacking> boxList = toSapDao.getBoxListByShipRequestName(shipRequestName);
//保存物料凭证

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,commitDate);
billCode=orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList,commitDate);
//抛送MES数据
untils.sendMaterialInfoToMES_NEW(shipRequestName, "", materialPackingKeyList);
//更新MES管芯数据

View File

@ -813,7 +813,7 @@ public class ReturnStockIntoServiceImpl implements ReturnStockInService {
aimErpLocation = boxList.get(0).getErpLocation();
aimLOcationName = boxList.get(0).getLocationName();
billCode = ToSAPServiceImpl.NoSourceChangeLocation(arrayList,aimErpFactory,
aimErpLocation, aimLOcationName, eventUser, "");
aimErpLocation, aimLOcationName, eventUser, commitDate);
if (billCode.length() == 0) {
throw new GlobalException("报送ERP失败,请联系IT处理");

View File

@ -225,7 +225,7 @@ public class TransferInServiceImpl implements TransferInService {
List<Map<String, Object>> queryForList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql, new HashMap<String,Object> ());
for (Map<String, Object> map : queryForList) {
String shiprequestName = map.get("SHIPREQUESTNAME").toString();
String billCode = toSAPServiceImpl.AlloctionStockIn(shiprequestName, "SDK", user, erpLocation);
String billCode = toSAPServiceImpl.AlloctionStockIn(shiprequestName, "SDK", user, erpLocation,commitDate);
// String billCode = UUID.randomUUID().toString();
//判断是否获得物料凭证
if (billCode == null || "".equals(billCode)) {
@ -400,7 +400,7 @@ public class TransferInServiceImpl implements TransferInService {
List<Map<String, Object>> queryForList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql, new HashMap<String,Object> ());
for (Map<String, Object> map : queryForList) {
String shiprequestName = map.get("SHIPREQUESTNAME").toString();
String billCode = toSAPServiceImpl.AlloctionStockIn(shiprequestName, "SDK", user, erpLocation);
String billCode = toSAPServiceImpl.AlloctionStockIn(shiprequestName, "SDK", user, erpLocation,commitDate);
// String billCode = UUID.randomUUID().toString();
//判断是否获得物料凭证
if (billCode == null || "".equals(billCode)) {