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
a271270c
Commit
a271270c
authored
Aug 05, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
1d467341
3ed15676
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
97 additions
and
42 deletions
+97
-42
TanYinDataAcquisitionServiceImpl.java
...i/face/service/impl/TanYinDataAcquisitionServiceImpl.java
+21
-7
PersonnelBusinessMapper.java
.../boot/module/hygf/api/mapper/PersonnelBusinessMapper.java
+8
-4
PowerStationMapper.java
.../amos/boot/module/hygf/api/mapper/PowerStationMapper.java
+1
-1
TdHYGFInverterDayGenerateMapper.java
...f/api/tdenginemapper/TdHYGFInverterDayGenerateMapper.java
+1
-1
BasicGridAcceptanceMapper.xml
...main/resources/mapper/mysql/BasicGridAcceptanceMapper.xml
+1
-1
HygfIcbcRecordMapper.xml
.../src/main/resources/mapper/mysql/HygfIcbcRecordMapper.xml
+2
-3
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+1
-1
PersonnelBusinessMapper.xml
...c/main/resources/mapper/mysql/PersonnelBusinessMapper.xml
+8
-0
MonthPowerMapper.xml
...i/src/main/resources/mapper/tdengine/MonthPowerMapper.xml
+11
-11
TdHYGFInverterDayGenerateMapper.xml
...urces/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
+8
-2
JpInverterServiceImpl.java
...t/module/hygf/biz/service/impl/JpInverterServiceImpl.java
+1
-1
PersonnelBusinessServiceImpl.java
...e/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
+10
-2
IdxBizFanWeightController.java
...odule/jxiop/biz/controller/IdxBizFanWeightController.java
+8
-0
IdxBizPvWeightController.java
...module/jxiop/biz/controller/IdxBizPvWeightController.java
+9
-0
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+0
-1
SjglZsjZsbtzMapper.xml
.../src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
+6
-6
SjglZsjZsbtzMapper.xml
.../src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
+1
-1
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/TanYinDataAcquisitionServiceImpl.java
View file @
a271270c
...
...
@@ -178,7 +178,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
@Override
public
void
customerInfoList
()
{
try
{
String
startDate
=
LocalDate
.
now
().
minus
Day
s
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
String
startDate
=
LocalDate
.
now
().
minus
Month
s
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
String
endDate
=
LocalDate
.
now
().
plusDays
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
log
.
info
(
"-------碳银同步项目信息开始: {} ------- "
,
sdf
.
format
(
new
Date
()));
Map
<
String
,
Object
>
params
=
MapBuilder
.<
String
,
Object
>
create
()
...
...
@@ -465,7 +465,12 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
if
(
jpInverter
==
null
||
StringUtils
.
isEmpty
(
jpInverter
.
getSnCode
()))
{
return
;
}
String
startDate
=
LocalDate
.
now
().
minusWeeks
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
String
startDate
;
if
(
jpInverter
.
getUpdateTime
()
!=
null
)
{
startDate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
jpInverter
.
getUpdateTime
());
}
else
{
startDate
=
LocalDate
.
now
().
minusMonths
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
}
String
endDate
=
LocalDate
.
now
().
plusDays
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
Map
<
String
,
Object
>
params
=
MapBuilder
.<
String
,
Object
>
create
()
.
put
(
"sn"
,
jpInverter
.
getSnCode
())
...
...
@@ -474,11 +479,19 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
.
put
(
"startDate"
,
startDate
)
.
put
(
"endDate"
,
endDate
).
build
();
PageInfo
<
TanYinAlramInfo
>
tanYinInveterInfo
=
tanYinApiUtils
.
postPage
(
"电站逆变器故障信息"
,
apiUrl
+
TanYinConstant
.
inverterAlramUrl
,
JSON
.
toJSONString
(
params
),
null
,
TanYinAlramInfo
.
class
);
List
<
TanYinAlramInfo
>
tanYinAlramInfos
=
tanYinInveterInfo
.
getList
();
if
(
CollectionUtils
.
isEmpty
(
tanYinAlramInfos
))
{
if
(
tanYinInveterInfo
==
null
||
CollectionUtils
.
isEmpty
(
tanYinInveterInfo
.
getList
()))
{
log
.
warn
(
"-------碳银同步电站逆变器故障信息结束: 未获取到逆变器故障信息 ------- "
);
return
;
}
List
<
TanYinAlramInfo
>
tanYinAlramInfos
=
new
ArrayList
<>();
tanYinAlramInfos
.
addAll
(
tanYinInveterInfo
.
getList
());
if
(
tanYinInveterInfo
.
getPages
()
>
1
)
{
for
(
int
pageNum
=
2
;
pageNum
<
tanYinInveterInfo
.
getPages
();
pageNum
++)
{
params
.
put
(
"pageNo"
,
pageNum
);
PageInfo
<
TanYinAlramInfo
>
tanYinInveterInfoPage
=
tanYinApiUtils
.
postPage
(
"电站逆变器故障信息"
,
apiUrl
+
TanYinConstant
.
inverterAlramUrl
,
JSON
.
toJSONString
(
params
),
null
,
TanYinAlramInfo
.
class
);
tanYinAlramInfos
.
addAll
(
tanYinInveterInfoPage
.
getList
());
}
}
for
(
TanYinAlramInfo
tanYinAlramInfo
:
tanYinAlramInfos
)
{
tanYinAlramInfo
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinAlramInfoMapper
.
insert
(
tanYinAlramInfo
);
...
...
@@ -486,7 +499,9 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
HYGFJPInverterWarn
hygfjpInverterWarn
=
hygfjpInverterWarnMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterWarn
>().
eq
(
"sn_code"
,
tanYinAlramInfo
.
getSn
())
.
eq
(
"warn_id"
,
tanYinAlramInfo
.
getId
())
.
eq
(
"third_station_id"
,
String
.
valueOf
(
tanYinAlramInfo
.
getProjectNo
())));
.
eq
(
"third_station_id"
,
String
.
valueOf
(
tanYinAlramInfo
.
getProjectNo
()))
.
orderByDesc
(
"created_time"
).
last
(
"limit 1"
)
);
if
(
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ObjectUtils
.
isEmpty
(
hygfjpInverterWarn
))
{
hygfjpInverterWarn
=
new
HYGFJPInverterWarn
();
}
...
...
@@ -500,7 +515,6 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
hygfjpInverterWarn
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpInverterWarn
.
setStationName
(
jpStation
.
getName
());
hygfjpInverterWarn
.
setStationState
(
jpStation
.
getState
());
hygfjpInverterWarn
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterWarn
.
setThirdCode
(
PVProducerInfoEnum
.
TANYIN
.
getCode
());
hygfjpInverterWarn
.
setContent
(
tanYinAlramInfo
.
getContent
());
hygfjpInverterWarn
.
setTreatment
(
tanYinAlramInfo
.
getSolution
());
...
...
@@ -515,7 +529,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
}
hygfjpInverterWarn
.
setTimeLong
(
null
);
if
((!
ObjectUtils
.
isEmpty
(
tanYinAlramInfo
.
getFaultOccurTime
()))
&&
(!
ObjectUtils
.
isEmpty
(
tanYinAlramInfo
.
getFaultEndTime
())))
{
hygfjpInverterWarn
.
setTimeLong
(
this
.
convertDate
(
hygfjpInverterWarn
.
getRecoverTime
())
-
this
.
convertDate
(
hygfjpInverterWarn
.
getStartTime
()));
hygfjpInverterWarn
.
setTimeLong
(
this
.
convertDate
(
hygfjpInverterWarn
.
getRecoverTime
())
-
this
.
convertDate
(
hygfjpInverterWarn
.
getStartTime
()));
}
if
(
ObjectUtils
.
isEmpty
(
hygfjpInverterWarn
.
getCreatedTime
()))
{
hygfjpInverterWarn
.
setCreatedTime
(
System
.
currentTimeMillis
());
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/PersonnelBusinessMapper.java
View file @
a271270c
...
...
@@ -21,14 +21,14 @@ import java.util.Map;
public
interface
PersonnelBusinessMapper
extends
BaseMapper
<
PersonnelBusiness
>
{
IPage
<
CompanyDtoUserDto
>
getCompanyDtoUserDtopage
(
@Param
(
"dto"
)
CompanyDtoUserDto
dto
);
Map
<
String
,
String
>
getorgcode
(
@Param
(
"id"
)
Long
id
);
Map
<
String
,
String
>
getorgcode
(
@Param
(
"id"
)
Long
id
);
//根据平台userid 获取人员所属经销商
UserUnitInformationDto
getUserUnitInformationDto
(
@Param
(
"userId"
)
String
userId
);
UserUnitInformationDto
getUserUnitInformationDto
(
@Param
(
"userId"
)
String
userId
);
//根据平台userid 获取运维人员信息
UserUnitInformationDto
getMaintenanceUserUnitInformationDto
(
@Param
(
"userId"
)
String
userId
);
UserUnitInformationDto
getMaintenanceUserUnitInformationDto
(
@Param
(
"userId"
)
String
userId
);
String
selectUserInfo
(
Long
sequenceNbr
);
...
...
@@ -37,6 +37,8 @@ public interface PersonnelBusinessMapper extends BaseMapper<PersonnelBusiness> {
void
deletePguByUserId
(
String
userId
);
void
deleteRoleByUserId
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"roleId"
)
Long
roleId
);
void
deleteSubByUserId
(
String
userId
);
void
deleteHpbByFoundationId
(
Long
sequenceNbr
);
...
...
@@ -47,5 +49,7 @@ public interface PersonnelBusinessMapper extends BaseMapper<PersonnelBusiness> {
List
<
String
>
selectHygfTableName
();
int
countByUserId
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"userId"
)
String
userId
);
int
countByUserId
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"userId"
)
String
userId
);
void
deleteOrgRoleByUserId
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"roleId"
)
Long
roleId
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/PowerStationMapper.java
View file @
a271270c
...
...
@@ -16,7 +16,7 @@ import java.util.List;
* @date 2023-07-15
*/
public
interface
PowerStationMapper
extends
BaseMapper
<
PowerStation
>
{
@UserEmpower
(
field
={
"regional_companies_code"
}
,
dealerField
={
"
a.developer_code"
,
"a.regional_companies_code"
,
"a.
developer_user_id"
}
,
fieldConditions
={
"in"
,
"in"
,
"in"
},
relationship
=
"and"
)
@UserEmpower
(
field
={
"regional_companies_code"
}
,
dealerField
={
"
developer_code"
,
"regional_companies_code"
,
"
developer_user_id"
}
,
fieldConditions
={
"in"
,
"in"
,
"in"
},
relationship
=
"and"
)
List
<
PowerStationDto
>
queryPage
(
@Param
(
"powerStationCode"
)
String
powerStationCode
,
@Param
(
"ownersName"
)
String
ownersName
,
@Param
(
"serviceAgent"
)
String
serviceAgent
,
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHYGFInverterDayGenerateMapper.java
View file @
a271270c
...
...
@@ -20,5 +20,5 @@ public interface TdHYGFInverterDayGenerateMapper extends BaseMapper<TdHYGFInvert
List
<
Map
<
String
,
Object
>>
selectSnCodeList
(
String
startTime
,
String
endTime
,
List
<
String
>
sncodes
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
TdHYGFInverterDayGenerate
>
selectListPage
(
List
<
String
>
snCodeList
,
List
<
String
>
maxCreatedTimeList
);
List
<
TdHYGFInverterDayGenerate
>
selectListPage
(
List
<
String
>
snCodeList
,
List
<
String
>
maxCreatedTimeList
,
String
startTime
,
String
endTime
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/BasicGridAcceptanceMapper.xml
View file @
a271270c
...
...
@@ -69,7 +69,7 @@
</where>
ORDER BY
FIELD(hbga.grid_status, '1', '2', '4', '3'),
hogaa.grid_connection_time desc
hogaa.grid_connection_time desc
, hbga.sequence_nbr desc
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/HygfIcbcRecordMapper.xml
View file @
a271270c
...
...
@@ -52,7 +52,8 @@
ifnull(icbc.id_card, ph.id_card) as idCard,
ph.amos_user_id,
icbc.open_account_status,
icbc.protocol_status
icbc.protocol_status,
ph.rec_date
FROM
hygf_peasant_household ph LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id
<where>
...
...
@@ -86,8 +87,6 @@
<if
test=
"param.offset != null and param.offset != '' and param.limit != null and param.limit != ''"
>
LIMIT ${param.offset}, ${param.limit}
</if>
GROUP BY
ph.amos_user_id
ORDER BY
ph.rec_date DESC
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
a271270c
...
...
@@ -385,7 +385,7 @@
<if
test=
"dto.amosCompanyCode!=null"
>
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
</if>
and hygf_jp_station.`state` is not null and hygf_jp_station.`state` in (
"在线","报警","离线"
)
and hygf_jp_station.`state` is not null and hygf_jp_station.`state` in (
'在线','报警','离线'
)
GROUP BY state
</where>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PersonnelBusinessMapper.xml
View file @
a271270c
...
...
@@ -132,6 +132,14 @@ select ORG_CODE orgCode from privilege_company where privilege_company.SEQUEN
DELETE FROM privilege_group_user WHERE USER_ID=#{userId}
</select>
<delete
id=
"deleteRoleByUserId"
>
DELETE FROM privilege_group_user WHERE USER_ID=#{userId} AND GROUP_SEQ = #{roleId}
</delete>
<delete
id=
"deleteOrgRoleByUserId"
>
DELETE FROM privilege_user_org_role WHERE USER_ID=#{userId} AND ROLE_SEQ = #{roleId}
</delete>
<select
id=
"deleteSubByUserId"
>
DELETE FROM std_user_biz WHERE amos_user_id=#{userId}
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/MonthPowerMapper.xml
View file @
a271270c
...
...
@@ -6,7 +6,7 @@
<select
id=
"getMonthPowerint"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.MonthPower"
>
SELECT
avg(power) power,
third_station_id thirdStationId
third_st
hird_st
ation_id thirdStationId
FROM house_pv_data.td_hygf_jp_station_power_history where created_time
<![CDATA[>=]]>
today()-1d-8h and created_time
<![CDATA[<]]>
today()-8h GROUP BY third_station_id
</select>
...
...
@@ -14,15 +14,15 @@
<select
id=
"getSumMonthPower"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.YearPower"
>
SELECT
sum(power) power,
tation_id thirdStationId
FROM house_pv_data.td_hygf_
month_power where year_month=#{date} GROUP BY
tation_id
t
hird_st
ation_id thirdStationId
FROM house_pv_data.td_hygf_
station_power_month where year_month=#{date} GROUP BY third_s
tation_id
</select>
<select
id=
"getSumYearPower"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.AllPower"
>
SELECT
sum(power) power,
tation_id thirdStationId
FROM house_pv_data.td_hygf_
year_power where year=#{date} GROUP BY
tation_id
t
hird_st
ation_id thirdStationId
FROM house_pv_data.td_hygf_
station_power_year where year=#{date} GROUP BY third_s
tation_id
</select>
...
...
@@ -44,7 +44,7 @@
SELECT
sum(power)num,
`day` date
FROM house_pv_data.td_hygf_
month_power where
tation_id in
FROM house_pv_data.td_hygf_
station_power_month where third_s
tation_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
...
...
@@ -55,7 +55,7 @@
SELECT
sum(power)num,
`month` date
FROM house_pv_data.td_hygf_
year_power where
tation_id in
FROM house_pv_data.td_hygf_
station_power_year where third_s
tation_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
...
...
@@ -66,7 +66,7 @@
SELECT
sum(power)num,
`year` date
FROM house_pv_data.td_hygf_
all_power where
tation_id in
FROM house_pv_data.td_hygf_
station_power_all where third_s
tation_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
...
...
@@ -77,18 +77,18 @@
SELECT
sum(power)num,
`hour` date
FROM house_pv_data.td_hygf_
day_power
FROM house_pv_data.td_hygf_
station_power_day
<where>
<if
test=
"dto!=null"
>
tation_id in
t
hird_st
ation_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"thirdStationId!=null and thirdStationId != ''"
>
and tation_id = #{thirdStationId}
and t
hird_st
ation_id = #{thirdStationId}
</if>
</where>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
View file @
a271270c
...
...
@@ -47,7 +47,7 @@
<where>
created_time >= #{startTime} and created_time
<
= #{endTime}
<if
test=
"sncodes != null and sncodes.size>0"
>
sn_code in
and
sn_code in
<foreach
collection=
"sncodes"
item=
"sncode"
open=
"("
close=
")"
separator=
","
>
#{sncode}
</foreach>
...
...
@@ -63,7 +63,7 @@
house_pv_data.td_hygf_inverter_day_generate
<where>
<if
test=
"snCodeList != null and snCodeList.size>0"
>
sn_code in
and
sn_code in
<foreach
collection=
"snCodeList"
item=
"sncode"
open=
"("
close=
")"
separator=
","
>
#{sncode}
</foreach>
...
...
@@ -74,6 +74,12 @@
#{maxCreatedTime}
</foreach>
</if>
<if
test=
"startTime != null"
>
and created_time >= #{startTime}
</if>
<if
test=
"endTime != null"
>
and created_time
<
= #{endTime}
</if>
</where>
order by created_time desc
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpInverterServiceImpl.java
View file @
a271270c
...
...
@@ -179,7 +179,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
});
PageHelper
.
startPage
(
current
,
size
);
List
<
TdHYGFInverterDayGenerate
>
tdHYGFInverterDayGenerates
=
tdHYGFInverterDayGenerateMapper
.
selectListPage
(
snCodeList
,
maxCreatedTimeList
);
List
<
TdHYGFInverterDayGenerate
>
tdHYGFInverterDayGenerates
=
tdHYGFInverterDayGenerateMapper
.
selectListPage
(
snCodeList
,
null
,
startTime
,
endTime
);
tdHYGFInverterDayGenerates
.
forEach
(
tdHYGFInverterDayGenerate
->
{
Date
date1
=
new
Date
(
tdHYGFInverterDayGenerate
.
getCreatedTime
());
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
View file @
a271270c
...
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.GroupUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
...
...
@@ -342,11 +343,13 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
LambdaQueryWrapper
<
PublicAgencyUser
>
qud
=
new
LambdaQueryWrapper
<>();
qud
.
eq
(
PublicAgencyUser:
:
getSequenceNbr
,
id
);
PublicAgencyUser
publicAgencyUse
=
publicAgencyUserMapper
.
selectOne
(
qud
);
LambdaQueryWrapper
<
PersonnelBusiness
>
qug
=
new
LambdaQueryWrapper
<>();
qug
.
eq
(
PersonnelBusiness:
:
getFoundationId
,
publicAgencyUse
.
getSequenceNbr
());
PersonnelBusiness
personnelBusines
=
personnelBusinessMapper
.
selectOne
(
qug
);
personnelBusines
.
setUserType
(
"2"
);
personnelBusinessMapper
.
updateById
(
personnelBusines
);
//获取经销商管理员
LambdaQueryWrapper
<
UnitInfo
>
qudg
=
new
LambdaQueryWrapper
<>();
qudg
.
eq
(
UnitInfo:
:
getAmosCompanySeq
,
personnelBusines
.
getAmosDealerId
());
...
...
@@ -355,17 +358,19 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
LambdaQueryWrapper
<
PublicAgencyUser
>
qudx
=
new
LambdaQueryWrapper
<>();
qudx
.
eq
(
PublicAgencyUser:
:
getAmosUserId
,
unitInfo
.
getAdminUserId
());
PublicAgencyUser
publicAgencyUsex
=
publicAgencyUserMapper
.
selectOne
(
qudx
);
LambdaQueryWrapper
<
PersonnelBusiness
>
qugf
=
new
LambdaQueryWrapper
<>();
qugf
.
eq
(
PersonnelBusiness:
:
getFoundationId
,
publicAgencyUsex
.
getSequenceNbr
());
PersonnelBusiness
personnelBusinesx
=
personnelBusinessMapper
.
selectOne
(
qugf
);
personnelBusinesx
.
setUserType
(
"1"
);
personnelBusinessMapper
.
updateById
(
personnelBusinesx
);
unitInfo
.
setAdminLoginName
(
publicAgencyUse
.
getAmosUserName
());
unitInfo
.
setAdminPhone
(
publicAgencyUse
.
getEmergencyTelephone
());
unitInfo
.
setAdminUserId
(
publicAgencyUse
.
getAmosUserId
());
unitInfo
.
setAdminUserName
(
publicAgencyUse
.
getRealName
());
unitInfoMapper
.
updateById
(
unitInfo
);
//修改管理员
List
<
Long
>
roidx
=
JSONArray
.
parseArray
(
publicAgencyUsex
.
getRole
(),
Long
.
class
);
...
...
@@ -410,7 +415,10 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
roid
.
add
(
userGroupId
);
if
(
roid
.
contains
(
userGroupempty
))
{
roid
.
remove
(
userGroupempty
);
Privilege
.
groupUserClient
.
deleteGroupUser
(
userGroupempty
,
publicAgencyUsex
.
getAmosUserId
());
// Privilege.groupUserClient.deleteGroupUser(userGroupempty, publicAgencyUsex.getAmosUserId());
personnelBusinessMapper
.
deleteRoleByUserId
(
publicAgencyUse
.
getAmosUserId
(),
userGroupempty
);
personnelBusinessMapper
.
deleteOrgRoleByUserId
(
publicAgencyUse
.
getAmosUserId
(),
userGroupempty
);
}
publicAgencyUse
.
setRole
(
JSON
.
toJSONString
(
roid
));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanWeightController.java
View file @
a271270c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -180,6 +181,13 @@ public class IdxBizFanWeightController extends BaseController {
LambdaQueryWrapper
<
IdxBizFanWeight
>
qu1
=
new
LambdaQueryWrapper
<>();
qu1
.
in
(!
list1
.
isEmpty
(),
IdxBizFanWeight:
:
getSequenceNbr
,
list1
);
List
<
IdxBizFanWeight
>
list
=
idxBizFanWeightMapper
.
selectList
(
qu1
);
//如果区域为一个,则权重只能为1
Integer
araeCount
=
idxBizFanWeightMapper
.
selectCount
(
new
LambdaQueryWrapper
<
IdxBizFanWeight
>().
eq
(
IdxBizFanWeight:
:
getType
,
"1"
));
if
(
araeCount
==
1
&&
CollectionUtil
.
isNotEmpty
(
list
)
&&
list
.
size
()==
1
&&
list
.
get
(
0
).
getType
().
equals
(
"1"
)){
if
(!
"1.0000"
.
equals
(
value
.
get
(
"data"
).
toString
())){
throw
new
BadRequest
(
"该区域权重只能配置为1"
);
}
}
IdxBizFanWeight
reviewDto
=
list
.
get
(
0
);
LambdaQueryWrapper
<
IdxBizFanWeight
>
qu
=
new
LambdaQueryWrapper
<>();
//获取所属,同类指标
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvWeightController.java
View file @
a271270c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.amosprojectentity.StdUserEmpower
;
import
com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper.UserEmpowerMapper
;
...
...
@@ -191,6 +193,13 @@ public class IdxBizPvWeightController extends BaseController {
LambdaQueryWrapper
<
IdxBizPvWeight
>
qu1
=
new
LambdaQueryWrapper
<>();
qu1
.
in
(!
list1
.
isEmpty
(),
IdxBizPvWeight:
:
getSequenceNbr
,
list1
);
List
<
IdxBizPvWeight
>
list
=
idxBizPvWeightMapper
.
selectList
(
qu1
);
//如果区域为一个,则权重只能为1
Integer
araeCount
=
idxBizPvWeightMapper
.
selectCount
(
new
LambdaQueryWrapper
<
IdxBizPvWeight
>().
eq
(
IdxBizPvWeight:
:
getType
,
"1"
));
if
(
araeCount
==
1
&&
CollectionUtil
.
isNotEmpty
(
list
)
&&
list
.
size
()==
1
&&
list
.
get
(
0
).
getType
().
equals
(
"1"
)){
if
(!
"1.0000"
.
equals
(
value
.
get
(
"data"
).
toString
())){
throw
new
BadRequest
(
"该区域权重只能配置为1"
);
}
}
IdxBizPvWeight
reviewDto
=
list
.
get
(
0
);
LambdaQueryWrapper
<
IdxBizPvWeight
>
qu
=
new
LambdaQueryWrapper
<>();
//获取所属,同类指标
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
View file @
a271270c
...
...
@@ -102,7 +102,6 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
(
TimeZone
.
getTimeZone
(
"UTC"
));
sdf
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"UTC"
));
//限制必须是区间时间段
if
(
startTime
==
null
||
endTime
==
null
){
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
View file @
a271270c
...
...
@@ -73,7 +73,7 @@
count( 1 ) as value
FROM
sjgl_zsj_zsbtz a
INNER
JOIN privilege_company b on a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT
JOIN privilege_company b on a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
b.ORG_CODE like concat(#{parentCode},'%')
...
...
@@ -89,7 +89,7 @@
count(1) as value
FROM
fdgl_job_main a
INNER
JOIN privilege_company b on a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT
JOIN privilege_company b on a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
b.ORG_CODE like concat(#{parentCode},'%')
...
...
@@ -110,7 +110,7 @@
else 3 end) as sort
FROM
sjgl_zsj_zsbtz a
INNER
JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT
JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.ORG_CODE like concat(#{parentCode},'%')
...
...
@@ -134,7 +134,7 @@
count(1)
FROM
sjgl_zsj_zsbtz a
INNER
JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT
JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.ORG_CODE like concat(#{parentCode},'%')
...
...
@@ -165,7 +165,7 @@
else 3 end as sort
FROM
fdgl_job_main a
INNER
JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT
JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
left join sjgl_zsj_zsbtz c on a.EQUIP_DBID = c.DBID
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
...
...
@@ -190,7 +190,7 @@
count(1)
FROM
fdgl_job_main a
INNER
JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT
JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.ORG_CODE like concat(#{parentCode},'%')
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
View file @
a271270c
...
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper"
>
<select
id=
"getStationCapactityByStationWerks"
resultType=
"Double"
>
select SUM(CAPACITYL) from sjgl_zsj_zsbtz where WERKS = #{WERKS} and is_del = 0 and CAPACITYL is not null
select SUM(CAPACITYL) from sjgl_zsj_zsbtz where WERKS = #{WERKS} and is_del = 0 and CAPACITYL is not null
and CAPACITYL != ''
</select>
<select
id=
"getStationInfoMapByStationWerks"
resultType=
"map"
>
...
...
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