Compare commits
2 Commits
c7ac79424d
...
f3e73f6c25
Author | SHA1 | Date | |
---|---|---|---|
f3e73f6c25 | |||
717a9af262 |
@ -6,20 +6,23 @@
|
||||
#db.Local.url=jdbc:oracle:thin:@10.140.249.73:1521:ORCL
|
||||
#db.Local.username=b16mwmsadm
|
||||
#db.Local.password=adm2024
|
||||
db.Local.url=jdbc:oracle:thin:@192.168.1.73:1526/test
|
||||
db.Local.username=ziwms_sap_test
|
||||
#db.Local.url=jdbc:oracle:thin:@192.168.1.73:1526/test
|
||||
#db.Local.username=ziwms_sap_test
|
||||
#db.Local.password=adm2024
|
||||
db.Local.url=jdbc:oracle:thin:@172.22.10.236:1521/mesdb
|
||||
db.Local.username=ZIWMS_SAP
|
||||
db.Local.password=adm2024
|
||||
#Section 2 - Customer Local dev DB Info
|
||||
db.Dev.url=jdbc:oracle:thin:@192.168.1.73:1526/test
|
||||
db.Dev.username=ziwms_sap_test
|
||||
db.Dev.url=jdbc:oracle:thin:@172.22.10.236:1521/mesdb
|
||||
db.Dev.username=ZIWMS_SAP
|
||||
db.Dev.password=adm2024
|
||||
#Section 3 - Customer Test DB Info
|
||||
db.Tst.url=jdbc:oracle:thin:@192.168.1.73:1526/test
|
||||
db.Tst.username=ziwms_sap_test
|
||||
db.Tst.url=jdbc:oracle:thin:@172.22.10.236:1521/mesdb
|
||||
db.Tst.username=ZIWMS_SAP
|
||||
db.Tst.password=adm2024
|
||||
#Section 4 - Customer Prod DB Info
|
||||
db.Prd.url=jdbc:oracle:thin:@192.168.1.73:1526/test
|
||||
db.Prd.username=ziwms_sap_test
|
||||
db.Prd.url=jdbc:oracle:thin:@172.22.10.236:1521/mesdb
|
||||
db.Prd.username=ZIWMS_SAP
|
||||
db.Prd.password=adm2024
|
||||
#MQ
|
||||
#mq.url=192.168.1.73:5672
|
||||
|
@ -52,10 +52,11 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@RestController
|
||||
@ -1140,6 +1141,25 @@ public class SAPToWMSController {
|
||||
String moveState = MapUtils.getString(data, "BWART"); //移动类型 BWART
|
||||
String areaName = MapUtils.getString(data, "FEVOR"); //车间
|
||||
|
||||
// 创建日期时间格式转换
|
||||
Timestamp orderTime = new Timestamp(System.currentTimeMillis());
|
||||
if(!createDate.isEmpty() && !createTime.isEmpty()) {
|
||||
|
||||
DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||
DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("HHmmss");
|
||||
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
// 解析日期和时间
|
||||
LocalDate date = LocalDate.parse(createDate, dateFormatter);
|
||||
LocalTime time = LocalTime.parse(createTime, timeFormatter);
|
||||
// 合并为日期时间
|
||||
LocalDateTime dateTime = LocalDateTime.of(date, time);
|
||||
// 格式化输出
|
||||
String formattedDateTime = dateTime.format(outputFormatter);
|
||||
orderTime = Timestamp.valueOf(formattedDateTime);
|
||||
System.out.println(formattedDateTime); // 输出:2025-05-27 09:26:07
|
||||
}
|
||||
|
||||
|
||||
List<Map<String, Object>> checkResultList1 = new ArrayList<>();
|
||||
List<Map<String, Object>> checkResultList2 = new ArrayList<>();
|
||||
|
||||
@ -1177,7 +1197,7 @@ public class SAPToWMSController {
|
||||
"GROUP BY m.SHIPREQUESTNAME";
|
||||
|
||||
List<Map<String, Object>> isList = IDMFrameServiceProxy.getSqlTemplate().queryForList(isSql, selectMap);
|
||||
if (isList != null && isList.size() > 0) {
|
||||
if (isList != null && isList.size() > 0) {
|
||||
throw new CustomException("ERROR","单据已存在,并且已存在过账!");
|
||||
}else if (isResultList != null && isResultList.size() > 0) {
|
||||
String shipquestSql="DELETE FROM MATERIALSHIPREQUEST WHERE shiprequestname =?";
|
||||
@ -1228,6 +1248,7 @@ public class SAPToWMSController {
|
||||
bindMap.put("createTime", createDate+" "+createTime);
|
||||
bindMap.put("erpFactory", erpFactory);
|
||||
bindMap.put("areaName", areaName);
|
||||
bindMap.put("orderDate", orderTime);
|
||||
createInfo.setUserColumns(bindMap);
|
||||
|
||||
EventInfo eventInfo = new EventInfo();
|
||||
@ -1236,7 +1257,7 @@ public class SAPToWMSController {
|
||||
MaterialShipRequestServiceProxy.getMaterialShipRequestService().create(eventInfo, createInfo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}else {
|
||||
//如果是成品中心退货
|
||||
@ -1290,6 +1311,7 @@ public class SAPToWMSController {
|
||||
bindMap.put("erpFactory", erpFactory);
|
||||
bindMap.put("areaName", areaName);
|
||||
|
||||
|
||||
info.setUserColumns(bindMap);
|
||||
|
||||
EventInfo eventInfo = new EventInfo();
|
||||
|
@ -23,6 +23,7 @@ import java.util.Objects;
|
||||
@EnableAutoConfiguration
|
||||
public class WebsocketMessageController {
|
||||
|
||||
|
||||
@RequestMapping(value = "/getReceiveMessage", method = RequestMethod.POST)
|
||||
public AjaxResult getReceiveMessage(@RequestBody JSONObject in) throws CustomException {
|
||||
String userId = in.getString("userId");
|
||||
@ -36,7 +37,7 @@ public class WebsocketMessageController {
|
||||
"\tm3.DESC_CN ,\n" +
|
||||
"\tm.MATERIALUNIT ,\n" +
|
||||
"\tm.SDK_ID ,\n" +
|
||||
"\tss.SPECNAME ,\n" +
|
||||
// "\tss.SPECNAME ,\n" +
|
||||
"\tm.PHASE ,\n" +
|
||||
"\tm.MATERIALSPECNAME,\n" +
|
||||
"\tm.SITENAME,\n" +
|
||||
@ -49,8 +50,8 @@ public class WebsocketMessageController {
|
||||
"\tm.RECEIVEREQUESTNAME = m2.RECEIVEREQUESTNAME\n" +
|
||||
"\tLEFT JOIN MATERIALSPEC m3 ON\n" +
|
||||
"\tm.MATERIALSPECNAME = m3.MATERIALSPECNAME\n" +
|
||||
"\tLEFT JOIN SDK_SPEC ss ON\n" +
|
||||
"\tm.SDK_ID = ss.SDK_ID\n" +
|
||||
// "\tLEFT JOIN SDK_SPEC ss ON\n" +
|
||||
// "\tm.SDK_ID = ss.SDK_ID\n" +
|
||||
"\tLEFT JOIN SUPPLIER S ON\n" +
|
||||
"\tm2.SUPPLIERNO = S.SUPPLIERNO\n" +
|
||||
"\tLEFT JOIN MATERIALUNIT MM ON\n" +
|
||||
@ -68,7 +69,7 @@ public class WebsocketMessageController {
|
||||
"\tm3.DESC_CN ,\n" +
|
||||
"\tm.MATERIALUNIT ,\n" +
|
||||
"\tm.SDK_ID ,\n" +
|
||||
"\tss.SPECNAME ,\n" +
|
||||
// "\tss.SPECNAME ,\n" +
|
||||
"\tm.PHASE ,\n" +
|
||||
"\tm.MATERIALSPECNAME,\n" +
|
||||
"\tm.SITENAME,\n" +
|
||||
|
Loading…
x
Reference in New Issue
Block a user