|
|
|
@ -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", "");
|
|
|
|
|