质量调整

orign^2
zhaoxiaolin 1 year ago
parent 8452e5b19e
commit 47318ca385

@ -9,10 +9,7 @@ import com.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType; import com.op.common.log.enums.BusinessType;
import com.op.common.security.annotation.RequiresPermissions; import com.op.common.security.annotation.RequiresPermissions;
import com.op.common.security.utils.SecurityUtils; import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.QcBomComponent; import com.op.quality.domain.*;
import com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcCheckReportIncome;
import com.op.quality.domain.QcSupplier;
import com.op.quality.service.IQcCheckReportIncomeService; import com.op.quality.service.IQcCheckReportIncomeService;
import com.op.system.api.domain.SysUser; import com.op.system.api.domain.SysUser;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
@ -49,7 +46,7 @@ public class QcCheckReportIncomeController extends BaseController {
LocalDate date = LocalDate.now(); LocalDate date = LocalDate.now();
LocalDate dateEnd = date.plusDays(1); LocalDate dateEnd = date.plusDays(1);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateEndStr = dtf.format(dateEnd)+" 00:00:00"; String dateEndStr = dtf.format(dateEnd)+" 23:59:59";
qcCheckReportIncome.setCheckTimeEnd(dateEndStr);//end qcCheckReportIncome.setCheckTimeEnd(dateEndStr);//end
} }

@ -3,6 +3,7 @@ package com.op.quality.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.op.quality.domain.QcCheckProject;
import com.op.quality.domain.QcMaterialGroup; import com.op.quality.domain.QcMaterialGroup;
import com.op.quality.service.IQcMaterialGroupService; import com.op.quality.service.IQcMaterialGroupService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -105,5 +106,15 @@ public class QcCheckTypeProjectController extends BaseController {
public AjaxResult changeStatus(@RequestBody QcCheckTypeProject qcCheckTypeProject) { public AjaxResult changeStatus(@RequestBody QcCheckTypeProject qcCheckTypeProject) {
return toAjax(qcCheckTypeProjectService.changeStatus(qcCheckTypeProject)); return toAjax(qcCheckTypeProjectService.changeStatus(qcCheckTypeProject));
} }
@GetMapping("/getProjectInfoList")
public TableDataInfo getProjectInfoList(QcCheckProject qcCheckProject) {
startPage();
List<QcCheckProject> list = qcCheckTypeProjectService.getProjectInfoList(qcCheckProject);
return getDataTable(list);
}
@PostMapping("/submitProjects")
public AjaxResult submitProjects(@RequestBody List<QcCheckTypeProject> typeProjects) {
return toAjax(qcCheckTypeProjectService.submitProjects(typeProjects));
}
} }

