Compare commits
10 Commits
4c590f515f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45f0f406f6 | ||
|
|
d6372ccc0c | ||
|
|
6f60580268 | ||
|
|
cf538247e9 | ||
|
|
e1fcfbf992 | ||
|
|
28c9ce8921 | ||
|
|
c9db39571c | ||
|
|
08ceae0454 | ||
|
|
c10fb6af1c | ||
|
|
70c2647699 |
@@ -55,6 +55,17 @@ public class Wcs2WmsController {
|
|||||||
return apiService.cancelMydoJob(jobParam);
|
return apiService.cancelMydoJob(jobParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @@@ FT568 - wms取消任务
|
||||||
|
* @param wmsTaskCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/cancelJob/{wmsTaskCode}")
|
||||||
|
public AjaxResult cancelMydoJob(@PathVariable String wmsTaskCode)
|
||||||
|
{
|
||||||
|
return apiService.cancelMydoJob(wmsTaskCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询缓存点
|
* 查询缓存点
|
||||||
|
|||||||
@@ -111,6 +111,8 @@ public interface IApiService
|
|||||||
*/
|
*/
|
||||||
AjaxResult cancelMydoJob(JobParam jobParam);
|
AjaxResult cancelMydoJob(JobParam jobParam);
|
||||||
|
|
||||||
|
AjaxResult cancelMydoJob(String wmsTaskCode);
|
||||||
|
|
||||||
AjaxResult selectWcsPort(WcsPort wcsPort);
|
AjaxResult selectWcsPort(WcsPort wcsPort);
|
||||||
|
|
||||||
AjaxResult updateWcsPort(WcsPort wcsPort);
|
AjaxResult updateWcsPort(WcsPort wcsPort);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.ruoyi.bas.cargospace.service.IBasCargoSpaceService;
|
|||||||
import com.ruoyi.bas.port.domain.WcsPort;
|
import com.ruoyi.bas.port.domain.WcsPort;
|
||||||
import com.ruoyi.bas.port.service.IWcsPortService;
|
import com.ruoyi.bas.port.service.IWcsPortService;
|
||||||
import com.ruoyi.common.GoodsType;
|
import com.ruoyi.common.GoodsType;
|
||||||
|
import com.ruoyi.common.TaskType;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.job.domain.MydoJob;
|
import com.ruoyi.job.domain.MydoJob;
|
||||||
@@ -47,7 +48,8 @@ import java.util.Map;
|
|||||||
|
|
||||||
import static com.ruoyi.common.Constant.*;
|
import static com.ruoyi.common.Constant.*;
|
||||||
import static com.ruoyi.common.ConvType.CONV_STOCKOUT;
|
import static com.ruoyi.common.ConvType.CONV_STOCKOUT;
|
||||||
import static com.ruoyi.common.TaskStatusCode.TASK_EP_CREATED;
|
import static com.ruoyi.common.TaskStatusCode.*;
|
||||||
|
import static com.ruoyi.common.TaskType.STOCKIN;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口记录Service业务层处理
|
* 接口记录Service业务层处理
|
||||||
@@ -250,6 +252,28 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wms删除任务(单选)
|
||||||
|
*
|
||||||
|
* @param wmsTaskCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult cancelMydoJob(String wmsTaskCode) {
|
||||||
|
|
||||||
|
if (wmsTaskCode == null || wmsTaskCode.equals("")) {
|
||||||
|
return AjaxResult.error("查不到执行wms任务号的作业");
|
||||||
|
}
|
||||||
|
|
||||||
|
MydoJob mydoJob = mydoJobService.selectMydoJobByWmsTaskNo(wmsTaskCode);
|
||||||
|
if (mydoJob == null) {
|
||||||
|
return AjaxResult.error("查不到该wms任务号正在执行中的作业,可能是已经取消或完成,请检查wcs任务状态");
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.success(mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -540,6 +564,14 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
return AjaxResult.error("【请求错误】wms下发出库任务失败,已经存在该货位的出库任务,推送任务号:{}" + stockoutReceive.getTaskCode() + ",推送出库货位:" + stockoutReceive.getSiteCode());
|
return AjaxResult.error("【请求错误】wms下发出库任务失败,已经存在该货位的出库任务,推送任务号:{}" + stockoutReceive.getTaskCode() + ",推送出库货位:" + stockoutReceive.getSiteCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 3.是否已经有正在执行的入库任务
|
||||||
|
// job = new MydoJob().builder().inOrOut(STOCKIN).build();
|
||||||
|
// tasks = mydoJobService.selectMydoJobList(job);
|
||||||
|
// if (tasks.size() > 0) {
|
||||||
|
// log.info("【警告】wms下发出库任务失败,已经有正在执行的入库任务,请稍后重试");
|
||||||
|
// return AjaxResult.error("【警告】wms下发出库任务失败,已经有正在执行的入库任务,请稍后重试");
|
||||||
|
// }
|
||||||
|
|
||||||
//生成出库作业
|
//生成出库作业
|
||||||
MydoJob mydoJob = new MydoJob();
|
MydoJob mydoJob = new MydoJob();
|
||||||
mydoJob.setJobId(mydoJobService.getJobId("CK"));
|
mydoJob.setJobId(mydoJobService.getJobId("CK"));
|
||||||
@@ -552,7 +584,7 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
mydoJob.setTraySize(GoodsType.TYPE_DEFAULT);//默认
|
mydoJob.setTraySize(GoodsType.TYPE_DEFAULT);//默认
|
||||||
mydoJob.setExitId(CONV_STOCKOUT);
|
mydoJob.setExitId(CONV_STOCKOUT);
|
||||||
mydoJob.setInOrOut("2");
|
mydoJob.setInOrOut("2");
|
||||||
mydoJob.setStatus("1");
|
mydoJob.setStatus(TASK_STATUS_CREATED);
|
||||||
mydoJob.setPriority(Long.valueOf(10));
|
mydoJob.setPriority(Long.valueOf(10));
|
||||||
//todo 可能需要查本地库存信息获取条码?
|
//todo 可能需要查本地库存信息获取条码?
|
||||||
// mydoJob.setTrayCode(receiveOutJob.getTrayCode());
|
// mydoJob.setTrayCode(receiveOutJob.getTrayCode());
|
||||||
@@ -561,10 +593,15 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
// mydoJob.setTraySize(receiveOutJob.getDepartmentId());
|
// mydoJob.setTraySize(receiveOutJob.getDepartmentId());
|
||||||
|
|
||||||
if (mydoJobService.selectMydoJobByJobId(mydoJob.getJobId()) != null){
|
if (mydoJobService.selectMydoJobByJobId(mydoJob.getJobId()) != null){
|
||||||
log.info("【任务警告】生成作业失败,已存在的作业号:{}", mydoJob.getJobId() + "(此条可忽略)");
|
log.info("【警告】生成作业失败,已存在的作业号:{}", mydoJob.getJobId() + "(此条可忽略)");
|
||||||
return AjaxResult.error("【请求警告】生成作业失败,已存在的作业号:{}" + mydoJob.getJobId() + "(此条可忽略)");
|
return AjaxResult.error("【警告】生成作业失败,已存在的作业号:{}" + mydoJob.getJobId() + "(仅提示)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (mydoJobService.selectMydoJobByWmsTaskNo(mydoJob.getWmsTaskNo()) != null){
|
||||||
|
// log.info("【警告】生成作业失败,已存在的作业号:{}", mydoJob.getJobId() + "(此条可忽略)");
|
||||||
|
// return AjaxResult.error("【警告】生成作业失败,已存在的wms任务号:{}" + mydoJob.getJobId() + "(仅提示)");
|
||||||
|
// }
|
||||||
|
|
||||||
int i = mydoJobService.insertMydoJob(mydoJob);
|
int i = mydoJobService.insertMydoJob(mydoJob);
|
||||||
// boolean success = mydoJobService.saveOrUpdate(mydoJob);
|
// boolean success = mydoJobService.saveOrUpdate(mydoJob);
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ package com.ruoyi.common;
|
|||||||
public class Constant {
|
public class Constant {
|
||||||
|
|
||||||
public static final String LOCAL_URL = "http://127.0.0.1:8084";
|
public static final String LOCAL_URL = "http://127.0.0.1:8084";
|
||||||
public static final String WMS_BASE_URL = "http://10.88.10.69:8290/service";
|
public static final String WMS_BASE_URL = "http://10.88.10.69:8390/service";
|
||||||
public static final String RCS_BASE_URL = "http://192.168.58.101:8182/rcms/services/rest/hikRpcService/";
|
public static final String RCS_BASE_URL = "http://192.168.58.101:8182/rcms/services/rest/hikRpcService/";
|
||||||
|
|
||||||
public static final String HEADER_TOKEN = "fed3d1511a5a474b9e1f9c56246cb1ec";
|
public static final String HEADER_TOKEN = "fed3d1511a5a474b9e1f9c56246cb1ec";
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ public class TaskStatusCode {
|
|||||||
/**
|
/**
|
||||||
* 任务状态-手动完成
|
* 任务状态-手动完成
|
||||||
*/
|
*/
|
||||||
public static final String TASK_STATUS_FINISH_MANUAL = "5";
|
public static final String TASK_STATUS_FINISH_MANUAL = "4";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务状态-作废
|
* 任务状态-作废
|
||||||
*/
|
*/
|
||||||
public static final String TASK_STATUS_INVALID = "6";
|
public static final String TASK_STATUS_INVALID = "5";
|
||||||
|
|
||||||
|
|
||||||
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 【执行阶段】 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 【执行阶段】 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||||
@@ -57,7 +57,7 @@ public class TaskStatusCode {
|
|||||||
public static final String TASK_EP_AGV = "2";
|
public static final String TASK_EP_AGV = "2";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务执行阶段 入口输送机
|
* 任务执行阶段 入口输送机输送到位
|
||||||
*/
|
*/
|
||||||
public static final String TASK_EP_SSJ = "3";
|
public static final String TASK_EP_SSJ = "3";
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ public class TaskStatusCode {
|
|||||||
/**
|
/**
|
||||||
* 任务执行阶段 任务超时-自动结束当前任务
|
* 任务执行阶段 任务超时-自动结束当前任务
|
||||||
*/
|
*/
|
||||||
public static final String TASK_EP_DDJ_FINISH_TIMEOUT = "6_TIMEOUT_FINISH";
|
public static final String TASK_EP_DDJ_FINISH_TIMEOUT = "6";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库异常 - 放货有货
|
* 入库异常 - 放货有货
|
||||||
|
|||||||
@@ -10,6 +10,16 @@ public class TaskType {
|
|||||||
*/
|
*/
|
||||||
public static final int STACKER_TYPE_DEFAULT = 0;
|
public static final int STACKER_TYPE_DEFAULT = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常规入库
|
||||||
|
*/
|
||||||
|
public static final String STOCKIN = "1";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常规出库
|
||||||
|
*/
|
||||||
|
public static final String STOCKOUT = "2";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1-二楼入出
|
* 1-二楼入出
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -56,6 +56,18 @@ public class MydoJobController extends BaseController
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询作业信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('job:mydoJob:list')")
|
||||||
|
@GetMapping("/listUnion")
|
||||||
|
public TableDataInfo listUnion(MydoJob mydoJob)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<MydoJob> list = mydoJobService.selectMydoJobUnionList(mydoJob);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出作业信息列表
|
* 导出作业信息列表
|
||||||
*/
|
*/
|
||||||
@@ -120,6 +132,14 @@ public class MydoJobController extends BaseController
|
|||||||
return mydoJobService.outhandFinish(jobIds);
|
return mydoJobService.outhandFinish(jobIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasAnyPermi('job:mydoJob:cancelJob')")
|
||||||
|
@Log(title = "出库作废", businessType = BusinessType.OTHER)
|
||||||
|
@RequestMapping("/cancelJob")
|
||||||
|
public AjaxResult cancelJob(@RequestParam("jobIds")String[] jobIds)
|
||||||
|
{
|
||||||
|
return toAjax(mydoJobService.deleteMydoJobByJobIds(jobIds));
|
||||||
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasAnyPermi('job:mydoJob:resendTaskToEntrance')")
|
@PreAuthorize("@ss.hasAnyPermi('job:mydoJob:resendTaskToEntrance')")
|
||||||
@Log(title = "入口输送机重新下发", businessType = BusinessType.OTHER)
|
@Log(title = "入口输送机重新下发", businessType = BusinessType.OTHER)
|
||||||
@PutMapping("/resendTaskToEntrance")
|
@PutMapping("/resendTaskToEntrance")
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.job.domain;
|
package com.ruoyi.job.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
@@ -21,13 +22,14 @@ import java.util.List;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@ToString
|
@ToString
|
||||||
@Builder
|
@Builder
|
||||||
//@TableName("mydo_job_wcs")
|
@TableName("mydo_job_wcs")
|
||||||
public class MydoJob extends BaseEntity
|
public class MydoJob extends BaseEntity
|
||||||
{
|
{
|
||||||
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 任务ID */
|
/** 任务ID */
|
||||||
// @TableId
|
@TableId
|
||||||
private String jobId;
|
private String jobId;
|
||||||
|
|
||||||
/** 任务状态 */
|
/** 任务状态 */
|
||||||
|
|||||||
@@ -119,4 +119,7 @@ public interface MydoJobMapper
|
|||||||
*/
|
*/
|
||||||
void getTaskNo(HashMap<String, Object> map);
|
void getTaskNo(HashMap<String, Object> map);
|
||||||
|
|
||||||
|
List<MydoJob> selectMydoJobUnionList(MydoJob mydoJob);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,4 +114,6 @@ public interface IMydoJobService
|
|||||||
*/
|
*/
|
||||||
String getTaskNo(String type);
|
String getTaskNo(String type);
|
||||||
|
|
||||||
|
List<MydoJob> selectMydoJobUnionList(MydoJob mydoJob);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import com.ruoyi.job.domain.MydoJob;
|
|||||||
import com.ruoyi.job.service.IMydoJobService;
|
import com.ruoyi.job.service.IMydoJobService;
|
||||||
|
|
||||||
import static com.ruoyi.common.TaskStatusCode.TASK_STATUS_FINISH_MANUAL;
|
import static com.ruoyi.common.TaskStatusCode.TASK_STATUS_FINISH_MANUAL;
|
||||||
|
import static com.ruoyi.common.TaskStatusCode.TASK_STATUS_INVALID;
|
||||||
import static com.ruoyi.common.WmsTaskTypeCode.*;
|
import static com.ruoyi.common.WmsTaskTypeCode.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -106,16 +107,23 @@ public class MydoJobServiceImpl implements IMydoJobService
|
|||||||
public int deleteMydoJobByJobIds(String[] jobIds)
|
public int deleteMydoJobByJobIds(String[] jobIds)
|
||||||
{
|
{
|
||||||
for (String jobId : jobIds) {
|
for (String jobId : jobIds) {
|
||||||
|
MydoJob mydoJob = selectMydoJobByJobId(jobId);
|
||||||
|
|
||||||
|
if (mydoJob == null) continue;
|
||||||
|
mydoJob.setStatus(TASK_STATUS_INVALID);
|
||||||
|
updateMydoJob(mydoJob);
|
||||||
mydoJobMapper.insertHistory(jobId);
|
mydoJobMapper.insertHistory(jobId);
|
||||||
|
deleteMydoJobByJobId(jobId);
|
||||||
|
|
||||||
//当执行任务的【删除】操作时(特殊场景需要手动处理异常导致不需要入库时,此时不需要向回传异常)
|
//当执行任务的【删除】操作时(特殊场景需要手动处理异常导致不需要入库时,此时不需要向回传异常)
|
||||||
// 此处顺便处理对应任务号生成的堆垛机执行队列,省去sql直接表中删记录的操作
|
// 此处顺便处理对应任务号生成的堆垛机执行队列,省去sql直接表中删记录的操作
|
||||||
if (selectMydoJobByJobId(jobId) != null){
|
DdjDeviceExecutionQueue queue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByTaskNo(mydoJob.getTaskNo());
|
||||||
String taskNo = selectMydoJobByJobId(jobId).getTaskNo();
|
if (queue != null){
|
||||||
if (ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByTaskNo(taskNo) != null) {
|
ddjDeviceExecutionQueueService.deleteDdjDeviceExecutionQueueByTaskNo(mydoJob.getTaskNo());
|
||||||
ddjDeviceExecutionQueueService.deleteDdjDeviceExecutionQueueByTaskNo(taskNo);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.info("【人工操作】执行手动删除作业,作业号:{}", jobId);
|
||||||
|
|
||||||
}
|
}
|
||||||
return mydoJobMapper.deleteMydoJobByJobIds(jobIds);
|
return mydoJobMapper.deleteMydoJobByJobIds(jobIds);
|
||||||
}
|
}
|
||||||
@@ -129,6 +137,26 @@ public class MydoJobServiceImpl implements IMydoJobService
|
|||||||
@Override
|
@Override
|
||||||
public int deleteMydoJobByJobId(String jobId)
|
public int deleteMydoJobByJobId(String jobId)
|
||||||
{
|
{
|
||||||
|
try{
|
||||||
|
MydoJob mydoJob = selectMydoJobByJobId(jobId);
|
||||||
|
if (mydoJob == null) return 0;
|
||||||
|
|
||||||
|
mydoJob.setStatus(TASK_STATUS_INVALID);
|
||||||
|
updateMydoJob(mydoJob);
|
||||||
|
mydoJobMapper.insertHistory(jobId);
|
||||||
|
|
||||||
|
//当执行任务的【删除】操作时(特殊场景需要手动处理异常导致不需要入库时,此时不需要向回传异常)
|
||||||
|
// 此处顺便处理对应任务号生成的堆垛机执行队列,省去sql直接表中删记录的操作
|
||||||
|
String taskNo = selectMydoJobByJobId(jobId).getTaskNo();
|
||||||
|
if (taskNo != null || taskNo != "") {
|
||||||
|
ddjDeviceExecutionQueueService.deleteDdjDeviceExecutionQueueByTaskNo(taskNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info("【人工操作】执行手动删除作业,作业号:{}", jobId);
|
||||||
|
}catch (Exception e){
|
||||||
|
log.warn("【提示】操作失败,发生了未知错误:{}", e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
return mydoJobMapper.deleteMydoJobByJobId(jobId);
|
return mydoJobMapper.deleteMydoJobByJobId(jobId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,6 +215,7 @@ public class MydoJobServiceImpl implements IMydoJobService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MydoJob selectMydoJobByExitList(List<String> exitList ) {
|
public MydoJob selectMydoJobByExitList(List<String> exitList ) {
|
||||||
return mydoJobMapper.selectMydoJobByExitList(exitList);
|
return mydoJobMapper.selectMydoJobByExitList(exitList);
|
||||||
@@ -368,5 +397,9 @@ public class MydoJobServiceImpl implements IMydoJobService
|
|||||||
return map.get("v_serial").toString();
|
return map.get("v_serial").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MydoJob> selectMydoJobUnionList(MydoJob mydoJob) {
|
||||||
|
return mydoJobMapper.selectMydoJobUnionList(mydoJob);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ public class DdjThread implements Runnable {
|
|||||||
mydoJobService.updateMydoJob(mydoJob);
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
//回传完成信号 - 方法在存储过程【proc_mydojob_finish】中
|
//回传完成信号 - 方法在存储过程【proc_mydojob_finish】中
|
||||||
ddjTaskFinish(rwh, ddj.getId());
|
ddjTaskFinish(rwh, ddj.getId());
|
||||||
log.info("【堆垛机入库】堆垛机编号:" + ddj.getId() + " 执行完成,任务结束,任务号:"+ddj.getRwh());
|
log.info("【堆垛机执行】堆垛机编号:" + ddj.getId() + " 执行完成,任务结束,任务号:"+ddj.getRwh());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,6 +293,7 @@ public class DdjThread implements Runnable {
|
|||||||
|
|
||||||
//正常下发
|
//正常下发
|
||||||
if (ddj.getYxxf() == 1 && ddj.getSbzt() == 0 ) {
|
if (ddj.getYxxf() == 1 && ddj.getSbzt() == 0 ) {
|
||||||
|
|
||||||
//检查是否有正在执行的堆垛机队列
|
//检查是否有正在执行的堆垛机队列
|
||||||
Long rwh = ddj.getRwh();
|
Long rwh = ddj.getRwh();
|
||||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueueRunningParam = new DdjDeviceExecutionQueue();
|
DdjDeviceExecutionQueue ddjDeviceExecutionQueueRunningParam = new DdjDeviceExecutionQueue();
|
||||||
@@ -320,9 +321,9 @@ public class DdjThread implements Runnable {
|
|||||||
ddjDeviceExecutionQueue.setXfsj(DateUtil.formatDateTime(DateUtil.date()));
|
ddjDeviceExecutionQueue.setXfsj(DateUtil.formatDateTime(DateUtil.date()));
|
||||||
ddjDeviceExecutionQueue.setDdjxf("1");
|
ddjDeviceExecutionQueue.setDdjxf("1");
|
||||||
ddjDeviceExecutionQueueService.updateDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
|
ddjDeviceExecutionQueueService.updateDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
|
||||||
log.info("【堆垛机入库】下发任务成功,任务执行中, 任务号:{}", ddjDeviceExecutionQueue.getRwh());
|
log.info("【堆垛机执行】下发任务成功,任务执行中, 任务号:{}", ddjDeviceExecutionQueue.getRwh());
|
||||||
} else {
|
} else {
|
||||||
log.error("【堆垛机入库】执行异常, 堆垛机下发任务失败!");
|
log.error("【堆垛机执行】执行异常, 堆垛机下发任务失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import java.util.regex.Matcher;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import static com.ruoyi.common.TaskStatusCode.*;
|
import static com.ruoyi.common.TaskStatusCode.*;
|
||||||
|
import static com.ruoyi.common.TaskType.STOCKOUT;
|
||||||
import static com.ruoyi.common.WmsTaskTypeCode.WMS_TASK_TYPE_STOCKIN;
|
import static com.ruoyi.common.WmsTaskTypeCode.WMS_TASK_TYPE_STOCKIN;
|
||||||
import static com.ruoyi.schedule.plcRead.ssj.PlcSsjRead.writeToSsj;
|
import static com.ruoyi.schedule.plcRead.ssj.PlcSsjRead.writeToSsj;
|
||||||
|
|
||||||
@@ -123,11 +124,14 @@ public class PortConvThread implements Runnable {
|
|||||||
|
|
||||||
//输送机状态
|
//输送机状态
|
||||||
if (!convChecked(inSsjDevice)) return;
|
if (!convChecked(inSsjDevice)) return;
|
||||||
//更新入库任务阶段
|
|
||||||
updateMydoJob(inSsjDevice);
|
|
||||||
//请求wms获取入库任务
|
//请求wms获取入库任务
|
||||||
requestMydoJob(inSsjDevice);
|
requestMydoJob(inSsjDevice);
|
||||||
|
|
||||||
|
//更新入库任务阶段
|
||||||
|
updateMydoJob(inSsjDevice);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -165,17 +169,20 @@ public class PortConvThread implements Runnable {
|
|||||||
).size();
|
).size();
|
||||||
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
//如果查到输送机有已经该条码的入库作业 - 把该作业更新为初始状态(未向入库输送机下发任务号的阶段)
|
log.warn("【警告】已经存在该托盘号的入库作业,无法继续执行该托盘的入库请求,请稍后重试");
|
||||||
// 省去入库输送机口的手动作废操作,自动更新任务至初始阶段
|
writeToSsj(inSsjDevice.getPlcDbWriteAddress(), "99", 2, 1);
|
||||||
// mydoJobService.updateMydoJob(
|
|
||||||
// new MydoJob().builder()
|
|
||||||
// .status("1")
|
|
||||||
// .executionPhase("0")
|
|
||||||
// .build()
|
|
||||||
// );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int stockoutMydoJob = mydoJobService.selectMydoJobList(
|
||||||
|
new MydoJob().builder().inOrOut(STOCKOUT).build()
|
||||||
|
).size();
|
||||||
|
|
||||||
|
if (stockoutMydoJob > 0) {
|
||||||
|
log.warn("【警告】已经存在执行中的出库作业,无法执行入库请求,请稍后重试");
|
||||||
|
writeToSsj(inSsjDevice.getPlcDbWriteAddress(), "99", 2, 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
String errorMessage = "";
|
String errorMessage = "";
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import cn.hutool.core.util.ObjUtil;
|
|||||||
import com.ruoyi.api.service.IApiService;
|
import com.ruoyi.api.service.IApiService;
|
||||||
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
|
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
|
||||||
import com.ruoyi.bas.cargospace.service.IBasCargoSpaceService;
|
import com.ruoyi.bas.cargospace.service.IBasCargoSpaceService;
|
||||||
|
import com.ruoyi.common.TaskType;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
@@ -22,8 +23,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static com.ruoyi.common.ConvType.CONV_ROAD_1;
|
import static com.ruoyi.common.ConvType.*;
|
||||||
import static com.ruoyi.common.ConvType.CONV_STOCKOUT;
|
|
||||||
import static com.ruoyi.common.TaskStatusCode.*;
|
import static com.ruoyi.common.TaskStatusCode.*;
|
||||||
import static com.ruoyi.common.TaskType.*;
|
import static com.ruoyi.common.TaskType.*;
|
||||||
|
|
||||||
@@ -174,59 +174,66 @@ public class RoadConvThread implements Runnable {
|
|||||||
private void sendStackerOut(DeviceSsj roadSsjDevice){
|
private void sendStackerOut(DeviceSsj roadSsjDevice){
|
||||||
//---------------------------出库任务---------------------------
|
//---------------------------出库任务---------------------------
|
||||||
//检查巷道口输送机是否空闲
|
//检查巷道口输送机是否空闲
|
||||||
if(roadSsjDevice.getKx()==1 && roadSsjDevice.getTaskNo() == 0){
|
if(roadSsjDevice.getKx()!=1 || roadSsjDevice.getTaskNo() != 0) return;
|
||||||
|
|
||||||
//检查是否有入口是【G1004】的入库任务
|
//检查是否有入口是【TD1001-出库到位输送机】的入库任务 - 此处查询作用:如果已经有入库任务,则只可生成出库作业,不可生成堆垛机队列
|
||||||
String exitId = CONV_STOCKOUT;
|
String exitId = CONV_STOCKOUT;
|
||||||
List<MydoJob> inList = mydoJobService.getInJobByEntranceId(exitId);
|
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
|
||||||
|
new MydoJob().builder().inOrOut(STOCKIN).build()
|
||||||
|
);
|
||||||
|
|
||||||
if(inList.size() == 0){
|
if(jobs.size() != 0) {
|
||||||
|
log.info("【提示】当前出口"+ exitId +"有正在执行的任务,无法执行堆垛机出库,请等待执行的入库任务结束");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//检查是否有出库任务
|
//检查是否有出库任务
|
||||||
MydoJob mydoJob = mydoJobService.selectMydoJobByExitId(exitId);
|
MydoJob mydoJob = mydoJobService.selectMydoJobByExitId(exitId);
|
||||||
if (ObjUtil.isNotNull(mydoJob)) {
|
if (ObjUtil.isNotNull(mydoJob)) {
|
||||||
|
|
||||||
//如果有出库任务 - 检查货位编码是否合法
|
//如果有出库任务 - 检查货位编码是否合法
|
||||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByWmsCargoSpaceId(mydoJob.getCargoSpaceId());
|
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByWmsCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||||
if (ObjUtil.isNull(basCargoSpace)) {
|
if (ObjUtil.isNull(basCargoSpace)) {
|
||||||
log.error("【任务异常】货位不存在 cargoSpaceId{}", mydoJob.getCargoSpaceId());
|
log.error("【任务异常】货位不存在 cargoSpaceId{}", mydoJob.getCargoSpaceId());
|
||||||
} else {
|
return;
|
||||||
//生成队列
|
}
|
||||||
List<DdjDeviceExecutionQueue> list = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueListByRwlx(DDJ_RWLX_2, Convert.toInt(mydoJob.getRoadwayId()));
|
|
||||||
List<Integer> pclList = roadwayMap.get(roadSsjDevice.getDeviceCode());
|
|
||||||
if (CollUtil.isEmpty(list) && CollUtil.isNotEmpty(pclList)) {
|
|
||||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = new DdjDeviceExecutionQueue();
|
|
||||||
ddjDeviceExecutionQueue.setUuid(IdUtil.simpleUUID());
|
|
||||||
ddjDeviceExecutionQueue.setRwh(Convert.toLong(mydoJob.getTaskNo()));
|
|
||||||
ddjDeviceExecutionQueue.setDevName(mydoJob.getRoadwayId());
|
|
||||||
ddjDeviceExecutionQueue.setDevId(Convert.toInt(mydoJob.getRoadwayId()));
|
|
||||||
ddjDeviceExecutionQueue.setRwzt(0);
|
|
||||||
ddjDeviceExecutionQueue.setYph(Convert.toInt(basCargoSpace.getThePlatoon()));
|
|
||||||
ddjDeviceExecutionQueue.setYlh(Convert.toInt(basCargoSpace.getTheColumn()));
|
|
||||||
ddjDeviceExecutionQueue.setYch(Convert.toInt(basCargoSpace.getTheFloor()));
|
|
||||||
ddjDeviceExecutionQueue.setMbph(pclList.get(0));
|
|
||||||
ddjDeviceExecutionQueue.setMblh(pclList.get(1));
|
|
||||||
ddjDeviceExecutionQueue.setMbch(pclList.get(2));
|
|
||||||
ddjDeviceExecutionQueue.setDdjxf("0");
|
|
||||||
ddjDeviceExecutionQueue.setMlfs(5);
|
|
||||||
ddjDeviceExecutionQueue.setSpare1(mydoJob.getTraySize());//货物高度
|
|
||||||
ddjDeviceExecutionQueue.setScsj(DateUtil.formatDateTime(DateUtil.date()));
|
|
||||||
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_2);
|
|
||||||
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
|
|
||||||
|
|
||||||
//修改作业状态
|
//生成队列
|
||||||
mydoJob.setStatus(TASK_STATUS_RUNNING);
|
List<DdjDeviceExecutionQueue> list = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueListByRwlx(DDJ_RWLX_2, Convert.toInt(mydoJob.getRoadwayId()));
|
||||||
mydoJob.setExecutionPhase(TASK_EP_DDJ);
|
List<Integer> pclList = roadwayMap.get(roadSsjDevice.getDeviceCode());
|
||||||
mydoJob.setStartTime(DateUtil.formatDateTime(DateUtil.date()));
|
if (CollUtil.isEmpty(list) && CollUtil.isNotEmpty(pclList)) {
|
||||||
mydoJobService.updateMydoJob(mydoJob);
|
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = new DdjDeviceExecutionQueue();
|
||||||
}
|
ddjDeviceExecutionQueue.setUuid(IdUtil.simpleUUID());
|
||||||
}
|
ddjDeviceExecutionQueue.setRwh(Convert.toLong(mydoJob.getTaskNo()));
|
||||||
}
|
ddjDeviceExecutionQueue.setDevName(mydoJob.getRoadwayId());
|
||||||
}else{
|
ddjDeviceExecutionQueue.setDevId(Convert.toInt(mydoJob.getRoadwayId()));
|
||||||
log.info("【出库警告】当前出口"+ exitId +"存在入库任务,无法出库!");
|
ddjDeviceExecutionQueue.setRwzt(0);
|
||||||
|
ddjDeviceExecutionQueue.setYph(Convert.toInt(basCargoSpace.getThePlatoon()));
|
||||||
|
ddjDeviceExecutionQueue.setYlh(Convert.toInt(basCargoSpace.getTheColumn()));
|
||||||
|
ddjDeviceExecutionQueue.setYch(Convert.toInt(basCargoSpace.getTheFloor()));
|
||||||
|
ddjDeviceExecutionQueue.setMbph(pclList.get(0));
|
||||||
|
ddjDeviceExecutionQueue.setMblh(pclList.get(1));
|
||||||
|
ddjDeviceExecutionQueue.setMbch(pclList.get(2));
|
||||||
|
ddjDeviceExecutionQueue.setDdjxf("0");
|
||||||
|
ddjDeviceExecutionQueue.setMlfs(5);
|
||||||
|
ddjDeviceExecutionQueue.setSpare1(mydoJob.getTraySize());//货物高度
|
||||||
|
ddjDeviceExecutionQueue.setScsj(DateUtil.formatDateTime(DateUtil.date()));
|
||||||
|
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_2);
|
||||||
|
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
|
||||||
|
//修改作业状态
|
||||||
|
mydoJob.setStatus(TASK_STATUS_RUNNING);
|
||||||
|
mydoJob.setExecutionPhase(TASK_EP_DDJ);
|
||||||
|
mydoJob.setStartTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||||
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ spring:
|
|||||||
# 本机
|
# 本机
|
||||||
url: jdbc:sqlserver://127.0.0.1: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
|
username: sa
|
||||||
password: 123456
|
password: Aa123456
|
||||||
|
|
||||||
# 生产
|
# 生产
|
||||||
# url: jdbc:sqlserver://192.168.58.10:1433;databaseName=FT568-wcs;encrypt=true;trustServerCertificate=true;
|
# url: jdbc:sqlserver://192.168.58.10:1433;databaseName=FT568-wcs;encrypt=true;trustServerCertificate=true;
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
<!-- 日志输出格式 -->
|
<!-- 日志输出格式 -->
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||||
|
|
||||||
<!-- 输出编码格式 -->
|
|
||||||
<property name="log.charset" value="UTF-8" />
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
<!-- 控制台输出 -->
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
<encoder>
|
<encoder>
|
||||||
@@ -27,7 +24,7 @@
|
|||||||
</rollingPolicy>
|
</rollingPolicy>
|
||||||
<encoder>
|
<encoder>
|
||||||
<pattern>${log.pattern}</pattern>
|
<pattern>${log.pattern}</pattern>
|
||||||
<charset>${log.charset}</charset>
|
<charset>UTF-8</charset>
|
||||||
</encoder>
|
</encoder>
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
@@ -50,7 +47,7 @@
|
|||||||
</rollingPolicy>
|
</rollingPolicy>
|
||||||
<encoder>
|
<encoder>
|
||||||
<pattern>${log.pattern}</pattern>
|
<pattern>${log.pattern}</pattern>
|
||||||
<charset>${log.charset}</charset>
|
<charset>UTF-8</charset>
|
||||||
</encoder>
|
</encoder>
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
<!-- 过滤的级别 -->
|
||||||
@@ -62,6 +59,29 @@
|
|||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
<appender name="file_warn" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/sys-warn.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/sys-warn.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>WARN</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
<!-- 用户访问日志输出 -->
|
<!-- 用户访问日志输出 -->
|
||||||
<appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/sys-user.log</file>
|
<file>${log.path}/sys-user.log</file>
|
||||||
@@ -88,6 +108,7 @@
|
|||||||
<!--系统操作日志-->
|
<!--系统操作日志-->
|
||||||
<root level="info">
|
<root level="info">
|
||||||
<appender-ref ref="file_info" />
|
<appender-ref ref="file_info" />
|
||||||
|
<appender-ref ref="file_warn" />
|
||||||
<appender-ref ref="file_error" />
|
<appender-ref ref="file_error" />
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
select job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,flag,tray_code,tray_size,wms_task_no from mydo_job_wcs_finish
|
select job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,flag,tray_code,tray_size,wms_task_no from mydo_job_wcs_finish
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
<sql id="selectMydoJobUnion">
|
||||||
|
SELECT * FROM (
|
||||||
|
SELECT
|
||||||
|
job_id,status,task_no,roadway_id,cargo_space_id,target_roadway_id,target_cargo_space_id,priority,execution_phase,in_or_out,create_time,start_time,finish_time,entrance_id,exit_id,warehouse_id,fault_flag,flag,tray_code,tray_size,wms_task_no,'mydo_job_wcs' AS source_table
|
||||||
|
FROM mydo_job_wcs
|
||||||
|
UNION ALL
|
||||||
|
SELECT
|
||||||
|
job_id,status,task_no,roadway_id,cargo_space_id,target_roadway_id,target_cargo_space_id,priority,execution_phase,in_or_out,create_time,start_time,finish_time,entrance_id,exit_id,warehouse_id,fault_flag,flag,tray_code,tray_size,wms_task_no,'mydo_job_wcs_finish' AS source_table
|
||||||
|
FROM mydo_job_wcs_finish
|
||||||
|
)
|
||||||
|
AS combined_jobs
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectMydoJobUnionList" parameterType="MydoJob" resultMap="MydoJobResult">
|
||||||
|
<include refid="selectMydoJobUnion"/>
|
||||||
|
<where>
|
||||||
|
<if test="status != null and status != ''">and status = #{status}</if>
|
||||||
|
<if test="taskNo != null and taskNo != ''">and task_no = #{taskNo}</if>
|
||||||
|
<if test="roadwayId != null and roadwayId != ''">and roadway_id = #{roadwayId}</if>
|
||||||
|
<if test="cargoSpaceId != null and cargoSpaceId != ''">and cargo_space_id = #{cargoSpaceId}</if>
|
||||||
|
<if test="targetRoadwayId != null and targetRoadwayId != ''">and target_roadway_id = #{targetRoadwayId}
|
||||||
|
</if>
|
||||||
|
<if test="targetCargoSpaceId != null and targetCargoSpaceId != ''">and target_cargo_space_id =
|
||||||
|
#{targetCargoSpaceId}
|
||||||
|
</if>
|
||||||
|
<if test="priority != null ">and priority = #{priority}</if>
|
||||||
|
<if test="executionPhase != null and executionPhase != ''">and execution_phase = #{executionPhase}</if>
|
||||||
|
<if test="inOrOut != null and inOrOut != ''">and in_or_out = #{inOrOut}</if>
|
||||||
|
<if test="startTime != null and startTime != ''">and start_time = #{startTime}</if>
|
||||||
|
<if test="finishTime != null and finishTime != ''">and finish_time = #{finishTime}</if>
|
||||||
|
<if test="entranceId != null and entranceId != ''">and entrance_id = #{entranceId}</if>
|
||||||
|
<if test="exitId != null and exitId != ''">and exit_id = #{exitId}</if>
|
||||||
|
<if test="warehouseId != null and warehouseId != ''">and warehouse_id = #{warehouseId}</if>
|
||||||
|
<if test="faultFlag != null and faultFlag != ''">and fault_flag = #{faultFlag}</if>
|
||||||
|
<if test="flag != null and flag != ''">and flag = #{flag}</if>
|
||||||
|
<if test="trayCode != null and trayCode != ''">and tray_code = #{trayCode}</if>
|
||||||
|
<if test="traySize != null and traySize != ''">and traySize = #{tray_size}</if>
|
||||||
|
<if test="epList != null and epList.size() > 0">
|
||||||
|
and entrance_id in
|
||||||
|
<foreach item="item" index="index" collection="epList" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="wmsTaskNo != null and wmsTaskNo != ''">and wms_task_no = #{wmsTaskNo}</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY create_time DESC,finish_time DESC;
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
|
<select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
|
||||||
<include refid="selectMydoJobVo"/>
|
<include refid="selectMydoJobVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@@ -18,6 +18,14 @@ export function listMydoJobFinish(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function listMydoJobUnion(query) {
|
||||||
|
return request({
|
||||||
|
url: '/job/mydoJob/listUnion',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询作业信息详细
|
// 查询作业信息详细
|
||||||
export function getMydoJob(jobId) {
|
export function getMydoJob(jobId) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -217,7 +217,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listMydoJob, getMydoJob, delMydoJob, addMydoJob, updateMydoJob, listMydoJobFinish, handFinish, resendTaskToEntrance } from "@/api/job/mydoJob"
|
import { listMydoJob, getMydoJob, delMydoJob, addMydoJob, updateMydoJob, listMydoJobFinish,listMydoJobUnion, handFinish, resendTaskToEntrance } from "@/api/job/mydoJob"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MydoJob",
|
name: "MydoJob",
|
||||||
@@ -284,19 +284,27 @@ export default {
|
|||||||
/** 查询作业信息列表 */
|
/** 查询作业信息列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (this.queryParams.status === '4' || this.queryParams.status === '5') {
|
|
||||||
listMydoJobFinish(this.queryParams).then(response => {
|
listMydoJobUnion(this.queryParams).then(response => {
|
||||||
this.mydoJobList = response.rows
|
this.mydoJobList = response.rows
|
||||||
this.total = response.total
|
this.total = response.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
listMydoJob(this.queryParams).then(response => {
|
// if (this.queryParams.status === '4' || this.queryParams.status === '5'
|
||||||
this.mydoJobList = response.rows
|
// || this.queryParams.status === '6') {
|
||||||
this.total = response.total
|
// listMydoJobFinish(this.queryParams).then(response => {
|
||||||
this.loading = false
|
// this.mydoJobList = response.rows
|
||||||
})
|
// this.total = response.total
|
||||||
}
|
// this.loading = false
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// listMydoJob(this.queryParams).then(response => {
|
||||||
|
// this.mydoJobList = response.rows
|
||||||
|
// this.total = response.total
|
||||||
|
// this.loading = false
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
|
|||||||
Reference in New Issue
Block a user