diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoDelLogTask.java b/wms/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoDelLogTask.java new file mode 100644 index 0000000..9bd6948 --- /dev/null +++ b/wms/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoDelLogTask.java @@ -0,0 +1,27 @@ +package org.nl.modules.quartz.task; + +import lombok.extern.slf4j.Slf4j; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; +import org.nl.modules.system.service.impl.ParamServiceImpl; +import org.nl.utils.SpringContextHolder; +import org.nl.wql.WQL; +import org.nl.wql.core.bean.WQLObject; +import org.springframework.stereotype.Component; + +@Slf4j +@Component +public class AutoDelLogTask { + + public void run () { + WQLObject logTab = WQLObject.getWQLObject("sys_log"); + String delete_time= SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("LOG_DELETE_TIME").getValue(); + JSONArray jsonArray = WQL.getWO("SYS_LOGS01").addParam("flag", "1").process().getResultJSONArray(0); + for (int i = 0; i < jsonArray.size(); i++) { + JSONObject json = jsonArray.getJSONObject(i); + if (Long.parseLong(delete_time) < json.getLong("time")) { + logTab.delete(json); + } + } + } +} diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/SYS_LOGS01.wql b/wms/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/SYS_LOGS01.wql new file mode 100644 index 0000000..3564c3c --- /dev/null +++ b/wms/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/SYS_LOGS01.wql @@ -0,0 +1,57 @@ +[交易说明] + 交易名: 日志 + 所属模块: + 功能简述: + 版权所有: + 表引用: + 版本经历: + +[数据库] + --指定数据库,为空采用默认值,默认为db.properties中列出的第一个库 + +[IO定义] + ################################################# + ## 表字段对应输入参数 + ################################################# + 输入.flag TYPEAS s_string + + +[临时表] + --这边列出来的临时表就会在运行期动态创建 + +[临时变量] + --所有中间过程变量均可在此处定义 + +[业务过程] + + ########################################## + # 1、输入输出检查 # + ########################################## + + + ########################################## + # 2、主过程前处理 # + ########################################## + + + ########################################## + # 3、业务主过程 # + ########################################## + + IF 输入.flag = "1" + QUERY + SELECT + TIMESTAMPDIFF(DAY,create_time,now()) AS time,request_ip,log_id + FROM + sys_log + WHERE + 1=1 + ORDER BY + create_time + LIMIT 100 + ENDSELECT + ENDQUERY + ENDIF + + + diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls b/wms/hd/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls index c8aeccb..f4f7c17 100644 Binary files a/wms/hd/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls and b/wms/hd/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls differ diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/ProduceTaskServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/ProduceTaskServiceImpl.java index c12dadf..ae20c29 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/ProduceTaskServiceImpl.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/ProduceTaskServiceImpl.java @@ -283,7 +283,7 @@ public class ProduceTaskServiceImpl implements ProduceTaskService { String produce_uuid = MapUtil.getStr(map, "produce_uuid"); //生产任务表【pdm_base_produceTask】 WQLObject produceTaskTab = WQLObject.getWQLObject("pdm_base_produceTask"); - JSONObject produceTaskObj = produceTaskTab.query("is_delete='0' and produce_status<> '02' and produce_uuid = '" + produce_uuid + "'").uniqueResult(0); + JSONObject produceTaskObj = produceTaskTab.query("is_delete='0' and produce_uuid = '" + produce_uuid + "'").uniqueResult(0); if (ObjectUtil.isEmpty(produceTaskObj)) throw new BadRequestException("生产任务已完成或被删除,操作失败!"); String point_code = produceTaskObj.optString("device_code"); @@ -383,7 +383,7 @@ public class ProduceTaskServiceImpl implements ProduceTaskService { //生产任务表【pdm_base_produceTask】 WQLObject produceTaskTab = WQLObject.getWQLObject("pdm_base_produceTask"); - JSONObject produceTaskObj = produceTaskTab.query("is_delete='0' and produce_status<> '02' and produce_uuid = '" + produce_uuid + "'").uniqueResult(0); + JSONObject produceTaskObj = produceTaskTab.query("is_delete='0' and produce_uuid = '" + produce_uuid + "'").uniqueResult(0); if (ObjectUtil.isEmpty(produceTaskObj)) throw new BadRequestException("生产任务已完成或被删除,操作失败!"); String produce_status = produceTaskObj.optString("produce_status"); if (StrUtil.equals("00", produce_status)) { @@ -423,7 +423,6 @@ public class ProduceTaskServiceImpl implements ProduceTaskService { } - //回显生产任务状态和结束生产时间 String now = DateUtil.now(); int produce_qty = produceTaskObj.optInt("produce_qty"); @@ -448,7 +447,7 @@ public class ProduceTaskServiceImpl implements ProduceTaskService { String produce_uuid = MapUtil.getStr(map, "produce_uuid"); //生产任务表【pdm_base_produceTask】 WQLObject produceTaskTab = WQLObject.getWQLObject("pdm_base_produceTask"); - JSONObject produceTaskObj = produceTaskTab.query("is_delete='0' and produce_status<> '02' and produce_uuid = '" + produce_uuid + "'").uniqueResult(0); + JSONObject produceTaskObj = produceTaskTab.query("is_delete='0' and produce_uuid = '" + produce_uuid + "'").uniqueResult(0); if (ObjectUtil.isEmpty(produceTaskObj)) throw new BadRequestException("生产任务已完成或被删除,操作失败!"); String point_code = produceTaskObj.optString("device_code"); //判断点位上有没有托盘,没有托盘不允许回库 @@ -464,11 +463,19 @@ public class ProduceTaskServiceImpl implements ProduceTaskService { WQLObject taskTab = WQLObject.getWQLObject("sch_base_task"); JSONObject taskJson = taskTab.query(" is_delete='0' and task_status<>'06' and start_point_code = '" + point_code + "' and handle_class = '" + MaterialBackTask.class.getName() + "'").uniqueResult(0); if (ObjectUtil.isNotEmpty(taskJson)) throw new BadRequestException("该设备有未完成的搬运任务,不能重复操作!"); - //判断是否有可以使用的下一个点位 //点位基础表【sch_base_point】 WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); - JSONObject nextPoint = pointTab.query("area_type ='03' and point_status ='00' and lock_type='00' and is_active='1' and is_delete='0'").uniqueResult(0); + //JSONObject nextPoint = pointTab.query("area_type ='03' and point_status ='00' and lock_type='00' and is_active='1' and is_delete='0'").uniqueResult(0); + JSONObject nextPoint = new JSONObject(); + String material_code = WQLObject.getWQLObject("md_base_materiallabelmst") + .query("label_uuid ='" + produceTaskObj.getString("label_uuid") + "'").uniqueResult(0).getString("material_code"); + if (StrUtil.equals(material_code, "1")) { + nextPoint = pointTab.query("area_type = '03' and point_status ='00' and lock_type='00' and is_active='1' and is_delete='0' and point_name like'%01层%'").uniqueResult(0); + } else { + nextPoint = pointTab.query("area_type = '03' and point_status ='00' and lock_type='00' and is_active='1' and is_delete='0' and point_name not like'%01层%'").uniqueResult(0); + + } if (ObjectUtil.isEmpty(nextPoint)) throw new BadRequestException("库内无可用位置,无法操作!"); JSONObject startPoint = pointTab.query("point_code = '" + point_code + "'").uniqueResult(0); diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/DumpinvServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/DumpinvServiceImpl.java index c4908ce..636a29f 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/DumpinvServiceImpl.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/DumpinvServiceImpl.java @@ -89,9 +89,9 @@ public class DumpinvServiceImpl implements DumpinvService { String material_code = materialObj.getString("material_code"); JSONArray turnInArr = new JSONArray(); if (StrUtil.equals(material_code,"1")){ - turnInArr = pointTab.query("area_type = '03' and point_status ='00' and lock_type='00' and is_active='1' and is_delete='0' and point_name like'%一层%'").getResultJSONArray(0); + turnInArr = pointTab.query("area_type = '03' and point_status ='00' and lock_type='00' and is_active='1' and is_delete='0' and point_name like'%01层%'").getResultJSONArray(0); }else { - turnInArr = pointTab.query("area_type = '03' and point_status ='00' and lock_type='00' and is_active='1' and is_delete='0' and point_name not like'%一层%'").getResultJSONArray(0); + turnInArr = pointTab.query("area_type = '03' and point_status ='00' and lock_type='00' and is_active='1' and is_delete='0' and point_name not like'%01层%'").getResultJSONArray(0); } diff --git a/wms/hd/nladmin-system/src/main/resources/config/application-dev.yml b/wms/hd/nladmin-system/src/main/resources/config/application-dev.yml index dee76d3..c10e7ff 100644 --- a/wms/hd/nladmin-system/src/main/resources/config/application-dev.yml +++ b/wms/hd/nladmin-system/src/main/resources/config/application-dev.yml @@ -7,7 +7,7 @@ spring: db-type: com.alibaba.druid.pool.DruidDataSource 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:localhost}:${DB_PORT:3306}/${DB_NAME:ch_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true + url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${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} ##password: ${DB_PWD:dzhdghmt0617} diff --git a/wms/hd/nladmin-system/src/main/resources/config/application.yml b/wms/hd/nladmin-system/src/main/resources/config/application.yml index f625d67..16e66f0 100644 --- a/wms/hd/nladmin-system/src/main/resources/config/application.yml +++ b/wms/hd/nladmin-system/src/main/resources/config/application.yml @@ -2,7 +2,7 @@ spring: freemarker: check-template-location: false profiles: - active: prod + active: dev jackson: time-zone: GMT+8 data: diff --git a/wms/qd/package.json b/wms/qd/package.json index 32b3473..513dff7 100644 --- a/wms/qd/package.json +++ b/wms/qd/package.json @@ -102,7 +102,7 @@ "lint-staged": "8.1.5", "plop": "2.3.0", "runjs": "^4.3.2", - "sass": "^1.26.10", + "sass": "~1.26.5", "sass-loader": "^7.1.0", "script-ext-html-webpack-plugin": "2.1.3", "script-loader": "0.7.2", diff --git a/wms/qd/src/views/wms/pdm/produceTask/bigScreen.vue b/wms/qd/src/views/wms/pdm/produceTask/bigScreen.vue index 64e09df..223d0e7 100644 --- a/wms/qd/src/views/wms/pdm/produceTask/bigScreen.vue +++ b/wms/qd/src/views/wms/pdm/produceTask/bigScreen.vue @@ -32,8 +32,12 @@ :data="tableData" size="small" style="width: 100%;" - @selection-change="changeFun" + @selection-change="handleSelectionChange" > + + @@ -125,11 +129,11 @@ export default { this.notify('操作成功', 'success') }, callMaterial() { - if (this.tableData.length < 1) { - this.notify('没有执行中的任务', 'info') + if (this.$refs.table.selection.length === 0) { + this.notify('请选中一条记录!', 'info') return } - const data = this.tableData[0] + const data = this.$refs.table.selection[0] crudProduceTask.callMaterial(data).then(res => { this.notify('操作成功', 'success') this.queryId() @@ -138,11 +142,11 @@ export default { }) }, finish() { - if (this.tableData.length < 1) { - this.notify('没有执行中的任务', 'info') + if (this.$refs.table.selection.length === 0) { + this.notify('请选中一条记录!', 'info') return } - const data = this.tableData[0] + const data = this.$refs.table.selection[0] crudProduceTask.finish(data).then(res => { this.notify('操作成功', 'success') this.queryId() @@ -151,11 +155,11 @@ export default { }) }, materialBack() { - if (this.tableData.length < 1) { - this.notify('没有执行中的任务', 'info') + if (this.$refs.table.selection.length === 0) { + this.notify('请选中一条记录!', 'info') return } - const data = this.tableData[0] + const data = this.$refs.table.selection[0] crudProduceTask.materialBack(data).then(res => { this.notify('操作成功', 'success') this.queryId() @@ -176,6 +180,14 @@ export default { return this.$message.error('请选择一条信息操作') } }, + handleSelectionChange(val) { + this.multipleSelection = val + if (val.length > 1) { + this.$refs.table.clearSelection() + this.$refs.table.toggleRowSelection(val.pop()) + } + }, + queryId() { const id = this.$route.params.id crudProduceTask.queryIdDevice(id).then(res => {