@ -138,6 +138,15 @@ public class QcStaticTableController extends BaseController {
String key = keyPre+ymd; String key = keyPre+ymd;
QcStaticTable mdata = seriesdtos.get(key); QcStaticTable mdata = seriesdtos.get(key);
if(mdata != null){ if(mdata != null){
if(mdata.getaNoOkquality()==null){
mdata.setaNoOkquality(new BigDecimal("0"));
}
if(mdata.getbNoOkquality()==null){
mdata.setbNoOkquality(new BigDecimal("0"));
}
if(mdata.getcNoOkquality()==null){
mdata.setcNoOkquality(new BigDecimal("0"));
}
BigDecimal defectRate = (mdata.getaNoOkquality().add(mdata.getbNoOkquality()).multiply(new BigDecimal("0.65")) BigDecimal defectRate = (mdata.getaNoOkquality().add(mdata.getbNoOkquality()).multiply(new BigDecimal("0.65"))
.add(mdata.getcNoOkquality()).multiply(new BigDecimal(0.35))) .add(mdata.getcNoOkquality()).multiply(new BigDecimal(0.35)))
.divide(new BigDecimal(mdata.getSampleQuality())) .divide(new BigDecimal(mdata.getSampleQuality()))

@ -234,7 +234,7 @@ public class QuaController extends BaseController {
*/ */
@GetMapping("/pdaMaterialTree") @GetMapping("/pdaMaterialTree")
public AjaxResult pdaMaterialTree(QcMaterialGroup materialGroup) { public AjaxResult pdaMaterialTree(QcMaterialGroup materialGroup) {
DynamicDataSourceContextHolder.push("ds_"+materialGroup.getFactoryCode()); DynamicDataSourceContextHolder.push(materialGroup.getFactoryCode());
return success(qcMaterialGroupService.selectQcMaterialTreeList(materialGroup)); return success(qcMaterialGroupService.selectQcMaterialTreeList(materialGroup));
} }
@ -244,7 +244,7 @@ public class QuaController extends BaseController {
@GetMapping("/getCheckTypeProjectList") @GetMapping("/getCheckTypeProjectList")
public TableDataInfo list(QcCheckTypeProject qcCheckTypeProject) { public TableDataInfo list(QcCheckTypeProject qcCheckTypeProject) {
DynamicDataSourceContextHolder.push("ds_"+qcCheckTypeProject.getFactoryCode()); DynamicDataSourceContextHolder.push(qcCheckTypeProject.getFactoryCode());
startPage(); startPage();
List<QcCheckTypeProject> list = qcMaterialGroupService.getCheckTypeProjectList(qcCheckTypeProject); List<QcCheckTypeProject> list = qcMaterialGroupService.getCheckTypeProjectList(qcCheckTypeProject);
return getDataTable(list); return getDataTable(list);
@ -252,7 +252,7 @@ public class QuaController extends BaseController {
@GetMapping("/getUnqualifiedList") @GetMapping("/getUnqualifiedList")
public TableDataInfo getUnqualifiedList(QcCheckUnqualified qcCheckUnqualified) { public TableDataInfo getUnqualifiedList(QcCheckUnqualified qcCheckUnqualified) {
DynamicDataSourceContextHolder.push("ds_"+qcCheckUnqualified.getFactoryCode()); DynamicDataSourceContextHolder.push(qcCheckUnqualified.getFactoryCode());
startPage(); startPage();
qcCheckUnqualified.setDelFlag("0"); qcCheckUnqualified.setDelFlag("0");
List<QcCheckUnqualified> list = qcCheckUnqualifiedService.selectQcCheckUnqualifiedList(qcCheckUnqualified); List<QcCheckUnqualified> list = qcCheckUnqualifiedService.selectQcCheckUnqualifiedList(qcCheckUnqualified);
@ -262,7 +262,7 @@ public class QuaController extends BaseController {
/**获取来料工单列表**/ /**获取来料工单列表**/
@GetMapping("/getLLWorkOrder") @GetMapping("/getLLWorkOrder")
public TableDataInfo getLLWorkOrder(QcCheckTaskIncome qcCheckTaskIncome) { public TableDataInfo getLLWorkOrder(QcCheckTaskIncome qcCheckTaskIncome) {
DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskIncome.getFactoryCode()); DynamicDataSourceContextHolder.push(qcCheckTaskIncome.getFactoryCode());
startPage(); startPage();
List<QcCheckTaskIncome> list = qcCheckTaskIncomeService.getLLWorkOrder(qcCheckTaskIncome); List<QcCheckTaskIncome> list = qcCheckTaskIncomeService.getLLWorkOrder(qcCheckTaskIncome);
return getDataTable(list); return getDataTable(list);
@ -270,7 +270,7 @@ public class QuaController extends BaseController {
/**获取生产工单列表**/ /**获取生产工单列表**/
@GetMapping("/getWorkOrder") @GetMapping("/getWorkOrder")
public TableDataInfo getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome) { public TableDataInfo getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome) {
DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskIncome.getFactoryCode()); DynamicDataSourceContextHolder.push(qcCheckTaskIncome.getFactoryCode());
startPage(); startPage();
List<QcCheckTaskIncome> list = qcCheckTaskIncomeService.getWorkOrder(qcCheckTaskIncome); List<QcCheckTaskIncome> list = qcCheckTaskIncomeService.getWorkOrder(qcCheckTaskIncome);
return getDataTable(list); return getDataTable(list);
@ -278,7 +278,7 @@ public class QuaController extends BaseController {
@PutMapping("/getBatchList") @PutMapping("/getBatchList")
public List<QcCheckTaskIncome> getBatchList(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) { public List<QcCheckTaskIncome> getBatchList(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) {
DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskIncome.getFactoryCode()); DynamicDataSourceContextHolder.push(qcCheckTaskIncome.getFactoryCode());
return qcCheckTaskIncomeService.getBatchList(qcCheckTaskIncome); return qcCheckTaskIncomeService.getBatchList(qcCheckTaskIncome);
} }
} }

@ -57,6 +57,43 @@ public class QcCheckProject extends BaseEntity {
private String judge; private String judge;
private String defectLevel;
private String materialCode;
private String typeCode;
private String groupId;
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
public String getTypeCode() {
return typeCode;
}
public void setTypeCode(String typeCode) {
this.typeCode = typeCode;
}
public String getDefectLevel() {
return defectLevel;
}
public void setDefectLevel(String defectLevel) {
this.defectLevel = defectLevel;
}
public String getJudge() { public String getJudge() {
return judge; return judge;
} }

@ -62,4 +62,5 @@ public interface QcCheckProjectMapper {
public int deleteQcCheckProjectByIds(String[] ids); public int deleteQcCheckProjectByIds(String[] ids);
public QcCheckProject selectSerialNumber(); public QcCheckProject selectSerialNumber();
} }

@ -1,9 +1,6 @@
package com.op.quality.mapper; package com.op.quality.mapper;
import com.op.quality.domain.QcBomComponent; import com.op.quality.domain.*;
import com.op.quality.domain.QcCheckReportIncome;
import com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcSupplier;
import com.op.system.api.domain.SysUser; import com.op.system.api.domain.SysUser;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

@ -3,11 +3,13 @@ package com.op.quality.mapper;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.op.quality.domain.QcCheckProject;
import com.op.quality.domain.QcCheckTaskDetail; import com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcCheckTypeProject; import com.op.quality.domain.QcCheckTypeProject;
import com.op.system.api.domain.SysDictData; import com.op.system.api.domain.SysDictData;
import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* Mapper * Mapper
@ -72,4 +74,7 @@ public interface QcCheckTypeProjectMapper {
List<QcCheckTypeProject> getCheckTypeProjectList(QcCheckTypeProject qcCheckTypeProject); List<QcCheckTypeProject> getCheckTypeProjectList(QcCheckTypeProject qcCheckTypeProject);
@MapKey("dictValue") @MapKey("dictValue")
Map<String, SysDictData> getDictMap(SysDictData sysDictData); Map<String, SysDictData> getDictMap(SysDictData sysDictData);
List<QcCheckProject> getProjectInfoList(QcCheckProject qcCheckProject);
int insertQcCheckTypeProjects(@Param("list") List<QcCheckTypeProject> typeProjects);
} }

@ -71,4 +71,5 @@ public interface IQcCheckReportIncomeService {
List<QcCheckTaskDetail> getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail); List<QcCheckTaskDetail> getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail);
public List<QcCheckReportIncome> getPrintData(QcCheckReportIncome qcCheckReportIncome); public List<QcCheckReportIncome> getPrintData(QcCheckReportIncome qcCheckReportIncome);
} }

@ -1,6 +1,8 @@
package com.op.quality.service; package com.op.quality.service;
import java.util.List; import java.util.List;
import com.op.quality.domain.QcCheckProject;
import com.op.quality.domain.QcCheckTypeProject; import com.op.quality.domain.QcCheckTypeProject;
/** /**
@ -61,4 +63,7 @@ public interface IQcCheckTypeProjectService {
* *
*/ */
public int changeStatus(QcCheckTypeProject qcCheckTypeProject); public int changeStatus(QcCheckTypeProject qcCheckTypeProject);
List<QcCheckProject> getProjectInfoList(QcCheckProject qcCheckProject);
int submitProjects(List<QcCheckTypeProject> typeProjects);
} }

@ -196,6 +196,7 @@ public class QcCheckReportIncomeServiceImpl implements IQcCheckReportIncomeServi
} }
@Override @Override
@DS("#header.poolName")
public List<QcCheckReportIncome> getPrintData(QcCheckReportIncome qcCheckReportIncome) { public List<QcCheckReportIncome> getPrintData(QcCheckReportIncome qcCheckReportIncome) {
return null; return null;
} }

@ -321,7 +321,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
@Override @Override
public int commitCheckResults(List<QcCheckTaskDetail> details) { public int commitCheckResults(List<QcCheckTaskDetail> details) {
DynamicDataSourceContextHolder.push("ds_"+details.get(0).getFactoryCode()); DynamicDataSourceContextHolder.push(details.get(0).getFactoryCode());
Date nowTime = DateUtils.getNowDate(); Date nowTime = DateUtils.getNowDate();
String factoryCode = details.get(0).getFactoryCode(); String factoryCode = details.get(0).getFactoryCode();
String updateBy = details.get(0).getUpdateBy(); String updateBy = details.get(0).getUpdateBy();
@ -341,8 +341,9 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
QcCheckTaskIncome qcCheckTask = new QcCheckTaskIncome(); QcCheckTaskIncome qcCheckTask = new QcCheckTaskIncome();
qcCheckTask.setUpdateBy(updateBy); qcCheckTask.setUpdateBy(updateBy);
qcCheckTask.setRecordId(belongId); qcCheckTask.setRecordId(belongId);
qcCheckTask.setCheckResult("2");//检测状态0待检测1检测中2检测完成 qcCheckTask.setCheckStatus("2");//检测状态0待检测1检测中2检测完成
qcCheckTask.setUpdateTime(nowTime); qcCheckTask.setUpdateTime(nowTime);
qcCheckTask.setCheckTime(nowTime);
qcCheckTask.setCheckResult(result);//检验结果Y合格 N不合格 qcCheckTask.setCheckResult(result);//检验结果Y合格 N不合格
/**qc_check_task**/ /**qc_check_task**/
n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask); n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask);

@ -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 java.util.Map; import java.util.Map;
@ -8,6 +9,7 @@ import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils; import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils; import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.QcCheckProject;
import com.op.system.api.domain.SysDictData; import com.op.system.api.domain.SysDictData;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -131,4 +133,27 @@ public class QcCheckTypeProjectServiceImpl implements IQcCheckTypeProjectService
qcCheckTypeProject.setUpdateTime(DateUtils.getNowDate()); qcCheckTypeProject.setUpdateTime(DateUtils.getNowDate());
return qcCheckTypeProjectMapper.updateQcCheckTypeProject(qcCheckTypeProject); return qcCheckTypeProjectMapper.updateQcCheckTypeProject(qcCheckTypeProject);
} }
@Override
@DS("#header.poolName")
public List<QcCheckProject> getProjectInfoList(QcCheckProject qcCheckProject) {
return qcCheckTypeProjectMapper.getProjectInfoList(qcCheckProject);
}
@Override
@DS("#header.poolName")
public int submitProjects(List<QcCheckTypeProject> typeProjects) {
int m = 0;
Date nowTime = DateUtils.getNowDate();
String createBy = SecurityUtils.getUsername();
for(QcCheckTypeProject typeProject:typeProjects){
typeProject.setId(IdUtils.fastSimpleUUID());
typeProject.setCreateBy(createBy);
typeProject.setCreateTime(nowTime);
}
m = qcCheckTypeProjectMapper.insertQcCheckTypeProjects(typeProjects);
return m;
}
} }

