wms海外过账的时间逻辑修改

master
mengjiao 4 months ago
parent 354fe5675d
commit 38b5f3b176

@ -482,11 +482,20 @@ public class SapController extends BaseController {
* @return
*/
@PostMapping("/sapProductOutboundCostCenter")
@Log(title = "成品下线入库", businessType = BusinessType.SAP)
@Log(title = "成本中心出库", businessType = BusinessType.SAP)
public R sapProductOutboundCostCenter(@RequestBody(required = false) List<Map<String, Object>> mapList) {
return sapWmsService.sapProductOutboundCostCenter(mapList);
}
/**
* ZMES_962_MB1A
* @param mapList
* @return
*/
@PostMapping("/sapProductOutboundCostTW")
@Log(title = "有关内部订单的收货", businessType = BusinessType.SAP)
public R sapProductOutboundCostTW(@RequestBody(required = false) List<Map<String, Object>> mapList) {
return sapWmsService.sapProductOutboundCostCenter(mapList);
}

@ -623,7 +623,6 @@ public class SapItemSyncImpl implements SapItemSyncService {
System.out.println(L_ITEM);
System.out.println(P_LFSNR);
for (Map map : mapList) {
L_ITEM.appendRow();
L_ITEM.setValue("EBELN", map.get("EBELN"));
L_ITEM.setValue("EBELP", map.get("EBELP"));

@ -27,6 +27,8 @@ import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
@ -496,7 +498,16 @@ public class SapOrderServiceImpl implements SapOrderService {
}
// 配置传入参数
JCoTable L_ITEM = func.getTableParameterList().getTable("L_ITEM");
// 获取当前日期
LocalDate currentDate = LocalDate.now(); // 使用now()方法获取当前日期并保存到currentDate变量中
// 定义日期格式化器,格式为"yyyyMMdd"
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); // 创建一个日期格式化器指定格式为“yyyyMMdd”
// 将当前日期格式化为字符串
String formattedDate = currentDate.format(formatter); // 将currentDate格式化为字符串并保存到formattedDate变量中
//取当前时间类型是20250303
for (Map<String, Object> stringObjectMap : mapList) {
L_ITEM.appendRow();
L_ITEM.setValue("AUFNR", stringObjectMap.get("AUFNR"));
@ -504,7 +515,14 @@ public class SapOrderServiceImpl implements SapOrderService {
L_ITEM.setValue("LGORT", stringObjectMap.get("LGORT"));
L_ITEM.setValue("QUANTITY", stringObjectMap.get("QUANTITY"));
L_ITEM.setValue("BATCH", stringObjectMap.get("BATCH"));
L_ITEM.setValue("HSDAT", stringObjectMap.get("HSDAT"));
//判断下是否里面有英文字母,如果有的话,就直接取当前时间为入参
String HSDAT= (String) stringObjectMap.get("HSDAT");
if (HSDAT != null && HSDAT.matches(".*[a-zA-Z]+.*")){//有英文字母
L_ITEM.setValue("HSDAT", formattedDate);
}else {//没有英文字母
L_ITEM.setValue("HSDAT", stringObjectMap.get("HSDAT"));
}
L_ITEM.setValue("ERFME", stringObjectMap.get("ERFME"));
if ("1".equals(stringObjectMap.get("STCK_TYPE"))){
L_ITEM.setValue("STCK_TYPE", "");

@ -188,13 +188,13 @@ public class SapWmsServicelmpl implements SapWmsService {
JCoTable L_ITEM = func.getTableParameterList().getTable("L_ITEM");
for (Map<String, Object> stringObjectMap : mapList) {
L_ITEM.appendRow();
L_ITEM.setValue("COSTCENTER", stringObjectMap.get("COSTCENTER"));
L_ITEM.setValue("COSTCENTER", stringObjectMap.get("COSTCENTER"));//成本中心
L_ITEM.setValue("PLANT", stringObjectMap.get("PLANT"));//工厂
L_ITEM.setValue("LGORT", stringObjectMap.get("LGORT"));//库存地点
L_ITEM.setValue("MATNR", stringObjectMap.get("MATNR"));//
L_ITEM.setValue("QUANTITY", stringObjectMap.get("QUANTITY"));//
L_ITEM.setValue("MEINS", stringObjectMap.get("MEINS"));//
L_ITEM.setValue("BATCH", stringObjectMap.get("BATCH"));//
L_ITEM.setValue("MATNR", stringObjectMap.get("MATNR"));//物料号
L_ITEM.setValue("QUANTITY", stringObjectMap.get("QUANTITY"));//数量
L_ITEM.setValue("MEINS", stringObjectMap.get("MEINS"));//条目单位
L_ITEM.setValue("BATCH", stringObjectMap.get("BATCH"));//批号
L_ITEM.setValue("PROD_DATE", stringObjectMap.get("PROD_DATE"));//生产日期
L_ITEM.setValue("EXPIRYDATE", stringObjectMap.get("EXPIRYDATE"));//货架寿命到期日
}

@ -934,6 +934,7 @@ public class WmsToWCSmissionController {
List<OdsProcureOutOrder> result = odsProcureOutOrderService.listOdsProcureOutOrderTS(order);
return success(result);
}
//特殊出库--确认
@PostMapping("/OdsProcureOutOrderTSCK")
public AjaxResult OdsProcureOutOrderTSCK(@RequestBody OdsProcureOutOrder order) {
String result = odsProcureOutOrderService.OdsProcureOutOrderTSCK(order);

@ -522,7 +522,6 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
map.put("BATCH", mesReportWork.getBatchSK());
map.put("STCK_TYPE", selectedType);
if (mesReportWork.getBatch().trim().length()==24){
String HSDAT = InterceptionSJRules(mesReportWork.getBatch());
map.put("HSDAT", HSDAT);
}else {

Loading…
Cancel
Save