Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
b557fda9
由
康伟
编写于
2025-01-09 09:21:06 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei: 补充丢失的查询方法
1 个父辈
dfc2c0c0
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
57 行增加
和
0 行删除
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/MaterialINMapper.xml
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/MaterialINMapper.xml
查看文件 @
b557fda
...
...
@@ -2,6 +2,63 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.skua.modules.erp.mapper.MaterialINMapper"
>
<!--查询 入库单 -->
<select
id=
"queryArrivalRecordByList"
resultType=
"com.skua.modules.erp.vo.ArrivalRecordExcelExportVO"
>
select d.depart_name, pc.contract_code 'purchaseContractCode', dc.contract_code 'distributContractCode' ,ss.sparepart_name,mi.*
from erp_material_in mi
left join sys_depart d on d.id = mi.depart_id
left join erp_purchase_contract pc on pc.id = mi.purchase_contract_id
left join erp_distribut_contract dc on dc.id = mi.distribut_contract_id
left join equipment_sparepart_supplies ss on ss.id = mi.supplier_id
<where>
mi.audit_status =3
<if
test=
"startTime != null and startTime !=''"
>
and mi.arrive_time
>
= #{startTime}
</if>
<if
test=
"endTime != null and endTime !=''"
>
and mi.arrive_time
<
= #{endTime}
</if>
<if
test=
"goodCode != null and goodCode !=''"
>
and mi.good_code like CONCAT('',#{goodCode},'%')
</if>
<if
test=
"sparepartName != null and sparepartName !=''"
>
and mi.sparepart_name like CONCAT('%',#{sparepartName},'%')
</if>
<if
test=
"departId != null and departId !=''"
>
and mi.depart_id = #{departId}
</if>
<if
test=
"supplierId != null and supplierId !=''"
>
and mi.supplier_id = #{supplierId}
</if>
</where>
order by arrive_time desc
</select>
<!--获取入库审批列表:根据部门、采购合同、供应商、药剂分组搜索 -->
<select
id=
"selectAuditMaterialINByPage"
resultType=
"com.skua.modules.erp.vo.ArrivalRecordExcelExportVO"
>
select sparepart_id , purchase_contract_id,depart_id ,supplier_id,
sum(purchase_num) 'purchase_num',measuring_unit,specification,sparepart_name,tax_amount,
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'
from erp_material_in
<where>
audit_status =3
<if
test=
"materialIN.startTime != null and materialIN.startTime !=''"
>
and arrive_time
>
= #{materialIN.startTime}
</if>
<if
test=
"materialIN.endTime != null and materialIN.endTime !=''"
>
and arrive_time
<
= #{materialIN.endTime}
</if>
<if
test=
"materialIN.departId != null and materialIN.departId !=''"
>
and depart_id = #{materialIN.departId}
</if>
<if
test=
"materialIN.supplierId != null and materialIN.supplierId !=''"
>
and supplier_id = #{materialIN.supplierId}
</if>
<if
test=
"materialIN.purchaseContractId != null and materialIN.purchaseContractId !=''"
>
and purchase_contract_id = #{materialIN.purchaseContractId}
</if>
</where>
group by sparepart_id,purchase_contract_id,depart_id,supplier_id
</select>
<select
id=
"queryById"
resultType=
"com.skua.modules.erp.entity.MaterialIN"
>
select d.depart_name 'departName', st.item_text 'sparepartTypeName', sm.supp_name 'supplierName', t.* from erp_material_in t
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论