123
This commit is contained in:
@@ -89,4 +89,6 @@ public class MydoJob extends BaseEntity
|
||||
private String trayCode;
|
||||
|
||||
private String inOut;
|
||||
|
||||
private String flag;
|
||||
}
|
||||
|
||||
@@ -103,6 +103,7 @@ public class LineSsjThread implements Runnable {
|
||||
String serial = split[2].substring(7);
|
||||
mydoJob.setTrayCode(serial);
|
||||
mydoJob.setEntranceId("G1005");
|
||||
mydoJob.setFlag("0");
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectInOrOutMydoJobList(mydoJob);
|
||||
//有作业,下发输送机任务号,覆盖任务号
|
||||
if (!mydoJobs.isEmpty()) {
|
||||
@@ -125,6 +126,7 @@ public class LineSsjThread implements Runnable {
|
||||
paramMap.put("size", SsjDevice.getTraySize());
|
||||
paramMap.put("floor", "2");
|
||||
paramMap.put("entranceId", "G1005");
|
||||
paramMap.put("flag", "0");
|
||||
AjaxResult ajaxResult = apiService.createInMydoJob(paramMap);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
//拿到正常作业,插到wcs作业表,下发给输送机任务号,覆盖任务号
|
||||
@@ -168,6 +170,7 @@ public class LineSsjThread implements Runnable {
|
||||
mydoJob.setInOrOut("1");
|
||||
// mydoJob.setStatus("1");
|
||||
mydoJob.setEntranceId("G1005");
|
||||
mydoJob.setFlag("1");
|
||||
// mydoJob.setExecutionPhase("0");
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectInOrOutMydoJobList(mydoJob);
|
||||
if (!mydoJobs.isEmpty()) {
|
||||
|
||||
@@ -22,13 +22,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="exitId" column="exit_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="faultFlag" column="fault_flag" />
|
||||
<result property="flag" column="flag" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMydoJobVo">
|
||||
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 from mydo_job_wcs
|
||||
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 from mydo_job_wcs
|
||||
</sql>
|
||||
<sql id="selectMydoJobFinishVo">
|
||||
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 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 from mydo_job_wcs_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
|
||||
@@ -49,6 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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 trayCode = #{tray_code}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -78,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
)}
|
||||
</select>
|
||||
<select id="selectMydoJobByExitList" resultMap="MydoJobResult">
|
||||
select TOP 1 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 from mydo_job_wcs
|
||||
select TOP 1 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 from mydo_job_wcs
|
||||
where exit_id in
|
||||
<foreach item="item" index="index" collection="exitList" separator="," open="(" close=")">
|
||||
#{item}
|
||||
@@ -108,6 +112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="exitId != null">exit_id,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="faultFlag != null">fault_flag,</if>
|
||||
<if test="flag != null">flag,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="jobId != null">#{jobId},</if>
|
||||
@@ -127,6 +133,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="exitId != null">#{exitId},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="faultFlag != null">#{faultFlag},</if>
|
||||
<if test="flag != null">#{flag},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertHistory">
|
||||
@@ -153,6 +162,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="exitId != null">exit_id = #{exitId},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="faultFlag != null">fault_flag = #{faultFlag},</if>
|
||||
<if test="flag != null">flag = #{flag},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
</trim>
|
||||
where job_id = #{jobId}
|
||||
</update>
|
||||
@@ -189,10 +200,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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 job_id = #{jobId}</if>
|
||||
<if test="flag != null and flag != ''"> and flag = #{flag}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectMydoJobByEntranceList" resultMap="MydoJobResult">
|
||||
select TOP 1 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 from mydo_job_wcs
|
||||
select TOP 1 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 from mydo_job_wcs
|
||||
where entrance_id in
|
||||
<foreach item="item" index="index" collection="entranceList" separator="," open="(" close=")">
|
||||
#{item}
|
||||
@@ -218,10 +231,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectRunningMydoJobByExitList" resultMap="MydoJobResult">
|
||||
select TOP 1 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 from mydo_job_wcs
|
||||
select TOP 1 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, from mydo_job_wcs
|
||||
where exit_id in
|
||||
<foreach item="item" index="index" collection="exitList" separator="," open="(" close=")">
|
||||
#{item}
|
||||
|
||||
Reference in New Issue
Block a user