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
c05bc689
Commit
c05bc689
authored
Jun 25, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wofkflow0620' of…
Merge branch 'wofkflow0620' of
http://36.40.66.175:5000/moa/jxdj_zx/amos-boot-zx-biz
into wofkflow0620
parents
7c2e8f65
fbd64cc4
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
263 additions
and
252 deletions
+263
-252
FinancingInfoMapper.xml
...i/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
+6
-3
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+172
-184
PersonBasicMapper.java
.../amos/boot/module/jxiop/api/mapper/PersonBasicMapper.java
+11
-7
PersonBasicMapper.xml
...jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
+18
-0
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+4
-4
PersonQrCodeController.java
...t/module/jxiop/biz/controller/PersonQrCodeController.java
+18
-10
StationCacheInfoDto.java
...n/amos/boot/module/jxiop/biz/dto/StationCacheInfoDto.java
+2
-0
MonitorService.java
...in/amos/boot/module/jxiop/biz/service/MonitorService.java
+4
-4
MonitorServiceImpl.java
...oot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
+6
-5
PersonBasicServiceImpl.java
...module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
+5
-3
PersonBasicServiceImpl.java
...module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
+17
-32
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
View file @
c05bc689
...
@@ -35,12 +35,15 @@
...
@@ -35,12 +35,15 @@
<if
test=
"params.type == 3 "
>
<if
test=
"params.type == 3 "
>
and info.status in ('待整改','整改未完成')
and info.status in ('待整改','整改未完成')
</if>
</if>
<if
test=
"params.status != null and params.status != ''"
>
and info.status = #{params.status}
</if>
</where>
</where>
ORDER BY
ORDER BY
info.rec_date DESC ,hph.sequence_nbr ASC ) as sta
info.rec_date DESC ,hph.sequence_nbr ASC ) as sta
<where>
<if
test=
"params.status != null and params.status != ''"
>
and sta.status = #{params.status}
</if>
</where>
</select>
</select>
<select
id=
"selectDataInfo"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto"
>
<select
id=
"selectDataInfo"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto"
>
SELECT
SELECT
...
...
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 @
c05bc689
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
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.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -8,10 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -8,10 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
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.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.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.fegin.IdxFeginService
;
import
com.yeejoin.amos.boot.module.hygf.api.fegin.IdxFeginService
;
...
@@ -29,7 +28,7 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel;
...
@@ -29,7 +28,7 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.seata.spring.annotation.GlobalTransactiona
l
;
import
com.yeejoin.amos.feign.systemctl.model.SmsRecordMode
l
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -54,21 +53,22 @@ import java.util.stream.Stream;
...
@@ -54,21 +53,22 @@ import java.util.stream.Stream;
* @date 2023-07-07
* @date 2023-07-07
*/
*/
@Service
@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"
;
String
COMPANY_TREE_REDIS_KEY
=
"REGULATOR_UNIT_TREE"
;
@Value
(
"${regulator.unit.code}"
)
private
String
code
;
@Value
(
"${dealer.appcode}"
)
private
String
appCodes
;
@Autowired
@Autowired
RedisUtils
redisUtil
;
RedisUtils
redisUtil
;
@Autowired
@Autowired
PrivilegeFeginService
privilegeFeginService
;
PrivilegeFeginService
privilegeFeginService
;
@Autowired
@Autowired
CommerceInfoServiceImpl
commerceInfoService
;
CommerceInfoServiceImpl
commerceInfoService
;
@Autowired
@Autowired
...
@@ -85,55 +85,55 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -85,55 +85,55 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
PublicAgencyUserMapper
publicAgencyUserMapper
;
PublicAgencyUserMapper
publicAgencyUserMapper
;
@Autowired
@Autowired
IDealerReviewService
dealerReviewService
;
IDealerReviewService
dealerReviewService
;
@Autowired
IdxFeginService
idxFeginService
;
@Autowired
DealerReviewMapper
dealerReviewMapper
;
@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}"
)
@Value
(
"${hygf.user.group.id}"
)
private
long
userGroupId
;
private
long
userGroupId
;
@Value
(
"${regionalCompanies.company.seq}"
)
@Value
(
"${regionalCompanies.company.seq}"
)
private
Long
regionalCompanies
;
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}"
)
@Value
(
"${power.station.examine.pageId}"
)
private
long
pageId
;
private
long
pageId
;
@Autowired
AmosRequestContext
requestContext
;
@Value
(
"${unitInfo.station.examine.planId}"
)
@Value
(
"${unitInfo.station.examine.planId}"
)
private
String
planId
;
private
String
planId
;
@Value
(
"${amos.system.user.product}"
)
@Value
(
"${amos.system.user.product}"
)
private
String
AMOS_STUDIO_WEB
;
private
String
AMOS_STUDIO_WEB
;
@Value
(
"${amos.system.user.app-key}"
)
@Value
(
"${amos.system.user.app-key}"
)
private
String
AMOS_STUDIO
;
private
String
AMOS_STUDIO
;
@Value
(
"${hygf.sms.tempCodeJXS}"
)
@Value
(
"${hygf.sms.tempCodeJXS}"
)
private
String
smsTempCode
;
private
String
smsTempCode
;
@Value
(
"${dealer.managementUnitId}"
)
@Value
(
"${dealer.managementUnitId}"
)
private
String
managementUnitId
;
private
String
managementUnitId
;
@Value
(
"${dealer.roleId}"
)
@Value
(
"${dealer.roleId}"
)
private
String
roleId
;
private
String
roleId
;
@Autowired
@Autowired
private
CommonServiceImpl
commonService
;
PersonnelBusinessMapper
personnelBusinessMapper
;
private
static
List
<
LinkedHashMap
>
findNodesByCondition
(
List
<
LinkedHashMap
>
nodes
,
String
conditionName
,
@Autowired
String
condition
,
String
childName
)
{
WorkflowImpl
workflow
;
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
());
}
@Autowired
UserEmpowerMapper
userEmpowerMapper
;
private
static
final
String
SMSTEMPCODENO
=
"SMS_HYGF_0003"
;
private
static
final
String
SMSTEMPCODEYES
=
"SMS_HYGF_0004"
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -145,7 +145,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -145,7 +145,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
* 列表查询 示例
* 列表查询 示例
*/
*/
public
List
<
UnitInfoDto
>
queryForUnitInfoList
()
{
public
List
<
UnitInfoDto
>
queryForUnitInfoList
()
{
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
@Override
@Override
...
@@ -162,7 +162,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -162,7 +162,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
}
}
@Override
@Override
@
Global
Transactional
@Transactional
public
UnitRegisterDto
registerUnit
(
UnitRegisterDto
model
)
{
public
UnitRegisterDto
registerUnit
(
UnitRegisterDto
model
)
{
UnitInfoDto
regUnitInfo
=
model
.
getUnitInfoDto
();
UnitInfoDto
regUnitInfo
=
model
.
getUnitInfoDto
();
...
@@ -179,7 +179,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -179,7 +179,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
commerceInfo
.
setUnitSeq
(
regUnitInfo
.
getSequenceNbr
());
commerceInfo
.
setUnitSeq
(
regUnitInfo
.
getSequenceNbr
());
commerceInfo
=
commerceInfoService
.
createWithModel
(
commerceInfo
);
commerceInfo
=
commerceInfoService
.
createWithModel
(
commerceInfo
);
List
<
RegionalCompanies
>
regionalCompanies
=
regUnitInfo
.
getRegionalCompanies
();
List
<
RegionalCompanies
>
regionalCompanies
=
regUnitInfo
.
getRegionalCompanies
();
for
(
RegionalCompanies
regionalCompany
:
regionalCompanies
)
{
for
(
RegionalCompanies
regionalCompany
:
regionalCompanies
)
{
regionalCompany
.
setUnitId
(
regUnitInfo
.
getAmosCompanySeq
());
regionalCompany
.
setUnitId
(
regUnitInfo
.
getAmosCompanySeq
());
regionalCompany
.
setUnitInfoId
(
regUnitInfo
.
getSequenceNbr
());
regionalCompany
.
setUnitInfoId
(
regUnitInfo
.
getSequenceNbr
());
...
@@ -231,8 +231,20 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -231,8 +231,20 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
return
model
;
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
()
{
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
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
treeData
=
deleteRegulatorTreeData
(
result
);
List
<
LinkedHashMap
>
treeData
=
deleteRegulatorTreeData
(
result
);
List
<
LinkedHashMap
>
supervisionTree
=
treeData
.
stream
().
filter
(
e
->
code
.
equals
(
e
.
get
(
"orgCode"
))).
collect
(
Collectors
.
toList
());
List
<
LinkedHashMap
>
supervisionTree
=
treeData
.
stream
().
filter
(
e
->
code
.
equals
(
e
.
get
(
"orgCode"
))).
collect
(
Collectors
.
toList
());
...
@@ -308,8 +320,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -308,8 +320,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
companyInfo
.
setLandlinePhone
(
regUnitInfo
.
getHeadPhone
());
companyInfo
.
setLandlinePhone
(
regUnitInfo
.
getHeadPhone
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
create
(
companyInfo
);
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
create
(
companyInfo
);
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
companyResult
.
getDevMessage
());
throw
new
BadRequest
(
"单位注册失败!"
+
companyResult
.
getDevMessage
());
}
}
String
adminUserName
=
regUnitInfo
.
getAdminUserName
();
String
adminUserName
=
regUnitInfo
.
getAdminUserName
();
...
@@ -345,8 +357,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -345,8 +357,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
if
(
userResult
==
null
||
userResult
.
getStatus
()
!=
200
)
{
if
(
userResult
==
null
||
userResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
userResult
.
getDevMessage
());
throw
new
BadRequest
(
"单位注册失败!"
+
userResult
.
getDevMessage
());
}
}
regUnitInfo
.
setAdminUserId
(
userResult
.
getResult
().
getUserId
());
regUnitInfo
.
setAdminUserId
(
userResult
.
getResult
().
getUserId
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
());
...
@@ -391,8 +403,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -391,8 +403,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
companyInfo
.
setLandlinePhone
(
regUnitInfo
.
getHeadPhone
());
companyInfo
.
setLandlinePhone
(
regUnitInfo
.
getHeadPhone
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
create
(
companyInfo
);
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
create
(
companyInfo
);
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
companyResult
.
getDevMessage
());
throw
new
BadRequest
(
"单位注册失败!"
+
companyResult
.
getDevMessage
());
}
}
String
adminUserName
=
regUnitInfo
.
getAdminUserName
();
String
adminUserName
=
regUnitInfo
.
getAdminUserName
();
...
@@ -428,8 +440,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -428,8 +440,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
if
(
userResult
==
null
||
userResult
.
getStatus
()
!=
200
)
{
if
(
userResult
==
null
||
userResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
userResult
.
getDevMessage
());
throw
new
BadRequest
(
"单位注册失败!"
+
userResult
.
getDevMessage
());
}
}
regUnitInfo
.
setAdminUserId
(
userResult
.
getResult
().
getUserId
());
regUnitInfo
.
setAdminUserId
(
userResult
.
getResult
().
getUserId
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
());
...
@@ -453,17 +465,18 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -453,17 +465,18 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
}
}
public
UnitInfoDto
createWithModelnew
(
UnitInfoDto
regUnitInfo
)
{
public
UnitInfoDto
createWithModelnew
(
UnitInfoDto
regUnitInfo
)
{
regUnitInfo
.
setBlacklist
(
1
);
regUnitInfo
.
setBlacklist
(
1
);
regUnitInfo
.
setAuditStatus
(
1
);
regUnitInfo
.
setAuditStatus
(
1
);
regUnitInfo
.
setManagementUnit
(
"经销商事业部"
);
regUnitInfo
.
setManagementUnit
(
"经销商事业部"
);
regUnitInfo
=
this
.
createWithModel
(
regUnitInfo
);
regUnitInfo
=
this
.
createWithModel
(
regUnitInfo
);
this
.
submitExamine
(
regUnitInfo
);
this
.
submitExamine
(
regUnitInfo
);
return
regUnitInfo
;
return
regUnitInfo
;
}
}
private
void
submitExamine
(
UnitInfoDto
regUnitInfo
)
{
private
void
submitExamine
(
UnitInfoDto
regUnitInfo
)
{
String
taskId
=
null
;
String
taskId
=
null
;
...
@@ -480,11 +493,11 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -480,11 +493,11 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
processDto
.
setBusinessKey
(
String
.
valueOf
(
regUnitInfo
.
getSequenceNbr
()));
processDto
.
setBusinessKey
(
String
.
valueOf
(
regUnitInfo
.
getSequenceNbr
()));
processDto
.
setProcessDefinitionKey
(
"JXS_SH"
);
processDto
.
setProcessDefinitionKey
(
"JXS_SH"
);
StartProcessDto
startProcessDto
=
new
StartProcessDto
();
StartProcessDto
startProcessDto
=
new
StartProcessDto
();
List
<
ProcessDto
>
process
=
new
ArrayList
<>();
List
<
ProcessDto
>
process
=
new
ArrayList
<>();
process
.
add
(
processDto
);
process
.
add
(
processDto
);
startProcessDto
.
setProcess
(
process
);
startProcessDto
.
setProcess
(
process
);
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
workflow
.
startProcessnew
(
AMOS_STUDIO
,
AMOS_STUDIO_WEB
,
requestContext
.
getToken
(),
basicGridAcceptance
,
startProcessDto
,
requestContext
.
getUserId
());
workflow
.
startProcessnew
(
AMOS_STUDIO
,
AMOS_STUDIO_WEB
,
requestContext
.
getToken
(),
basicGridAcceptance
,
startProcessDto
,
requestContext
.
getUserId
());
// 插入记录表
// 插入记录表
dealerReview
.
setPlanInstanceId
(
planId
);
dealerReview
.
setPlanInstanceId
(
planId
);
dealerReview
.
setUnitInfoId
(
regUnitInfo
.
getSequenceNbr
());
dealerReview
.
setUnitInfoId
(
regUnitInfo
.
getSequenceNbr
());
...
@@ -493,15 +506,15 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -493,15 +506,15 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
dealerReview
.
setFlowTaskId
(
basicGridAcceptance
.
getNextTaskId
());
dealerReview
.
setFlowTaskId
(
basicGridAcceptance
.
getNextTaskId
());
dealerReview
.
setNodeRole
(
basicGridAcceptance
.
getNextExecutorIds
());
dealerReview
.
setNodeRole
(
basicGridAcceptance
.
getNextExecutorIds
());
dealerReview
.
setNextProcessNode
(
DealerReviewEnum
.
经销商管理员审核
.
getCode
());
dealerReview
.
setNextProcessNode
(
DealerReviewEnum
.
经销商管理员审核
.
getCode
());
dealerReviewService
.
saveDealerReview
(
dealerReview
,
true
,
false
,
regUnitInfo
.
getName
(),
"任务明细:经销商已上传信息"
);
dealerReviewService
.
saveDealerReview
(
dealerReview
,
true
,
false
,
regUnitInfo
.
getName
(),
"任务明细:经销商已上传信息"
);
//发起待办
}
catch
(
Exception
e
){
// commonService.buildTaskModel(buildJXSSHTaskModel(regUnitInfo, basicGridAcceptance));
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
}
//
//
// String taskId = null;
// String taskId = null;
// Map<String, Object> objectMap = new HashMap<>(1);
// Map<String, Object> objectMap = new HashMap<>(1);
...
@@ -540,53 +553,19 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -540,53 +553,19 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
// }
// }
}
}
/**
*
* @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
@Override
@
Global
Transactional
@Transactional
public
String
powerStationExamine
(
long
pageId
,
String
nodeCode
,
String
stationId
,
String
taskId
,
String
planInstanceId
,
Map
<
String
,
Object
>
kv
)
{
public
String
powerStationExamine
(
long
pageId
,
String
nodeCode
,
String
stationId
,
String
taskId
,
String
planInstanceId
,
Map
<
String
,
Object
>
kv
)
{
// 2.更新审核记录表
// 2.更新审核记录表
UnitInfo
unitInfo
=
null
;
UnitInfo
unitInfo
=
null
;
try
{
try
{
DealerReview
dealerReview
=
dealerReviewMapper
.
selectOne
(
new
QueryWrapper
<
DealerReview
>().
eq
(
"unit_info_id"
,
stationId
));
DealerReview
dealerReview
=
dealerReviewMapper
.
selectOne
(
new
QueryWrapper
<
DealerReview
>().
eq
(
"unit_info_id"
,
stationId
));
unitInfo
=
this
.
getById
(
stationId
);
unitInfo
=
this
.
getById
(
stationId
);
DealerReviewEnum
nodeByCode
=
DealerReviewEnum
.
getNodeByCode
(
nodeCode
);
DealerReviewEnum
nodeByCode
=
DealerReviewEnum
.
getNodeByCode
(
nodeCode
);
String
approvalStatue
=
""
;
String
approvalStatue
=
""
;
if
(
DealerReviewEnum
.
经销商管理员审核
.
getCode
().
equals
(
nodeCode
))
{
if
(
DealerReviewEnum
.
经销商管理员审核
.
getCode
().
equals
(
nodeCode
))
{
String
result
=
String
.
valueOf
(
kv
.
get
(
"approvalStatus"
));
String
result
=
String
.
valueOf
(
kv
.
get
(
"approvalStatus"
));
if
(
VERIFY_RESULT_NO
.
equals
(
result
))
{
if
(
VERIFY_RESULT_NO
.
equals
(
result
))
{
...
@@ -595,41 +574,41 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -595,41 +574,41 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
//发送断线
//发送断线
Boolean
flag
=
true
;
Boolean
flag
=
true
;
HashMap
<
String
,
String
>
params
=
new
HashMap
<>(
3
);
HashMap
<
String
,
String
>
params
=
new
HashMap
<>(
3
);
String
meg
=
String
.
valueOf
(
kv
.
get
(
"approveInfo"
));
String
meg
=
String
.
valueOf
(
kv
.
get
(
"approveInfo"
));
params
.
put
(
"code"
,
"不通过"
);
params
.
put
(
"code"
,
"不通过"
);
params
.
put
(
"mobile"
,
unitInfo
.
getAdminPhone
());
params
.
put
(
"mobile"
,
unitInfo
.
getAdminPhone
());
params
.
put
(
"smsCode"
,
SMSTEMPCODENO
);
params
.
put
(
"smsCode"
,
SMSTEMPCODENO
);
approvalStatue
=
"任务明细:"
+
DealerReviewEnum
.
经销商管理员审核
.
getName
()
+
"审核不通过"
;
approvalStatue
=
"任务明细:"
+
DealerReviewEnum
.
经销商管理员审核
.
getName
()+
"审核不通过"
;
// FeignClientResult<SmsRecordModel> date= Systemctl.smsClient.sendCommonSms(params);
// FeignClientResult<SmsRecordModel> date= Systemctl.smsClient.sendCommonSms(params);
// System.out.println("短信通知============================"+JSON.toJSONString(date));
// System.out.println("短信通知============================"+JSON.toJSONString(date));
}
else
{
}
else
{
// 1. 更新经销商状态
// 1. 更新经销商状态
unitInfo
.
setAuditStatus
(
2
);
unitInfo
.
setAuditStatus
(
2
);
unitInfo
.
setBlacklist
(
0
);
unitInfo
.
setBlacklist
(
0
);
this
.
createCompanyAndUsernew
(
unitInfo
);
this
.
createCompanyAndUsernew
(
unitInfo
);
PublicAgencyUser
publicAgencyUser
=
new
PublicAgencyUser
();
PublicAgencyUser
publicAgencyUser
=
new
PublicAgencyUser
();
publicAgencyUser
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
publicAgencyUser
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
publicAgencyUser
.
setAmosUserName
(
unitInfo
.
getAdminLoginName
());
publicAgencyUser
.
setAmosUserName
(
unitInfo
.
getAdminLoginName
());
publicAgencyUser
.
setRealName
(
unitInfo
.
getAdminLoginName
());
publicAgencyUser
.
setRealName
(
unitInfo
.
getAdminLoginName
());
publicAgencyUser
.
setRole
(
"["
+
unitInfo
.
getRoleId
()
+
"]"
);
publicAgencyUser
.
setRole
(
"["
+
unitInfo
.
getRoleId
()+
"]"
);
publicAgencyUser
.
setEmergencyTelephone
(
unitInfo
.
getAdminPhone
());
publicAgencyUser
.
setEmergencyTelephone
(
unitInfo
.
getAdminPhone
());
publicAgencyUser
.
setLockStatus
(
"UNLOCK"
);
publicAgencyUser
.
setLockStatus
(
"UNLOCK"
);
publicAgencyUserMapper
.
insert
(
publicAgencyUser
);
publicAgencyUserMapper
.
insert
(
publicAgencyUser
);
List
<
String
>
lis
=
new
ArrayList
<>();
List
<
String
>
lis
=
new
ArrayList
<>();
// lis.add(unitInfo.getAmosCompanyCode());
// lis.add(unitInfo.getAmosCompanyCode());
LambdaQueryWrapper
<
RegionalCompanies
>
queryWrapper
=
new
LambdaQueryWrapper
<
RegionalCompanies
>();
LambdaQueryWrapper
<
RegionalCompanies
>
queryWrapper
=
new
LambdaQueryWrapper
<
RegionalCompanies
>();
queryWrapper
.
eq
(
RegionalCompanies:
:
getUnitInfoId
,
unitInfo
.
getSequenceNbr
());
queryWrapper
.
eq
(
RegionalCompanies:
:
getUnitInfoId
,
unitInfo
.
getSequenceNbr
());
List
<
RegionalCompanies
>
list
=
regionalCompaniesMapper
.
selectList
(
queryWrapper
);
List
<
RegionalCompanies
>
list
=
regionalCompaniesMapper
.
selectList
(
queryWrapper
);
for
(
RegionalCompanies
companies
:
list
)
{
for
(
RegionalCompanies
companies
:
list
)
{
companies
.
setUnitId
(
unitInfo
.
getAmosCompanySeq
());
companies
.
setUnitId
(
unitInfo
.
getAmosCompanySeq
());
lis
.
add
(
companies
.
getRegionalCompaniesCode
());
lis
.
add
(
companies
.
getRegionalCompaniesCode
());
}
}
regionalCompaniesService
.
saveOrUpdateBatch
(
list
);
regionalCompaniesService
.
saveOrUpdateBatch
(
list
);
PersonnelBusiness
re
=
new
PersonnelBusiness
();
PersonnelBusiness
re
=
new
PersonnelBusiness
();
re
.
setAmosDealerId
(
unitInfo
.
getAmosCompanySeq
());
re
.
setAmosDealerId
(
unitInfo
.
getAmosCompanySeq
());
re
.
setAmosUnitId
(
unitInfo
.
getAmosCompanySeq
());
re
.
setAmosUnitId
(
unitInfo
.
getAmosCompanySeq
());
re
.
setAmosUnitName
(
unitInfo
.
getName
());
re
.
setAmosUnitName
(
unitInfo
.
getName
());
...
@@ -639,14 +618,14 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -639,14 +618,14 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
personnelBusinessMapper
.
insert
(
re
);
personnelBusinessMapper
.
insert
(
re
);
//管理员绑定角色权限
//管理员绑定角色权限
StdUserEmpower
stdUserEmpower
=
new
StdUserEmpower
();
StdUserEmpower
stdUserEmpower
=
new
StdUserEmpower
();
stdUserEmpower
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
stdUserEmpower
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lis
);
stdUserEmpower
.
setAmosOrgCode
(
lis
);
stdUserEmpower
.
setPermissionType
(
"HYGF"
);
stdUserEmpower
.
setPermissionType
(
"HYGF"
);
userEmpowerMapper
.
insert
(
stdUserEmpower
);
userEmpowerMapper
.
insert
(
stdUserEmpower
);
// Privilege.agencyUserClient.unlockUsers(unitInfo.getAdminUserId());
// Privilege.agencyUserClient.unlockUsers(unitInfo.getAdminUserId());
approvalStatue
=
"任务明细:"
+
DealerReviewEnum
.
经销商管理员审核
.
getName
()
+
"审核通过"
;
approvalStatue
=
"任务明细:"
+
DealerReviewEnum
.
经销商管理员审核
.
getName
()+
"审核通过"
;
// HashMap<String, String> params = new HashMap<>(3);
// HashMap<String, String> params = new HashMap<>(3);
// params.put("code","通过");
// params.put("code","通过");
// params.put("mobile",unitInfo.getAdminPhone());
// params.put("mobile",unitInfo.getAdminPhone());
...
@@ -661,27 +640,29 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -661,27 +640,29 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
// 3. 工作流执行
// 3. 工作流执行
//执行工作流
//执行工作流
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
StandardDto
standardDto
=
new
StandardDto
();
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
.
setResult
(
String
.
valueOf
(
kv
.
get
(
"approvalStatus"
)));
standardDto
.
setTaskId
(
dealerReview
.
getFlowTaskId
());
standardDto
.
setTaskId
(
dealerReview
.
getFlowTaskId
());
VariableDto
variable
=
new
VariableDto
();
VariableDto
variable
=
new
VariableDto
();
variable
.
setApprovalStatus
(
String
.
valueOf
(
kv
.
get
(
"approvalStatus"
)));
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
.
setOperationTime
(
String
.
valueOf
(
kv
.
get
(
"approveDate"
)));
variable
.
setOperator
(
String
.
valueOf
(
kv
.
get
(
"approveName"
)));
variable
.
setOperator
(
String
.
valueOf
(
kv
.
get
(
"approveName"
)));
standardDto
.
setVariable
(
variable
);
standardDto
.
setVariable
(
variable
);
BasicGridAcceptance
workBasicGridAcceptance
=
workflow
.
standard
(
basicGridAcceptance
,
standardDto
,
requestContext
.
getUserId
());
BasicGridAcceptance
workBasicGridAcceptance
=
workflow
.
standard
(
basicGridAcceptance
,
standardDto
,
requestContext
.
getUserId
());
dealerReview
.
setFlowTaskId
(
basicGridAcceptance
.
getNextTaskId
());
dealerReview
.
setFlowTaskId
(
basicGridAcceptance
.
getNextTaskId
());
dealerReviewService
.
saveDealerReview
(
dealerReview
,
false
,
true
,
unitInfo
.
getName
(),
approvalStatue
);
dealerReviewService
.
saveDealerReview
(
dealerReview
,
false
,
true
,
unitInfo
.
getName
(),
approvalStatue
);
this
.
saveOrUpdate
(
unitInfo
);
this
.
saveOrUpdate
(
unitInfo
);
//更新待办
//更新待办
// commonService.updateTaskModelNew(buildJXSSHUpdateTaskModel(basicGridAcceptance, unitInfo, kv));
// commonService.updateTaskModelNew(buildJXSSHUpdateTaskModel(basicGridAcceptance, unitInfo, kv));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
){
if
(!
ObjectUtils
.
isEmpty
(
unitInfo
.
getAmosCompanySeq
()))
{
if
(!
ObjectUtils
.
isEmpty
(
unitInfo
.
getAmosCompanySeq
()))
{
FeignClientResult
<
CompanyModel
>
feignClientResult
=
Privilege
.
companyClient
FeignClientResult
<
CompanyModel
>
feignClientResult
=
Privilege
.
companyClient
...
@@ -702,11 +683,13 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -702,11 +683,13 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
}
// // 2.更新审核记录表
// // 2.更新审核记录表
// UnitInfo unitInfo=null;
// UnitInfo unitInfo=null;
// try{
// try{
...
@@ -838,7 +821,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -838,7 +821,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
@Override
@Override
public
IPage
<
CompanyDto
>
getCompanyDto
(
CompanyDto
dto
)
{
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);
// List<CompanyDto> pag = unitInfoMapper.getCompanyDto( (page.getCurrent()-1)*page.getSize(),page.getSize(),dto);
//// Map<String,Integer> count = unitInfoMapper.getCompanyDtoCount(dto);
//// Map<String,Integer> count = unitInfoMapper.getCompanyDtoCount(dto);
//// page.setTotal(count.get("num"));
//// page.setTotal(count.get("num"));
...
@@ -847,50 +830,66 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -847,50 +830,66 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
}
}
//单位详情
//单位详情
public
UnitDataDto
getUnitDataDto
(
Long
id
)
{
public
UnitDataDto
getUnitDataDto
(
Long
id
){
LambdaQueryWrapper
<
UnitInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<
UnitInfo
>();
LambdaQueryWrapper
<
UnitInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<
UnitInfo
>();
queryWrapper
.
eq
(
UnitInfo:
:
getAmosCompanySeq
,
id
);
queryWrapper
.
eq
(
UnitInfo:
:
getAmosCompanySeq
,
id
);
UnitInfo
unitInfo
=
unitInfoMapper
.
selectOne
(
queryWrapper
);
UnitInfo
unitInfo
=
unitInfoMapper
.
selectOne
(
queryWrapper
);
LambdaQueryWrapper
<
CommerceInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<
CommerceInfo
>();
LambdaQueryWrapper
<
CommerceInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<
CommerceInfo
>();
queryWrapper1
.
eq
(
CommerceInfo:
:
getUnitSeq
,
unitInfo
.
getSequenceNbr
());
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
();
Account
cccount
=
new
Account
();
BeanUtils
.
copyProperties
(
unitInfo
,
unitInformation
);
BeanUtils
.
copyProperties
(
unitInfo
,
unitInformation
);
unitInformation
.
setHeadCardPhotoBack
(
unitInformation
.
getHeadCardPhotoBack
());
unitInformation
.
setHeadCardPhotoBack
(
unitInformation
.
getHeadCardPhotoBack
());
unitInformation
.
setHeadCardPhotoFront
(
unitInformation
.
getHeadCardPhotoFront
());
unitInformation
.
setHeadCardPhotoFront
(
unitInformation
.
getHeadCardPhotoFront
());
unitInformation
.
setRegisterPcdCode
((
unitInformation
.
getRegisterPcdCode
()
!=
null
&&
!
""
.
equals
(
unitInformation
.
getRegisterPcdCode
()))
?
unitInformation
.
getRegisterPcdCode
()
:
null
);
unitInformation
.
setRegisterPcdCode
((
unitInformation
.
getRegisterPcdCode
()
!=
null
&&!
""
.
equals
(
unitInformation
.
getRegisterPcdCode
()))?
unitInformation
.
getRegisterPcdCode
():
null
);
unitInformation
.
setWorkPcdCode
((
unitInformation
.
getWorkPcdCode
()
!=
null
&&
!
""
.
equals
(
unitInformation
.
getWorkPcdCode
()))
?
unitInformation
.
getWorkPcdCode
()
:
null
);
unitInformation
.
setWorkPcdCode
((
unitInformation
.
getWorkPcdCode
()
!=
null
&&!
""
.
equals
(
unitInformation
.
getWorkPcdCode
()))?
unitInformation
.
getWorkPcdCode
():
null
);
BeanUtils
.
copyProperties
(
commerceInfo
,
commerceDto
);
BeanUtils
.
copyProperties
(
commerceInfo
,
commerceDto
);
commerceDto
.
setBusinessLicensePhoto
(
commerceDto
.
getBusinessLicensePhoto
());
commerceDto
.
setBusinessLicensePhoto
(
commerceDto
.
getBusinessLicensePhoto
());
commerceDto
.
setLegalPersonCardPhotoBack
(
commerceDto
.
getLegalPersonCardPhotoBack
());
commerceDto
.
setLegalPersonCardPhotoBack
(
commerceDto
.
getLegalPersonCardPhotoBack
());
commerceDto
.
setLegalPersonCardPhotoFront
(
commerceDto
.
getLegalPersonCardPhotoFront
());
commerceDto
.
setLegalPersonCardPhotoFront
(
commerceDto
.
getLegalPersonCardPhotoFront
());
BeanUtils
.
copyProperties
(
unitInfo
,
cccount
);
BeanUtils
.
copyProperties
(
unitInfo
,
cccount
);
UnitDataDto
unitDataDt
=
new
UnitDataDto
(
unitInformation
,
commerceDto
,
cccount
);
UnitDataDto
unitDataDt
=
new
UnitDataDto
(
unitInformation
,
commerceDto
,
cccount
);
return
unitDataDt
;
return
unitDataDt
;
}
}
@Transactional
public
Boolean
updateUnitDataDto
(
UnitDataDto
unitDataDto
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
updateUnitDataDto
(
UnitDataDto
unitDataDto
){
//验证二维码
//验证二维码
UnitInfo
unitInfo
=
new
UnitInfo
();
UnitInfo
unitInfo
=
new
UnitInfo
();
unitInfo
=
unitInfoMapper
.
selectById
(
unitDataDto
.
getUnitInformation
().
getSequenceNbr
());
unitInfo
=
unitInfoMapper
.
selectById
(
unitDataDto
.
getUnitInformation
().
getSequenceNbr
());
List
<
String
>
lisk
=
new
ArrayList
<>();
UnitInformation
unitInformation
=
unitDataDto
.
getUnitInformation
();
UnitInformation
unitInformation
=
unitDataDto
.
getUnitInformation
();
List
<
Long
>
dis
=
unitInformation
.
getRegionalCompaniesSeq
();
//区域公司
LambdaQueryWrapper
<
RegionalCompanies
>
qu
=
new
LambdaQueryWrapper
<>();
qu
.
eq
(
RegionalCompanies:
:
getUnitId
,
unitInfo
.
getAmosCompanySeq
());
List
<
RegionalCompanies
>
oldList
=
regionalCompaniesMapper
.
selectList
(
qu
);
List
<
String
>
oldDisString
=
oldList
.
stream
().
map
((
regionalCompanies
)
->
regionalCompanies
.
getRegionalCompaniesSeq
().
toString
()).
collect
(
Collectors
.
toList
());
List
<
String
>
newDisString
=
dis
.
stream
().
map
((
regionalCompaniesSeq
)
->
regionalCompaniesSeq
.
toString
()).
collect
(
Collectors
.
toList
());
for
(
String
item:
oldDisString
){
if
(!
newDisString
.
contains
(
item
)){
throw
new
BadRequest
(
"所属区域公司只能增加, 不能删除"
);
}
}
List
<
String
>
lisk
=
new
ArrayList
<>();
JSONArray
regionName
=
getRegionName
();
JSONArray
regionName
=
getRegionName
();
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
List
<
Integer
>
regist
=
unitInformation
.
getRegisterPcdCodeList
();
List
<
Integer
>
regist
=
unitInformation
.
getRegisterPcdCodeList
();
List
<
Integer
>
workP
=
unitInformation
.
getWorkPcdCodeList
();
List
<
Integer
>
workP
=
unitInformation
.
getWorkPcdCodeList
();
//注册地址
//注册地址
if
(
regist
!=
null
&&
!
regist
.
isEmpty
())
{
if
(
regist
!=
null
&&!
regist
.
isEmpty
())
{
StringBuilder
codenameRegi
=
new
StringBuilder
();
StringBuilder
codenameRegi
=
new
StringBuilder
();
for
(
int
i
=
0
,
len
=
regist
.
size
();
i
<
len
;
i
++)
{
for
(
int
i
=
0
,
len
=
regist
.
size
();
i
<
len
;
i
++)
{
for
(
RegionModel
regionModel
:
list
)
{
for
(
RegionModel
regionModel
:
list
)
{
if
(
regionModel
.
getRegionCode
().
intValue
()
==
regist
.
get
(
i
).
intValue
())
{
if
(
regionModel
.
getRegionCode
().
intValue
()
==
regist
.
get
(
i
).
intValue
())
{
...
@@ -901,13 +900,12 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -901,13 +900,12 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
}
}
}
}
}
}
unitInformation
.
setRegisterPcd
(
codenameRegi
!=
null
&&
!
""
.
equals
(
codenameRegi
.
toString
())
?
codenameRegi
.
toString
()
:
null
);
unitInformation
.
setRegisterPcd
(
codenameRegi
!=
null
&&!
""
.
equals
(
codenameRegi
.
toString
())?
codenameRegi
.
toString
():
null
);
}
}
//办公地址
//办公地址
if
(
workP
!=
null
&&
!
workP
.
isEmpty
())
{
if
(
workP
!=
null
&&!
workP
.
isEmpty
()){
StringBuilder
codenamework
=
new
StringBuilder
();
StringBuilder
codenamework
=
new
StringBuilder
();;
;
for
(
int
i
=
0
,
len
=
workP
.
size
();
i
<
len
;
i
++)
{
for
(
int
i
=
0
,
len
=
workP
.
size
();
i
<
len
;
i
++)
{
for
(
RegionModel
regionModel
:
list
)
{
for
(
RegionModel
regionModel
:
list
)
{
if
(
regionModel
.
getRegionCode
().
intValue
()
==
workP
.
get
(
i
).
intValue
())
{
if
(
regionModel
.
getRegionCode
().
intValue
()
==
workP
.
get
(
i
).
intValue
())
{
...
@@ -918,43 +916,32 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -918,43 +916,32 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
}
}
}
}
}
}
unitInformation
.
setWorkPcd
(
codenamework
!=
null
&&
!
""
.
equals
(
codenamework
.
toString
())
?
codenamework
.
toString
()
:
null
);
unitInformation
.
setWorkPcd
(
codenamework
!=
null
&&!
""
.
equals
(
codenamework
.
toString
())?
codenamework
.
toString
():
null
);
}
}
unitInformation
.
setHeadCardPhotoBackUrl
(
unitInformation
.
getHeadCardPhotoBackUrl
());
unitInformation
.
setHeadCardPhotoBackUrl
(
unitInformation
.
getHeadCardPhotoBackUrl
());
unitInformation
.
setHeadCardPhotoFrontUrl
(
unitInformation
.
getHeadCardPhotoFrontUrl
());
unitInformation
.
setHeadCardPhotoFrontUrl
(
unitInformation
.
getHeadCardPhotoFrontUrl
());
unitInformation
.
setRegisterPcdCodeList
(
unitInformation
.
getRegisterPcdCodeList
());
unitInformation
.
setRegisterPcdCodeList
(
unitInformation
.
getRegisterPcdCodeList
());
unitInformation
.
setWorkPcdCodeList
(
unitInformation
.
getWorkPcdCodeList
());
unitInformation
.
setWorkPcdCodeList
(
unitInformation
.
getWorkPcdCodeList
());
List
<
Long
>
dis
=
unitInformation
.
getRegionalCompaniesSeq
();
List
<
String
>
disST
=
dis
.
stream
().
map
(
x
->
x
+
""
).
collect
(
Collectors
.
toList
());
List
<
String
>
disST
=
dis
.
stream
().
map
(
x
->
x
+
""
).
collect
(
Collectors
.
toList
());
BeanUtils
.
copyProperties
(
unitInformation
,
unitInfo
);
BeanUtils
.
copyProperties
(
unitInformation
,
unitInfo
);
CommerceInfo
commerceInfo
=
new
CommerceInfo
();
CommerceInfo
commerceInfo
=
new
CommerceInfo
();
commerceInfo
=
commerceInfoMapper
.
selectById
(
unitDataDto
.
getCommerceDto
().
getSequenceNbr
());
commerceInfo
=
commerceInfoMapper
.
selectById
(
unitDataDto
.
getCommerceDto
().
getSequenceNbr
());
CommerceDto
commerceDto
=
unitDataDto
.
getCommerceDto
();
CommerceDto
commerceDto
=
unitDataDto
.
getCommerceDto
();
commerceDto
.
setBusinessLicensePhotoUrl
(
commerceDto
.
getBusinessLicensePhotoUrl
());
commerceDto
.
setBusinessLicensePhotoUrl
(
commerceDto
.
getBusinessLicensePhotoUrl
());
commerceDto
.
setLegalPersonCardPhotoBackUrl
(
commerceDto
.
getLegalPersonCardPhotoBackUrl
());
commerceDto
.
setLegalPersonCardPhotoBackUrl
(
commerceDto
.
getLegalPersonCardPhotoBackUrl
());
commerceDto
.
setLegalPersonCardPhotoFrontUrl
(
commerceDto
.
getLegalPersonCardPhotoFrontUrl
());
commerceDto
.
setLegalPersonCardPhotoFrontUrl
(
commerceDto
.
getLegalPersonCardPhotoFrontUrl
());
BeanUtils
.
copyProperties
(
commerceDto
,
commerceInfo
);
BeanUtils
.
copyProperties
(
commerceDto
,
commerceInfo
);
unitInfo
.
setRegionalCompaniesSeq
(
disST
);
unitInfo
.
setRegionalCompaniesSeq
(
disST
);
unitInfoMapper
.
updateById
(
unitInfo
);
unitInfoMapper
.
updateById
(
unitInfo
);
commerceInfoMapper
.
updateById
(
commerceInfo
);
commerceInfoMapper
.
updateById
(
commerceInfo
);
//区域公司
LambdaQueryWrapper
<
RegionalCompanies
>
qu
=
new
LambdaQueryWrapper
<>();
qu
.
eq
(
RegionalCompanies:
:
getUnitId
,
unitInfo
.
getAmosCompanySeq
());
List
<
RegionalCompanies
>
oldList
=
regionalCompaniesMapper
.
selectList
(
qu
);
regionalCompaniesMapper
.
delete
(
qu
);
regionalCompaniesMapper
.
delete
(
qu
);
List
<
String
>
oldDisString
=
oldList
.
stream
().
map
((
regionalCompanies
)
->
regionalCompanies
.
getRegionalCompaniesSeq
().
toString
()).
collect
(
Collectors
.
toList
());
List
<
String
>
newDisString
=
dis
.
stream
().
map
((
regionalCompaniesSeq
)
->
regionalCompaniesSeq
.
toString
()).
collect
(
Collectors
.
toList
());
for
(
String
item:
oldDisString
){
if
(!
newDisString
.
contains
(
item
)){
throw
new
BadRequest
(
"所属区域公司只能增加, 不能删除"
);
}
}
List
<
RegionalCompanies
>
regionalComp
=
new
ArrayList
<>();
List
<
RegionalCompanies
>
regionalComp
=
new
ArrayList
<>();
...
@@ -1009,25 +996,26 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -1009,25 +996,26 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
userEmpowerMapper
.
insert
(
stdUserEmpower
);
userEmpowerMapper
.
insert
(
stdUserEmpower
);
}
}
return
true
;
return
true
;
}
}
public
JSONArray
getRegionName
()
{
public
JSONArray
getRegionName
(){
JSONArray
jsonArray
=
new
JSONArray
();
JSONArray
jsonArray
=
new
JSONArray
();
if
(
redisUtil
.
hasKey
(
regionRedis
))
{
if
(
redisUtil
.
hasKey
(
regionRedis
))
{
jsonArray
=
JSONArray
.
parseArray
(
redisUtil
.
get
(
regionRedis
).
toString
());
jsonArray
=
JSONArray
.
parseArray
(
redisUtil
.
get
(
regionRedis
).
toString
());
}
else
{
}
else
{
Collection
<
RegionModel
>
regionChild
=
new
ArrayList
<>();
Collection
<
RegionModel
>
regionChild
=
new
ArrayList
<>();
RegionModel
regionModel1
=
new
RegionModel
();
RegionModel
regionModel1
=
new
RegionModel
();
regionChild
.
add
(
regionModel1
);
regionChild
.
add
(
regionModel1
);
FeignClientResult
<
Collection
<
RegionModel
>>
collectionFeignClientResult
=
Systemctl
.
regionClient
.
queryForTreeParent
(
610000L
);
FeignClientResult
<
Collection
<
RegionModel
>>
collectionFeignClientResult
=
Systemctl
.
regionClient
.
queryForTreeParent
(
610000L
);
Collection
<
RegionModel
>
result
=
collectionFeignClientResult
.
getResult
();
Collection
<
RegionModel
>
result
=
collectionFeignClientResult
.
getResult
();
for
(
RegionModel
regionModel
:
result
)
{
for
(
RegionModel
regionModel
:
result
)
{
if
(
null
!=
regionModel
&&
null
!=
regionModel
.
getChildren
())
{
if
(
null
!=
regionModel
&&
null
!=
regionModel
.
getChildren
())
{
for
(
RegionModel
child
:
regionModel
.
getChildren
())
{
for
(
RegionModel
child
:
regionModel
.
getChildren
())
{
if
(
null
!=
child
&&
null
!=
child
.
getChildren
())
{
if
(
null
!=
child
&&
null
!=
child
.
getChildren
())
{
for
(
RegionModel
childChild
:
child
.
getChildren
())
{
for
(
RegionModel
childChild
:
child
.
getChildren
())
{
jsonArray
.
add
(
childChild
);
jsonArray
.
add
(
childChild
);
}
}
...
@@ -1040,22 +1028,23 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -1040,22 +1028,23 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
}
}
}
}
redisUtil
.
set
(
regionRedis
,
jsonArray
);
redisUtil
.
set
(
regionRedis
,
jsonArray
);
}
}
return
jsonArray
;
return
jsonArray
;
}
}
public
Page
<
PeasantHousehold
>
getPeasantHouseholdData
(
Long
unitInfoId
,
public
Page
<
PeasantHousehold
>
getPeasantHouseholdData
(
Long
unitInfoId
,
Long
regionalCompaniesSeq
,
Long
regionalCompaniesSeq
,
int
pageNum
,
int
pageNum
,
int
pageSize
,
int
pageSize
,
String
peasantHouseholdNo
,
String
peasantHouseholdNo
,
String
ownersName
,
String
ownersName
,
String
ids
)
{
String
ids
)
{
UnitInfo
unitInfo
=
unitInfoMapper
.
selectById
(
unitInfoId
);
UnitInfo
unitInfo
=
unitInfoMapper
.
selectById
(
unitInfoId
);
PageHelper
.
startPage
(
pageNum
,
pageSize
);
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
);
PageInfo
<
PeasantHousehold
>
page
=
new
PageInfo
(
list
);
Page
<
PeasantHousehold
>
pagenew
=
new
Page
<
PeasantHousehold
>();
Page
<
PeasantHousehold
>
pagenew
=
new
Page
<
PeasantHousehold
>();
pagenew
.
setCurrent
(
pageNum
);
pagenew
.
setCurrent
(
pageNum
);
...
@@ -1064,16 +1053,15 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
...
@@ -1064,16 +1053,15 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
pagenew
.
setRecords
(
page
.
getList
());
pagenew
.
setRecords
(
page
.
getList
());
return
pagenew
;
return
pagenew
;
}
}
public
Page
<
PeasantHousehold
>
selectPeasantHouseholdListsg
(
Long
unitInfoId
,
public
Page
<
PeasantHousehold
>
selectPeasantHouseholdListsg
(
Long
unitInfoId
,
Long
regionalCompaniesSeq
,
Long
regionalCompaniesSeq
,
int
pageNum
,
int
pageNum
,
int
pageSize
,
int
pageSize
,
String
peasantHouseholdNo
,
String
peasantHouseholdNo
,
String
ownersName
,
String
ownersName
,
String
ids
)
{
String
ids
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
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
);
PageInfo
<
PeasantHousehold
>
page
=
new
PageInfo
(
list
);
Page
<
PeasantHousehold
>
pagenew
=
new
Page
<
PeasantHousehold
>();
Page
<
PeasantHousehold
>
pagenew
=
new
Page
<
PeasantHousehold
>();
pagenew
.
setCurrent
(
pageNum
);
pagenew
.
setCurrent
(
pageNum
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/mapper/PersonBasicMapper.java
View file @
c05bc689
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
mapper
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.
core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.EXPersonUser
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.EXPersonUser
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.UserMapperDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.UserMapperDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.PersonBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.PersonBasic
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -45,10 +43,12 @@ public interface PersonBasicMapper extends BaseMapper<PersonBasic> {
...
@@ -45,10 +43,12 @@ public interface PersonBasicMapper extends BaseMapper<PersonBasic> {
@Param
(
"accountName"
)
String
accountName
,
@Param
(
"accountName"
)
String
accountName
,
@Param
(
"projectName"
)
String
projectName
,
@Param
(
"projectName"
)
String
projectName
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"ids"
)
String
[]
ids
@Param
(
"ids"
)
String
[]
ids
);
);
List
<
Map
<
String
,
Object
>>
getPersonYardStatistics
(
@Param
(
"parentCode"
)
String
parentCode
);
List
<
Map
<
String
,
Object
>>
getPersonYardStatistics
(
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"platformStationId"
)
String
platformStationId
);
List
<
Map
<
String
,
Object
>>
getPersonYardByPage
(
@Param
(
"current"
)
Integer
current
,
List
<
Map
<
String
,
Object
>>
getPersonYardByPage
(
@Param
(
"current"
)
Integer
current
,
...
@@ -56,12 +56,16 @@ public interface PersonBasicMapper extends BaseMapper<PersonBasic> {
...
@@ -56,12 +56,16 @@ public interface PersonBasicMapper extends BaseMapper<PersonBasic> {
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
,
@Param
(
"ne"
)
String
ne
);
@Param
(
"ne"
)
String
ne
,
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"platformStationId"
)
String
platformStationId
);
Integer
getPersonYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
,
Integer
getPersonYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
,
@Param
(
"ne"
)
String
ne
);
@Param
(
"ne"
)
String
ne
,
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"platformStationId"
)
String
platformStationId
);
List
<
StationQrCodeStatistics
>
getPersonStatistics
();
List
<
StationQrCodeStatistics
>
getPersonStatistics
();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
View file @
c05bc689
...
@@ -205,6 +205,12 @@
...
@@ -205,6 +205,12 @@
<if
test=
"parentCode != null and parentCode != ''"
>
<if
test=
"parentCode != null and parentCode != ''"
>
AND a.project_org_code like concat(#{parentCode},'%')
AND a.project_org_code like concat(#{parentCode},'%')
</if>
</if>
<if
test=
"platformStationId != null and platformStationId != ''"
>
AND c.platform_station_id = #{platformStationId}
</if>
<if
test=
"areaCode != null and areaCode != ''"
>
AND c.area_code = #{areaCode}
</if>
</where>
</where>
GROUP BY
GROUP BY
a.qrcode_color
a.qrcode_color
...
@@ -240,6 +246,12 @@
...
@@ -240,6 +246,12 @@
<if
test=
"ne != null and ne != ''"
>
<if
test=
"ne != null and ne != ''"
>
AND a.qrcode_color != #{ne}
AND a.qrcode_color != #{ne}
</if>
</if>
<if
test=
"platformStationId != null and platformStationId != ''"
>
AND c.platform_station_id = #{platformStationId}
</if>
<if
test=
"areaCode != null and areaCode != ''"
>
AND c.area_code = #{areaCode}
</if>
</where>
</where>
ORDER BY sort asc,a.rec_date DESC
ORDER BY sort asc,a.rec_date DESC
limit #{current},#{size}
limit #{current},#{size}
...
@@ -266,6 +278,12 @@
...
@@ -266,6 +278,12 @@
<if
test=
"ne != null and ne != ''"
>
<if
test=
"ne != null and ne != ''"
>
AND a.qrcode_color != #{ne}
AND a.qrcode_color != #{ne}
</if>
</if>
<if
test=
"platformStationId != null and platformStationId != ''"
>
AND c.platform_station_id = #{platformStationId}
</if>
<if
test=
"areaCode != null and areaCode != ''"
>
AND c.area_code = #{areaCode}
</if>
</where>
</where>
</select>
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
c05bc689
...
@@ -1129,7 +1129,7 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -1129,7 +1129,7 @@ public class MonitorFanIdxController extends BaseController {
@ApiOperation
(
value
=
"运维数据 "
)
@ApiOperation
(
value
=
"运维数据 "
)
@GetMapping
(
"/operationData"
)
@GetMapping
(
"/operationData"
)
public
ResponseModel
<
IPage
<
Map
<
String
,
Object
>>>
operationData
(
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
,
public
ResponseModel
<
IPage
<
Map
<
String
,
Object
>>>
operationData
(
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
,
@RequestParam
(
value
=
"
stationId"
,
required
=
false
)
String
s
tationId
)
{
@RequestParam
(
value
=
"
platformStationId"
,
required
=
false
)
String
platformS
tationId
)
{
// List<StationCacheInfoDto> list = commonServiceImpl.getListStationCacheInfoDto();
// List<StationCacheInfoDto> list = commonServiceImpl.getListStationCacheInfoDto();
...
@@ -1153,14 +1153,14 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -1153,14 +1153,14 @@ public class MonitorFanIdxController extends BaseController {
// result.setRecords(mapList);
// result.setRecords(mapList);
// result.setCurrent(1);
// result.setCurrent(1);
// result.setTotal(mapList.size());
// result.setTotal(mapList.size());
return
ResponseHelper
.
buildResponse
(
monitorService
.
operationData
(
areaCode
,
s
tationId
));
return
ResponseHelper
.
buildResponse
(
monitorService
.
operationData
(
areaCode
,
platformS
tationId
));
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"全国新能源接入情况 "
)
@ApiOperation
(
value
=
"全国新能源接入情况 "
)
@GetMapping
(
"/getAccessSituation"
)
@GetMapping
(
"/getAccessSituation"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAccessSituation
(
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
,
public
ResponseModel
<
Map
<
String
,
Object
>>
getAccessSituation
(
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
,
@RequestParam
(
value
=
"
stationId"
,
required
=
false
)
String
s
tationId
)
{
@RequestParam
(
value
=
"
platformStationId"
,
required
=
false
)
String
platformS
tationId
)
{
return
ResponseHelper
.
buildResponse
(
monitorService
.
getAccessSituation
(
areaCode
,
s
tationId
));
return
ResponseHelper
.
buildResponse
(
monitorService
.
getAccessSituation
(
areaCode
,
platformS
tationId
));
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/PersonQrCodeController.java
View file @
c05bc689
...
@@ -68,12 +68,14 @@ public class PersonQrCodeController extends BaseController {
...
@@ -68,12 +68,14 @@ public class PersonQrCodeController extends BaseController {
@GetMapping
(
value
=
"/getPersonYardStatistics"
)
@GetMapping
(
value
=
"/getPersonYardStatistics"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 人员赋码环形图查询"
,
notes
=
"评估大屏 - 人员赋码环形图查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 人员赋码环形图查询"
,
notes
=
"评估大屏 - 人员赋码环形图查询"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getPersonYardStatistics
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getPersonYardStatistics
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
)
{
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
,
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
,
@RequestParam
(
value
=
"platformStationId"
,
required
=
false
)
String
platformStationId
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotEmpty
(
dataType
)
&&
dataType
.
equals
(
"person"
))
{
if
(
StringUtils
.
isNotEmpty
(
dataType
)
&&
dataType
.
equals
(
"person"
))
{
resultList
=
personBasicMapper
.
getPersonYardStatistics
(
parentCode
);
resultList
=
personBasicMapper
.
getPersonYardStatistics
(
parentCode
,
areaCode
,
platformStationId
);
}
else
if
(
StringUtils
.
isNotEmpty
(
dataType
)
&&
dataType
.
equals
(
"equip"
))
{
}
else
if
(
StringUtils
.
isNotEmpty
(
dataType
)
&&
dataType
.
equals
(
"equip"
))
{
resultList
=
sjglZsjZsbtzMapper
.
getEquipYardStatistics
(
parentCode
);
resultList
=
sjglZsjZsbtzMapper
.
getEquipYardStatistics
(
parentCode
);
}
else
if
(
StringUtils
.
isNotEmpty
(
dataType
)
&&
dataType
.
equals
(
"job"
))
{
}
else
if
(
StringUtils
.
isNotEmpty
(
dataType
)
&&
dataType
.
equals
(
"job"
))
{
...
@@ -104,11 +106,13 @@ public class PersonQrCodeController extends BaseController {
...
@@ -104,11 +106,13 @@ public class PersonQrCodeController extends BaseController {
@RequestParam
(
value
=
"size"
)
Integer
size
,
@RequestParam
(
value
=
"size"
)
Integer
size
,
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
,
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
,
@RequestParam
(
required
=
false
)
String
date
,
@RequestParam
(
required
=
false
)
String
date
,
@RequestParam
(
required
=
false
)
String
qrCodeColor
)
{
@RequestParam
(
required
=
false
)
String
qrCodeColor
,
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
,
@RequestParam
(
value
=
"platformStationId"
,
required
=
false
)
String
platformStationId
)
{
Page
<
Map
<
String
,
Object
>>
resultList
=
new
Page
<>();
Page
<
Map
<
String
,
Object
>>
resultList
=
new
Page
<>();
if
(
"person"
.
equals
(
dataType
))
{
if
(
"person"
.
equals
(
dataType
))
{
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
,
date
,
qrCodeColor
,
null
,
null
);
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
,
date
,
qrCodeColor
,
null
,
null
,
areaCode
,
platformStationId
);
}
else
if
(
"equip"
.
equals
(
dataType
))
{
}
else
if
(
"equip"
.
equals
(
dataType
))
{
List
<
Map
<
String
,
Object
>>
equipYardByPage
=
sjglZsjZsbtzMapper
.
getEquipYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
,
null
);
List
<
Map
<
String
,
Object
>>
equipYardByPage
=
sjglZsjZsbtzMapper
.
getEquipYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
,
null
);
Integer
equipYardByPageCount
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
date
,
qrCodeColor
,
null
);
Integer
equipYardByPageCount
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
date
,
qrCodeColor
,
null
);
...
@@ -144,7 +148,9 @@ public class PersonQrCodeController extends BaseController {
...
@@ -144,7 +148,9 @@ public class PersonQrCodeController extends BaseController {
@GetMapping
(
value
=
"/getQrCodeCount"
)
@GetMapping
(
value
=
"/getQrCodeCount"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 人员赋码数量等统计"
,
notes
=
"评估大屏 - 人员赋码数量等统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 人员赋码数量等统计"
,
notes
=
"评估大屏 - 人员赋码数量等统计"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getQrCodeCount
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
public
ResponseModel
<
Map
<
String
,
Object
>>
getQrCodeCount
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
)
{
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
,
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
,
@RequestParam
(
value
=
"platformStationId"
,
required
=
false
)
String
platformStationId
)
{
FeignClientResult
<
Map
<
String
,
Object
>>
sevenEntity
=
null
;
FeignClientResult
<
Map
<
String
,
Object
>>
sevenEntity
=
null
;
try
{
try
{
...
@@ -160,7 +166,7 @@ public class PersonQrCodeController extends BaseController {
...
@@ -160,7 +166,7 @@ public class PersonQrCodeController extends BaseController {
String
yellowToGreen
=
result
.
get
(
"yellowToGreen"
).
toString
();
String
yellowToGreen
=
result
.
get
(
"yellowToGreen"
).
toString
();
Integer
countAll
=
0
;
Integer
countAll
=
0
;
if
(
"RYFM"
.
equals
(
dataType
)
||
"person"
.
equals
(
dataType
))
{
if
(
"RYFM"
.
equals
(
dataType
)
||
"person"
.
equals
(
dataType
))
{
countAll
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
,
null
,
null
,
null
);
countAll
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
,
null
,
null
,
null
,
areaCode
,
platformStationId
);
}
else
if
(
"equip"
.
equals
(
dataType
))
{
}
else
if
(
"equip"
.
equals
(
dataType
))
{
countAll
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
null
,
null
,
null
);
countAll
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
null
,
null
,
null
);
}
else
if
(
"job"
.
equals
(
dataType
))
{
}
else
if
(
"job"
.
equals
(
dataType
))
{
...
@@ -273,10 +279,12 @@ public class PersonQrCodeController extends BaseController {
...
@@ -273,10 +279,12 @@ public class PersonQrCodeController extends BaseController {
@RequestParam
(
required
=
false
,
value
=
"score"
)
BigDecimal
score
,
@RequestParam
(
required
=
false
,
value
=
"score"
)
BigDecimal
score
,
@RequestParam
(
value
=
"current"
)
Integer
current
,
@RequestParam
(
value
=
"current"
)
Integer
current
,
@RequestParam
(
value
=
"size"
)
Integer
size
,
@RequestParam
(
value
=
"size"
)
Integer
size
,
@RequestParam
(
required
=
false
,
value
=
"date"
)
String
date
)
{
@RequestParam
(
required
=
false
,
value
=
"date"
)
String
date
,
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
,
@RequestParam
(
value
=
"platformStationId"
,
required
=
false
)
String
platformStationId
)
{
Page
<
Map
<
String
,
Object
>>
resultList
=
new
Page
<>();
Page
<
Map
<
String
,
Object
>>
resultList
=
new
Page
<>();
if
(
"V1"
.
equals
(
column
))
{
if
(
"V1"
.
equals
(
column
))
{
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
,
date
,
null
,
"green"
,
score
);
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
,
date
,
null
,
"green"
,
score
,
areaCode
,
platformStationId
);
}
else
if
(
"S1"
.
equals
(
column
))
{
}
else
if
(
"S1"
.
equals
(
column
))
{
List
<
Map
<
String
,
Object
>>
equipYardByPage
=
sjglZsjZsbtzMapper
.
getEquipYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
null
,
"green"
);
List
<
Map
<
String
,
Object
>>
equipYardByPage
=
sjglZsjZsbtzMapper
.
getEquipYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
null
,
"green"
);
Integer
equipYardByPageCount
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
date
,
null
,
"green"
);
Integer
equipYardByPageCount
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
date
,
null
,
"green"
);
...
@@ -330,8 +338,8 @@ public class PersonQrCodeController extends BaseController {
...
@@ -330,8 +338,8 @@ public class PersonQrCodeController extends BaseController {
if
(
"V1"
.
equals
(
column
))
{
if
(
"V1"
.
equals
(
column
))
{
resultMap
=
personBasicServiceImpl
.
getPersonDetailInfoByObjectId
(
objectId
);
resultMap
=
personBasicServiceImpl
.
getPersonDetailInfoByObjectId
(
objectId
);
if
(
resultMap
.
get
(
"recDate"
).
equals
(
""
)){
if
(
resultMap
.
get
(
"recDate"
).
equals
(
""
))
{
resultMap
.
put
(
"recDate"
,
resultMap
.
get
(
"qrcodeDate"
));
resultMap
.
put
(
"recDate"
,
resultMap
.
get
(
"qrcodeDate"
));
}
}
}
else
if
(
"S1"
.
equals
(
column
))
{
}
else
if
(
"S1"
.
equals
(
column
))
{
resultMap
=
sjglZsjZsbtzMapper
.
getEquipDetailInfoByObjectId
(
objectId
);
resultMap
=
sjglZsjZsbtzMapper
.
getEquipDetailInfoByObjectId
(
objectId
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/StationCacheInfoDto.java
View file @
c05bc689
...
@@ -9,6 +9,8 @@ public class StationCacheInfoDto implements Serializable {
...
@@ -9,6 +9,8 @@ public class StationCacheInfoDto implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
//场站id
//场站id
private
String
stationId
;
private
String
stationId
;
//平台场站id
private
String
platformStationId
;
//场站名称
//场站名称
private
String
stationName
;
private
String
stationName
;
//场站类型
//场站类型
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/MonitorService.java
View file @
c05bc689
...
@@ -15,11 +15,11 @@ import java.util.Map;
...
@@ -15,11 +15,11 @@ import java.util.Map;
public
interface
MonitorService
{
public
interface
MonitorService
{
/**
/**
* @param areaCode 区域编码
* @param areaCode 区域编码
* @param
s
tationId 场站id
* @param
platformS
tationId 场站id
* @return 全国运维数据
* @return 全国运维数据
* @Description 根据区域编码动态运维数据
* @Description 根据区域编码动态运维数据
*/
*/
IPage
<
Map
<
String
,
Object
>>
operationData
(
String
areaCode
,
String
s
tationId
);
IPage
<
Map
<
String
,
Object
>>
operationData
(
String
areaCode
,
String
platformS
tationId
);
/**
/**
* @return Map<String, Object>
* @return Map<String, Object>
...
@@ -123,8 +123,8 @@ public interface MonitorService {
...
@@ -123,8 +123,8 @@ public interface MonitorService {
/**
/**
* 获取接入情况
* 获取接入情况
* @param areaCode
* @param areaCode
* @param
s
tationId
* @param
platformS
tationId
* @return
* @return
*/
*/
Map
<
String
,
Object
>
getAccessSituation
(
String
areaCode
,
String
s
tationId
);
Map
<
String
,
Object
>
getAccessSituation
(
String
areaCode
,
String
platformS
tationId
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
View file @
c05bc689
...
@@ -61,13 +61,13 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -61,13 +61,13 @@ public class MonitorServiceImpl implements MonitorService {
private
Resource
overviewGF
;
private
Resource
overviewGF
;
@Override
@Override
public
IPage
<
Map
<
String
,
Object
>>
operationData
(
String
areaCode
,
String
s
tationId
)
{
public
IPage
<
Map
<
String
,
Object
>>
operationData
(
String
areaCode
,
String
platformS
tationId
)
{
List
<
StationCacheInfoDto
>
list
=
getListStationCacheInfoDto
();
List
<
StationCacheInfoDto
>
list
=
getListStationCacheInfoDto
();
if
(
null
!=
areaCode
)
{
if
(
null
!=
areaCode
)
{
list
=
list
.
stream
().
filter
(
e
->
e
.
getAreaCode
().
toUpperCase
(
Locale
.
ROOT
).
equals
(
areaCode
.
toUpperCase
(
Locale
.
ROOT
))).
collect
(
Collectors
.
toList
());
list
=
list
.
stream
().
filter
(
e
->
e
.
getAreaCode
().
toUpperCase
(
Locale
.
ROOT
).
equals
(
areaCode
.
toUpperCase
(
Locale
.
ROOT
))).
collect
(
Collectors
.
toList
());
}
}
if
(!
StringUtils
.
isEmpty
(
s
tationId
))
{
if
(!
StringUtils
.
isEmpty
(
platformS
tationId
))
{
list
=
list
.
stream
().
filter
(
e
->
e
.
get
StationId
().
toUpperCase
(
Locale
.
ROOT
).
equals
(
s
tationId
.
toUpperCase
(
Locale
.
ROOT
))).
collect
(
Collectors
.
toList
());
list
=
list
.
stream
().
filter
(
e
->
e
.
get
PlatformStationId
().
toUpperCase
(
Locale
.
ROOT
).
equals
(
platformS
tationId
.
toUpperCase
(
Locale
.
ROOT
))).
collect
(
Collectors
.
toList
());
}
}
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
Map
<
String
,
List
<
StationCacheInfoDto
>>
listMap
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
StationCacheInfoDto:
:
getStationType
,
Collectors
.
toList
()));
Map
<
String
,
List
<
StationCacheInfoDto
>>
listMap
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
StationCacheInfoDto:
:
getStationType
,
Collectors
.
toList
()));
...
@@ -160,6 +160,7 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -160,6 +160,7 @@ public class MonitorServiceImpl implements MonitorService {
stationCacheInfoDto
.
setBoosterGatewayId
(
stationBasic
.
getBoosterGatewayId
());
stationCacheInfoDto
.
setBoosterGatewayId
(
stationBasic
.
getBoosterGatewayId
());
stationCacheInfoDto
.
setBoosterCoreName
(
stationBasic
.
getBoosterCoreName
());
stationCacheInfoDto
.
setBoosterCoreName
(
stationBasic
.
getBoosterCoreName
());
stationCacheInfoDto
.
setStationCoreName
(
stationBasic
.
getStationCoreName
());
stationCacheInfoDto
.
setStationCoreName
(
stationBasic
.
getStationCoreName
());
stationCacheInfoDto
.
setPlatformStationId
(
stationBasic
.
getPlatformStationId
());
stationCacheInfoDtos
.
add
(
stationCacheInfoDto
);
stationCacheInfoDtos
.
add
(
stationCacheInfoDto
);
}
}
...
@@ -948,8 +949,8 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -948,8 +949,8 @@ public class MonitorServiceImpl implements MonitorService {
}
}
@Override
@Override
public
Map
<
String
,
Object
>
getAccessSituation
(
String
areaCode
,
String
s
tationId
)
{
public
Map
<
String
,
Object
>
getAccessSituation
(
String
areaCode
,
String
platformS
tationId
)
{
IPage
<
Map
<
String
,
Object
>>
page
=
operationData
(
areaCode
,
s
tationId
);
IPage
<
Map
<
String
,
Object
>>
page
=
operationData
(
areaCode
,
platformS
tationId
);
List
<
Map
<
String
,
Object
>>
records
=
page
.
getRecords
();
List
<
Map
<
String
,
Object
>>
records
=
page
.
getRecords
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(!
CollectionUtils
.
isEmpty
(
records
))
{
if
(!
CollectionUtils
.
isEmpty
(
records
))
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
View file @
c05bc689
...
@@ -124,9 +124,11 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
...
@@ -124,9 +124,11 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
String
date
,
String
date
,
String
qrCodeColor
,
String
qrCodeColor
,
String
ne
,
String
ne
,
BigDecimal
score
)
{
BigDecimal
score
,
List
<
Map
<
String
,
Object
>>
resultList
=
personBasicMapper
.
getPersonYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
,
ne
);
String
areaCode
,
Integer
count
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
,
date
,
qrCodeColor
,
ne
);
String
platformStationId
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
personBasicMapper
.
getPersonYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
,
ne
,
areaCode
,
platformStationId
);
Integer
count
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
,
date
,
qrCodeColor
,
ne
,
areaCode
,
platformStationId
);
resultList
.
forEach
(
item
->
{
resultList
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
View file @
c05bc689
...
@@ -7,14 +7,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -7,14 +7,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.boot.biz.common.feign.AmosFeignService
;
import
com.yeejoin.amos.boot.biz.common.feign.AmosFeignService
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jxiop.api.Enum.QrcodeColorEnum
;
import
com.yeejoin.amos.boot.module.jxiop.api.Enum.QrcodeColorEnum
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.*
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.*
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.PersonBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.api.feign.AgencyuserFeign
;
import
com.yeejoin.amos.boot.module.jxiop.api.feign.AgencyuserFeign
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.PersonAccountFedMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.PersonAccountFedMapper
;
...
@@ -36,19 +34,15 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -36,19 +34,15 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
springfox.documentation.spring.web.json.Json
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.lang.reflect.Field
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
...
@@ -65,9 +59,18 @@ import java.util.stream.Collectors;
...
@@ -65,9 +59,18 @@ import java.util.stream.Collectors;
public
class
PersonBasicServiceImpl
extends
BaseService
<
PersonBasicDto
,
PersonBasic
,
PersonBasicMapper
>
public
class
PersonBasicServiceImpl
extends
BaseService
<
PersonBasicDto
,
PersonBasic
,
PersonBasicMapper
>
implements
IPersonBasicService
{
implements
IPersonBasicService
{
/**
* 人员赋码触发风险模型
*/
public
static
final
String
RYFM_DATA_MQTT_TOPIC
=
"ryfm/data/analysis"
;
/**
* 人员红黄码恢复为绿码
*/
public
static
final
String
RYFM_GREEN
=
"ryfm/person/green"
;
@Autowired
protected
EmqKeeper
emqKeeper
;
@Autowired
@Autowired
PersonBasicMapper
personBasicMapper
;
PersonBasicMapper
personBasicMapper
;
// 人员账号信息service
// 人员账号信息service
@Autowired
@Autowired
PersonAccountServiceImpl
personAccountService
;
PersonAccountServiceImpl
personAccountService
;
...
@@ -84,36 +87,18 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
...
@@ -84,36 +87,18 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
String
secretKey
;
String
secretKey
;
@Autowired
@Autowired
QuerueProduce
querueProduce
;
QuerueProduce
querueProduce
;
@Autowired
PersonAccountFedMapper
personAccountFedMapper
;
@Autowired
@Autowired
private
AmosFeignService
amosFeignService
;
private
AmosFeignService
amosFeignService
;
@Autowired
@Autowired
private
RedisUtils
redisUtils
;
private
RedisUtils
redisUtils
;
@Autowired
protected
EmqKeeper
emqKeeper
;
@Autowired
@Autowired
private
AgencyuserFeign
agencyuserFeign
;
private
AgencyuserFeign
agencyuserFeign
;
@Autowired
@Autowired
private
UserEmpowerMapper
userEmpowerMapper
;
private
UserEmpowerMapper
userEmpowerMapper
;
/**
* 人员赋码触发风险模型
*/
public
static
final
String
RYFM_DATA_MQTT_TOPIC
=
"ryfm/data/analysis"
;
/**
* 人员红黄码恢复为绿码
*/
public
static
final
String
RYFM_GREEN
=
"ryfm/person/green"
;
private
String
UPDATE
=
"UPDATE"
;
private
String
UPDATE
=
"UPDATE"
;
private
String
INSERT
=
"INSERT"
;
private
String
INSERT
=
"INSERT"
;
@Autowired
PersonAccountFedMapper
personAccountFedMapper
;
/**
/**
* 分页查询
* 分页查询
...
@@ -960,8 +945,8 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
...
@@ -960,8 +945,8 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
return
page
;
return
page
;
}
}
public
List
<
Map
<
String
,
Object
>>
getPersonYardStatistics
(
String
parentCode
)
{
public
List
<
Map
<
String
,
Object
>>
getPersonYardStatistics
(
String
parentCode
,
String
areaCode
,
String
platformStationId
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
personBasicMapper
.
getPersonYardStatistics
(
parentCode
);
List
<
Map
<
String
,
Object
>>
resultList
=
personBasicMapper
.
getPersonYardStatistics
(
parentCode
,
areaCode
,
platformStationId
);
resultList
.
forEach
(
item
->
{
resultList
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
item
.
put
(
"name"
,
name
);
...
...
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