Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
57ef9988
由
康伟
编写于
2024-11-28 17:39:28 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei:药剂结算对接,
供应商详细页面
1 个父辈
0614bc3c
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
22 行增加
和
11 行删除
sk-base-common/src/main/java/com/skua/modules/alarmtmp/entity/AlarmCustomRuleType.java
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/ErpSettlementItemMapper.xml
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/ErpSettlementServiceImpl.java
sk-base-common/src/main/java/com/skua/modules/alarmtmp/entity/AlarmCustomRuleType.java
查看文件 @
57ef998
package
com
.
skua
.
modules
.
alarmtmp
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
...
...
@@ -11,8 +8,6 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
/**
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/ErpSettlementItemMapper.xml
查看文件 @
57ef998
...
...
@@ -7,21 +7,22 @@
</delete>
<!-- 结算单详情:供应商-->
<select
id=
"queryListBySupplier"
resultType=
"com.skua.modules.erp.vo.ErpSettlementItemVO"
>
select d.depart_name,
pc.project_name, pc.contract_nam
e, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, pm.good_brand , pm.good_origin, si.*
select d.depart_name,
sm.supp_name supplierName,pc.project_name, pc.contract_name,pc.contract_cod
e, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, pm.good_brand , pm.good_origin, si.*
from erp_settlement_item si
left join sys_depart d on d.id = si.depart_id
left join erp_purchase_material pm on (pm.contract_id =si.purchase_contract_id and pm.good_code = si.good_code )
left join erp_material_acceptance_form mf on mf.id = si.id
left join erp_material_acceptance_form mf on mf.id = si.
material_in_
id
left join erp_purchase_contract pc on si.purchase_contract_id = pc.id
left join ajh_supplier_manage sm on sm.id = pm.supplier_id
where si.settlement_id = #{settlementId}
</select>
<!-- 结算单详情:水厂-->
<select
id=
"queryListByWaterDepart"
resultType=
"com.skua.modules.erp.vo.ErpSettlementItemVO"
>
select d.depart_name, dc.contract_name ,dc.project_name, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, pm.good_brand , pm.good_origin, si.*
select d.depart_name, dc.contract_name ,dc.project_name,
dc.contract_code,
mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, pm.good_brand , pm.good_origin, si.*
from erp_settlement_item si
left join sys_depart d on d.id = si.depart_id
left join erp_purchase_material pm on (pm.contract_id =si.purchase_contract_id and pm.good_code = si.good_code )
left join erp_material_acceptance_form mf on mf.id = si.
id
left join erp_material_acceptance_form mf on mf.id = si.material_in_
id
left join erp_distribut_contract dc on si.distribut_contract_id = dc.id
where si.settlement_id = #{settlementId}
</select>
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/ErpSettlementServiceImpl.java
查看文件 @
57ef998
...
...
@@ -41,6 +41,10 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
private
ErpSettlementItemMapper
settlementItemMapper
;
@Autowired
private
ICommonSqlService
commonSqlService
;
@Autowired
private
SupplierManageMapper
supplierManageMapper
;
@Autowired
private
SysDepartMapper
departMapper
;
/**
* 新增结算单
* @param erpSettlementVO
...
...
@@ -77,16 +81,23 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
//根据编号查询结算单
public
ErpSettlementVO
queryById
(
String
id
){
ErpSettlementVO
erpSettlementVO
=
new
ErpSettlementVO
();
ErpSettlement
erpSettlement
=
this
.
baseMapper
.
selectById
(
id
);
List
<
ErpSettlementItemVO
>
settlementItemList
=
null
;
if
(
"0"
.
equals
(
erpSettlement
.
getSettlementType
())){
//供应商
if
(
StringUtils
.
isNotEmpty
(
erpSettlement
.
getSupplierId
())){
erpSettlementVO
.
setSupplierName
(
supplierManageMapper
.
selectById
(
erpSettlement
.
getSupplierId
()).
getSuppName
()
);
}
settlementItemList
=
settlementItemMapper
.
queryListBySupplier
(
id
);
}
if
(
"1"
.
equals
(
erpSettlement
.
getSettlementType
())){
//水厂
if
(
StringUtils
.
isNotEmpty
(
erpSettlement
.
getDepartId
())){
erpSettlementVO
.
setDepartName
(
departMapper
.
selectById
(
erpSettlement
.
getDepartId
()).
getDepartName
());
}
settlementItemList
=
settlementItemMapper
.
queryListByWaterDepart
(
id
);
}
ErpSettlementVO
erpSettlementVO
=
new
ErpSettlementVO
();
if
(
erpSettlement
!=
null
){
//BeanUtils.copyProperties(有值的对象, 要被赋值的对象);
...
...
@@ -96,6 +107,7 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
String
jtDepartName
=
commonSqlService
.
queryForString
(
"select depart_name from sys_depart order by parent_id asc limit 1"
);
Map
<
String
,
SparepartSettlementVO
>
sparepartSettlementMap
=
new
HashedMap
();
SparepartSettlementVO
sparepartSettlementVO
=
null
;
List
<
SparepartSettlementVO
>
sparepartSettlementVOList
=
new
ArrayList
<>();
if
(
settlementItemList
!=
null
){
for
(
ErpSettlementItemVO
settlementItemVO
:
settlementItemList
){
sparepartSettlementVO
=
sparepartSettlementMap
.
get
(
settlementItemVO
.
getSparepartId
());
...
...
@@ -103,10 +115,13 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
//String projectName,String departName, String contractCode, String sparepartName, String specification, String goodOrigin, String goodBrand
sparepartSettlementVO
=
new
SparepartSettlementVO
(
settlementItemVO
.
getProjectName
(),
settlementItemVO
.
getDepartName
(),
settlementItemVO
.
getContractCode
(),
settlementItemVO
.
getSparepartName
(),
settlementItemVO
.
getSpecification
(),
settlementItemVO
.
getGoodCode
()
,
settlementItemVO
.
getGoodBrand
()
);
sparepartSettlementVO
.
setJtDepartName
(
jtDepartName
);
sparepartSettlementVO
.
setSupplierName
(
settlementItemVO
.
getSupplierName
()
)
;
sparepartSettlementVO
.
setContractName
(
settlementItemVO
.
getContractName
()
);
sparepartSettlementMap
.
put
(
settlementItemVO
.
getSparepartId
()
,
sparepartSettlementVO
);
}
sparepartSettlementVO
.
setJtDepartName
(
jtDepartName
);
sparepartSettlementVO
.
addErpSettlementItem
(
settlementItemVO
);
sparepartSettlementVOList
.
add
(
sparepartSettlementVO
);
}
}
//送货单以及物资验收单
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论