代码维护
This commit is contained in:
@@ -43,12 +43,12 @@
|
|||||||
<version>4.8.1</version>
|
<version>4.8.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<!--<dependency>
|
||||||
<groupId>net.sf.json-lib</groupId>
|
<groupId>net.sf.json-lib</groupId>
|
||||||
<artifactId>json-lib</artifactId>
|
<artifactId>json-lib</artifactId>
|
||||||
<version>2.4</version>
|
<version>2.4</version>
|
||||||
<classifier>jdk15</classifier>
|
<classifier>jdk15</classifier>
|
||||||
</dependency>
|
</dependency>-->
|
||||||
|
|
||||||
<!-- 导入Excel相关-->
|
<!-- 导入Excel相关-->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package org.nl;
|
|||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import org.nl.annotation.rest.AnonymousGetMapping;
|
import org.nl.annotation.rest.AnonymousGetMapping;
|
||||||
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.utils.SpringContextHolder;
|
import org.nl.utils.SpringContextHolder;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
@@ -55,6 +56,7 @@ public class AppRun {
|
|||||||
*/
|
*/
|
||||||
@AnonymousGetMapping("/")
|
@AnonymousGetMapping("/")
|
||||||
public String index() {
|
public String index() {
|
||||||
|
System.out.println( CodeUtil.getNewCode("TASK_CODE"));
|
||||||
return "Backend service started successfully";
|
return "Backend service started successfully";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
package org.nl;
|
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
import org.nl.wms.pdm.service.dto.ExcelListener;
|
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* https://blog.csdn.net/sunyan_blog/article/details/109706476
|
|
||||||
* https://blog.csdn.net/BUGSLAYER_/article/details/107080413?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~baidu_landing_v2~default-1-107080413.nonecase&utm_term=easyexcel%E5%8A%A8%E6%80%81%E5%A4%B4+%E5%A4%8D%E6%9D%82%E5%A4%B4&spm=1000.2123.3001.4430
|
|
||||||
* https://github.com/alibaba/easyexcel/tree/3.x
|
|
||||||
* https://www.cnblogs.com/dupenghui/p/13606567.html
|
|
||||||
* https://www.cjavapy.com/article/497/
|
|
||||||
* https://blog.csdn.net/u010957645/article/details/101362194
|
|
||||||
*/
|
|
||||||
public class Test {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
// 写法1
|
|
||||||
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,名字为模板 然后文件流会自动关闭
|
|
||||||
// 如果这里想使用03 则 传入excelType参数即可
|
|
||||||
//EasyExcel.write(fileName, Test.class).sheet("写入方法一").doWrite(data());
|
|
||||||
|
|
||||||
// 写法1:
|
|
||||||
// String fileName = "C:\\Users\\lenovo\\Downloads\\2021-09-07 10_44_07-生产任务数据.xlsx";
|
|
||||||
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
|
|
||||||
//EasyExcel.read(fileName, JSONObject.class, new ExcelListener()).sheet().doRead();
|
|
||||||
|
|
||||||
String fileName = "C:\\Users\\lenovo\\Downloads\\2021-09-07 10_44_07-生产任务数据.xlsx";
|
|
||||||
List<Map<String, Object>> listMap = EasyExcel.read(fileName).sheet().doReadSync();
|
|
||||||
System.out.println(111);
|
|
||||||
|
|
||||||
WQLObject pointTab = WQLObject.getWQLObject("");
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -183,7 +183,11 @@ public class EmptyVehicleServiceImpl implements EmptyVehicleService {
|
|||||||
JSONObject taskObj = WQLObject.getWQLObject("sch_base_task").query("is_delete='0' and next_point_code = '" + next_point_code + "' and task_status <> '06' ").uniqueResult(0);
|
JSONObject taskObj = WQLObject.getWQLObject("sch_base_task").query("is_delete='0' and next_point_code = '" + next_point_code + "' and task_status <> '06' ").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(taskObj)) throw new BadRequestException("有未完成的运往该站点的任务,操作失败!");
|
if (ObjectUtil.isNotEmpty(taskObj)) throw new BadRequestException("有未完成的运往该站点的任务,操作失败!");
|
||||||
|
|
||||||
|
//优先从04区域(空卷轴存储区)出,找不到再从03(恒温存储区)出
|
||||||
JSONObject jsonPoint = WQL.getWO("QSCH_EMPTYVEHICLE01").addParam("flag", "2").addParam("area_type", "04").process().uniqueResult(0);
|
JSONObject jsonPoint = WQL.getWO("QSCH_EMPTYVEHICLE01").addParam("flag", "2").addParam("area_type", "04").process().uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(jsonPoint)) {
|
||||||
|
jsonPoint = WQL.getWO("QSCH_EMPTYVEHICLE01").addParam("flag", "2").addParam("area_type", "03").process().uniqueResult(0);
|
||||||
|
}
|
||||||
if (ObjectUtil.isEmpty(jsonPoint)) {
|
if (ObjectUtil.isEmpty(jsonPoint)) {
|
||||||
throw new BadRequestException("没有可用的空载具");
|
throw new BadRequestException("没有可用的空载具");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ spring:
|
|||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
##url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.57}:${DB_PORT:3306}/${DB_NAME:ch_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
##url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.57}:${DB_PORT:3306}/${DB_NAME:ch_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:ch_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:ch_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
##username: ${DB_USER:root}
|
##username: ${DB_USER:root}
|
||||||
##password: ${DB_PWD:dzhdghmt0617}
|
##password: ${DB_PWD:dzhdghmt0617}
|
||||||
password: ${DB_PWD:Root.123456}
|
password: ${DB_PWD:P@ssw0rd}
|
||||||
# 初始连接数dataSource-1
|
# 初始连接数dataSource-1
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
# 最小连接数
|
# 最小连接数
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
server:
|
server:
|
||||||
port: 8010
|
port: 8011
|
||||||
#配置数据源
|
#配置数据源
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
druid:
|
druid:
|
||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:ch_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.100.111}:${DB_PORT:3306}/${DB_NAME:ch_wms1}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
password: ${DB_PWD:Root.123456}
|
password: ${DB_PWD:123456}
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
# 最小连接数
|
# 最小连接数
|
||||||
@@ -54,7 +54,7 @@ spring:
|
|||||||
redis:
|
redis:
|
||||||
#数据库索引
|
#数据库索引
|
||||||
database: ${REDIS_DB:10}
|
database: ${REDIS_DB:10}
|
||||||
host: ${REDIS_HOST:192.168.81.155}
|
host: ${REDIS_HOST:127.0.0.1}
|
||||||
port: ${REDIS_PORT:6379}
|
port: ${REDIS_PORT:6379}
|
||||||
password: ${REDIS_PWD:}
|
password: ${REDIS_PWD:}
|
||||||
#连接超时时间
|
#连接超时时间
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||||
|
<charset>${log.charset}</charset>
|
||||||
</encoder>
|
</encoder>
|
||||||
|
|
||||||
</appender>
|
</appender>
|
||||||
|
|||||||
Reference in New Issue
Block a user