流程测试修改
This commit is contained in:
@@ -80,4 +80,17 @@ public class ToWmsApiController {
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务
|
||||
* @param mydoJob
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getJob")
|
||||
public AjaxResult getJob(@RequestBody MydoJob mydoJob) {
|
||||
AjaxResult ajaxResult = toWmsService.getJob(mydoJob);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(mydoJob), "getJob");
|
||||
requestLog.setResponseBody(Convert.toStr(ajaxResult.get("msg")));
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,6 @@ public interface IToWmsService {
|
||||
AjaxResult reAssign(MydoJob mydoJob);
|
||||
|
||||
AjaxResult reMaterial(MydoJob mydoJob);
|
||||
|
||||
AjaxResult getJob(MydoJob mydoJob);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ruoyi.api.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
@@ -83,6 +85,7 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
mydoJob.setExecutionPhase("2");
|
||||
mydoJob.setEntranceId(param.getEntranceId());
|
||||
mydoJob.setStatus("3");
|
||||
mydoJob.setStartTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
mydoJobService.updateMydoJob(mydoJob);
|
||||
}
|
||||
return AjaxResult.success(mydoJob);
|
||||
@@ -209,4 +212,14 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
//调用自动分配
|
||||
return outStockoutService.autoAllot(stockOutId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getJob(MydoJob mydoJob) {
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobListApi(mydoJob);
|
||||
if (mydoJobs.isEmpty()){
|
||||
return AjaxResult.error("没有该作业");
|
||||
}else {
|
||||
return AjaxResult.success(mydoJobs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ public class BasTaskNoServiceImpl implements IBasTaskNoService
|
||||
basTaskNoMapper.updateTaskNo(basTaskNo);
|
||||
//4 事物提交
|
||||
transactionManager.commit(status);
|
||||
return taskNo;
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
@@ -85,6 +87,8 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
if (!"1".equals(old.getStatus())){
|
||||
throw new RuntimeException("单据状态非未执行状态!");
|
||||
}
|
||||
inStockin.setFinishDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||
inStockinMapper.updateInStockin(inStockin);
|
||||
//插入历史单据
|
||||
insertInStockinHistory(inStockin);
|
||||
}else if ("2".equals(inStockin.getStatus())){
|
||||
@@ -107,6 +111,8 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
throw new RuntimeException("扫码数量与实际入库数量不一致!");
|
||||
}
|
||||
}
|
||||
inStockin.setFinishDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||
inStockinMapper.updateInStockin(inStockin);
|
||||
insertInStockinHistory(inStockin);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.in.stockinfinish.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -94,6 +95,7 @@ public class InStockinFinishServiceImpl implements IInStockinFinishService
|
||||
}
|
||||
|
||||
@Override
|
||||
@DataScope(warehouseAlias = "is2")
|
||||
public List<InStockin> selectInStockinFinishListByInStockin(InStockin inStockin) {
|
||||
return inStockinFinishMapper.selectInStockinFinishListByInStockin(inStockin);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
@@ -240,6 +242,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
basStockService.insertBasStockList(list);
|
||||
//结束任务
|
||||
mydoJob.setStatus("4");
|
||||
mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
updateMydoJob(mydoJob);
|
||||
// 插入任务历史表 删除任务
|
||||
insertHistory(mydoJob.getJobId());
|
||||
@@ -302,6 +305,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
|
||||
//结束任务
|
||||
mydoJob.setStatus("4");
|
||||
mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
updateMydoJob(mydoJob);
|
||||
// 插入任务历史表 删除任务
|
||||
insertHistory(mydoJob.getJobId());
|
||||
@@ -360,6 +364,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
|
||||
//结束任务
|
||||
mydoJob.setStatus("4");
|
||||
mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
updateMydoJob(mydoJob);
|
||||
// 插入任务历史表 删除任务
|
||||
insertHistory(mydoJob.getJobId());
|
||||
@@ -438,6 +443,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
basCargoSpaceService.updateBasCargoSpace(cargoSpace);
|
||||
}
|
||||
job.setStatus("5");
|
||||
job.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
updateMydoJob(job);
|
||||
insertHistory(jobId);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.ruoyi.job.mydojobfinish.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -12,19 +14,19 @@ import com.ruoyi.job.mydojobfinish.service.IMydoJobFinishService;
|
||||
|
||||
/**
|
||||
* 历史主作业Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@Service
|
||||
public class MydoJobFinishServiceImpl implements IMydoJobFinishService
|
||||
public class MydoJobFinishServiceImpl implements IMydoJobFinishService
|
||||
{
|
||||
@Autowired
|
||||
private MydoJobFinishMapper mydoJobFinishMapper;
|
||||
|
||||
/**
|
||||
* 查询历史主作业
|
||||
*
|
||||
*
|
||||
* @param jobId 历史主作业主键
|
||||
* @return 历史主作业
|
||||
*/
|
||||
@@ -36,7 +38,7 @@ public class MydoJobFinishServiceImpl implements IMydoJobFinishService
|
||||
|
||||
/**
|
||||
* 查询历史主作业列表
|
||||
*
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 历史主作业
|
||||
*/
|
||||
@@ -47,13 +49,14 @@ public class MydoJobFinishServiceImpl implements IMydoJobFinishService
|
||||
}
|
||||
|
||||
@Override
|
||||
@DataScope(warehouseAlias = "bw")
|
||||
public List<MydoJob> selectMydoJobFinishListByMydoJob(MydoJob mydoJob) {
|
||||
return mydoJobFinishMapper.selectMydoJobFinishListByMydoJob(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增历史主作业
|
||||
*
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -66,7 +69,7 @@ public class MydoJobFinishServiceImpl implements IMydoJobFinishService
|
||||
|
||||
/**
|
||||
* 修改历史主作业
|
||||
*
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -78,7 +81,7 @@ public class MydoJobFinishServiceImpl implements IMydoJobFinishService
|
||||
|
||||
/**
|
||||
* 批量删除历史主作业
|
||||
*
|
||||
*
|
||||
* @param jobIds 需要删除的历史主作业主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -90,7 +93,7 @@ public class MydoJobFinishServiceImpl implements IMydoJobFinishService
|
||||
|
||||
/**
|
||||
* 删除历史主作业信息
|
||||
*
|
||||
*
|
||||
* @param jobId 历史主作业主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,11 @@ import java.util.stream.Collectors;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ruoyi.bas.tag.domain.BasTag;
|
||||
import com.ruoyi.bas.tag.service.IBasTagService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.out.tagTask.domain.ExecuteSocket;
|
||||
import com.ruoyi.pda.domain.TrayCodeMakeSure;
|
||||
import com.ruoyi.pda.service.PdaService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -39,6 +42,8 @@ public class TagTaskServiceImpl implements ITagTaskService {
|
||||
private TagTaskMapper tagTaskMapper;
|
||||
@Autowired
|
||||
private IBasTagService basTagService;
|
||||
@Autowired
|
||||
private PdaService pdaService;
|
||||
|
||||
private HashMap<String, ExecuteSocket> tagSockteMap = new HashMap<>();
|
||||
|
||||
@@ -128,12 +133,18 @@ public class TagTaskServiceImpl implements ITagTaskService {
|
||||
boolean b = sendDzbqOff(basTag);
|
||||
log.info("灭灯:{}", b);
|
||||
if (b) {
|
||||
//删除标签绑定信息
|
||||
basTag.setSendCompleted("0");
|
||||
basTag.setTrayCode("");
|
||||
basTagService.updateBasTag(basTag);
|
||||
//删除tagList
|
||||
tagTaskMapper.deleteTagTaskByIds(tagTaskList.stream().map(TagTask::getId).toArray(Long[]::new));
|
||||
//出库确认
|
||||
TrayCodeMakeSure trayCodeMakeSure = new TrayCodeMakeSure();
|
||||
trayCodeMakeSure.setTrayCode(basTag.getTrayCode());
|
||||
AjaxResult ajaxResult = pdaService.outMakeSure(trayCodeMakeSure);
|
||||
if (ajaxResult.isSuccess()){
|
||||
//删除标签绑定信息
|
||||
basTag.setSendCompleted("0");
|
||||
basTag.setTrayCode("");
|
||||
basTagService.updateBasTag(basTag);
|
||||
//删除tagList
|
||||
tagTaskMapper.deleteTagTaskByIds(tagTaskList.stream().map(TagTask::getId).toArray(Long[]::new));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Optional<TagTask> first = tagTaskList.stream().filter(x -> "1".equals(x.getStatus())).findFirst();
|
||||
@@ -247,7 +258,7 @@ public class TagTaskServiceImpl implements ITagTaskService {
|
||||
|
||||
|
||||
/**
|
||||
* 下发电子标签
|
||||
* todo 待调试 下发电子标签
|
||||
* @param basTag
|
||||
* @param tagTask
|
||||
* @return
|
||||
@@ -267,11 +278,12 @@ public class TagTaskServiceImpl implements ITagTaskService {
|
||||
int x7 = (sid + 0x02+0x80 + x3 + x4 + x5 + x6) % 256;//累加 校验
|
||||
String value = "FA" + String.format("%02x", sid) + String.format("%02x", 0x02) + String.format("%02x", 0x80) + greenFirst2 +
|
||||
greenLast2 + redFirst2 + redLast2 + String.format("%02x", x7) + "AF";
|
||||
System.out.println(value);
|
||||
return sendMsgSocket(getSocket(basTag),value);
|
||||
//boolean b = sendMsgSocket(getSocket(basTag), value);
|
||||
log.info("电子标签{},发送指令{}",basTag.getId(), value);
|
||||
return true;
|
||||
}
|
||||
|
||||
// 发送消息
|
||||
//todo 待调试 发送消息
|
||||
public boolean sendMsgSocket(Socket socket,String msg) {
|
||||
byte[] bytes = hexStringToByteArray(msg);
|
||||
try(OutputStream os = socket.getOutputStream()) {
|
||||
|
||||
@@ -15,6 +15,7 @@ import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import com.ruoyi.bas.BasProduct.service.IBasProductService;
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.domain.ExtraField;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
@@ -76,6 +77,7 @@ public class ReceiveStockinServiceImpl implements IReceiveStockinService
|
||||
* @return 收货单据
|
||||
*/
|
||||
@Override
|
||||
@DataScope(warehouseAlias = "rs")
|
||||
public List<ReceiveStockin> selectReceiveStockinList(ReceiveStockin receiveStockin)
|
||||
{
|
||||
return receiveStockinMapper.selectReceiveStockinList(receiveStockin);
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.receive.stockinfinish.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.receive.stockin.domain.ReceiveStockin;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -94,6 +95,7 @@ public class ReceiveStockinFinishServiceImpl implements IReceiveStockinFinishSer
|
||||
}
|
||||
|
||||
@Override
|
||||
@DataScope(warehouseAlias = "rs")
|
||||
public List<ReceiveStockin> selectReceiveStockinList(ReceiveStockin receiveStockin) {
|
||||
return receiveStockinFinishMapper.selectReceiveStockinList(receiveStockin);
|
||||
}
|
||||
|
||||
@@ -144,6 +144,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where lot_no like concat('%',#{lotNo},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by is2.create_date desc
|
||||
</select>
|
||||
|
||||
@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.job.mydojobfinish.mapper.MydoJobFinishMapper">
|
||||
|
||||
<resultMap type="MydoJobFinish" id="MydoJobFinishResult">
|
||||
<resultMap type="MydoJob" id="MydoJobFinishResult">
|
||||
<result property="jobId" column="job_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="onLineType" column="on_line_type" />
|
||||
@@ -30,77 +30,127 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="classId" column="class_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="faultFlag" column="fault_flag" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="targetCargoSpaceName" column="target_cargo_space_name" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="departmentName" column="dept_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMydoJobFinishVo">
|
||||
select job_id, status, on_line_type, task_no, supplier_id, customer_id, department_id, tray_code, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, line_id, workshop_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, class_id, warehouse_id, fault_flag from mydo_job_finish
|
||||
select mj.job_id, mj.status, mj.on_line_type, mj.task_no, mj.supplier_id,
|
||||
mj.customer_id, mj.department_id, mj.tray_code, mj.roadway_id, mj.cargo_space_id,
|
||||
mj.target_roadway_id, mj.target_cargo_space_id, mj.line_id, mj.workshop_id, mj.priority,
|
||||
mj.execution_phase, mj.in_or_out, mj.create_time, mj.start_time, mj.finish_time, mj.entrance_id,
|
||||
mj.exit_id, mj.class_id, mj.warehouse_id, mj.fault_flag,
|
||||
bs.supplier_name as supplier_name, bc.customer_name as customer_name,
|
||||
bcs.cargo_space_name as cargo_space_name, bcst.cargo_space_name as target_cargo_space_name,
|
||||
bw.warehouse_name as warehouse_name,sd.dept_name
|
||||
from mydo_job_finish mj
|
||||
left join bas_supplier bs on mj.supplier_id = bs.id
|
||||
left join bas_customer bc on mj.customer_id = bc.id
|
||||
left join bas_cargo_space bcs on mj.cargo_space_id = bcs.cargo_space_id
|
||||
left join bas_cargo_space bcst on mj.target_cargo_space_id = bcst.cargo_space_id
|
||||
left join bas_warehouse bw on mj.warehouse_id = bw.warehouse_id
|
||||
left join sys_dept sd on mj.department_id = sd.dept_id
|
||||
</sql>
|
||||
|
||||
<select id="selectMydoJobFinishList" parameterType="MydoJobFinish" resultMap="MydoJobFinishResult">
|
||||
<include refid="selectMydoJobFinishVo"/>
|
||||
<where>
|
||||
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="onLineType != null and onLineType != ''"> and on_line_type = #{onLineType}</if>
|
||||
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and department_id = #{departmentId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</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="lineId != null and lineId != ''"> and line_id = #{lineId}</if>
|
||||
<if test="workshopId != null and workshopId != ''"> and workshop_id = #{workshopId}</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="classId != null and classId != ''"> and class_id = #{classId}</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="jobId != null and jobId != ''"> and mj.job_id = #{jobId}</if>
|
||||
<if test="status != null and status != ''"> and mj.status = #{status}</if>
|
||||
<if test="onLineType != null and onLineType != ''"> and mj.on_line_type = #{onLineType}</if>
|
||||
<if test="taskNo != null and taskNo != ''"> and mj.task_no = #{taskNo}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and mj.supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and mj.customer_id = #{customerId}</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and mj.department_id = #{departmentId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and mj.tray_code = #{trayCode}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and mj.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and mj.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="targetRoadwayId != null and targetRoadwayId != ''"> and mj.target_roadway_id = #{targetRoadwayId}</if>
|
||||
<if test="targetCargoSpaceId != null and targetCargoSpaceId != ''"> and mj.target_cargo_space_id = #{targetCargoSpaceId}</if>
|
||||
<if test="lineId != null and lineId != ''"> and mj.line_id = #{lineId}</if>
|
||||
<if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>
|
||||
<if test="priority != null "> and mj.priority = #{priority}</if>
|
||||
<if test="executionPhase != null and executionPhase != ''"> and mj.execution_phase = #{executionPhase}</if>
|
||||
<if test="inOrOut != null and inOrOut != ''"> and mj.in_or_out = #{inOrOut}</if>
|
||||
<if test="startTime != null and startTime != ''"> and mj.start_time like concat('%', #{startTime}, '%')</if>
|
||||
<if test="finishTime != null and finishTime != ''"> and mj.finish_time like concat('%', #{finishTime}, '%')</if>
|
||||
<if test="entranceId != null and entranceId != ''"> and mj.entrance_id = #{entranceId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and mj.exit_id = #{exitId}</if>
|
||||
<if test="classId != null and classId != ''"> and mj.class_id = #{classId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and mj.warehouse_id = #{warehouseId}</if>
|
||||
<if test="faultFlag != null and faultFlag != ''"> and mj.fault_flag = #{faultFlag}</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and mj.in_or_out >=20</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='3'.toString "> and mj.in_or_out in (5,6)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='4'.toString "> and mj.in_or_out in (25,26)</if>
|
||||
<if test = "inOutIds !=null and inOutIds.size() > 0">
|
||||
and mj.in_or_out in
|
||||
<foreach item="item" index="index" collection="inOutIds" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by mj.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectMydoJobFinishListByMydoJob" parameterType="MydoJob" resultMap="MydoJobFinishResult">
|
||||
<include refid="selectMydoJobFinishVo"/>
|
||||
<where>
|
||||
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="onLineType != null and onLineType != ''"> and on_line_type = #{onLineType}</if>
|
||||
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and department_id = #{departmentId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</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="lineId != null and lineId != ''"> and line_id = #{lineId}</if>
|
||||
<if test="workshopId != null and workshopId != ''"> and workshop_id = #{workshopId}</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="classId != null and classId != ''"> and class_id = #{classId}</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="inOut != null and inOut != '' and inOut =='2'.toString "> and in_or_out >=20</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and in_or_out < 20</if>
|
||||
<if test="jobId != null and jobId != ''"> and mj.job_id = #{jobId}</if>
|
||||
<if test="status != null and status != ''"> and mj.status = #{status}</if>
|
||||
<if test="onLineType != null and onLineType != ''"> and mj.on_line_type = #{onLineType}</if>
|
||||
<if test="taskNo != null and taskNo != ''"> and mj.task_no = #{taskNo}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and mj.supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and mj.customer_id = #{customerId}</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and mj.department_id = #{departmentId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and mj.tray_code = #{trayCode}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and mj.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and mj.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="targetRoadwayId != null and targetRoadwayId != ''"> and mj.target_roadway_id = #{targetRoadwayId}</if>
|
||||
<if test="targetCargoSpaceId != null and targetCargoSpaceId != ''"> and mj.target_cargo_space_id = #{targetCargoSpaceId}</if>
|
||||
<if test="lineId != null and lineId != ''"> and mj.line_id = #{lineId}</if>
|
||||
<if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>
|
||||
<if test="priority != null "> and mj.priority = #{priority}</if>
|
||||
<if test="executionPhase != null and executionPhase != ''"> and mj.execution_phase = #{executionPhase}</if>
|
||||
<if test="inOrOut != null and inOrOut != ''"> and mj.in_or_out = #{inOrOut}</if>
|
||||
<if test="startTime != null and startTime != ''"> and mj.start_time like concat('%', #{startTime}, '%')</if>
|
||||
<if test="finishTime != null and finishTime != ''"> and mj.finish_time like concat('%', #{finishTime}, '%')</if>
|
||||
<if test="entranceId != null and entranceId != ''"> and mj.entrance_id = #{entranceId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and mj.exit_id = #{exitId}</if>
|
||||
<if test="classId != null and classId != ''"> and mj.class_id = #{classId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and mj.warehouse_id = #{warehouseId}</if>
|
||||
<if test="faultFlag != null and faultFlag != ''"> and mj.fault_flag = #{faultFlag}</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and mj.in_or_out >=20</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='3'.toString "> and mj.in_or_out in (5,6)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='4'.toString "> and mj.in_or_out in (25,26)</if>
|
||||
<if test = "inOutIds !=null and inOutIds.size() > 0">
|
||||
and mj.in_or_out in
|
||||
<foreach item="item" index="index" collection="inOutIds" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by mj.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectMydoJobFinishByJobId" parameterType="String" resultMap="MydoJobFinishResult">
|
||||
<include refid="selectMydoJobFinishVo"/>
|
||||
where job_id = #{jobId}
|
||||
where mj.job_id = #{jobId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMydoJobFinish" parameterType="MydoJobFinish">
|
||||
|
||||
@@ -145,6 +145,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where rsd.lot_no like concat('%',#{lotNo},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by rs.create_date desc
|
||||
</select>
|
||||
|
||||
@@ -97,6 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where rsd.lot_no like concat('%',#{lotNo},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by rs.create_date desc
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user