质量过程巡检+来料检验任务接口+报工sql调整

master
zhaoxiaolin 1 year ago
parent 4e65a7d092
commit 30fac0e8dd

@ -18,7 +18,8 @@ public class QcUserMaterialDTO extends BaseEntity {
/** id */ /** id */
private String id; private String id;
private String belongTo;
private String checkNo;
/** 员工编码 */ /** 员工编码 */
@Excel(name = "员工编码") @Excel(name = "员工编码")
private String userCode; private String userCode;
@ -75,6 +76,22 @@ public class QcUserMaterialDTO extends BaseEntity {
private List<String> selectedValues; private List<String> selectedValues;
public String getBelongTo() {
return belongTo;
}
public void setBelongTo(String belongTo) {
this.belongTo = belongTo;
}
public String getCheckNo() {
return checkNo;
}
public void setCheckNo(String checkNo) {
this.checkNo = checkNo;
}
public void setId(String id) { public void setId(String id) {
this.id = id; this.id = id;
} }

@ -327,15 +327,16 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
logger.info("==========================母工单报工结束"+JSONObject.toJSONString(sapR)); logger.info("==========================母工单报工结束"+JSONObject.toJSONString(sapR));
//最终报工标识且sap报工成功关闭子母工单 //最终报工标识且sap报工成功关闭子母工单
MesReportWork endReport = mesReportWorkMapper.getEndReport(pHzWork); MesReportWork endReport = mesReportWorkMapper.getEndReport(pHzWork);
if("1".equals(endReport.getEndReport())&&sapR.getCode()==200){ //-----改为由上位机触发
MesReportWork rworkVo = new MesReportWork(); // if("1".equals(endReport.getEndReport())&&sapR.getCode()==200){
rworkVo.setStatus("w3"); // MesReportWork rworkVo = new MesReportWork();
rworkVo.setUpdateTime(DateUtils.getNowDate()); // rworkVo.setStatus("w3");
rworkVo.setUpdateBy(SecurityUtils.getUsername()); // rworkVo.setUpdateTime(DateUtils.getNowDate());
rworkVo.setWorkorderCode(belongWorkOrder); // rworkVo.setUpdateBy(SecurityUtils.getUsername());
//pro_work_order status->w3报工--belong_work_order // rworkVo.setWorkorderCode(belongWorkOrder);
mesReportWorkMapper.updateOrderWorkStatus(rworkVo); // //pro_work_order status->w3报工--belong_work_order
} // mesReportWorkMapper.updateOrderWorkStatus(rworkVo);
// }
} }
return R.ok(); return R.ok();
} }

@ -435,8 +435,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from pro_order_workorder pow from pro_order_workorder pow
left join base_shifts_t s on pow.shift_id = s.Shift_Id left join base_shifts_t s on pow.shift_id = s.Shift_Id
left join pro_order_workorder pows on pows.parent_order = pow.workorder_code left join pro_order_workorder pows on pows.parent_order = pow.workorder_code
left join mes_report_work mrw on mrw.workorder_code = pow.workorder_code
where pow.del_flag = '0' and pow.status = 'w2' and pow.parent_order ='0' where pow.del_flag = '0' and pow.status = 'w2' and pow.parent_order ='0'
and mrw.upload_status != '1'
<if test="workorderCode != null and workorderCode != ''"> <if test="workorderCode != null and workorderCode != ''">
and pow.workorder_code like concat('%', #{workorderCode}, '%') and pow.workorder_code like concat('%', #{workorderCode}, '%')
</if> </if>

@ -76,6 +76,8 @@ public interface OpenMapper {
public int addBatch(@Param("list") List<QcCheckTaskDetailDTO> items); public int addBatch(@Param("list") List<QcCheckTaskDetailDTO> items);
QcUserMaterialDTO getUserByMaterial(String materialCode); List<QcUserMaterialDTO> getUserByMaterial(String materialCode);
public int addCheckUsers(@Param("list") List<QcUserMaterialDTO> users);
} }

