2024-06-07 质量模块-抽样方案改版

master
A0010407 8 months ago
parent 67db458c5d
commit 52c9c41a6d

@ -17,12 +17,12 @@ private static final long serialVersionUID=1L;
/** id */ /** id */
private String id; private String id;
/** 样品量字码开始 */ /** 样品量字码 */
@Excel(name = "样品量字码开始") @Excel(name = "样品量字码")
private String sampleCode; private String sampleCode;
/** 样品量字码结束 */ /** 样品量字码结束 */
@Excel(name = "样品量字码结束") @Excel(name = "样品量字码")
private String sampleAql; private String sampleAql;
/** 预留字段1 */ /** 预留字段1 */

@ -17,6 +17,10 @@ private static final long serialVersionUID=1L;
/** id */ /** id */
private String id; private String id;
/** 检测水平 */
@Excel(name = "检测水平")
private String checkLevel;
/** 开始值 */ /** 开始值 */
@Excel(name = "开始值") @Excel(name = "开始值")
private Long startValue; private Long startValue;
@ -48,10 +52,6 @@ private static final long serialVersionUID=1L;
@Excel(name = "大节点") @Excel(name = "大节点")
private String typeCode; private String typeCode;
/** 检测水平 */
@Excel(name = "检测水平")
private String checkLevel;
public void setId(String id){ public void setId(String id){
this.id = id; this.id = id;
} }

