检验报告

highway
zhaoxiaolin 11 months ago
parent baa2e209a3
commit 74bb98faa3

@ -44,14 +44,14 @@ public class QcCheckReportIncomeController extends BaseController {
public TableDataInfo list(QcCheckReportIncome qcCheckReportIncome) {
//默认时间范围T 00:00:00~T+1 00:00:00
/*if(StringUtils.isEmpty(qcCheckReportIncome.getIncomeTimeStart())){
if(StringUtils.isEmpty(qcCheckReportIncome.getIncomeTimeStart())){
qcCheckReportIncome.setIncomeTimeStart(DateUtils.getDate()+" 00:00:00");//start
LocalDate date = LocalDate.now();
LocalDate dateEnd = date.plusDays(1);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
qcCheckReportIncome.setIncomeTimeEnd(dateEndStr);//end
}*/
}
// if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){
// qcCheckReportIncome.setCheckTimeStart(qcCheckReportIncome.getIncomeTimeStart());//start

@ -44,19 +44,14 @@ public class QcCheckReportProduceController extends BaseController {
public TableDataInfo list(QcCheckReportIncome qcCheckReportIncome) {
//默认时间范围T 00:00:00~T+1 00:00:00
/*if(StringUtils.isEmpty(qcCheckReportIncome.getIncomeTimeStart())){
if(StringUtils.isEmpty(qcCheckReportIncome.getIncomeTimeStart())){
qcCheckReportIncome.setIncomeTimeStart(DateUtils.getDate()+" 00:00:00");//start
LocalDate date = LocalDate.now();
LocalDate dateEnd = date.plusDays(1);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
qcCheckReportIncome.setIncomeTimeEnd(dateEndStr);//end
}*/
// if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){
// qcCheckReportIncome.setCheckTimeStart(qcCheckReportIncome.getIncomeTimeStart());//start
// qcCheckReportIncome.setCheckTimeEnd(qcCheckReportIncome.getIncomeTimeStart());//end
// }
}
startPage();
List<QcCheckReportIncome> list = qcCheckReportProduceService.selectQcCheckReportIncomeList(qcCheckReportIncome);

@ -44,14 +44,14 @@ public class QcCheckReportProductController extends BaseController {
public TableDataInfo list(QcCheckReportIncome qcCheckReportIncome) {
//默认时间范围T 00:00:00~T+1 00:00:00
/*if(StringUtils.isEmpty(qcCheckReportIncome.getIncomeTimeStart())){
if(StringUtils.isEmpty(qcCheckReportIncome.getIncomeTimeStart())){
qcCheckReportIncome.setIncomeTimeStart(DateUtils.getDate()+" 00:00:00");//start
LocalDate date = LocalDate.now();
LocalDate dateEnd = date.plusDays(1);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
qcCheckReportIncome.setIncomeTimeEnd(dateEndStr);//end
}*/
}
// if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){
// qcCheckReportIncome.setCheckTimeStart(qcCheckReportIncome.getIncomeTimeStart());//start

@ -91,7 +91,7 @@ public class QuaController extends BaseController {
/**创建生产过程(烘房 首检)检验*/
@PostMapping(value = "createCheckProduceTask")
public AjaxResult createCheckProduceTask(@RequestBody QcCheckTaskProduce qcCheckTaskProduce) {
if(StringUtils.isBlank(qcCheckTaskProduce.getBatchNo())){
if(StringUtils.isBlank(qcCheckTaskProduce.getIncomeBatchNo())){
return error("[batchNo]不能为空");
}
@ -122,8 +122,8 @@ public class QuaController extends BaseController {
/**创建成品入库检验*/
@PostMapping(value = "createCheckProductTask")
public AjaxResult createCheckProductTask(@RequestBody QcCheckTaskWarehousing qcCheckTaskWarehousing) {
if(StringUtils.isBlank(qcCheckTaskWarehousing.getBatchNo())){
return error("[batchNo]不能为空");
if(StringUtils.isBlank(qcCheckTaskWarehousing.getIncomeBatchNo())){
return error("[incomeBatchNo]不能为空");
}
if(StringUtils.isBlank(qcCheckTaskWarehousing.getOrderNo())){

@ -119,8 +119,8 @@ public class QcCheckReportIncome extends BaseEntity {
private String incomeTimeEnd;
private String checkTimeStart;
private String checkTimeEnd;
private String typeCode;
private String checkType;
private String typeCode;//大类
private String checkType;//小类
public String getCheckType() {

@ -26,7 +26,15 @@ public class QcCheckTaskProduce extends BaseEntity {
/** 批次号 */
@Excel(name = "批次号")
private String batchNo;
private String incomeBatchNo;
public String getIncomeBatchNo() {
return incomeBatchNo;
}
public void setIncomeBatchNo(String incomeBatchNo) {
this.incomeBatchNo = incomeBatchNo;
}
/** 订单号 */
@Excel(name = "订单号")
@ -117,9 +125,17 @@ public class QcCheckTaskProduce extends BaseEntity {
private String incomeTimeEnd;
private String checkTimeStart;
private String checkTimeEnd;
private String typeCode;
private String checkType;
public String getTypeCode() {
return typeCode;
}
public void setTypeCode(String typeCode) {
this.typeCode = typeCode;
}
public String getCheckType() {
return checkType;
}
@ -174,13 +190,7 @@ public class QcCheckTaskProduce extends BaseEntity {
public String getCheckNo() {
return checkNo;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public String getBatchNo() {
return batchNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
@ -338,7 +348,7 @@ public class QcCheckTaskProduce extends BaseEntity {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("recordId", getRecordId())
.append("checkNo", getCheckNo())
.append("batchNo", getBatchNo())
.append("incomeBatchNo", getIncomeBatchNo())
.append("orderNo", getOrderNo())
.append("materialCode", getMaterialCode())
.append("materialName", getMaterialName())

@ -26,7 +26,7 @@ public class QcCheckTaskWarehousing extends BaseEntity {
/** 批次号 */
@Excel(name = "批次号")
private String batchNo;
private String incomeBatchNo;
/** 订单号 */
@Excel(name = "订单号")
@ -182,13 +182,7 @@ public class QcCheckTaskWarehousing extends BaseEntity {
public String getCheckNo() {
return checkNo;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public String getBatchNo() {
return batchNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
@ -337,12 +331,20 @@ public class QcCheckTaskWarehousing extends BaseEntity {
return delFlag;
}
public String getIncomeBatchNo() {
return incomeBatchNo;
}
public void setIncomeBatchNo(String incomeBatchNo) {
this.incomeBatchNo = incomeBatchNo;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("recordId", getRecordId())
.append("checkNo", getCheckNo())
.append("batchNo", getBatchNo())
.append("incomeBatchNo", getIncomeBatchNo())
.append("orderNo", getOrderNo())
.append("materialCode", getMaterialCode())
.append("materialName", getMaterialName())

@ -74,6 +74,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
@DS("#header.poolName")
public List<QcCheckTaskIncome> selectQcCheckTaskIncomeList(QcCheckTaskIncome qcCheckTaskIncome) {
qcCheckTaskIncome.setDelFlag("0");
qcCheckTaskIncome.setTypeCode("material");
return qcCheckTaskIncomeMapper.selectQcCheckTaskIncomeList(qcCheckTaskIncome);
}

@ -68,6 +68,7 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
@DS("#header.poolName")
public List<QcCheckTaskProduce> selectQcCheckTaskProduceList(QcCheckTaskProduce qcCheckTaskProduce) {
qcCheckTaskProduce.setDelFlag("0");
qcCheckTaskProduce.setTypeCode("produce");
return qcCheckTaskProduceMapper.selectQcCheckTaskProduceList(qcCheckTaskProduce);
}

@ -69,6 +69,7 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin
@DS("#header.poolName")
public List<QcCheckTaskWarehousing> selectQcCheckTaskWarehousingList(QcCheckTaskWarehousing qcCheckTaskWarehousing) {
qcCheckTaskWarehousing.setDelFlag("0");
qcCheckTaskWarehousing.setTypeCode("product");
return qcCheckTaskWarehousingMapper.selectQcCheckTaskWarehousingList(qcCheckTaskWarehousing);
}

@ -61,6 +61,7 @@ public class QcCheckReportIncomeServiceImpl implements IQcCheckReportIncomeServi
@DS("#header.poolName")
public List<QcCheckReportIncome> selectQcCheckReportIncomeList(QcCheckReportIncome qcCheckReportIncome) {
qcCheckReportIncome.setDelFlag("0");
qcCheckReportIncome.setTypeCode("material");
return qcCheckReportIncomeMapper.selectQcCheckReportIncomeList(qcCheckReportIncome);
}

@ -22,7 +22,7 @@ import java.util.Date;
import java.util.List;
/**
* Service
* Service
*
* @author Open Platform
* @date 2023-10-19
@ -42,10 +42,10 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer
private QcCheckTaskDetailMapper qcCheckTaskDetailMapper;
/**
*
*
*
* @param recordId
* @return
* @param recordId
* @return
*/
@Override
@DS("#header.poolName")
@ -54,22 +54,23 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer
}
/**
*
*
*
* @param qcCheckReportIncome
* @return
* @param qcCheckReportIncome
* @return
*/
@Override
@DS("#header.poolName")
public List<QcCheckReportIncome> selectQcCheckReportIncomeList(QcCheckReportIncome qcCheckReportIncome) {
qcCheckReportIncome.setDelFlag("0");
qcCheckReportIncome.setTypeCode("produce");
return qcCheckReportIncomeMapper.selectQcCheckReportIncomeList(qcCheckReportIncome);
}
/**
*
*
*
* @param qcCheckReportIncome
* @param qcCheckReportIncome
* @return
*/
@Override
@ -129,9 +130,9 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer
}
/**
*
*
*
* @param qcCheckReportIncome
* @param qcCheckReportIncome
* @return
*/
@Override
@ -142,9 +143,9 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer
}
/**
*
*
*
* @param recordIds
* @param recordIds
* @return
*/
@Override
@ -154,9 +155,9 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer
}
/**
*
*
*
* @param recordId
* @param recordId
* @return
*/
@Override

@ -63,6 +63,7 @@ public class QcCheckReportProductServiceImpl implements IQcCheckReportProductSer
@DS("#header.poolName")
public List<QcCheckReportIncome> selectQcCheckReportIncomeList(QcCheckReportIncome qcCheckReportIncome) {
qcCheckReportIncome.setDelFlag("0");
qcCheckReportIncome.setTypeCode("product");
return qcCheckReportIncomeMapper.selectQcCheckReportIncomeList(qcCheckReportIncome);
}

@ -43,35 +43,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectQcCheckReportIncomeList" parameterType="QcCheckReportIncome" resultMap="QcCheckReportIncomeResult">
<include refid="selectQcCheckReportIncomeVo"/>
select qct.record_id, qct.check_no, qct.income_batch_no,
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,
qct.create_by,qct.create_time, qct.update_by, qct.update_time,qct.check_type,
q.type_code
from qc_check_task qct
left join qc_check_type q on q.id = qct.check_type
<where>
<if test="checkNo != null and checkNo != ''"> and check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and income_batch_no = #{incomeBatchNo}</if>
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="quality != null "> and quality = #{quality}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="incomeTime != null "> and income_time = #{incomeTime}</if>
<if test="checkLoc != null and checkLoc != ''"> and check_loc = #{checkLoc}</if>
<if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if>
<if test="checkManCode != null and checkManCode != ''"> and check_man_code = #{checkManCode}</if>
<if test="checkManName != null and checkManName != ''"> and check_man_name like concat('%', #{checkManName}, '%')</if>
<if test="checkTime != null "> and check_time = #{checkTime}</if>
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</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>
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),income_time, 120) >= #{incomeTimeStart}</if>
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),income_time, 120)</if>
<if test="checkTimeStart != null "> and CONVERT(varchar(30),check_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),check_time, 120)</if>
<if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and qct.income_batch_no = #{incomeBatchNo}</if>
<if test="orderNo != null and orderNo != ''"> and qct.order_no = #{orderNo}</if>
<if test="materialCode != null and materialCode != ''"> and qct.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and qct.material_name like concat('%', #{materialName}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and qct.supplier_code = #{supplierCode}</if>
<if test="supplierName != null and supplierName != ''"> and qct.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="checkLoc != null and checkLoc != ''"> and qct.check_loc = #{checkLoc}</if>
<if test="checkStatus != null and checkStatus != ''"> and qct.check_status = #{checkStatus}</if>
<if test="checkManCode != null and checkManCode != ''"> and qct.check_man_code = #{checkManCode}</if>
<if test="checkManName != null and checkManName != ''"> and qct.check_man_name like concat('%', #{checkManName}, '%')</if>
<if test="checkResult != null and checkResult != ''"> and qct.check_result = #{checkResult}</if>
<if test="status != null and status != ''"> and qct.status = #{status}</if>
<if test="delFlag != null and delFlag != ''"> and qct.del_flag = #{delFlag}</if>
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120)</if>
<if test="checkTimeStart != null "> and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
<if test="typeCode != null "> and q.type_code = #{typeCode} </if>
</where>
</select>

@ -45,36 +45,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectQcCheckTaskIncomeList" parameterType="QcCheckTaskIncome" resultMap="QcCheckTaskIncomeResult">
<include refid="selectQcCheckTaskIncomeVo"/>
select qct.record_id, qct.check_no, qct.income_batch_no,
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,
qct.create_by,qct.create_time, qct.update_by, qct.update_time,qct.check_type,
q.type_code
from qc_check_task qct
left join qc_check_type q on q.id = qct.check_type
<where>
<if test="checkNo != null and checkNo != ''"> and check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and income_batch_no = #{incomeBatchNo}</if>
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="quality != null "> and quality = #{quality}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="incomeTime != null "> and income_time = #{incomeTime}</if>
<if test="checkLoc != null and checkLoc != ''"> and check_loc = #{checkLoc}</if>
<if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if>
<if test="checkManCode != null and checkManCode != ''"> and check_man_code = #{checkManCode}</if>
<if test="checkManName != null and checkManName != ''"> and check_man_name like concat('%', #{checkManName}, '%')</if>
<if test="checkTime != null "> and check_time = #{checkTime}</if>
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</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>
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),income_time, 120) >= #{incomeTimeStart}</if>
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),income_time, 120)</if>
<if test="checkTimeStart != null "> and CONVERT(varchar(30),check_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),check_time, 120)</if>
<if test="checkType != null "> and check_type = #{checkType} </if>
<if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and qct.income_batch_no = #{incomeBatchNo}</if>
<if test="orderNo != null and orderNo != ''"> and qct.order_no = #{orderNo}</if>
<if test="materialCode != null and materialCode != ''"> and qct.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and qct.material_name like concat('%', #{materialName}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and qct.supplier_code = #{supplierCode}</if>
<if test="supplierName != null and supplierName != ''"> and qct.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="incomeTime != null "> and qct.income_time = #{incomeTime}</if>
<if test="checkLoc != null and checkLoc != ''"> and qct.check_loc = #{checkLoc}</if>
<if test="checkStatus != null and checkStatus != ''"> and qct.check_status = #{checkStatus}</if>
<if test="checkManCode != null and checkManCode != ''"> and qct.check_man_code = #{checkManCode}</if>
<if test="checkManName != null and checkManName != ''"> and qct.check_man_name like concat('%', #{checkManName}, '%')</if>
<if test="checkResult != null and checkResult != ''"> and qct.check_result = #{checkResult}</if>
<if test="status != null and status != ''"> and qct.status = #{status}</if>
<if test="delFlag != null and delFlag != ''"> and qct.del_flag = #{delFlag}</if>
<if test="factoryCode != null and factoryCode != ''"> and qct.factory_code = #{factoryCode}</if>
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120)</if>
<if test="checkTimeStart != null "> and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
<if test="checkType != null "> and qct.check_type = #{checkType} </if>
<if test="typeCode != null "> and q.type_code = #{typeCode} </if>
</where>
</select>

@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="QcCheckTaskProduce" id="QcCheckTaskProduceResult">
<result property="recordId" column="record_id" />
<result property="checkNo" column="check_no" />
<result property="batchNo" column="batch_no" />
<result property="incomeBatchNo" column="income_batch_no" />
<result property="orderNo" column="order_no" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectQcCheckTaskProduceVo">
select record_id, check_no, batch_no, order_no, material_code, material_name,
select record_id, check_no, income_batch_no, order_no, material_code, material_name,
quality, unit, supplier_code, supplier_name, income_time, check_loc, check_status,
check_man_code, check_man_name, check_time, check_result, status, attr1,
attr2, attr3, attr4, create_by, create_time, update_by, update_time,
@ -46,36 +46,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectQcCheckTaskProduceList" parameterType="QcCheckTaskProduce" resultMap="QcCheckTaskProduceResult">
<include refid="selectQcCheckTaskProduceVo"/>
select qct.record_id, qct.check_no, qct.income_batch_no,
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,
qct.create_by,qct.create_time, qct.update_by, qct.update_time,qct.check_type,
q.type_code
from qc_check_task qct
left join qc_check_type q on q.id = qct.check_type
<where>
<if test="checkNo != null and checkNo != ''"> and check_no like concat('%', #{checkNo}, '%')</if>
<if test="batchNo != null and batchNo != ''"> and batch_no like concat('%', #{batchNo}, '%')</if>
<if test="orderNo != null and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="quality != null "> and quality = #{quality}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="produceDate != null "> and income_time = #{produceDate}</if>
<if test="checkLoc != null and checkLoc != ''"> and check_loc = #{checkLoc}</if>
<if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if>
<if test="checkManCode != null and checkManCode != ''"> and check_man_code = #{checkManCode}</if>
<if test="checkManName != null and checkManName != ''"> and check_man_name like concat('%', #{checkManName}, '%')</if>
<if test="checkTime != null "> and check_time = #{checkTime}</if>
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</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>
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),income_time, 120) >= #{incomeTimeStart}</if>
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),income_time, 120)</if>
<if test="checkTimeStart != null "> and CONVERT(varchar(30),check_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),check_time, 120)</if>
<if test="checkType != null "> and check_type = #{checkType} </if>
<if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and qct.income_batch_no = #{incomeBatchNo}</if>
<if test="orderNo != null and orderNo != ''"> and qct.order_no = #{orderNo}</if>
<if test="materialCode != null and materialCode != ''"> and qct.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and qct.material_name like concat('%', #{materialName}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and qct.supplier_code = #{supplierCode}</if>
<if test="supplierName != null and supplierName != ''"> and qct.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="incomeTime != null "> and qct.income_time = #{incomeTime}</if>
<if test="checkLoc != null and checkLoc != ''"> and qct.check_loc = #{checkLoc}</if>
<if test="checkStatus != null and checkStatus != ''"> and qct.check_status = #{checkStatus}</if>
<if test="checkManCode != null and checkManCode != ''"> and qct.check_man_code = #{checkManCode}</if>
<if test="checkManName != null and checkManName != ''"> and qct.check_man_name like concat('%', #{checkManName}, '%')</if>
<if test="checkResult != null and checkResult != ''"> and qct.check_result = #{checkResult}</if>
<if test="status != null and status != ''"> and qct.status = #{status}</if>
<if test="delFlag != null and delFlag != ''"> and qct.del_flag = #{delFlag}</if>
<if test="factoryCode != null and factoryCode != ''"> and qct.factory_code = #{factoryCode}</if>
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120)</if>
<if test="checkTimeStart != null "> and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
<if test="checkType != null "> and qct.check_type = #{checkType} </if>
<if test="typeCode != null "> and q.type_code = #{typeCode} </if>
</where>
</select>
@ -107,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="recordId != null">record_id,</if>
<if test="checkNo != null">check_no,</if>
<if test="batchNo != null">batch_no,</if>
<if test="incomeBatchNo != null">income_batch_no,</if>
<if test="orderNo != null">order_no,</if>
<if test="materialCode != null">material_code,</if>
<if test="materialName != null">material_name,</if>
@ -115,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null">unit,</if>
<if test="supplierCode != null">supplier_code,</if>
<if test="supplierName != null">supplier_name,</if>
<if test="produceDate != null">income_time,</if>
<if test="incomeTime != null">income_time,</if>
<if test="checkLoc != null">check_loc,</if>
<if test="checkStatus != null">check_status,</if>
<if test="checkManCode != null">check_man_code,</if>
@ -138,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordId != null">#{recordId},</if>
<if test="checkNo != null">#{checkNo},</if>
<if test="batchNo != null">#{batchNo},</if>
<if test="incomeBatchNo != null">#{incomeBatchNo},</if>
<if test="orderNo != null">#{orderNo},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="materialName != null">#{materialName},</if>
@ -146,7 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null">#{unit},</if>
<if test="supplierCode != null">#{supplierCode},</if>
<if test="supplierName != null">#{supplierName},</if>
<if test="produceDate != null">#{produceDate},</if>
<if test="incomeTime != null">#{incomeTime},</if>
<if test="checkLoc != null">#{checkLoc},</if>
<if test="checkStatus != null">#{checkStatus},</if>
<if test="checkManCode != null">#{checkManCode},</if>
@ -172,7 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update qc_check_task
<trim prefix="SET" suffixOverrides=",">
<if test="checkNo != null">check_no = #{checkNo},</if>
<if test="batchNo != null">batch_no = #{batchNo},</if>
<if test="incomeBatchNo != null">income_batch_no = #{incomeBatchNo},</if>
<if test="orderNo != null">order_no = #{orderNo},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="materialName != null">material_name = #{materialName},</if>
@ -180,7 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null">unit = #{unit},</if>
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="produceDate != null">income_time = #{produceDate},</if>
<if test="incomeTime != null">income_time = #{incomeTime},</if>
<if test="checkLoc != null">check_loc = #{checkLoc},</if>
<if test="checkStatus != null">check_status = #{checkStatus},</if>
<if test="checkManCode != null">check_man_code = #{checkManCode},</if>

@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="QcCheckTaskWarehousing" id="QcCheckTaskWarehousingResult">
<result property="recordId" column="record_id" />
<result property="checkNo" column="check_no" />
<result property="batchNo" column="batch_no" />
<result property="incomeBatchNo" column="income_batch_no" />
<result property="orderNo" column="order_no" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
@ -37,44 +37,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectQcCheckTaskWarehousingVo">
select record_id, check_no, batch_no, order_no, material_code,
select record_id, check_no, income_batch_no, order_no, material_code,
material_name, quality, unit, supplier_code, supplier_name,
income_time, check_loc, check_status, check_man_code, check_man_name,
check_time, check_result, status, attr1, attr2, attr3, attr4, create_by,
create_time, update_by, update_time, factory_code, del_flag , check_type
check_time, check_result, status, create_by,
create_time, update_by, update_time, check_type
from qc_check_task
</sql>
<select id="selectQcCheckTaskWarehousingList" parameterType="QcCheckTaskWarehousing" resultMap="QcCheckTaskWarehousingResult">
<include refid="selectQcCheckTaskWarehousingVo"/>
select qct.record_id, qct.check_no, qct.income_batch_no,
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,
qct.create_by,qct.create_time, qct.update_by, qct.update_time,qct.check_type,
q.type_code
from qc_check_task qct
left join qc_check_type q on q.id = qct.check_type
<where>
<if test="checkNo != null and checkNo != ''"> and check_no like concat('%', #{checkNo}, '%')</if>
<if test="batchNo != null and batchNo != ''"> and batch_no like concat('%', #{batchNo}, '%')</if>
<if test="orderNo != null and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="quality != null "> and quality = #{quality}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="incomeTime != null "> and income_time = #{incomeTime}</if>
<if test="checkLoc != null and checkLoc != ''"> and check_loc = #{checkLoc}</if>
<if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if>
<if test="checkManCode != null and checkManCode != ''"> and check_man_code = #{checkManCode}</if>
<if test="checkManName != null and checkManName != ''"> and check_man_name like concat('%', #{checkManName}, '%')</if>
<if test="checkTime != null "> and check_time = #{checkTime}</if>
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</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>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),income_time, 120) >= #{incomeTimeStart}</if>
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),income_time, 120)</if>
<if test="checkTimeStart != null "> and CONVERT(varchar(30),check_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),check_time, 120)</if>
<if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and qct.income_batch_no = #{incomeBatchNo}</if>
<if test="orderNo != null and orderNo != ''"> and qct.order_no = #{orderNo}</if>
<if test="materialCode != null and materialCode != ''"> and qct.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and qct.material_name like concat('%', #{materialName}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and qct.supplier_code = #{supplierCode}</if>
<if test="supplierName != null and supplierName != ''"> and qct.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="incomeTime != null "> and qct.income_time = #{incomeTime}</if>
<if test="checkLoc != null and checkLoc != ''"> and qct.check_loc = #{checkLoc}</if>
<if test="checkStatus != null and checkStatus != ''"> and qct.check_status = #{checkStatus}</if>
<if test="checkManCode != null and checkManCode != ''"> and qct.check_man_code = #{checkManCode}</if>
<if test="checkManName != null and checkManName != ''"> and qct.check_man_name like concat('%', #{checkManName}, '%')</if>
<if test="checkResult != null and checkResult != ''"> and qct.check_result = #{checkResult}</if>
<if test="status != null and status != ''"> and qct.status = #{status}</if>
<if test="delFlag != null and delFlag != ''"> and qct.del_flag = #{delFlag}</if>
<if test="factoryCode != null and factoryCode != ''"> and qct.factory_code = #{factoryCode}</if>
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120)</if>
<if test="checkTimeStart != null "> and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
<if test="checkType != null "> and qct.check_type = #{checkType} </if>
<if test="typeCode != null "> and q.type_code = #{typeCode} </if>
</where>
</select>
@ -99,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="recordId != null">record_id,</if>
<if test="checkNo != null">check_no,</if>
<if test="batchNo != null">batch_no,</if>
<if test="incomeBatchNo != null">income_batch_no,</if>
<if test="orderNo != null">order_no,</if>
<if test="materialCode != null">material_code,</if>
<if test="materialName != null">material_name,</if>
@ -130,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordId != null">#{recordId},</if>
<if test="checkNo != null">#{checkNo},</if>
<if test="batchNo != null">#{batchNo},</if>
<if test="incomeBatchNo != null">#{incomeBatchNo},</if>
<if test="orderNo != null">#{orderNo},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="materialName != null">#{materialName},</if>
@ -164,7 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update qc_check_task
<trim prefix="SET" suffixOverrides=",">
<if test="checkNo != null">check_no = #{checkNo},</if>
<if test="batchNo != null">batch_no = #{batchNo},</if>
<if test="incomeBatchNo != null">income_batch_no = #{incomeBatchNo},</if>
<if test="orderNo != null">order_no = #{orderNo},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="materialName != null">material_name = #{materialName},</if>

Loading…
Cancel
Save