@ -295,7 +295,7 @@ public class OpenServiceImpl implements OpenService {
Date nowDate= DateUtils.getNowDate(); Date nowDate= DateUtils.getNowDate();
//获取当前所选工厂 //获取当前所选工厂
String factoryCode = qcCheckTaskProduce.getFactoryCode(); String factoryCode = qcCheckTaskProduce.getFactoryCode();
String beLongId = IdUtils.fastSimpleUUID();
qcCheckTaskProduce.setCheckNo(bpDD+liushuiStr); qcCheckTaskProduce.setCheckNo(bpDD+liushuiStr);
/**取检测项**/ /**取检测项**/
@ -304,14 +304,24 @@ public class OpenServiceImpl implements OpenService {
qctp.setMaterialCode(qcCheckTaskProduce.getMaterialCode());//特性 qctp.setMaterialCode(qcCheckTaskProduce.getMaterialCode());//特性
/**qc_user_material取默认检查人**/ /**qc_user_material取默认检查人**/
QcUserMaterialDTO qcUserMaterialDTO = openMapper.getUserByMaterial(qcCheckTaskProduce.getMaterialCode()); List<QcUserMaterialDTO> users = openMapper.getUserByMaterial(qcCheckTaskProduce.getMaterialCode());
if(qcUserMaterialDTO == null){ if(CollectionUtils.isEmpty(users)){
qcCheckTaskProduce.setCheckManCode("mobile"); QcUserMaterialDTO dto0 = new QcUserMaterialDTO();
qcCheckTaskProduce.setCheckManName("手持测试用户"); dto0.setUserCode("mobile");
dto0.setUserName("手持测试用户");
users.add(dto0);
}else{ }else{
qcCheckTaskProduce.setCheckManCode(qcUserMaterialDTO.getUserCode()); for(QcUserMaterialDTO user:users){
qcCheckTaskProduce.setCheckManName(qcUserMaterialDTO.getUserName()); user.setId(IdUtils.fastSimpleUUID());
user.setBelongTo(beLongId);
user.setCheckNo(qcCheckTaskProduce.getCheckNo());
user.setCreateBy(createBy);
user.setFactoryCode(factoryCode);
user.setCreateTime(nowDate);
}
} }
int m=openMapper.addCheckUsers(users);
logger.info("检查人新增"+m+"成功");
/**qc_check_type_project**/ /**qc_check_type_project**/
List<QcCheckTaskDetailDTO> items = openMapper.getTPByTypeMaterial(qctp); List<QcCheckTaskDetailDTO> items = openMapper.getTPByTypeMaterial(qctp);
@ -331,7 +341,7 @@ public class OpenServiceImpl implements OpenService {
} }
/**qc_check_task**/ /**qc_check_task**/
String beLongId = IdUtils.fastSimpleUUID();
qcCheckTaskProduce.setRecordId(beLongId); qcCheckTaskProduce.setRecordId(beLongId);
qcCheckTaskProduce.setFactoryCode(factoryCode); qcCheckTaskProduce.setFactoryCode(factoryCode);
qcCheckTaskProduce.setCreateTime(nowDate); qcCheckTaskProduce.setCreateTime(nowDate);

@ -196,10 +196,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by qctp.sort order by qctp.sort
</select> </select>
<select id="getUserByMaterial" resultType="com.op.system.api.domain.quality.QcUserMaterialDTO"> <select id="getUserByMaterial" resultType="com.op.system.api.domain.quality.QcUserMaterialDTO">
select top 1 user_code userCode, select user_code userCode,
user_name userName user_name userName
from qc_user_material where material_code = #{materialCode} from qc_user_material where material_code = #{materialCode}
order by create_time desc
</select> </select>
<insert id="insertEquRepairOrder" parameterType="DeviceRepairOrder"> <insert id="insertEquRepairOrder" parameterType="DeviceRepairOrder">
@ -358,5 +357,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) )
</foreach> </foreach>
</insert> </insert>
<insert id="addCheckUsers">
insert into qc_check_task_user(
record_id,belong_to,check_no,
check_man_code,check_man_name,
create_by,create_time,factory_code
) values
<foreach item="item" index="index" collection="list" separator=",">
(
#{item.id},#{item.belongTo},#{item.checkNo},
#{item.userCode},#{item.userName},
#{item.createBy},#{item.createTime},#{item.factoryCode}
)
</foreach>
</insert>
</mapper> </mapper>

