生产报工按照工序的是否质检确认修改
This commit is contained in:
parent
0475f95ce2
commit
d09046142a
@ -4,6 +4,7 @@ import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ktg.common.constant.UserConstants;
|
||||
import com.ktg.common.utils.StringUtils;
|
||||
import com.ktg.mes.md.domain.MdWorkstation;
|
||||
@ -123,6 +124,30 @@ public class ProFeedbackController extends BaseController
|
||||
}else {
|
||||
return AjaxResult.error("当前生产任务对应的工作站不存在!");
|
||||
}
|
||||
//检查对应的工艺路线和工序配置
|
||||
if(StringUtils.isNotNull(proFeedback.getRouteId())&& StringUtils.isNotNull(proFeedback.getProcessId())){
|
||||
ProRouteProcess param = new ProRouteProcess();
|
||||
param.setRouteId(proFeedback.getRouteId());
|
||||
param.setProcessId(proFeedback.getProcessId());
|
||||
List<ProRouteProcess> processes = proRouteProcessService.selectProRouteProcessList(param);
|
||||
if(CollectionUtil.isEmpty(processes)){
|
||||
return AjaxResult.error("未找到生产任务对应的工艺工序配置!");
|
||||
}
|
||||
}else {
|
||||
return AjaxResult.error("当前生产任务对应的工艺工序配置无效!");
|
||||
}
|
||||
|
||||
//检查数量
|
||||
if(UserConstants.YES.equals(proFeedback.getIsCheck())){
|
||||
if(!StringUtils.isNotNull(proFeedback.getQuantityUncheck())){
|
||||
return AjaxResult.error("请输入待检测数量!");
|
||||
}
|
||||
}else {
|
||||
if(!StringUtils.isNotNull(proFeedback.getQuantityQualified()) || !StringUtils.isNotNull(proFeedback.getQuantityUnquanlified())){
|
||||
return AjaxResult.error("请输入合格品和不良品数量!");
|
||||
}
|
||||
}
|
||||
|
||||
proFeedback.setCreateBy(getUsername());
|
||||
return toAjax(proFeedbackService.insertProFeedback(proFeedback));
|
||||
}
|
||||
@ -135,6 +160,38 @@ public class ProFeedbackController extends BaseController
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ProFeedback proFeedback)
|
||||
{
|
||||
MdWorkstation workstation = mdWorkstationService.selectMdWorkstationByWorkstationId(proFeedback.getWorkstationId());
|
||||
if(StringUtils.isNotNull(workstation)){
|
||||
proFeedback.setProcessId(workstation.getProcessId());
|
||||
proFeedback.setProcessCode(workstation.getProcessCode());
|
||||
proFeedback.setProcessName(workstation.getProcessName());
|
||||
}else {
|
||||
return AjaxResult.error("当前生产任务对应的工作站不存在!");
|
||||
}
|
||||
|
||||
//检查对应的工艺路线和工序配置
|
||||
if(StringUtils.isNotNull(proFeedback.getRouteId())&& StringUtils.isNotNull(proFeedback.getProcessId())){
|
||||
ProRouteProcess param = new ProRouteProcess();
|
||||
param.setRouteId(proFeedback.getRouteId());
|
||||
param.setProcessId(proFeedback.getProcessId());
|
||||
List<ProRouteProcess> processes = proRouteProcessService.selectProRouteProcessList(param);
|
||||
if(CollectionUtil.isEmpty(processes)){
|
||||
return AjaxResult.error("未找到生产任务对应的工艺工序配置!");
|
||||
}
|
||||
}else {
|
||||
return AjaxResult.error("当前生产任务对应的工艺工序配置无效!");
|
||||
}
|
||||
|
||||
//检查数量
|
||||
if(UserConstants.YES.equals(proFeedback.getIsCheck())){
|
||||
if(!StringUtils.isNotNull(proFeedback.getQuantityUncheck())){
|
||||
return AjaxResult.error("当前工作站报工需要经过质检确认,请输入待检测数量!");
|
||||
}
|
||||
}else {
|
||||
if(!StringUtils.isNotNull(proFeedback.getQuantityQualified()) || !StringUtils.isNotNull(proFeedback.getQuantityUnquanlified())){
|
||||
return AjaxResult.error("请输入合格品和不良品数量!");
|
||||
}
|
||||
}
|
||||
return toAjax(proFeedbackService.updateProFeedback(proFeedback));
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ktg.mes.pro.controller.mobile;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ktg.common.annotation.Log;
|
||||
import com.ktg.common.constant.UserConstants;
|
||||
import com.ktg.common.core.controller.BaseController;
|
||||
@ -10,7 +11,9 @@ import com.ktg.common.utils.StringUtils;
|
||||
import com.ktg.mes.md.domain.MdWorkstation;
|
||||
import com.ktg.mes.md.service.IMdWorkstationService;
|
||||
import com.ktg.mes.pro.domain.ProFeedback;
|
||||
import com.ktg.mes.pro.domain.ProRouteProcess;
|
||||
import com.ktg.mes.pro.service.IProFeedbackService;
|
||||
import com.ktg.mes.pro.service.IProRouteProcessService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -30,6 +33,8 @@ public class ProFeedBackMobController extends BaseController {
|
||||
@Autowired
|
||||
private IMdWorkstationService mdWorkstationService;
|
||||
|
||||
@Autowired
|
||||
private IProRouteProcessService proRouteProcessService;
|
||||
|
||||
/**
|
||||
* 新增生产报工记录
|
||||
@ -48,6 +53,31 @@ public class ProFeedBackMobController extends BaseController {
|
||||
}else {
|
||||
return AjaxResult.error("当前生产任务对应的工作站不存在!");
|
||||
}
|
||||
|
||||
//检查对应的工艺路线和工序配置
|
||||
if(StringUtils.isNotNull(proFeedback.getRouteId())&& StringUtils.isNotNull(proFeedback.getProcessId())){
|
||||
ProRouteProcess param = new ProRouteProcess();
|
||||
param.setRouteId(proFeedback.getRouteId());
|
||||
param.setProcessId(proFeedback.getProcessId());
|
||||
List<ProRouteProcess> processes = proRouteProcessService.selectProRouteProcessList(param);
|
||||
if(CollectionUtil.isEmpty(processes)){
|
||||
return AjaxResult.error("未找到生产任务对应的工艺工序配置!");
|
||||
}
|
||||
}else {
|
||||
return AjaxResult.error("当前生产任务对应的工艺工序配置无效!");
|
||||
}
|
||||
|
||||
//检查数量
|
||||
if(UserConstants.YES.equals(proFeedback.getIsCheck())){
|
||||
if(!StringUtils.isNotNull(proFeedback.getQuantityUncheck())){
|
||||
return AjaxResult.error("当前工作站报工需要经过质检确认,请输入待检测数量!");
|
||||
}
|
||||
}else {
|
||||
if(!StringUtils.isNotNull(proFeedback.getQuantityQualified()) || !StringUtils.isNotNull(proFeedback.getQuantityUnquanlified())){
|
||||
return AjaxResult.error("请输入合格品和不良品数量!");
|
||||
}
|
||||
}
|
||||
|
||||
proFeedback.setCreateBy(getUsername());
|
||||
proFeedbackService.insertProFeedback(proFeedback);
|
||||
return AjaxResult.success(proFeedback);
|
||||
@ -106,6 +136,39 @@ public class ProFeedBackMobController extends BaseController {
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ProFeedback proFeedback)
|
||||
{
|
||||
MdWorkstation workstation = mdWorkstationService.selectMdWorkstationByWorkstationId(proFeedback.getWorkstationId());
|
||||
if(StringUtils.isNotNull(workstation)){
|
||||
proFeedback.setProcessId(workstation.getProcessId());
|
||||
proFeedback.setProcessCode(workstation.getProcessCode());
|
||||
proFeedback.setProcessName(workstation.getProcessName());
|
||||
}else {
|
||||
return AjaxResult.error("当前生产任务对应的工作站不存在!");
|
||||
}
|
||||
|
||||
//检查对应的工艺路线和工序配置
|
||||
if(StringUtils.isNotNull(proFeedback.getRouteId())&& StringUtils.isNotNull(proFeedback.getProcessId())){
|
||||
ProRouteProcess param = new ProRouteProcess();
|
||||
param.setRouteId(proFeedback.getRouteId());
|
||||
param.setProcessId(proFeedback.getProcessId());
|
||||
List<ProRouteProcess> processes = proRouteProcessService.selectProRouteProcessList(param);
|
||||
if(CollectionUtil.isEmpty(processes)){
|
||||
return AjaxResult.error("未找到生产任务对应的工艺工序配置!");
|
||||
}
|
||||
}else {
|
||||
return AjaxResult.error("当前生产任务对应的工艺工序配置无效!");
|
||||
}
|
||||
|
||||
//检查数量
|
||||
if(UserConstants.YES.equals(proFeedback.getIsCheck())){
|
||||
if(!StringUtils.isNotNull(proFeedback.getQuantityUncheck())){
|
||||
return AjaxResult.error("当前工作站报工需要经过质检确认,请输入待检测数量!");
|
||||
}
|
||||
}else {
|
||||
if(!StringUtils.isNotNull(proFeedback.getQuantityQualified()) || !StringUtils.isNotNull(proFeedback.getQuantityUnquanlified())){
|
||||
return AjaxResult.error("请输入合格品和不良品数量!");
|
||||
}
|
||||
}
|
||||
|
||||
return toAjax(proFeedbackService.updateProFeedback(proFeedback));
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,10 @@ public class ProFeedback extends BaseEntity
|
||||
@Excel(name = "工作站名称")
|
||||
private String workstationName;
|
||||
|
||||
private Long routeId;
|
||||
|
||||
private String routeCode;
|
||||
|
||||
/** 工序ID */
|
||||
private Long processId;
|
||||
|
||||
@ -52,6 +56,8 @@ public class ProFeedback extends BaseEntity
|
||||
@Excel(name = "工序名称")
|
||||
private String processName;
|
||||
|
||||
private String isCheck;
|
||||
|
||||
/** 生产工单ID */
|
||||
@Excel(name = "生产工单ID")
|
||||
private Long workorderId;
|
||||
@ -455,6 +461,30 @@ public class ProFeedback extends BaseEntity
|
||||
this.quantityUncheck = quantityUncheck;
|
||||
}
|
||||
|
||||
public String getIsCheck() {
|
||||
return isCheck;
|
||||
}
|
||||
|
||||
public void setIsCheck(String isCheck) {
|
||||
this.isCheck = isCheck;
|
||||
}
|
||||
|
||||
public Long getRouteId() {
|
||||
return routeId;
|
||||
}
|
||||
|
||||
public void setRouteId(Long routeId) {
|
||||
this.routeId = routeId;
|
||||
}
|
||||
|
||||
public String getRouteCode() {
|
||||
return routeCode;
|
||||
}
|
||||
|
||||
public void setRouteCode(String routeCode) {
|
||||
this.routeCode = routeCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ProFeedback{" +
|
||||
@ -464,9 +494,12 @@ public class ProFeedback extends BaseEntity
|
||||
", workstationId=" + workstationId +
|
||||
", workstationCode='" + workstationCode + '\'' +
|
||||
", workstationName='" + workstationName + '\'' +
|
||||
", routeId=" + routeId +
|
||||
", routeCode='" + routeCode + '\'' +
|
||||
", processId=" + processId +
|
||||
", processCode='" + processCode + '\'' +
|
||||
", processName='" + processName + '\'' +
|
||||
", isCheck='" + isCheck + '\'' +
|
||||
", workorderId=" + workorderId +
|
||||
", workorderCode='" + workorderCode + '\'' +
|
||||
", workorderName='" + workorderName + '\'' +
|
||||
|
@ -69,6 +69,9 @@ public class ProRouteProcess extends BaseEntity
|
||||
/** 是否关键工序 */
|
||||
private String keyFlag;
|
||||
|
||||
/** 是否质检 */
|
||||
private String isCheck;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
@ -207,6 +210,14 @@ public class ProRouteProcess extends BaseEntity
|
||||
return colorCode;
|
||||
}
|
||||
|
||||
public String getIsCheck() {
|
||||
return isCheck;
|
||||
}
|
||||
|
||||
public void setIsCheck(String isCheck) {
|
||||
this.isCheck = isCheck;
|
||||
}
|
||||
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
@ -263,6 +274,7 @@ public class ProRouteProcess extends BaseEntity
|
||||
", defaultSufTime=" + defaultSufTime +
|
||||
", colorCode='" + colorCode + '\'' +
|
||||
", keyFlag='" + keyFlag + '\'' +
|
||||
", isCheck='" + isCheck + '\'' +
|
||||
", attr1='" + attr1 + '\'' +
|
||||
", attr2='" + attr2 + '\'' +
|
||||
", attr3=" + attr3 +
|
||||
|
@ -53,6 +53,10 @@ public class ProTask extends BaseEntity
|
||||
@Excel(name = "工作站名称")
|
||||
private String workstationName;
|
||||
|
||||
private Long routeId;
|
||||
|
||||
private String routeCode;
|
||||
|
||||
/** 工序ID */
|
||||
@Excel(name = "工序ID")
|
||||
private Long processId;
|
||||
@ -65,6 +69,8 @@ public class ProTask extends BaseEntity
|
||||
@Excel(name = "工序名称")
|
||||
private String processName;
|
||||
|
||||
private String isCheck;
|
||||
|
||||
/** 产品物料ID */
|
||||
@Excel(name = "产品物料ID")
|
||||
private Long itemId;
|
||||
@ -477,6 +483,30 @@ public class ProTask extends BaseEntity
|
||||
return attr4;
|
||||
}
|
||||
|
||||
public Long getRouteId() {
|
||||
return routeId;
|
||||
}
|
||||
|
||||
public void setRouteId(Long routeId) {
|
||||
this.routeId = routeId;
|
||||
}
|
||||
|
||||
public String getRouteCode() {
|
||||
return routeCode;
|
||||
}
|
||||
|
||||
public void setRouteCode(String routeCode) {
|
||||
this.routeCode = routeCode;
|
||||
}
|
||||
|
||||
public String getIsCheck() {
|
||||
return isCheck;
|
||||
}
|
||||
|
||||
public void setIsCheck(String isCheck) {
|
||||
this.isCheck = isCheck;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ProTask{" +
|
||||
@ -489,9 +519,12 @@ public class ProTask extends BaseEntity
|
||||
", workstationId=" + workstationId +
|
||||
", workstationCode='" + workstationCode + '\'' +
|
||||
", workstationName='" + workstationName + '\'' +
|
||||
", routeId=" + routeId +
|
||||
", routeCode='" + routeCode + '\'' +
|
||||
", processId=" + processId +
|
||||
", processCode='" + processCode + '\'' +
|
||||
", processName='" + processName + '\'' +
|
||||
", isCheck='" + isCheck + '\'' +
|
||||
", itemId=" + itemId +
|
||||
", itemCode='" + itemCode + '\'' +
|
||||
", itemName='" + itemName + '\'' +
|
||||
|
@ -14,9 +14,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="workorderId" column="workorder_id" />
|
||||
<result property="workorderCode" column="workorder_code" />
|
||||
<result property="workorderName" column="workorder_name" />
|
||||
<result property="routeId" column="route_id" />
|
||||
<result property="routeCode" column="route_code" />
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="processCode" column="process_code" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="isCheck" column="is_check" />
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="taskCode" column="task_code" />
|
||||
<result property="itemId" column="item_id" />
|
||||
@ -28,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="quantityFeedback" column="quantity_feedback" />
|
||||
<result property="quantityQualified" column="quantity_qualified" />
|
||||
<result property="quantityUnquanlified" column="quantity_unquanlified" />
|
||||
<result property="quantityUnCheck" column="quantity_uncheck" />
|
||||
<result property="quantityUncheck" column="quantity_uncheck" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="feedbackChannel" column="feedback_channel" />
|
||||
@ -48,7 +51,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProFeedbackVo">
|
||||
select record_id,feedback_type, workstation_id, workstation_code, workstation_name,process_id, process_code, process_name, workorder_id, workorder_code, workorder_name, task_id, task_code,item_id,item_code,item_name,specification,unit_of_measure, quantity, quantity_feedback, quantity_qualified, quantity_unquanlified,quantity_uncheck, user_name, nick_name, feedback_channel, feedback_time,record_user,record_nick,status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_feedback
|
||||
select f.record_id,f.feedback_type, f.workstation_id, f.workstation_code, f.workstation_name,f.process_id, f.process_code, f.process_name,p.is_check, f.workorder_id, f.workorder_code, f.workorder_name, f.task_id, f.task_code,f.item_id,f.item_code,f.item_name,f.specification,f.unit_of_measure, f.quantity, f.quantity_feedback, f.quantity_qualified, f.quantity_unquanlified,f.quantity_uncheck, f.user_name, f.nick_name, f.feedback_channel, f.feedback_time,f.record_user,f.record_nick,f.status, f.remark, f.attr1, f.attr2, f.attr3, f.attr4, f.create_by, f.create_time, f.update_by, f.update_time
|
||||
from pro_feedback f
|
||||
left join pro_route_process p
|
||||
on f.process_id = p.process_id and f.route_id = p.route_id
|
||||
</sql>
|
||||
|
||||
<select id="selectProFeedbackList" parameterType="ProFeedback" resultMap="ProFeedbackResult">
|
||||
@ -59,9 +65,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="feedbackType !=null "> and feedback_type = #{feedbackType}</if>
|
||||
<if test="workstationCode != null and workstationCode != ''"> and workstation_code = #{workstationCode}</if>
|
||||
<if test="workstationName != null and workstationName != ''"> and workstation_name like concat('%', #{workstationName}, '%')</if>
|
||||
<if test="processId != null "> and process_id = #{processId}</if>
|
||||
<if test="processCode != null and processCode != ''"> and process_code = #{processCode}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="processId != null "> and f.process_id = #{processId}</if>
|
||||
<if test="processCode != null and processCode != ''"> and f.process_code = #{processCode}</if>
|
||||
<if test="processName != null and processName != ''"> and f.process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="workorderId != null "> and workorder_id = #{workorderId}</if>
|
||||
<if test="workorderCode != null and workorderCode != ''"> and workorder_code = #{workorderCode}</if>
|
||||
<if test="workorderName != null and workorderName != ''"> and workorder_name like concat('%', #{workorderName}, '%')</if>
|
||||
@ -76,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="quantityFeedback != null "> and quantity_feedback = #{quantityFeedback}</if>
|
||||
<if test="quantityQualified != null "> and quantity_qualified = #{quantityQualified}</if>
|
||||
<if test="quantityUnquanlified != null "> and quantity_unquanlified = #{quantityUnquanlified}</if>
|
||||
<if test="quantityUnCheck != null "> and quantity_uncheck = #{quantityUnCheck}</if>
|
||||
<if test="quantityUncheck != null "> and quantity_uncheck = #{quantityUncheck}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||
<if test="feedbackChannel != null and feedbackChannel != ''"> and feedback_channel = #{feedbackChannel}</if>
|
||||
@ -118,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="quantityFeedback != null">quantity_feedback,</if>
|
||||
<if test="quantityQualified != null">quantity_qualified,</if>
|
||||
<if test="quantityUnquanlified != null">quantity_unquanlified,</if>
|
||||
<if test="quantityUnCheck != null ">quantity_uncheck,</if>
|
||||
<if test="quantityUncheck != null ">quantity_uncheck,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="nickName != null">nick_name,</if>
|
||||
<if test="feedbackChannel != null">feedback_channel,</if>
|
||||
@ -159,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="quantityFeedback != null">#{quantityFeedback},</if>
|
||||
<if test="quantityQualified != null">#{quantityQualified},</if>
|
||||
<if test="quantityUnquanlified != null">#{quantityUnquanlified},</if>
|
||||
<if test="quantityUnCheck != null ">#{quantityUnCheck},</if>
|
||||
<if test="quantityUncheck != null ">#{quantityUncheck},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="nickName != null">#{nickName},</if>
|
||||
<if test="feedbackChannel != null">#{feedbackChannel},</if>
|
||||
@ -204,7 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="quantityFeedback != null">quantity_feedback = #{quantityFeedback},</if>
|
||||
<if test="quantityQualified != null">quantity_qualified = #{quantityQualified},</if>
|
||||
<if test="quantityUnquanlified != null">quantity_unquanlified = #{quantityUnquanlified},</if>
|
||||
<if test="quantityUnCheck != null ">quantity_uncheck = #{quantityUnCheck},</if>
|
||||
<if test="quantityUncheck != null ">quantity_uncheck = #{quantityUncheck},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="nickName != null">nick_name = #{nickName},</if>
|
||||
<if test="feedbackChannel != null">feedback_channel = #{feedbackChannel},</if>
|
||||
|
@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="defaultSufTime" column="default_suf_time" />
|
||||
<result property="colorCode" column="color_code" />
|
||||
<result property="keyFlag" column="key_flag" ></result>
|
||||
<result property="isCheck" column="is_check" ></result>
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
@ -31,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProRouteProcessVo">
|
||||
select record_id, route_id, process_id, process_code, process_name, order_num, next_process_id, next_process_code, next_process_name, link_type, default_pre_time, default_suf_time, color_code,key_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_route_process
|
||||
select record_id, route_id, process_id, process_code, process_name, order_num, next_process_id, next_process_code, next_process_name, link_type, default_pre_time, default_suf_time, color_code,key_flag,is_check, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_route_process
|
||||
</sql>
|
||||
|
||||
|
||||
@ -51,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="defaultSufTime != null "> and default_suf_time = #{defaultSufTime}</if>
|
||||
<if test="colorCode != null and colorCode != ''"> and color_code = #{colorCode}</if>
|
||||
<if test="keyFlag !=null and keyFlag !=''"> and key_flag = #{keyFlag}</if>
|
||||
<if test="isCheck !=null and isCheck !=''"> and is_check = #{isCheck}</if>
|
||||
</where>
|
||||
order by order_num asc
|
||||
</select>
|
||||
@ -123,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="defaultSufTime != null">default_suf_time,</if>
|
||||
<if test="colorCode != null">color_code,</if>
|
||||
<if test="keyFlag !=null">key_flag,</if>
|
||||
<if test="isCheck !=null">is_check,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
@ -147,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="defaultSufTime != null">#{defaultSufTime},</if>
|
||||
<if test="colorCode != null">#{colorCode},</if>
|
||||
<if test="keyFlag !=null">#{keyFlag},</if>
|
||||
<if test="isCheck !=null">#{isCheck},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
@ -174,6 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="defaultPreTime != null">default_pre_time = #{defaultPreTime},</if>
|
||||
<if test="defaultSufTime != null">default_suf_time = #{defaultSufTime},</if>
|
||||
<if test="keyFlag !=null">key_flag = #{keyFlag},</if>
|
||||
<if test="isCheck !=null">is_check = #{isCheck},</if>
|
||||
<if test="colorCode != null">color_code = #{colorCode},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
|
@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="processCode" column="process_code" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="isCheck" column="is_check" />
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="itemCode" column="item_code" />
|
||||
<result property="itemName" column="item_name" />
|
||||
@ -51,47 +52,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<sql id="selectProTaskVo">
|
||||
select task_id, task_code, task_name, workorder_id, workorder_code, workorder_name, workstation_id, workstation_code, workstation_name, process_id, process_code, process_name, item_id, item_code, item_name, specification, unit_of_measure, quantity, quantity_produced, quantity_changed, client_id, client_code, client_name, client_nick, start_time, duration, end_time, color_code, request_date, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, status, quantity_quanlify, quantity_unquanlify from pro_task
|
||||
select t.task_id, t.task_code, t.task_name, t.workorder_id, t.workorder_code, t.workorder_name,
|
||||
t.workstation_id, t.workstation_code, t.workstation_name,
|
||||
t.route_id, t.route_code,
|
||||
t.process_id, t.process_code, t.process_name,p.is_check,
|
||||
t.item_id, t.item_code, t.item_name, t.specification, t.unit_of_measure,
|
||||
t.quantity, t.quantity_produced, t.quantity_changed,
|
||||
t.client_id, t.client_code, t.client_name, t.client_nick,
|
||||
t.start_time, t.duration, t.end_time, t.color_code, t.request_date,
|
||||
t.remark, t.attr1, t.attr2, t.attr3, t.attr4, t.create_by, t.create_time, t.update_by, t.update_time,
|
||||
t.status, t.quantity_quanlify, t.quantity_unquanlify
|
||||
from pro_task t
|
||||
left join pro_route_process p
|
||||
on t.route_id = p.route_id and t.process_id = p.process_id
|
||||
</sql>
|
||||
|
||||
<select id="selectProTaskList" parameterType="ProTask" resultMap="ProTaskResult">
|
||||
<include refid="selectProTaskVo"/>
|
||||
<where>
|
||||
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode}</if>
|
||||
<if test="taskName != null and taskName != ''"> and task_name like concat('%', #{taskName}, '%')</if>
|
||||
<if test="workorderId != null "> and workorder_id = #{workorderId}</if>
|
||||
<if test="workorderCode != null and workorderCode != ''"> and workorder_code = #{workorderCode}</if>
|
||||
<if test="workorderName != null and workorderName != ''"> and workorder_name like concat('%', #{workorderName}, '%')</if>
|
||||
<if test="workstationId != null "> and workstation_id = #{workstationId}</if>
|
||||
<if test="workstationCode != null and workstationCode != ''"> and workstation_code = #{workstationCode}</if>
|
||||
<if test="workstationName != null and workstationName != ''"> and workstation_name like concat('%', #{workstationName}, '%')</if>
|
||||
<if test="processId != null "> and process_id = #{processId}</if>
|
||||
<if test="processCode != null and processCode != ''"> and process_code = #{processCode}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
|
||||
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
||||
<if test="specification != null and specification != ''"> and specification = #{specification}</if>
|
||||
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and unit_of_measure = #{unitOfMeasure}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="quantityProduced != null "> and quantity_produced = #{quantityProduced}</if>
|
||||
<if test="quantityChanged != null "> and quantity_changed = #{quantityChanged}</if>
|
||||
<if test="clientId != null "> and client_id = #{clientId}</if>
|
||||
<if test="clientCode != null and clientCode != ''"> and client_code = #{clientCode}</if>
|
||||
<if test="clientName != null and clientName != ''"> and client_name like concat('%', #{clientName}, '%')</if>
|
||||
<if test="clientNick != null and clientNick != ''"> and client_nick = #{clientNick}</if>
|
||||
<if test="startTime != null "> and start_time = #{startTime}</if>
|
||||
<if test="duration != null "> and duration = #{duration}</if>
|
||||
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||
<if test="colorCode != null and colorCode != ''"> and color_code = #{colorCode}</if>
|
||||
<if test="requestDate != null "> and request_date = #{requestDate}</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
||||
<if test="attr4 != null "> and attr4 = #{attr4}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="quantityQuanlify != null "> and quantity_quanlify = #{quantityQuanlify}</if>
|
||||
<if test="quantityUnquanlify != null "> and quantity_unquanlify = #{quantityUnquanlify}</if>
|
||||
<if test="taskCode != null and taskCode != ''"> and t.task_code = #{taskCode}</if>
|
||||
<if test="taskName != null and taskName != ''"> and t.task_name like concat('%', #{taskName}, '%')</if>
|
||||
<if test="workorderId != null "> and t.workorder_id = #{workorderId}</if>
|
||||
<if test="workorderCode != null and workorderCode != ''"> and t.workorder_code = #{workorderCode}</if>
|
||||
<if test="workorderName != null and workorderName != ''"> and t.workorder_name like concat('%', #{workorderName}, '%')</if>
|
||||
<if test="workstationId != null "> and t.workstation_id = #{workstationId}</if>
|
||||
<if test="workstationCode != null and workstationCode != ''"> and t.workstation_code = #{workstationCode}</if>
|
||||
<if test="workstationName != null and workstationName != ''"> and t.workstation_name like concat('%', #{workstationName}, '%')</if>
|
||||
<if test="routeId != null "> and t.route_id = #{routeId}</if>
|
||||
<if test="routeCode != null and routeCode !=''"> and t.route_code = #{routeCode}</if>
|
||||
<if test="processId != null "> and t.process_id = #{processId}</if>
|
||||
<if test="processCode != null and processCode != ''"> and t.process_code = #{processCode}</if>
|
||||
<if test="processName != null and processName != ''"> and t.process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="itemId != null "> and t.item_id = #{itemId}</if>
|
||||
<if test="itemCode != null and itemCode != ''"> and t.item_code = #{itemCode}</if>
|
||||
<if test="itemName != null and itemName != ''"> and t.item_name like concat('%', #{itemName}, '%')</if>
|
||||
<if test="specification != null and specification != ''"> and t.specification = #{specification}</if>
|
||||
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and t.unit_of_measure = #{unitOfMeasure}</if>
|
||||
<if test="quantity != null "> and t.quantity = #{quantity}</if>
|
||||
<if test="quantityProduced != null "> and t.quantity_produced = #{quantityProduced}</if>
|
||||
<if test="quantityChanged != null "> and t.quantity_changed = #{quantityChanged}</if>
|
||||
<if test="clientId != null "> and t.client_id = #{clientId}</if>
|
||||
<if test="clientCode != null and clientCode != ''"> and t.client_code = #{clientCode}</if>
|
||||
<if test="clientName != null and clientName != ''"> and t.client_name like concat('%', #{clientName}, '%')</if>
|
||||
<if test="clientNick != null and clientNick != ''"> and t.client_nick = #{clientNick}</if>
|
||||
<if test="startTime != null "> and t.start_time = #{startTime}</if>
|
||||
<if test="duration != null "> and t.duration = #{duration}</if>
|
||||
<if test="endTime != null "> and t.end_time = #{endTime}</if>
|
||||
<if test="colorCode != null and colorCode != ''"> and t.color_code = #{colorCode}</if>
|
||||
<if test="requestDate != null "> and t.request_date = #{requestDate}</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and t.attr1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and t.attr2 = #{attr2}</if>
|
||||
<if test="attr3 != null "> and t.attr3 = #{attr3}</if>
|
||||
<if test="attr4 != null "> and t.attr4 = #{attr4}</if>
|
||||
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
||||
<if test="quantityQuanlify != null "> and t.quantity_quanlify = #{quantityQuanlify}</if>
|
||||
<if test="quantityUnquanlify != null "> and t.quantity_unquanlify = #{quantityUnquanlify}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -111,6 +126,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="workstationId != null">workstation_id,</if>
|
||||
<if test="workstationCode != null and workstationCode != ''">workstation_code,</if>
|
||||
<if test="workstationName != null and workstationName != ''">workstation_name,</if>
|
||||
<if test="routeId != null">route_id,</if>
|
||||
<if test="routeCode != null">route_code,</if>
|
||||
<if test="processId != null">process_id,</if>
|
||||
<if test="processCode != null">process_code,</if>
|
||||
<if test="processName != null">process_name,</if>
|
||||
@ -153,6 +170,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="workstationId != null">#{workstationId},</if>
|
||||
<if test="workstationCode != null and workstationCode != ''">#{workstationCode},</if>
|
||||
<if test="workstationName != null and workstationName != ''">#{workstationName},</if>
|
||||
<if test="routeId != null">#{routeId},</if>
|
||||
<if test="routeCode != null">#{routeCode},</if>
|
||||
<if test="processId != null">#{processId},</if>
|
||||
<if test="processCode != null">#{processCode},</if>
|
||||
<if test="processName != null">#{processName},</if>
|
||||
@ -199,6 +218,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="workstationId != null">workstation_id = #{workstationId},</if>
|
||||
<if test="workstationCode != null and workstationCode != ''">workstation_code = #{workstationCode},</if>
|
||||
<if test="workstationName != null and workstationName != ''">workstation_name = #{workstationName},</if>
|
||||
<if test="routeId != null">route_id = #{routeId},</if>
|
||||
<if test="routeCode != null and routeCode !=''">route_code = #{routeCode},</if>
|
||||
<if test="processId != null">process_id = #{processId},</if>
|
||||
<if test="processCode != null">process_code = #{processCode},</if>
|
||||
<if test="processName != null">process_name = #{processName},</if>
|
||||
|
Loading…
Reference in New Issue
Block a user