质量-检测项目检验修改

orign^2
zhaoxiaolin 1 year ago
parent aa95f14f67
commit b4f86d97a0

@ -100,9 +100,10 @@ public class QcCheckTypeProjectController extends BaseController {
/**
*
*/
@Log(title = "物料检验项目维护", businessType = BusinessType.UPDATE)
@Log(title = "修改数据状态", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody QcCheckTypeProject qcCheckTypeProject) {
return toAjax(qcCheckTypeProjectService.changeStatus(qcCheckTypeProject));
}
}

@ -78,14 +78,14 @@ public class QcCheckTypeProject extends BaseEntity {
private String checkTool;
private String checkMode;
private String uint;
private String unit;
public String getUint() {
return uint;
public String getUnit() {
return unit;
}
public void setUint(String uint) {
this.uint = uint;
public void setUnit(String unit) {
this.unit = unit;
}
public String getCheckTool() {

@ -59,8 +59,8 @@ public class QcCheckTypeProjectServiceImpl implements IQcCheckTypeProjectService
Map<String,SysDictData> dictMap = qcCheckTypeProjectMapper.getDictMap(sData);
if(dictMap != null){
for(QcCheckTypeProject dto:dtos){
if(StringUtils.isNotBlank(dto.getUint())){
dto.setUint(dictMap.get(dto.getUint()).getDictLabel());
if(StringUtils.isNotBlank(dto.getUnit())){
dto.setUnit(dictMap.get(dto.getUnit()).getDictLabel());
}
}

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

@ -29,6 +29,7 @@ public class QcUserMaterialServiceImpl implements IQcUserMaterialService {
@Autowired
private QcUserMaterialMapper qcUserMaterialMapper;
@Override
@DS("master")
public List<QcUserMaterial> selectUserList(QcUserMaterial qcUserMaterial) {
return qcUserMaterialMapper.selectUserList( qcUserMaterial);
}

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.quality.mapper.QcCheckTypeProjectMapper">
<resultMap type="QcCheckTypeProject" id="QcCheckTypeProjectResult">
<resultMap type="com.op.quality.domain.QcCheckTypeProject" id="QcCheckTypeProjectResult">
<result property="id" column="id" />
<result property="projectId" column="project_id" />
<result property="typeId" column="type_id" />
@ -23,11 +23,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="groupId" column="group_id" />
<result property="materialCode" column="material_code" />
<result property="sampleNum" column="sample_num" />
<result property="unit" column="unit" />
<result property="propertyCode" column="property_code" />
<result property="ruleName" column="rule_name" />
<result property="sort" column="sort" />
</resultMap>
<sql id="selectQcCheckTypeProjectVo">
select id, project_id, type_id, standard_value, upper_diff, down_diff, sample, status, attr1,
create_by, create_time, update_by, update_time, factory_code, del_flag, group_id, material_code, sample_num
create_by, create_time, update_by, update_time, factory_code, del_flag, group_id,
material_code, sample_num,unit,sort
from qc_check_type_project
</sql>
@ -35,8 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT
ctp.id,
ctp.project_id,
cp.rule_name ruleName,
cp.property_code propertyCode,
cp.rule_name,
cp.property_code,
cp.unit_code unit,
ctp.type_id,
ctp.standard_value,
ctp.upper_diff,
@ -51,7 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ctp.del_flag,
ctp.group_id,
ctp.material_code,
ctp.sample_num
ctp.sample_num,
ctp.sort
FROM qc_check_type_project ctp
LEFT JOIN qc_check_project cp ON ctp.project_id = cp.id AND cp.del_flag = '0'
<where>
@ -68,14 +75,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sampleNum != null and sampleNum != ''"> and ctp.sample_num = #{sampleNum}</if>
<if test="ruleName != null and ruleName != ''"> and cp.rule_name like concat('%', #{ruleName}, '%')</if>
</where>
order by ctp.sort
</select>
<select id="selectQcCheckTypeProjectById" parameterType="String" resultMap="QcCheckTypeProjectResult">
SELECT
ctp.id,
ctp.project_id,
cp.rule_name ruleName,
cp.property_code propertyCode,
cp.rule_name,
cp.property_code,
ctp.type_id,
ctp.standard_value,
ctp.upper_diff,
@ -90,7 +98,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ctp.del_flag,
ctp.group_id,
ctp.material_code,
ctp.sample_num
ctp.sample_num,
ctp.sort
FROM qc_check_type_project ctp
LEFT JOIN qc_check_project cp ON ctp.project_id = cp.id AND cp.del_flag = '0'
WHERE ctp.del_flag ='0' AND ctp.id = #{id}
@ -192,7 +201,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="groupId != null">group_id,</if>
<if test="materialCode != null">material_code,</if>
<if test="sampleNum != null">sample_num,</if>
<if test="projectNo != null">project_no</if>
<if test="projectNo != null">project_no,</if>
<if test="unit != null">unit,</if>
<if test="propertyCode != null">property_code,</if>
<if test="sort != null">sort,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -213,7 +225,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="groupId != null">#{groupId},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="sampleNum != null">#{sampleNum},</if>
<if test="projectNo != null">#{projectNo}</if>
<if test="projectNo != null">#{projectNo},</if>
<if test="unit != null">#{unit},</if>
<if test="propertyCode != null">#{propertyCode},</if>
<if test="sort != null">#{sort},</if>
</trim>
</insert>
@ -238,6 +253,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="sampleNum != null">sample_num = #{sampleNum},</if>
<if test="projectNo != null">project_no = #{projectNo}</if>
<if test="unit != null">unit = #{unit},</if>
<if test="propertyCode != null">property_code = #{propertyCode},</if>
<if test="sort != null">sort = #{sort},</if>
</trim>
where id = #{id}
</update>

Loading…
Cancel
Save