Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
da332013
由
康伟
编写于
2025-01-13 11:56:46 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei: 扩展:统购合同选中水务公司,分销合同使用水厂,根据货号查询水厂以及水厂所属水务公司的物料信息
1 个父辈
3a09e4eb
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
21 行增加
和
9 行删除
sk-module-biz/src/main/java/com/skua/modules/erp/controller/DistributContractController.java
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/PurchaseMaterialMapper.java
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/PurchaseMaterialMapper.xml
sk-module-biz/src/main/java/com/skua/modules/erp/service/IPurchaseMaterialService.java
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/PurchaseMaterialServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/erp/controller/DistributContractController.java
查看文件 @
da33201
...
...
@@ -26,6 +26,9 @@ import com.skua.modules.erp.service.IPurchaseMaterialService;
import
com.skua.modules.erp.vo.DistributContractVO
;
import
com.skua.modules.erp.vo.MaterialSearchVO
;
import
com.skua.modules.guest.util.DateUtil
;
import
com.skua.modules.system.entity.SysDepart
;
import
com.skua.modules.system.service.ISysDepartService
;
import
com.skua.tool.util.JSUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.jeecgframework.poi.excel.ExcelImportUtil
;
...
...
@@ -54,6 +57,9 @@ public class DistributContractController {
@Autowired
private
IDistributContractTempService
distributContractTempService
;
@Autowired
private
ISysDepartService
departService
;
@AutoLog
(
value
=
"erp分销合同-分页列表查询"
)
@ApiOperation
(
value
=
"erp分销合同-分页列表查询"
,
notes
=
"erp分销合同-分页列表查询"
)
@GetMapping
(
value
=
"/list"
)
...
...
@@ -256,7 +262,13 @@ public class DistributContractController {
@GetMapping
(
value
=
"/queryMaterialByGoodCode"
)
public
Result
<
PurchaseMaterial
>
queryMaterialByGoodCode
(
MaterialSearchVO
materialSearchVO
)
{
Result
<
PurchaseMaterial
>
result
=
new
Result
<
PurchaseMaterial
>();
List
<
PurchaseMaterial
>
purchaseMaterialList
=
purchaseMaterialService
.
queryMaterialByGoodCode
(
materialSearchVO
.
getGoodCode
(),
materialSearchVO
.
getDepartId
());
SysDepart
sysDepart
=
departService
.
getById
(
materialSearchVO
.
getDepartId
());
String
departIds
=
materialSearchVO
.
getDepartId
();
if
(
sysDepart
!=
null
){
departIds
+=
","
+
sysDepart
.
getParentId
();
}
List
<
PurchaseMaterial
>
purchaseMaterialList
=
purchaseMaterialService
.
queryMaterialByGoodCode
(
materialSearchVO
.
getGoodCode
(),
JSUtils
.
quoteEach
(
departIds
,
","
));
if
(
purchaseMaterialList
!=
null
&&
!
purchaseMaterialList
.
isEmpty
()){
result
.
setSuccess
(
true
);
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/PurchaseMaterialMapper.java
查看文件 @
da33201
...
...
@@ -45,10 +45,10 @@ public interface PurchaseMaterialMapper extends BaseMapper<PurchaseMaterial> {
/***
* 根据货号查询采购合同物料清单
* @param goodCode
* @param departId
* @param departId
s
* @return
*/
List
<
PurchaseMaterial
>
queryMaterialByGoodCode
(
@Param
(
"goodCode"
)
String
goodCode
,
@Param
(
"departId"
)
String
departId
);
List
<
PurchaseMaterial
>
queryMaterialByGoodCode
(
@Param
(
"goodCode"
)
String
goodCode
,
@Param
(
"departId
s
"
)
String
departId
);
/***
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/PurchaseMaterialMapper.xml
查看文件 @
da33201
...
...
@@ -40,7 +40,7 @@
from (
select m.* from erp_purchase_material m , erp_purchase_contract c
where m.contract_id = c.id and c.status = 3 and c.use_flag = '0' and c.start_time
<
= now() and c.end_time
>
= now()
and m.good_code = #{goodCode} and m.depart_id
= #{departId}
and m.good_code = #{goodCode} and m.depart_id
in(${departIds})
) pm
left join equipment_sparepart_type st on st.id = pm.sparepart_type
left join ajh_supplier_manage sm on sm.id = pm.supplier_id
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/IPurchaseMaterialService.java
查看文件 @
da33201
...
...
@@ -28,10 +28,10 @@ public interface IPurchaseMaterialService extends IService<PurchaseMaterial> {
/***
* 根据货号查询采购合同物料清单
* @param goodCode
* @param departId
* @param departId
s
* @return
*/
List
<
PurchaseMaterial
>
queryMaterialByGoodCode
(
String
goodCode
,
String
departId
);
List
<
PurchaseMaterial
>
queryMaterialByGoodCode
(
String
goodCode
,
String
departId
s
);
/**
* 药剂入库查询结果:采购物料清单+分销单价+分销总价
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/PurchaseMaterialServiceImpl.java
查看文件 @
da33201
...
...
@@ -32,11 +32,11 @@ public class PurchaseMaterialServiceImpl extends ServiceImpl<PurchaseMaterialMap
/***
* 根据货号查询采购合同物料清单
* @param goodCode
* @param departId
* @param departId
s
* @return
*/
public
List
<
PurchaseMaterial
>
queryMaterialByGoodCode
(
String
goodCode
,
String
departId
){
return
this
.
baseMapper
.
queryMaterialByGoodCode
(
goodCode
,
departId
);
public
List
<
PurchaseMaterial
>
queryMaterialByGoodCode
(
String
goodCode
,
String
departId
s
){
return
this
.
baseMapper
.
queryMaterialByGoodCode
(
goodCode
,
departId
s
);
}
/**
* 药剂入库查询结果:采购物料清单+分销单价+分销总价
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论