@ -8,6 +8,7 @@ import com.op.quality.domain.QcCheckTaskIncome;
import com.op.quality.domain.QcSupplier; import com.op.quality.domain.QcSupplier;
import com.op.system.api.domain.SysDictData; import com.op.system.api.domain.SysDictData;
import com.op.system.api.domain.SysUser; import com.op.system.api.domain.SysUser;
import com.op.system.api.domain.quality.QcUserMaterialDTO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -88,4 +89,8 @@ public interface QcCheckTaskIncomeMapper {
String getTypeCode(String checkType); String getTypeCode(String checkType);
List<String> selectQcCheckTaskCheckNoByRecordIds(String[] recordIds); List<String> selectQcCheckTaskCheckNoByRecordIds(String[] recordIds);
List<QcUserMaterialDTO> getUserByMaterial(String materialCode);
int addCheckUsers(@Param("list") List<QcUserMaterialDTO> users);
} }

@ -17,6 +17,7 @@ import com.op.quality.mapper.*;
import com.op.quality.service.IQcCheckTaskProduceService; import com.op.quality.service.IQcCheckTaskProduceService;
import com.op.quality.service.IQcCheckTaskUserService; import com.op.quality.service.IQcCheckTaskUserService;
import com.op.system.api.domain.SysUser; import com.op.system.api.domain.SysUser;
import com.op.system.api.domain.quality.QcUserMaterialDTO;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -144,24 +145,49 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
//String typeCode = qcCheckTaskIncomeMapper.getTypeCode(qcCheckTaskIncome.getCheckType()); //String typeCode = qcCheckTaskIncomeMapper.getTypeCode(qcCheckTaskIncome.getCheckType());
qcCheckTaskIncome.setTypeCode("material");//大检验节点 qcCheckTaskIncome.setTypeCode("material");//大检验节点
/**qc_task_user start**/ /**qc_task_user start**/
String checkManName = qcCheckTaskIncome.getCheckManName(); if(StringUtils.isNotBlank(qcCheckTaskIncome.getCheckManName())){//管理系统创建任务
String checkManCode = qcCheckTaskIncome.getCheckManCode(); String checkManName = qcCheckTaskIncome.getCheckManName();
qcCheckTaskIncome.setCheckManName(""); String checkManCode = qcCheckTaskIncome.getCheckManCode();
qcCheckTaskIncome.setCheckManCode(""); qcCheckTaskIncome.setCheckManName("");
String[] splitNames = checkManName.split(","); qcCheckTaskIncome.setCheckManCode("");
String[] splitCodes = checkManCode.split(","); String[] splitNames = checkManName.split(",");
List<QcCheckTaskUser> qcCheckTaskUserList = new ArrayList<>(); String[] splitCodes = checkManCode.split(",");
for (int i = 0; i < splitNames.length; i++) { List<QcCheckTaskUser> qcCheckTaskUserList = new ArrayList<>();
QcCheckTaskUser qcCheckTaskUser = new QcCheckTaskUser(); for (int i = 0; i < splitNames.length; i++) {
qcCheckTaskUser.setCheckManName(splitNames[i]); QcCheckTaskUser qcCheckTaskUser = new QcCheckTaskUser();
qcCheckTaskUser.setCheckManCode(splitCodes[i]); qcCheckTaskUser.setCheckManName(splitNames[i]);
qcCheckTaskUser.setCheckNo(qcCheckTaskIncome.getCheckNo()); qcCheckTaskUser.setCheckManCode(splitCodes[i]);
qcCheckTaskUser.setBelongTo(beLongId); qcCheckTaskUser.setCheckNo(qcCheckTaskIncome.getCheckNo());
qcCheckTaskUserList.add(qcCheckTaskUser); qcCheckTaskUser.setBelongTo(beLongId);
qcCheckTaskUserList.add(qcCheckTaskUser);
}
//检验人插入
qcCheckTaskUserService.insertQcCheckTaskUserList(qcCheckTaskUserList);
}else{//上位机触发
qcCheckTaskIncome.setCheckManName("");
qcCheckTaskIncome.setCheckManCode("");
/**qc_user_material取默认检查人**/
List<QcUserMaterialDTO> users = qcCheckTaskIncomeMapper.getUserByMaterial(qcCheckTaskIncome.getMaterialCode());
if(CollectionUtils.isEmpty(users)){
QcUserMaterialDTO dto0 = new QcUserMaterialDTO();
dto0.setUserCode("mobile");
dto0.setUserName("手持测试用户");
users.add(dto0);
}else{
for(QcUserMaterialDTO user:users){
user.setId(IdUtils.fastSimpleUUID());
user.setBelongTo(beLongId);
user.setCheckNo(qcCheckTaskIncome.getCheckNo());
user.setCreateBy(createBy);
user.setFactoryCode(factoryCode);
user.setCreateTime(nowDate);
}
}
int m=qcCheckTaskIncomeMapper.addCheckUsers(users);
logger.info("检查人新增"+m+"成功");
} }
qcCheckTaskIncomeMapper.insertQcCheckTaskIncome(qcCheckTaskIncome); qcCheckTaskIncomeMapper.insertQcCheckTaskIncome(qcCheckTaskIncome);
//检验人插入
qcCheckTaskUserService.insertQcCheckTaskUserList(qcCheckTaskUserList);
/**qc_check_task_detail**/ /**qc_check_task_detail**/
for(QcCheckTaskDetail item:items){ for(QcCheckTaskDetail item:items){
item.setRecordId(IdUtils.fastSimpleUUID()); item.setRecordId(IdUtils.fastSimpleUUID());
@ -312,10 +338,11 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTaskIncome.setCheckStatus("2"); qcCheckTaskIncome.setCheckStatus("2");
qcCheckTaskIncome.setCheckResult(result); qcCheckTaskIncome.setCheckResult(result);
qcCheckTaskIncome.setCheckTime(DateUtils.getNowDate()); qcCheckTaskIncome.setCheckTime(DateUtils.getNowDate());
qcCheckTaskIncome.setCheckManCode(SecurityUtils.getUsername());
n = qcCheckTaskIncomeMapper.updateQcCheckTaskIncome(qcCheckTaskIncome); n = qcCheckTaskIncomeMapper.updateQcCheckTaskIncome(qcCheckTaskIncome);
/**wms_raw_order_in-->quality_status->**/ /**wms_raw_order_in-->quality_status->**/
qcCheckTaskIncome.setCheckResult(result.equals("Y")?"1":"0"); qcCheckTaskIncome.setCheckResult(result.equals("Y")?"1":"2");
qcCheckUnqualifiedMapper.updateQualityStatus(qcCheckTaskIncome); qcCheckUnqualifiedMapper.updateQualityStatus(qcCheckTaskIncome);
}else if("produce".equals(qcCheckTaskIncome.getTypeCode())){ }else if("produce".equals(qcCheckTaskIncome.getTypeCode())){
QcCheckTaskProduce qcCheckTaskProduce = new QcCheckTaskProduce(); QcCheckTaskProduce qcCheckTaskProduce = new QcCheckTaskProduce();
@ -323,6 +350,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTaskProduce.setRecordId(recordId); qcCheckTaskProduce.setRecordId(recordId);
qcCheckTaskProduce.setCheckResult(result); qcCheckTaskProduce.setCheckResult(result);
qcCheckTaskProduce.setCheckTime(DateUtils.getNowDate()); qcCheckTaskProduce.setCheckTime(DateUtils.getNowDate());
qcCheckTaskProduce.setCheckManCode(SecurityUtils.getUsername());
n = qcCheckTaskProduceMapper.updateQcCheckTaskProduce(qcCheckTaskProduce); n = qcCheckTaskProduceMapper.updateQcCheckTaskProduce(qcCheckTaskProduce);
@ -335,6 +363,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
warehousing.setRecordId(recordId); warehousing.setRecordId(recordId);
warehousing.setCheckResult(result); warehousing.setCheckResult(result);
warehousing.setCheckTime(DateUtils.getNowDate()); warehousing.setCheckTime(DateUtils.getNowDate());
warehousing.setCheckManCode(SecurityUtils.getUsername());
n = qcCheckTaskWarehousingMapper.updateQcCheckTaskWarehousing(warehousing); n = qcCheckTaskWarehousingMapper.updateQcCheckTaskWarehousing(warehousing);
} }

