代码更新
This commit is contained in:
@@ -20,7 +20,7 @@ import org.nl.wql.core.bean.WQLObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 测试用
|
||||
* 日志清理
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-08
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.nl.modules.quartz.task;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 自动释放点位锁
|
||||
*
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-08
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AutoUnLockPoint {
|
||||
|
||||
public void run() {
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
||||
JSONArray arr = WQL.getWO("QTASK_01").addParam("flag", "1").process().getResultJSONArray(0);
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject json = arr.getJSONObject(i);
|
||||
json.put("lock_type", "00");
|
||||
pointTab.update(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
[交易说明]
|
||||
交易名: 解锁无任务的点位
|
||||
所属模块:
|
||||
功能简述:
|
||||
版权所有:
|
||||
表引用:
|
||||
版本经历:
|
||||
|
||||
[数据库]
|
||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||
|
||||
[IO定义]
|
||||
#################################################
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.point_uuid TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
[临时变量]
|
||||
--所有中间过程变量均可在此处定义
|
||||
|
||||
[业务过程]
|
||||
|
||||
##########################################
|
||||
# 1、输入输出检查 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 2、主过程前处理 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "1"
|
||||
QUERY
|
||||
SELECT point_code,point_uuid from sch_base_point WHERE lock_type='01' and point_code not in (
|
||||
|
||||
SELECT start_point_code as point_code from sch_base_task task WHERE is_delete='0' and task_status <>'06'
|
||||
union
|
||||
SELECT next_point_code as point_code from sch_base_task task WHERE is_delete='0' and task_status <>'06'
|
||||
)
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -159,11 +159,6 @@ public class QualityTestOrderServiceImpl implements QualityTestOrderService {
|
||||
if (ObjectUtil.isEmpty(ivtObj))
|
||||
throw new BadRequestException("未在熟化区找到配方为【" + formula + "】,批次为【" + pcsn + "】的库存信息");
|
||||
|
||||
|
||||
JSONObject jsonPoint = WQLObject.getWQLObject("sch_base_point").query("point_uuid='" + ivtObj.optString("struct_uuid") + "' and point_status ='02' and lock_type='00'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonPoint)) {
|
||||
throw new BadRequestException("该点位无法操作,请检查点位状态");
|
||||
}
|
||||
//仓库质检单表【st_qt_qualityTestOrder】
|
||||
WQLObject qtoTab = WQLObject.getWQLObject("st_qt_qualityTestOrder");
|
||||
JSONObject qtoObj = new JSONObject();
|
||||
@@ -184,9 +179,10 @@ public class QualityTestOrderServiceImpl implements QualityTestOrderService {
|
||||
//创建质检单后锁住货位
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
||||
JSONObject param = new JSONObject();
|
||||
jsonPoint.put("lock_type", "01");
|
||||
jsonPoint.put("remark", "创建质检单锁住点位");
|
||||
pointTab.update(jsonPoint);
|
||||
param.put("point_uuid", ivtObj.optString("struct_uuid"));
|
||||
param.put("lock_type", "01");
|
||||
param.put("remark", "创建质检单锁住点位");
|
||||
pointTab.update(param);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,8 @@
|
||||
LEFT JOIN sch_base_point AS point ON ivt.struct_uuid = point.point_uuid
|
||||
WHERE
|
||||
point.area_type IN ( '02', '01' )
|
||||
|
||||
and point_status='02'
|
||||
and lock_type='00'
|
||||
OPTION 输入.label_uuid <> ""
|
||||
ivt.label_uuid = 输入.label_uuid
|
||||
ENDOPTION
|
||||
|
||||
@@ -41,10 +41,14 @@ public class DumpInvTask extends AbstractAcsTask {
|
||||
|
||||
//更新转储单状态相关信息
|
||||
JSONObject dumpObj = dumpInvTab.query("task_uuid = '" + taskObj.optString("task_uuid") + "'").uniqueResult(0);
|
||||
dumpObj.put("update_time", DateUtil.now());
|
||||
dumpObj.put("bill_status", DumpInvBillStatusEnum.TASK_EXECUTING.getCode());
|
||||
dumpObj.put("update_by", SecurityUtils.getCurrentUsername());
|
||||
dumpInvTab.update(dumpObj);
|
||||
if (ObjectUtil.isNotEmpty(dumpObj)) {
|
||||
dumpObj.put("update_time", DateUtil.now());
|
||||
dumpObj.put("bill_status", DumpInvBillStatusEnum.TASK_EXECUTING.getCode());
|
||||
dumpObj.put("update_by", SecurityUtils.getCurrentUsername());
|
||||
dumpInvTab.update(dumpObj);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//完成
|
||||
if (TaskStatusEnum.FINISHED.getCode().equals(status)) {
|
||||
@@ -56,7 +60,7 @@ public class DumpInvTask extends AbstractAcsTask {
|
||||
|
||||
//更新转储单状态相关信息
|
||||
JSONObject dumpObj = dumpInvTab.query("task_uuid = '" + taskObj.optString("task_uuid") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(dumpObj)){
|
||||
if (ObjectUtil.isNotEmpty(dumpObj)) {
|
||||
dumpObj.put("update_time", DateUtil.now());
|
||||
dumpObj.put("bill_status", DumpInvBillStatusEnum.FINISHED.getCode());
|
||||
dumpObj.put("update_by", SecurityUtils.getCurrentUsername());
|
||||
@@ -67,25 +71,29 @@ public class DumpInvTask extends AbstractAcsTask {
|
||||
// 点位基础表【sch_base_point】
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
||||
JSONObject startPoint = pointTab.query("point_code='" + taskObj.optString("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='" + taskObj.optString("next_point_code") + "'").uniqueResult(0);
|
||||
nextPoint.put("lock_type", "00");
|
||||
nextPoint.put("point_status", "02");
|
||||
nextPoint.put("vehicle_code", taskObj.optString("vehicle_code"));
|
||||
pointTab.update(nextPoint);
|
||||
if (ObjectUtil.isNotEmpty(nextPoint)) {
|
||||
nextPoint.put("lock_type", "00");
|
||||
nextPoint.put("point_status", "02");
|
||||
nextPoint.put("vehicle_code", taskObj.optString("vehicle_code"));
|
||||
pointTab.update(nextPoint);
|
||||
}
|
||||
|
||||
|
||||
//更新库存,因为是转储,直接更新货位即可
|
||||
//仓位库存表【st_ivt_structIvt】
|
||||
WQLObject ivtTab = WQLObject.getWQLObject("st_ivt_structIvt");
|
||||
if (ObjectUtil.isNotEmpty(dumpObj)){
|
||||
if (ObjectUtil.isNotEmpty(dumpObj)) {
|
||||
JSONObject turnOutIvtObj = ivtTab.query("struct_uuid = '" + dumpObj.optString("turnout_struct_uuid") + "'").uniqueResult(0);
|
||||
|
||||
|
||||
if (!ObjectUtil.isEmpty(turnOutIvtObj)){
|
||||
if (!ObjectUtil.isEmpty(turnOutIvtObj)) {
|
||||
StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
|
||||
JSONObject ivtObj = new JSONObject();
|
||||
ivtObj.put("struct_uuid", dumpObj.optString("turnin_struct_uuid"));
|
||||
@@ -107,9 +115,7 @@ public class DumpInvTask extends AbstractAcsTask {
|
||||
//转出仓位扣减库存
|
||||
/*ivtService.addIvtFlow(ivtObj, IvtChangeTypeEnum.SUB_IVT_AND_CAN_USE);
|
||||
ivtObj.put("struct_uuid", dumpObj.optString("turnin_struct_uuid"));*/
|
||||
WQLObject.getWQLObject("st_ivt_structIvt").delete("struct_uuid = '"+startPoint.getString("point_uuid")+"'");
|
||||
|
||||
|
||||
WQLObject.getWQLObject("st_ivt_structIvt").delete("struct_uuid = '" + startPoint.getString("point_uuid") + "'");
|
||||
|
||||
|
||||
}
|
||||
@@ -147,6 +153,17 @@ public class DumpInvTask extends AbstractAcsTask {
|
||||
taskObj.put("create_by", SecurityUtils.getCurrentUsername());
|
||||
taskObj.put("update_time", DateUtil.now());
|
||||
|
||||
|
||||
//锁住起点终点
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
||||
JSONObject pointParam = new JSONObject();
|
||||
pointParam.put("lock_type", "01");
|
||||
pointParam.put("update_time", DateUtil.now());
|
||||
pointParam.put("remark", "转储锁起点");
|
||||
pointTab.update(pointParam, "point_code='" + param.optString("start_point_code") + "'");
|
||||
pointParam.put("remark", "转储锁终点");
|
||||
pointTab.update(pointParam, "point_code='" + param.optString("next_point_code") + "'");
|
||||
|
||||
//任务基础表【sch_base_task】
|
||||
WQLObject.getWQLObject("sch_base_task").insert(taskObj);
|
||||
return taskObj.optString("task_uuid");
|
||||
@@ -177,10 +194,9 @@ public class DumpInvTask extends AbstractAcsTask {
|
||||
point_codeflag = point_codeflag.substring(point_codeflag.length() - 2);
|
||||
JSONObject nextPoint = new JSONObject();
|
||||
if (StrUtil.equals("01", point_codeflag)) {
|
||||
nextPoint = WQL.getWO("QSCH_DUMP01").addParam("flag", "4").addParam("area_type", "03").process().uniqueResult(0);
|
||||
}
|
||||
else {
|
||||
nextPoint = WQL.getWO("QSCH_DUMP01").addParam("flag", "3").addParam("area_type", "03").process().uniqueResult(0);
|
||||
nextPoint = WQL.getWO("QSCH_DUMP01").addParam("flag", "4").addParam("area_type", "03").process().uniqueResult(0);
|
||||
} else {
|
||||
nextPoint = WQL.getWO("QSCH_DUMP01").addParam("flag", "3").addParam("area_type", "03").process().uniqueResult(0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -173,11 +173,12 @@ public class DumpinvServiceImpl implements DumpinvService {
|
||||
//点位基础表【sch_base_point】
|
||||
JSONObject startPoint = pointTab.query("point_uuid = '" + json.optString("turnout_struct_uuid") + "'").uniqueResult(0);
|
||||
startPoint.put("lock_type", "01");
|
||||
pointTab.update(startPoint);
|
||||
pointTab.update(startPoint,"point_uuid ='"+startPoint.getString("point_uuid")+"'");
|
||||
JSONObject nextPoint = pointTab.query("point_uuid = '" + json.optString("turnin_struct_uuid") + "'").uniqueResult(0);
|
||||
nextPoint.put("lock_type", "01");
|
||||
pointTab.update(nextPoint);
|
||||
pointTab.update(nextPoint,"point_uuid ='"+nextPoint.getString("point_uuid")+"'");
|
||||
|
||||
pointTab.update(nextPoint);
|
||||
}
|
||||
|
||||
|
||||
|
||||
BIN
wms/qd/lms前端.zip
BIN
wms/qd/lms前端.zip
Binary file not shown.
@@ -1,11 +1,36 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<div id="app" @mousemove="moveEvent" @click="moveEvent">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App'
|
||||
name: 'App',
|
||||
data() {
|
||||
return {
|
||||
timmer: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
moveEvent: function() {
|
||||
const path = ['/login']
|
||||
if (!path.includes(this.$route.path)) {
|
||||
clearTimeout(this.timmer)
|
||||
this.init()
|
||||
}
|
||||
},
|
||||
init: function() {
|
||||
this.timmer = setTimeout(() => {
|
||||
sessionStorage.clear()
|
||||
this.logout()
|
||||
}, 1000 * 60 * 30) // 30分钟 https://blog.csdn.net/qq_42345108/article/details/103496456
|
||||
},
|
||||
logout() {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user