工时改小时

master
zhaoxiaolin 1 year ago
parent 8bafb59937
commit b7c584af1d

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

@ -77,6 +77,9 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
@Autowired @Autowired
private IQcCheckTaskDefectService qcCheckTaskDefectService; private IQcCheckTaskDefectService qcCheckTaskDefectService;
@Autowired
private QcSampleRuleMapper qcSampleRuleMapper;
/** /**
* *
* *
@ -230,7 +233,12 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
} }
} }
qcCheckTaskIncome.setNoOkQuality(noOkQuality); 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); qcCheckTaskIncomeMapper.insertQcCheckTaskIncome(qcCheckTaskIncome);
/**qc_check_task_detail**/ /**qc_check_task_detail**/

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

Loading…
Cancel
Save