Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
b1dbc050
Commit
b1dbc050
authored
Oct 10, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
91ffeea4
7c12c0d3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
213 additions
and
50 deletions
+213
-50
UnitInfoController.java
...s/boot/module/hygf/biz/controller/UnitInfoController.java
+42
-0
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+161
-36
pom.xml
...system-jxiop/amos-boot-module-jxiop-bigscreen-biz/pom.xml
+6
-6
PowerGenerationImpl.java
...ot/module/jxiop/biz/service/impl/PowerGenerationImpl.java
+4
-8
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/UnitInfoController.java
View file @
b1dbc050
...
@@ -269,6 +269,48 @@ public class UnitInfoController extends BaseController {
...
@@ -269,6 +269,48 @@ public class UnitInfoController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"单位注册"
,
notes
=
"单位注册"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"单位注册"
,
notes
=
"单位注册"
)
public
ResponseModel
<
UnitRegisterDto
>
save
(
@RequestBody
UnitRegisterDto
model
)
{
public
ResponseModel
<
UnitRegisterDto
>
save
(
@RequestBody
UnitRegisterDto
model
)
{
try
{
try
{
//判断公司名称重复,
LambdaQueryWrapper
<
UnitInfo
>
qudg
=
new
LambdaQueryWrapper
<>();
qudg
.
eq
(
UnitInfo:
:
getName
,
model
.
getUnitInfoDto
().
getName
());
qudg
.
eq
(
UnitInfo:
:
getIsDelete
,
0
);
List
<
UnitInfo
>
unitInfo
=
unitInfoMapper
.
selectList
(
qudg
);
if
(
unitInfo
!=
null
&&!
unitInfo
.
isEmpty
()){
throw
new
BadRequest
(
"公司名称重复"
);
}
//判断公司统一信息用代码重复
LambdaQueryWrapper
<
CommerceInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<
CommerceInfo
>();
queryWrapper1
.
eq
(
CommerceInfo:
:
getCreditCode
,
model
.
getCommerceInfoDto
().
getCreditCode
());
queryWrapper1
.
eq
(
CommerceInfo:
:
getIsDelete
,
0
);
List
<
CommerceInfo
>
commerceInfo
=
commerceInfoMapper
.
selectList
(
queryWrapper1
);
if
(
commerceInfo
!=
null
&&!
commerceInfo
.
isEmpty
()){
throw
new
BadRequest
(
"统一信用代码重复"
);
}
//用户名重复
LambdaQueryWrapper
<
UnitInfo
>
qudg1
=
new
LambdaQueryWrapper
<>();
qudg1
.
eq
(
UnitInfo:
:
getAdminLoginName
,
model
.
getUnitInfoDto
().
getAdminLoginName
());
qudg1
.
eq
(
UnitInfo:
:
getIsDelete
,
0
);
List
<
UnitInfo
>
unitInfo1
=
unitInfoMapper
.
selectList
(
qudg
);
if
(
unitInfo1
!=
null
&&!
unitInfo1
.
isEmpty
()){
throw
new
BadRequest
(
"管理员账户名重复,请更换"
);
}
LambdaQueryWrapper
<
PublicAgencyUser
>
qud2
=
new
LambdaQueryWrapper
<>();
qud2
.
eq
(
PublicAgencyUser:
:
getAmosUserName
,
model
.
getUnitInfoDto
().
getAdminLoginName
());
List
<
PublicAgencyUser
>
publicAgencyUse
=
publicAgencyUserMapper
.
selectList
(
qud2
);
if
(
publicAgencyUse
!=
null
&&!
publicAgencyUse
.
isEmpty
()){
throw
new
BadRequest
(
"管理员账户名重复,请更换"
);
}
RequestContext
.
setAppKey
(
"AMOS_STUDIO"
);
RequestContext
.
setAppKey
(
"AMOS_STUDIO"
);
RequestContext
.
setProduct
(
"AMOS_STUDIO_WEB"
);
RequestContext
.
setProduct
(
"AMOS_STUDIO_WEB"
);
RequestContext
.
setToken
(
requestContext
.
getToken
());
RequestContext
.
setToken
(
requestContext
.
getToken
());
...
...
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 @
b1dbc050
...
@@ -171,7 +171,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -171,7 +171,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
regUnitInfo
.
setManagementUnit
(
"经销商"
);
regUnitInfo
.
setManagementUnit
(
"经销商"
);
try
{
try
{
// 1. 调用平台进行创建单位、用户信息
// 1. 调用平台进行创建单位、用户信息
this
.
createCompanyAndUser
(
regUnitInfo
);
//
this.createCompanyAndUser(regUnitInfo);
// 2.插入单位表
// 2.插入单位表
// regUnitInfo = this.createWithModel(regUnitInfo);
// regUnitInfo = this.createWithModel(regUnitInfo);
regUnitInfo
=
this
.
createWithModelnew
(
regUnitInfo
);
regUnitInfo
=
this
.
createWithModelnew
(
regUnitInfo
);
...
@@ -187,44 +187,44 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -187,44 +187,44 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
//新增人员基础信息表
//新增人员基础信息表
PersonnelBusiness
re
=
new
PersonnelBusiness
();
PublicAgencyUser
publicAgencyUser
=
new
PublicAgencyUser
();
publicAgencyUser
.
setAmosUserId
(
regUnitInfo
.
getAdminUserId
());
publicAgencyUser
.
setAmosUserName
(
regUnitInfo
.
getAdminLoginName
());
publicAgencyUser
.
setRealName
(
regUnitInfo
.
getAdminLoginName
());
publicAgencyUser
.
setRole
(
"["
+
regUnitInfo
.
getRoleId
()+
"]"
);
publicAgencyUser
.
setEmergencyTelephone
(
regUnitInfo
.
getAdminPhone
());
publicAgencyUser
.
setLockStatus
(
"LOCK"
);
publicAgencyUserMapper
.
insert
(
publicAgencyUser
);
re
.
setAmosDealerId
(
regUnitInfo
.
getAmosCompanySeq
());
// PublicAgencyUser publicAgencyUser=new PublicAgencyUser();
re
.
setAmosUnitId
(
regUnitInfo
.
getAmosCompanySeq
());
// publicAgencyUser.setAmosUserId(regUnitInfo.getAdminUserId());
re
.
setAmosUnitName
(
regUnitInfo
.
getName
());
// publicAgencyUser.setAmosUserName(regUnitInfo.getAdminLoginName());
re
.
setAmosUnitOrgCode
(
regUnitInfo
.
getAmosCompanyCode
());
// publicAgencyUser.setRealName(regUnitInfo.getAdminLoginName());
re
.
setFoundationId
(
publicAgencyUser
.
getSequenceNbr
());
// publicAgencyUser.setRole("["+regUnitInfo.getRoleId()+"]");
re
.
setUserType
(
"2"
);
// publicAgencyUser.setEmergencyTelephone(regUnitInfo.getAdminPhone());
personnelBusinessMapper
.
insert
(
re
);
// publicAgencyUser.setLockStatus("LOCK");
// publicAgencyUserMapper.insert(publicAgencyUser);
//
// PersonnelBusiness re=new PersonnelBusiness();
// re.setAmosDealerId(regUnitInfo.getAmosCompanySeq());
// re.setAmosUnitId(regUnitInfo.getAmosCompanySeq());
// re.setAmosUnitName(regUnitInfo.getName());
// re.setAmosUnitOrgCode(regUnitInfo.getAmosCompanyCode());
// re.setFoundationId(publicAgencyUser.getSequenceNbr());
// re.setUserType("2");
// personnelBusinessMapper.insert(re);
model
.
setCommerceInfoDto
(
commerceInfo
);
model
.
setCommerceInfoDto
(
commerceInfo
);
model
.
setUnitInfoDto
(
regUnitInfo
);
model
.
setUnitInfoDto
(
regUnitInfo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
// 失败后回滚:删除已经创建的企业信息
// 失败后回滚:删除已经创建的企业信息
if
(!
ObjectUtils
.
isEmpty
(
regUnitInfo
.
getAmosCompanySeq
()))
{
//
if (!ObjectUtils.isEmpty(regUnitInfo.getAmosCompanySeq())) {
FeignClientResult
<
CompanyModel
>
feignClientResult
=
Privilege
.
companyClient
//
FeignClientResult<CompanyModel> feignClientResult = Privilege.companyClient
.
seleteOne
(
regUnitInfo
.
getAmosCompanySeq
());
//
.seleteOne(regUnitInfo.getAmosCompanySeq());
if
(
feignClientResult
!=
null
)
{
//
if (feignClientResult != null) {
Privilege
.
companyClient
.
deleteCompany
(
regUnitInfo
.
getAmosCompanySeq
().
toString
());
//
Privilege.companyClient.deleteCompany(regUnitInfo.getAmosCompanySeq().toString());
}
//
}
}
//
}
// 失败后回滚:删除已经创建的管理员账号
//
// 失败后回滚:删除已经创建的管理员账号
if
(
StringUtils
.
isNotEmpty
(
regUnitInfo
.
getAdminUserId
()))
{
//
if (StringUtils.isNotEmpty(regUnitInfo.getAdminUserId())) {
FeignClientResult
<
AgencyUserModel
>
feignClientResult
=
Privilege
.
agencyUserClient
//
FeignClientResult<AgencyUserModel> feignClientResult = Privilege.agencyUserClient
.
queryByUserId
(
regUnitInfo
.
getAdminUserId
());
//
.queryByUserId(regUnitInfo.getAdminUserId());
if
(
feignClientResult
!=
null
)
{
//
if (feignClientResult != null) {
Privilege
.
agencyUserClient
.
multDeleteUser
(
regUnitInfo
.
getAdminUserId
());
//
Privilege.agencyUserClient.multDeleteUser(regUnitInfo.getAdminUserId());
}
//
}
}
//
}
throw
new
RuntimeException
(
e
.
getMessage
());
throw
new
RuntimeException
(
e
.
getMessage
());
}
}
return
model
;
return
model
;
...
@@ -298,6 +298,89 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -298,6 +298,89 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
return
result
;
return
result
;
}
}
private
void
createCompanyAndUsernew
(
UnitInfo
regUnitInfo
)
{
CompanyModel
companyInfo
=
new
CompanyModel
();
FeignClientResult
<
AgencyUserModel
>
userResult
=
null
;
try
{
//FeignClientResult<List<RoleModel>> roleListResult = Privilege.roleClient.queryRoleList(null, null);
// List<RoleModel> allRoleList = roleListResult.getResult();
List
<
RoleModel
>
userRoleList
=
new
ArrayList
<>();
List
<
Long
>
roleIds
=
new
ArrayList
<>();
// 1创建公司
companyInfo
.
setAddress
(
regUnitInfo
.
getRegisterPcd
());
companyInfo
.
setAgencyCode
(
"JXIOP"
);
companyInfo
.
setParentId
(
Long
.
parseLong
(
regUnitInfo
.
getManagementUnitId
()));
companyInfo
.
setLevel
(
"station"
);
companyInfo
.
setCompanyName
(
regUnitInfo
.
getName
());
// 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
());
}
String
adminUserName
=
regUnitInfo
.
getAdminUserName
();
String
loginName
=
regUnitInfo
.
getAdminLoginName
();
String
pwd
=
regUnitInfo
.
getAdminLoginPwd
();
String
adminTel
=
regUnitInfo
.
getAdminPhone
();
// 2 创建平台用户
companyInfo
=
companyResult
.
getResult
();
AgencyUserModel
agencyUserModel
=
new
AgencyUserModel
();
agencyUserModel
.
setUserName
(
loginName
);
agencyUserModel
.
setRealName
(
adminUserName
);
agencyUserModel
.
setLockStatus
(
"UNLOCK"
);
agencyUserModel
.
setPassword
(
pwd
);
agencyUserModel
.
setRePassword
(
pwd
);
agencyUserModel
.
setAgencyCode
(
"JXIOP"
);
agencyUserModel
.
setMobile
(
adminTel
);
List
<
String
>
split
=
Arrays
.
asList
(
StringUtils
.
split
(
appCodes
,
','
));
Map
<
Long
,
List
<
Long
>>
roleSeqMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
// userRoleList = allRoleList.stream().filter(r -> r.getSequenceNbr().toString().equals(regUnitInfo.getRoleId()))
// .collect(Collectors.toList());
// userRoleList.forEach(r -> {
// if (!roleIds.contains(r.getSequenceNbr())) {
// roleIds.add(r.getSequenceNbr());
// }
// });
// roleIds.add(Long.valueOf(regUnitInfo.getRoleId()));
roleIds
.
add
(
userGroupId
);
roleSeqMap
.
put
(
companyInfo
.
getSequenceNbr
(),
roleIds
);
orgRoles
.
put
(
companyInfo
.
getSequenceNbr
(),
userRoleList
);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
if
(
userResult
==
null
||
userResult
.
getStatus
()!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
userResult
.
getDevMessage
());
}
regUnitInfo
.
setAdminUserId
(
userResult
.
getResult
().
getUserId
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
());
regUnitInfo
.
setAmosCompanyCode
(
companyInfo
.
getOrgCode
());
List
<
String
>
userId
=
new
ArrayList
<>();
userId
.
add
(
userResult
.
getResult
().
getUserId
());
// 将创建用户加入用户组
Privilege
.
groupUserClient
.
create
(
userGroupId
,
userId
);
}
catch
(
Exception
e
)
{
// 删除已经创建的 企业信息
if
(
companyInfo
!=
null
&&
companyInfo
.
getSequenceNbr
()
!=
null
)
{
Privilege
.
companyClient
.
deleteCompany
(
companyInfo
.
getSequenceNbr
()
+
""
);
}
if
(
userResult
!=
null
&&
userResult
.
getResult
()
!=
null
&&
StringUtils
.
isNotEmpty
(
userResult
.
getResult
().
getUserId
()))
{
Privilege
.
agencyUserClient
.
multDeleteUser
(
userResult
.
getResult
().
getUserId
());
}
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
RuntimeException
(
e
.
getMessage
());
}
}
private
void
createCompanyAndUser
(
UnitInfoDto
regUnitInfo
)
{
private
void
createCompanyAndUser
(
UnitInfoDto
regUnitInfo
)
{
CompanyModel
companyInfo
=
new
CompanyModel
();
CompanyModel
companyInfo
=
new
CompanyModel
();
FeignClientResult
<
AgencyUserModel
>
userResult
=
null
;
FeignClientResult
<
AgencyUserModel
>
userResult
=
null
;
...
@@ -435,9 +518,10 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -435,9 +518,10 @@ 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
)
{
public
String
powerStationExamine
(
long
pageId
,
String
nodeCode
,
String
stationId
,
String
taskId
,
String
planInstanceId
,
Map
<
String
,
Object
>
kv
)
{
// 2.更新审核记录表
// 2.更新审核记录表
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
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
))
{
...
@@ -458,8 +542,29 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -458,8 +542,29 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
// 1. 更新经销商状态
// 1. 更新经销商状态
unitInfo
.
setAuditStatus
(
2
);
unitInfo
.
setAuditStatus
(
2
);
unitInfo
.
setBlacklist
(
0
);
unitInfo
.
setBlacklist
(
0
);
Privilege
.
agencyUserClient
.
unlockUsers
(
unitInfo
.
getAdminUserId
());
approvalStatue
=
"任务明细:"
+
DealerReviewEnum
.
经销商管理员审核
.
getName
()+
"审核通过"
;
this
.
createCompanyAndUsernew
(
unitInfo
);
PublicAgencyUser
publicAgencyUser
=
new
PublicAgencyUser
();
publicAgencyUser
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
publicAgencyUser
.
setAmosUserName
(
unitInfo
.
getAdminLoginName
());
publicAgencyUser
.
setRealName
(
unitInfo
.
getAdminLoginName
());
publicAgencyUser
.
setRole
(
"["
+
unitInfo
.
getRoleId
()+
"]"
);
publicAgencyUser
.
setEmergencyTelephone
(
unitInfo
.
getAdminPhone
());
publicAgencyUser
.
setLockStatus
(
"UNLOCK"
);
publicAgencyUserMapper
.
insert
(
publicAgencyUser
);
PersonnelBusiness
re
=
new
PersonnelBusiness
();
re
.
setAmosDealerId
(
unitInfo
.
getAmosCompanySeq
());
re
.
setAmosUnitId
(
unitInfo
.
getAmosCompanySeq
());
re
.
setAmosUnitName
(
unitInfo
.
getName
());
re
.
setAmosUnitOrgCode
(
unitInfo
.
getAmosCompanyCode
());
re
.
setFoundationId
(
publicAgencyUser
.
getSequenceNbr
());
re
.
setUserType
(
"2"
);
personnelBusinessMapper
.
insert
(
re
);
// Privilege.agencyUserClient.unlockUsers(unitInfo.getAdminUserId());
approvalStatue
=
"任务明细:"
+
DealerReviewEnum
.
经销商管理员审核
.
getName
()+
"审核通过"
;
}
}
}
}
// 2. 更新流程状态
// 2. 更新流程状态
...
@@ -479,6 +584,26 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -479,6 +584,26 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
}
}
this
.
saveOrUpdate
(
unitInfo
);
this
.
saveOrUpdate
(
unitInfo
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
if
(!
ObjectUtils
.
isEmpty
(
unitInfo
.
getAmosCompanySeq
()))
{
FeignClientResult
<
CompanyModel
>
feignClientResult
=
Privilege
.
companyClient
.
seleteOne
(
unitInfo
.
getAmosCompanySeq
());
if
(
feignClientResult
!=
null
)
{
Privilege
.
companyClient
.
deleteCompany
(
unitInfo
.
getAmosCompanySeq
().
toString
());
}
}
// 失败后回滚:删除已经创建的管理员账号
if
(
StringUtils
.
isNotEmpty
(
unitInfo
.
getAdminUserId
()))
{
FeignClientResult
<
AgencyUserModel
>
feignClientResult
=
Privilege
.
agencyUserClient
.
queryByUserId
(
unitInfo
.
getAdminUserId
());
if
(
feignClientResult
!=
null
)
{
Privilege
.
agencyUserClient
.
multDeleteUser
(
unitInfo
.
getAdminUserId
());
}
}
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/pom.xml
View file @
b1dbc050
...
@@ -35,12 +35,12 @@
...
@@ -35,12 +35,12 @@
<groupId>
org.influxdb
</groupId>
<groupId>
org.influxdb
</groupId>
<artifactId>
influxdb-java
</artifactId>
<artifactId>
influxdb-java
</artifactId>
</dependency>
</dependency>
<dependency
>
<!-- <dependency>--
>
<groupId>
com.yeejoin
</groupId
>
<!-- <groupId>com.yeejoin</groupId>--
>
<artifactId>
amos-component-influxdb
</artifactId
>
<!-- <artifactId>amos-component-influxdb</artifactId>--
>
<version>
1.9.0-SNAPSHOT
</version
>
<!-- <version>1.9.0-SNAPSHOT</version>--
>
<scope>
compile
</scope
>
<!-- <scope>compile</scope>--
>
</dependency
>
<!-- </dependency>--
>
<dependency>
<dependency>
<groupId>
com.taosdata.jdbc
</groupId>
<groupId>
com.taosdata.jdbc
</groupId>
<artifactId>
taos-jdbcdriver
</artifactId>
<artifactId>
taos-jdbcdriver
</artifactId>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PowerGenerationImpl.java
View file @
b1dbc050
...
@@ -177,9 +177,7 @@ public class PowerGenerationImpl {
...
@@ -177,9 +177,7 @@ public class PowerGenerationImpl {
}
}
public
List
<
ESMoonPowerGeneration
>
getESMoonPowerGeneration
(
StationCacheInfoDto
stationCacheInfoDto
,
List
<
IndicatorData
>
indexDto
,
String
daty
,
String
day
,
String
year
,
Double
flags
){
public
List
<
ESMoonPowerGeneration
>
getESMoonPowerGeneration
(
StationCacheInfoDto
stationCacheInfoDto
,
List
<
IndicatorData
>
indexDto
,
String
daty
,
String
day
,
String
year
,
Double
flags
){
List
<
ESMoonPowerGeneration
>
list
=
new
ArrayList
<>();
List
<
ESMoonPowerGeneration
>
list
=
new
ArrayList
<>();
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
now
=
new
Date
();
String
datynew
=
myFmt2
.
format
(
now
);
if
(
indexDto
!=
null
&&!
indexDto
.
isEmpty
()){
if
(
indexDto
!=
null
&&!
indexDto
.
isEmpty
()){
for
(
IndicatorData
dto
:
indexDto
)
{
for
(
IndicatorData
dto
:
indexDto
)
{
double
value
=
dto
.
getValueF
()!=
null
?(
double
)
dto
.
getValueF
():
0.0
;
double
value
=
dto
.
getValueF
()!=
null
?(
double
)
dto
.
getValueF
():
0.0
;
...
@@ -187,7 +185,7 @@ public class PowerGenerationImpl {
...
@@ -187,7 +185,7 @@ public class PowerGenerationImpl {
value
=
value
*
flags
;
value
=
value
*
flags
;
}
}
ESMoonPowerGeneration
moonPowerGeneration
=
new
ESMoonPowerGeneration
(
ESMoonPowerGeneration
moonPowerGeneration
=
new
ESMoonPowerGeneration
(
daty
new
+
"_"
+
dto
.
getAddress
(),
daty
+
"_"
+
dto
.
getAddress
(),
stationCacheInfoDto
.
getStationId
(),
stationCacheInfoDto
.
getStationId
(),
stationCacheInfoDto
.
getStationName
(),
stationCacheInfoDto
.
getStationName
(),
stationCacheInfoDto
.
getStationType
(),
stationCacheInfoDto
.
getStationType
(),
...
@@ -209,9 +207,7 @@ public class PowerGenerationImpl {
...
@@ -209,9 +207,7 @@ public class PowerGenerationImpl {
}
}
public
List
<
ESYearPowerGeneration
>
getESYearPowerGeneration
(
StationCacheInfoDto
stationCacheInfoDto
,
List
<
IndicatorData
>
indexDto
,
String
daty
,
String
day
,
Double
flags
){
public
List
<
ESYearPowerGeneration
>
getESYearPowerGeneration
(
StationCacheInfoDto
stationCacheInfoDto
,
List
<
IndicatorData
>
indexDto
,
String
daty
,
String
day
,
Double
flags
){
List
<
ESYearPowerGeneration
>
list
=
new
ArrayList
<>();
List
<
ESYearPowerGeneration
>
list
=
new
ArrayList
<>();
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
now
=
new
Date
();
String
datynew
=
myFmt2
.
format
(
now
);
if
(
indexDto
!=
null
&&!
indexDto
.
isEmpty
()){
if
(
indexDto
!=
null
&&!
indexDto
.
isEmpty
()){
for
(
IndicatorData
dto
:
indexDto
)
{
for
(
IndicatorData
dto
:
indexDto
)
{
double
value
=
dto
.
getValueF
()!=
null
?(
double
)
dto
.
getValueF
():
0.0
;
double
value
=
dto
.
getValueF
()!=
null
?(
double
)
dto
.
getValueF
():
0.0
;
...
@@ -219,7 +215,7 @@ public class PowerGenerationImpl {
...
@@ -219,7 +215,7 @@ public class PowerGenerationImpl {
value
=
value
*
flags
;
value
=
value
*
flags
;
}
}
ESYearPowerGeneration
yearPowerGeneration
=
new
ESYearPowerGeneration
(
ESYearPowerGeneration
yearPowerGeneration
=
new
ESYearPowerGeneration
(
daty
new
+
"_"
+
dto
.
getAddress
(),
daty
+
"_"
+
dto
.
getAddress
(),
stationCacheInfoDto
.
getStationId
(),
stationCacheInfoDto
.
getStationId
(),
stationCacheInfoDto
.
getStationName
(),
stationCacheInfoDto
.
getStationName
(),
stationCacheInfoDto
.
getStationType
(),
stationCacheInfoDto
.
getStationType
(),
...
...
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