kangwei: 补充丢失的查询方法
正在显示
1 个修改的文件
包含
57 行增加
和
0 行删除
... | @@ -2,6 +2,63 @@ | ... | @@ -2,6 +2,63 @@ |
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.skua.modules.erp.mapper.MaterialINMapper"> | 3 | <mapper namespace="com.skua.modules.erp.mapper.MaterialINMapper"> |
4 | 4 | ||
5 | <!--查询 入库单 --> | ||
6 | <select id="queryArrivalRecordByList" resultType="com.skua.modules.erp.vo.ArrivalRecordExcelExportVO"> | ||
7 | select d.depart_name, pc.contract_code 'purchaseContractCode', dc.contract_code 'distributContractCode' ,ss.sparepart_name,mi.* | ||
8 | from erp_material_in mi | ||
9 | left join sys_depart d on d.id = mi.depart_id | ||
10 | left join erp_purchase_contract pc on pc.id = mi.purchase_contract_id | ||
11 | left join erp_distribut_contract dc on dc.id = mi.distribut_contract_id | ||
12 | left join equipment_sparepart_supplies ss on ss.id = mi.supplier_id | ||
13 | <where> | ||
14 | mi.audit_status =3 | ||
15 | <if test="startTime != null and startTime !=''"> | ||
16 | and mi.arrive_time >= #{startTime} | ||
17 | </if> | ||
18 | <if test="endTime != null and endTime !=''"> | ||
19 | and mi.arrive_time <= #{endTime} | ||
20 | </if> | ||
21 | <if test="goodCode != null and goodCode !=''"> | ||
22 | and mi.good_code like CONCAT('',#{goodCode},'%') | ||
23 | </if> | ||
24 | <if test="sparepartName != null and sparepartName !=''"> | ||
25 | and mi.sparepart_name like CONCAT('%',#{sparepartName},'%') | ||
26 | </if> | ||
27 | <if test="departId != null and departId !=''"> | ||
28 | and mi.depart_id = #{departId} | ||
29 | </if> | ||
30 | <if test="supplierId != null and supplierId !=''"> | ||
31 | and mi.supplier_id = #{supplierId} | ||
32 | </if> | ||
33 | </where> | ||
34 | order by arrive_time desc | ||
35 | </select> | ||
36 | <!--获取入库审批列表:根据部门、采购合同、供应商、药剂分组搜索 --> | ||
37 | <select id="selectAuditMaterialINByPage" resultType="com.skua.modules.erp.vo.ArrivalRecordExcelExportVO"> | ||
38 | select sparepart_id , purchase_contract_id,depart_id ,supplier_id, | ||
39 | sum(purchase_num) 'purchase_num',measuring_unit,specification,sparepart_name,tax_amount, | ||
40 | purchase_price,distribut_price,sum(purchase_total_price) 'purchase_total_price',sum(distribut_total_price) 'distribut_total_price',sum(total_price_tax) 'total_price_tax' | ||
41 | from erp_material_in | ||
42 | <where> | ||
43 | audit_status =3 | ||
44 | <if test="materialIN.startTime != null and materialIN.startTime !=''"> | ||
45 | and arrive_time >= #{materialIN.startTime} | ||
46 | </if> | ||
47 | <if test="materialIN.endTime != null and materialIN.endTime !=''"> | ||
48 | and arrive_time <= #{materialIN.endTime} | ||
49 | </if> | ||
50 | <if test="materialIN.departId != null and materialIN.departId !=''"> | ||
51 | and depart_id = #{materialIN.departId} | ||
52 | </if> | ||
53 | <if test="materialIN.supplierId != null and materialIN.supplierId !=''"> | ||
54 | and supplier_id = #{materialIN.supplierId} | ||
55 | </if> | ||
56 | <if test="materialIN.purchaseContractId != null and materialIN.purchaseContractId !=''"> | ||
57 | and purchase_contract_id = #{materialIN.purchaseContractId} | ||
58 | </if> | ||
59 | </where> | ||
60 | group by sparepart_id,purchase_contract_id,depart_id,supplier_id | ||
61 | </select> | ||
5 | 62 | ||
6 | <select id="queryById" resultType="com.skua.modules.erp.entity.MaterialIN"> | 63 | <select id="queryById" resultType="com.skua.modules.erp.entity.MaterialIN"> |
7 | select d.depart_name 'departName', st.item_text 'sparepartTypeName', sm.supp_name 'supplierName', t.* from erp_material_in t | 64 | select d.depart_name 'departName', st.item_text 'sparepartTypeName', sm.supp_name 'supplierName', t.* from erp_material_in t | ... | ... |
-
请 注册 或 登录 后发表评论