洁美代码更新

This commit is contained in:
ludj
2023-04-17 16:47:53 +08:00
parent 431682131a
commit e94c33a2a5
11 changed files with 87 additions and 56 deletions

View File

@@ -3,6 +3,7 @@ package org.nl.wms.sch.tasks;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@@ -54,26 +55,35 @@ public class InEmptyVehicleTask extends AbstractAcsTask {
//更新空载具表状态
JSONObject jsonEtv = etvTab.query("task_uuid='" + taskObj.getString("task_uuid") + "'").uniqueResult(0);
jsonEtv.put("update_by", SecurityUtils.getCurrentUsername());
jsonEtv.put("update_time", DateUtil.now());
jsonEtv.put("bill_status", EmptyVehicleBillStatusEnum.FINISHED.getCode());
etvTab.update(jsonEtv);
if (ObjectUtil.isNotEmpty(jsonEtv)) {
jsonEtv.put("update_by", SecurityUtils.getCurrentUsername());
jsonEtv.put("update_time", DateUtil.now());
jsonEtv.put("bill_status", EmptyVehicleBillStatusEnum.FINISHED.getCode());
etvTab.update(jsonEtv);
}
//解锁货位
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
//解锁起始点位
JSONObject startPoint = pointTab.query("point_code='" + jsonEtv.getString("start_point_code") + "'").uniqueResult(0);
startPoint.put("lock_type", "00");
startPoint.put("point_status", "00");
startPoint.put("vehicle_code", "");
pointTab.update(startPoint);
JSONObject startPoint = pointTab.query("point_code='" + taskObj.getString("start_point_code") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(startPoint)) {
startPoint.put("lock_type", "00");
startPoint.put("point_status", "00");
startPoint.put("vehicle_code", "");
pointTab.update(startPoint);
}
//解锁下一点位
JSONObject nextPoint = pointTab.query("point_code='" + jsonEtv.getString("next_point_code") + "'").uniqueResult(0);
nextPoint.put("lock_type", "00");
nextPoint.put("point_status", "01");
nextPoint.put("vehicle_code", jsonEtv.getString("vehicle_code"));
pointTab.update(nextPoint);
JSONObject nextPoint = pointTab.query("point_code='" + taskObj.getString("next_point_code") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(nextPoint)) {
nextPoint.put("lock_type", "00");
nextPoint.put("point_status", "01");
nextPoint.put("vehicle_code", taskObj.getString("vehicle_code"));
pointTab.update(nextPoint);
}
}
@@ -175,7 +185,7 @@ public class InEmptyVehicleTask extends AbstractAcsTask {
//锁住起始点位
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
JSONObject jsonPoint = pointTab.query("point_code = '" + start_point_code + "'").uniqueResult(0);
jsonPoint.put("lock_type","01");
jsonPoint.put("lock_type", "01");
pointTab.update(jsonPoint);
return jsonTask.getString("task_uuid");

View File

@@ -231,6 +231,16 @@ public class InTask extends AbstractAcsTask {
if (!StrUtil.isEmpty(next_point_code)) {
task_status = TaskStatusEnum.START_AND_POINT.getCode();
}
WQLObject taskTab = WQLObject.getWQLObject("sch_base_task");
String start_point_code = form.getString("start_point_code");
/* if (ObjectUtil.isNotEmpty(start_point_code)) {
JSONArray taskArry = taskTab.query("task_status <> '06' AND handle_class='" + THIS_CLASS + "' AND is_delete='0' AND start_point_code = '" + start_point_code + "'").getResultJSONArray(0);
if (ObjectUtil.isNotEmpty(taskArry)) {
throw new BadRequestException("该点位【" + start_point_code + "】存在未完成的任务!");
}
}*/
taskObj.put("task_status", task_status);
taskObj.put("start_point_code", form.getString("start_point_code"));
taskObj.put("next_point_code", form.getString("next_point_code"));

View File

@@ -3,6 +3,7 @@ package org.nl.wms.sch.tasks;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@@ -58,26 +59,33 @@ public class OutEmptyVehicleTask extends AbstractAcsTask {
//更新空载具表状态
JSONObject jsonEtv = etvTab.query("task_uuid='" + taskObj.getString("task_uuid") + "'").uniqueResult(0);
jsonEtv.put("update_by", SecurityUtils.getCurrentUsername());
jsonEtv.put("update_time", DateUtil.now());
jsonEtv.put("bill_status", EmptyVehicleBillStatusEnum.FINISHED.getCode());
etvTab.update(jsonEtv);
if (ObjectUtil.isNotEmpty(jsonEtv)) {
jsonEtv.put("update_by", SecurityUtils.getCurrentUsername());
jsonEtv.put("update_time", DateUtil.now());
jsonEtv.put("bill_status", EmptyVehicleBillStatusEnum.FINISHED.getCode());
etvTab.update(jsonEtv);
}
//解锁货位
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
//解锁起始点位
JSONObject startPoint = pointTab.query("point_code='" + jsonEtv.getString("start_point_code") + "'").uniqueResult(0);
startPoint.put("lock_type", "00");
startPoint.put("point_status", "00");
startPoint.put("vehicle_code", "");
pointTab.update(startPoint);
JSONObject startPoint = pointTab.query("point_code='" + taskObj.getString("start_point_code") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(startPoint)) {
startPoint.put("lock_type", "00");
startPoint.put("point_status", "00");
startPoint.put("vehicle_code", "");
pointTab.update(startPoint);
}
//解锁下一点位
JSONObject nextPoint = pointTab.query("point_code='" + jsonEtv.getString("next_point_code") + "'").uniqueResult(0);
startPoint.put("lock_type", "00");
startPoint.put("point_status", "01");
startPoint.put("vehicle_code", jsonEtv.getString("vehicle_code"));
pointTab.update(nextPoint);
JSONObject nextPoint = pointTab.query("point_code='" + taskObj.getString("next_point_code") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(nextPoint)) {
nextPoint.put("lock_type", "00");
nextPoint.put("point_status", "01");
nextPoint.put("vehicle_code", taskObj.getString("vehicle_code"));
pointTab.update(nextPoint);
}
}
@@ -113,7 +121,7 @@ public class OutEmptyVehicleTask extends AbstractAcsTask {
JSONObject jsonPoint = WQL.getWO("QSCH_OUTEMPTY01").addParamMap(param).process().uniqueResult(0);
//如果没有找到空托盘删除改出库指令
if (MapUtil.isEmpty(jsonPoint)) {
return;
return;
}
String start_point_code = jsonPoint.getString("point_code");

View File

@@ -2,6 +2,7 @@ package org.nl.wms.sch.tasks;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.modules.system.util.CodeUtil;
@@ -67,17 +68,21 @@ public class OutStByVehicleTask extends AbstractAcsTask {
JSONObject taskjo = taskTab.query("task_uuid='" + taskObj.getString("task_uuid") + "'").uniqueResult(0);
//解锁起始点位
JSONObject startPoint = pointTab.query("point_code='" + taskjo.getString("start_point_code") + "'").uniqueResult(0);
startPoint.put("lock_type", "00");
startPoint.put("point_status", "00");
startPoint.put("vehicle_code", "");
pointTab.update(startPoint);
if (ObjectUtil.isNotEmpty(startPoint)) {
startPoint.put("lock_type", "00");
startPoint.put("point_status", "00");
startPoint.put("vehicle_code", "");
pointTab.update(startPoint);
}
//解锁下一点位
JSONObject nextPoint = pointTab.query("point_code='" + taskjo.getString("next_point_code") + "'").uniqueResult(0);
startPoint.put("lock_type", "00");
startPoint.put("point_status", "01");
startPoint.put("vehicle_code", taskObj.getString("vehicle_code"));
pointTab.update(nextPoint);
if (ObjectUtil.isNotEmpty(nextPoint)) {
nextPoint.put("lock_type", "00");
nextPoint.put("point_status", "01");
nextPoint.put("vehicle_code", taskObj.getString("vehicle_code"));
pointTab.update(nextPoint);
}
}

View File

@@ -12,20 +12,20 @@ dataSource2:
password: root
extSystem:
is-connect: true
is-connect: false
#配置数据源
spring:
datasource:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:jm_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
# url: jdbc:log4jdbc:mysql://${DB_HOST:47.97.157.227}:${DB_PORT:3306}/${DB_NAME:jm_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
# url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:jm_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:jm_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
#url: jdbc:log4jdbc:mysql://${DB_HOST:47.97.157.227}:${DB_PORT:3306}/${DB_NAME:jm_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
username: ${DB_USER:root}
#password: ${DB_PWD:Root.123456}
password: ${DB_PWD:root}
password: ${DB_PWD:P@ssw0rd}
# 初始连接数
initial-size: 5
# 最小连接数

View File

@@ -2,7 +2,7 @@ spring:
freemarker:
check-template-location: false
profiles:
active: prod
active: dev
jackson:
time-zone: GMT+8
data:

View File

@@ -23,7 +23,7 @@ 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>
@@ -44,6 +44,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>
@@ -58,13 +59,9 @@ https://juejin.cn/post/6844903775631572999
<!--生产环境:打印控制台和输出到文件-->
<springProfile name="prod">
<root level="off">
<appender-ref ref="CONSOLE"/>
<root level="info">
<appender-ref ref="asyncFileAppender"/>
</root>
</springProfile>
<!--开发环境:打印控制台-->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 128 KiB

View File

@@ -8,9 +8,9 @@
<template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" />
<el-tooltip content="项目文档" effect="dark" placement="bottom">
<!--<el-tooltip content="项目文档" effect="dark" placement="bottom">
<Doc class="right-menu-item hover-effect" />
</el-tooltip>
</el-tooltip>-->
<el-tooltip content="全屏缩放" effect="dark" placement="bottom">
<screenfull id="screenfull" class="right-menu-item hover-effect" />

View File

@@ -112,7 +112,7 @@
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button
<!--<el-button
slot="right"
class="filter-item"
type="info"
@@ -122,7 +122,7 @@
@click="sync()"
>
仓位同步
</el-button>
</el-button>-->
<el-button
slot="right"
class="filter-item"

View File

@@ -148,6 +148,7 @@
<el-table-column prop="next_point_code" label="下一点编码" width="100" />
<el-table-column prop="next_point_name" label="下一点名称" width="105" />
<el-table-column prop="vehicle_code" label="载具编码" min-width="100" show-overflow-tooltip />
<el-table-column prop="create_time" label="创建时间" width="135" />
<el-table-column prop="remark" label="备注" width="200" />
<el-table-column prop="update_by" label="修改者" />
<el-table-column prop="update_time" label="修改时间" width="135" />