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
e02ce526
Commit
e02ce526
authored
Jun 21, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
26854 【智信户用(管理端)】迁移工作台相关代码
parent
c86819b6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1159 additions
and
995 deletions
+1159
-995
BusinessTypeEnum.java
...join/amos/boot/module/hygf/api/Enum/BusinessTypeEnum.java
+4
-37
TaskStatusEnum.java
...eejoin/amos/boot/module/hygf/api/Enum/TaskStatusEnum.java
+107
-0
BasicGridAcceptanceServiceImpl.java
...hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
+35
-0
CommonServiceImpl.java
.../boot/module/hygf/biz/service/impl/CommonServiceImpl.java
+2
-13
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+140
-104
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+275
-263
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+273
-261
pom.xml
pom.xml
+323
-317
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/BusinessTypeEnum.java
View file @
e02ce526
...
...
@@ -10,43 +10,10 @@ public enum BusinessTypeEnum {
/**
* 业务类型枚举
*/
JG_EQUIPMENT_HANDOVER
(
"101"
,
"设备移交"
),
JG_INSTALLATION_NOTIFICATION
(
"102"
,
"安装告知"
),
JG_MODIFICATION_NOTIFICATION
(
"103"
,
"改造告知"
),
JG_MAINTENANCE_NOTIFICATION
(
"104"
,
"维修告知"
),
JG_ADVICE_REMOVAL
(
"105"
,
"移装告知"
),
JG_MAINTENANCE_RECORD
(
"106"
,
"维保备案"
),
JG_USAGE_REGISTRATION
(
"107"
,
"使用登记"
),
JG_NAME_CHANGE_REGISTRATION
(
"108"
,
"更名变更登记"
),
JG_COMPANY_CHANGE_REGISTRATION
(
"109"
,
"单位变更登记"
),
JG_CHANGE_REGISTRATION
(
"110"
,
"移装变更登记"
),
JG_RENOVATION_REGISTRATION
(
"111"
,
"改造变更登记"
),
JG_EQUIPMENT_START
(
"112-1"
,
"设备启用"
),
JG_EQUIPMENT_STOP
(
"112-2"
,
"设备停用"
),
JG_EQUIPMENT_MOVE
(
"113-1"
,
"移装注销"
),
JG_EQUIPMENT_CANCEL
(
"113-2"
,
"报废注销"
),
JY_OPENING_APPLICATION
(
"114"
,
"业务开通"
),
JY_INSPECTION_APPLICATION_JD
(
"115"
,
"监督检验"
),
JY_INSPECTION_APPLICATION_DS
(
"116"
,
"定(首)检验"
),
JY_INSPECTION_APPLICATION_CHECK
(
"117"
,
"电梯检测"
),
JG_VEHICLE_GAS_APPLICATION
(
"118"
,
"车用气瓶登记"
);
HYGF_JXS_SH
(
"JXS_SH"
,
"经销商审核"
),
HYGF_DZ_SH
(
"hygf_10001"
,
"电站审核"
),
HYGF_BWYS
(
"hygf_bwys"
,
"并网验收"
),
HYGF_DZTRRZ
(
"StationFinancing"
,
"电站投融资流程"
);
private
final
String
code
;
private
final
String
name
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/TaskStatusEnum.java
0 → 100644
View file @
e02ce526
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
Enum
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* <pre>
* 任务状态枚举
* </pre>
* @author my
*
*/
public
enum
TaskStatusEnum
{
UNDERWAY
(
"处理中"
,
0
),
FINISHED
(
"已完成"
,
1
),
CANCEL
(
"已取消"
,
2
),
OVERTIME
(
"已超时"
,
3
);
/**
* 名称
*/
private
String
name
;
/**
* 值
*/
private
int
value
;
private
TaskStatusEnum
(
String
name
,
int
value
)
{
this
.
name
=
name
;
this
.
value
=
value
;
}
public
static
String
getName
(
int
value
)
{
for
(
TaskStatusEnum
c
:
TaskStatusEnum
.
values
())
{
if
(
c
.
getValue
()
==
value
)
{
return
c
.
name
;
}
}
return
null
;
}
public
static
int
getValue
(
String
name
)
{
for
(
TaskStatusEnum
c
:
TaskStatusEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
.
value
;
}
}
return
-
1
;
}
public
static
TaskStatusEnum
getEnum
(
int
value
)
{
for
(
TaskStatusEnum
c
:
TaskStatusEnum
.
values
())
{
if
(
c
.
getValue
()
==
value
)
{
return
c
;
}
}
return
null
;
}
public
static
TaskStatusEnum
getEnum
(
String
name
)
{
for
(
TaskStatusEnum
c
:
TaskStatusEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
;
}
}
return
null
;
}
public
static
List
<
Map
<
String
,
String
>>
getEnumList
()
{
List
<
Map
<
String
,
String
>>
nameList
=
new
ArrayList
<>();
for
(
TaskStatusEnum
c:
TaskStatusEnum
.
values
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"name"
,
c
.
getName
());
map
.
put
(
"value"
,
c
.
getValue
()
+
""
);
nameList
.
add
(
map
);
}
return
nameList
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
int
getValue
()
{
return
value
;
}
public
void
setValue
(
int
value
)
{
this
.
value
=
value
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
View file @
e02ce526
...
...
@@ -47,6 +47,8 @@ public class BasicGridAcceptanceServiceImpl
@Autowired
PeasantHouseholdMapper
peasantHouseholdMapper
;
@Autowired
private
CommonServiceImpl
commonService
;
private
final
String
OK
=
"0"
;
private
final
String
PASS
=
"5"
;
...
...
@@ -127,9 +129,42 @@ public class BasicGridAcceptanceServiceImpl
onGridMapper
.
insert
(
grid
);
}
basicGridAcceptanceMapper
.
updateById
(
basicGridAcceptance
);
//发起待办
commonService
.
buildTaskModel
(
buildBWYSTaskModel
(
grid
,
basicGridAcceptance
));
return
grid
;
}
private
List
<
TaskModelDto
>
buildBWYSTaskModel
(
HygfOnGrid
grid
,
BasicGridAcceptance
basicGridAcceptance
)
{
List
<
TaskModelDto
>
taskModelDtoList
=
new
ArrayList
<>();
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
taskModelDto
.
setFlowCode
(
basicGridAcceptance
.
getNextTaskId
());
taskModelDto
.
setFlowCreateDate
(
new
Date
());
taskModelDto
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
taskModelDto
.
setFlowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setPageType
(
null
);
taskModelDto
.
setExecuteUserIds
(
basicGridAcceptance
.
getNextExecuteUserIds
());
taskModelDto
.
setModel
(
grid
);
taskModelDto
.
setRelationId
(
basicGridAcceptance
.
getInstanceId
());
taskModelDto
.
setRoutePath
(
null
);
taskModelDto
.
setStartUserId
(
basicGridAcceptance
.
getRecUserId
());
taskModelDto
.
setStartUser
(
basicGridAcceptance
.
getRecUserName
());
taskModelDto
.
setStartDate
(
basicGridAcceptance
.
getRecDate
());
taskModelDto
.
setStartUserCompanyName
(
null
);
taskModelDto
.
setTaskName
(
basicGridAcceptance
.
getNextNodeName
());
taskModelDto
.
setTaskCode
(
String
.
valueOf
(
basicGridAcceptance
.
getWorkOrderId
()));
taskModelDto
.
setTaskType
(
BusinessTypeEnum
.
HYGF_BWYS
.
getCode
());
taskModelDto
.
setTaskTypeLabel
(
BusinessTypeEnum
.
HYGF_BWYS
.
getName
());
taskModelDto
.
setTaskStatus
(
TaskStatusEnum
.
UNDERWAY
.
getValue
());
taskModelDto
.
setTaskStatusLabel
(
TaskStatusEnum
.
UNDERWAY
.
getName
());
// taskModelDto.setTaskDesc();
// taskModelDto.setTaskContent();
taskModelDto
.
setNextExecuteUser
(
basicGridAcceptance
.
getNextExecutorIds
());
taskModelDtoList
.
add
(
taskModelDto
);
return
taskModelDtoList
;
}
public
HygfOnGrid
modifyEntity
(
HygfOnGrid
grid
)
{
onGridMapper
.
updateById
(
grid
);
return
grid
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/CommonServiceImpl.java
View file @
e02ce526
...
...
@@ -104,11 +104,6 @@ public class CommonServiceImpl {
model
.
setRoutePath
(
map
.
get
(
"url"
).
toString
()
+
urlParams
);
break
;
}
// 维保需特殊获取页面 状态不等于监管单位审核的页面均取对应编辑页面
else
if
(
map
.
get
(
"type"
).
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
obj
.
getTaskType
().
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
!
obj
.
getFlowStatus
().
toString
().
equals
(
"16723"
)
&&
map
.
get
(
"pageType"
).
equals
(
"edit"
))
{
model
.
setRoutePath
(
map
.
get
(
"url"
).
toString
().
replace
(
"{roleIds}"
,
obj
.
getNextExecuteUser
())
+
urlParams
+
"&nextExecuteUserIds="
+
model
.
getExecuteUserIds
());
break
;
}
// 其他逻辑均按详情页面获取
else
if
(
map
.
get
(
"type"
).
equals
(
obj
.
getTaskType
())
&&
map
.
get
(
"pageType"
).
equals
(
null
==
obj
.
getPageType
()
?
"look"
:
obj
.
getPageType
()))
{
model
.
setRoutePath
(
map
.
get
(
"url"
).
toString
().
replace
(
"{roleIds}"
,
obj
.
getNextExecuteUser
())
+
urlParams
+
"&nextExecuteUserIds="
+
model
.
getExecuteUserIds
());
...
...
@@ -313,10 +308,7 @@ public class CommonServiceImpl {
}
for
(
Map
map
:
urlList
)
{
if
(
map
.
get
(
"type"
).
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
obj
.
getString
(
"taskType"
).
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
map
.
get
(
"pageType"
).
equals
(
"edit"
))
{
lastTaskModel
.
setRoutePath
(
map
.
get
(
"url"
).
toString
().
replace
(
"{roleIds}"
,
obj
.
getString
(
"nextExecuteUser"
))
+
urlParams
);
break
;
}
else
if
(
map
.
get
(
"type"
).
equals
(
obj
.
get
(
"taskType"
))
&&
map
.
get
(
"pageType"
).
equals
(
obj
.
getOrDefault
(
"pageType"
,
"edit"
)))
{
if
(
map
.
get
(
"type"
).
equals
(
obj
.
get
(
"taskType"
))
&&
map
.
get
(
"pageType"
).
equals
(
obj
.
getOrDefault
(
"pageType"
,
"edit"
)))
{
lastTaskModel
.
setRoutePath
(
map
.
get
(
"url"
).
toString
().
replace
(
"{roleIds}"
,
obj
.
get
(
"nextExecuteUser"
).
toString
())
+
urlParams
);
break
;
}
...
...
@@ -334,10 +326,7 @@ public class CommonServiceImpl {
model
.
setFlowStatusLabel
(
obj
.
get
(
"flowStatusLabel"
).
toString
());
}
for
(
Map
map
:
urlList
)
{
if
(
map
.
get
(
"type"
).
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
obj
.
getString
(
"taskType"
).
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
map
.
get
(
"pageType"
).
equals
(
"edit"
))
{
model
.
setRoutePath
(
map
.
get
(
"url"
).
toString
().
replace
(
"{roleIds}"
,
obj
.
getString
(
"nextExecuteUser"
))
+
urlParams
);
break
;
}
else
if
(
map
.
get
(
"type"
).
equals
(
obj
.
get
(
"taskType"
))
&&
map
.
get
(
"pageType"
).
equals
(
"edit"
))
{
if
(
map
.
get
(
"type"
).
equals
(
obj
.
get
(
"taskType"
))
&&
map
.
get
(
"pageType"
).
equals
(
"edit"
))
{
model
.
setRoutePath
(
map
.
get
(
"url"
).
toString
().
replace
(
"{roleIds}"
,
obj
.
get
(
"nextExecuteUser"
).
toString
())
+
urlParams
);
break
;
}
...
...
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 @
e02ce526
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.map.MapUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.FinancingAuditEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.TaskStatusEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.BasicGridAcceptanceDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingAuditingDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TaskModelDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingAuditing
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfo
;
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.dto.FinancingInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.FinancingRectificationOrderServiceImpl
;
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
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.*
;
...
...
@@ -46,7 +49,10 @@ import java.util.*;
* @date 2024-04-01
*/
@Service
public
class
FinancingInfoServiceImpl
extends
BaseService
<
FinancingInfoDto
,
FinancingInfo
,
FinancingInfoMapper
>
implements
IFinancingInfoService
{
public
class
FinancingInfoServiceImpl
extends
BaseService
<
FinancingInfoDto
,
FinancingInfo
,
FinancingInfoMapper
>
implements
IFinancingInfoService
{
private
static
String
PROCESSKEY
=
"StationFinancing"
;
@Autowired
RedisUtils
redisUtils
;
/**
* 分页查询
*/
...
...
@@ -55,29 +61,26 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
@Autowired
private
WorkFlowService
workFlowService
;
@Autowired
private
WorkflowImpl
workflow
;
private
WorkflowImpl
workflow
;
@Autowired
private
FinancingAuditingServiceImpl
financingAuditingService
;
@Autowired
private
FinancingRectificationOrderServiceImpl
financingRectificationOrderService
;
@Autowired
RedisUtils
redisUtils
;
private
static
String
PROCESSKEY
=
"StationFinancing"
;
private
CommonServiceImpl
commonService
;
@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
()));
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
()));
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
List
<
String
>
amosOrgCodes
=
orgCode
.
getAmosOrgCode
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"ownersName"
,
ownersName
);
params
.
put
(
"status"
,
status
);
params
.
put
(
"regionalCompaniesCode"
,
regionalCompaniesCode
);
params
.
put
(
"type"
,
type
);
params
.
put
(
"ownersName"
,
ownersName
);
params
.
put
(
"status"
,
status
);
params
.
put
(
"regionalCompaniesCode"
,
regionalCompaniesCode
);
params
.
put
(
"type"
,
type
);
// 1 投融人员 2.融资 3经销商管理员
switch
(
type
){
switch
(
type
)
{
case
"1"
:
break
;
case
"2"
:
...
...
@@ -85,15 +88,15 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
params
.
put
(
"financingCompaniesSeq"
,
String
.
valueOf
(
sequenceNbr
));
break
;
default
:
amosOrgCodes
=
Arrays
.
asList
(
orgCode
.
getAdminRegionalCompaniesCode
().
split
(
","
));
amosOrgCodes
=
Arrays
.
asList
(
orgCode
.
getAdminRegionalCompaniesCode
().
split
(
","
));
}
PageHelper
.
startPage
((
int
)
page
.
getCurrent
(),(
int
)
page
.
getSize
());
List
<
Map
<
String
,
Object
>>
list
=
financingInfoMapper
.
getStationFinancingInfoList
(
params
,
amosOrgCodes
);
list
.
forEach
(
e
->
{
if
(
null
!=
e
.
get
(
"instanceId"
)
&&
e
.
get
(
"instanceId"
).
toString
().
contains
(
","
)){
PageHelper
.
startPage
((
int
)
page
.
getCurrent
(),
(
int
)
page
.
getSize
());
List
<
Map
<
String
,
Object
>>
list
=
financingInfoMapper
.
getStationFinancingInfoList
(
params
,
amosOrgCodes
);
list
.
forEach
(
e
->
{
if
(
null
!=
e
.
get
(
"instanceId"
)
&&
e
.
get
(
"instanceId"
).
toString
().
contains
(
","
))
{
String
[]
instanceIds
=
e
.
get
(
"instanceId"
).
toString
().
split
(
","
);
e
.
put
(
"instanceId"
,
instanceIds
[
0
]);
e
.
put
(
"nodeRouting"
,
instanceIds
[
1
]);
e
.
put
(
"instanceId"
,
instanceIds
[
0
]);
e
.
put
(
"nodeRouting"
,
instanceIds
[
1
]);
}
});
PageInfo
<
Map
<
String
,
Object
>>
infos
=
new
PageInfo
<>(
list
);
...
...
@@ -105,34 +108,34 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
/**
* 列表查询 示例
*/
public
List
<
FinancingInfoDto
>
queryForFinancingInfoList
()
{
return
this
.
queryForList
(
""
,
false
);
public
List
<
FinancingInfoDto
>
queryForFinancingInfoList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Transactional
public
FinancingInfoDto
saveModel
(
FinancingInfoDto
model
)
{
List
<
String
>
ids
;
List
<
String
>
ids
;
if
(
model
.
getPeasantHouseholdIds
().
contains
(
","
))
{
ids
=
Arrays
.
asList
(
model
.
getPeasantHouseholdIds
().
split
(
","
));
}
else
{
ids
=
Arrays
.
asList
(
new
String
[]{
model
.
getPeasantHouseholdIds
()});
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
->
{
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
));
queryWrapper
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
Long
.
valueOf
(
e
));
FinancingInfo
financingInfos
=
this
.
getBaseMapper
().
selectOne
(
queryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
financingInfos
)){
if
(
ObjectUtils
.
isEmpty
(
financingInfos
))
{
model
.
setStatus
(
FinancingAuditEnum
.
待融资审核
.
getName
());
model
.
setPeasantHouseholdId
(
Long
.
valueOf
(
e
));
FinancingInfoDto
financingInfoDto
=
new
FinancingInfoDto
();
BeanUtils
.
copyProperties
(
model
,
financingInfoDto
);
BeanUtils
.
copyProperties
(
model
,
financingInfoDto
);
financingInfoDto
.
setSequenceNbr
(
null
);
this
.
createWithModel
(
financingInfoDto
);
}
else
{
}
else
{
financingInfos
.
setStatus
(
FinancingAuditEnum
.
待融资审核
.
getName
());
this
.
updateById
(
financingInfos
);
}
...
...
@@ -142,11 +145,12 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESSKEY
);
dto
.
setBusinessKey
(
String
.
valueOf
(
new
Date
().
getTime
()));
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"
);
map
.
put
(
"isFlag"
,
"0"
);
dto
.
setVariables
(
map
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
...
...
@@ -155,26 +159,57 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
WorkflowResultDto
workflowResultDto
=
workflowResultDtos
.
get
(
0
);
FinancingAuditingDto
financingAuditingDto
=
new
FinancingAuditingDto
();
BeanUtils
.
copyProperties
(
workflowResultDto
,
financingAuditingDto
);
BeanUtils
.
copyProperties
(
workflowResultDto
,
financingAuditingDto
);
financingAuditingDto
.
setPeasantHouseholdId
(
Long
.
valueOf
(
e
));
financingAuditingDto
.
setPromoter
(
RequestContext
.
getExeUserId
());
financingAuditingService
.
createWithModel
(
financingAuditingDto
);
//发起待办
commonService
.
buildTaskModel
(
buildDZTRZTaskModel
(
model
,
workflowResultDto
,
date
));
});
return
model
;
}
private
List
<
TaskModelDto
>
buildDZTRZTaskModel
(
FinancingInfoDto
model
,
WorkflowResultDto
workflowResultDto
,
Date
startDate
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
List
<
TaskModelDto
>
taskModelDtoList
=
new
ArrayList
<>();
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
taskModelDto
.
setFlowCode
(
workflowResultDto
.
getNextTaskId
());
taskModelDto
.
setFlowCreateDate
(
new
Date
());
taskModelDto
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
taskModelDto
.
setFlowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setPageType
(
null
);
taskModelDto
.
setExecuteUserIds
(
workflowResultDto
.
getNextExecuteUserIds
());
taskModelDto
.
setModel
(
model
);
taskModelDto
.
setRelationId
(
workflowResultDto
.
getInstanceId
());
taskModelDto
.
setRoutePath
(
null
);
taskModelDto
.
setStartUserId
(
reginParams
.
getUserModel
().
getUserId
());
taskModelDto
.
setStartUser
(
reginParams
.
getUserModel
().
getUserName
());
taskModelDto
.
setStartDate
(
startDate
);
taskModelDto
.
setStartUserCompanyName
(
null
);
taskModelDto
.
setTaskName
(
workflowResultDto
.
getNextNodeName
());
taskModelDto
.
setTaskCode
(
workflowResultDto
.
getNextNodeCode
());
taskModelDto
.
setTaskType
(
BusinessTypeEnum
.
HYGF_DZTRRZ
.
getCode
());
taskModelDto
.
setTaskTypeLabel
(
BusinessTypeEnum
.
HYGF_DZTRRZ
.
getName
());
taskModelDto
.
setTaskStatus
(
TaskStatusEnum
.
UNDERWAY
.
getValue
());
taskModelDto
.
setTaskStatusLabel
(
TaskStatusEnum
.
UNDERWAY
.
getName
());
// taskModelDto.setTaskDesc();
// taskModelDto.setTaskContent();
taskModelDto
.
setNextExecuteUser
(
workflowResultDto
.
getNextExecutorIds
());
taskModelDtoList
.
add
(
taskModelDto
);
return
taskModelDtoList
;
}
@Override
public
void
rollback
(
String
processId
,
String
peasantHouseholdId
)
{
workFlowService
.
stopProcess
(
processId
);
LambdaQueryWrapper
<
FinancingInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
queryWrapper
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
List
<
FinancingInfo
>
financingInfos
=
this
.
getBaseMapper
().
selectList
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
financingInfos
)){
if
(!
CollectionUtils
.
isEmpty
(
financingInfos
))
{
FinancingInfo
financingInfo
=
financingInfos
.
get
(
0
);
financingInfo
.
setStatus
(
"待推送"
);
financingInfo
.
setFinancingCompaniesCode
(
null
);
...
...
@@ -211,8 +246,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
if
(
params
.
containsKey
(
"isFlag"
))
{
task
.
setResultCode
(
"isFlag"
);
map
.
put
(
"isFlag"
,
params
.
get
(
"isFlag"
));
if
(
params
.
get
(
"isFlag"
).
equals
(
"1"
))
{
params
.
put
(
"comments"
,
"退回整改"
);
if
(
params
.
get
(
"isFlag"
).
equals
(
"1"
))
{
params
.
put
(
"comments"
,
"退回整改"
);
}
}
else
{
task
.
setResultCode
(
"approvalStatus"
);
...
...
@@ -220,70 +255,70 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
}
task
.
setComment
(
params
.
getOrDefault
(
"comments"
,
""
).
toString
());
task
.
setVariable
(
map
);
//执行流程
ProcessTaskDTO
processTaskDTO
=
workFlowService
.
complete
(
financingAuditing
.
getNextTaskId
(),
task
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfo
(
CollectionUtil
.
newArrayList
(
processTaskDTO
));
WorkflowResultDto
workflowResultDto
=
workflowResultDtos
.
get
(
0
);
BeanUtils
.
copyProperties
(
workflowResultDto
,
financingAuditingDto
);
financingAuditingDto
.
setPeasantHouseholdId
(
financingAuditing
.
getPeasantHouseholdId
());
financingAuditingDto
.
setPromoter
(
financingAuditing
.
getPromoter
());
if
(
null
==
financingAuditingDto
.
getInstanceId
())
{
financingAuditingDto
.
setInstanceId
(
financingAuditing
.
getInstanceId
());
}
financingAuditingDto
.
setStatus
(
params
.
getOrDefault
(
"comments"
,
""
).
toString
());
financingAuditingDto
.
setNodeRouting
(
FinancingAuditEnum
.
getNodeByCode
(
workflowResultDto
.
getNextNodeKey
()));
financingAuditingService
.
createWithModel
(
financingAuditingDto
);
//执行流程
ProcessTaskDTO
processTaskDTO
=
workFlowService
.
complete
(
financingAuditing
.
getNextTaskId
(),
task
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfo
(
CollectionUtil
.
newArrayList
(
processTaskDTO
));
WorkflowResultDto
workflowResultDto
=
workflowResultDtos
.
get
(
0
);
BeanUtils
.
copyProperties
(
workflowResultDto
,
financingAuditingDto
);
financingAuditingDto
.
setPeasantHouseholdId
(
financingAuditing
.
getPeasantHouseholdId
());
financingAuditingDto
.
setPromoter
(
financingAuditing
.
getPromoter
());
if
(
null
==
financingAuditingDto
.
getInstanceId
())
{
financingAuditingDto
.
setInstanceId
(
financingAuditing
.
getInstanceId
());
}
financingAuditingDto
.
setStatus
(
params
.
getOrDefault
(
"comments"
,
""
).
toString
());
financingAuditingDto
.
setNodeRouting
(
FinancingAuditEnum
.
getNodeByCode
(
workflowResultDto
.
getNextNodeKey
()));
financingAuditingService
.
createWithModel
(
financingAuditingDto
);
String
nameByCode
=
FinancingAuditEnum
.
getNameByCode
(
workflowResultDto
.
getNextNodeKey
());
String
statusName
=
nameByCode
==
null
||
nameByCode
.
equals
(
""
)
?
"放款完成"
:
nameByCode
;
String
nameByCode
=
FinancingAuditEnum
.
getNameByCode
(
workflowResultDto
.
getNextNodeKey
());
String
statusName
=
nameByCode
==
null
||
nameByCode
.
equals
(
""
)
?
"放款完成"
:
nameByCode
;
LambdaQueryWrapper
<
FinancingInfo
>
info
=
new
LambdaQueryWrapper
<>();
info
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
financingAuditing
.
getPeasantHouseholdId
());
FinancingInfo
financingInfo
=
this
.
getBaseMapper
().
selectOne
(
info
);
if
(
params
.
containsKey
(
"financingCompaniesSeq"
))
{
financingInfo
.
setFinancingCompaniesSeq
(
Long
.
valueOf
(
params
.
get
(
"financingCompaniesSeq"
).
toString
()));
}
//标识对于整改待推送状态
if
(
params
.
containsKey
(
"isZG"
))
{
financingInfo
.
setStatus
(
"整改待推送"
);
}
else
{
financingInfo
.
setStatus
(
statusName
);
}
this
.
updateById
(
financingInfo
);
LambdaQueryWrapper
<
FinancingInfo
>
info
=
new
LambdaQueryWrapper
<>();
info
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
financingAuditing
.
getPeasantHouseholdId
());
FinancingInfo
financingInfo
=
this
.
getBaseMapper
().
selectOne
(
info
);
if
(
params
.
containsKey
(
"financingCompaniesSeq"
))
{
financingInfo
.
setFinancingCompaniesSeq
(
Long
.
valueOf
(
params
.
get
(
"financingCompaniesSeq"
).
toString
()));
}
//标识对于整改待推送状态
if
(
params
.
containsKey
(
"isZG"
))
{
financingInfo
.
setStatus
(
"整改待推送"
);
}
else
{
financingInfo
.
setStatus
(
statusName
);
}
this
.
updateById
(
financingInfo
);
//节点为待整改时生成整改单
if
(
params
.
containsKey
(
"isFlag"
)
&&
params
.
get
(
"isFlag"
).
equals
(
"1"
)
&&
workflowResultDto
.
getNextNodeKey
().
equals
(
FinancingAuditEnum
.
待整改
.
getCode
()))
{
//节点为待整改时生成整改单
if
(
params
.
containsKey
(
"isFlag"
)
&&
params
.
get
(
"isFlag"
).
equals
(
"1"
)
&&
workflowResultDto
.
getNextNodeKey
().
equals
(
FinancingAuditEnum
.
待整改
.
getCode
()))
{
LambdaQueryWrapper
<
FinancingRectificationOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FinancingRectificationOrder:
:
getPeasantHouseholdId
,
financingInfo
.
getPeasantHouseholdId
());
queryWrapper
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
queryWrapper
.
last
(
"limit 1"
);
FinancingRectificationOrder
oldData
=
financingRectificationOrderService
.
getBaseMapper
().
selectOne
(
queryWrapper
);
LambdaQueryWrapper
<
FinancingRectificationOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FinancingRectificationOrder:
:
getPeasantHouseholdId
,
financingInfo
.
getPeasantHouseholdId
());
queryWrapper
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
queryWrapper
.
last
(
"limit 1"
);
FinancingRectificationOrder
oldData
=
financingRectificationOrderService
.
getBaseMapper
().
selectOne
(
queryWrapper
);
FinancingRectificationOrder
financingRectificationOrder
=
new
FinancingRectificationOrder
();
//若存在历史整改单 将历史整改单数据同步至新整改单 便于修改
if
(
ObjectUtils
.
isNotEmpty
(
oldData
))
{
BeanUtils
.
copyProperties
(
oldData
,
financingRectificationOrder
);
financingRectificationOrder
.
setSequenceNbr
(
null
);
financingRectificationOrder
.
setCompleteDate
(
null
);
financingRectificationOrder
.
setRectificationPhoto
(
null
);
}
financingRectificationOrder
.
setRectificationOrderCode
(
String
.
valueOf
(
new
Date
().
getTime
()));
financingRectificationOrder
.
setRectificationStatus
(
"待整改"
);
financingRectificationOrder
.
setProblemDescription
(
params
.
getOrDefault
(
"problemDescription"
,
""
).
toString
());
financingRectificationOrder
.
setPeasantHouseholdName
(
params
.
getOrDefault
(
"peasantHouseholdName"
,
""
).
toString
());
financingRectificationOrder
.
setRectificationDescription
(
params
.
getOrDefault
(
"rectificationDescription"
,
""
).
toString
());
financingRectificationOrder
.
setPeasantHouseholdId
(
financingInfo
.
getPeasantHouseholdId
());
financingRectificationOrder
.
setResponsibleUserName
(
params
.
getOrDefault
(
"responsibleUserName"
,
""
).
toString
());
financingRectificationOrder
.
setResponsibleUserPhone
(
params
.
getOrDefault
(
"responsibleUserPhone"
,
""
).
toString
());
financingRectificationOrderService
.
save
(
financingRectificationOrder
);
FinancingRectificationOrder
financingRectificationOrder
=
new
FinancingRectificationOrder
();
//若存在历史整改单 将历史整改单数据同步至新整改单 便于修改
if
(
ObjectUtils
.
isNotEmpty
(
oldData
))
{
BeanUtils
.
copyProperties
(
oldData
,
financingRectificationOrder
);
financingRectificationOrder
.
setSequenceNbr
(
null
);
financingRectificationOrder
.
setCompleteDate
(
null
);
financingRectificationOrder
.
setRectificationPhoto
(
null
);
}
financingRectificationOrder
.
setRectificationOrderCode
(
String
.
valueOf
(
new
Date
().
getTime
()));
financingRectificationOrder
.
setRectificationStatus
(
"待整改"
);
financingRectificationOrder
.
setProblemDescription
(
params
.
getOrDefault
(
"problemDescription"
,
""
).
toString
());
financingRectificationOrder
.
setPeasantHouseholdName
(
params
.
getOrDefault
(
"peasantHouseholdName"
,
""
).
toString
());
financingRectificationOrder
.
setRectificationDescription
(
params
.
getOrDefault
(
"rectificationDescription"
,
""
).
toString
());
financingRectificationOrder
.
setPeasantHouseholdId
(
financingInfo
.
getPeasantHouseholdId
());
financingRectificationOrder
.
setResponsibleUserName
(
params
.
getOrDefault
(
"responsibleUserName"
,
""
).
toString
());
financingRectificationOrder
.
setResponsibleUserPhone
(
params
.
getOrDefault
(
"responsibleUserPhone"
,
""
).
toString
());
financingRectificationOrderService
.
save
(
financingRectificationOrder
);
}
}
public
List
<
Map
<
String
,
Object
>>
selectOrgList
()
{
return
this
.
getBaseMapper
().
selectOrgList
();
public
List
<
Map
<
String
,
Object
>>
selectOrgList
()
{
return
this
.
getBaseMapper
().
selectOrgList
();
}
}
\ No newline at end of file
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 @
e02ce526
...
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
...
...
@@ -38,8 +37,6 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* 勘察信息服务实现类
...
...
@@ -49,33 +46,31 @@ import java.util.stream.Stream;
*/
@Service
@Slf4j
public
class
SurveyInformationServiceImpl
extends
BaseService
<
SurveyInformationDto
,
SurveyInformation
,
SurveyInformationMapper
>
implements
ISurveyInformationService
{
public
class
SurveyInformationServiceImpl
extends
BaseService
<
SurveyInformationDto
,
SurveyInformation
,
SurveyInformationMapper
>
implements
ISurveyInformationService
{
private
static
final
String
regionRedis
=
"app_region_redis"
;
private
static
final
String
OPERATION_TYPE_SUBMIT
=
"submit"
;
private
static
final
String
OPERATION_TYPE_APPLY
=
"apply"
;
private
static
final
String
IDX_REQUEST_STATE
=
"200"
;
@Autowired
protected
EmqKeeper
emqKeeper
;
@Autowired
SurveyDetailsServiceImpl
surveyDetailsService
;
@Autowired
InformationServiceImpl
informationService
;
@Autowired
ExtendedInformationServiceImpl
extendedInformationService
;
@Autowired
CommercialServiceImpl
commercialService
;
@Autowired
PeasantHouseholdServiceImpl
peasantHouseholdServiceImpl
;
@Autowired
DesignInformationServiceImpl
designInformationService
;
@Autowired
WorkflowFeignClient
workflowFeignClient
;
@Autowired
RedisUtils
redisUtils
;
@Autowired
IdxFeginService
idxFeginService
;
@Autowired
...
...
@@ -86,22 +81,10 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
ToDoTasksMapper
toDoTasksMapper
;
@Autowired
UserMessageMapper
userMessageMapper
;
@Value
(
"${power.station.examine.pageId}"
)
private
long
pageId
;
@Autowired
protected
EmqKeeper
emqKeeper
;
@Value
(
"${power.station.examine.planId}"
)
private
String
planId
;
private
static
final
String
regionRedis
=
"app_region_redis"
;
private
static
final
String
OPERATION_TYPE_SUBMIT
=
"submit"
;
private
static
final
String
OPERATION_TYPE_APPLY
=
"apply"
;
private
static
final
String
IDX_REQUEST_STATE
=
"200"
;
@Autowired
PersonnelBusinessMapper
personnelBusinessMapper
;
@Autowired
PeasantHouseholdMapper
peasantHouseholdMapper
;
PeasantHouseholdMapper
peasantHouseholdMapper
;
@Autowired
WorkOrderMapper
workOrderMapper
;
@Autowired
...
...
@@ -111,8 +94,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
@Autowired
ConstructionRecordsMapper
constructionRecordsMapper
;
@Autowired
BasicGridAcceptanceMapper
basicGridAcceptanceMapper
;
BasicGridAcceptanceMapper
basicGridAcceptanceMapper
;
@Autowired
SurveyInformationMapper
surveyInformationMapper
;
@Autowired
...
...
@@ -123,141 +105,145 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
WorkOrderPowerStationMapper
workOrderPowerStationMapper
;
@Autowired
AmosRequestContext
requestContext
;
@Autowired
WorkflowImpl
workflow
;
@Value
(
"${power.station.examine.pageId}"
)
private
long
pageId
;
@Value
(
"${power.station.examine.planId}"
)
private
String
planId
;
@Autowired
private
CommonServiceImpl
commonService
;
/**
* 分页查询
*/
public
Page
<
SurveyInformationDto
>
queryForSurveyInformationPage
(
Page
<
SurveyInformationDto
>
page
)
{
public
Page
<
SurveyInformationDto
>
queryForSurveyInformationPage
(
Page
<
SurveyInformationDto
>
page
)
{
return
this
.
queryForPage
(
page
,
"rec_date"
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
SurveyInformationDto
>
queryForSurveyInformationList
()
{
return
this
.
queryForList
(
""
,
false
);
public
List
<
SurveyInformationDto
>
queryForSurveyInformationList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Transactional
public
SurveyInfoAllDto
saveSurveyInfo
(
SurveyInfoAllDto
surveyInfoAllDto
,
String
operationType
)
{
public
SurveyInfoAllDto
saveSurveyInfo
(
SurveyInfoAllDto
surveyInfoAllDto
,
String
operationType
)
{
try
{
JSONArray
regionName
=
getRegionName
();
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
JSONArray
regionName
=
getRegionName
();
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
//更新勘察基本信息
SurveyInformation
surveyInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getSurveyInformation
(),
SurveyInformation
.
class
);
surveyInformation
.
setReview
(
0
);
if
(
OPERATION_TYPE_APPLY
.
equals
(
operationType
)
&&
null
==
surveyInformation
.
getCreatorTime
())
{
//更新勘察基本信息
SurveyInformation
surveyInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getSurveyInformation
(),
SurveyInformation
.
class
);
surveyInformation
.
setReview
(
0
);
if
(
OPERATION_TYPE_APPLY
.
equals
(
operationType
)
&&
null
==
surveyInformation
.
getCreatorTime
())
{
surveyInformation
.
setCreatorTime
(
new
Date
());
}
this
.
saveOrUpdate
(
surveyInformation
);
//更新扩展信息
ExtendedInformation
extendedInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getExtendedInformation
(),
ExtendedInformation
.
class
);
extendedInformation
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
extendedInformationService
.
saveOrUpdate
(
extendedInformation
);
//更新勘察明细信息
SurveyDetailsDto
oldSurveyDetails
=
surveyInfoAllDto
.
getSurveyDetails
();
SurveyDetails
surveyDetails
=
BeanDtoUtils
.
convert
(
oldSurveyDetails
,
SurveyDetails
.
class
);
surveyDetails
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
surveyDetailsService
.
saveOrUpdate
(
surveyDetails
);
//更新商务信息
CommercialDto
oldCommercial
=
surveyInfoAllDto
.
getCommercial
();
Commercial
commercial
=
BeanDtoUtils
.
convert
(
oldCommercial
,
Commercial
.
class
);
// 处理省市县
String
paddressName
=
""
;
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
paddressName
=
paddressName
+
re
.
getRegionName
()
+
"/"
;
this
.
saveOrUpdate
(
surveyInformation
);
//更新扩展信息
ExtendedInformation
extendedInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getExtendedInformation
(),
ExtendedInformation
.
class
);
extendedInformation
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
extendedInformationService
.
saveOrUpdate
(
extendedInformation
);
//更新勘察明细信息
SurveyDetailsDto
oldSurveyDetails
=
surveyInfoAllDto
.
getSurveyDetails
();
SurveyDetails
surveyDetails
=
BeanDtoUtils
.
convert
(
oldSurveyDetails
,
SurveyDetails
.
class
);
surveyDetails
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
surveyDetailsService
.
saveOrUpdate
(
surveyDetails
);
//更新商务信息
CommercialDto
oldCommercial
=
surveyInfoAllDto
.
getCommercial
();
Commercial
commercial
=
BeanDtoUtils
.
convert
(
oldCommercial
,
Commercial
.
class
);
// 处理省市县
String
paddressName
=
""
;
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
paddressName
=
paddressName
+
re
.
getRegionName
()
+
"/"
;
}
}
}
}
commercial
.
setProjectAddressName
(
paddressName
.
substring
(
0
,
paddressName
.
length
()
-
1
));
commercial
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
()
);
commercialService
.
saveOrUpdate
(
commercial
);
//勘察后,更新状态
QueryWrapper
<
PeasantHousehold
>
peasantHouseholdQueryWrapper
=
new
QueryWrapper
<>(
);
peasantHouseholdQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformation
.
getSequenceNbr
()
);
PeasantHousehold
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdQueryWrapper
);
//更新资料归档信息
Information
information
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getInformation
(),
Information
.
class
);
information
.
setHouseProve
(
null
==
commercial
?
null
:(
CollectionUtil
.
isNotEmpty
(
commercial
.
getRealEstateLegal
())?
commercial
.
getRealEstateLegal
():
null
));
information
.
setCardFile
(
null
==
commercial
?
null
:(
CollectionUtil
.
isNotEmpty
(
commercial
.
getIdCardCredit
())?
commercial
.
getIdCardCredit
():
null
));
information
.
setCardFile
(
commercial
.
getAgentLegal
(
));
information
.
setArchivesNumber
(
this
.
getNo
(
CodeEnum
.
档案
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()));
information
.
setFileNumber
(
this
.
getNo
(
CodeEnum
.
文件
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()
));
information
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
()
);
informationService
.
saveOrUpdate
(
information
);
peasantHousehold
.
setOwnersName
(
surveyInfoAllDto
.
getSurveyInformation
().
getOwnersNam
e
());
peasantHousehold
.
setTelephone
(
surveyInfoAllDto
.
getSurveyInformation
().
getTelephone
());
peasantHousehold
.
setIdCard
(
surveyInfoAllDto
.
getSurveyInformation
().
getIdCard
());
peasantHousehold
.
setMailbox
(
surveyInfoAllDto
.
getSurveyInformation
().
getMailbox
());
peasantHousehold
.
setProjectAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
());
peasantHousehold
.
setProjectAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddressDetail
());
peasantHousehold
.
setPermanentAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
());
peasantHousehold
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
peasantHousehold
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
// 处理项目地址
String
projectAddressName
=
""
;
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
()
)
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
projectAddressName
=
projectAddressName
+
re
.
getRegionName
()
+
"/"
;
commercial
.
setProjectAddressName
(
paddressName
.
substring
(
0
,
paddressName
.
length
()
-
1
));
commercial
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
(
));
commercialService
.
saveOrUpdate
(
commercial
);
//勘察后,更新状态
QueryWrapper
<
PeasantHousehold
>
peasantHouseholdQueryWrapper
=
new
QueryWrapper
<>();
peasantHouseholdQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformation
.
getSequenceNbr
()
);
PeasantHousehold
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdQueryWrapper
);
//更新资料归档信息
Information
information
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getInformation
(),
Information
.
class
);
information
.
setHouseProve
(
null
==
commercial
?
null
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getRealEstateLegal
())
?
commercial
.
getRealEstateLegal
()
:
null
)
);
information
.
setCardFile
(
null
==
commercial
?
null
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getIdCardCredit
())
?
commercial
.
getIdCardCredit
()
:
null
));
information
.
setCardFile
(
commercial
.
getAgentLegal
(
));
information
.
setArchivesNumber
(
this
.
getNo
(
CodeEnum
.
档案
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()
));
information
.
setFileNumber
(
this
.
getNo
(
CodeEnum
.
文件
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()));
information
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
(
));
informationService
.
saveOrUpdate
(
information
);
peasantHousehold
.
setOwnersName
(
surveyInfoAllDto
.
getSurveyInformation
().
getOwnersName
());
peasantHousehold
.
setTelephone
(
surveyInfoAllDto
.
getSurveyInformation
().
getTelephon
e
());
peasantHousehold
.
setIdCard
(
surveyInfoAllDto
.
getSurveyInformation
().
getIdCard
());
peasantHousehold
.
setMailbox
(
surveyInfoAllDto
.
getSurveyInformation
().
getMailbox
());
peasantHousehold
.
setProjectAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
());
peasantHousehold
.
setProjectAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddressDetail
());
peasantHousehold
.
setPermanentAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
());
peasantHousehold
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
peasantHousehold
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
// 处理项目地址
String
projectAddressName
=
""
;
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
))
)
{
projectAddressName
=
projectAddressName
+
re
.
getRegionName
()
+
"/"
;
}
}
}
}
peasantHousehold
.
setProjectAddressName
(
projectAddressName
.
substring
(
0
,
projectAddressName
.
length
()
-
1
));
//常住地址
String
permanentAddressName
=
""
;
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
()
)
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
permanentAddressName
=
permanentAddressName
+
re
.
getRegionName
()
+
"/"
;
peasantHousehold
.
setProjectAddressName
(
projectAddressName
.
substring
(
0
,
projectAddressName
.
length
()
-
1
));
//常住地址
String
permanentAddressName
=
""
;
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
())
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
))
)
{
permanentAddressName
=
permanentAddressName
+
re
.
getRegionName
()
+
"/"
;
}
}
}
}
peasantHousehold
.
setPermanentAddressName
(
permanentAddressName
.
substring
(
0
,
permanentAddressName
.
length
()
-
1
));
if
(
OPERATION_TYPE_SUBMIT
.
equals
(
operationType
)){
// peasantHousehold.setSurveyOrNot(1);
}
else
if
(
OPERATION_TYPE_APPLY
.
equals
(
operationType
)){
// 提交审核
submitExamine
(
peasantHousehold
);
LambdaQueryWrapper
<
ToDoTasks
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ToDoTasks:
:
getType
,
TaskTypeStationEnum
.
电站勘察
.
getCode
());
wrapper
.
eq
(
ToDoTasks:
:
getState
,
"待办"
);
wrapper
.
eq
(
ToDoTasks:
:
getBusinessId
,
peasantHousehold
.
getSequenceNbr
());
ToDoTasks
doTasks
=
toDoTasksMapper
.
selectOne
(
wrapper
);
if
(
doTasks
!=
null
){
doTasks
.
setState
(
"已办"
);
doTasks
.
setCompleteTime
(
new
Date
());
toDoTasksMapper
.
updateById
(
doTasks
);
emqKeeper
.
getMqttClient
().
publish
(
"TASK_MESSAGE"
,
JSON
.
toJSONString
(
doTasks
).
getBytes
(),
2
,
false
);
UserMessage
userMessage
=
new
UserMessage
(
doTasks
.
getType
(),
doTasks
.
getBusinessId
(),
doTasks
.
getAmosUserId
(),
new
Date
(),
doTasks
.
getTaskName
()+
"已完成"
,
doTasks
.
getAmosOrgCode
());
userMessageMapper
.
insert
(
userMessage
);
emqKeeper
.
getMqttClient
().
publish
(
"MY_MESSAGE"
,
JSON
.
toJSONString
(
userMessage
).
getBytes
(),
2
,
false
);
peasantHousehold
.
setPermanentAddressName
(
permanentAddressName
.
substring
(
0
,
permanentAddressName
.
length
()
-
1
));
if
(
OPERATION_TYPE_SUBMIT
.
equals
(
operationType
))
{
// peasantHousehold.setSurveyOrNot(1);
}
else
if
(
OPERATION_TYPE_APPLY
.
equals
(
operationType
))
{
// 提交审核
submitExamine
(
peasantHousehold
);
LambdaQueryWrapper
<
ToDoTasks
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ToDoTasks:
:
getType
,
TaskTypeStationEnum
.
电站勘察
.
getCode
());
wrapper
.
eq
(
ToDoTasks:
:
getState
,
"待办"
);
wrapper
.
eq
(
ToDoTasks:
:
getBusinessId
,
peasantHousehold
.
getSequenceNbr
());
ToDoTasks
doTasks
=
toDoTasksMapper
.
selectOne
(
wrapper
);
if
(
doTasks
!=
null
)
{
doTasks
.
setState
(
"已办"
);
doTasks
.
setCompleteTime
(
new
Date
());
toDoTasksMapper
.
updateById
(
doTasks
);
emqKeeper
.
getMqttClient
().
publish
(
"TASK_MESSAGE"
,
JSON
.
toJSONString
(
doTasks
).
getBytes
(),
2
,
false
);
UserMessage
userMessage
=
new
UserMessage
(
doTasks
.
getType
(),
doTasks
.
getBusinessId
(),
doTasks
.
getAmosUserId
(),
new
Date
(),
doTasks
.
getTaskName
()
+
"已完成"
,
doTasks
.
getAmosOrgCode
());
userMessageMapper
.
insert
(
userMessage
);
emqKeeper
.
getMqttClient
().
publish
(
"MY_MESSAGE"
,
JSON
.
toJSONString
(
userMessage
).
getBytes
(),
2
,
false
);
}
}
}
peasantHouseholdServiceImpl
.
saveOrUpdate
(
peasantHousehold
);
peasantHouseholdServiceImpl
.
saveOrUpdate
(
peasantHousehold
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
BadRequest
(
"系统异常"
);
}
...
...
@@ -265,23 +251,21 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
return
surveyInfoAllDto
;
}
public
String
getNo
(
String
type
,
Long
sequenceNbr
)
{
RegionalCompanies
da
=
regionalCompaniesMapper
.
selectRegionName
(
sequenceNbr
);
if
(
da
.
getCompanyCode
()==
null
||
da
.
getCompanyCode
().
isEmpty
())
{
public
String
getNo
(
String
type
,
Long
sequenceNbr
)
{
RegionalCompanies
da
=
regionalCompaniesMapper
.
selectRegionName
(
sequenceNbr
);
if
(
da
.
getCompanyCode
()
==
null
||
da
.
getCompanyCode
().
isEmpty
())
{
throw
new
BadRequest
(
"区域公司编号为空, 请设置编号"
);
}
if
(
da
.
getRegionalAddress
()==
null
||
da
.
getRegionalAddress
().
isEmpty
())
{
if
(
da
.
getRegionalAddress
()
==
null
||
da
.
getRegionalAddress
().
isEmpty
())
{
throw
new
BadRequest
(
"区域公司省市区为空, 请设置省市区"
);
}
String
code
=
NumberUtil
.
getCode
(
type
,
da
.
getCompanyCode
(),
da
.
getRegionalAddress
());
String
code
=
NumberUtil
.
getCode
(
type
,
da
.
getCompanyCode
(),
da
.
getRegionalAddress
());
return
code
;
}
private
void
submitExamine
(
PeasantHousehold
peasantHousehold
)
{
PowerStation
powerStation
=
powerStationService
.
getObjByNhId
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()),
PowerStationProcessStateEnum
.
作废
.
getCode
());
String
taskId
=
null
;
...
...
@@ -292,10 +276,10 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
try
{
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
if
(
ObjectUtils
.
isNotEmpty
(
powerStation
))
{
// 工作流执行一步
// taskId = powerStation.getTaskId();
// taskId = powerStation.getTaskId();
StandardDto
standardDto
=
new
StandardDto
();
standardDto
.
setResult
(
"0"
);
standardDto
.
setTaskId
(
powerStation
.
getFlowTaskId
());
...
...
@@ -311,51 +295,51 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
processDto
.
setBusinessKey
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()));
processDto
.
setProcessDefinitionKey
(
"hygf_10001"
);
StartProcessDto
startProcessDto
=
new
StartProcessDto
();
List
<
ProcessDto
>
process
=
new
ArrayList
<>();
List
<
ProcessDto
>
process
=
new
ArrayList
<>();
process
.
add
(
processDto
);
startProcessDto
.
setProcess
(
process
);
workflow
.
startProcess
(
basicGridAcceptance
,
startProcessDto
,
requestContext
.
getUserId
());
powerStation
=
new
PowerStation
();
workflow
.
startProcess
(
basicGridAcceptance
,
startProcessDto
,
requestContext
.
getUserId
());
powerStation
=
new
PowerStation
();
}
peasantHousehold
.
setSurveyOrNot
(
2
);
peasantHousehold
.
setReview
(
1
);
// 插入记录表
powerStation
.
setPlanInstanceId
(
planId
);
powerStation
.
setPowerStationCode
(
peasantHousehold
.
getPeasantHouseholdNo
());
powerStation
.
setOwnersName
(
peasantHousehold
.
getOwnersName
());
powerStation
.
setProjectAddress
(
peasantHousehold
.
getProjectAddressName
());
powerStation
.
setPeasantHouseholdId
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()));
powerStation
.
setProcessStatus
(
PowerStationProcessStateEnum
.
进行中
.
getName
());
powerStation
.
setServiceAgent
(
peasantHousehold
.
getDeveloperName
());
// 获取流程信息
powerStation
.
setTaskId
(
basicGridAcceptance
.
getNextTaskId
());
powerStation
.
setProcessInstanceId
(
basicGridAcceptance
.
getInstanceId
());
powerStation
.
setFlowTaskId
(
basicGridAcceptance
.
getNextTaskId
());
powerStation
.
setNodeRole
(
basicGridAcceptance
.
getNextExecutorIds
());
powerStation
.
setNodeRouting
(
PowerStationEnum
.
getNodeByKey
(
basicGridAcceptance
.
getNextNodeKey
()));
powerStation
.
setNextProcessNode
(
PowerStationNodeEnum
.
设计审核
.
getCode
());
powerStation
.
setPromoter
(
basicGridAcceptance
.
getPromoter
());
powerStation
.
setNextExecuteUserIds
(
basicGridAcceptance
.
getNextExecuteUserIds
());
powerStation
.
setNextNodeName
(
basicGridAcceptance
.
getNextNodeName
());
powerStationService
.
savePowerStation
(
powerStation
,
true
,
powerStation
.
getOwnersName
(),
""
);
//
peasantHousehold
.
setSurveyOrNot
(
2
);
peasantHousehold
.
setReview
(
1
);
// 插入记录表
powerStation
.
setPlanInstanceId
(
planId
);
powerStation
.
setPowerStationCode
(
peasantHousehold
.
getPeasantHouseholdNo
());
powerStation
.
setOwnersName
(
peasantHousehold
.
getOwnersName
());
powerStation
.
setProjectAddress
(
peasantHousehold
.
getProjectAddressName
());
powerStation
.
setPeasantHouseholdId
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()));
powerStation
.
setProcessStatus
(
PowerStationProcessStateEnum
.
进行中
.
getName
());
powerStation
.
setServiceAgent
(
peasantHousehold
.
getDeveloperName
());
// 获取流程信息
powerStation
.
setTaskId
(
basicGridAcceptance
.
getNextTaskId
());
powerStation
.
setProcessInstanceId
(
basicGridAcceptance
.
getInstanceId
());
powerStation
.
setFlowTaskId
(
basicGridAcceptance
.
getNextTaskId
());
powerStation
.
setNodeRole
(
basicGridAcceptance
.
getNextExecutorIds
());
powerStation
.
setNodeRouting
(
PowerStationEnum
.
getNodeByKey
(
basicGridAcceptance
.
getNextNodeKey
()));
powerStation
.
setNextProcessNode
(
PowerStationNodeEnum
.
设计审核
.
getCode
());
powerStation
.
setPromoter
(
basicGridAcceptance
.
getPromoter
());
powerStation
.
setNextExecuteUserIds
(
basicGridAcceptance
.
getNextExecuteUserIds
());
powerStation
.
setNextNodeName
(
basicGridAcceptance
.
getNextNodeName
());
powerStationService
.
savePowerStation
(
powerStation
,
true
,
powerStation
.
getOwnersName
(),
""
);
//
peasantHousehold
.
setConstructionState
(
ArrivalStateeEnum
.
勘察中
.
getCode
());
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
勘察中
.
getCode
());
long
idsk
=
peasantHousehold
.
getSequenceNbr
();
up
.
eq
(
PeasantHousehold:
:
getSequenceNbr
,
idsk
);
peasantHouseholdMapper
.
update
(
null
,
up
);
long
idsk
=
peasantHousehold
.
getSequenceNbr
();
up
.
eq
(
PeasantHousehold:
:
getSequenceNbr
,
idsk
);
peasantHouseholdMapper
.
update
(
null
,
up
);
//发起待办
commonService
.
buildTaskModel
(
buildDZSHTaskModel
(
peasantHousehold
,
basicGridAcceptance
));
}
catch
(
Exception
e
){
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
// PowerStation powerStation = powerStationService.getObjByNhId(String.valueOf(peasantHousehold.getSequenceNbr()), PowerStationProcessStateEnum.作废.getCode());
//
// String taskId = null;
...
...
@@ -404,16 +388,45 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
// }
}
public
SurveyInfoAllDto
querySurveyInfo
(
String
surveyInformationId
,
String
peasantHouseholdId
,
String
processInstanceId
,
AgencyUserModel
userInfo
)
{
private
List
<
TaskModelDto
>
buildDZSHTaskModel
(
PeasantHousehold
peasantHousehold
,
BasicGridAcceptance
basicGridAcceptance
)
{
List
<
TaskModelDto
>
taskModelDtoList
=
new
ArrayList
<>();
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
taskModelDto
.
setFlowCode
(
basicGridAcceptance
.
getNextTaskId
());
taskModelDto
.
setFlowCreateDate
(
new
Date
());
taskModelDto
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
taskModelDto
.
setFlowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setPageType
(
null
);
taskModelDto
.
setExecuteUserIds
(
basicGridAcceptance
.
getNextExecuteUserIds
());
taskModelDto
.
setModel
(
peasantHousehold
);
taskModelDto
.
setRelationId
(
basicGridAcceptance
.
getInstanceId
());
taskModelDto
.
setRoutePath
(
null
);
taskModelDto
.
setStartUserId
(
basicGridAcceptance
.
getRecUserId
());
taskModelDto
.
setStartUser
(
basicGridAcceptance
.
getRecUserName
());
taskModelDto
.
setStartDate
(
basicGridAcceptance
.
getRecDate
());
taskModelDto
.
setStartUserCompanyName
(
peasantHousehold
.
getRegionalCompaniesName
());
taskModelDto
.
setTaskName
(
basicGridAcceptance
.
getNextNodeName
());
taskModelDto
.
setTaskCode
(
String
.
valueOf
(
basicGridAcceptance
.
getWorkOrderId
()));
taskModelDto
.
setTaskType
(
BusinessTypeEnum
.
HYGF_DZ_SH
.
getCode
());
taskModelDto
.
setTaskTypeLabel
(
BusinessTypeEnum
.
HYGF_DZ_SH
.
getName
());
taskModelDto
.
setTaskStatus
(
TaskStatusEnum
.
UNDERWAY
.
getValue
());
taskModelDto
.
setTaskStatusLabel
(
TaskStatusEnum
.
UNDERWAY
.
getName
());
// taskModelDto.setTaskDesc();
// taskModelDto.setTaskContent();
taskModelDto
.
setNextExecuteUser
(
basicGridAcceptance
.
getNextExecutorIds
());
taskModelDtoList
.
add
(
taskModelDto
);
return
taskModelDtoList
;
}
public
SurveyInfoAllDto
querySurveyInfo
(
String
surveyInformationId
,
String
peasantHouseholdId
,
String
processInstanceId
,
AgencyUserModel
userInfo
)
{
SurveyInfoAllDto
surveyInfoAllDto
=
new
SurveyInfoAllDto
();
PeasantHousehold
peasantHousehold
=
new
PeasantHousehold
();
if
(!
StringUtils
.
isEmpty
(
peasantHouseholdId
))
{
if
(!
StringUtils
.
isEmpty
(
peasantHouseholdId
))
{
LambdaQueryWrapper
<
PeasantHousehold
>
peasantHouseholdWrapper
=
new
LambdaQueryWrapper
<>();
peasantHouseholdWrapper
.
eq
(
PeasantHousehold:
:
getSequenceNbr
,
peasantHouseholdId
);
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdWrapper
);
surveyInformationId
=
String
.
valueOf
(
peasantHousehold
.
getSurveyInformationId
());
}
else
{
}
else
{
QueryWrapper
<
PeasantHousehold
>
peasantHouseholdQueryWrapper
=
new
QueryWrapper
<>();
peasantHouseholdQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdQueryWrapper
);
...
...
@@ -427,26 +440,26 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
//获取用户所在经销商单位
UserUnitInformationDto
userUnitInformationDto
=
personnelBusinessMapper
.
getUserUnitInformationDto
(
peasantHousehold
.
getDeveloperUserId
());
UserUnitInformationDto
userUnitInformationDto
=
personnelBusinessMapper
.
getUserUnitInformationDto
(
peasantHousehold
.
getDeveloperUserId
());
BeanUtils
.
copyProperties
(
peasantHousehold
,
surveyInfoAllDto
.
getSurveyInformation
());
surveyInfoAllDto
.
getSurveyInformation
().
setDeveloperName
(
userUnitInformationDto
.
getAmosDealerName
());
surveyInfoAllDto
.
getSurveyInformation
().
setDeveloperCode
(
userUnitInformationDto
.
getAmosDealerOrgCode
());
surveyInfoAllDto
.
getSurveyInformation
().
setDeveloperId
(
userUnitInformationDto
.
getAmosDealerId
());
if
(
surveyInfoAllDto
.
getSurveyInformation
().
getSalesmanId
()==
null
)
{
surveyInfoAllDto
.
getSurveyInformation
().
setSalesmanId
(
peasantHousehold
.
getDeveloperUserId
());
surveyInfoAllDto
.
getSurveyInformation
().
setSalesman
(
peasantHousehold
.
getDeveloper
());
surveyInfoAllDto
.
getSurveyInformation
().
setCreator
(
peasantHousehold
.
getDeveloper
());
}
if
(
surveyInfoAllDto
.
getSurveyInformation
().
getSalesmanId
()
==
null
)
{
surveyInfoAllDto
.
getSurveyInformation
().
setSalesmanId
(
peasantHousehold
.
getDeveloperUserId
());
surveyInfoAllDto
.
getSurveyInformation
().
setSalesman
(
peasantHousehold
.
getDeveloper
());
surveyInfoAllDto
.
getSurveyInformation
().
setCreator
(
peasantHousehold
.
getDeveloper
());
}
if
(!
StringUtils
.
isEmpty
(
peasantHousehold
.
getProjectAddressName
()))
{
surveyInfoAllDto
.
getSurveyInformation
().
setProjectAddressText
(
Arrays
.
asList
(
peasantHousehold
.
getProjectAddressName
().
split
(
"/"
)));
}
if
(!
StringUtils
.
isEmpty
(
peasantHousehold
.
getPermanentAddressName
()))
{
if
(!
StringUtils
.
isEmpty
(
peasantHousehold
.
getPermanentAddressName
()))
{
surveyInfoAllDto
.
getSurveyInformation
().
setPermanentAddressText
(
Arrays
.
asList
(
peasantHousehold
.
getPermanentAddressName
().
split
(
"/"
)));
}
if
(
peasantHousehold
.
getPermanentAddress
()
==
null
)
{
if
(
peasantHousehold
.
getPermanentAddress
()
==
null
)
{
surveyInfoAllDto
.
getSurveyInformation
().
setPermanentAddress
(
peasantHousehold
.
getProjectAddress
());
surveyInfoAllDto
.
getSurveyInformation
().
setIsPermanent
(
"1"
);
}
...
...
@@ -455,14 +468,14 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
surveyInfoAllDto
.
getSurveyInformation
().
setSequenceNbr
(
surveyInformation
.
getSequenceNbr
());
//制单时间
surveyInfoAllDto
.
getSurveyInformation
().
setCreatorTime
(
surveyInformation
.
getCreatorTime
());
QueryWrapper
<
SurveyDetails
>
surveyDetailsQueryWrapper
=
new
QueryWrapper
<>();
surveyDetailsQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
SurveyDetails
surveyDetails
=
surveyDetailsService
.
getBaseMapper
().
selectOne
(
surveyDetailsQueryWrapper
);
if
(
surveyDetails
==
null
)
{
if
(
surveyDetails
==
null
)
{
surveyInfoAllDto
.
setSurveyDetails
(
new
SurveyDetailsDto
());
}
else
{
}
else
{
surveyInfoAllDto
.
setSurveyDetails
(
BeanDtoUtils
.
convert
(
surveyDetails
,
SurveyDetailsDto
.
class
));
}
...
...
@@ -473,15 +486,15 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
QueryWrapper
<
Commercial
>
commercialQueryWrapper
=
new
QueryWrapper
<>();
commercialQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
Commercial
commercial
=
commercialService
.
getBaseMapper
().
selectOne
(
commercialQueryWrapper
);
if
(
commercial
==
null
)
{
commercial
=
new
Commercial
();
if
(
commercial
==
null
)
{
commercial
=
new
Commercial
();
}
if
(
information
==
null
)
{
if
(
information
==
null
)
{
surveyInfoAllDto
.
setInformation
(
new
InformationDto
());
}
else
{
information
.
setHouseProve
(
null
==
commercial
?
new
ArrayList
<>()
:(
CollectionUtil
.
isNotEmpty
(
commercial
.
getRealEstateLegal
())?
commercial
.
getRealEstateLegal
():
new
ArrayList
<>()));
information
.
setCardFile
(
null
==
commercial
?
new
ArrayList
<>()
:(
CollectionUtil
.
isNotEmpty
(
commercial
.
getIdCardCredit
())?
commercial
.
getIdCardCredit
():
new
ArrayList
<>()));
}
else
{
information
.
setHouseProve
(
null
==
commercial
?
new
ArrayList
<>()
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getRealEstateLegal
())
?
commercial
.
getRealEstateLegal
()
:
new
ArrayList
<>()));
information
.
setCardFile
(
null
==
commercial
?
new
ArrayList
<>()
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getIdCardCredit
())
?
commercial
.
getIdCardCredit
()
:
new
ArrayList
<>()));
surveyInfoAllDto
.
setInformation
(
BeanDtoUtils
.
convert
(
information
,
InformationDto
.
class
));
}
...
...
@@ -494,34 +507,34 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
commercial
.
setLegalContactTelephone
(
peasantHousehold
.
getTelephone
());
List
<
Object
>
list
=
new
ArrayList
<>();
if
(
null
!=
surveyDetails
){
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getSurroundingHouseSurvey
())){
if
(
null
!=
surveyDetails
)
{
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getSurroundingHouseSurvey
()))
{
list
.
addAll
(
surveyDetails
.
getSurroundingHouseSurvey
());
}
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getOverallHousingSurvey
())){
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getOverallHousingSurvey
()))
{
list
.
addAll
(
surveyDetails
.
getOverallHousingSurvey
());
}
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getPanoramaSurvey
())){
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getPanoramaSurvey
()))
{
list
.
addAll
(
surveyDetails
.
getPanoramaSurvey
());
}
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getPlanSketchSurvey
())){
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getPlanSketchSurvey
()))
{
list
.
addAll
(
surveyDetails
.
getPlanSketchSurvey
());
}
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getAzimuthSurvey
())){
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getAzimuthSurvey
()))
{
list
.
addAll
(
surveyDetails
.
getAzimuthSurvey
());
}
}
commercial
.
setSurveyPhotosWeb
(
list
);
if
(
information
==
null
)
{
if
(
information
==
null
)
{
CommercialDto
commercialDto
=
BeanDtoUtils
.
convert
(
commercial
,
CommercialDto
.
class
);
commercialDto
.
setType
(
"zrr"
);
commercialDto
.
setLegalType
(
"zjdnhw"
);
surveyInfoAllDto
.
setCommercial
(
commercialDto
);
}
else
{
}
else
{
surveyInfoAllDto
.
setCommercial
(
BeanDtoUtils
.
convert
(
commercial
,
CommercialDto
.
class
));
if
(
commercial
!=
null
&&
!
StringUtils
.
isEmpty
(
commercial
.
getProjectAddressName
()))
{
if
(
commercial
!=
null
&&
!
StringUtils
.
isEmpty
(
commercial
.
getProjectAddressName
()))
{
surveyInfoAllDto
.
getCommercial
().
setProjectAddressText
(
Arrays
.
asList
(
commercial
.
getProjectAddressName
().
split
(
"/"
)));
}
}
...
...
@@ -529,48 +542,48 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
QueryWrapper
<
ExtendedInformation
>
extendedInformationQueryWrapper
=
new
QueryWrapper
<>();
extendedInformationQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
ExtendedInformation
extendedInformation
=
extendedInformationService
.
getBaseMapper
().
selectOne
(
extendedInformationQueryWrapper
);
if
(
information
==
null
)
{
if
(
information
==
null
)
{
surveyInfoAllDto
.
setExtendedInformation
(
new
ExtendedInformationDto
());
}
else
{
}
else
{
surveyInfoAllDto
.
setExtendedInformation
(
BeanDtoUtils
.
convert
(
extendedInformation
,
ExtendedInformationDto
.
class
));
}
QueryWrapper
<
DesignInformation
>
designInformationQueryWrapper
=
new
QueryWrapper
<>();
designInformationQueryWrapper
.
eq
(
"peasant_household_id"
,
peasantHousehold
.
getSequenceNbr
());
DesignInformation
designInformation
=
designInformationService
.
getBaseMapper
().
selectOne
(
designInformationQueryWrapper
);
if
(
designInformation
==
null
)
{
if
(
designInformation
==
null
)
{
surveyInfoAllDto
.
setDesignInformation
(
new
DesignInformationDto
());
}
else
{
}
else
{
surveyInfoAllDto
.
setDesignInformation
(
BeanDtoUtils
.
convert
(
designInformation
,
DesignInformationDto
.
class
));
}
LambdaQueryWrapper
<
WorkOrderPowerStation
>
up1
=
new
LambdaQueryWrapper
();
up1
.
eq
(
WorkOrderPowerStation:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
WorkOrderPowerStation
workOrderPowerStation
=
workOrderPowerStationMapper
.
selectOne
(
up1
);
if
(
workOrderPowerStation
!=
null
)
{
Long
workOrderId
=
workOrderPowerStation
.
getWorkOrderId
();
Long
workOrderPowerStationId
=
workOrderPowerStation
.
getSequenceNbr
();
LambdaQueryWrapper
<
WorkOrderPowerStation
>
up1
=
new
LambdaQueryWrapper
();
up1
.
eq
(
WorkOrderPowerStation:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
WorkOrderPowerStation
workOrderPowerStation
=
workOrderPowerStationMapper
.
selectOne
(
up1
);
if
(
workOrderPowerStation
!=
null
)
{
Long
workOrderId
=
workOrderPowerStation
.
getWorkOrderId
();
Long
workOrderPowerStationId
=
workOrderPowerStation
.
getSequenceNbr
();
//派工单信息
LambdaQueryWrapper
<
WorkOrder
>
upl
=
new
LambdaQueryWrapper
();
upl
.
eq
(
WorkOrder:
:
getSequenceNbr
,
workOrderId
);
WorkOrder
workOrder
=
workOrderMapper
.
selectOne
(
upl
);
LambdaQueryWrapper
<
WorkOrder
>
upl
=
new
LambdaQueryWrapper
();
upl
.
eq
(
WorkOrder:
:
getSequenceNbr
,
workOrderId
);
WorkOrder
workOrder
=
workOrderMapper
.
selectOne
(
upl
);
//施工信息
LambdaQueryWrapper
<
PowerStationConstructionData
>
up2
=
new
LambdaQueryWrapper
();
up2
.
eq
(
PowerStationConstructionData:
:
getWorkOrderId
,
workOrderId
);
up2
.
eq
(
PowerStationConstructionData:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
PowerStationConstructionData
powerStationConstructionData
=
powerStationConstructionDataMapper
.
selectOne
(
up2
);
LambdaQueryWrapper
<
PowerStationConstructionData
>
up2
=
new
LambdaQueryWrapper
();
up2
.
eq
(
PowerStationConstructionData:
:
getWorkOrderId
,
workOrderId
);
up2
.
eq
(
PowerStationConstructionData:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
PowerStationConstructionData
powerStationConstructionData
=
powerStationConstructionDataMapper
.
selectOne
(
up2
);
//工程信息
LambdaQueryWrapper
<
PowerStationEngineeringInfo
>
up3
=
new
LambdaQueryWrapper
();
up3
.
eq
(
PowerStationEngineeringInfo:
:
getWorkOrderId
,
workOrderId
);
up3
.
eq
(
PowerStationEngineeringInfo:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
PowerStationEngineeringInfo
powerStationEngineeringInfo
=
powerStationEngineeringInfoMapper
.
selectOne
(
up3
);
if
(
powerStationConstructionData
!=
null
)
{
powerStationEngineeringInfo
=
powerStationEngineeringInfo
!=
null
?
powerStationEngineeringInfo:
new
PowerStationEngineeringInfo
();
LambdaQueryWrapper
<
PowerStationEngineeringInfo
>
up3
=
new
LambdaQueryWrapper
();
up3
.
eq
(
PowerStationEngineeringInfo:
:
getWorkOrderId
,
workOrderId
);
up3
.
eq
(
PowerStationEngineeringInfo:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
PowerStationEngineeringInfo
powerStationEngineeringInfo
=
powerStationEngineeringInfoMapper
.
selectOne
(
up3
);
if
(
powerStationConstructionData
!=
null
)
{
powerStationEngineeringInfo
=
powerStationEngineeringInfo
!=
null
?
powerStationEngineeringInfo
:
new
PowerStationEngineeringInfo
();
powerStationEngineeringInfo
.
setConstructionComponentInfo
(
powerStationConstructionData
.
getConstructionComponentInfo
());
powerStationEngineeringInfo
.
setConstructionInverterInfo
(
powerStationConstructionData
.
getConstructionInverterInfo
());
powerStationEngineeringInfo
.
setConstructionCollectorBoxInfo
(
powerStationConstructionData
.
getConstructionCollectorBoxInfo
());
...
...
@@ -581,15 +594,15 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
powerStationEngineeringInfo
.
setConstructionRegionManagerPhone
(
workOrder
.
getConstructionRegionManagerPhone
());
}
//并网信息
LambdaQueryWrapper
<
HygfOnGrid
>
up4
=
new
LambdaQueryWrapper
();
up4
.
eq
(
HygfOnGrid:
:
getWorkOrderId
,
workOrderId
);
up4
.
eq
(
HygfOnGrid:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
HygfOnGrid
hygfOnGrid
=
hygfOnGridMapper
.
selectOne
(
up4
);
surveyInfoAllDto
.
setHygfOnGrid
(
hygfOnGrid
!=
null
?
hygfOnGrid:
new
HygfOnGrid
());
surveyInfoAllDto
.
setPowerStationConstructionData
(
powerStationConstructionData
!=
null
?
powerStationConstructionData:
new
PowerStationConstructionData
());
surveyInfoAllDto
.
setPowerStationEngineeringInfo
(
powerStationEngineeringInfo
!=
null
?
powerStationEngineeringInfo:
new
PowerStationEngineeringInfo
());
surveyInfoAllDto
.
setWorkOrder
(
workOrder
!=
null
?
workOrder:
new
WorkOrder
());
}
else
{
LambdaQueryWrapper
<
HygfOnGrid
>
up4
=
new
LambdaQueryWrapper
();
up4
.
eq
(
HygfOnGrid:
:
getWorkOrderId
,
workOrderId
);
up4
.
eq
(
HygfOnGrid:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
HygfOnGrid
hygfOnGrid
=
hygfOnGridMapper
.
selectOne
(
up4
);
surveyInfoAllDto
.
setHygfOnGrid
(
hygfOnGrid
!=
null
?
hygfOnGrid
:
new
HygfOnGrid
());
surveyInfoAllDto
.
setPowerStationConstructionData
(
powerStationConstructionData
!=
null
?
powerStationConstructionData
:
new
PowerStationConstructionData
());
surveyInfoAllDto
.
setPowerStationEngineeringInfo
(
powerStationEngineeringInfo
!=
null
?
powerStationEngineeringInfo
:
new
PowerStationEngineeringInfo
());
surveyInfoAllDto
.
setWorkOrder
(
workOrder
!=
null
?
workOrder
:
new
WorkOrder
());
}
else
{
surveyInfoAllDto
.
setHygfOnGrid
(
new
HygfOnGrid
());
surveyInfoAllDto
.
setPowerStationConstructionData
(
new
PowerStationConstructionData
());
surveyInfoAllDto
.
setPowerStationEngineeringInfo
(
new
PowerStationEngineeringInfo
());
...
...
@@ -597,55 +610,54 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
}
if
(!
StringUtils
.
isEmpty
(
processInstanceId
)){
if
(!
StringUtils
.
isEmpty
(
processInstanceId
))
{
try
{
Map
<
String
,
Object
>
flowLoggerMap
=
workflowFeignClient
.
getFlowLogger
(
processInstanceId
).
getResult
();
List
<
LinkedHashMap
>
flowLogger
=
(
List
<
LinkedHashMap
>)
flowLoggerMap
.
get
(
"flowLogger"
);
if
(
flowLogger
.
size
()
>
0
)
{
Collections
.
reverse
(
flowLogger
);
}
List
<
LinkedHashMap
>
flowLoggernew
=
new
ArrayList
<>();
Map
<
String
,
Object
>
flowLoggerMap
=
workflowFeignClient
.
getFlowLogger
(
processInstanceId
).
getResult
();
List
<
LinkedHashMap
>
flowLogger
=
(
List
<
LinkedHashMap
>)
flowLoggerMap
.
get
(
"flowLogger"
);
if
(
flowLogger
.
size
()
>
0
)
{
Collections
.
reverse
(
flowLogger
);
}
List
<
LinkedHashMap
>
flowLoggernew
=
new
ArrayList
<>();
for
(
LinkedHashMap
linkedHashMap
:
flowLogger
)
{
if
(
linkedHashMap
.
get
(
"operateDate"
)!=
null
&&!
linkedHashMap
.
get
(
"operateDate"
).
toString
().
isEmpty
())
{
LinkedHashMap
linke
=
new
LinkedHashMap
();
linke
.
put
(
"approvalStatue"
,
linkedHashMap
.
get
(
"approvalStatue"
).
toString
());
if
(
linkedHashMap
.
get
(
"operateDate"
)
!=
null
&&
!
linkedHashMap
.
get
(
"operateDate"
).
toString
().
isEmpty
())
{
LinkedHashMap
linke
=
new
LinkedHashMap
();
linke
.
put
(
"approvalStatue"
,
linkedHashMap
.
get
(
"approvalStatue"
).
toString
());
//审核意见
List
<
LinkedHashMap
>
approvalSuggestion
=
(
List
<
LinkedHashMap
>)
linkedHashMap
.
get
(
"approvalSuggestion"
);
if
(
approvalSuggestion
!=
null
&&!
approvalSuggestion
.
isEmpty
())
{
linke
.
put
(
"approvalSuggestion"
,
approvalSuggestion
.
get
(
0
).
get
(
"message"
));
List
<
LinkedHashMap
>
approvalSuggestion
=
(
List
<
LinkedHashMap
>)
linkedHashMap
.
get
(
"approvalSuggestion"
);
if
(
approvalSuggestion
!=
null
&&
!
approvalSuggestion
.
isEmpty
())
{
linke
.
put
(
"approvalSuggestion"
,
approvalSuggestion
.
get
(
0
).
get
(
"message"
));
}
linke
.
put
(
"taskName"
,
linkedHashMap
.
get
(
"taskName"
).
toString
());
linke
.
put
(
"operator"
,
linkedHashMap
.
get
(
"operator"
).
toString
());
linke
.
put
(
"operateDate"
,
linkedHashMap
.
get
(
"operateDate"
).
toString
());
linke
.
put
(
"taskName"
,
linkedHashMap
.
get
(
"taskName"
).
toString
());
linke
.
put
(
"operator"
,
linkedHashMap
.
get
(
"operator"
).
toString
());
linke
.
put
(
"operateDate"
,
linkedHashMap
.
get
(
"operateDate"
).
toString
());
flowLoggernew
.
add
(
linke
);
}
}
LoggerDto
loggerDto
=
new
LoggerDto
();
loggerDto
.
setLogger
(
flowLoggernew
);
surveyInfoAllDto
.
setOrderTracking
(
loggerDto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
LoggerDto
loggerDto
=
new
LoggerDto
();
loggerDto
.
setLogger
(
flowLoggernew
);
surveyInfoAllDto
.
setOrderTracking
(
loggerDto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
return
surveyInfoAllDto
;
}
public
JSONArray
getRegionName
(){
public
JSONArray
getRegionName
()
{
JSONArray
jsonArray
=
new
JSONArray
();
if
(
redisUtils
.
hasKey
(
regionRedis
))
{
jsonArray
=
JSONArray
.
parseArray
(
redisUtils
.
get
(
regionRedis
).
toString
());
}
else
{
jsonArray
=
JSONArray
.
parseArray
(
redisUtils
.
get
(
regionRedis
).
toString
());
}
else
{
Collection
<
RegionModel
>
regionChild
=
new
ArrayList
<>();
RegionModel
regionModel1
=
new
RegionModel
();
regionChild
.
add
(
regionModel1
);
FeignClientResult
<
Collection
<
RegionModel
>>
collectionFeignClientResult
=
Systemctl
.
regionClient
.
queryForTreeParent
(
610000L
);
Collection
<
RegionModel
>
result
=
collectionFeignClientResult
.
getResult
();
for
(
RegionModel
regionModel
:
result
)
{
if
(
regionModel
.
getChildren
()!=
null
&&!
regionModel
.
getChildren
().
isEmpty
())
{
if
(
regionModel
.
getChildren
()
!=
null
&&
!
regionModel
.
getChildren
().
isEmpty
())
{
for
(
RegionModel
child
:
regionModel
.
getChildren
())
{
if
(
child
.
getChildren
()!=
null
&&!
child
.
getChildren
().
isEmpty
())
{
if
(
child
.
getChildren
()
!=
null
&&
!
child
.
getChildren
().
isEmpty
())
{
for
(
RegionModel
childChild
:
child
.
getChildren
())
{
jsonArray
.
add
(
childChild
);
}
...
...
@@ -660,7 +672,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
jsonArray
.
add
(
regionModel
);
}
redisUtils
.
set
(
regionRedis
,
jsonArray
);
redisUtils
.
set
(
regionRedis
,
jsonArray
);
}
return
jsonArray
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
View file @
e02ce526
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -10,7 +8,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.DealerReviewEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.TaskStatusEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.fegin.IdxFeginService
;
...
...
@@ -28,7 +29,6 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
com.yeejoin.amos.feign.systemctl.model.SmsRecordModel
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -53,22 +53,21 @@ import java.util.stream.Stream;
* @date 2023-07-07
*/
@Service
public
class
UnitInfoServiceImpl
extends
BaseService
<
UnitInfoDto
,
UnitInfo
,
UnitInfoMapper
>
implements
IUnitInfoService
{
public
class
UnitInfoServiceImpl
extends
BaseService
<
UnitInfoDto
,
UnitInfo
,
UnitInfoMapper
>
implements
IUnitInfoService
{
private
static
final
String
regionRedis
=
"app_region_redis"
;
private
static
final
String
OPERATION_TYPE_SUBMIT
=
"submit"
;
private
static
final
String
OPERATION_TYPE_APPLY
=
"apply"
;
private
static
final
String
IDX_REQUEST_STATE
=
"200"
;
private
static
final
String
VERIFY_RESULT_YES
=
"0"
;
private
static
final
String
VERIFY_RESULT_NO
=
"1"
;
private
static
final
String
SMSTEMPCODENO
=
"SMS_HYGF_0003"
;
private
static
final
String
SMSTEMPCODEYES
=
"SMS_HYGF_0004"
;
String
COMPANY_TREE_REDIS_KEY
=
"REGULATOR_UNIT_TREE"
;
@Value
(
"${regulator.unit.code}"
)
private
String
code
;
@Value
(
"${dealer.appcode}"
)
private
String
appCodes
;
@Autowired
RedisUtils
redisUtil
;
@Autowired
PrivilegeFeginService
privilegeFeginService
;
@Autowired
CommerceInfoServiceImpl
commerceInfoService
;
@Autowired
...
...
@@ -85,67 +84,67 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
PublicAgencyUserMapper
publicAgencyUserMapper
;
@Autowired
IDealerReviewService
dealerReviewService
;
@Value
(
"${hygf.user.group.id}"
)
private
long
userGroupId
;
@Value
(
"${regionalCompanies.company.seq}"
)
private
Long
regionalCompanies
;
@Autowired
IdxFeginService
idxFeginService
;
private
static
final
String
regionRedis
=
"app_region_redis"
;
private
static
final
String
OPERATION_TYPE_SUBMIT
=
"submit"
;
private
static
final
String
OPERATION_TYPE_APPLY
=
"apply"
;
private
static
final
String
IDX_REQUEST_STATE
=
"200"
;
private
static
final
String
VERIFY_RESULT_YES
=
"0"
;
private
static
final
String
VERIFY_RESULT_NO
=
"1"
;
@Autowired
DealerReviewMapper
dealerReviewMapper
;
@Value
(
"${power.station.examine.pageId}"
)
private
long
pageId
;
@Autowired
AmosRequestContext
requestContext
;
@Autowired
PersonnelBusinessMapper
personnelBusinessMapper
;
@Autowired
WorkflowImpl
workflow
;
@Autowired
UserEmpowerMapper
userEmpowerMapper
;
@Value
(
"${regulator.unit.code}"
)
private
String
code
;
@Value
(
"${dealer.appcode}"
)
private
String
appCodes
;
@Value
(
"${hygf.user.group.id}"
)
private
long
userGroupId
;
@Value
(
"${regionalCompanies.company.seq}"
)
private
Long
regionalCompanies
;
@Value
(
"${power.station.examine.pageId}"
)
private
long
pageId
;
@Value
(
"${unitInfo.station.examine.planId}"
)
private
String
planId
;
@Value
(
"${amos.system.user.product}"
)
private
String
AMOS_STUDIO_WEB
;
@Value
(
"${amos.system.user.app-key}"
)
private
String
AMOS_STUDIO
;
@Value
(
"${hygf.sms.tempCodeJXS}"
)
private
String
smsTempCode
;
@Value
(
"${dealer.managementUnitId}"
)
private
String
managementUnitId
;
@Value
(
"${dealer.roleId}"
)
private
String
roleId
;
@Autowired
PersonnelBusinessMapper
personnelBusinessMapper
;
@Autowired
WorkflowImpl
workflow
;
@Autowired
UserEmpowerMapper
userEmpowerMapper
;
private
CommonServiceImpl
commonService
;
private
static
final
String
SMSTEMPCODENO
=
"SMS_HYGF_0003"
;
private
static
List
<
LinkedHashMap
>
findNodesByCondition
(
List
<
LinkedHashMap
>
nodes
,
String
conditionName
,
String
condition
,
String
childName
)
{
return
nodes
.
stream
()
.
flatMap
(
node
->
Stream
.
concat
(
node
.
get
(
conditionName
).
equals
(
condition
)
?
Stream
.
of
(
node
)
:
Stream
.
empty
(),
node
.
get
(
childName
)
!=
null
?
findNodesByCondition
((
List
<
LinkedHashMap
>)
node
.
get
(
childName
),
conditionName
,
condition
,
condition
).
stream
()
:
Stream
.
empty
()
))
.
collect
(
Collectors
.
toList
());
}
private
static
final
String
SMSTEMPCODEYES
=
"SMS_HYGF_0004"
;
/**
* 分页查询
*/
public
Page
<
UnitInfoDto
>
queryForUnitInfoPage
(
Page
<
UnitInfoDto
>
page
)
{
public
Page
<
UnitInfoDto
>
queryForUnitInfoPage
(
Page
<
UnitInfoDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
UnitInfoDto
>
queryForUnitInfoList
()
{
return
this
.
queryForList
(
""
,
false
);
public
List
<
UnitInfoDto
>
queryForUnitInfoList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Override
...
...
@@ -171,15 +170,15 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
regUnitInfo
.
setManagementUnit
(
"经销商"
);
try
{
// 1. 调用平台进行创建单位、用户信息
// this.createCompanyAndUser(regUnitInfo);
// this.createCompanyAndUser(regUnitInfo);
// 2.插入单位表
// regUnitInfo = this.createWithModel(regUnitInfo);
// regUnitInfo = this.createWithModel(regUnitInfo);
regUnitInfo
=
this
.
createWithModelnew
(
regUnitInfo
);
CommerceInfoDto
commerceInfo
=
model
.
getCommerceInfoDto
();
commerceInfo
.
setUnitSeq
(
regUnitInfo
.
getSequenceNbr
());
commerceInfo
=
commerceInfoService
.
createWithModel
(
commerceInfo
);
List
<
RegionalCompanies
>
regionalCompanies
=
regUnitInfo
.
getRegionalCompanies
();
List
<
RegionalCompanies
>
regionalCompanies
=
regUnitInfo
.
getRegionalCompanies
();
for
(
RegionalCompanies
regionalCompany
:
regionalCompanies
)
{
regionalCompany
.
setUnitId
(
regUnitInfo
.
getAmosCompanySeq
());
regionalCompany
.
setUnitInfoId
(
regUnitInfo
.
getSequenceNbr
());
...
...
@@ -231,20 +230,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
return
model
;
}
private
static
List
<
LinkedHashMap
>
findNodesByCondition
(
List
<
LinkedHashMap
>
nodes
,
String
conditionName
,
String
condition
,
String
childName
)
{
return
nodes
.
stream
()
.
flatMap
(
node
->
Stream
.
concat
(
node
.
get
(
conditionName
).
equals
(
condition
)
?
Stream
.
of
(
node
)
:
Stream
.
empty
(),
node
.
get
(
childName
)
!=
null
?
findNodesByCondition
((
List
<
LinkedHashMap
>)
node
.
get
(
childName
),
conditionName
,
condition
,
condition
).
stream
()
:
Stream
.
empty
()
))
.
collect
(
Collectors
.
toList
());
}
private
List
<
LinkedHashMap
>
creatTree
()
{
FeignClientResult
tree
=
privilegeFeginService
.
tree
(
RequestContext
.
getToken
(),
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
());
FeignClientResult
tree
=
privilegeFeginService
.
tree
(
RequestContext
.
getToken
(),
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
());
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
treeData
=
deleteRegulatorTreeData
(
result
);
List
<
LinkedHashMap
>
supervisionTree
=
treeData
.
stream
().
filter
(
e
->
code
.
equals
(
e
.
get
(
"orgCode"
))).
collect
(
Collectors
.
toList
());
...
...
@@ -320,8 +307,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
companyInfo
.
setLandlinePhone
(
regUnitInfo
.
getHeadPhone
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
create
(
companyInfo
);
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
companyResult
.
getDevMessage
());
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
companyResult
.
getDevMessage
());
}
String
adminUserName
=
regUnitInfo
.
getAdminUserName
();
...
...
@@ -357,8 +344,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
if
(
userResult
==
null
||
userResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
userResult
.
getDevMessage
());
if
(
userResult
==
null
||
userResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
userResult
.
getDevMessage
());
}
regUnitInfo
.
setAdminUserId
(
userResult
.
getResult
().
getUserId
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
());
...
...
@@ -388,7 +375,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
FeignClientResult
<
AgencyUserModel
>
userResult
=
null
;
try
{
//FeignClientResult<List<RoleModel>> roleListResult = Privilege.roleClient.queryRoleList(null, null);
// List<RoleModel> allRoleList = roleListResult.getResult();
// List<RoleModel> allRoleList = roleListResult.getResult();
List
<
RoleModel
>
userRoleList
=
new
ArrayList
<>();
List
<
Long
>
roleIds
=
new
ArrayList
<>();
// 1创建公司
...
...
@@ -397,14 +384,14 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
companyInfo
.
setParentId
(
Long
.
parseLong
(
regUnitInfo
.
getManagementUnitId
()));
companyInfo
.
setLevel
(
"station"
);
companyInfo
.
setCompanyName
(
regUnitInfo
.
getName
());
// companyInfo.setCompanyCode(regUnitInfo.getUnitType());
// companyInfo.setCompanyCode(regUnitInfo.getUnitType());
companyInfo
.
setContact
(
regUnitInfo
.
getHeadName
());
companyInfo
.
setCompanyType
(
regUnitInfo
.
getUnitType
());
companyInfo
.
setLandlinePhone
(
regUnitInfo
.
getHeadPhone
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
create
(
companyInfo
);
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
companyResult
.
getDevMessage
());
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
companyResult
.
getDevMessage
());
}
String
adminUserName
=
regUnitInfo
.
getAdminUserName
();
...
...
@@ -431,7 +418,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
// roleIds.add(r.getSequenceNbr());
// }
// });
// roleIds.add(Long.valueOf(regUnitInfo.getRoleId()));
// roleIds.add(Long.valueOf(regUnitInfo.getRoleId()));
roleIds
.
add
(
userGroupId
);
roleSeqMap
.
put
(
companyInfo
.
getSequenceNbr
(),
roleIds
);
...
...
@@ -440,8 +427,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
if
(
userResult
==
null
||
userResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
userResult
.
getDevMessage
());
if
(
userResult
==
null
||
userResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
userResult
.
getDevMessage
());
}
regUnitInfo
.
setAdminUserId
(
userResult
.
getResult
().
getUserId
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
());
...
...
@@ -465,18 +452,17 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
}
public
UnitInfoDto
createWithModelnew
(
UnitInfoDto
regUnitInfo
){
regUnitInfo
.
setBlacklist
(
1
);
regUnitInfo
.
setAuditStatus
(
1
);
regUnitInfo
.
setManagementUnit
(
"经销商事业部"
);
regUnitInfo
=
this
.
createWithModel
(
regUnitInfo
);
this
.
submitExamine
(
regUnitInfo
);
return
regUnitInfo
;
}
public
UnitInfoDto
createWithModelnew
(
UnitInfoDto
regUnitInfo
)
{
regUnitInfo
.
setBlacklist
(
1
);
regUnitInfo
.
setAuditStatus
(
1
);
regUnitInfo
.
setManagementUnit
(
"经销商事业部"
);
regUnitInfo
=
this
.
createWithModel
(
regUnitInfo
);
this
.
submitExamine
(
regUnitInfo
);
return
regUnitInfo
;
}
private
void
submitExamine
(
UnitInfoDto
regUnitInfo
)
{
private
void
submitExamine
(
UnitInfoDto
regUnitInfo
)
{
String
taskId
=
null
;
...
...
@@ -493,11 +479,11 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
processDto
.
setBusinessKey
(
String
.
valueOf
(
regUnitInfo
.
getSequenceNbr
()));
processDto
.
setProcessDefinitionKey
(
"JXS_SH"
);
StartProcessDto
startProcessDto
=
new
StartProcessDto
();
List
<
ProcessDto
>
process
=
new
ArrayList
<>();
List
<
ProcessDto
>
process
=
new
ArrayList
<>();
process
.
add
(
processDto
);
startProcessDto
.
setProcess
(
process
);
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
workflow
.
startProcessnew
(
AMOS_STUDIO
,
AMOS_STUDIO_WEB
,
requestContext
.
getToken
(),
basicGridAcceptance
,
startProcessDto
,
requestContext
.
getUserId
());
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
workflow
.
startProcessnew
(
AMOS_STUDIO
,
AMOS_STUDIO_WEB
,
requestContext
.
getToken
(),
basicGridAcceptance
,
startProcessDto
,
requestContext
.
getUserId
());
// 插入记录表
dealerReview
.
setPlanInstanceId
(
planId
);
dealerReview
.
setUnitInfoId
(
regUnitInfo
.
getSequenceNbr
());
...
...
@@ -506,15 +492,15 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
dealerReview
.
setFlowTaskId
(
basicGridAcceptance
.
getNextTaskId
());
dealerReview
.
setNodeRole
(
basicGridAcceptance
.
getNextExecutorIds
());
dealerReview
.
setNextProcessNode
(
DealerReviewEnum
.
经销商管理员审核
.
getCode
());
dealerReviewService
.
saveDealerReview
(
dealerReview
,
true
,
false
,
regUnitInfo
.
getName
(),
"任务明细:经销商已上传信息"
);
dealerReviewService
.
saveDealerReview
(
dealerReview
,
true
,
false
,
regUnitInfo
.
getName
(),
"任务明细:经销商已上传信息"
);
}
catch
(
Exception
e
){
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
//发起待办
commonService
.
buildTaskModel
(
buildJXSSHTaskModel
(
regUnitInfo
,
basicGridAcceptance
));
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
//
// String taskId = null;
// Map<String, Object> objectMap = new HashMap<>(1);
...
...
@@ -553,6 +539,40 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
// }
}
/**
*
* @param regUnitInfo
* @param basicGridAcceptance
*/
private
List
<
TaskModelDto
>
buildJXSSHTaskModel
(
UnitInfoDto
regUnitInfo
,
BasicGridAcceptance
basicGridAcceptance
)
{
List
<
TaskModelDto
>
taskModelDtoList
=
new
ArrayList
<>();
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
taskModelDto
.
setFlowCode
(
basicGridAcceptance
.
getNextTaskId
());
taskModelDto
.
setFlowCreateDate
(
new
Date
());
taskModelDto
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
taskModelDto
.
setFlowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setPageType
(
null
);
taskModelDto
.
setExecuteUserIds
(
basicGridAcceptance
.
getNextExecuteUserIds
());
taskModelDto
.
setModel
(
regUnitInfo
);
taskModelDto
.
setRelationId
(
basicGridAcceptance
.
getInstanceId
());
taskModelDto
.
setRoutePath
(
null
);
taskModelDto
.
setStartUserId
(
basicGridAcceptance
.
getRecUserId
());
taskModelDto
.
setStartUser
(
basicGridAcceptance
.
getRecUserName
());
taskModelDto
.
setStartDate
(
basicGridAcceptance
.
getRecDate
());
taskModelDto
.
setStartUserCompanyName
(
regUnitInfo
.
getRegionalCompaniesName
());
taskModelDto
.
setTaskName
(
basicGridAcceptance
.
getNextNodeName
());
taskModelDto
.
setTaskCode
(
String
.
valueOf
(
basicGridAcceptance
.
getWorkOrderId
()));
taskModelDto
.
setTaskType
(
BusinessTypeEnum
.
HYGF_JXS_SH
.
getCode
());
taskModelDto
.
setTaskTypeLabel
(
BusinessTypeEnum
.
HYGF_JXS_SH
.
getName
());
taskModelDto
.
setTaskStatus
(
TaskStatusEnum
.
UNDERWAY
.
getValue
());
taskModelDto
.
setTaskStatusLabel
(
TaskStatusEnum
.
UNDERWAY
.
getName
());
// taskModelDto.setTaskDesc();
// taskModelDto.setTaskContent();
taskModelDto
.
setNextExecuteUser
(
basicGridAcceptance
.
getNextExecutorIds
());
taskModelDtoList
.
add
(
taskModelDto
);
return
taskModelDtoList
;
}
@Override
...
...
@@ -560,12 +580,12 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
public
String
powerStationExamine
(
long
pageId
,
String
nodeCode
,
String
stationId
,
String
taskId
,
String
planInstanceId
,
Map
<
String
,
Object
>
kv
)
{
// 2.更新审核记录表
UnitInfo
unitInfo
=
null
;
try
{
DealerReview
dealerReview
=
dealerReviewMapper
.
selectOne
(
new
QueryWrapper
<
DealerReview
>().
eq
(
"unit_info_id"
,
stationId
));
unitInfo
=
this
.
getById
(
stationId
);
UnitInfo
unitInfo
=
null
;
try
{
DealerReview
dealerReview
=
dealerReviewMapper
.
selectOne
(
new
QueryWrapper
<
DealerReview
>().
eq
(
"unit_info_id"
,
stationId
));
unitInfo
=
this
.
getById
(
stationId
);
DealerReviewEnum
nodeByCode
=
DealerReviewEnum
.
getNodeByCode
(
nodeCode
);
String
approvalStatue
=
""
;
String
approvalStatue
=
""
;
if
(
DealerReviewEnum
.
经销商管理员审核
.
getCode
().
equals
(
nodeCode
))
{
String
result
=
String
.
valueOf
(
kv
.
get
(
"approvalStatus"
));
if
(
VERIFY_RESULT_NO
.
equals
(
result
))
{
...
...
@@ -574,41 +594,41 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
//发送断线
Boolean
flag
=
true
;
HashMap
<
String
,
String
>
params
=
new
HashMap
<>(
3
);
String
meg
=
String
.
valueOf
(
kv
.
get
(
"approveInfo"
));
params
.
put
(
"code"
,
"不通过"
);
params
.
put
(
"mobile"
,
unitInfo
.
getAdminPhone
());
String
meg
=
String
.
valueOf
(
kv
.
get
(
"approveInfo"
));
params
.
put
(
"code"
,
"不通过"
);
params
.
put
(
"mobile"
,
unitInfo
.
getAdminPhone
());
params
.
put
(
"smsCode"
,
SMSTEMPCODENO
);
approvalStatue
=
"任务明细:"
+
DealerReviewEnum
.
经销商管理员审核
.
getName
()+
"审核不通过"
;
// FeignClientResult<SmsRecordModel> date= Systemctl.smsClient.sendCommonSms(params);
// System.out.println("短信通知============================"+JSON.toJSONString(date));
}
else
{
approvalStatue
=
"任务明细:"
+
DealerReviewEnum
.
经销商管理员审核
.
getName
()
+
"审核不通过"
;
// FeignClientResult<SmsRecordModel> date= Systemctl.smsClient.sendCommonSms(params);
// System.out.println("短信通知============================"+JSON.toJSONString(date));
}
else
{
// 1. 更新经销商状态
unitInfo
.
setAuditStatus
(
2
);
unitInfo
.
setBlacklist
(
0
);
this
.
createCompanyAndUsernew
(
unitInfo
);
PublicAgencyUser
publicAgencyUser
=
new
PublicAgencyUser
();
PublicAgencyUser
publicAgencyUser
=
new
PublicAgencyUser
();
publicAgencyUser
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
publicAgencyUser
.
setAmosUserName
(
unitInfo
.
getAdminLoginName
());
publicAgencyUser
.
setRealName
(
unitInfo
.
getAdminLoginName
());
publicAgencyUser
.
setRole
(
"["
+
unitInfo
.
getRoleId
()+
"]"
);
publicAgencyUser
.
setRole
(
"["
+
unitInfo
.
getRoleId
()
+
"]"
);
publicAgencyUser
.
setEmergencyTelephone
(
unitInfo
.
getAdminPhone
());
publicAgencyUser
.
setLockStatus
(
"UNLOCK"
);
publicAgencyUserMapper
.
insert
(
publicAgencyUser
);
List
<
String
>
lis
=
new
ArrayList
<>();
List
<
String
>
lis
=
new
ArrayList
<>();
// lis.add(unitInfo.getAmosCompanyCode());
LambdaQueryWrapper
<
RegionalCompanies
>
queryWrapper
=
new
LambdaQueryWrapper
<
RegionalCompanies
>();
queryWrapper
.
eq
(
RegionalCompanies:
:
getUnitInfoId
,
unitInfo
.
getSequenceNbr
());
List
<
RegionalCompanies
>
list
=
regionalCompaniesMapper
.
selectList
(
queryWrapper
);
List
<
RegionalCompanies
>
list
=
regionalCompaniesMapper
.
selectList
(
queryWrapper
);
for
(
RegionalCompanies
companies
:
list
)
{
companies
.
setUnitId
(
unitInfo
.
getAmosCompanySeq
());
lis
.
add
(
companies
.
getRegionalCompaniesCode
());
}
regionalCompaniesService
.
saveOrUpdateBatch
(
list
);
PersonnelBusiness
re
=
new
PersonnelBusiness
();
PersonnelBusiness
re
=
new
PersonnelBusiness
();
re
.
setAmosDealerId
(
unitInfo
.
getAmosCompanySeq
());
re
.
setAmosUnitId
(
unitInfo
.
getAmosCompanySeq
());
re
.
setAmosUnitName
(
unitInfo
.
getName
());
...
...
@@ -618,14 +638,14 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
personnelBusinessMapper
.
insert
(
re
);
//管理员绑定角色权限
StdUserEmpower
stdUserEmpower
=
new
StdUserEmpower
();
StdUserEmpower
stdUserEmpower
=
new
StdUserEmpower
();
stdUserEmpower
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lis
);
stdUserEmpower
.
setPermissionType
(
"HYGF"
);
userEmpowerMapper
.
insert
(
stdUserEmpower
);
// Privilege.agencyUserClient.unlockUsers(unitInfo.getAdminUserId());
approvalStatue
=
"任务明细:"
+
DealerReviewEnum
.
经销商管理员审核
.
getName
()+
"审核通过"
;
approvalStatue
=
"任务明细:"
+
DealerReviewEnum
.
经销商管理员审核
.
getName
()
+
"审核通过"
;
// HashMap<String, String> params = new HashMap<>(3);
// params.put("code","通过");
// params.put("mobile",unitInfo.getAdminPhone());
...
...
@@ -640,28 +660,26 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
// 3. 工作流执行
//执行工作流
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
StandardDto
standardDto
=
new
StandardDto
();
standardDto
.
setComment
(
kv
.
get
(
"approvalInfo"
)
!=
null
?
String
.
valueOf
(
kv
.
get
(
"approvalInfo"
)):
""
);
standardDto
.
setComment
(
kv
.
get
(
"approvalInfo"
)
!=
null
?
String
.
valueOf
(
kv
.
get
(
"approvalInfo"
))
:
""
);
standardDto
.
setResult
(
String
.
valueOf
(
kv
.
get
(
"approvalStatus"
)));
standardDto
.
setTaskId
(
dealerReview
.
getFlowTaskId
());
VariableDto
variable
=
new
VariableDto
();
variable
.
setApprovalStatus
(
String
.
valueOf
(
kv
.
get
(
"approvalStatus"
)));
variable
.
setComment
(
kv
.
get
(
"approvalInfo"
)
!=
null
?
String
.
valueOf
(
kv
.
get
(
"approvalInfo"
)):
""
);
variable
.
setComment
(
kv
.
get
(
"approvalInfo"
)
!=
null
?
String
.
valueOf
(
kv
.
get
(
"approvalInfo"
))
:
""
);
variable
.
setOperationTime
(
String
.
valueOf
(
kv
.
get
(
"approveDate"
)));
variable
.
setOperator
(
String
.
valueOf
(
kv
.
get
(
"approveName"
)));
standardDto
.
setVariable
(
variable
);
BasicGridAcceptance
workBasicGridAcceptance
=
workflow
.
standard
(
basicGridAcceptance
,
standardDto
,
requestContext
.
getUserId
());
dealerReview
.
setFlowTaskId
(
basicGridAcceptance
.
getNextTaskId
());
dealerReviewService
.
saveDealerReview
(
dealerReview
,
false
,
true
,
unitInfo
.
getName
(),
approvalStatue
);
dealerReviewService
.
saveDealerReview
(
dealerReview
,
false
,
true
,
unitInfo
.
getName
(),
approvalStatue
);
this
.
saveOrUpdate
(
unitInfo
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
)
{
if
(!
ObjectUtils
.
isEmpty
(
unitInfo
.
getAmosCompanySeq
()))
{
FeignClientResult
<
CompanyModel
>
feignClientResult
=
Privilege
.
companyClient
...
...
@@ -680,15 +698,13 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
}
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
// // 2.更新审核记录表
// UnitInfo unitInfo=null;
// try{
...
...
@@ -802,7 +818,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
@Override
public
IPage
<
CompanyDto
>
getCompanyDto
(
CompanyDto
dto
)
{
//列表数据组装
IPage
<
CompanyDto
>
pag
=
unitInfoMapper
.
getCompanyDto
(
dto
);
IPage
<
CompanyDto
>
pag
=
unitInfoMapper
.
getCompanyDto
(
dto
);
// List<CompanyDto> pag = unitInfoMapper.getCompanyDto( (page.getCurrent()-1)*page.getSize(),page.getSize(),dto);
//// Map<String,Integer> count = unitInfoMapper.getCompanyDtoCount(dto);
//// page.setTotal(count.get("num"));
...
...
@@ -811,165 +827,161 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
}
//单位详情
public
UnitDataDto
getUnitDataDto
(
Long
id
){
public
UnitDataDto
getUnitDataDto
(
Long
id
)
{
LambdaQueryWrapper
<
UnitInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<
UnitInfo
>();
queryWrapper
.
eq
(
UnitInfo:
:
getAmosCompanySeq
,
id
);
UnitInfo
unitInfo
=
unitInfoMapper
.
selectOne
(
queryWrapper
);
UnitInfo
unitInfo
=
unitInfoMapper
.
selectOne
(
queryWrapper
);
LambdaQueryWrapper
<
CommerceInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<
CommerceInfo
>();
queryWrapper1
.
eq
(
CommerceInfo:
:
getUnitSeq
,
unitInfo
.
getSequenceNbr
());
CommerceInfo
commerceInfo
=
commerceInfoMapper
.
selectOne
(
queryWrapper1
);
CommerceInfo
commerceInfo
=
commerceInfoMapper
.
selectOne
(
queryWrapper1
);
//单位管理
UnitInformation
unitInformation
=
new
UnitInformation
();
UnitInformation
unitInformation
=
new
UnitInformation
();
//工商信息
CommerceDto
commerceDto
=
new
CommerceDto
();
CommerceDto
commerceDto
=
new
CommerceDto
();
//管理员账号
Account
cccount
=
new
Account
();
BeanUtils
.
copyProperties
(
unitInfo
,
unitInformation
);
Account
cccount
=
new
Account
();
BeanUtils
.
copyProperties
(
unitInfo
,
unitInformation
);
unitInformation
.
setHeadCardPhotoBack
(
unitInformation
.
getHeadCardPhotoBack
());
unitInformation
.
setHeadCardPhotoFront
(
unitInformation
.
getHeadCardPhotoFront
());
unitInformation
.
setRegisterPcdCode
((
unitInformation
.
getRegisterPcdCode
()
!=
null
&&!
""
.
equals
(
unitInformation
.
getRegisterPcdCode
()))?
unitInformation
.
getRegisterPcdCode
():
null
);
unitInformation
.
setWorkPcdCode
((
unitInformation
.
getWorkPcdCode
()
!=
null
&&!
""
.
equals
(
unitInformation
.
getWorkPcdCode
()))?
unitInformation
.
getWorkPcdCode
():
null
);
BeanUtils
.
copyProperties
(
commerceInfo
,
commerceDto
);
unitInformation
.
setRegisterPcdCode
((
unitInformation
.
getRegisterPcdCode
()
!=
null
&&
!
""
.
equals
(
unitInformation
.
getRegisterPcdCode
()))
?
unitInformation
.
getRegisterPcdCode
()
:
null
);
unitInformation
.
setWorkPcdCode
((
unitInformation
.
getWorkPcdCode
()
!=
null
&&
!
""
.
equals
(
unitInformation
.
getWorkPcdCode
()))
?
unitInformation
.
getWorkPcdCode
()
:
null
);
BeanUtils
.
copyProperties
(
commerceInfo
,
commerceDto
);
commerceDto
.
setBusinessLicensePhoto
(
commerceDto
.
getBusinessLicensePhoto
());
commerceDto
.
setLegalPersonCardPhotoBack
(
commerceDto
.
getLegalPersonCardPhotoBack
());
commerceDto
.
setLegalPersonCardPhotoFront
(
commerceDto
.
getLegalPersonCardPhotoFront
());
BeanUtils
.
copyProperties
(
unitInfo
,
cccount
);
UnitDataDto
unitDataDt
=
new
UnitDataDto
(
unitInformation
,
commerceDto
,
cccount
);
BeanUtils
.
copyProperties
(
unitInfo
,
cccount
);
UnitDataDto
unitDataDt
=
new
UnitDataDto
(
unitInformation
,
commerceDto
,
cccount
);
return
unitDataDt
;
}
@Transactional
public
Boolean
updateUnitDataDto
(
UnitDataDto
unitDataDto
){
@Transactional
public
Boolean
updateUnitDataDto
(
UnitDataDto
unitDataDto
)
{
//验证二维码
UnitInfo
unitInfo
=
new
UnitInfo
();
unitInfo
=
unitInfoMapper
.
selectById
(
unitDataDto
.
getUnitInformation
().
getSequenceNbr
());
List
<
String
>
lisk
=
new
ArrayList
<>();
UnitInformation
unitInformation
=
unitDataDto
.
getUnitInformation
();
JSONArray
regionName
=
getRegionName
();
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
List
<
Integer
>
regist
=
unitInformation
.
getRegisterPcdCodeList
();
List
<
Integer
>
workP
=
unitInformation
.
getWorkPcdCodeList
();
//注册地址
if
(
regist
!=
null
&&!
regist
.
isEmpty
()){
StringBuilder
codenameRegi
=
new
StringBuilder
();
for
(
int
i
=
0
,
len
=
regist
.
size
();
i
<
len
;
i
++)
{
for
(
RegionModel
regionModel
:
list
)
{
if
(
regionModel
.
getRegionCode
().
intValue
()
==
regist
.
get
(
i
).
intValue
())
{
codenameRegi
.
append
(
regionModel
.
getRegionName
());
if
(
i
!=
len
-
1
)
{
codenameRegi
.
append
(
"-"
);
}
}
}
}
unitInformation
.
setRegisterPcd
(
codenameRegi
!=
null
&&!
""
.
equals
(
codenameRegi
.
toString
())?
codenameRegi
.
toString
():
null
);
}
//办公地址
if
(
workP
!=
null
&&!
workP
.
isEmpty
()){
StringBuilder
codenamework
=
new
StringBuilder
();;
for
(
int
i
=
0
,
len
=
workP
.
size
();
i
<
len
;
i
++)
{
for
(
RegionModel
regionModel
:
list
)
{
if
(
regionModel
.
getRegionCode
().
intValue
()
==
workP
.
get
(
i
).
intValue
())
{
codenamework
.
append
(
regionModel
.
getRegionName
());
if
(
i
!=
len
-
1
)
{
codenamework
.
append
(
"-"
);
}
}
}
}
unitInformation
.
setWorkPcd
(
codenamework
!=
null
&&!
""
.
equals
(
codenamework
.
toString
())?
codenamework
.
toString
():
null
);
}
unitInformation
.
setHeadCardPhotoBackUrl
(
unitInformation
.
getHeadCardPhotoBackUrl
());
unitInformation
.
setHeadCardPhotoFrontUrl
(
unitInformation
.
getHeadCardPhotoFrontUrl
());
unitInformation
.
setRegisterPcdCodeList
(
unitInformation
.
getRegisterPcdCodeList
());
unitInformation
.
setWorkPcdCodeList
(
unitInformation
.
getWorkPcdCodeList
());
List
<
Long
>
dis
=
unitInformation
.
getRegionalCompaniesSeq
();
List
<
String
>
disST
=
dis
.
stream
().
map
(
x
->
x
+
""
).
collect
(
Collectors
.
toList
());
BeanUtils
.
copyProperties
(
unitInformation
,
unitInfo
);
CommerceInfo
commerceInfo
=
new
CommerceInfo
();
commerceInfo
=
commerceInfoMapper
.
selectById
(
unitDataDto
.
getCommerceDto
().
getSequenceNbr
());
CommerceDto
commerceDto
=
unitDataDto
.
getCommerceDto
();
commerceDto
.
setBusinessLicensePhotoUrl
(
commerceDto
.
getBusinessLicensePhotoUrl
());
commerceDto
.
setLegalPersonCardPhotoBackUrl
(
commerceDto
.
getLegalPersonCardPhotoBackUrl
());
commerceDto
.
setLegalPersonCardPhotoFrontUrl
(
commerceDto
.
getLegalPersonCardPhotoFrontUrl
());
BeanUtils
.
copyProperties
(
commerceDto
,
commerceInfo
);
unitInfo
.
setRegionalCompaniesSeq
(
disST
);
UnitInfo
unitInfo
=
new
UnitInfo
();
unitInfo
=
unitInfoMapper
.
selectById
(
unitDataDto
.
getUnitInformation
().
getSequenceNbr
());
List
<
String
>
lisk
=
new
ArrayList
<>();
UnitInformation
unitInformation
=
unitDataDto
.
getUnitInformation
();
JSONArray
regionName
=
getRegionName
();
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
List
<
Integer
>
regist
=
unitInformation
.
getRegisterPcdCodeList
();
List
<
Integer
>
workP
=
unitInformation
.
getWorkPcdCodeList
();
//注册地址
if
(
regist
!=
null
&&
!
regist
.
isEmpty
())
{
StringBuilder
codenameRegi
=
new
StringBuilder
();
for
(
int
i
=
0
,
len
=
regist
.
size
();
i
<
len
;
i
++)
{
for
(
RegionModel
regionModel
:
list
)
{
if
(
regionModel
.
getRegionCode
().
intValue
()
==
regist
.
get
(
i
).
intValue
())
{
codenameRegi
.
append
(
regionModel
.
getRegionName
());
if
(
i
!=
len
-
1
)
{
codenameRegi
.
append
(
"-"
);
}
}
}
}
unitInformation
.
setRegisterPcd
(
codenameRegi
!=
null
&&
!
""
.
equals
(
codenameRegi
.
toString
())
?
codenameRegi
.
toString
()
:
null
);
}
//办公地址
if
(
workP
!=
null
&&
!
workP
.
isEmpty
())
{
StringBuilder
codenamework
=
new
StringBuilder
();
;
for
(
int
i
=
0
,
len
=
workP
.
size
();
i
<
len
;
i
++)
{
for
(
RegionModel
regionModel
:
list
)
{
if
(
regionModel
.
getRegionCode
().
intValue
()
==
workP
.
get
(
i
).
intValue
())
{
codenamework
.
append
(
regionModel
.
getRegionName
());
if
(
i
!=
len
-
1
)
{
codenamework
.
append
(
"-"
);
}
}
}
}
unitInformation
.
setWorkPcd
(
codenamework
!=
null
&&
!
""
.
equals
(
codenamework
.
toString
())
?
codenamework
.
toString
()
:
null
);
}
unitInformation
.
setHeadCardPhotoBackUrl
(
unitInformation
.
getHeadCardPhotoBackUrl
());
unitInformation
.
setHeadCardPhotoFrontUrl
(
unitInformation
.
getHeadCardPhotoFrontUrl
());
unitInformation
.
setRegisterPcdCodeList
(
unitInformation
.
getRegisterPcdCodeList
());
unitInformation
.
setWorkPcdCodeList
(
unitInformation
.
getWorkPcdCodeList
());
List
<
Long
>
dis
=
unitInformation
.
getRegionalCompaniesSeq
();
List
<
String
>
disST
=
dis
.
stream
().
map
(
x
->
x
+
""
).
collect
(
Collectors
.
toList
());
BeanUtils
.
copyProperties
(
unitInformation
,
unitInfo
);
CommerceInfo
commerceInfo
=
new
CommerceInfo
();
commerceInfo
=
commerceInfoMapper
.
selectById
(
unitDataDto
.
getCommerceDto
().
getSequenceNbr
());
CommerceDto
commerceDto
=
unitDataDto
.
getCommerceDto
();
commerceDto
.
setBusinessLicensePhotoUrl
(
commerceDto
.
getBusinessLicensePhotoUrl
());
commerceDto
.
setLegalPersonCardPhotoBackUrl
(
commerceDto
.
getLegalPersonCardPhotoBackUrl
());
commerceDto
.
setLegalPersonCardPhotoFrontUrl
(
commerceDto
.
getLegalPersonCardPhotoFrontUrl
());
BeanUtils
.
copyProperties
(
commerceDto
,
commerceInfo
);
unitInfo
.
setRegionalCompaniesSeq
(
disST
);
unitInfoMapper
.
updateById
(
unitInfo
);
commerceInfoMapper
.
updateById
(
commerceInfo
);
//区域公司
LambdaQueryWrapper
<
RegionalCompanies
>
qu
=
new
LambdaQueryWrapper
<>();
qu
.
eq
(
RegionalCompanies:
:
getUnitId
,
unitInfo
.
getAmosCompanySeq
());
regionalCompaniesMapper
.
delete
(
qu
);
List
<
RegionalCompanies
>
regionalComp
=
new
ArrayList
<>();
FeignClientResult
<
Collection
<
CompanyModel
>>
feignClientResult
=
Privilege
.
companyClient
.
querySubAgencyTree
(
regionalCompanies
);
List
<
CompanyModel
>
companyModel
=
(
List
<
CompanyModel
>)
feignClientResult
.
getResult
();
List
<
String
>
lisd
=
unitInfo
.
getRegionalCompaniesSeq
();
if
(
companyModel
!=
null
&&!
companyModel
.
isEmpty
()&&
lisd
!=
null
&&!
lisd
.
isEmpty
())
{
for
(
Object
aLong
:
lisd
)
{
for
(
CompanyModel
compan
:
companyModel
)
{
if
(
compan
.
getSequenceNbr
().
longValue
()==
Long
.
valueOf
(
aLong
.
toString
()).
longValue
())
{
RegionalCompanies
re
=
new
RegionalCompanies
(
Long
.
valueOf
(
aLong
.
toString
()),
compan
.
getCompanyName
(),
compan
.
getOrgCode
(),
unitInfo
.
getAmosCompanySeq
(),
unitInfo
.
getSequenceNbr
());
lisk
.
add
(
compan
.
getOrgCode
());
regionalComp
.
add
(
re
);
continue
;
}
}
}
}
regionalCompaniesService
.
saveBatch
(
regionalComp
);
//修改管理员权限
//管理员绑定角色权限
LambdaQueryWrapper
<
StdUserEmpower
>
uo
=
new
LambdaQueryWrapper
();
uo
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
unitInfo
.
getAdminUserId
());
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
uo
);
if
(
stdUserEmpower
!=
null
)
{
stdUserEmpower
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
}
else
{
stdUserEmpower
=
new
StdUserEmpower
();
stdUserEmpower
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
stdUserEmpower
.
setPermissionType
(
"HYGF"
);
userEmpowerMapper
.
insert
(
stdUserEmpower
);
}
//区域公司
LambdaQueryWrapper
<
RegionalCompanies
>
qu
=
new
LambdaQueryWrapper
<>();
qu
.
eq
(
RegionalCompanies:
:
getUnitId
,
unitInfo
.
getAmosCompanySeq
());
regionalCompaniesMapper
.
delete
(
qu
);
List
<
RegionalCompanies
>
regionalComp
=
new
ArrayList
<>();
FeignClientResult
<
Collection
<
CompanyModel
>>
feignClientResult
=
Privilege
.
companyClient
.
querySubAgencyTree
(
regionalCompanies
);
List
<
CompanyModel
>
companyModel
=
(
List
<
CompanyModel
>)
feignClientResult
.
getResult
();
List
<
String
>
lisd
=
unitInfo
.
getRegionalCompaniesSeq
();
if
(
companyModel
!=
null
&&
!
companyModel
.
isEmpty
()
&&
lisd
!=
null
&&
!
lisd
.
isEmpty
())
{
for
(
Object
aLong
:
lisd
)
{
for
(
CompanyModel
compan
:
companyModel
)
{
if
(
compan
.
getSequenceNbr
().
longValue
()
==
Long
.
valueOf
(
aLong
.
toString
()).
longValue
())
{
RegionalCompanies
re
=
new
RegionalCompanies
(
Long
.
valueOf
(
aLong
.
toString
()),
compan
.
getCompanyName
(),
compan
.
getOrgCode
(),
unitInfo
.
getAmosCompanySeq
(),
unitInfo
.
getSequenceNbr
());
lisk
.
add
(
compan
.
getOrgCode
());
regionalComp
.
add
(
re
);
continue
;
}
}
}
}
regionalCompaniesService
.
saveBatch
(
regionalComp
);
//修改管理员权限
//管理员绑定角色权限
LambdaQueryWrapper
<
StdUserEmpower
>
uo
=
new
LambdaQueryWrapper
();
uo
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
unitInfo
.
getAdminUserId
());
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
uo
);
if
(
stdUserEmpower
!=
null
)
{
stdUserEmpower
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
}
else
{
stdUserEmpower
=
new
StdUserEmpower
();
stdUserEmpower
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
stdUserEmpower
.
setPermissionType
(
"HYGF"
);
userEmpowerMapper
.
insert
(
stdUserEmpower
);
}
return
true
;
}
public
JSONArray
getRegionName
(){
public
JSONArray
getRegionName
()
{
JSONArray
jsonArray
=
new
JSONArray
();
if
(
redisUtil
.
hasKey
(
regionRedis
))
{
jsonArray
=
JSONArray
.
parseArray
(
redisUtil
.
get
(
regionRedis
).
toString
());
}
else
{
jsonArray
=
JSONArray
.
parseArray
(
redisUtil
.
get
(
regionRedis
).
toString
());
}
else
{
Collection
<
RegionModel
>
regionChild
=
new
ArrayList
<>();
RegionModel
regionModel1
=
new
RegionModel
();
regionChild
.
add
(
regionModel1
);
FeignClientResult
<
Collection
<
RegionModel
>>
collectionFeignClientResult
=
Systemctl
.
regionClient
.
queryForTreeParent
(
610000L
);
Collection
<
RegionModel
>
result
=
collectionFeignClientResult
.
getResult
();
for
(
RegionModel
regionModel
:
result
)
{
if
(
null
!=
regionModel
&&
null
!=
regionModel
.
getChildren
())
{
if
(
null
!=
regionModel
&&
null
!=
regionModel
.
getChildren
())
{
for
(
RegionModel
child
:
regionModel
.
getChildren
())
{
if
(
null
!=
child
&&
null
!=
child
.
getChildren
())
{
if
(
null
!=
child
&&
null
!=
child
.
getChildren
())
{
for
(
RegionModel
childChild
:
child
.
getChildren
())
{
jsonArray
.
add
(
childChild
);
}
...
...
@@ -982,23 +994,22 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
}
}
redisUtil
.
set
(
regionRedis
,
jsonArray
);
redisUtil
.
set
(
regionRedis
,
jsonArray
);
}
return
jsonArray
;
}
public
Page
<
PeasantHousehold
>
getPeasantHouseholdData
(
Long
unitInfoId
,
Long
regionalCompaniesSeq
,
int
pageNum
,
int
pageSize
,
String
peasantHouseholdNo
,
String
ownersName
,
String
ids
){
UnitInfo
unitInfo
=
unitInfoMapper
.
selectById
(
unitInfoId
);
public
Page
<
PeasantHousehold
>
getPeasantHouseholdData
(
Long
unitInfoId
,
Long
regionalCompaniesSeq
,
int
pageNum
,
int
pageSize
,
String
peasantHouseholdNo
,
String
ownersName
,
String
ids
)
{
UnitInfo
unitInfo
=
unitInfoMapper
.
selectById
(
unitInfoId
);
PageHelper
.
startPage
(
pageNum
,
pageSize
);
List
<
PeasantHousehold
>
list
=
peasantHouseholdMapper
.
selectPeasantHouseholdList
(
unitInfo
.
getAmosCompanySeq
(),
regionalCompaniesSeq
,
peasantHouseholdNo
,
ownersName
,
ids
);
List
<
PeasantHousehold
>
list
=
peasantHouseholdMapper
.
selectPeasantHouseholdList
(
unitInfo
.
getAmosCompanySeq
(),
regionalCompaniesSeq
,
peasantHouseholdNo
,
ownersName
,
ids
);
PageInfo
<
PeasantHousehold
>
page
=
new
PageInfo
(
list
);
Page
<
PeasantHousehold
>
pagenew
=
new
Page
<
PeasantHousehold
>();
pagenew
.
setCurrent
(
pageNum
);
...
...
@@ -1007,15 +1018,16 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
pagenew
.
setRecords
(
page
.
getList
());
return
pagenew
;
}
public
Page
<
PeasantHousehold
>
selectPeasantHouseholdListsg
(
Long
unitInfoId
,
Long
regionalCompaniesSeq
,
int
pageNum
,
int
pageSize
,
String
peasantHouseholdNo
,
String
ownersName
,
String
ids
){
public
Page
<
PeasantHousehold
>
selectPeasantHouseholdListsg
(
Long
unitInfoId
,
Long
regionalCompaniesSeq
,
int
pageNum
,
int
pageSize
,
String
peasantHouseholdNo
,
String
ownersName
,
String
ids
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
List
<
PeasantHousehold
>
list
=
peasantHouseholdMapper
.
selectPeasantHouseholdListsg
(
unitInfoId
,
regionalCompaniesSeq
,
peasantHouseholdNo
,
ownersName
,
ids
);
List
<
PeasantHousehold
>
list
=
peasantHouseholdMapper
.
selectPeasantHouseholdListsg
(
unitInfoId
,
regionalCompaniesSeq
,
peasantHouseholdNo
,
ownersName
,
ids
);
PageInfo
<
PeasantHousehold
>
page
=
new
PageInfo
(
list
);
Page
<
PeasantHousehold
>
pagenew
=
new
Page
<
PeasantHousehold
>();
pagenew
.
setCurrent
(
pageNum
);
...
...
pom.xml
View file @
e02ce526
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-biz-boot
</artifactId>
<version>
1.0.0
</version>
<packaging>
pom
</packaging>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-biz-boot
</artifactId>
<version>
1.0.0
</version>
<packaging>
pom
</packaging>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.3.11.RELEASE
</version>
<relativePath
/>
</parent>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.3.11.RELEASE
</version>
<relativePath
/>
</parent>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<amos-biz-boot.version>
1.0.0
</amos-biz-boot.version>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.target>
1.8
</maven.compiler.target>
<fastjson.version>
1.2.83
</fastjson.version>
<knife4j-spring-boot-starter.version>
2.0.7
</knife4j-spring-boot-starter.version>
<springboot.version>
2.3.11.RELEASE
</springboot.version>
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<tyboot-version>
1.1.25-SNAPSHOT
</tyboot-version>
<!-- <amos.version>1.7.10-SNAPSHOT</amos.version>-->
<amos.version>
1.10.8
</amos.version>
<itext.version>
7.1.1
</itext.version>
<elasticsearch.version>
7.15.2
</elasticsearch.version>
</properties>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<amos-biz-boot.version>
1.0.0
</amos-biz-boot.version>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.target>
1.8
</maven.compiler.target>
<fastjson.version>
1.2.83
</fastjson.version>
<knife4j-spring-boot-starter.version>
2.0.7
</knife4j-spring-boot-starter.version>
<springboot.version>
2.3.11.RELEASE
</springboot.version>
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<tyboot-version>
1.1.25-SNAPSHOT
</tyboot-version>
<!-- <amos.version>1.7.10-SNAPSHOT</amos.version>-->
<amos.version>
1.10.8
</amos.version>
<itext.version>
7.1.1
</itext.version>
<elasticsearch.version>
7.15.2
</elasticsearch.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-server
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.netflix.hystrix
</groupId>
<artifactId>
hystrix-javanica
</artifactId>
<scope>
compile
</scope>
<exclusions>
<exclusion>
<artifactId>
jsr305
</artifactId>
<groupId>
com.google.code.findbugs
</groupId>
</exclusion>
<exclusion>
<artifactId>
annotations
</artifactId>
<groupId>
com.google.code.findbugs
</groupId>
</exclusion>
<exclusion>
<artifactId>
aspectjrt
</artifactId>
<groupId>
org.aspectj
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
${fastjson.version}
</version>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
easyexcel
</artifactId>
<version>
2.0.5
</version>
<exclusions>
<exclusion>
<groupId>
org.ow2.asm
</groupId>
<artifactId>
asm
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-compress
</artifactId>
<version>
1.18
</version>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-scratchpad
</artifactId>
<version>
4.0.1
</version>
<exclusions>
<exclusion>
<artifactId>
poi
</artifactId>
<groupId>
org.apache.poi
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
4.0.1
</version>
<exclusions>
<exclusion>
<artifactId>
poi
</artifactId>
<groupId>
org.apache.poi
</groupId>
</exclusion>
<exclusion>
<artifactId>
poi-ooxml-schemas
</artifactId>
<groupId>
org.apache.poi
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
fr.opensagres.xdocreport
</groupId>
<artifactId>
xdocreport
</artifactId>
<version>
1.0.6
</version>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml-schemas
</artifactId>
<version>
4.0.1
</version>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
ooxml-schemas
</artifactId>
<version>
1.3
</version>
<exclusions>
<exclusion>
<artifactId>
xmlbeans
</artifactId>
<groupId>
org.apache.xmlbeans
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-server
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.netflix.hystrix
</groupId>
<artifactId>
hystrix-javanica
</artifactId>
<scope>
compile
</scope>
<exclusions>
<exclusion>
<artifactId>
jsr305
</artifactId>
<groupId>
com.google.code.findbugs
</groupId>
</exclusion>
<exclusion>
<artifactId>
annotations
</artifactId>
<groupId>
com.google.code.findbugs
</groupId>
</exclusion>
<exclusion>
<artifactId>
aspectjrt
</artifactId>
<groupId>
org.aspectj
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
${fastjson.version}
</version>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
easyexcel
</artifactId>
<version>
2.0.5
</version>
<exclusions>
<exclusion>
<groupId>
org.ow2.asm
</groupId>
<artifactId>
asm
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-compress
</artifactId>
<version>
1.18
</version>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-scratchpad
</artifactId>
<version>
4.0.1
</version>
<exclusions>
<exclusion>
<artifactId>
poi
</artifactId>
<groupId>
org.apache.poi
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
4.0.1
</version>
<exclusions>
<exclusion>
<artifactId>
poi
</artifactId>
<groupId>
org.apache.poi
</groupId>
</exclusion>
<exclusion>
<artifactId>
poi-ooxml-schemas
</artifactId>
<groupId>
org.apache.poi
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
fr.opensagres.xdocreport
</groupId>
<artifactId>
xdocreport
</artifactId>
<version>
1.0.6
</version>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml-schemas
</artifactId>
<version>
4.0.1
</version>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
ooxml-schemas
</artifactId>
<version>
1.3
</version>
<exclusions>
<exclusion>
<artifactId>
xmlbeans
</artifactId>
<groupId>
org.apache.xmlbeans
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.jsoup
</groupId>
<artifactId>
jsoup
</artifactId>
<version>
1.11.3
</version>
</dependency>
<dependency>
<groupId>
joda-time
</groupId>
<artifactId>
joda-time
</artifactId>
<version>
2.10.4
</version>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.velocity
</groupId>
<artifactId>
velocity-engine-core
</artifactId>
<version>
2.1
</version>
</dependency>
<dependency>
<groupId>
org.freemarker
</groupId>
<artifactId>
freemarker
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-websocket
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-jexl
</artifactId>
<version>
2.1.1
</version>
</dependency>
<!-- MQTT???? -->
<dependency>
<groupId>
org.springframework.integration
</groupId>
<artifactId>
spring-integration-stream
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.integration
</groupId>
<artifactId>
spring-integration-mqtt
</artifactId>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<scope>
provided
</scope>
</dependency>
<!-- knife4j -->
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-spring-boot-starter
</artifactId>
<version>
${knife4j-spring-boot-starter.version}
</version>
<exclusions>
<exclusion>
<groupId>
org.javassist
</groupId>
<artifactId>
javassist
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-systemctl
</artifactId>
<version>
${amos.version}
</version>
</dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-privilege
</artifactId>
<version>
${amos.version}
</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${springcloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-dependencies
</artifactId>
<version>
${springboot.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-component-rule
</artifactId>
<version>
1.7.9-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-generator
</artifactId>
<version>
3.2.0
</version>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<version>
3.2.0
</version>
</dependency>
<dependency>
<groupId>
org.mybatis.spring.boot
</groupId>
<artifactId>
mybatis-spring-boot-starter
</artifactId>
<version>
2.1.2
</version>
<exclusions>
<exclusion>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
cn.jpush.api
</groupId>
<artifactId>
jpush-client
</artifactId>
<version>
3.3.10
</version>
</dependency>
<dependency>
<groupId>
org.liquibase
</groupId>
<artifactId>
liquibase-core
</artifactId>
<version>
4.4.3
</version>
</dependency>
<dependency>
<groupId>
e-iceblue
</groupId>
<artifactId>
spire.doc.free
</artifactId>
<version>
3.9.0
</version>
</dependency>
<dependency>
<groupId>
net.sf.json-lib
</groupId>
<artifactId>
json-lib
</artifactId>
<version>
2.4
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-api
</artifactId>
<version>
2.17.0
</version>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<!--<repository> <id>Releases</id> <name>Releases</name> <url>http://4v059425e3.zicp.vip:13535/nexus/content/repositories/releases/</url>
</repository> <repository> <id>Snapshots</id> <name>Snapshots</name> <url>http://4v059425e3.zicp.vip:13535/nexus/content/repositories/snapshots/</url>
</repository> -->
<repository>
<id>
Releases
</id>
<name>
Releases
</name>
<url>
http://113.142.68.105:8081/nexus/content/repositories/releases/
</url>
</repository>
<repository>
<id>
com.e-iceblue
</id>
<name>
e-iceblue
</name>
<url>
http://113.142.68.105:8081/nexus/content/groups/public/
</url>
</repository>
<dependency>
<groupId>
org.jsoup
</groupId>
<artifactId>
jsoup
</artifactId>
<version>
1.11.3
</version>
</dependency>
<dependency>
<groupId>
joda-time
</groupId>
<artifactId>
joda-time
</artifactId>
<version>
2.10.4
</version>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.velocity
</groupId>
<artifactId>
velocity-engine-core
</artifactId>
<version>
2.1
</version>
</dependency>
<dependency>
<groupId>
org.freemarker
</groupId>
<artifactId>
freemarker
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-websocket
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-jexl
</artifactId>
<version>
2.1.1
</version>
</dependency>
<!-- MQTT???? -->
<dependency>
<groupId>
org.springframework.integration
</groupId>
<artifactId>
spring-integration-stream
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.integration
</groupId>
<artifactId>
spring-integration-mqtt
</artifactId>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<scope>
provided
</scope>
</dependency>
<!-- knife4j -->
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-spring-boot-starter
</artifactId>
<version>
${knife4j-spring-boot-starter.version}
</version>
<exclusions>
<exclusion>
<groupId>
org.javassist
</groupId>
<artifactId>
javassist
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-systemctl
</artifactId>
<version>
${amos.version}
</version>
</dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-privilege
</artifactId>
<version>
${amos.version}
</version>
</dependency>
<dependency>
<groupId>
commons-lang
</groupId>
<artifactId>
commons-lang
</artifactId>
<version>
2.6
</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${springcloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-dependencies
</artifactId>
<version>
${springboot.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-component-rule
</artifactId>
<version>
1.7.9-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-generator
</artifactId>
<version>
3.2.0
</version>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<version>
3.2.0
</version>
</dependency>
<dependency>
<groupId>
org.mybatis.spring.boot
</groupId>
<artifactId>
mybatis-spring-boot-starter
</artifactId>
<version>
2.1.2
</version>
<exclusions>
<exclusion>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
cn.jpush.api
</groupId>
<artifactId>
jpush-client
</artifactId>
<version>
3.3.10
</version>
</dependency>
<dependency>
<groupId>
org.liquibase
</groupId>
<artifactId>
liquibase-core
</artifactId>
<version>
4.4.3
</version>
</dependency>
<dependency>
<groupId>
e-iceblue
</groupId>
<artifactId>
spire.doc.free
</artifactId>
<version>
3.9.0
</version>
</dependency>
<dependency>
<groupId>
net.sf.json-lib
</groupId>
<artifactId>
json-lib
</artifactId>
<version>
2.4
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-api
</artifactId>
<version>
2.17.0
</version>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<!--<repository> <id>Releases</id> <name>Releases</name> <url>http://4v059425e3.zicp.vip:13535/nexus/content/repositories/releases/</url>
</repository> <repository> <id>Snapshots</id> <name>Snapshots</name> <url>http://4v059425e3.zicp.vip:13535/nexus/content/repositories/snapshots/</url>
</repository> -->
<repository>
<id>
Releases
</id>
<name>
Releases
</name>
<url>
http://113.142.68.105:8081/nexus/content/repositories/releases/
</url>
</repository>
<repository>
<id>
com.e-iceblue
</id>
<name>
e-iceblue
</name>
<url>
http://113.142.68.105:8081/nexus/content/groups/public/
</url>
</repository>
<repository>
<id>
Snapshots
</id>
<name>
Snapshots
</name>
<url>
http://113.142.68.105:8081/nexus/content/repositories/snapshots/
</url>
</repository>
<repository>
<id>
Snapshots
</id>
<name>
Snapshots
</name>
<url>
http://113.142.68.105:8081/nexus/content/repositories/snapshots/
</url>
</repository>
<repository>
<id>
thirdparty
</id>
<name>
thirdparty
</name>
<url>
http://113.142.68.105:8081/nexus/content/repositories/thirdparty/
</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>
Releases
</id>
<name>
Releases
</name>
<url>
http://113.142.68.105:8081/nexus/content/repositories/releases/
</url>
</repository>
<repository>
<id>
thirdparty
</id>
<name>
thirdparty
</name>
<url>
http://113.142.68.105:8081/nexus/content/repositories/thirdparty/
</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>
Releases
</id>
<name>
Releases
</name>
<url>
http://113.142.68.105:8081/nexus/content/repositories/releases/
</url>
</repository>
</distributionManagement>
<modules>
<module>
amos-boot-biz-common
</module>
<module>
amos-boot-core
</module>
<module>
amos-boot-data
</module>
<module>
amos-boot-system-jxiop
</module>
</modules>
<modules>
<module>
amos-boot-biz-common
</module>
<module>
amos-boot-core
</module>
<module>
amos-boot-data
</module>
<module>
amos-boot-system-jxiop
</module>
</modules>
</project>
\ No newline at end of file
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