zss
2023-09-20 97dea6f6d32e26d3d61db8467d0e208b498437bd
inspect-server/src/main/resources/mapper/RawInspectMapper.xml
@@ -3,6 +3,14 @@
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.mom.mapper.RawInspectMapper">
    <!--清空原材料检验结论-->
    <update id="updById">
        update mom_ocean.raw_inspect
        set ins_state=0,
            ins_time=null,
            judge_state=null
        where id = #{rawInspectId}
    </update>
    <select id="selCountRaw" resultType="java.lang.Integer">
        select count(id)
        from mom_ocean.raw_inspect
@@ -56,14 +64,15 @@
        <if test="name!=null and name!=''">
            and name like concat('%',#{name},'%')
        </if>
        ORDER BY id DESC
    </select>
    <!--根据原材料检验单id查看详情-->
    <resultMap id="oneMap" type="map">
        <id property="rcode" column="rcode"/>
        <id property="code" column="rcode"/>
        <result property="formTime" column="formTime"/>
        <result property="creatTime" column="creatTime"/>
        <result property="rname" column="rname"/>
        <result property="name" column="rname"/>
        <result property="specifications" column="specifications"/>
        <result property="runit" column="runit"/>
        <result property="number" column="number"/>
@@ -72,7 +81,7 @@
        <result property="userName" column="user_name"/>
        <collection property="children" resultMap="twoMap" javaType="List"/>
    </resultMap>
    <resultMap id="twoMap" type="map">
    <resultMap id="twoMap" type="Map">
        <id property="rpId" column="rpId"/>
        <result property="rpName" column="rpName"/>
        <result property="rpUnit" column="rpUnit"/>
@@ -80,7 +89,8 @@
        <result property="internal" column="internal"/>
        <result property="testValue" column="test_value"/>
        <result property="testState" column="test_state"/>
        <result property="devName" column="devName"/>
        <result property="deviceName" column="devName"/>
        <result property="deviceId" column="deviceId"/>
        <result property="uName" column="uName"/>
    </resultMap>
@@ -103,6 +113,7 @@
               test_value,
               test_state,
               device.name                            devName,
               device.`id`                            deviceId,
               user.name                              uName
        from mom_ocean.raw_ins_product rp
                 left join mom_ocean.raw_inspect r on rp.raw_inspect_id = r.id