@ -194,9 +194,11 @@ public class QcMaterialGroupServiceImpl implements IQcMaterialGroupService {
Map<String,SysDictData> dictMap = qcCheckTypeProjectMapper.getDictMap(sData); Map<String,SysDictData> dictMap = qcCheckTypeProjectMapper.getDictMap(sData);
if(dictMap != null){ if(dictMap != null){
for(QcCheckTypeProject dto:dtos){ for(QcCheckTypeProject dto:dtos){
if(StringUtils.isNotBlank(dto.getUnit())){
dto.setUnit(dictMap.get(dto.getUnit()).getDictLabel()); dto.setUnit(dictMap.get(dto.getUnit()).getDictLabel());
} }
} }
}
return dtos; return dtos;
} }

@ -126,7 +126,7 @@ public class QcProCheckServiceImpl implements QcProCheckService {
@Override @Override
public List<QcCheckTaskDetail> getCheckTaskDetailList(QcCheckTaskDetail qcCheckTaskDetail) { public List<QcCheckTaskDetail> getCheckTaskDetailList(QcCheckTaskDetail qcCheckTaskDetail) {
DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskDetail.getFactoryCode()); DynamicDataSourceContextHolder.push(qcCheckTaskDetail.getFactoryCode());
return qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail); return qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail);
} }

