Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
4f02a306
Commit
4f02a306
authored
Jul 05, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
61d035e8
d75d6595
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
98 additions
and
93 deletions
+98
-93
HygfReplenishment.java
...n/amos/boot/module/hygf/api/entity/HygfReplenishment.java
+3
-2
PreparationMoney.java
...in/amos/boot/module/hygf/api/entity/PreparationMoney.java
+2
-1
PreparationMoneyMapper.xml
...rc/main/resources/mapper/mysql/PreparationMoneyMapper.xml
+2
-0
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+79
-66
PreparationMoneyServiceImpl.java
...le/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
+9
-23
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+2
-0
WorkOrderServiceImpl.java
...ot/module/hygf/biz/service/impl/WorkOrderServiceImpl.java
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/HygfReplenishment.java
View file @
4f02a306
...
...
@@ -10,6 +10,7 @@ import lombok.Value;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
*
...
...
@@ -20,7 +21,7 @@ import java.util.List;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"hygf_replenishment"
)
@TableName
(
value
=
"hygf_replenishment"
,
autoResultMap
=
true
)
public
class
HygfReplenishment
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -41,6 +42,6 @@ public class HygfReplenishment extends BaseEntity {
* 补货文件
*/
@TableField
(
value
=
"file"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Object
>
file
;
private
List
<
Map
>
file
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/PreparationMoney.java
View file @
4f02a306
...
...
@@ -151,7 +151,8 @@ public class PreparationMoney extends BaseEntity {
private
List
<
PreparationMoneyLog
>
preparationMoneyLog
;
//发货单流水
@TableField
(
exist
=
false
)
private
List
<
HygfReplenishmentDto
>
files
;
//发货单流水
private
List
<
HygfReplenishment
>
files
;
@TableField
(
exist
=
false
)
private
String
instanceId
;
//发货单流水
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PreparationMoneyMapper.xml
View file @
4f02a306
...
...
@@ -45,7 +45,9 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
hygf_peasant_household.peasant_household_no as peasantHouseholdNo,
hygf_peasant_household.owners_name as ownersName,
hygf_peasant_household.regional_companies_name as regionalCompaniesName,
hygf_peasant_household.regional_companies_seq as regionalCompaniesSeq,
hygf_peasant_household.developer_name as developerName,
hygf_peasant_household.developer_id as developeId,
hygf_peasant_household.sequence_nbr as sequenceNbr,
concat_ws('/',hygf_peasant_household.project_address_name,hygf_peasant_household.project_address_detail) as address,
hygf_peasant_household.project_address_name as sequenceNbr,
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/FinancingInfoServiceImpl.java
View file @
4f02a306
...
...
@@ -30,11 +30,13 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingRectificationOrder;
import
com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IFinancingInfoService
;
import
com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -42,6 +44,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
javax.annotation.Resource
;
import
java.util.*
;
/**
...
...
@@ -71,6 +74,9 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
@Autowired
private
CommonServiceImpl
commonService
;
@Resource
(
type
=
RedisLockUtil
.
class
)
private
RedisLockUtil
redisLockUtil
;
@UserLimits
public
Page
<
Map
<
String
,
Object
>>
queryForFinancingInfoPage
(
Page
<
Map
<
String
,
Object
>>
page
,
String
type
,
String
status
,
String
regionalCompaniesCode
,
String
ownersName
)
{
StdUserEmpower
orgCode
=
(
StdUserEmpower
)
redisUtils
.
get
(
"Emp_"
+
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()));
...
...
@@ -115,76 +121,83 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
}
public
FinancingInfoDto
saveModel
(
FinancingInfoDto
model
)
{
List
<
String
>
ids
;
if
(
model
.
getPeasantHouseholdIds
().
contains
(
","
))
{
ids
=
Arrays
.
asList
(
model
.
getPeasantHouseholdIds
().
split
(
","
));
}
else
{
ids
=
Arrays
.
asList
(
new
String
[]{
model
.
getPeasantHouseholdIds
()});
}
Map
<
String
,
Object
>
orgInfo
=
this
.
getBaseMapper
().
selectRZOrgInfo
(
model
.
getFinancingCompaniesSeq
());
model
.
setFinancingCompaniesCode
(
orgInfo
.
getOrDefault
(
"ORG_CODE"
,
""
).
toString
());
model
.
setFinancingCompaniesName
(
orgInfo
.
getOrDefault
(
"COMPANY_NAME"
,
""
).
toString
());
ids
.
stream
().
forEach
(
e
->
{
LambdaQueryWrapper
<
FinancingInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
Long
.
valueOf
(
e
));
FinancingInfo
financingInfos
=
this
.
getBaseMapper
().
selectOne
(
queryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
financingInfos
))
{
model
.
setStatus
(
FinancingAuditEnum
.
待融资审核
.
getName
());
model
.
setPeasantHouseholdId
(
Long
.
valueOf
(
e
));
FinancingInfoDto
financingInfoDto
=
new
FinancingInfoDto
();
BeanUtils
.
copyProperties
(
model
,
financingInfoDto
);
financingInfoDto
.
setSequenceNbr
(
null
);
this
.
createWithModel
(
financingInfoDto
);
//开启工作流 并执行一步
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESSKEY
);
Date
date
=
new
Date
();
dto
.
setBusinessKey
(
String
.
valueOf
(
date
.
getTime
()));
dto
.
setCompleteFirstTask
(
true
);
//工作流程图第一步执行后存在互斥网关 isFlag为表达式 默认为1执行到融资审核
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"isFlag"
,
"0"
);
dto
.
setVariables
(
map
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
List
<
ProcessTaskDTO
>
processTaskDTOS
=
workFlowService
.
startBatch
(
actWorkflowBatchDTO
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfo
(
processTaskDTOS
);
WorkflowResultDto
workflowResultDto
=
workflowResultDtos
.
get
(
0
);
FinancingAuditingDto
financingAuditingDto
=
new
FinancingAuditingDto
();
BeanUtils
.
copyProperties
(
workflowResultDto
,
financingAuditingDto
);
financingAuditingDto
.
setPeasantHouseholdId
(
Long
.
valueOf
(
e
));
financingAuditingDto
.
setPromoter
(
RequestContext
.
getExeUserId
());
financingAuditingService
.
createWithModel
(
financingAuditingDto
);
String
lockName
=
String
.
format
(
"LockName:powerStationExamine"
);
try
{
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
throw
new
com
.
yeejoin
.
amos
.
component
.
robot
.
BadRequest
(
"其他用户正在操作,请刷新后再试!"
);
}
//批量 兼容审核不通过及整改待推送
else
if
(
financingInfos
.
getStatus
().
equals
(
FinancingAuditEnum
.
审核不通过
.
getName
())
||
financingInfos
.
getStatus
().
equals
(
FinancingAuditEnum
.
整改待推送
.
getName
())
){
financingInfos
.
setStatus
(
FinancingAuditEnum
.
待融资审核
.
getName
());
Map
<
String
,
Object
>
orgInfo1
=
this
.
getBaseMapper
().
selectRZOrgInfo
(
model
.
getFinancingCompaniesSeq
());
//业务表中无工作流id 需要补充
LambdaQueryWrapper
<
FinancingAuditing
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
FinancingAuditing:
:
getPeasantHouseholdId
,
Long
.
valueOf
(
e
));
queryWrapper1
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
queryWrapper1
.
last
(
"limit 1"
);
FinancingAuditing
financingInfos1
=
financingAuditingService
.
getBaseMapper
().
selectOne
(
queryWrapper1
);
financingInfos
.
setFinancingCompaniesCode
(
orgInfo1
.
getOrDefault
(
"ORG_CODE"
,
""
).
toString
());
financingInfos
.
setFinancingCompaniesName
(
orgInfo1
.
getOrDefault
(
"COMPANY_NAME"
,
""
).
toString
());
this
.
updateById
(
financingInfos
);
Map
<
String
,
Object
>
map
=
BeanUtil
.
beanToMap
(
financingInfos
);
map
.
put
(
"isFlag"
,
"0"
);
map
.
put
(
"instanceId"
,
financingInfos1
.
getInstanceId
());
this
.
execueFlow
(
map
);
List
<
String
>
ids
;
if
(
model
.
getPeasantHouseholdIds
().
contains
(
","
))
{
ids
=
Arrays
.
asList
(
model
.
getPeasantHouseholdIds
().
split
(
","
));
}
else
{
ids
=
Arrays
.
asList
(
new
String
[]{
model
.
getPeasantHouseholdIds
()});
}
//发起待办
Map
<
String
,
Object
>
orgInfo
=
this
.
getBaseMapper
().
selectRZOrgInfo
(
model
.
getFinancingCompaniesSeq
());
model
.
setFinancingCompaniesCode
(
orgInfo
.
getOrDefault
(
"ORG_CODE"
,
""
).
toString
());
model
.
setFinancingCompaniesName
(
orgInfo
.
getOrDefault
(
"COMPANY_NAME"
,
""
).
toString
());
ids
.
stream
().
forEach
(
e
->
{
LambdaQueryWrapper
<
FinancingInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
Long
.
valueOf
(
e
));
FinancingInfo
financingInfos
=
this
.
getBaseMapper
().
selectOne
(
queryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
financingInfos
))
{
model
.
setStatus
(
FinancingAuditEnum
.
待融资审核
.
getName
());
model
.
setPeasantHouseholdId
(
Long
.
valueOf
(
e
));
FinancingInfoDto
financingInfoDto
=
new
FinancingInfoDto
();
BeanUtils
.
copyProperties
(
model
,
financingInfoDto
);
financingInfoDto
.
setSequenceNbr
(
null
);
this
.
createWithModel
(
financingInfoDto
);
//开启工作流 并执行一步
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESSKEY
);
Date
date
=
new
Date
();
dto
.
setBusinessKey
(
String
.
valueOf
(
date
.
getTime
()));
dto
.
setCompleteFirstTask
(
true
);
//工作流程图第一步执行后存在互斥网关 isFlag为表达式 默认为1执行到融资审核
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"isFlag"
,
"0"
);
dto
.
setVariables
(
map
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
List
<
ProcessTaskDTO
>
processTaskDTOS
=
workFlowService
.
startBatch
(
actWorkflowBatchDTO
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfo
(
processTaskDTOS
);
WorkflowResultDto
workflowResultDto
=
workflowResultDtos
.
get
(
0
);
FinancingAuditingDto
financingAuditingDto
=
new
FinancingAuditingDto
();
BeanUtils
.
copyProperties
(
workflowResultDto
,
financingAuditingDto
);
financingAuditingDto
.
setPeasantHouseholdId
(
Long
.
valueOf
(
e
));
financingAuditingDto
.
setPromoter
(
RequestContext
.
getExeUserId
());
financingAuditingService
.
createWithModel
(
financingAuditingDto
);
}
//批量 兼容审核不通过及整改待推送
else
if
(
financingInfos
.
getStatus
().
equals
(
FinancingAuditEnum
.
审核不通过
.
getName
())
||
financingInfos
.
getStatus
().
equals
(
FinancingAuditEnum
.
整改待推送
.
getName
())
){
financingInfos
.
setStatus
(
FinancingAuditEnum
.
待融资审核
.
getName
());
Map
<
String
,
Object
>
orgInfo1
=
this
.
getBaseMapper
().
selectRZOrgInfo
(
model
.
getFinancingCompaniesSeq
());
//业务表中无工作流id 需要补充
LambdaQueryWrapper
<
FinancingAuditing
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
FinancingAuditing:
:
getPeasantHouseholdId
,
Long
.
valueOf
(
e
));
queryWrapper1
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
queryWrapper1
.
last
(
"limit 1"
);
FinancingAuditing
financingInfos1
=
financingAuditingService
.
getBaseMapper
().
selectOne
(
queryWrapper1
);
financingInfos
.
setFinancingCompaniesCode
(
orgInfo1
.
getOrDefault
(
"ORG_CODE"
,
""
).
toString
());
financingInfos
.
setFinancingCompaniesName
(
orgInfo1
.
getOrDefault
(
"COMPANY_NAME"
,
""
).
toString
());
this
.
updateById
(
financingInfos
);
Map
<
String
,
Object
>
map
=
BeanUtil
.
beanToMap
(
financingInfos
);
map
.
put
(
"isFlag"
,
"0"
);
map
.
put
(
"instanceId"
,
financingInfos1
.
getInstanceId
());
this
.
execueFlow
(
map
);
}
//发起待办
// commonService.buildTaskModel(buildDZTRZTaskModel(model, workflowResultDto, date));
});
});
}
finally
{
redisLockUtil
.
releaseLock
(
lockName
);
}
return
model
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
View file @
4f02a306
...
...
@@ -190,19 +190,13 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
List
<
DocumentStation
>
li
=
documentStationMapper
.
selectList
(
q
);
preparationMoney
.
setPeasantHouseholdId
(
li
);
List
<
HygfReplenishment
>
hygfReplenishments
=
new
ArrayList
<>();
List
<
HygfReplenishmentDto
>
hygfReplenishmentDtos
=
hygfReplenishmentMapper
.
selectData
(
sequenceNbr
);
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishmentDtos
)
&&
!
hygfReplenishmentDtos
.
isEmpty
()
){
LambdaQueryWrapper
<
HygfReplenishment
>
files
=
new
LambdaQueryWrapper
<>();
files
.
eq
(
HygfReplenishment:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfReplenishment
>
hygfReplenishments1
=
hygfReplenishmentMapper
.
selectList
(
files
);
hygfReplenishmentDtos
.
forEach
(
e
->{
HygfReplenishment
hygfReplenishment
=
new
HygfReplenishment
();
BeanUtils
.
copyProperties
(
e
,
hygfReplenishment
);
hygfReplenishment
.
setFile
(
JSON
.
parseArray
(
e
.
getFile
()));
hygfReplenishments
.
add
(
hygfReplenishment
);
});
preparationMoney
.
setFiles
(
hygfReplenishmentDtos
);
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishments1
)
&&
!
hygfReplenishments1
.
isEmpty
()
){
preparationMoney
.
setFiles
(
hygfReplenishments1
);
}
return
preparationMoney
;
...
...
@@ -321,22 +315,14 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
Map
<
String
,
Object
>
map2
=
Bean
.
BeantoMap
(
preparationMoney
);
List
<
HygfReplenishment
>
hygfReplenishments
=
new
ArrayList
<>();
List
<
HygfReplenishmentDto
>
hygfReplenishmentDtos
=
hygfReplenishmentMapper
.
selectData
(
Long
.
valueOf
(
sequenceNbr
));
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishmentDtos
)
&&
!
hygfReplenishmentDtos
.
isEmpty
()
)
{
LambdaQueryWrapper
<
HygfReplenishment
>
files
=
new
LambdaQueryWrapper
<>();
files
.
eq
(
HygfReplenishment:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfReplenishment
>
hygfReplenishments
=
hygfReplenishmentMapper
.
selectList
(
files
);
hygfReplenishmentDtos
.
forEach
(
e
->
{
HygfReplenishment
hygfReplenishment
=
new
HygfReplenishment
();
BeanUtils
.
copyProperties
(
e
,
hygfReplenishment
);
hygfReplenishment
.
setFile
(
JSON
.
parseArray
(
e
.
getFile
()));
hygfReplenishments
.
add
(
hygfReplenishment
);
});
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishments
)
&&
!
hygfReplenishments
.
isEmpty
()
){
map2
.
put
(
"files"
,
hygfReplenishments
);
}
map
.
put
(
"preparationMoney"
,
map2
);
map
.
put
(
"designInformation"
,
designInformation
);
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/SurveyInformationServiceImpl.java
View file @
4f02a306
...
...
@@ -315,6 +315,8 @@ public class SurveyInformationServiceImpl
}
peasantHouseholdServiceImpl
.
saveOrUpdate
(
peasantHousehold
);
}
catch
(
BadRequest
e1
)
{
throw
e1
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/WorkOrderServiceImpl.java
View file @
4f02a306
...
...
@@ -126,7 +126,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
}
if
(!
workorderPeasant
.
isEmpty
())
{
String
names
=
workorderPeasant
.
stream
().
map
(
i
->
i
.
getOwnersName
()).
collect
(
Collectors
.
joining
(
","
));
throw
new
Exception
(
"电站"
+
names
+
",已被工单关联"
);
throw
new
Exception
(
"电站"
+
names
+
",已被工单关联
,请重新选择电站
"
);
}
// 保存派工单
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment