嘉耐项目更新
This commit is contained in:
@@ -13,45 +13,52 @@ import org.springframework.http.HttpStatus;
|
||||
|
||||
public class PointUpdateUtil {
|
||||
public static void updatePoint(JSONArray arr) {
|
||||
WmsToAcsServiceImpl wmsToAcsServiceImpl = new WmsToAcsServiceImpl();
|
||||
String isConnect = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("IS_CONNECT_ACS").getValue();
|
||||
if (StrUtil.equals("0", isConnect)) {
|
||||
return;
|
||||
}
|
||||
JSONObject joo = wmsToAcsServiceImpl.queryPointStatus(arr);
|
||||
JSONArray pointarr = joo.getJSONArray("data");
|
||||
//JSONArray pointarr =new JSONArray();
|
||||
WQLObject pointTable = WQLObject.getWQLObject("sch_base_point");
|
||||
for (int i = 0; i < pointarr.size(); i++) {
|
||||
JSONObject pointjo = pointarr.getJSONObject(i);
|
||||
//String point_status = "00";
|
||||
String mode = pointjo.getString("mode");
|
||||
String point_status = "0" + pointjo.getString("move");
|
||||
//String vehicle_code = pointjo.getString("vehicle_code");
|
||||
String vehicle_code = pointjo.getString("barcode");
|
||||
String device_code = pointjo.getString("device_code");
|
||||
//物料类型
|
||||
String weight = pointjo.getString("weight");
|
||||
//物料
|
||||
String material_code = pointjo.getString("material");
|
||||
//将托盘类型123,改为 03,04,05,默认给01
|
||||
String pallet_type = "01";
|
||||
if (!StrUtil.equals("0", pointjo.getString("pallet_type"))) {
|
||||
pallet_type = "0" + (pointjo.getIntValue("pallet_type") + 2);
|
||||
new Thread(() -> {
|
||||
try {
|
||||
WmsToAcsServiceImpl wmsToAcsServiceImpl = new WmsToAcsServiceImpl();
|
||||
JSONObject joo = wmsToAcsServiceImpl.queryPointStatus(arr);
|
||||
JSONArray pointarr = joo.getJSONArray("data");
|
||||
//JSONArray pointarr =new JSONArray();
|
||||
WQLObject pointTable = WQLObject.getWQLObject("sch_base_point");
|
||||
for (int i = 0; i < pointarr.size(); i++) {
|
||||
JSONObject pointjo = pointarr.getJSONObject(i);
|
||||
//String point_status = "00";
|
||||
String mode = pointjo.getString("mode");
|
||||
String point_status = "0" + pointjo.getString("move");
|
||||
//String vehicle_code = pointjo.getString("vehicle_code");
|
||||
String vehicle_code = pointjo.getString("barcode");
|
||||
String device_code = pointjo.getString("device_code");
|
||||
//物料类型
|
||||
String weight = pointjo.getString("weight");
|
||||
//物料
|
||||
String material_code = pointjo.getString("material");
|
||||
//将托盘类型123,改为 03,04,05,默认给01
|
||||
String pallet_type = "01";
|
||||
if (!StrUtil.equals("0", pointjo.getString("pallet_type"))) {
|
||||
pallet_type = "0" + (pointjo.getIntValue("pallet_type") + 2);
|
||||
}
|
||||
pointjo.put("point_status", point_status);
|
||||
if (StrUtil.equals(vehicle_code, "0")) {
|
||||
vehicle_code = "";
|
||||
}
|
||||
JSONObject pointObj = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0);
|
||||
pointObj.put("vehicle_code", vehicle_code);
|
||||
pointObj.put("point_status", point_status);
|
||||
pointObj.put("vehicle_type", pallet_type);
|
||||
pointObj.put("material_type", weight);
|
||||
pointObj.put("material_code", material_code);
|
||||
pointObj.put("mode", mode);
|
||||
pointTable.update(pointObj);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
pointjo.put("point_status", point_status);
|
||||
if (StrUtil.equals(vehicle_code, "0")) {
|
||||
vehicle_code = "";
|
||||
}
|
||||
JSONObject pointObj = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0);
|
||||
pointObj.put("vehicle_code", vehicle_code);
|
||||
pointObj.put("point_status", point_status);
|
||||
pointObj.put("vehicle_type", pallet_type);
|
||||
pointObj.put("material_type", weight);
|
||||
pointObj.put("material_code", material_code);
|
||||
pointObj.put("mode", mode);
|
||||
pointTable.update(pointObj);
|
||||
}
|
||||
}).start();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,9 +25,8 @@ https://juejin.cn/post/6844903775631572999
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
<charset>${log.charset}</charset>
|
||||
<!-- <charset>${log.charset}</charset>-->
|
||||
</encoder>
|
||||
|
||||
</appender>
|
||||
|
||||
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
|
||||
@@ -47,6 +46,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>${log.charset}</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
@@ -110,7 +110,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
|
||||
<!--生产环境:打印控制台和输出到文件-->
|
||||
<springProfile name="prod">
|
||||
<root level="ERROR">
|
||||
<root level="debug">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</root>
|
||||
<logger name="org.springframework" level="ERROR" additivity="false">
|
||||
|
||||
Reference in New Issue
Block a user