@ -22,13 +22,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="delFlag" column="del_flag" /> <result property="delFlag" column="del_flag" />
<result property="samplePlan" column="sample_plan" /> <result property="samplePlan" column="sample_plan" />
<result property="judge" column="judge" /> <result property="judge" column="judge" />
<result property="defectLevel" column="defect_level" />
</resultMap> </resultMap>
<sql id="selectQcCheckProjectVo"> <sql id="selectQcCheckProjectVo">
select id, order_num, rule_name, property_code, check_mode, check_tool, unit_code, check_standard, select id, order_num, rule_name, property_code, check_mode, check_tool, unit_code, check_standard,
attr1, create_by, create_time, update_by, update_time, factory_code, del_flag,sample_plan, attr1, create_by, create_time, update_by, update_time, factory_code, del_flag,sample_plan,
judge judge,defect_level
from qc_check_project from qc_check_project
</sql> </sql>
@ -74,6 +75,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">del_flag,</if> <if test="delFlag != null">del_flag,</if>
<if test="samplePlan != null">sample_plan,</if> <if test="samplePlan != null">sample_plan,</if>
<if test="judge != null">judge,</if> <if test="judge != null">judge,</if>
<if test="defectLevel != null">defect_level,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
@ -93,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">#{delFlag},</if> <if test="delFlag != null">#{delFlag},</if>
<if test="samplePlan != null">#{samplePlan},</if> <if test="samplePlan != null">#{samplePlan},</if>
<if test="judge != null">#{judge},</if> <if test="judge != null">#{judge},</if>
<if test="defectLevel != null">#{defectLevel},</if>
</trim> </trim>
</insert> </insert>
@ -115,6 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">del_flag = #{delFlag},</if> <if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="samplePlan != null">sample_plan = #{samplePlan},</if> <if test="samplePlan != null">sample_plan = #{samplePlan},</if>
<if test="judge != null">judge = #{judge},</if> <if test="judge != null">judge = #{judge},</if>
<if test="defectLevel != null">defect_level = #{defectLevel},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
@ -135,4 +140,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM qc_check_project FROM qc_check_project
WHERE CONVERT(varchar(10),create_time, 120) = CONVERT(varchar(10),GETDATE(), 120) WHERE CONVERT(varchar(10),create_time, 120) = CONVERT(varchar(10),GETDATE(), 120)
</select> </select>
</mapper> </mapper>

