工时改小时

master
zhaoxiaolin 1 year ago
parent 8bafb59937
commit b7c584af1d

@ -2,12 +2,13 @@ package com.op.quality.mapper;
import java.util.List;
import com.op.quality.domain.QcCheckTaskIncome;
import com.op.quality.domain.QcSampleRule;
import org.apache.ibatis.annotations.Mapper;
/**
* Mapper
*
*
* @author Open Platform
* @date 2023-12-28
*/
@ -15,7 +16,7 @@ import org.apache.ibatis.annotations.Mapper;
public interface QcSampleRuleMapper {
/**
*
*
*
* @param id
* @return
*/
@ -23,7 +24,7 @@ public interface QcSampleRuleMapper {
/**
*
*
*
* @param qcSampleRule
* @return
*/
@ -31,7 +32,7 @@ public interface QcSampleRuleMapper {
/**
*
*
*
* @param qcSampleRule
* @return
*/
@ -39,7 +40,7 @@ public interface QcSampleRuleMapper {
/**
*
*
*
* @param qcSampleRule
* @return
*/
@ -47,7 +48,7 @@ public interface QcSampleRuleMapper {
/**
*
*
*
* @param id
* @return
*/
@ -55,9 +56,11 @@ public interface QcSampleRuleMapper {
/**
*
*
*
* @param ids
* @return
*/
public int deleteQcSampleRuleByIds(String[] ids);
String getSampNum(QcCheckTaskIncome qcCheckTaskIncome);
}

@ -77,6 +77,9 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
@Autowired
private IQcCheckTaskDefectService qcCheckTaskDefectService;
@Autowired
private QcSampleRuleMapper qcSampleRuleMapper;
/**
*
*
@ -230,7 +233,12 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
}
}
qcCheckTaskIncome.setNoOkQuality(noOkQuality);
/**qc_sample_rule**/
String sampNum = qcSampleRuleMapper.getSampNum(qcCheckTaskIncome);
if(StringUtils.isNotBlank(sampNum)){
qcCheckTaskIncome.setSampleQuality(new BigDecimal(sampNum));
}
/**qc_check_task**/
qcCheckTaskIncomeMapper.insertQcCheckTaskIncome(qcCheckTaskIncome);
/**qc_check_task_detail**/

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.quality.mapper.QcSampleRuleMapper">
<resultMap type="QcSampleRule" id="QcSampleRuleResult">
<result property="id" column="id" />
<result property="startValue" column="start_value" />
@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectQcSampleRuleList" parameterType="QcSampleRule" resultMap="QcSampleRuleResult">
<include refid="selectQcSampleRuleVo"/>
<where>
<where>
<if test="startValue != null "> and start_value = #{startValue}</if>
<if test="endValue != null "> and end_value = #{endValue}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
@ -36,13 +36,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
</where>
</select>
<select id="selectQcSampleRuleById" parameterType="String" resultMap="QcSampleRuleResult">
<include refid="selectQcSampleRuleVo"/>
where id = #{id}
</select>
<insert id="insertQcSampleRule" parameterType="QcSampleRule">
<select id="getSampNum" resultType="java.lang.String">
select sample_quality
from qc_sample_rule
where end_value>= #{quality} and #{quality}>=start_value and del_flag = '0'
and check_type = #{checkType}
</select>
<insert id="insertQcSampleRule" parameterType="QcSampleRule">
insert into qc_sample_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
@ -100,9 +106,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteQcSampleRuleByIds" parameterType="String">
delete from qc_sample_rule where id in
delete from qc_sample_rule where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>

Loading…
Cancel
Save