You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
8.4 KiB
138 lines
8.4 KiB
<?xml version="1.0" encoding="UTF-8"?> |
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
<mapper namespace="jnpf.mapper.TBookGoWhereMapper"> |
|
|
|
<resultMap type="jnpf.entity.TBookGoWhere" id="TBookGoWhereMap"> |
|
<result property="id" column="ID" jdbcType="INTEGER"/> |
|
<result property="bookNumber" column="book_number" jdbcType="VARCHAR"/> |
|
<result property="targetName" column="target_name" jdbcType="VARCHAR"/> |
|
<result property="type" column="type" jdbcType="VARCHAR"/> |
|
<result property="relationId" column="relation_id" jdbcType="VARCHAR"/> |
|
<result property="shouldSend" column="should_send" jdbcType="INTEGER"/> |
|
<result property="actualSend" column="actual_send" jdbcType="INTEGER"/> |
|
<result property="warehouseEntryFlag" column="warehouse_entry_flag" jdbcType="VARCHAR"/> |
|
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/> |
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/> |
|
<result property="createName" column="create_name" jdbcType="VARCHAR"/> |
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/> |
|
<result property="updateName" column="update_name" jdbcType="VARCHAR"/> |
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
|
<result property="createCorpName" column="create_corp_name" jdbcType="VARCHAR"/> |
|
<result property="createCorpId" column="create_corp_id" jdbcType="VARCHAR"/> |
|
<result property="createDeptName" column="create_dept_name" jdbcType="VARCHAR"/> |
|
<result property="createDeptId" column="create_dept_id" jdbcType="VARCHAR"/> |
|
</resultMap> |
|
|
|
<sql id="Base_Column_List" > |
|
f_ID as ID, f_book_number as book_number, f_target_name as target_name, f_order_type as order_type, f_type as type, f_relation_id as relation_id, f_should_send as should_send, f_actual_send as actual_send, f_warehouse_entry_flag as warehouse_entry_flag, f_del_flag as del_flag, f_create_by as create_by, f_create_name as create_name, f_create_time as create_time, f_update_by as update_by, f_update_name as update_name, f_update_time as update_time, f_create_corp_name as create_corp_name, f_create_corp_id as create_corp_id, f_create_dept_name as create_dept_name, f_create_dept_id as create_dept_id </sql> |
|
<!--查询指定行数据--> |
|
<select id="selectPage" resultMap="TBookGoWhereMap"> |
|
select |
|
f_ID as ID, f_book_number as book_number, f_target_name as target_name, f_order_type as order_type, f_type as type, f_relation_id as relation_id, f_should_send as should_send, f_actual_send as actual_send, f_warehouse_entry_flag as warehouse_entry_flag, f_del_flag as del_flag, f_create_by as create_by, f_create_name as create_name, f_create_time as create_time, f_update_by as update_by, f_update_name as update_name, f_update_time as update_time, f_create_corp_name as create_corp_name, f_create_corp_id as create_corp_id, f_create_dept_name as create_dept_name, f_create_dept_id as create_dept_id from t_book_go_where |
|
<where> |
|
<if test="params.id != null"> |
|
and f_ID = #{params.id} |
|
</if> |
|
<if test="params.bookNumber != null and params.bookNumber != ''"> |
|
and f_book_number = #{params.bookNumber} |
|
</if> |
|
<if test="params.targetName != null and params.targetName != ''"> |
|
and f_target_name = #{params.targetName} |
|
</if> |
|
<if test="params.shouldSend != null"> |
|
and f_should_send = #{params.shouldSend} |
|
</if> |
|
<if test="params.actualSend != null"> |
|
and f_actual_send = #{params.actualSend} |
|
</if> |
|
<if test="params.warehouseEntryFlag != null and params.warehouseEntryFlag != ''"> |
|
and f_warehouse_entry_flag = #{params.warehouseEntryFlag} |
|
</if> |
|
<if test="params.delFlag != null and params.delFlag != ''"> |
|
and f_del_flag = #{params.delFlag} |
|
</if> |
|
<if test="params.createBy != null and params.createBy != ''"> |
|
and create_by = #{params.createBy} |
|
</if> |
|
<if test="params.createName != null and params.createName != ''"> |
|
and f_create_name = #{params.createName} |
|
</if> |
|
<if test="params.createTime != null"> |
|
and f_create_time = #{params.createTime} |
|
</if> |
|
<if test="params.updateBy != null and params.updateBy != ''"> |
|
and f_update_by = #{params.updateBy} |
|
</if> |
|
<if test="params.updateName != null and params.updateName != ''"> |
|
and f_update_name = #{params.updateName} |
|
</if> |
|
<if test="params.updateTime != null"> |
|
and f_update_time = #{params.updateTime} |
|
</if> |
|
<if test="params.createCorpName != null and params.createCorpName != ''"> |
|
and f_create_corp_name = #{params.createCorpName} |
|
</if> |
|
<if test="params.createCorpId != null and params.createCorpId != ''"> |
|
and f_create_corp_id = #{params.createCorpId} |
|
</if> |
|
<if test="params.createDeptName != null and params.createDeptName != ''"> |
|
and f_create_dept_name = #{params.createDeptName} |
|
</if> |
|
<if test="params.createDeptId != null and params.createDeptId != ''"> |
|
and f_create_dept_id = #{params.createDeptId} |
|
</if> |
|
<if test="params.createTimes != null"> |
|
and f_create_time >= #{params.createTimes[0]} |
|
and f_create_time <= #{params.createTimes[1]} |
|
</if> |
|
<if test="params.updateTimes != null"> |
|
and f_update_time >= #{params.updateTimes[0]} |
|
and f_update_time <= #{params.updateTimes[1]} |
|
</if> |
|
</where> |
|
</select> |
|
|
|
<resultMap type="jnpf.model.dto.ReceiveGoodsMainDto$TBookGoWhereEntity" id="TBookGoWhereStackingInformationMap"> |
|
<result property="id" column="ID" jdbcType="INTEGER"/> |
|
<result property="bookNumber" column="book_number" jdbcType="VARCHAR"/> |
|
<result property="targetName" column="target_name" jdbcType="VARCHAR"/> |
|
<result property="type" column="type" jdbcType="VARCHAR"/> |
|
<result property="relationId" column="relation_id" jdbcType="VARCHAR"/> |
|
<result property="shouldSend" column="should_send" jdbcType="INTEGER"/> |
|
<result property="actualSend" column="actual_send" jdbcType="INTEGER"/> |
|
<result property="warehouseEntryFlag" column="warehouse_entry_flag" jdbcType="VARCHAR"/> |
|
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/> |
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/> |
|
<result property="createName" column="create_name" jdbcType="VARCHAR"/> |
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/> |
|
<result property="updateName" column="update_name" jdbcType="VARCHAR"/> |
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
|
<result property="createCorpName" column="create_corp_name" jdbcType="VARCHAR"/> |
|
<result property="createCorpId" column="create_corp_id" jdbcType="VARCHAR"/> |
|
<result property="createDeptName" column="create_dept_name" jdbcType="VARCHAR"/> |
|
<result property="createDeptId" column="create_dept_id" jdbcType="VARCHAR"/> |
|
</resultMap> |
|
<select id="getStackingInformation" resultMap="TBookGoWhereStackingInformationMap"> |
|
select f_target_name as target_name,sum(f_should_send) should_send,sum(f_actual_send) actual_send |
|
from t_book_go_where |
|
where f_book_number = #{bookNumber} |
|
and f_warehouse_entry_flag = '0' |
|
and f_del_flag = '0' |
|
and f_type = '0' |
|
and f_create_corp_id=#{corpId} |
|
group by f_target_name |
|
</select> |
|
|
|
|
|
<select id="getStackingInformationByRelationId" resultMap="TBookGoWhereStackingInformationMap"> |
|
select <include refid="Base_Column_List"/> |
|
from t_book_go_where |
|
where f_relation_id = #{id} |
|
and f_book_number = #{bookNumber} |
|
and f_warehouse_entry_flag = '1' |
|
and f_del_flag = '0' |
|
and f_type = '1' |
|
</select> |
|
</mapper>
|
|
|