逻辑删除+手持增加缓冲区接口

master
zhaoxiaolin 2 years ago
parent b69c8561d9
commit e38a563f81

@ -1,100 +0,0 @@
package com.op.mes.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.common.core.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType;
import com.op.common.security.annotation.RequiresPermissions;
import com.op.mes.domain.MesPrepareValidate;
import com.op.mes.service.IMesPrepareValidateService;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.utils.poi.ExcelUtil;
import com.op.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author Open Platform
* @date 2023-08-04
*/
@RestController
@RequestMapping("/validate")
public class MesPrepareValidateController extends BaseController {
@Autowired
private IMesPrepareValidateService mesPrepareValidateService;
/**
*
*/
@RequiresPermissions("mes:validate:list")
@GetMapping("/list")
public TableDataInfo list(MesPrepareValidate mesPrepareValidate) {
startPage();
List<MesPrepareValidate> list = mesPrepareValidateService.selectMesPrepareValidateList(mesPrepareValidate);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("mes:validate:export")
@Log(title = "生产前准备记录报表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MesPrepareValidate mesPrepareValidate) {
List<MesPrepareValidate> list = mesPrepareValidateService.selectMesPrepareValidateList(mesPrepareValidate);
ExcelUtil<MesPrepareValidate> util = new ExcelUtil<MesPrepareValidate>(MesPrepareValidate.class);
util.exportExcel(response, list, "生产前准备记录报表数据");
}
/**
*
*/
@RequiresPermissions("mes:validate:query")
@GetMapping(value = "/{validateId}")
public AjaxResult getInfo(@PathVariable("validateId") String validateId) {
return success(mesPrepareValidateService.selectMesPrepareValidateByValidateId(validateId));
}
/**
*
*/
@RequiresPermissions("mes:validate:add")
@Log(title = "生产前准备记录报表", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MesPrepareValidate mesPrepareValidate) {
mesPrepareValidate.setValidateId(IdUtils.fastSimpleUUID());
return toAjax(mesPrepareValidateService.insertMesPrepareValidate(mesPrepareValidate));
}
/**
*
*/
@RequiresPermissions("mes:validate:edit")
@Log(title = "生产前准备记录报表", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MesPrepareValidate mesPrepareValidate) {
return toAjax(mesPrepareValidateService.updateMesPrepareValidate(mesPrepareValidate));
}
/**
*
*/
@RequiresPermissions("mes:validate:remove")
@Log(title = "生产前准备记录报表", businessType = BusinessType.DELETE)
@DeleteMapping("/{validateIds}")
public AjaxResult remove(@PathVariable String[] validateIds) {
return toAjax(mesPrepareValidateService.deleteMesPrepareValidateByValidateIds(validateIds));
}
}

@ -1,210 +0,0 @@
package com.op.mes.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity;
import java.util.Date;
/**
* mes_prepare_validate
*
* @author Open Platform
* @date 2023-08-04
*/
public class MesPrepareValidate extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 生产前准备id */
private String validateId;
/** 工单编码 */
@Excel(name = "工单编码")
private String workorderCode;
/** 工单名称 */
@Excel(name = "工单名称")
private String workorderName;
/** 产品规格型号 */
@Excel(name = "产品规格型号")
private String productSpc;
/** 产品名称 */
@Excel(name = "产品名称")
private String productName;
/** 单据状态 */
@Excel(name = "单据状态")
private String status;
/** 预留字段1 */
@Excel(name = "预留字段1")
private String attr1;
/** 预留字段2 */
@Excel(name = "预留字段2")
private String attr2;
/** 预留字段3 */
@Excel(name = "预留字段3")
private String attr3;
/** 预留字段4 */
@Excel(name = "预留字段4")
private String attr4;
/** 工厂编码 */
@Excel(name = "工厂编码")
private String factoryCode;
/** 完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
/** 准备类型 */
@Excel(name = "准备类型")
private String validateType;
/** 准备内容 */
@Excel(name = "准备内容")
private String validateName;
/** 准备状态 */
@Excel(name = "准备状态")
private String validateStatus;
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Date getEndTime() {
return endTime;
}
public void setValidateId(String validateId) {
this.validateId = validateId;
}
public String getValidateId() {
return validateId;
}
public void setValidateType(String validateType) {
this.validateType = validateType;
}
public String getValidateType() {
return validateType;
}
public void setValidateName(String validateName) {
this.validateName = validateName;
}
public String getValidateName() {
return validateName;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
public void setWorkorderCode(String workorderCode) {
this.workorderCode = workorderCode;
}
public String getWorkorderCode() {
return workorderCode;
}
public void setWorkorderName(String workorderName) {
this.workorderName = workorderName;
}
public String getWorkorderName() {
return workorderName;
}
public void setProductSpc(String productSpc) {
this.productSpc = productSpc;
}
public String getProductSpc() {
return productSpc;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductName() {
return productName;
}
public void setValidateStatus(String ValidateStatus) {
this.validateStatus = ValidateStatus;
}
public String getValidateStatus() {
return validateStatus;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setAttr4(String attr4) {
this.attr4 = attr4;
}
public String getAttr4() {
return attr4;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("validateId", getValidateId())
.append("workorderCode", getWorkorderCode())
.append("workorderName", getWorkorderName())
.append("productSpc", getProductSpc())
.append("productName", getProductName())
.append("status", getStatus())
.append("remark", getRemark())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("attr4", getAttr4())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("factoryCode", getFactoryCode())
.append("validateType", getValidateType())
.append("validateName", getValidateName())
.append("validatStatus", getStatus())
.append("endTime", getEndTime())
.toString();
}
}

@ -18,5 +18,4 @@ public interface MesMapper {
List<WCSDataItemsDTO> getWetPlanDetail(WCSDTO wcsdto);
void getSaveStationArrive(WCSDTO wcsdto);
}

@ -1,61 +0,0 @@
package com.op.mes.mapper;
import java.util.List;
import com.op.mes.domain.MesPrepareValidate;
/**
* Mapper
*
* @author Open Platform
* @date 2023-08-04
*/
public interface MesPrepareValidateMapper {
/**
*
*
* @param validateId
* @return
*/
public MesPrepareValidate selectMesPrepareValidateByValidateId(String validateId);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public List<MesPrepareValidate> selectMesPrepareValidateList(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public int insertMesPrepareValidate(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public int updateMesPrepareValidate(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param validateId
* @return
*/
public int deleteMesPrepareValidateByValidateId(String validateId);
/**
*
*
* @param validateIds
* @return
*/
public int deleteMesPrepareValidateByValidateIds(String[] validateIds);
}

@ -1,60 +0,0 @@
package com.op.mes.service;
import java.util.List;
import com.op.mes.domain.MesPrepareValidate;
/**
* Service
*
* @author Open Platform
* @date 2023-08-04
*/
public interface IMesPrepareValidateService {
/**
*
*
* @param validateId
* @return
*/
public MesPrepareValidate selectMesPrepareValidateByValidateId(String validateId);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public List<MesPrepareValidate> selectMesPrepareValidateList(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public int insertMesPrepareValidate(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public int updateMesPrepareValidate(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param validateIds
* @return
*/
public int deleteMesPrepareValidateByValidateIds(String[] validateIds);
/**
*
*
* @param validateId
* @return
*/
public int deleteMesPrepareValidateByValidateId(String validateId);
}

@ -9,8 +9,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bucket_code loadNo
from pro_wet_material_plan_detail
where material_code = #{sku} and CONVERT(varchar(10),plan_time, 120) = CONVERT(varchar(10),#{reqTime}, 120)
</select>
<select id="getSaveStationArrive">
and del_flag = '0'
</select>
</mapper>

@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
<if test="prodType != null and prodType != ''"> and prod_type = #{prodType}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
and del_flag = '0'
</where>
</select>
@ -117,6 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="prodType != null">#{prodType},</if>
<if test="factoryCode != null">#{factoryCode},</if>
</trim>
</insert>
<insert id="insertMesPrepareDetails">
@ -163,11 +165,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteMesPrepareDetailByRecordId" parameterType="String">
delete from mes_prepare_detail where record_id = #{recordId}
update mes_prepare_detail
set del_flag = '1'
where record_id = #{recordId}
</delete>
<delete id="deleteMesPrepareDetailByRecordIds" parameterType="String">
delete from mes_prepare_detail where record_id in
update mes_prepare_detail
set del_flag = '1'
where record_id in
<foreach item="recordId" collection="array" open="(" separator="," close=")">
#{recordId}
</foreach>

@ -94,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
and ms.del_flag = '0'
</where>
</select>
@ -108,11 +109,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from pro_order_workorder
where parent_order = '0' and prod_type != 'white'
and CONVERT(varchar(100), product_date, 23) = #{dayStr}
and del_flag = '0'
</select>
<select id="selectMesPrepareByCode" parameterType="String" resultMap="MesPrepareResult">
select prepare_id, workorder_code, workorder_name, parent_order, order_id, order_code, product_id, product_code, prod_type, product_name, product_spc, wet_detail_plan_id, product_date, shift_id, ancestors, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, unit from mes_prepare
where workorder_code = #{workorderCode}
select prepare_id, workorder_code, workorder_name, parent_order, order_id, order_code,
product_id, product_code, prod_type, product_name, product_spc, wet_detail_plan_id,
product_date, shift_id, ancestors, status, remark, attr1, attr2, attr3, attr4,
create_by, create_time, update_by, update_time, factory_code, unit
from mes_prepare
where workorder_code = #{workorderCode} and del_flag = '0'
</select>
<insert id="insertMesPrepare" parameterType="MesPrepare">
@ -218,11 +224,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteMesPrepareByPrepareId" parameterType="String">
delete from mes_prepare where prepare_id = #{prepareId}
update mes_prepare
set del_flag = '1'
where prepare_id = #{prepareId}
</delete>
<delete id="deleteMesPrepareByPrepareIds" parameterType="String">
delete from mes_prepare where prepare_id in
update mes_prepare
set del_flag = '1'
where prepare_id in
<foreach item="prepareId" collection="array" open="(" separator="," close=")">
#{prepareId}
</foreach>

@ -1,144 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.mes.mapper.MesPrepareValidateMapper">
<resultMap type="MesPrepareValidate" id="MesPrepareValidateResult">
<result property="validateId" column="validate_id" />
<result property="workorderCode" column="workorder_code" />
<result property="workorderName" column="workorder_name" />
<result property="productSpc" column="product_spc" />
<result property="productName" column="product_name" />
<result property="status" column="status" />
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="attr4" column="attr4" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="factoryCode" column="factory_code" />
<result property="endTime" column="end_time" />
<result property="validateType" column="validate_type" />
<result property="validateName" column="validate_name" />
<result property="validateStatus" column="validate_status" />
</resultMap>
<sql id="selectMesPrepareValidateVo">
select validate_id, workorder_code, workorder_name, product_spc, product_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code from mes_prepare_validate
</sql>
<select id="selectMesPrepareValidateList" parameterType="MesPrepareValidate" resultMap="MesPrepareValidateResult">
select
mpv.validate_id,
mpv.workorder_code,
mpv.workorder_name,
mpv.product_spc,
mpv.product_name,
mpv.status,
mpv.remark,
mpv.create_by,
mpv.create_time,
mpv.update_by,
mpv.update_time,
mpv.factory_code,
mpvd.validate_id id,
mpvd.validate_type,
mpvd.validate_name,
mpvd.end_time
from mes_prepare_validate mpv,mes_prepare_validate_detail mpvd
<where>
<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="productSpc != null and productSpc != ''"> and product_spc = #{productSpc}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</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 != ''"> and attr3 = #{attr3}</if>
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
</where>
</select>
<select id="selectMesPrepareValidateByValidateId" parameterType="String" resultMap="MesPrepareValidateResult">
<include refid="selectMesPrepareValidateVo"/>
where validate_id = #{validateId}
</select>
<insert id="insertMesPrepareValidate" parameterType="MesPrepareValidate">
insert into mes_prepare_validate
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="validateId != null">validate_id,</if>
<if test="workorderCode != null and workorderCode != ''">workorder_code,</if>
<if test="workorderName != null">workorder_name,</if>
<if test="productSpc != null">product_spc,</if>
<if test="productName != null">product_name,</if>
<if test="status != null">status,</if>
<if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="attr4 != null">attr4,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="factoryCode != null">factory_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="validateId != null">#{validateId},</if>
<if test="workorderCode != null and workorderCode != ''">#{workorderCode},</if>
<if test="workorderName != null">#{workorderName},</if>
<if test="productSpc != null">#{productSpc},</if>
<if test="productName != null">#{productName},</if>
<if test="status != null">#{status},</if>
<if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="attr4 != null">#{attr4},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="factoryCode != null">#{factoryCode},</if>
</trim>
</insert>
<update id="updateMesPrepareValidate" parameterType="MesPrepareValidate">
update mes_prepare_validate
<trim prefix="SET" suffixOverrides=",">
<if test="workorderCode != null and workorderCode != ''">workorder_code = #{workorderCode},</if>
<if test="workorderName != null">workorder_name = #{workorderName},</if>
<if test="productSpc != null">product_spc = #{productSpc},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="attr4 != null">attr4 = #{attr4},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
</trim>
where validate_id = #{validateId}
</update>
<delete id="deleteMesPrepareValidateByValidateId" parameterType="String">
delete from mes_prepare_validate where validate_id = #{validateId}
</delete>
<delete id="deleteMesPrepareValidateByValidateIds" parameterType="String">
delete from mes_prepare_validate where validate_id in
<foreach item="validateId" collection="array" open="(" separator="," close=")">
#{validateId}
</foreach>
</delete>
</mapper>

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.mes.mapper.MesReportWorkConsumeMapper">
<resultMap type="MesReportWorkConsume" id="MesReportWorkConsumeResult">
<result property="recordId" column="record_id" />
<result property="reportCode" column="report_code" />
@ -26,7 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectMesReportWorkConsumeVo">
select record_id, workorder_code, material_code, material_name, material_spc, quantity, unit, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code,report_code from mes_report_work_consume
select record_id, workorder_code, material_code, material_name, material_spc,
quantity, unit, remark, attr1, attr2, attr3, attr4, create_by, create_time,
update_by, update_time, factory_code,report_code
from mes_report_work_consume
</sql>
<select id="selectMesReportWorkConsumeList" parameterType="MesReportWorkConsume" resultMap="MesReportWorkConsumeResult">
@ -44,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
and del_flag = '0'
</where>
</select>
@ -51,12 +55,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectMesReportWorkConsumeVo"/>
where report_code = #{recordCode}
</select>
<select id="selectMesReportWorkConsumeByRecordId" parameterType="String" resultMap="MesReportWorkConsumeResult">
<include refid="selectMesReportWorkConsumeVo"/>
where record_id = #{recordId}
</select>
<insert id="insertMesReportWorkConsume" parameterType="MesReportWorkConsume">
insert into mes_report_work_consume
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -126,13 +130,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteMesReportWorkConsumeByRecordId" parameterType="String">
delete from mes_report_work_consume where record_id = #{recordId}
update mes_report_work_consume
set del_flag = '1'
where record_id = #{recordId}
</delete>
<delete id="deleteMesReportWorkConsumeByRecordIds" parameterType="String">
delete from mes_report_work_consume where record_id in
update mes_report_work_consume
set del_flag = '1'
where record_id in
<foreach item="recordId" collection="array" open="(" separator="," close=")">
#{recordId}
</foreach>
</delete>
</mapper>
</mapper>

@ -40,7 +40,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectMesReportWorkVo">
select id, report_type, report_code, workorder_code, product_code, product_name, spec, unit, quantity, quantity_feedback, quantity_qualified, quantity_unqualified, user_name, nick_name, feedback_channel, feedback_time, record_user, status, remark, work_time, machine_code, machine_name, team_code, shift_code, attr1, attr2, attr3, attr4, create_by, create_time, update_time, update_by from mes_report_work
select id, report_type, report_code, workorder_code, product_code,
product_name, spec, unit, quantity, quantity_feedback, quantity_qualified,
quantity_unqualified, user_name, nick_name, feedback_channel,
feedback_time, record_user, status, remark, work_time, machine_code,
machine_name, team_code, shift_code, attr1, attr2, attr3, attr4, create_by,
create_time, update_time, update_by
from mes_report_work
</sql>
<select id="selectMesReportWorkList" parameterType="MesReportWork" resultMap="MesReportWorkResult">

@ -243,6 +243,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
detail.setCreateTime(DateUtils.getNowDate());
detail.setCreateBy(SecurityUtils.getUsername());
detail.setRecordId(IdUtils.fastSimpleUUID());
detail.setPrepareId(whiteOrder.getWorkorderCode() + "L");
if (planDetail != null) {
detail.setMaterailName(planDetail.getMaterialName());
detail.setMaterialCode(planDetail.getMaterialCode());
@ -253,6 +254,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
}
details.add(detail);
proOrderWorkorderMapper.createPrepareDetails(details);
} else if (whiteOrder != null) {//成品的母工单回传sap
sapList = new ArrayList<>();
SapCreateOrder sap = new SapCreateOrder();
@ -294,8 +296,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
}
//下达工单
//return proOrderWorkorderMapper.downProOrderWorkorderByWorkorderIds(workorderIds);
return 1;
return proOrderWorkorderMapper.downProOrderWorkorderByWorkorderIds(workorderIds);
}
// //获取最低级材料

@ -65,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="planDateEnd != null "> and '${planDateEnd}%' >= CONVERT(varchar(10),plan_pro_date, 120)</if>
</where>
and prod_type != 'white'
and del_flag = '0'
ORDER BY plan_pro_date DESC
</select>
@ -74,12 +75,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectConvert" resultType="com.op.plan.domain.Convert">
SELECT dict_code dictCode , dict_label dictLabel , dict_value dictValue , dict_sort dictSort FROM sys_dict_data WHERE dict_type = 'convert_type'
SELECT dict_code dictCode , dict_label dictLabel , dict_value dictValue ,
dict_sort dictSort FROM sys_dict_data
WHERE dict_type = 'convert_type'
</select>
<select id="selectChildProOrderByCode" parameterType="String" resultMap="ProOrderResult">
<include refid="selectProOrderVo"/>
where parent_order = #{orderCode}
where parent_order = #{orderCode} and del_flag = '0'
</select>
<select id="selectProShift" resultType="com.op.plan.domain.ProShift">
@ -108,9 +111,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBatchCodesById" resultType="java.lang.String">
SELECT powb.batch_code
FROM pro_order_workorder_batch powb LEFT JOIN pro_order_workorder pow
FROM pro_order_workorder_batch powb
LEFT JOIN pro_order_workorder pow
ON powb.workorder_id = pow.workorder_id
WHERE pow.workorder_id = #{workorderId}
WHERE pow.workorder_id = #{workorderId} and powb.del_flag = '0'
</select>
<select id="selectPackageLine" resultType="com.op.plan.domain.ProLine">
@ -125,16 +129,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE bst.Shift_Id = #{shiftId}
</select>
<select id="getMaxCreatetime" resultType="com.op.system.api.model.SapProOrder">
select CONVERT(varchar(100),max(create_time), 20) createTime from pro_order where order_type != 'white'
select CONVERT(varchar(100),max(create_time), 20) createTime
from pro_order
where order_type != 'white'
</select>
<select id="selectProOrderByOrderCode" parameterType="String" resultMap="ProOrderResult">
<include refid="selectProOrderVo"/>
where order_code = #{orderCode}
where order_code = #{orderCode} and del_flag = '0'
</select>
<select id="selectChildProOrderCodeByCode" resultType="java.lang.String">
select order_code from pro_order where parent_order = #{orderCode}
select order_code from pro_order
where parent_order = #{orderCode}
and del_flag = '0'
</select>
<select id="selectEquipmentListByRouteCode" resultType="java.lang.String">
@ -317,11 +325,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="prodType != null">prod_type = #{prodType},</if>
<if test="prodSpc != null">prod_spc = #{prodSpc},</if>
</trim>
where order_code = #{orderCode}
where order_code = #{orderCode} and del_flag = '0'
</update>
<update id="updateOrderStatusByOrderCode">
update pro_order set status = 'o1' where parent_order = #{orderCode}
update pro_order set status = 'o1' where parent_order = #{orderCode} and del_flag = '0'
</update>
<update id="updateWhiteOrder">
@ -338,11 +346,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteProOrderById" parameterType="String">
delete from pro_order where id = #{id}
update pro_order
set del_flag = '1'
where id = #{id}
</delete>
<delete id="deleteProOrderByIds" parameterType="String">
delete from pro_order where id in
update pro_order
set del_flag = '1'
where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -24,7 +24,10 @@
</resultMap>
<sql id="selectProOrderWorkorderBatchVo">
select batch_id, workorder_id, batch_code, batch_quantity, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, prod_type, factory_code from pro_order_workorder_batch
select batch_id, workorder_id, batch_code, batch_quantity, status, remark,
attr1, attr2, attr3, attr4, create_by, create_time, update_by,
update_time, prod_type, factory_code
from pro_order_workorder_batch
</sql>
<select id="selectProOrderWorkorderBatchList" parameterType="ProOrderWorkorderBatch" resultMap="ProOrderWorkorderBatchResult">
@ -40,6 +43,7 @@
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
<if test="prodType != null and prodType != ''"> and prod_type = #{prodType}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
and del_flag = '0'
</where>
</select>
@ -127,11 +131,15 @@
</update>
<delete id="deleteProOrderWorkorderBatchByWorkorderId" parameterType="String">
delete from pro_order_workorder_batch where workorder_id = #{workorderId}
update pro_order_workorder_batch
set del_flag = '1'
where workorder_id = #{workorderId}
</delete>
<delete id="deleteProOrderWorkorderBatchByWorkorderIds" parameterType="String">
delete from pro_order_workorder_batch where workorder_id in
update pro_order_workorder_batch
set del_flag = '1'
where workorder_id in
<foreach item="workorderId" collection="array" open="(" separator="," close=")">
#{workorderId}
</foreach>

@ -78,33 +78,38 @@
<if test="endFlag != null and endFlag != ''"> and end_flag = #{endFlag}</if>
<if test="productDateStart != null "> and CONVERT(varchar(10),product_date, 120) >= '${productDateStart}'</if>
<if test="productDateEnd != null "> and '${productDateEnd}%' >= CONVERT(varchar(10),product_date, 120)</if>
and del_flag = '0'
</where>
</select>
<select id="selectProOrderWorkorderByWorkorderId" parameterType="String" resultMap="ProOrderWorkorderResult">
<include refid="selectProOrderWorkorderVo"/>
where workorder_code = #{workorderId} or workorder_id = #{workorderId}
and del_flag = '0'
</select>
<select id="selectFirWorkOrder" parameterType="String" resultMap="ProOrderWorkorderResult">
<include refid="selectProOrderWorkorderVo"/>
where order_id = #{id}
and del_flag = '0'
</select>
<select id="selectChildWorkOrder" parameterType="String" resultMap="ProOrderWorkorderResult">
<include refid="selectProOrderWorkorderVo"/>
WHERE parent_order = #{workorderCode}
and del_flag = '0'
</select>
<select id="selectWorkOrderByCode" resultMap="ProOrderWorkorderResult">
<include refid="selectProOrderWorkorderVo"/>
where workorder_code = #{workorderCode}
and del_flag = '0'
</select>
<select id="selectEndWorkOrder" resultType="java.lang.String">
select TOP 1 workorder_code
FROM pro_order_workorder
WHERE order_id = #{id}
WHERE order_id = #{id} and del_flag = '0'
ORDER BY workorder_code DESC
</select>
@ -112,7 +117,9 @@
<include refid="selectProOrderWorkorderVo"/>
where workorder_id not in (
select workorder_id
from pro_wet_material_plan_detail) and CONVERT(date, product_date) = #{productDate} and prod_type = 'white'
from pro_wet_material_plan_detail)
and CONVERT(date, product_date) = #{productDate} and prod_type = 'white'
and del_flag = '0'
</select>
<select id="getWorkOrderByIds" resultMap="ProOrderWorkorderResult">
<include refid="selectProOrderWorkorderVo"/>
@ -120,37 +127,43 @@
<foreach item="workorderCode" collection="array" open="(" separator="," close=")">
#{workorderCode}
</foreach>
and del_flag = '0'
</select>
<select id="getBucketCodeByWorkId" resultType="java.lang.String">
select prod_line_code
from pro_order_workorder
where workorder_id = #{workorderId}
and del_flag = '0'
</select>
<select id="selectWorkOrderByOrderCode" resultMap="ProOrderWorkorderResult">
<include refid="selectProOrderWorkorderVo"/>
where order_code = #{orderCode}
where order_code = #{orderCode} and del_flag = '0'
</select>
<select id="selectProOrderWorkerderByWorkerIds" resultMap="ProOrderWorkorderResult">
select workorder_id, workorder_code, workorder_name, order_id, order_code, product_id, product_code, product_name,
product_spc, unit, quantity_produced, quantity_split, route_code, prod_line_code, product_date,
shift_id, parent_order, ancestors, status, remark, attr1, attr2, attr3, attr4, create_by, create_time,
update_by, update_time, prod_type, factory_code , end_flag
from pro_order_workorder where workorder_id in
from pro_order_workorder
where workorder_id in
<foreach item="ids" collection="array" open="(" separator="," close=")">
#{ids}
</foreach>
and del_flag = '0'
</select>
<select id="getOrderCodeById" resultType="com.op.plan.domain.ProOrder">
select workorder_code orderCode,
parent_order parentOrder
from pro_order_workorder where workorder_code = #{workorderId}
and del_flag = '0'
</select>
<select id="getOrderCodeBySonCode" resultType="com.op.plan.domain.ProOrder">
select parent_order parentOrder,
order_code orderCode,
bom_bo bomBo
from pro_order where order_code = #{orderCode}
and del_flag = '0'
</select>
<insert id="insertProOrderWorkorder" parameterType="ProOrderWorkorder">
@ -332,14 +345,14 @@
<insert id="createPrepareDetails">
insert into mes_prepare_detail
(
record_id, prepare_id, material_code, materail_name, materail_spc, unit,
quantity, product_date, shift_id,
record_id, prepare_id, material_code, material_name, material_spc, unit,
quantity,
create_by,create_time, prod_type, factory_code
)values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.id},#{item.prepareId},#{item.materialCode},#{item.materailName},#{item.materailSpc},#{item.unit},
#{item.quantity},#{item.productDate},#{item.shiftId},
#{item.recordId},#{item.prepareId},#{item.materialCode},#{item.materailName},#{item.materailSpc},#{item.unit},
#{item.quantity},
#{item.createBy},#{item.createTime},#{item.prodType},#{item.factoryCode}
)
</foreach>
@ -390,26 +403,34 @@
<foreach item="workorderCode" collection="array" open="(" separator="," close=")">
#{workorderCode}
</foreach>
and del_flag = '0'
</update>
<update id="updateWorkOrderCodeSap">
update pro_order_workorder
set workorder_code_sap = #{workorderCodeSap},
status = 'w1'
where workorder_code = #{workorderId}
and del_flag = '0'
</update>
<delete id="deleteProOrderWorkorderByWorkorderId" parameterType="String">
delete from pro_order_workorder where workorder_id = #{workorderId}
update pro_order_workorder
set del_flag = '1'
where workorder_id = #{workorderId}
</delete>
<delete id="deleteProOrderWorkorderByWorkorderIds" parameterType="String">
delete from pro_order_workorder where workorder_id in
update pro_order_workorder
set del_flag = '1'
where workorder_id in
<foreach item="workorderId" collection="array" open="(" separator="," close=")">
#{workorderId}
</foreach>
</delete>
<delete id="deleteProOrderWorkorderByOrderId">
delete from pro_order_workorder where order_id = #{id}
update pro_order_workorder
set del_flag = '1'
where order_id = #{id}
</delete>
</mapper>

@ -60,6 +60,7 @@
<if test="shiftCode != null and shiftCode != ''"> and shift_code = #{shiftCode}</if>
<if test="shiftDesc != null and shiftDesc != ''"> and shift_desc = #{shiftDesc}</if>
<if test="planTime != null and planTime != ''"> and plan_time = #{planTime}</if>
and del_flag = '0'
</where>
</select>
@ -73,6 +74,7 @@
from pro_wet_material_plan_detail p join pro_order_workorder w
on w.workorder_id = p.workorder_id
where p.wet_material_plan_id = #{id}
and p.del_flag = '0'
</select>
<select id="selectProWetMaterialPlanDetailByWorkId"
@ -84,7 +86,7 @@
<select id="selectProWetMaterialPlanDetailByOrderId"
resultType="com.op.plan.domain.ProWetMaterialPlanDetail">
<include refid="selectProWetMaterialPlanDetailVo"/>
where wet_material_plan_id = #{id} and status = 'Y'
where wet_material_plan_id = #{id} and status = 'Y' and del_flag = '0'
</select>
<select id="selectDetailListById" resultMap="ProWetMaterialPlanDetailResult">
select id, factory_code, wet_material_plan_id, workorder_id, atrr1, atrr2, atrr3, status,
@ -92,7 +94,7 @@
material_code, material_id, material_name, product_name, shift_id,
shift_code, shift_desc, plan_time
from pro_wet_material_plan_detail
where wet_material_plan_id = #{id}
where wet_material_plan_id = #{id} and del_flag = '0'
</select>
<select id="selectWetPlanList" resultMap="ProWetMaterialPlanDetailResult">
@ -102,6 +104,7 @@
shift_code, shift_desc, plan_time
from pro_wet_material_plan_detail
where CONVERT(date,plan_time) >= #{startTime} and #{endTime} >= CONVERT(date,plan_time)
and del_flag = '0'
ORDER BY plan_time DESC
</select>
<select id="getWetInfo" resultMap="ProWetMaterialPlanDetailResult">
@ -113,7 +116,7 @@
select id, factory_code, plan_time, sync_flag, create_by, create_time, update_by, update_time,
order_type, prod_code, prod_desc, prod_source, quantity, unit, atrr1, atrr2, atrr3, status,
prod_type, plan_code, shift_id, shift_desc from pro_wet_material_plan
where wet_material_plan_id = #{wetMaterialPlanId}
where wet_material_plan_id = #{wetMaterialPlanId} and del_flag = '0'
</select>
<select id="selectProWetMaterialPlanDetailByOrderCode"
@ -123,6 +126,7 @@
prod_type, plan_code, shift_id, shift_desc from pro_wet_material_plan
where workorder_id in (select workorder_id from pro_order_workorder where order_code = #{orderCode}
)
and del_flag = '0'
</select>
<insert id="insertProWetMaterialPlanDetail" parameterType="ProWetMaterialPlanDetail">
@ -206,17 +210,23 @@
</update>
<delete id="deleteProWetMaterialPlanDetailById" parameterType="String">
delete from pro_wet_material_plan_detail where id = #{id}
update pro_wet_material_plan_detail
set del_flag = '1'
where id = #{id}
</delete>
<delete id="deleteProWetMaterialPlanDetailByIds" parameterType="String">
delete from pro_wet_material_plan_detail where id in
update pro_wet_material_plan_detail
set del_flag = '1'
where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteProWetMaterialPlanDetailByWorkId">
delete from pro_wet_material_plan_detail where workorder_id = #{workorderId}
update pro_wet_material_plan_detail
set del_flag = '1'
where workorder_id = #{workorderId}
</delete>
</mapper>

@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="syncFlag != null and syncFlag != ''"> and sync_flag = #{syncFlag} </if>
<if test="startTime != null ">and CONVERT(date, plan_time) >= #{startTime} </if>
<if test="endTime != null "> and #{endTime} >= CONVERT(date, plan_time)</if>
and del_flag = '0'
</where>
</select>
@ -53,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT bucket_id AS 'bucketId', material_id AS 'materialId',shift_id AS 'shiftId'
FROM pro_wet_material_plan_detail
WHERE CONVERT(date, plan_time) = #{planTime}
and del_flag = '0'
GROUP BY bucket_id,material_id,shift_id
</select>
@ -78,12 +80,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id
from pro_wet_material_plan
where prod_source = #{bucketCode} and plan_time = #{planTime} and shift_id = #{shiftId}
and del_flag = '0'
</select>
<select id="selectWetMaterialPlanByPlanTime" resultType="java.lang.String">
select id
from pro_wet_material_plan
where CONVERT(date, plan_time) = CONVERT(date, #{planTime})
and del_flag = '0'
</select>
<select id="selectBucketNameById" resultType="java.lang.String">
@ -97,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order_type, prod_code, prod_desc, prod_source, quantity, unit, atrr1, atrr2, atrr3, status,
prod_type, plan_code, shift_id, shift_desc from pro_wet_material_plan
where id = (select wet_material_plan_id from pro_wet_material_plan_detail
where workorder_id = #{workorderId}) and sync_flag = 'Y'
where workorder_id = #{workorderId}) and sync_flag = 'Y' and del_flag = '0'
</select>
<insert id="insertProWetMaterialPlan" parameterType="ProWetMaterialPlan">
@ -181,11 +185,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteProWetMaterialPlanById" parameterType="String">
delete from pro_wet_material_plan where id = #{id}
update pro_wet_material_plan
set del_flag = '1'
where id = #{id}
</delete>
<delete id="deleteProWetMaterialPlanByIds" parameterType="String">
delete from pro_wet_material_plan where id in
update pro_wet_material_plan
set del_flag = '1'
where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -30,7 +30,11 @@
</resultMap>
<sql id="selectProOrderVo">
select id, factory_code, order_type, order_code, prod_code, prod_desc, quantity, quantity_split, unit, worker_order, plan_pro_date, plan_complete, atrr1, atrr2, atrr3, status, parent_order, create_by, create_time, update_by, update_time, prod_type from pro_order
select id, factory_code, order_type, order_code, prod_code, prod_desc,
quantity, quantity_split, unit, worker_order, plan_pro_date,
plan_complete, atrr1, atrr2, atrr3, status, parent_order, create_by,
create_time, update_by, update_time, prod_type
from pro_order
</sql>
<select id="selectProOrderList" parameterType="ProOrder" resultMap="ProOrderResult">
@ -57,7 +61,7 @@
<if test="planDateStart != null "> and CONVERT(varchar(10),plan_pro_date, 120) >= '${planDateStart}'</if>
<if test="planDateEnd != null "> and '${planDateEnd}%' >= CONVERT(varchar(10),plan_pro_date, 120)</if>
</where>
and prod_type = 'white'
and prod_type = 'white' and del_flag = '0'
ORDER BY plan_pro_date DESC , order_code ASC
</select>
@ -68,7 +72,7 @@
<select id="selectProOrderByParentOrder" resultMap="ProOrderResult">
<include refid="selectProOrderVo"/>
where order_code = #{parentOrder}
where order_code = #{parentOrder} and del_flag = '0'
</select>
<select id="selectProWorkOrderByOrderCode" resultType="com.op.plan.domain.ProOrderWorkorder">
@ -77,7 +81,7 @@
shift_id, parent_order, ancestors, status, remark, attr1, attr2, attr3, attr4, create_by, create_time,
update_by, update_time, prod_type, factory_code , end_flag , car_num
from pro_order_workorder
where order_code = #{orderCode}
where order_code = #{orderCode} and del_flag = '0'
</select>
<select id="selectProShift" resultType="com.op.plan.domain.ProShift">
@ -168,11 +172,15 @@
</update>
<delete id="deleteProOrderById" parameterType="String">
delete from pro_order where id = #{id}
update pro_order
set del_flag = '1'
where id = #{id}
</delete>
<delete id="deleteProOrderByIds" parameterType="String">
delete from pro_order where id in
update pro_order
set del_flag = '1'
where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -55,9 +55,25 @@ public class QuaController extends BaseController {
/**
*
*/
@GetMapping(value = "getInfoByRfid")
public AjaxResult getInfo(QcProCheck qcProCheck) {
return success(qcProCheckService.getInfoByRfid(qcProCheck));
}
/**
*
*/
@GetMapping(value = "getEquipmentList")
public AjaxResult getEquipmentList(QcProCheck qcProCheck) {
return success(qcProCheckService.getEquipmentList(qcProCheck));
}
/**
*
*/
@GetMapping(value = "getDictList")
public AjaxResult getDictList(QcProCheck qcProCheck) {
return success(qcProCheckService.getDictList(qcProCheck));
}
}

@ -76,6 +76,53 @@ public class QcProCheck extends BaseEntity {
private String attr3;
private String attr4;
private String equipmentTypeCode;
private String equipmentCode;
private String equipmentName;
private String itemCode;
private String itemName;
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getEquipmentTypeCode() {
return equipmentTypeCode;
}
public void setEquipmentTypeCode(String equipmentTypeCode) {
this.equipmentTypeCode = equipmentTypeCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getWorkBatchCode() {
return workBatchCode;
}

@ -30,4 +30,8 @@ public interface QcProCheckMapper {
QcProCheck getInfoByRfid(QcProCheck qcProCheck);
void insertBaseFileBatch(@Param("baseFiles") List<BaseFileData> baseFiles);
List<QcProCheck> getEquipmentList(QcProCheck qcProCheck);
List<QcProCheck> getDictList(QcProCheck qcProCheck);
}

@ -23,4 +23,8 @@ public interface QcProCheckService {
List<QcProCheck> selectQcProCheckList(QcProCheck qcProCheck);
QcProCheck getInfoByRfid(QcProCheck qcProCheck);
List<QcProCheck> getEquipmentList(QcProCheck qcProCheck);
List<QcProCheck> getDictList(QcProCheck qcProCheck);
}

@ -85,5 +85,18 @@ public class QcProCheckServiceImpl implements QcProCheckService {
return qcProCheckMapper.getInfoByRfid(qcProCheck);
}
@Override
public List<QcProCheck> getEquipmentList(QcProCheck qcProCheck) {
DynamicDataSourceContextHolder.push("ds_"+qcProCheck.getFactoryCode());
return qcProCheckMapper.getEquipmentList(qcProCheck);
}
@Override
public List<QcProCheck> getDictList(QcProCheck qcProCheck) {
DynamicDataSourceContextHolder.push("master");
qcProCheck.setEquipmentTypeCode("cache");
return qcProCheckMapper.getDictList(qcProCheck);
}
}

@ -191,9 +191,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ow.product_spc productSpc,
ow.order_code orderCode
from pro_rfid_process_detail rfid
left join base_equipment be on rfid.machine_code = be.equipment_code
left join pro_order_workorder ow on ow.workorder_code = rfid.workorder_code
left join base_equipment be on rfid.machine_code = be.equipment_code
left join pro_order_workorder ow on ow.workorder_code = rfid.workorder_code
where rfid.bind_status = '1'
and rfid.rfid = #{rfid}
</select>
<select id="getEquipmentList" resultType="com.op.quality.domain.QcProCheck">
select
equipment_code equipmentCode,
equipment_name equipmentName
from base_equipment
where equipment_type_code = #{equipmentTypeCode}
</select>
<select id="getDictList" resultType="com.op.quality.domain.QcProCheck">
select
dict_value itemCode,
dict_label itemName
from sys_dict_data
where dict_type = #{equipmentTypeCode}
</select>
</mapper>

Loading…
Cancel
Save