@ -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.ruoyi.manage.mapper.RecordOutMapper" >
<mapper namespace= "com.ruoyi.manage.mapper.RecordOutMapper" >
<resultMap type= "RecordOut" id= "RecordOutResult" >
<resultMap type= "RecordOut" id= "RecordOutResult" >
<result property= "objid" column= "objid" />
<result property= "objid" column= "objid" />
<result property= "epcCode" column= "epc_code" />
<result property= "epcCode" column= "epc_code" />
@ -12,13 +12,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property= "createBy" column= "create_by" />
<result property= "createBy" column= "create_by" />
<result property= "createTime" column= "create_time" />
<result property= "createTime" column= "create_time" />
</resultMap>
</resultMap>
<resultMap type= "RecordOutSort" id= "RecordOutSortResult" >
<resultMap type= "com.ruoyi.manage.domain.RecordOutSort" id= "RecordOutSortResult" >
<!-- <result property="objid" column="objid" /> -->
<result property= "locationCode" column= "location_code" />
<result property= "locationCode" column= "location_code" />
<!-- <result property="createTime" column="create_time" /> -->
<result property= "createTime" column= "create_time" />
<result property= "createTime" column= "createTime" />
<result property= "recordCount" column= "record_count" />
<result property= "recordCount" column= "record_count" />
<!-- <result property="remark" column="remark" /> -->
<!-- <result property="createBy" column="create_by" /> -->
</resultMap>
</resultMap>
<sql id= "selectRecordOutVo" >
<sql id= "selectRecordOutVo" >
select objid, epc_code, location_code, use_user, create_by, create_time from record_out
select objid, epc_code, location_code, use_user, create_by, create_time from record_out
@ -26,13 +24,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id= "selectRecordOutList" parameterType= "RecordOut" resultMap= "RecordOutResult" >
<select id= "selectRecordOutList" parameterType= "RecordOut" resultMap= "RecordOutResult" >
<include refid= "selectRecordOutVo" />
<include refid= "selectRecordOutVo" />
<where >
<where >
<if test= "epcCode != null and epcCode != ''" > and epc_code = #{epcCode}</if>
<if test= "epcCode != null and epcCode != ''" > and epc_code = #{epcCode}</if>
<if test= "locationCode != null and locationCode != ''" > and location_code = #{locationCode}</if>
<if test= "locationCode != null and locationCode != ''" > and location_code = #{locationCode}</if>
<if test= "useUser != null and useUser != ''" > and use_user = #{useUser}</if>
<if test= "useUser != null and useUser != ''" > and use_user = #{useUser}</if>
</where>
</where>
</select>
</select>
<select id= "selectRecordOutByObjid" parameterType= "Long" resultMap= "RecordOutResult" >
<select id= "selectRecordOutByObjid" parameterType= "Long" resultMap= "RecordOutResult" >
<include refid= "selectRecordOutVo" />
<include refid= "selectRecordOutVo" />
where objid = #{objid}
where objid = #{objid}
@ -84,10 +82,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
</delete>
<delete id= "deleteRecordOutByObjids" parameterType= "String" >
<delete id= "deleteRecordOutByObjids" parameterType= "String" >
delete from record_out where objid in
delete from record_out where objid in
<foreach item= "objid" collection= "array" open= "(" separator= "," close= ")" >
<foreach item= "objid" collection= "array" open= "(" separator= "," close= ")" >
#{objid}
#{objid}
</foreach>
</foreach>
</delete>
</delete>
<select id= "selectCountRecord" resultMap= "RecordOutSortResult" >
select date(create_time) as createTime, count(objid) as record_count
from record_out
<where >
<if test= "params.beginCheckTime != null and params.beginCheckTime != '' and params.endCheckTime != null and params.endCheckTime != ''" >
and create_time between #{params.beginCheckTime} and date( #{params.endCheckTime})+1
</if>
</where>
group by createTime;
</select>
<select id= "selectRecordOutChildList" resultMap= "RecordOutResult" parameterType= "RecordOut" >
select objid, epc_code, location_code, use_user, create_by, create_time from record_out
where date (create_time) = #{createTime}
</select>
</mapper>
</mapper>