@ -152,8 +152,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT SELECT
ctp.id, ctp.id,
ctp.project_id projectId, ctp.project_id projectId,
cp.rule_name ruleName, qcp.rule_name ruleName,
cp.property_code propertyCode, qcp.property_code propertyCode,
ctp.type_id typeId, ctp.type_id typeId,
ct.check_name, ct.check_name,
ctp.standard_value standardValue, ctp.standard_value standardValue,
@ -166,11 +166,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
qcp.check_tool checkTool, qcp.check_tool checkTool,
qcp.check_mode checkMode qcp.check_mode checkMode
FROM qc_check_type_project ctp FROM qc_check_type_project ctp
LEFT JOIN qc_check_project cp ON ctp.project_id = cp.id LEFT JOIN qc_check_project qcp ON ctp.project_id = qcp.id
left join qc_check_type ct on ct.id = ctp.type_id left join qc_check_type ct on ct.id = ctp.type_id
left join base_product p on p.product_code = ctp.material_code left join base_product p on p.product_code = ctp.material_code
<where> <where>
AND ctp.del_flag = '0' AND cp.del_flag = '0' AND ctp.del_flag = '0' AND qcp.del_flag = '0'
<if test="groupId != null and groupId != ''"> and ctp.group_id = #{groupId}</if> <if test="groupId != null and groupId != ''"> and ctp.group_id = #{groupId}</if>
</where> </where>
order by ctp.type_id order by ctp.type_id
@ -231,6 +231,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sort != null">#{sort},</if> <if test="sort != null">#{sort},</if>
</trim> </trim>
</insert> </insert>
<insert id="insertQcCheckTypeProjects">
insert into qc_check_type_project(
id,project_id,project_no,type_id,
standard_value,upper_diff,down_diff,unit,
sample,sort,
create_by,create_time,
group_id,material_code,property_code
)values
<foreach collection="list" index="index" item="item" separator=",">
(
#{item.id},#{item.projectId},#{item.projectNo},#{item.typeId},
#{item.standardValue},#{item.upperDiff},#{item.downDiff},#{item.unit},
#{item.sample},#{item.sort},
#{item.createBy},#{item.createTime},
#{item.groupId},#{item.materialCode},#{item.propertyCode}
)
</foreach>
</insert>
<update id="updateQcCheckTypeProject" parameterType="QcCheckTypeProject"> <update id="updateQcCheckTypeProject" parameterType="QcCheckTypeProject">
update qc_check_type_project update qc_check_type_project
@ -270,4 +288,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="getProjectInfoList" resultType="com.op.quality.domain.QcCheckProject">
select
id,
order_num orderNum,
rule_name ruleName,
property_code propertyCode,
check_mode checkMode,
check_tool checkTool,
unit_code unitCode,
check_standard checkStandard,
sample_plan samplePlan,
judge ,
defect_level defectLevel
from qc_check_project
where del_flag = '0'
<if test="ruleName != null">and rule_name like concat('%',#{ruleName},'%') </if>
and id not in(
select project_id from qc_check_type_project
where type_id = #{typeCode}
<if test="samplePlan != null">and sample_plan = #{samplePlan}</if>
<if test="materialCode != null">and material_code = #{materialCode} </if>
)
</select>
</mapper> </mapper>

Loading…
Cancel
Save