@ -5,6 +5,7 @@ import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
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 org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.op.quality.mapper.QcSampleRuleAqlMapper; import com.op.quality.mapper.QcSampleRuleAqlMapper;
@ -56,6 +57,7 @@ public class QcSampleRuleAqlServiceImpl implements IQcSampleRuleAqlService {
@DS("#header.poolName") @DS("#header.poolName")
public int insertQcSampleRuleAql(QcSampleRuleAql qcSampleRuleAql) { public int insertQcSampleRuleAql(QcSampleRuleAql qcSampleRuleAql) {
qcSampleRuleAql.setCreateTime(DateUtils.getNowDate()); qcSampleRuleAql.setCreateTime(DateUtils.getNowDate());
qcSampleRuleAql.setCreateBy(SecurityUtils.getUsername());
qcSampleRuleAql.setId(IdUtils.fastSimpleUUID()); qcSampleRuleAql.setId(IdUtils.fastSimpleUUID());
return qcSampleRuleAqlMapper.insertQcSampleRuleAql(qcSampleRuleAql); return qcSampleRuleAqlMapper.insertQcSampleRuleAql(qcSampleRuleAql);
} }
@ -70,6 +72,7 @@ public class QcSampleRuleAqlServiceImpl implements IQcSampleRuleAqlService {
@DS("#header.poolName") @DS("#header.poolName")
public int updateQcSampleRuleAql(QcSampleRuleAql qcSampleRuleAql) { public int updateQcSampleRuleAql(QcSampleRuleAql qcSampleRuleAql) {
qcSampleRuleAql.setUpdateTime(DateUtils.getNowDate()); qcSampleRuleAql.setUpdateTime(DateUtils.getNowDate());
qcSampleRuleAql.setUpdateBy(SecurityUtils.getUsername());
return qcSampleRuleAqlMapper.updateQcSampleRuleAql(qcSampleRuleAql); return qcSampleRuleAqlMapper.updateQcSampleRuleAql(qcSampleRuleAql);
} }

@ -5,6 +5,7 @@ import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
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 org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.op.quality.mapper.QcSampleRuleCodeMapper; import com.op.quality.mapper.QcSampleRuleCodeMapper;
@ -57,6 +58,7 @@ public class QcSampleRuleCodeServiceImpl implements IQcSampleRuleCodeService {
public int insertQcSampleRuleCode(QcSampleRuleCode qcSampleRuleCode) { public int insertQcSampleRuleCode(QcSampleRuleCode qcSampleRuleCode) {
qcSampleRuleCode.setId(IdUtils.fastSimpleUUID()); qcSampleRuleCode.setId(IdUtils.fastSimpleUUID());
qcSampleRuleCode.setCreateTime(DateUtils.getNowDate()); qcSampleRuleCode.setCreateTime(DateUtils.getNowDate());
qcSampleRuleCode.setCreateBy(SecurityUtils.getUsername());
return qcSampleRuleCodeMapper.insertQcSampleRuleCode(qcSampleRuleCode); return qcSampleRuleCodeMapper.insertQcSampleRuleCode(qcSampleRuleCode);
} }
@ -70,6 +72,7 @@ public class QcSampleRuleCodeServiceImpl implements IQcSampleRuleCodeService {
@DS("#header.poolName") @DS("#header.poolName")
public int updateQcSampleRuleCode(QcSampleRuleCode qcSampleRuleCode) { public int updateQcSampleRuleCode(QcSampleRuleCode qcSampleRuleCode) {
qcSampleRuleCode.setUpdateTime(DateUtils.getNowDate()); qcSampleRuleCode.setUpdateTime(DateUtils.getNowDate());
qcSampleRuleCode.setUpdateBy(SecurityUtils.getUsername());
return qcSampleRuleCodeMapper.updateQcSampleRuleCode(qcSampleRuleCode); return qcSampleRuleCodeMapper.updateQcSampleRuleCode(qcSampleRuleCode);
} }

@ -152,13 +152,15 @@
<if test="aql26 != null "> <if test="aql26 != null ">
and aql26 = #{aql26} and aql26 = #{aql26}
</if> </if>
and del_flag = '0'
</where> </where>
order by sample_code asc
</select> </select>
<select id="selectQcSampleRuleAqlById" parameterType="String" <select id="selectQcSampleRuleAqlById" parameterType="String" resultMap="QcSampleRuleAqlResult">
resultMap="QcSampleRuleAqlResult">
<include refid="selectQcSampleRuleAqlVo"/> <include refid="selectQcSampleRuleAqlVo"/>
where id = #{id} where id = #{id}
and del_flag = '0'
</select> </select>
<insert id="insertQcSampleRuleAql" parameterType="QcSampleRuleAql"> <insert id="insertQcSampleRuleAql" parameterType="QcSampleRuleAql">
@ -446,14 +448,18 @@
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteQcSampleRuleAqlById" parameterType="String"> <update id="deleteQcSampleRuleAqlById" parameterType="String">
delete from qc_sample_rule_aql where id = #{id} update qc_sample_rule_aql
</delete> set del_flag = '1'
where id = #{id}
</update>
<delete id="deleteQcSampleRuleAqlByIds" parameterType="String"> <update id="deleteQcSampleRuleAqlByIds" parameterType="String">
delete from qc_sample_rule_aql where id in update qc_sample_rule_aql
set del_flag = '1'
where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </update>
</mapper> </mapper>

@ -52,14 +52,16 @@
<if test="checkLevel != null and checkLevel != ''"> <if test="checkLevel != null and checkLevel != ''">
and check_level = #{checkLevel} and check_level = #{checkLevel}
</if> </if>
and del_flag = '0'
</where> </where>
order by check_level order by check_level,start_value,end_value
</select> </select>
<select id="selectQcSampleRuleCodeById" parameterType="String" <select id="selectQcSampleRuleCodeById" parameterType="String"
resultMap="QcSampleRuleCodeResult"> resultMap="QcSampleRuleCodeResult">
<include refid="selectQcSampleRuleCodeVo"/> <include refid="selectQcSampleRuleCodeVo"/>
where id = #{id} where id = #{id}
and del_flag = '0'
</select> </select>
<insert id="insertQcSampleRuleCode" parameterType="QcSampleRuleCode"> <insert id="insertQcSampleRuleCode" parameterType="QcSampleRuleCode">
@ -172,14 +174,18 @@
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteQcSampleRuleCodeById" parameterType="String"> <update id="deleteQcSampleRuleCodeById" parameterType="String">
delete from qc_sample_rule_code where id = #{id} update qc_sample_rule_code
</delete> set del_flag = '1'
where id = #{id}
</update>
<delete id="deleteQcSampleRuleCodeByIds" parameterType="String"> <update id="deleteQcSampleRuleCodeByIds" parameterType="String">
delete from qc_sample_rule_code where id in update qc_sample_rule_code
set del_flag = '1'
where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </update>
</mapper> </mapper>

Loading…
Cancel
Save