入库优化
This commit is contained in:
@@ -43,12 +43,17 @@
|
||||
<!-- <artifactId>mysql-connector-java</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- sql server驱动包 -->
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>12.10.1.jre11</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.microsoft.sqlserver</groupId>-->
|
||||
<!-- <artifactId>mssql-jdbc</artifactId>-->
|
||||
<!-- <version>12.10.1.jre11</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>8.4.1.jre8</version>
|
||||
</dependency>
|
||||
<!-- 核心模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
|
||||
@@ -31,6 +31,6 @@ public class RuoYiApplication
|
||||
{
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 福来瑞达WCS系统启动成功 ლ(´ڡ`ლ)゙ ");
|
||||
System.out.println("(♥◠‿◠)ノ゙ 福莱瑞达WCS系统启动成功 ლ(´ڡ`ლ)゙ ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,6 +116,8 @@ public class PortConvThread implements Runnable {
|
||||
// inSsjDevice.setException(0);
|
||||
// inSsjDevice.setRkqq(1);
|
||||
|
||||
//输送机状态
|
||||
if (!convChecked(inSsjDevice)) return;
|
||||
//更新入库任务阶段
|
||||
updateMydoJob(inSsjDevice);
|
||||
//请求wms获取入库任务
|
||||
@@ -133,11 +135,13 @@ public class PortConvThread implements Runnable {
|
||||
|
||||
boolean flag = false;
|
||||
//---------------------------入口取输送机(叉车取放货位置)---------------------------
|
||||
//输送机【非空闲】、【输送到位】、【入库请求?】
|
||||
if (inSsjDevice.getKx() != 0) return flag;
|
||||
//输送机【条码】空
|
||||
if (inSsjDevice.getTrayCode() == "" || inSsjDevice.getTrayCode() == null) return flag;
|
||||
|
||||
//【入库请求】,表示输送到位和空闲
|
||||
if (inSsjDevice.getRkqq() != 1) return flag;
|
||||
|
||||
//【输送高度】
|
||||
if (inSsjDevice.getHeight() == 0) return flag;
|
||||
|
||||
return true;
|
||||
@@ -150,7 +154,11 @@ public class PortConvThread implements Runnable {
|
||||
*/
|
||||
private void requestMydoJob(DeviceSsj inSsjDevice){
|
||||
|
||||
if (!convChecked(inSsjDevice)) return;
|
||||
//请求成功已经生成该任务则不继续执行
|
||||
boolean isEmpty = mydoJobService.selectInOrOutMydoJobList(
|
||||
new MydoJob().builder().trayCode(inSsjDevice.getTrayCode()).build()
|
||||
).isEmpty();
|
||||
if (!isEmpty) return;
|
||||
|
||||
String errorMessage = "";
|
||||
|
||||
@@ -178,6 +186,7 @@ public class PortConvThread implements Runnable {
|
||||
log.warn("【警告】该托盘号已有库存,托盘条码:{}",inSsjDevice.getTrayCode());
|
||||
}
|
||||
|
||||
|
||||
/*-----------------请求生成wcs任务----------------- */
|
||||
ajaxResult = apiService.createMydoJobForStockin(paramMap);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
@@ -236,12 +245,10 @@ public class PortConvThread implements Runnable {
|
||||
*/
|
||||
private void updateMydoJob(DeviceSsj inSsjDevice){
|
||||
|
||||
if (!convChecked(inSsjDevice)) return;
|
||||
|
||||
//检查是否有已经创建成功的任务(请求成功的入库任务) - 更新到下一个执行阶段
|
||||
MydoJob mydoJobStockin = new MydoJob().builder()
|
||||
.trayCode(inSsjDevice.getTrayCode())
|
||||
.status(TASK_EP_CREATED)
|
||||
.status(TASK_STATUS_CREATED)
|
||||
.executionPhase(TASK_EP_CREATED)
|
||||
.build();
|
||||
if(!mydoJobService.selectMydoJobList(mydoJobStockin).isEmpty()){
|
||||
@@ -264,6 +271,7 @@ public class PortConvThread implements Runnable {
|
||||
|
||||
/**
|
||||
* 输送机出库到位 - 任务出库完成
|
||||
* 出库完成在升降位置,即【TD1001】判断完成
|
||||
* @param outSsjDevice
|
||||
*/
|
||||
private void finishStockoutMydoJob(DeviceSsj outSsjDevice){
|
||||
@@ -422,10 +430,18 @@ public class PortConvThread implements Runnable {
|
||||
|
||||
public void outDispatch(DeviceSsj ssjDevice) {
|
||||
|
||||
//出库完成
|
||||
finishStockoutMydoJob(ssjDevice);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private static final Map<String, Pattern> PATTERNS = createPatterns();
|
||||
|
||||
private static Map<String, Pattern> createPatterns() {
|
||||
|
||||
@@ -12,9 +12,9 @@ spring:
|
||||
# password: Flrd0914.
|
||||
|
||||
# 本机
|
||||
url: jdbc:sqlserver://localhost:1433;databaseName=FT568-wcs;encrypt=true;trustServerCertificate=true;
|
||||
url: jdbc:sqlserver://127.0.0.1:1433;databaseName=FT568-wcs;encrypt=true;trustServerCertificate=true;
|
||||
username: sa
|
||||
password: 123456
|
||||
password: Aa123456
|
||||
|
||||
# 生产
|
||||
# url: jdbc:sqlserver://192.168.58.10:1433;databaseName=FT568-wcs;encrypt=true;trustServerCertificate=true;
|
||||
|
||||
Reference in New Issue
Block a user