This commit is contained in:
mx 2024-12-31 14:34:14 +08:00
parent 2ff94c4500
commit 95c825f2b8
3 changed files with 21 additions and 16 deletions

View File

@ -42,9 +42,9 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver driverClassName: com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562 # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题) # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
url: jdbc:mysql://192.168.18.119:3308/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true url: jdbc:mysql://124.236.46.74:9100/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: root username: root
password: Ps123456 password: rwWhYfCe3Tzhatep
# url: jdbc:mysql://47.95.38.123:3306/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # url: jdbc:mysql://47.95.38.123:3306/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
# username: root # username: root
# password: Ps123456@ # password: Ps123456@
@ -94,13 +94,13 @@ spring:
spring.data: spring.data:
redis: redis:
# 地址 # 地址
host: 192.168.18.119 host: 124.236.46.74
# 端口默认为6379 # 端口默认为6379
port: 6378 port: 9101
# 数据库索引 # 数据库索引
database: 8 database: 8
# 密码(如没有密码请注释掉) # 密码(如没有密码请注释掉)
password: 12345 password: redis_PhRr2K
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 10s
# 是否开启ssl # 是否开启ssl

View File

@ -134,17 +134,16 @@ public abstract class ApproverAbstractServiceImpl implements ApproverService {
} }
Page<PsApproverRecordVo> res = recordMapper.selectPageApproverList(pageQuery.build(), lqw, bo.getPay()); Page<PsApproverRecordVo> res = recordMapper.selectPageApproverList(pageQuery.build(), lqw, bo.getPay());
List<String> codes = res.getRecords().stream().map(PsApproverRecordVo::getContractCode).toList();
QueryWrapper<PsCompanyInfoVo> wq = Wrappers.<PsCompanyInfoVo>query()
.eq("com.del_flag", "0")
.eq("pcc.del_flag","0")
.in("pcc.contract_code", codes);
List<PsCompanyInfoVo> list = companyInfoMapper.selectContractServiceCompany(wq);
Map<String, List<PsCompanyInfoVo>> contractCompanyMap = list.stream().collect(Collectors.groupingBy(PsCompanyInfoVo::getContractCode));
if(CollectionUtils.isNotEmpty(res.getRecords())){ if(CollectionUtils.isNotEmpty(res.getRecords())){
List<String> codes = res.getRecords().stream().map(PsApproverRecordVo::getContractCode).toList();
QueryWrapper<PsCompanyInfoVo> wq = Wrappers.<PsCompanyInfoVo>query()
.eq("com.del_flag", "0")
.eq("pcc.del_flag","0")
.in("pcc.contract_code", codes);
List<PsCompanyInfoVo> list = companyInfoMapper.selectContractServiceCompany(wq);
Map<String, List<PsCompanyInfoVo>> contractCompanyMap = list.stream().collect(Collectors.groupingBy(PsCompanyInfoVo::getContractCode));
res.getRecords().forEach(item->{ res.getRecords().forEach(item->{
if (item.getContractAmount() != null) if (item.getContractAmount() != null)
item.setResidualMoney(item.getContractAmount().subtract(item.getPayMoney())); item.setResidualMoney(item.getContractAmount().subtract(item.getPayMoney()));

View File

@ -742,8 +742,14 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
detailBos.add(item); detailBos.add(item);
for (PsContractBusinessDetailBo detailBo : item.getDetailBos()) { for (PsContractBusinessDetailBo detailBo : item.getDetailBos()) {
contractType = dictDataService.selectDict("service_project", detailBo.getBusinessProject()); String dictLabel = "";
String dictLabel = contractType.getDictLabel(); if (StringUtils.isEmpty(detailBo.getBusinessProject())){
dictLabel = detailBo.getBusinessProjectLabel();
}else{
contractType = dictDataService.selectDict("service_project", detailBo.getBusinessProject());
dictLabel = contractType.getDictLabel();
}
String remark = contractType.getRemark(); String remark = contractType.getRemark();
if (!StringUtils.isEmpty(remark)){ if (!StringUtils.isEmpty(remark)){
JSONObject jsonObject = JSONObject.parseObject(remark); JSONObject jsonObject = JSONObject.parseObject(remark);