代码更新
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
package org.nl.modules.quartz.task;
|
package org.nl.modules.quartz.task;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,17 +26,9 @@ import org.springframework.stereotype.Component;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class TestTask {
|
public class AutoCleanLog {
|
||||||
|
|
||||||
public void run(){
|
public void run(){
|
||||||
log.info("run 执行成功");
|
WQLObject.getWQLObject("sys_log").delete("1=1");
|
||||||
}
|
|
||||||
|
|
||||||
public void run1(String str){
|
|
||||||
log.info("run1 执行成功,参数为: {}" + str);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void run2(){
|
|
||||||
log.info("run2 执行成功");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
[交易说明]
|
|
||||||
交易名: 日志
|
|
||||||
所属模块:
|
|
||||||
功能简述:
|
|
||||||
版权所有:
|
|
||||||
表引用:
|
|
||||||
版本经历:
|
|
||||||
|
|
||||||
[数据库]
|
|
||||||
--指定数据库,为空采用默认值,默认为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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -26,15 +26,19 @@ import org.nl.modules.quartz.domain.QuartzJob;
|
|||||||
import org.nl.modules.quartz.domain.QuartzLog;
|
import org.nl.modules.quartz.domain.QuartzLog;
|
||||||
import org.nl.modules.quartz.repository.QuartzLogRepository;
|
import org.nl.modules.quartz.repository.QuartzLogRepository;
|
||||||
import org.nl.modules.quartz.service.QuartzJobService;
|
import org.nl.modules.quartz.service.QuartzJobService;
|
||||||
import org.nl.service.EmailService;
|
|
||||||
import org.nl.utils.RedisUtils;
|
import org.nl.utils.RedisUtils;
|
||||||
import org.nl.utils.SpringContextHolder;
|
import org.nl.utils.SpringContextHolder;
|
||||||
import org.nl.utils.ThrowableUtil;
|
import org.nl.utils.ThrowableUtil;
|
||||||
import org.quartz.JobExecutionContext;
|
import org.quartz.JobExecutionContext;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.scheduling.quartz.QuartzJobBean;
|
import org.springframework.scheduling.quartz.QuartzJobBean;
|
||||||
import java.util.*;
|
|
||||||
import java.util.concurrent.*;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.Future;
|
||||||
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参考人人开源,https://gitee.com/renrenio/renren-security
|
* 参考人人开源,https://gitee.com/renrenio/renren-security
|
||||||
@@ -106,12 +110,12 @@ public class ExecutionJob extends QuartzJobBean {
|
|||||||
//更新状态
|
//更新状态
|
||||||
quartzJobService.updateIsPause(quartzJob);
|
quartzJobService.updateIsPause(quartzJob);
|
||||||
}
|
}
|
||||||
if(quartzJob.getEmail() != null){
|
/*if(quartzJob.getEmail() != null){
|
||||||
EmailService emailService = SpringContextHolder.getBean(EmailService.class);
|
EmailService emailService = SpringContextHolder.getBean(EmailService.class);
|
||||||
// 邮箱报警
|
// 邮箱报警
|
||||||
EmailVo emailVo = taskAlarm(quartzJob, ThrowableUtil.getStackTrace(e));
|
EmailVo emailVo = taskAlarm(quartzJob, ThrowableUtil.getStackTrace(e));
|
||||||
emailService.send(emailVo, emailService.find());
|
emailService.send(emailVo, emailService.find());
|
||||||
}
|
}*/
|
||||||
quartzLogRepository.save(log);
|
quartzLogRepository.save(log);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import net.sf.json.JSONObject;
|
|||||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||||
import org.nl.wms.sch.service.TaskService;
|
import org.nl.wms.sch.service.TaskService;
|
||||||
import org.nl.wms.sch.service.dto.TaskDto;
|
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -48,7 +47,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
JSONArray errArr = new JSONArray();
|
JSONArray errArr = new JSONArray();
|
||||||
for (int i = 0; i < array.size(); i++) {
|
for (int i = 0; i < array.size(); i++) {
|
||||||
JSONObject row = array.getJSONObject(i);
|
JSONObject row = array.getJSONObject(i);
|
||||||
String task_uuid = row.optString("task_uuid");
|
String task_uuid = row.optString("ext_task_uuid");
|
||||||
|
|
||||||
WQLObject wo = WQLObject.getWQLObject("sch_base_task");
|
WQLObject wo = WQLObject.getWQLObject("sch_base_task");
|
||||||
JSONObject taskObj = wo.query("task_uuid ='" + task_uuid + "'").uniqueResult(0);
|
JSONObject taskObj = wo.query("task_uuid ='" + task_uuid + "'").uniqueResult(0);
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import net.sf.json.JSONObject;
|
|||||||
import org.nl.exception.BadRequestException;
|
import org.nl.exception.BadRequestException;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.utils.SecurityUtils;
|
import org.nl.utils.SecurityUtils;
|
||||||
import org.nl.utils.SpringContextHolder;
|
|
||||||
import org.nl.wms.pc.service.PCOutStoreService;
|
import org.nl.wms.pc.service.PCOutStoreService;
|
||||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||||
import org.nl.wms.sch.service.PointService;
|
import org.nl.wms.sch.service.PointService;
|
||||||
@@ -22,8 +21,6 @@ import org.nl.wms.sch.tasks.OutTask;
|
|||||||
import org.nl.wms.sch.tasks.TaskTypeEnum;
|
import org.nl.wms.sch.tasks.TaskTypeEnum;
|
||||||
import org.nl.wms.st.core.IOStoreMst;
|
import org.nl.wms.st.core.IOStoreMst;
|
||||||
import org.nl.wms.st.core.service.IOStoreService;
|
import org.nl.wms.st.core.service.IOStoreService;
|
||||||
import org.nl.wms.st.ivt.IvtChangeTypeEnum;
|
|
||||||
import org.nl.wms.st.ivt.StoreIvtServiceImpl;
|
|
||||||
import org.nl.wms.st.util.StructFindUtil;
|
import org.nl.wms.st.util.StructFindUtil;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -103,7 +100,7 @@ public class PCOutStoreServiceImpl implements PCOutStoreService {
|
|||||||
//更新分配表
|
//更新分配表
|
||||||
disTable.update(disjo, "bill_uuid = '" + bill_uuid + "'");
|
disTable.update(disjo, "bill_uuid = '" + bill_uuid + "'");
|
||||||
//减少库存可用数量
|
//减少库存可用数量
|
||||||
StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
|
/*StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("material_uuid", disjo.optString("material_uuid"));
|
param.put("material_uuid", disjo.optString("material_uuid"));
|
||||||
param.put("bill_uuid", disjo.optString("bill_uuid"));
|
param.put("bill_uuid", disjo.optString("bill_uuid"));
|
||||||
@@ -117,7 +114,7 @@ public class PCOutStoreServiceImpl implements PCOutStoreService {
|
|||||||
param.put("label_uuid",disjo.optString("label_uuid"));
|
param.put("label_uuid",disjo.optString("label_uuid"));
|
||||||
param.put("labeldtl_uuid",disjo.optString("labeldtl_uuid"));
|
param.put("labeldtl_uuid",disjo.optString("labeldtl_uuid"));
|
||||||
param.put("label_code",disjo.optString("label_code"));
|
param.put("label_code",disjo.optString("label_code"));
|
||||||
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_CAN_USE);
|
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_CAN_USE);*/
|
||||||
//下发任务
|
//下发任务
|
||||||
JSONObject taskObj = new JSONObject();
|
JSONObject taskObj = new JSONObject();
|
||||||
String task_status = TaskStatusEnum.START_AND_POINT.getCode();
|
String task_status = TaskStatusEnum.START_AND_POINT.getCode();
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ import org.nl.wms.sch.manage.TaskStatusEnum;
|
|||||||
import org.nl.wms.sch.service.PointService;
|
import org.nl.wms.sch.service.PointService;
|
||||||
import org.nl.wms.sch.service.dto.PointDto;
|
import org.nl.wms.sch.service.dto.PointDto;
|
||||||
import org.nl.wms.sch.tasks.QualityTestTask;
|
import org.nl.wms.sch.tasks.QualityTestTask;
|
||||||
import org.nl.wms.st.ivt.IvtChangeTypeEnum;
|
|
||||||
import org.nl.wms.st.ivt.StoreIvtServiceImpl;
|
|
||||||
import org.nl.wql.WQL;
|
import org.nl.wql.WQL;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.wql.util.WqlUtil;
|
||||||
@@ -265,7 +263,8 @@ public class QualityTestOrderServiceImpl implements QualityTestOrderService {
|
|||||||
//仓库质检单表【st_qt_qualityTestOrder】
|
//仓库质检单表【st_qt_qualityTestOrder】
|
||||||
WQLObject qtoTab = WQLObject.getWQLObject("st_qt_qualityTestOrder");
|
WQLObject qtoTab = WQLObject.getWQLObject("st_qt_qualityTestOrder");
|
||||||
final JSONObject qtoObj = qtoTab.query("bill_uuid = '" + bill_uuid + "'").uniqueResult(0);
|
final JSONObject qtoObj = qtoTab.query("bill_uuid = '" + bill_uuid + "'").uniqueResult(0);
|
||||||
if (StrUtil.equals(QTBillStatusEnum.FINISHED.getCode(), qtoObj.optString("bill_status")))
|
|
||||||
|
if (StrUtil.equals(QTBillStatusEnum.FINISHED.getCode(), qtoObj.optString("bill_status")) || StrUtil.equals(QTBillStatusEnum.COERCIVE_MEASURE_FINISHED.getCode(), qtoObj.optString("bill_status")))
|
||||||
throw new BadRequestException("已经是完成状态!");
|
throw new BadRequestException("已经是完成状态!");
|
||||||
|
|
||||||
qtoObj.put("bill_status", "06");
|
qtoObj.put("bill_status", "06");
|
||||||
@@ -284,11 +283,14 @@ public class QualityTestOrderServiceImpl implements QualityTestOrderService {
|
|||||||
|
|
||||||
//更新质检次数
|
//更新质检次数
|
||||||
WQLObject ivtTab = WQLObject.getWQLObject("st_ivt_structIvt");
|
WQLObject ivtTab = WQLObject.getWQLObject("st_ivt_structIvt");
|
||||||
|
JSONObject ivtObj = ivtTab.query("struct_uuid = '" + qtoObj.optString("struct_uuid") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(ivtObj)) {
|
||||||
int qc_num = ivtTab.query("struct_uuid = '" + qtoObj.optString("struct_uuid") + "'").uniqueResult(0).optInt("qc_num");
|
int qc_num = ivtTab.query("struct_uuid = '" + qtoObj.optString("struct_uuid") + "'").uniqueResult(0).optInt("qc_num");
|
||||||
qc_num++;
|
qc_num++;
|
||||||
JSONObject ivtParam = new JSONObject();
|
JSONObject ivtParam = new JSONObject();
|
||||||
ivtParam.put("qc_num", qc_num);
|
ivtParam.put("qc_num", qc_num);
|
||||||
ivtTab.update(ivtParam, "label_uuid = '" + qtoObj.optString("label_uuid") + "'");
|
ivtTab.update(ivtParam, "struct_uuid = '" + qtoObj.optString("struct_uuid") + "'");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//任务基础表【sch_base_task】
|
//任务基础表【sch_base_task】
|
||||||
@@ -301,7 +303,7 @@ public class QualityTestOrderServiceImpl implements QualityTestOrderService {
|
|||||||
taskTab.update(outTask);
|
taskTab.update(outTask);
|
||||||
}
|
}
|
||||||
JSONObject inTask = taskTab.query("task_uuid = '" + qtoObj.optString("intask_uuid") + "'").uniqueResult(0);
|
JSONObject inTask = taskTab.query("task_uuid = '" + qtoObj.optString("intask_uuid") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(outTask)) {
|
if (ObjectUtil.isNotEmpty(inTask)) {
|
||||||
inTask.put("update_time", DateUtil.now());
|
inTask.put("update_time", DateUtil.now());
|
||||||
inTask.put("update_by", SecurityUtils.getCurrentUsername());
|
inTask.put("update_by", SecurityUtils.getCurrentUsername());
|
||||||
inTask.put("task_status", TaskStatusEnum.FINISHED.getCode());
|
inTask.put("task_status", TaskStatusEnum.FINISHED.getCode());
|
||||||
@@ -379,13 +381,17 @@ public class QualityTestOrderServiceImpl implements QualityTestOrderService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void outStock(String bill_uuid) {
|
public void outStock(String bill_uuid) {
|
||||||
JSONObject jsonQc = WQLObject.getWQLObject("st_qt_qualitytestorder").query("bill_uuid = '" + bill_uuid + "' and is_delete = '0' and is_active = '1'").uniqueResult(0);
|
JSONObject jsonQc = WQLObject.getWQLObject("st_qt_qualitytestorder").query("bill_uuid = '" + bill_uuid + "' and is_delete = '0'").uniqueResult(0);
|
||||||
JSONObject jsonIvt = WQLObject.getWQLObject("st_ivt_structivt").query("struct_uuid = '" + jsonQc.optString("struct_uuid") + "'").uniqueResult(0);
|
|
||||||
|
if (StrUtil.equals(QTBillStatusEnum.COERCIVE_MEASURE_FINISHED.getCode(),jsonQc.getString("bill_status"))) throw new BadRequestException("已经是出库状态");
|
||||||
|
WQLObject ivtTab = WQLObject.getWQLObject("st_ivt_structivt");
|
||||||
|
|
||||||
|
JSONObject jsonIvt = ivtTab.query("struct_uuid = '" + jsonQc.optString("struct_uuid") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonIvt)) {
|
if (ObjectUtil.isEmpty(jsonIvt)) {
|
||||||
throw new BadRequestException("当前没有可出库的物料");
|
throw new BadRequestException("当前没有可出库的物料");
|
||||||
}
|
}
|
||||||
//减去库存
|
//减去库存
|
||||||
StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
|
/*StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("material_uuid", jsonQc.optString("material_uuid"));
|
param.put("material_uuid", jsonQc.optString("material_uuid"));
|
||||||
param.put("bill_uuid", jsonQc.optString("bill_uuid"));
|
param.put("bill_uuid", jsonQc.optString("bill_uuid"));
|
||||||
@@ -396,7 +402,10 @@ public class QualityTestOrderServiceImpl implements QualityTestOrderService {
|
|||||||
param.put("struct_uuid", jsonIvt.optString("struct_uuid"));
|
param.put("struct_uuid", jsonIvt.optString("struct_uuid"));
|
||||||
param.put("vehicle_code", jsonIvt.optString("vehicle_code"));
|
param.put("vehicle_code", jsonIvt.optString("vehicle_code"));
|
||||||
param.put("label_uuid", jsonIvt.optString("label_uuid"));
|
param.put("label_uuid", jsonIvt.optString("label_uuid"));
|
||||||
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_IVT_AND_CAN_USE);
|
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_IVT_AND_CAN_USE);*/
|
||||||
|
ivtTab.delete("struct_uuid = '" + jsonQc.optString("struct_uuid") + "'");
|
||||||
|
|
||||||
|
|
||||||
//修改点位状态
|
//修改点位状态
|
||||||
PointService pointService = SpringContextHolder.getBean(PointService.class);
|
PointService pointService = SpringContextHolder.getBean(PointService.class);
|
||||||
PointDto dto = pointService.findById(jsonIvt.optString("struct_uuid"));
|
PointDto dto = pointService.findById(jsonIvt.optString("struct_uuid"));
|
||||||
@@ -404,11 +413,14 @@ public class QualityTestOrderServiceImpl implements QualityTestOrderService {
|
|||||||
dto.setPoint_status("00");
|
dto.setPoint_status("00");
|
||||||
dto.setVehicle_code("");
|
dto.setVehicle_code("");
|
||||||
JSONObject jsonTask = WQLObject.getWQLObject("sch_base_task").query("task_uuid = '" + jsonQc.optString("outtask_uuid") + "'").uniqueResult(0);
|
JSONObject jsonTask = WQLObject.getWQLObject("sch_base_task").query("task_uuid = '" + jsonQc.optString("outtask_uuid") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonTask)) {
|
||||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
||||||
JSONObject jsonPoint = pointTab.query("point_code = '" + jsonTask.optString("next_point_code") + "'").uniqueResult(0);
|
JSONObject jsonPoint = pointTab.query("point_code = '" + jsonTask.optString("next_point_code") + "'").uniqueResult(0);
|
||||||
jsonPoint.put("lock_type", "00");
|
jsonPoint.put("lock_type", "00");
|
||||||
pointTab.update(JSONObject.fromObject(dto));
|
pointTab.update(JSONObject.fromObject(dto));
|
||||||
pointTab.update(jsonPoint);
|
pointTab.update(jsonPoint);
|
||||||
|
}
|
||||||
|
|
||||||
//更新质检单
|
//更新质检单
|
||||||
jsonQc.put("bill_status", QTBillStatusEnum.COERCIVE_MEASURE_FINISHED.getCode());
|
jsonQc.put("bill_status", QTBillStatusEnum.COERCIVE_MEASURE_FINISHED.getCode());
|
||||||
WQLObject.getWQLObject("st_qt_qualitytestorder").update(jsonQc);
|
WQLObject.getWQLObject("st_qt_qualitytestorder").update(jsonQc);
|
||||||
|
|||||||
@@ -5,11 +5,8 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import org.nl.exception.BadRequestException;
|
|
||||||
import org.nl.modules.system.service.impl.ParamServiceImpl;
|
import org.nl.modules.system.service.impl.ParamServiceImpl;
|
||||||
import org.nl.utils.SpringContextHolder;
|
import org.nl.utils.SpringContextHolder;
|
||||||
import org.nl.wql.WQL;
|
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,6 +28,7 @@ public class AcsUtil {
|
|||||||
JSONObject object = list.getJSONObject(i);
|
JSONObject object = list.getJSONObject(i);
|
||||||
String value = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode(object.getString("task_type")).getValue();
|
String value = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode(object.getString("task_type")).getValue();
|
||||||
object.put("priority", value);
|
object.put("priority", value);
|
||||||
|
object.put("ext_task_uuid", object.getString("task_uuid"));
|
||||||
}
|
}
|
||||||
//ACS地址:127.0.0.1:8010
|
//ACS地址:127.0.0.1:8010
|
||||||
String acsUrl = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("ACS_URL").getValue();
|
String acsUrl = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("ACS_URL").getValue();
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ public class TaskServiceImpl implements TaskService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public void operation(Map<String, Object> map) {
|
public void operation(Map<String, Object> map) {
|
||||||
String task_uuid = MapUtil.getStr(map, "task_uuid");
|
String task_uuid = MapUtil.getStr(map, "task_uuid");
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
package org.nl.wms.sch.tasks;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.concurrent.ExecutorService;
|
|
||||||
import java.util.concurrent.Executors;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author geng by
|
|
||||||
* 自动清理大于十五天的日志
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Component
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class AutoCleanUpLogs {
|
|
||||||
|
|
||||||
private ExecutorService threadPool = Executors.newCachedThreadPool();
|
|
||||||
|
|
||||||
public void run() throws Exception {
|
|
||||||
try {
|
|
||||||
System.out.println("开始清理日志");
|
|
||||||
// 0 0/10 0,1 * * ? * 每天0-1点执行间隔10分钟一次
|
|
||||||
//sys_log
|
|
||||||
//delete from sys_log where DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL 30 day)) limit 10;
|
|
||||||
WQLObject logTab = WQLObject.getWQLObject("sys_log");
|
|
||||||
String days = WQLObject.getWQLObject("sys_param").query("code='clean_day'").uniqueResult(0).getString("value");
|
|
||||||
logTab.delete("DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL '" + days + "' day))");
|
|
||||||
log.info("自动清理日志执行成功...!");
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -54,26 +54,35 @@ public class OutEmptyVehicleTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
//更新空载具表状态
|
//更新空载具表状态
|
||||||
JSONObject jsonEtv = etvTab.query("task_uuid='" + taskObj.optString("task_uuid") + "'").uniqueResult(0);
|
JSONObject jsonEtv = etvTab.query("task_uuid='" + taskObj.optString("task_uuid") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonEtv)){
|
||||||
jsonEtv.put("update_by", SecurityUtils.getCurrentUsername());
|
jsonEtv.put("update_by", SecurityUtils.getCurrentUsername());
|
||||||
jsonEtv.put("update_time", DateUtil.now());
|
jsonEtv.put("update_time", DateUtil.now());
|
||||||
jsonEtv.put("bill_status", EmptyVehicleBillStatusEnum.FINISHED.getCode());
|
jsonEtv.put("bill_status", EmptyVehicleBillStatusEnum.FINISHED.getCode());
|
||||||
etvTab.update(jsonEtv);
|
etvTab.update(jsonEtv);
|
||||||
|
}
|
||||||
|
|
||||||
//解锁货位
|
//解锁货位
|
||||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
||||||
//解锁起始点位
|
//解锁起始点位
|
||||||
JSONObject startPoint = pointTab.query("point_code='" + jsonEtv.optString("start_point_code") + "'").uniqueResult(0);
|
JSONObject startPoint = pointTab.query("point_code='" + jsonEtv.optString("start_point_code") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(startPoint)){
|
||||||
startPoint.put("lock_type", "00");
|
startPoint.put("lock_type", "00");
|
||||||
startPoint.put("point_status", "00");
|
startPoint.put("point_status", "00");
|
||||||
startPoint.put("vehicle_code", "");
|
startPoint.put("vehicle_code", "");
|
||||||
pointTab.update(startPoint);
|
pointTab.update(startPoint);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
//解锁下一点位
|
//解锁下一点位
|
||||||
JSONObject nextPoint = pointTab.query("point_code='" + jsonEtv.optString("next_point_code") + "'").uniqueResult(0);
|
JSONObject nextPoint = pointTab.query("point_code='" + jsonEtv.optString("next_point_code") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(nextPoint)){
|
||||||
nextPoint.put("lock_type", "00");
|
nextPoint.put("lock_type", "00");
|
||||||
nextPoint.put("point_status", "01");
|
nextPoint.put("point_status", "01");
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonEtv)){
|
||||||
nextPoint.put("vehicle_code", jsonEtv.optString("vehicle_code"));
|
nextPoint.put("vehicle_code", jsonEtv.optString("vehicle_code"));
|
||||||
|
}
|
||||||
pointTab.update(nextPoint);
|
pointTab.update(nextPoint);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,14 +14,11 @@ import org.nl.wms.sch.manage.AbstractAcsTask;
|
|||||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||||
import org.nl.wms.sch.service.PointService;
|
import org.nl.wms.sch.service.PointService;
|
||||||
import org.nl.wms.sch.service.dto.PointDto;
|
import org.nl.wms.sch.service.dto.PointDto;
|
||||||
import org.nl.wms.st.ivt.IvtChangeTypeEnum;
|
|
||||||
import org.nl.wms.st.ivt.StoreIvtServiceImpl;
|
import org.nl.wms.st.ivt.StoreIvtServiceImpl;
|
||||||
import org.nl.wms.st.util.StructFindUtil;
|
import org.nl.wms.st.util.StructFindUtil;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出库任务生成
|
* 出库任务生成
|
||||||
*/
|
*/
|
||||||
@@ -178,7 +175,11 @@ public class OutTask extends AbstractAcsTask {
|
|||||||
json.put("vehicle_code", structObj.optString("vehicle_code"));
|
json.put("vehicle_code", structObj.optString("vehicle_code"));
|
||||||
json.put("task_uuid", task_uuid);
|
json.put("task_uuid", task_uuid);
|
||||||
disTab.update(json);
|
disTab.update(json);
|
||||||
//减少库存可用数量
|
|
||||||
|
//直接删除起点
|
||||||
|
|
||||||
|
|
||||||
|
/* //减少库存可用数量
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("material_uuid", disObj.optString("material_uuid"));
|
param.put("material_uuid", disObj.optString("material_uuid"));
|
||||||
param.put("label_uuid", disObj.optString("label_uuid"));
|
param.put("label_uuid", disObj.optString("label_uuid"));
|
||||||
@@ -190,7 +191,7 @@ public class OutTask extends AbstractAcsTask {
|
|||||||
PointService pointService = SpringContextHolder.getBean(PointService.class);
|
PointService pointService = SpringContextHolder.getBean(PointService.class);
|
||||||
param.put("struct_uuid", pointService.findByCode(struct_code).getPoint_uuid());
|
param.put("struct_uuid", pointService.findByCode(struct_code).getPoint_uuid());
|
||||||
param.put("vehicle_code", structObj.optString("vehicle_code"));
|
param.put("vehicle_code", structObj.optString("vehicle_code"));
|
||||||
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_CAN_USE);
|
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_CAN_USE);*/
|
||||||
//修改明细表中的状态
|
//修改明细表中的状态
|
||||||
JSONObject dtljson = dtlTab.query("billdtl_uuid='" + billdtl_uuid + "'").uniqueResult(0);
|
JSONObject dtljson = dtlTab.query("billdtl_uuid='" + billdtl_uuid + "'").uniqueResult(0);
|
||||||
dtljson.put("bill_status", "30");
|
dtljson.put("bill_status", "30");
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package org.nl.wms.sch.tasks;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import org.nl.exception.BadRequestException;
|
import org.nl.exception.BadRequestException;
|
||||||
@@ -75,13 +76,16 @@ public class QualityTestTask extends AbstractAcsTask {
|
|||||||
qtoTab.update(qtObj, "intask_uuid = '" + task_uuid + "'");
|
qtoTab.update(qtObj, "intask_uuid = '" + task_uuid + "'");
|
||||||
//更新质检次数
|
//更新质检次数
|
||||||
//仓位库存表【st_ivt_structIvt】
|
//仓位库存表【st_ivt_structIvt】
|
||||||
String label_uuid = qtoTab.query("intask_uuid = '" + task_uuid + "'").uniqueResult(0).optString("label_uuid");
|
String struct_uuid = qtoTab.query("intask_uuid = '" + task_uuid + "'").uniqueResult(0).optString("struct_uuid");
|
||||||
WQLObject ivtTab = WQLObject.getWQLObject("st_ivt_structIvt");
|
WQLObject ivtTab = WQLObject.getWQLObject("st_ivt_structIvt");
|
||||||
int qc_num = ivtTab.query("label_uuid = '" + label_uuid + "'").uniqueResult(0).optInt("qc_num");
|
JSONObject ivtObj= ivtTab.query("struct_uuid = '" + struct_uuid + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(ivtObj)){
|
||||||
|
int qc_num = ivtTab.query("struct_uuid = '" + struct_uuid + "'").uniqueResult(0).optInt("qc_num");
|
||||||
qc_num++;
|
qc_num++;
|
||||||
JSONObject ivtParam = new JSONObject();
|
JSONObject ivtParam = new JSONObject();
|
||||||
ivtParam.put("qc_num", qc_num);
|
ivtParam.put("qc_num", qc_num);
|
||||||
ivtTab.update(ivtParam, "label_uuid = '" + label_uuid + "'");
|
ivtTab.update(ivtParam, "struct_uuid = '" + struct_uuid + "'");
|
||||||
|
}
|
||||||
|
|
||||||
//更新质检点位状态
|
//更新质检点位状态
|
||||||
JSONObject pointObj = new JSONObject();
|
JSONObject pointObj = new JSONObject();
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ public class IOStoreServiceImpl implements IOStoreService {
|
|||||||
//出库
|
//出库
|
||||||
if (StrUtil.equals("20", buss_type)) {
|
if (StrUtil.equals("20", buss_type)) {
|
||||||
param.put("struct_uuid", pointService.findByCode(disObj.optString("start_point_code")).getPoint_uuid());
|
param.put("struct_uuid", pointService.findByCode(disObj.optString("start_point_code")).getPoint_uuid());
|
||||||
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_CAN_USE);
|
/*ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_CAN_USE);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -375,7 +375,7 @@ public class IOStoreServiceImpl implements IOStoreService {
|
|||||||
param.put("change_weight", disObj.optString("realassign_weight"));
|
param.put("change_weight", disObj.optString("realassign_weight"));
|
||||||
param.put("struct_uuid", startPoint.getPoint_uuid());
|
param.put("struct_uuid", startPoint.getPoint_uuid());
|
||||||
param.put("vehicle_code", vehicle_code);
|
param.put("vehicle_code", vehicle_code);
|
||||||
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_CAN_USE);
|
/*ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_CAN_USE)*/;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AbstractIOStoreManager manager = new IOStoreManager();
|
AbstractIOStoreManager manager = new IOStoreManager();
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
|
|
||||||
<!--生产环境:打印控制台和输出到文件-->
|
<!--生产环境:打印控制台和输出到文件-->
|
||||||
<springProfile name="prod">
|
<springProfile name="prod">
|
||||||
<root level="debug">
|
<root level="info">
|
||||||
<appender-ref ref="asyncFileAppender"/>
|
<appender-ref ref="asyncFileAppender"/>
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="border: 1px solid #938d8d;margin-left: 10px;margin-right: 10px;">
|
<div style="border: 1px solid #938d8d;margin-left: 10px;margin-right: 10px;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="14">
|
<el-col :span="18">
|
||||||
<div class="grid-content bg-purple"><h2 style="margin-left: 30px;padding-top: 10px;">车间加工看板</h2></div>
|
<div class="grid-content bg-purple"><h2 style="margin-left: 30px;padding-top: 10px;">车间加工看板</h2></div>
|
||||||
<div class="grid-content bg-purple">
|
<div class="grid-content bg-purple">
|
||||||
  
|
  
|
||||||
<!-- <el-button type="primary" icon="el-icon-search" @click="queryTask(query.device_code)">搜索</el-button>-->
|
<!-- <el-button type="primary" icon="el-icon-search" @click="queryTask(query.device_code)">搜索</el-button>-->
|
||||||
<el-button type="primary" icon="el-icon-thumb" @click="fresh">界面刷新</el-button>
|
<el-button type="primary" icon="el-icon-thumb" @click="fresh">界面刷新</el-button>
|
||||||
<el-button type="warning" icon="el-icon-position" @click="callMaterial">生产叫料</el-button>
|
<el-button style="margin-left: 30px;" type="warning" icon="el-icon-position" @click="callMaterial">生产叫料</el-button>
|
||||||
<el-button type="success" icon="el-icon-finished" @click="finish">生产完成</el-button>
|
<el-button style="margin-left: 30px;" type="success" icon="el-icon-finished" @click="finish">生产完成</el-button>
|
||||||
<el-button type="danger" icon="el-icon-top-left" @click="materialBack">余料回库</el-button>
|
<el-button style="margin-left: 30px;" type="danger" icon="el-icon-top-left" @click="materialBack">余料回库</el-button>
|
||||||
<el-button type="info" icon="el-icon-top-left" @click="emptyVehicleBack">空托回库</el-button>
|
<el-button style="margin-left: 30px;" type="info" icon="el-icon-top-left" @click="emptyVehicleBack">空托回库</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="10">
|
<el-col :span="6">
|
||||||
<div class="grid-content bg-purple-light">
|
<div class="grid-content bg-purple-light">
|
||||||
<h2 style="text-align:right;margin-right: 140px;">{{ getTime }}</h2>
|
<h2 style="text-align:right;margin-right: 140px;">{{ getTime }}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation/>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
@@ -62,28 +62,28 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55"/>
|
||||||
<el-table-column prop="bill_code" label="单据编码" width="115" />
|
<el-table-column prop="bill_code" label="单据编码" width="115"/>
|
||||||
<el-table-column prop="bill_date" label="业务日期" width="85" />
|
<el-table-column prop="bill_date" label="业务日期" width="85"/>
|
||||||
<el-table-column prop="bill_status" label="单据状态" :formatter="formatBillStatusName" width="100" />
|
<el-table-column prop="bill_status" label="单据状态" :formatter="formatBillStatusName" width="100"/>
|
||||||
<el-table-column prop="struct_code" label="仓位编码" min-width="100" show-overflow-tooltip />
|
<el-table-column prop="struct_code" label="仓位编码" min-width="100" show-overflow-tooltip/>
|
||||||
<el-table-column prop="struct_name" label="仓位名称" width="120" />
|
<el-table-column prop="struct_name" label="仓位名称" width="120"/>
|
||||||
<el-table-column prop="vehicle_code" label="载具号" />
|
<el-table-column prop="vehicle_code" label="载具号"/>
|
||||||
<el-table-column prop="material_code" label="物料编码" />
|
<el-table-column prop="material_code" label="物料编码"/>
|
||||||
<el-table-column prop="material_name" label="物料名称" />
|
<el-table-column prop="material_name" label="物料名称"/>
|
||||||
<el-table-column v-if="false" prop="outtask_uuid" label="出库任务标识" />
|
<el-table-column v-if="false" prop="outtask_uuid" label="出库任务标识"/>
|
||||||
<el-table-column v-if="false" prop="intask_uuid" label="入库任务标识" />
|
<el-table-column v-if="false" prop="intask_uuid" label="入库任务标识"/>
|
||||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
<el-table-column prop="remark" label="备注" show-overflow-tooltip/>
|
||||||
<el-table-column prop="update_by" label="修改者" />
|
<el-table-column prop="update_by" label="修改者"/>
|
||||||
<el-table-column prop="update_time" label="修改时间" width="135" />
|
<el-table-column prop="update_time" label="修改时间" width="135"/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-permission="['admin','instruction:edit','instruction:del']"
|
v-permission="['admin','instruction:edit','instruction:del']"
|
||||||
fixed="right"
|
fixed="left"
|
||||||
label="操作"
|
label="操作"
|
||||||
width="340px"
|
width="70px"
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope" >
|
<!--<template slot-scope="scope" >
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete-solid"
|
icon="el-icon-delete-solid"
|
||||||
@@ -114,29 +114,29 @@
|
|||||||
icon="el-icon-s-home"
|
icon="el-icon-s-home"
|
||||||
@click="handleCommand(scope.row, 'f')"
|
@click="handleCommand(scope.row, 'f')"
|
||||||
>出库</el-button>
|
>出库</el-button>
|
||||||
|
</template>-->
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
|
<span class="el-dropdown-link">
|
||||||
|
<i class="el-icon-menu"/>
|
||||||
|
</span>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'a')">删除</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'b')">搬出</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'c')">通过</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'d')">不通过</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'e')">完成</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'f')">出库</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-dropdown trigger="click" @command="handleCommand">-->
|
|
||||||
<!-- <span class="el-dropdown-link">-->
|
|
||||||
<!-- <i class="el-icon-menu" />-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- <el-dropdown-menu slot="dropdown">-->
|
|
||||||
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'a')">删除</el-dropdown-item>-->
|
|
||||||
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'b')">搬出</el-dropdown-item>-->
|
|
||||||
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'c')">通过</el-dropdown-item>-->
|
|
||||||
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'d')">不通过</el-dropdown-item>-->
|
|
||||||
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'e')">完成</el-dropdown-item>-->
|
|
||||||
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'f')">出库</el-dropdown-item>-->
|
|
||||||
<!-- </el-dropdown-menu>-->
|
|
||||||
<!-- </el-dropdown>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AddDialog :dialog-show.sync="addShow" />
|
<AddDialog :dialog-show.sync="addShow"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -233,25 +233,25 @@ export default {
|
|||||||
'command': command
|
'command': command
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleCommand(row, command) {
|
handleCommand(data, command) {
|
||||||
switch (command) {
|
switch (data.command) {
|
||||||
case 'a':// 删除
|
case 'a':// 删除
|
||||||
this.opt_delete(row)
|
this.opt_delete(data.row)
|
||||||
break
|
break
|
||||||
case 'b':// 搬出
|
case 'b':// 搬出
|
||||||
this.moveOut(row)
|
this.moveOut(data.row)
|
||||||
break
|
break
|
||||||
case 'c':// 通过
|
case 'c':// 通过
|
||||||
this.isPass(row, 1)
|
this.isPass(data.row, 1)
|
||||||
break
|
break
|
||||||
case 'd':// 不通过
|
case 'd':// 不通过
|
||||||
this.isPass(row, 0)
|
this.isPass(data.row, 0)
|
||||||
break
|
break
|
||||||
case 'e':// 确认
|
case 'e':// 确认
|
||||||
this.confirm(row)
|
this.confirm(data.row)
|
||||||
break
|
break
|
||||||
case 'f':// 出库
|
case 'f':// 出库
|
||||||
this.outStock(row)
|
this.outStock(data.row)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user