@ -1,5 +1,6 @@
package com.op.quality.service.impl; package com.op.quality.service.impl;
import java.util.Date;
import java.util.List; import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
@ -20,7 +21,7 @@ import javax.servlet.http.HttpServletRequest;
/** /**
* --Service * --Service
* *
* @author Open Platform * @author Open Platform
* @date 2023-12-22 * @date 2023-12-22
*/ */
@ -31,7 +32,7 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService {
/** /**
* -- * --
* *
* @param recordId -- * @param recordId --
* @return -- * @return --
*/ */
@ -43,7 +44,7 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService {
/** /**
* -- * --
* *
* @param qcCheckTaskUser -- * @param qcCheckTaskUser --
* @return -- * @return --
*/ */
@ -55,7 +56,7 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService {
/** /**
* -- * --
* *
* @param qcCheckTaskUser -- * @param qcCheckTaskUser --
* @return * @return
*/ */
@ -68,7 +69,7 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService {
/** /**
* -- * --
* *
* @param qcCheckTaskUser -- * @param qcCheckTaskUser --
* @return * @return
*/ */
@ -99,7 +100,7 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService {
/** /**
* -- * --
* *
* @param recordIds -- * @param recordIds --
* @return * @return
*/ */
@ -117,7 +118,7 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService {
/** /**
* -- * --
* *
* @param recordId -- * @param recordId --
* @return * @return
*/ */
@ -138,9 +139,10 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService {
String key = "#header.poolName"; String key = "#header.poolName";
String factoryCode = request.getHeader(key.substring(8)).replace("ds_", ""); String factoryCode = request.getHeader(key.substring(8)).replace("ds_", "");
//遍历赋值 //遍历赋值
Date nowTime = DateUtils.getNowDate();
for (QcCheckTaskUser qcCheckTaskUser : qcCheckTaskUserList){ for (QcCheckTaskUser qcCheckTaskUser : qcCheckTaskUserList){
qcCheckTaskUser.setRecordId(IdUtils.fastSimpleUUID()); qcCheckTaskUser.setRecordId(IdUtils.fastSimpleUUID());
qcCheckTaskUser.setCreateTime(DateUtils.getNowDate()); qcCheckTaskUser.setCreateTime(nowTime);
qcCheckTaskUser.setCreateBy(SecurityUtils.getUsername()); qcCheckTaskUser.setCreateBy(SecurityUtils.getUsername());
qcCheckTaskUser.setFactoryCode(factoryCode); qcCheckTaskUser.setFactoryCode(factoryCode);
} }

@ -230,6 +230,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<update id="updateQcCheckTaskIncome" parameterType="QcCheckTaskIncome"> <update id="updateQcCheckTaskIncome" parameterType="QcCheckTaskIncome">
update qc_check_task update qc_check_task
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
@ -270,6 +271,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update qc_check_task update qc_check_task
set set
check_status = #{checkStatus}, check_status = #{checkStatus},
check_man_code = #{updateBy},
<if test="checkTime != null">check_time = #{checkTime},</if> <if test="checkTime != null">check_time = #{checkTime},</if>
<if test="sampleQuality != null">sample_quality = #{sampleQuality},</if> <if test="sampleQuality != null">sample_quality = #{sampleQuality},</if>
<if test="noOkQuality != null">noOk_quality = #{noOkQuality},</if> <if test="noOkQuality != null">noOk_quality = #{noOkQuality},</if>
@ -311,4 +313,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{recordId} #{recordId}
</foreach> </foreach>
</select> </select>
<select id="getUserByMaterial" resultType="com.op.system.api.domain.quality.QcUserMaterialDTO">
select user_code userCode,
user_name userName
from qc_user_material where material_code = #{materialCode}
</select>
<insert id="addCheckUsers">
insert into qc_check_task_user(
record_id,belong_to,check_no,
check_man_code,check_man_name,
create_by,create_time,factory_code
) values
<foreach item="item" index="index" collection="list" separator=",">
(
#{item.id},#{item.belongTo},#{item.checkNo},
#{item.userCode},#{item.userName},
#{item.createBy},#{item.createTime},#{item.factoryCode}
)
</foreach>
</insert>
</mapper> </mapper>

@ -119,15 +119,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
e.workshop_code supplierCode, e.workshop_code supplierCode,
e.workshop_name supplierName, e.workshop_name supplierName,
pow.product_date incomeTime, pow.product_date incomeTime,
task.createTime task.createTime,
task.order_no orderNo,
task.check_loc checkLoc
from pro_order_workorder pow from pro_order_workorder pow
left join pro_order_workorder_batch powb on powb.workorder_id = pow.workorder_id left join pro_order_workorder_batch powb on powb.workorder_id = pow.workorder_id
left join base_equipment e on e.equipment_code = pow.workorder_name left join base_equipment e on e.equipment_code = pow.workorder_name
left join ( left join (
select max(create_time) createTime,income_batch_no from qc_check_task select max(create_time) createTime,income_batch_no,order_no,check_loc
where type_code = 'produce' and income_batch_no='20270104LJ20240105CBRA0L' from qc_check_task
<!--生产放开and CONVERT(varchar(10),income_time, 120) = CONVERT(varchar(10),GETDATE(), 120)--> where type_code = 'produce'
GROUP BY income_batch_no and CONVERT(varchar(10),income_time, 120) = CONVERT(varchar(10),GETDATE(), 120)
GROUP BY income_batch_no,order_no,check_loc
) task on task.income_batch_no = powb.batch_code ) task on task.income_batch_no = powb.batch_code
where pow.status = 'w2' and pow.parent_order = '0' and pow.del_flag ='0' where pow.status = 'w2' and pow.parent_order = '0' and pow.del_flag ='0'
and powb.del_flag = '0' and pow.product_date >= '2023-12-22' and powb.del_flag = '0' and pow.product_date >= '2023-12-22'

@ -48,7 +48,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
'检验任务' attr1 '检验任务' attr1
from qc_check_task qct from qc_check_task qct
left join qc_check_type qc on qct.check_type = qc.order_code left join qc_check_type qc on qct.check_type = qc.order_code
where qct.check_status = '0' and qct.check_man_code = #{checkManCode} left join qc_check_task_user qctu on qctu.belong_to = qct.record_id
where qct.check_status = '0' and qctu.check_man_code = #{checkManCode}
group by qct.check_type,qc.check_name group by qct.check_type,qc.check_name
union all union all
select '','', select '','',

@ -256,10 +256,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
qct.status,qct.create_by,qct.create_time,qct.check_type, qct.status,qct.create_by,qct.create_time,qct.check_type,
qct.noOk_quality,qct.aNoOkquality,qct.bNoOkquality,qct.cNoOkquality,qct.sample_quality qct.noOk_quality,qct.aNoOkquality,qct.bNoOkquality,qct.cNoOkquality,qct.sample_quality
from qc_check_task qct from qc_check_task qct
left join qc_check_task_user qctu on qctu.belong_to = qct.record_id
<where> <where>
and qct.del_flag = '0' and qct.del_flag = '0'
<if test="checkType != null and checkType != ''"> and qct.check_type = #{checkType}</if> <if test="checkType != null and checkType != ''"> and qct.check_type = #{checkType}</if>
<if test="checkManCode != null and checkManCode != ''"> and qct.check_man_code = #{checkManCode}</if> <if test="checkManCode != null and checkManCode != ''"> and qctu.check_man_code = #{checkManCode}</if>
<if test="checkStatus != null and checkStatus != ''"> and qct.check_status in (${checkStatus})</if> <if test="checkStatus != null and checkStatus != ''"> and qct.check_status in (${checkStatus})</if>
</where> </where>
order by qct.create_time desc order by qct.create_time desc

Loading…
Cancel
Save