rev: 格式优化
This commit is contained in:
@@ -1,44 +0,0 @@
|
|||||||
package org.nl.wms;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
|
|
||||||
import java.util.Hashtable;
|
|
||||||
|
|
||||||
public class T2 {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
Hashtable l=new Hashtable();
|
|
||||||
l.put("k",1);
|
|
||||||
JSONObject mst = new JSONObject();
|
|
||||||
mst.put("stor_code", "001");
|
|
||||||
mst.put("interface_bill_code", "1123");
|
|
||||||
mst.put("stor_biz_date", "2021-09-15");
|
|
||||||
mst.put("bill_type", "01");
|
|
||||||
|
|
||||||
JSONArray dtl = new JSONArray();
|
|
||||||
JSONObject dtlObj = new JSONObject();
|
|
||||||
dtlObj.put("material_code", "1.1.01.01.KHTY01");
|
|
||||||
dtlObj.put("material_name", "分切纸带");
|
|
||||||
dtlObj.put("material_spec", "0.25*4200*8");
|
|
||||||
dtlObj.put("unit_code", "T01");
|
|
||||||
dtlObj.put("unit_name", "台");
|
|
||||||
dtlObj.put("qty", "20");
|
|
||||||
dtlObj.put("pcsn", "20210915");
|
|
||||||
dtlObj.put("remark", "备注");
|
|
||||||
dtl.add(dtlObj);
|
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
|
||||||
result.put("mst", mst);
|
|
||||||
result.put("dtl", dtl);
|
|
||||||
System.out.println(result.toString());
|
|
||||||
|
|
||||||
JSONObject a = new JSONObject();
|
|
||||||
a.put("status", HttpStatus.OK.value());
|
|
||||||
a.put("message", "操作成功");
|
|
||||||
a.put("data", "123");
|
|
||||||
System.out.println(a.toString());
|
|
||||||
System.out.println(DateUtil.now());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -18,7 +18,7 @@ public interface AcsToWmsService {
|
|||||||
* ACS客户端--->WMS服务端
|
* ACS客户端--->WMS服务端
|
||||||
* ACS向WMS反馈任务状态
|
* ACS向WMS反馈任务状态
|
||||||
*
|
*
|
||||||
* @param jsonObject 条件
|
* @param string 条件
|
||||||
* @return Map<String, Object>
|
* @return Map<String, Object>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -298,9 +298,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
WQLObject.getWQLObject("st_buss_emptyvehiclerecord").insert(jo);
|
WQLObject.getWQLObject("st_buss_emptyvehiclerecord").insert(jo);
|
||||||
if (StrUtil.equals(point_code, "BHMDDW") || StrUtil.equals(point_code, "JZDDW01")) {
|
if (StrUtil.equals(point_code, "BHMDDW") || StrUtil.equals(point_code, "JZDDW01")) {
|
||||||
inEmptyVehicleTask.findNextPoint();
|
inEmptyVehicleTask.findNextPoint();
|
||||||
/* JSONObject taskObj = WQLObject.getWQLObject("sch_base_task").query("task_uuid='" + task_uuid + "' and task_status <'" + TaskStatusEnum.START_AND_POINT.getCode() + "'").uniqueResult(0);
|
|
||||||
if (ObjectUtil.isEmpty(taskObj)){
|
|
||||||
}*/
|
|
||||||
inEmptyVehicleTask.renotifyAcs(task_uuid);
|
inEmptyVehicleTask.renotifyAcs(task_uuid);
|
||||||
}
|
}
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
|||||||
@@ -122,14 +122,16 @@ public class JmToWmsServiceImpl implements JmToWmsService {
|
|||||||
jsonDtl.put("remark", "");
|
jsonDtl.put("remark", "");
|
||||||
String stor_code = dtlObj.getString("stor_code");
|
String stor_code = dtlObj.getString("stor_code");
|
||||||
String sect_uuid = "";
|
String sect_uuid = "";
|
||||||
|
|
||||||
|
//保护膜存储区
|
||||||
if (StrUtil.isNotEmpty(stor_code) && stor_code.equals("01")) {
|
if (StrUtil.isNotEmpty(stor_code) && stor_code.equals("01")) {
|
||||||
sect_uuid = "a464ae812f1747149318ad2848a77400";
|
sect_uuid = "a464ae812f1747149318ad2848a77400";
|
||||||
}
|
}
|
||||||
|
//聚酯膜存储区
|
||||||
if (StrUtil.isNotEmpty(stor_code) && stor_code.equals("02")) {
|
if (StrUtil.isNotEmpty(stor_code) && stor_code.equals("02")) {
|
||||||
sect_uuid = "40b6289b759f4d6a99b09c411d27403e";
|
sect_uuid = "40b6289b759f4d6a99b09c411d27403e";
|
||||||
}
|
}
|
||||||
jsonDtl.put("sect_uuid", sect_uuid);
|
jsonDtl.put("sect_uuid", sect_uuid);
|
||||||
//TODO jsonDtl.put("sect_uuid",""); 库区怎么写
|
|
||||||
dtlTab.insert(jsonDtl);
|
dtlTab.insert(jsonDtl);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -189,9 +191,12 @@ public class JmToWmsServiceImpl implements JmToWmsService {
|
|||||||
|
|
||||||
String stor_code = dtlObj.getString("stor_code");
|
String stor_code = dtlObj.getString("stor_code");
|
||||||
String sect_uuid = "";
|
String sect_uuid = "";
|
||||||
|
|
||||||
|
//保护膜存储区
|
||||||
if (StrUtil.isNotEmpty(stor_code) && stor_code.equals("01")) {
|
if (StrUtil.isNotEmpty(stor_code) && stor_code.equals("01")) {
|
||||||
sect_uuid = "a464ae812f1747149318ad2848a77400";
|
sect_uuid = "a464ae812f1747149318ad2848a77400";
|
||||||
}
|
}
|
||||||
|
//聚酯膜存储区
|
||||||
if (StrUtil.isNotEmpty(stor_code) && stor_code.equals("02")) {
|
if (StrUtil.isNotEmpty(stor_code) && stor_code.equals("02")) {
|
||||||
sect_uuid = "40b6289b759f4d6a99b09c411d27403e";
|
sect_uuid = "40b6289b759f4d6a99b09c411d27403e";
|
||||||
}
|
}
|
||||||
@@ -316,7 +321,6 @@ public class JmToWmsServiceImpl implements JmToWmsService {
|
|||||||
if (ObjectUtil.isEmpty(jsonIvt)) {
|
if (ObjectUtil.isEmpty(jsonIvt)) {
|
||||||
log.info("JM数据库未发现条形码为{}的仓位", barcode);
|
log.info("JM数据库未发现条形码为{}的仓位", barcode);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//创建质检单
|
//创建质检单
|
||||||
@@ -373,7 +377,6 @@ public class JmToWmsServiceImpl implements JmToWmsService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
//result.put("status", HttpStatus.OK.value());
|
|
||||||
result.put("status", 200);
|
result.put("status", 200);
|
||||||
result.put("message", "任务状态反馈成功!");
|
result.put("message", "任务状态反馈成功!");
|
||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||||
<property name="LOG_HOME" value="${logPath}"/>
|
<property name="LOG_HOME" value="${logPath}"/>
|
||||||
<!--引入默认的一些设置-->
|
<!--引入默认的一些设置-->
|
||||||
<include resource="test.xml"/>
|
|
||||||
<include resource="JmToWms.xml"/>
|
<include resource="JmToWms.xml"/>
|
||||||
<include resource="WmsToJm.xml"/>
|
<include resource="WmsToJm.xml"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,101 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true" scanPeriod="30 seconds" debug="true">
|
|
||||||
<contextName>nlAdmin</contextName>
|
|
||||||
<property name="log.charset" value="utf-8"/>
|
|
||||||
<property name="log.pattern"
|
|
||||||
value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %gray(%msg%n)"/>
|
|
||||||
|
|
||||||
|
|
||||||
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
|
|
||||||
<!--<property name="LOG_HOME" value="D:\software\springboot\log" />-->
|
|
||||||
<property name="LOG_HOME" value="./logs"/>
|
|
||||||
<!-- 按照每天生成日志文件 -->
|
|
||||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!--日志文件输出的文件名-->
|
|
||||||
<FileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}.log</FileNamePattern>
|
|
||||||
<!--日志文件保留天数-->
|
|
||||||
<MaxHistory>30</MaxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<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>
|
|
||||||
</encoder>
|
|
||||||
<!--日志文件最大的大小-->
|
|
||||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
|
||||||
<MaxFileSize>20MB</MaxFileSize>
|
|
||||||
</triggeringPolicy>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 按照每天生成日志文件 -->
|
|
||||||
<appender name="FILE2" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!--日志文件输出的文件名-->
|
|
||||||
<FileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}.log</FileNamePattern>
|
|
||||||
<!--日志文件保留天数-->
|
|
||||||
<MaxHistory>30</MaxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<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>
|
|
||||||
</encoder>
|
|
||||||
<!--日志文件最大的大小-->
|
|
||||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
|
||||||
<MaxFileSize>20MB</MaxFileSize>
|
|
||||||
</triggeringPolicy>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!--输出到控制台-->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
<charset>${log.charset}</charset>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!--普通日志输出到控制台-->
|
|
||||||
<!-- <root level="info">
|
|
||||||
<appender-ref ref="console" />
|
|
||||||
</root>-->
|
|
||||||
|
|
||||||
<!-- 开始-->
|
|
||||||
<!-- 日志输出级别 -->
|
|
||||||
<!--<root level="warn">
|
|
||||||
<appender-ref ref="console" />
|
|
||||||
<appender-ref ref="FILE" />
|
|
||||||
</root>-->
|
|
||||||
|
|
||||||
<!--myibatis log configure-->
|
|
||||||
<!-- <logger name="com.apache.ibatis" level="DEBUG"/>
|
|
||||||
<logger name="java.sql.Connection" level="DEBUG"/>
|
|
||||||
<logger name="java.sql.Statement" level="DEBUG"/>
|
|
||||||
<logger name="java.sql.PreparedStatement" level="DEBUG"/>-->
|
|
||||||
<!--结束-->
|
|
||||||
|
|
||||||
<!--监控sql日志输出 -->
|
|
||||||
<logger name="jdbc.sqlonly" level="INFO" additivity="false">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</logger>
|
|
||||||
|
|
||||||
<logger name="jdbc.resultset" level="ERROR" additivity="false">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</logger>
|
|
||||||
|
|
||||||
<!-- 如想看到表格数据,将OFF改为INFO -->
|
|
||||||
<logger name="jdbc.resultsettable" level="OFF" additivity="false">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</logger>
|
|
||||||
|
|
||||||
<logger name="jdbc.connection" level="OFF" additivity="false">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</logger>
|
|
||||||
|
|
||||||
<logger name="jdbc.sqltiming" level="OFF" additivity="false">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</logger>
|
|
||||||
|
|
||||||
<logger name="jdbc.audit" level="OFF" additivity="false">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</logger>
|
|
||||||
</configuration>
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<included>
|
|
||||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
|
||||||
<property name="LOG_HOME" value="${logPath}"/>
|
|
||||||
<!-- 按照每天生成日志文件 -->
|
|
||||||
<appender name="FILE0" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
||||||
<!--日志文件输出的文件名-->
|
|
||||||
<FileNamePattern>${LOG_HOME}/AutoCreateInst/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
|
||||||
<!--日志文件保留天数-->
|
|
||||||
<maxHistory>15</maxHistory>
|
|
||||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
|
||||||
<maxFileSize>200MB</maxFileSize>
|
|
||||||
<!--所有日志最多占多大容量-->
|
|
||||||
<totalSizeCap>20GB</totalSizeCap>
|
|
||||||
</rollingPolicy>
|
|
||||||
<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>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<logger name="org.nl.start.Init" level="info" additivity="false">
|
|
||||||
<appender-ref ref="FILE0"/>
|
|
||||||
</logger>
|
|
||||||
|
|
||||||
<!-- 打印sql -->
|
|
||||||
</included>
|
|
||||||
Reference in New Issue
Block a user