|
@@ -3,6 +3,7 @@
|
|
<mapper namespace="com.jeeplus.test.materialManagement.wareHouse.mapper.WareHouseBasicMapper">
|
|
<mapper namespace="com.jeeplus.test.materialManagement.wareHouse.mapper.WareHouseBasicMapper">
|
|
<select id="findList" resultType="com.jeeplus.test.materialManagement.wareHouse.service.dto.WareHouseDto">
|
|
<select id="findList" resultType="com.jeeplus.test.materialManagement.wareHouse.service.dto.WareHouseDto">
|
|
SELECT
|
|
SELECT
|
|
|
|
+ b.id as purchaseId,
|
|
a.id,
|
|
a.id,
|
|
a.create_by,
|
|
a.create_by,
|
|
a.create_date,
|
|
a.create_date,
|
|
@@ -18,6 +19,7 @@
|
|
ifnull(a.status,'0') as status
|
|
ifnull(a.status,'0') as status
|
|
FROM
|
|
FROM
|
|
material_management_warehouse_basics a
|
|
material_management_warehouse_basics a
|
|
|
|
+ left join material_management_pruchase_request_basics b on a.purchase_no = b.purchase_no and b.del_flag = 0
|
|
left join sys_office so on a.handled_by_office = so.id
|
|
left join sys_office so on a.handled_by_office = so.id
|
|
left join sys_user sy on sy.id = a.handled_by
|
|
left join sys_user sy on sy.id = a.handled_by
|
|
${ew.customSqlSegment}
|
|
${ew.customSqlSegment}
|
|
@@ -40,13 +42,21 @@
|
|
c.ware_house_date,
|
|
c.ware_house_date,
|
|
so.name as wareHouseManOfficeName,
|
|
so.name as wareHouseManOfficeName,
|
|
sy.name as wareHouseManName,
|
|
sy.name as wareHouseManName,
|
|
- d.name as wareHouseTypeName
|
|
|
|
|
|
+ d.name as wareHouseTypeName,
|
|
|
|
+ b.trade_number as allNumber,
|
|
|
|
+ g.collect_number as borrowNumber
|
|
FROM
|
|
FROM
|
|
material_management_warehouse_summary a
|
|
material_management_warehouse_summary a
|
|
left join material_management_warehouse_detailed b on a.detailed_id = b.id and b.del_flag = 0
|
|
left join material_management_warehouse_detailed b on a.detailed_id = b.id and b.del_flag = 0
|
|
left join sys_user sy on sy.id = b.ware_house_man
|
|
left join sys_user sy on sy.id = b.ware_house_man
|
|
left join sys_office so on sy.office_id = so.id
|
|
left join sys_office so on sy.office_id = so.id
|
|
left join material_management_warehouse_basics c on b.basic_id = c.id and c.del_flag = 0
|
|
left join material_management_warehouse_basics c on b.basic_id = c.id and c.del_flag = 0
|
|
|
|
+
|
|
|
|
+ left join
|
|
|
|
+ (select collect_number,goods_name,status from material_management_collect_detailed e
|
|
|
|
+ left join material_management_collect_basics f on e.basic_id = f.id and f.del_flag = 0) g
|
|
|
|
+ on a.trade_name = g.goods_name and g.status = 5
|
|
|
|
+
|
|
left join cw_reimbursement_type_info d on a.ware_house_type = d.id
|
|
left join cw_reimbursement_type_info d on a.ware_house_type = d.id
|
|
${ew.customSqlSegment}
|
|
${ew.customSqlSegment}
|
|
ORDER BY a.update_date DESC
|
|
ORDER BY a.update_date DESC
|
|
@@ -54,4 +64,41 @@
|
|
<select id="findRequestId" resultType="java.lang.String">
|
|
<select id="findRequestId" resultType="java.lang.String">
|
|
select id from material_management_pruchase_request_basics where purchase_no = #{purchaseNo} and del_flag = 0
|
|
select id from material_management_pruchase_request_basics where purchase_no = #{purchaseNo} and del_flag = 0
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="wareHouseHistoryList"
|
|
|
|
+ resultType="com.jeeplus.test.materialManagement.wareHouse.service.dto.WareHouseDto">
|
|
|
|
+ SELECT
|
|
|
|
+ d.id as wareHouseId,
|
|
|
|
+ d.ware_house_number,
|
|
|
|
+ d.ware_house_name,
|
|
|
|
+ d.ware_house_date,
|
|
|
|
+ sy.name as wareHouseHandledBy,
|
|
|
|
+ so.name as wareHouseHandledByOff,
|
|
|
|
+ g.id as collectId,
|
|
|
|
+ g.collect_no,
|
|
|
|
+ g.goods_name,
|
|
|
|
+ sy2.name as collectHandleBy,
|
|
|
|
+ so2.name as collectHandleByOff,
|
|
|
|
+ g.collect_date
|
|
|
|
+ FROM
|
|
|
|
+ material_management_warehouse_summary a
|
|
|
|
+ left join
|
|
|
|
+ (SELECT b.id,trade_name,ware_house_number,ware_house_name,ware_house_date,handled_by,handled_by_office FROM
|
|
|
|
+ material_management_warehouse_basics b LEFT JOIN
|
|
|
|
+ material_management_warehouse_detailed c on b.id = c.basic_id and c.del_flag = 0) d
|
|
|
|
+ on a.trade_name = d.trade_name
|
|
|
|
+ left join
|
|
|
|
+ (select f.id,collect_no,goods_name,handled_by,handled_by_office,collect_date
|
|
|
|
+ from material_management_collect_detailed e
|
|
|
|
+ left join material_management_collect_basics f on e.basic_id = f.id and f.del_flag = 0) g
|
|
|
|
+ on a.trade_name = g.goods_name
|
|
|
|
+
|
|
|
|
+ left join sys_user sy on sy.id = d.handled_by
|
|
|
|
+ left join sys_office so on sy.office_id = so.id
|
|
|
|
+
|
|
|
|
+ left join sys_user sy2 on sy2.id = g.handled_by
|
|
|
|
+ left join sys_office so2 on sy2.office_id = so2.id
|
|
|
|
+
|
|
|
|
+ ${ew.customSqlSegment}
|
|
|
|
+ ORDER BY a.update_date DESC
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|