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
595eb981
Commit
595eb981
authored
Jul 18, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
008ae1c3
93701e05
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
1206 additions
and
877 deletions
+1206
-877
BusinessException.java
...in/amos/api/householdapi/exception/BusinessException.java
+1
-1
TanYinInveterInfo.java
...face/orm/houseapi/entity/tdeingine/TanYinInveterInfo.java
+1
-1
TanYinDataAcquisitionServiceImpl.java
...i/face/service/impl/TanYinDataAcquisitionServiceImpl.java
+26
-19
IHygfIcbcService.java
...n/amos/boot/module/hygf/api/service/IHygfIcbcService.java
+18
-0
IPersonnelBusinessService.java
...ot/module/hygf/api/service/IPersonnelBusinessService.java
+2
-0
pom.xml
amos-boot-system-jxiop/amos-boot-module-hygf-biz/pom.xml
+29
-29
MysqlServerConfig.java
...n/amos/boot/module/hygf/biz/config/MysqlServerConfig.java
+115
-8
FinancingInfoController.java
...t/module/hygf/biz/controller/FinancingInfoController.java
+5
-5
HygfIcbcController.java
...s/boot/module/hygf/biz/controller/HygfIcbcController.java
+41
-0
PersonnelBusinessController.java
...dule/hygf/biz/controller/PersonnelBusinessController.java
+13
-0
PowerStationController.java
...ot/module/hygf/biz/controller/PowerStationController.java
+2
-2
PreparationMoneyController.java
...odule/hygf/biz/controller/PreparationMoneyController.java
+7
-7
UnitInfoController.java
...s/boot/module/hygf/biz/controller/UnitInfoController.java
+2
-2
TaskV2FeignService.java
...n/amos/boot/module/hygf/biz/feign/TaskV2FeignService.java
+3
-1
WorkFlowFeignService.java
...amos/boot/module/hygf/biz/feign/WorkFlowFeignService.java
+2
-1
WorkflowFeignClient.java
.../amos/boot/module/hygf/biz/feign/WorkflowFeignClient.java
+2
-2
XidFeignConfiguration.java
...mos/boot/module/hygf/biz/feign/XidFeignConfiguration.java
+43
-43
AcceptanceRectificationOrderServiceImpl.java
...service/impl/AcceptanceRectificationOrderServiceImpl.java
+2
-2
AcceptanceServiceImpl.java
...t/module/hygf/biz/service/impl/AcceptanceServiceImpl.java
+2
-2
BasicGridAcceptanceServiceImpl.java
...hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
+2
-3
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+0
-1
HygfIcbcServiceImpl.java
...oot/module/hygf/biz/service/impl/HygfIcbcServiceImpl.java
+88
-0
PersonnelBusinessServiceImpl.java
...e/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
+198
-176
PowerStationServiceImpl.java
...module/hygf/biz/service/impl/PowerStationServiceImpl.java
+0
-1
PreparationMoneyServiceImpl.java
...le/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
+2
-3
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+1
-2
WorkflowImpl.java
.../amos/boot/module/hygf/biz/service/impl/WorkflowImpl.java
+0
-1
application-dev.properties
...le-hygf-biz/src/main/resources/application-dev.properties
+1
-8
application-kingbase8.properties
...f-biz/src/main/resources/application-kingbase8.properties
+18
-11
application.properties
...module-hygf-biz/src/main/resources/application.properties
+3
-2
logback-dev.xml
...s-boot-module-hygf-biz/src/main/resources/logback-dev.xml
+9
-9
logback-kingbase8.xml
...-module-hygf-biz/src/main/resources/logback-kingbase8.xml
+1
-1
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+2
-2
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+500
-491
BitTypeHandler.java
...oin/amos/boot/module/jxiop/biz/config/BitTypeHandler.java
+35
-0
application-kingbase8.properties
...n-biz/src/main/resources/application-kingbase8.properties
+23
-31
application.properties
...p-bigscreen-biz/src/main/resources/application.properties
+2
-6
pom.xml
pom.xml
+5
-4
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/exception/BusinessException.java
View file @
595eb981
...
@@ -12,7 +12,7 @@ import org.typroject.tyboot.core.foundation.exception.BaseException;
...
@@ -12,7 +12,7 @@ import org.typroject.tyboot.core.foundation.exception.BaseException;
*/
*/
public
class
BusinessException
extends
BaseException
{
public
class
BusinessException
extends
BaseException
{
private
String
code
=
""
;
private
String
code
;
public
BusinessException
(
String
message
)
{
public
BusinessException
(
String
message
)
{
super
(
message
,
BusinessException
.
class
.
getSimpleName
(),
"错误的请求."
);
super
(
message
,
BusinessException
.
class
.
getSimpleName
(),
"错误的请求."
);
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/houseapi/entity/tdeingine/TanYinInveterInfo.java
View file @
595eb981
...
@@ -38,7 +38,7 @@ public class TanYinInveterInfo {
...
@@ -38,7 +38,7 @@ public class TanYinInveterInfo {
private
String
gmtCreate
;
private
String
gmtCreate
;
@ApiModelProperty
(
"ID"
)
@ApiModelProperty
(
"ID"
)
@TableField
(
"id
S
tring"
)
@TableField
(
"id
_s
tring"
)
private
String
idString
;
private
String
idString
;
@ApiModelProperty
(
"功率"
)
@ApiModelProperty
(
"功率"
)
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/TanYinDataAcquisitionServiceImpl.java
View file @
595eb981
...
@@ -216,8 +216,9 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -216,8 +216,9 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
long
ts
=
System
.
currentTimeMillis
();
long
ts
=
System
.
currentTimeMillis
();
log
.
info
(
"-------碳银同步电站开始: {} ------- "
,
ts
);
log
.
info
(
"-------碳银同步电站开始: {} ------- "
,
ts
);
List
<
String
>
projectNos
=
tanYinCustomerInfoMapper
.
listProjectNo
();
List
<
String
>
projectNos
=
tanYinCustomerInfoMapper
.
listProjectNo
();
projectNos
.
add
(
"TF2024060312382700202"
);
// projectNos.add("TF2024060312382700202");
String
powerDate
=
"2024-07-17"
;
// String powerDate = "2024-07-17";
String
powerDate
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
if
(
CollectionUtils
.
isEmpty
(
projectNos
))
{
if
(
CollectionUtils
.
isEmpty
(
projectNos
))
{
return
;
return
;
}
}
...
@@ -238,6 +239,8 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -238,6 +239,8 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
List
<
JpStation
>
jpStations
=
jpStationMapper
.
selectList
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
TANYIN
.
getCode
()).
in
(
"third_station_id"
,
stationIds
));
List
<
JpStation
>
jpStations
=
jpStationMapper
.
selectList
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
TANYIN
.
getCode
()).
in
(
"third_station_id"
,
stationIds
));
Map
<
String
,
JpStation
>
jpStationMap
=
jpStations
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
Function
.
identity
()));
Map
<
String
,
JpStation
>
jpStationMap
=
jpStations
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
Function
.
identity
()));
List
<
TanYinInveterInfo
>
tanYinInveterInfos
=
new
ArrayList
();
for
(
TanYinStationInfo
tanYinStationInfo
:
tanYinStationInfos
)
{
for
(
TanYinStationInfo
tanYinStationInfo
:
tanYinStationInfos
)
{
tanYinStationInfo
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinStationInfo
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinStationInfoMapper
.
insert
(
tanYinStationInfo
);
tanYinStationInfoMapper
.
insert
(
tanYinStationInfo
);
...
@@ -250,7 +253,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -250,7 +253,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
tanYinInveterInfo
.
setSn
(
inverterListDTO
.
getSn
());
tanYinInveterInfo
.
setSn
(
inverterListDTO
.
getSn
());
tanYinInveterInfo
.
setSupplier
(
inverterListDTO
.
getSupplier
());
tanYinInveterInfo
.
setSupplier
(
inverterListDTO
.
getSupplier
());
tanYinInveterInfo
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinInveterInfo
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinInveterInfo
Mapper
.
insert
(
tanYinInveterInfo
);
tanYinInveterInfo
s
.
add
(
tanYinInveterInfo
);
}
}
String
stationId
=
tanYinStationInfo
.
getProjectNo
();
String
stationId
=
tanYinStationInfo
.
getProjectNo
();
...
@@ -408,32 +411,23 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -408,32 +411,23 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
}
else
{
}
else
{
TdHYGFStationAllGenerateMapper
.
insert
(
TdHYGFStationAllGenerate
);
TdHYGFStationAllGenerateMapper
.
insert
(
TdHYGFStationAllGenerate
);
}
}
}
}
log
.
info
(
"-------碳银同步电站结束: {} ------- "
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
log
.
info
(
"-------碳银同步电站结束: {} ------- "
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
log
.
info
(
"-------碳银同步逆变器开始: {} ------- "
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
inverterList
(
tanYinInveterInfos
);
}
}
/**
* 每隔 10分钟同步碳银电站逆变器信息
*
* @param
* @return {@link }
* @throws
* @author yangyang
* @date 2024/7/17 13:58
*/
@Scheduled
(
cron
=
"${dataRequestScheduled.tanYin}"
)
@Override
@Override
public
void
inverterList
()
{
public
void
inverterList
()
{
long
ts
=
System
.
currentTimeMillis
();
log
.
info
(
"-------碳银同步逆变器开始: {} ------- "
,
ts
);
}
List
<
TanYinInveterInfo
>
tanYinInveterInfos
=
tanYinInveterInfoMapper
.
selectList
(
new
QueryWrapper
<>());
public
void
inverterList
(
List
<
TanYinInveterInfo
>
tanYinInveterInfos
)
{
if
(
CollectionUtils
.
isEmpty
(
tanYinInveterInfos
))
{
if
(
CollectionUtils
.
isEmpty
(
tanYinInveterInfos
))
{
return
;
return
;
}
}
Map
<
String
,
TanYinInveterInfo
>
tanYinInveterInfoMap
=
tanYinInveterInfos
.
stream
().
collect
(
Collectors
.
toMap
(
TanYinInveterInfo:
:
getSn
,
v
->
v
,
(
k1
,
k2
)
->
k1
));
List
<
String
>
stationIds
=
tanYinInveterInfos
.
stream
().
map
(
TanYinInveterInfo:
:
getProjectNo
).
collect
(
Collectors
.
toList
());
List
<
String
>
stationIds
=
tanYinInveterInfos
.
stream
().
map
(
TanYinInveterInfo:
:
getProjectNo
).
collect
(
Collectors
.
toList
());
List
<
JpStation
>
jpStations
=
jpStationMapper
.
selectList
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
TANYIN
.
getCode
()).
in
(
"third_station_id"
,
stationIds
));
List
<
JpStation
>
jpStations
=
jpStationMapper
.
selectList
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
TANYIN
.
getCode
()).
in
(
"third_station_id"
,
stationIds
));
Map
<
String
,
JpStation
>
jpStationMap
=
jpStations
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
Function
.
identity
()));
Map
<
String
,
JpStation
>
jpStationMap
=
jpStations
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
Function
.
identity
()));
...
@@ -452,6 +446,12 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -452,6 +446,12 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
for
(
TanYinInveterInfo
tanYinInveterInfo
:
tanYinInveterInfos
)
{
for
(
TanYinInveterInfo
tanYinInveterInfo
:
tanYinInveterInfos
)
{
JSONObject
tanYinInveterInfoResultJson
=
tanYinInveterInfoResultMap
.
getJSONObject
(
tanYinInveterInfo
.
getSn
());
JSONObject
tanYinInveterInfoResultJson
=
tanYinInveterInfoResultMap
.
getJSONObject
(
tanYinInveterInfo
.
getSn
());
TanYinInveterInfo
tanYinInveterInfoDTO
=
tanYinInveterInfoResultJson
.
toJavaObject
(
TanYinInveterInfo
.
class
);
TanYinInveterInfo
tanYinInveterInfoDTO
=
tanYinInveterInfoResultJson
.
toJavaObject
(
TanYinInveterInfo
.
class
);
tanYinInveterInfoDTO
.
setProjectNo
(
tanYinInveterInfo
.
getProjectNo
());
tanYinInveterInfoDTO
.
setDeviceName
(
tanYinInveterInfo
.
getDeviceName
());
tanYinInveterInfoDTO
.
setSn
(
tanYinInveterInfo
.
getSn
());
tanYinInveterInfoDTO
.
setSupplier
(
tanYinInveterInfo
.
getSupplier
());
tanYinInveterInfoDTO
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinInveterInfoMapper
.
insert
(
tanYinInveterInfoDTO
);
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_station_id"
,
tanYinInveterInfo
.
getProjectNo
())
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_station_id"
,
tanYinInveterInfo
.
getProjectNo
())
...
@@ -471,6 +471,11 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -471,6 +471,11 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
jpInverter
.
setUpdateTime
(
tanYinInveterInfoDTO
.
getGmtCreate
()
!=
null
?
new
Date
(
Long
.
parseLong
(
tanYinInveterInfoDTO
.
getGmtCreate
()))
:
new
Date
());
jpInverter
.
setUpdateTime
(
tanYinInveterInfoDTO
.
getGmtCreate
()
!=
null
?
new
Date
(
Long
.
parseLong
(
tanYinInveterInfoDTO
.
getGmtCreate
()))
:
new
Date
());
JpStation
jpStation
=
jpStationMap
.
get
(
tanYinInveterInfo
.
getProjectNo
());
JpStation
jpStation
=
jpStationMap
.
get
(
tanYinInveterInfo
.
getProjectNo
());
if
(
jpStation
!=
null
)
{
if
(
jpStation
!=
null
)
{
if
(!
"离线"
.
equals
(
jpStation
.
getState
())
&&
!
"异常"
.
equals
(
jpStation
.
getState
()))
{
jpStation
.
setState
(
TanYinConstant
.
stationStatus
.
get
(
tanYinInveterInfoDTO
.
getStatus
()));
jpStationMapper
.
updateById
(
jpStation
);
jpStationMap
.
put
(
tanYinInveterInfo
.
getProjectNo
(),
jpStation
);
}
// 逆变器没有就空着
// 逆变器没有就空着
// jpInverter.setDayPowerGeneration(jpStation.getDayGenerate());
// jpInverter.setDayPowerGeneration(jpStation.getDayGenerate());
// jpInverter.setMonthPowerGeneration(jpStation.getMonthGenerate());
// jpInverter.setMonthPowerGeneration(jpStation.getMonthGenerate());
...
@@ -506,6 +511,8 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -506,6 +511,8 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
jpInverterElectricity
.
setThirdCode
(
PVProducerInfoEnum
.
TANYIN
.
getCode
());
jpInverterElectricity
.
setThirdCode
(
PVProducerInfoEnum
.
TANYIN
.
getCode
());
jpInverterElectricity
.
setThirdStationId
(
jpInverter
.
getThirdStationId
());
jpInverterElectricity
.
setThirdStationId
(
jpInverter
.
getThirdStationId
());
// jpInverterElectricity.setType("交流");
// jpInverterElectricity.setType("交流");
// jpInverterElectricity.setFrequency();// 频率
// jpInverterElectricity.setPower();// 功率
jpInverterElectricity
.
setName
(
name
);
jpInverterElectricity
.
setName
(
name
);
if
(
tanYinInveterInfoResultJson
.
get
(
name
)
!=
null
&&
!
""
.
equals
(
tanYinInveterInfoResultJson
.
get
(
name
)))
{
if
(
tanYinInveterInfoResultJson
.
get
(
name
)
!=
null
&&
!
""
.
equals
(
tanYinInveterInfoResultJson
.
get
(
name
)))
{
jpInverterElectricity
.
setVoltage
(
Double
.
valueOf
(
tanYinInveterInfoResultJson
.
get
(
name
).
toString
()));
// 电压
jpInverterElectricity
.
setVoltage
(
Double
.
valueOf
(
tanYinInveterInfoResultJson
.
get
(
name
).
toString
()));
// 电压
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IHygfIcbcService.java
0 → 100644
View file @
595eb981
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 电子钱包接口类
*
* @author system_generator
* @date 2024-01-12
*/
public
interface
IHygfIcbcService
{
void
icbcRegisterWalletUrl
(
HttpServletRequest
req
,
HttpServletResponse
resp
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IPersonnelBusinessService.java
View file @
595eb981
...
@@ -17,4 +17,6 @@ public interface IPersonnelBusinessService {
...
@@ -17,4 +17,6 @@ public interface IPersonnelBusinessService {
UserDataDto
getPersonnelBusinessById
(
String
id
);
UserDataDto
getPersonnelBusinessById
(
String
id
);
Object
deleteAllBySequenceNbr
(
Long
sequenceNbr
);
Object
deleteAllBySequenceNbr
(
Long
sequenceNbr
);
Boolean
deleteBySequenceNbrs
(
String
sequenceNbrs
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/pom.xml
View file @
595eb981
...
@@ -67,35 +67,35 @@
...
@@ -67,35 +67,35 @@
<version>
1.10.4
</version>
<version>
1.10.4
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency
>
<!-- <dependency>--
>
<groupId>
io.github.openfeign
</groupId
>
<!-- <groupId>io.github.openfeign</groupId>--
>
<artifactId>
feign-httpclient
</artifactId
>
<!-- <artifactId>feign-httpclient</artifactId>--
>
</dependency
>
<!-- </dependency>--
>
<dependency
>
<!-- <dependency>--
>
<groupId>
com.esotericsoftware.kryo
</groupId
>
<!-- <groupId>com.esotericsoftware.kryo</groupId>--
>
<artifactId>
kryo
</artifactId
>
<!-- <artifactId>kryo</artifactId>--
>
<version>
2.24.0
</version
>
<!-- <version>2.24.0</version>--
>
</dependency
>
<!-- </dependency>--
>
<dependency
>
<!-- <dependency>--
>
<groupId>
de.javakaffee
</groupId
>
<!-- <groupId>de.javakaffee</groupId>--
>
<artifactId>
kryo-serializers
</artifactId
>
<!-- <artifactId>kryo-serializers</artifactId>--
>
<version>
0.45
</version
>
<!-- <version>0.45</version>--
>
</dependency
>
<!-- </dependency>--
>
<dependency
>
<!-- <dependency>--
>
<groupId>
com.esotericsoftware
</groupId
>
<!-- <groupId>com.esotericsoftware</groupId>--
>
<artifactId>
kryo
</artifactId
>
<!-- <artifactId>kryo</artifactId>--
>
<version>
4.0.2
</version
>
<!-- <version>4.0.2</version>--
>
</dependency
>
<!-- </dependency>--
>
<dependency
>
<!-- <dependency>--
>
<groupId>
cn.com.vastdata
</groupId
>
<!-- <groupId>cn.com.vastdata</groupId>--
>
<artifactId>
vastbase-jdbc
</artifactId
>
<!-- <artifactId>vastbase-jdbc</artifactId>--
>
<version>
2.7p
</version
>
<!-- <version>2.7p</version>--
>
</dependency
>
<!-- </dependency>--
>
<dependency
>
<!-- <dependency>--
>
<groupId>
io.seata
</groupId
>
<!-- <groupId>io.seata</groupId>--
>
<artifactId>
seata-spring-boot-starter
</artifactId
>
<!-- <artifactId>seata-spring-boot-starter</artifactId>--
>
<version>
1.8.0
</version
>
<!-- <version>1.8.0</version>--
>
</dependency
>
<!-- </dependency>--
>
<!-- ICBC工行支付 -->
<!-- ICBC工行支付 -->
<dependency>
<dependency>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/config/MysqlServerConfig.java
View file @
595eb981
//package com.yeejoin.amos.boot.module.hygf.biz.config;
//
//
//import com.baomidou.mybatisplus.core.config.GlobalConfig;
//import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
//import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
//import com.github.pagehelper.PageInterceptor;
//import com.yeejoin.amos.boot.biz.config.MetaHandler;
//import com.yeejoin.amos.boot.module.hygf.api.config.UserEmpowerInterceptor;
//import io.seata.rm.datasource.DataSourceProxy;
//import org.apache.ibatis.plugin.Interceptor;
//import org.apache.ibatis.session.SqlSessionFactory;
//import org.mybatis.spring.SqlSessionTemplate;
//import org.mybatis.spring.annotation.MapperScan;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.boot.jdbc.DataSourceBuilder;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Primary;
//import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
//import org.springframework.jdbc.datasource.DataSourceTransactionManager;
//
//import javax.sql.DataSource;
//import java.util.Properties;
//
//
///**
// * mysql配置类
// * @author zhengwen
// */
//@Configuration
//@MapperScan(basePackages = {"com.yeejoin.amos.boot.module.hygf.api.mapper"}, sqlSessionTemplateRef = "mysqlSqlSessionTemplate")
//public class MysqlServerConfig {
//
// @Autowired
// MetaHandler metaHandler;
// private static final String MAPPER_LOCATION = "classpath*:mapper/mysql/*.xml";
// @Bean(name = "mysqlDataSource")
// @ConfigurationProperties(prefix = "spring.datasource.mysql-service")
// @Primary
// public DataSource mysqlDataSource() {
// return DataSourceBuilder.create().build();
// }
//
// @Bean("mysqlDataSourceProxy")
// public DataSourceProxy dataSourceProxy(@Qualifier("mysqlDataSource") DataSource hikariDataSource) {
// return new DataSourceProxy(hikariDataSource);
// }
//
// @Bean(name = "mysqlSqlSessionFactory")
// @Primary
// public SqlSessionFactory mysqlSqlSessionFactory(@Qualifier("mysqlDataSourceProxy") DataSource dataSource, GlobalConfig globalConfig) throws Exception {
// //注意这里一定要用MybatisSqlSessionFactoryBean,如果用SqlSessionFactory,配置无效
// MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
// bean.setDataSource(dataSource);
// bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(MAPPER_LOCATION));
// globalConfig.setMetaObjectHandler(metaHandler);
// bean.setGlobalConfig(globalConfig);
// //分页插件
// Interceptor interceptor = new PageInterceptor();
// Properties properties = new Properties();
// properties.setProperty("helperDialect", "mysql");
// properties.setProperty("offsetAsPageNum", "true");
// properties.setProperty("rowBoundsWithCount", "true");
// properties.setProperty("reasonable", "true");
// properties.setProperty("supportMethodsArguments","true");
// properties.setProperty("params","pageNum=current;pageSize=size" +
// "" +
// ";");
// interceptor.setProperties(properties);
// bean.setPlugins(new Interceptor[] {interceptor,
// userEmpowerInterceptor(),
// paginationInterceptor()
// });
// return bean.getObject();
// }
//
// @Bean(name = "mysqlTransactionManager")
// @Primary
// public DataSourceTransactionManager mysqlTransactionManager(@Qualifier("mysqlDataSource") DataSource dataSource) {
// return new DataSourceTransactionManager(dataSource);
// }
//
// @Bean(name = "mysqlSqlSessionTemplate")
// @Primary
// public SqlSessionTemplate mysqlSqlSessionTemplate(@Qualifier("mysqlSqlSessionFactory") SqlSessionFactory sqlSessionFactory) throws Exception {
// return new SqlSessionTemplate(sqlSessionFactory);
// }
//
// @Bean
// public PaginationInterceptor paginationInterceptor() {
// PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
// paginationInterceptor.setDialectType("mysql");
// return paginationInterceptor;
// }
//
//
// @Bean
// public UserEmpowerInterceptor userEmpowerInterceptor() {
// UserEmpowerInterceptor userEmpowerInterceptor = new UserEmpowerInterceptor();
//
// return userEmpowerInterceptor;
// }
//
//
//}
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
config
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
config
;
...
@@ -7,7 +115,6 @@ import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
...
@@ -7,7 +115,6 @@ import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import
com.github.pagehelper.PageInterceptor
;
import
com.github.pagehelper.PageInterceptor
;
import
com.yeejoin.amos.boot.biz.config.MetaHandler
;
import
com.yeejoin.amos.boot.biz.config.MetaHandler
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpowerInterceptor
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpowerInterceptor
;
import
io.seata.rm.datasource.DataSourceProxy
;
import
org.apache.ibatis.plugin.Interceptor
;
import
org.apache.ibatis.plugin.Interceptor
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.mybatis.spring.SqlSessionTemplate
;
...
@@ -44,18 +151,16 @@ public class MysqlServerConfig {
...
@@ -44,18 +151,16 @@ public class MysqlServerConfig {
return
DataSourceBuilder
.
create
().
build
();
return
DataSourceBuilder
.
create
().
build
();
}
}
@Bean
(
"mysqlDataSourceProxy"
)
public
DataSourceProxy
dataSourceProxy
(
@Qualifier
(
"mysqlDataSource"
)
DataSource
hikariDataSource
)
{
return
new
DataSourceProxy
(
hikariDataSource
);
}
@Bean
(
name
=
"mysqlSqlSessionFactory"
)
@Bean
(
name
=
"mysqlSqlSessionFactory"
)
@Primary
@Primary
public
SqlSessionFactory
mysqlSqlSessionFactory
(
@Qualifier
(
"mysqlDataSource
Proxy
"
)
DataSource
dataSource
,
GlobalConfig
globalConfig
)
throws
Exception
{
public
SqlSessionFactory
mysqlSqlSessionFactory
(
@Qualifier
(
"mysqlDataSource"
)
DataSource
dataSource
,
GlobalConfig
globalConfig
)
throws
Exception
{
//注意这里一定要用MybatisSqlSessionFactoryBean,如果用SqlSessionFactory,配置无效
//注意这里一定要用MybatisSqlSessionFactoryBean,如果用SqlSessionFactory,配置无效
MybatisSqlSessionFactoryBean
bean
=
new
MybatisSqlSessionFactoryBean
();
MybatisSqlSessionFactoryBean
bean
=
new
MybatisSqlSessionFactoryBean
();
bean
.
setDataSource
(
dataSource
);
bean
.
setDataSource
(
dataSource
);
bean
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
().
getResources
(
MAPPER_LOCATION
));
bean
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
().
getResources
(
MAPPER_LOCATION
));
globalConfig
.
setMetaObjectHandler
(
metaHandler
);
globalConfig
.
setMetaObjectHandler
(
metaHandler
);
bean
.
setGlobalConfig
(
globalConfig
);
bean
.
setGlobalConfig
(
globalConfig
);
//分页插件
//分页插件
...
@@ -70,7 +175,10 @@ public class MysqlServerConfig {
...
@@ -70,7 +175,10 @@ public class MysqlServerConfig {
""
+
""
+
";"
);
";"
);
interceptor
.
setProperties
(
properties
);
interceptor
.
setProperties
(
properties
);
bean
.
setPlugins
(
new
Interceptor
[]
{
interceptor
,
bean
.
setPlugins
(
new
Interceptor
[]
{
interceptor
,
paginationInterceptor
(),
userEmpowerInterceptor
(),
userEmpowerInterceptor
(),
paginationInterceptor
()
paginationInterceptor
()
});
});
...
@@ -105,4 +213,4 @@ public class MysqlServerConfig {
...
@@ -105,4 +213,4 @@ public class MysqlServerConfig {
}
}
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/FinancingInfoController.java
View file @
595eb981
...
@@ -5,8 +5,8 @@ import cn.hutool.core.map.MapBuilder;
...
@@ -5,8 +5,8 @@ import cn.hutool.core.map.MapBuilder;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseNewUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseNewUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseUtil
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -48,7 +48,7 @@ public class FinancingInfoController extends BaseController {
...
@@ -48,7 +48,7 @@ public class FinancingInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
@
Global
Transactional
@Transactional
public
ResponseModel
<
FinancingInfoDto
>
save
(
@RequestBody
FinancingInfoDto
model
)
{
public
ResponseModel
<
FinancingInfoDto
>
save
(
@RequestBody
FinancingInfoDto
model
)
{
model
=
financingInfoServiceImpl
.
saveModel
(
model
);
model
=
financingInfoServiceImpl
.
saveModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
...
@@ -63,7 +63,7 @@ public class FinancingInfoController extends BaseController {
...
@@ -63,7 +63,7 @@ public class FinancingInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
@
Global
Transactional
@Transactional
public
ResponseModel
<
FinancingInfoDto
>
updateBySequenceNbrFinancingInfo
(
@RequestBody
FinancingInfoDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
FinancingInfoDto
>
updateBySequenceNbrFinancingInfo
(
@RequestBody
FinancingInfoDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setFile
(
JSON
.
toJSONString
(
model
.
getFiles
()));
model
.
setFile
(
JSON
.
toJSONString
(
model
.
getFiles
()));
...
@@ -147,7 +147,7 @@ public class FinancingInfoController extends BaseController {
...
@@ -147,7 +147,7 @@ public class FinancingInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"撤回"
,
notes
=
"撤回"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"撤回"
,
notes
=
"撤回"
)
@
Global
Transactional
@Transactional
@GetMapping
(
value
=
"/rollback"
)
@GetMapping
(
value
=
"/rollback"
)
public
ResponseModel
rollback
(
String
instanceId
,
String
peasantHouseholdId
)
{
public
ResponseModel
rollback
(
String
instanceId
,
String
peasantHouseholdId
)
{
financingInfoServiceImpl
.
rollback
(
instanceId
,
peasantHouseholdId
);
financingInfoServiceImpl
.
rollback
(
instanceId
,
peasantHouseholdId
);
...
@@ -158,7 +158,7 @@ public class FinancingInfoController extends BaseController {
...
@@ -158,7 +158,7 @@ public class FinancingInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"审核"
,
notes
=
"审核"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"审核"
,
notes
=
"审核"
)
@PostMapping
(
value
=
"/execueFlow"
)
@PostMapping
(
value
=
"/execueFlow"
)
@
Global
Transactional
@Transactional
public
ResponseModel
execueFlow
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
public
ResponseModel
execueFlow
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
financingInfoServiceImpl
.
execueFlow
(
params
);
financingInfoServiceImpl
.
execueFlow
(
params
);
return
CommonResponseNewUtil
.
success
();
return
CommonResponseNewUtil
.
success
();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HygfIcbcController.java
0 → 100644
View file @
595eb981
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.HygfIcbcServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 并网信息
*/
@RestController
@Api
(
tags
=
"电子钱包"
)
@RequestMapping
(
value
=
"/icbc"
)
public
class
HygfIcbcController
extends
BaseController
{
@Autowired
HygfIcbcServiceImpl
hygfIcbcService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/icbcRegisterWalletUrl"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"注册电子钱包"
,
notes
=
"注册电子钱包"
)
public
void
getHygfIcbcRegisterWalletUrl
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
{
hygfIcbcService
.
icbcRegisterWalletUrl
(
req
,
resp
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PersonnelBusinessController.java
View file @
595eb981
...
@@ -108,6 +108,19 @@ public class PersonnelBusinessController extends BaseController {
...
@@ -108,6 +108,19 @@ public class PersonnelBusinessController extends BaseController {
}
}
/**
/**
* 根据sequenceNbrs批量删除
*
* @param sequenceNbrs 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/deleteDealerPerson"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbrs批量删除经销商人员信息"
,
notes
=
"根据sequenceNbrs批量删除经销商人员信息"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbrs
(
@RequestParam
(
value
=
"sequenceNbrs"
)
String
sequenceNbrs
){
return
ResponseHelper
.
buildResponse
(
personnelBusinessServiceImpl
.
deleteBySequenceNbrs
(
sequenceNbrs
));
}
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PowerStationController.java
View file @
595eb981
...
@@ -6,10 +6,10 @@ import com.yeejoin.amos.boot.module.hygf.api.config.UserLimits;
...
@@ -6,10 +6,10 @@ import com.yeejoin.amos.boot.module.hygf.api.config.UserLimits;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationDto
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.PowerStationServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.PowerStationServiceImpl
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
@@ -132,7 +132,7 @@ public class PowerStationController extends BaseController {
...
@@ -132,7 +132,7 @@ public class PowerStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"电站审核"
,
notes
=
"电站审核"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"电站审核"
,
notes
=
"电站审核"
)
@PostMapping
(
value
=
"/powerStationExamine"
)
@PostMapping
(
value
=
"/powerStationExamine"
)
@
Global
Transactional
@Transactional
public
ResponseModel
<
String
>
powerStationExamine
(
@RequestParam
(
value
=
"pageId"
)
long
pageId
,
public
ResponseModel
<
String
>
powerStationExamine
(
@RequestParam
(
value
=
"pageId"
)
long
pageId
,
@RequestParam
(
value
=
"nodeCode"
)
String
nodeCode
,
@RequestParam
(
value
=
"nodeCode"
)
String
nodeCode
,
@RequestParam
(
value
=
"stationId"
)
String
stationId
,
@RequestParam
(
value
=
"stationId"
)
String
stationId
,
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PreparationMoneyController.java
View file @
595eb981
...
@@ -19,11 +19,11 @@ import com.yeejoin.amos.boot.module.hygf.biz.service.impl.DesignInformationServi
...
@@ -19,11 +19,11 @@ import com.yeejoin.amos.boot.module.hygf.biz.service.impl.DesignInformationServi
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.HygfReplenishmentServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.HygfReplenishmentServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.PreparationMoneyServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.PreparationMoneyServiceImpl
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
@@ -69,7 +69,7 @@ public class PreparationMoneyController extends BaseController {
...
@@ -69,7 +69,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增发货单"
,
notes
=
"新增发货单"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增发货单"
,
notes
=
"新增发货单"
)
@
Global
Transactional
@Transactional
@UserLimits
@UserLimits
public
ResponseModel
<
PreparationMoney
>
save
(
@RequestParam
(
"isSubmit"
)
String
isSubmit
,
@RequestBody
PreparationMoney
model
)
{
public
ResponseModel
<
PreparationMoney
>
save
(
@RequestParam
(
"isSubmit"
)
String
isSubmit
,
@RequestBody
PreparationMoney
model
)
{
AgencyUserModel
agencyUserModel
=
getUserInfo
();
AgencyUserModel
agencyUserModel
=
getUserInfo
();
...
@@ -257,7 +257,7 @@ public class PreparationMoneyController extends BaseController {
...
@@ -257,7 +257,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/uploadVoucher"
)
@PostMapping
(
value
=
"/uploadVoucher"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传收获凭证"
,
notes
=
"上传收获凭证"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传收获凭证"
,
notes
=
"上传收获凭证"
)
@
Global
Transactional
@Transactional
public
ResponseModel
uploadVoucher
(
@RequestParam
(
value
=
"instanceId"
,
required
=
false
)
String
instanceId
,
@RequestBody
PreparationMoney
model
,
String
isSubmit
)
{
public
ResponseModel
uploadVoucher
(
@RequestParam
(
value
=
"instanceId"
,
required
=
false
)
String
instanceId
,
@RequestBody
PreparationMoney
model
,
String
isSubmit
)
{
preparationMoneyServiceImpl
.
uploadVoucher
(
model
,
instanceId
,
isSubmit
);
preparationMoneyServiceImpl
.
uploadVoucher
(
model
,
instanceId
,
isSubmit
);
...
@@ -267,7 +267,7 @@ public class PreparationMoneyController extends BaseController {
...
@@ -267,7 +267,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/excuteFlow"
)
@PostMapping
(
value
=
"/excuteFlow"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"收货审核"
,
notes
=
"收货审核"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"收货审核"
,
notes
=
"收货审核"
)
@
Global
Transactional
@Transactional
public
ResponseModel
excuteFlow
(
@RequestParam
(
value
=
"instanceId"
,
required
=
false
)
String
instanceId
,
public
ResponseModel
excuteFlow
(
@RequestParam
(
value
=
"instanceId"
,
required
=
false
)
String
instanceId
,
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
,
@RequestBody
Map
<
String
,
Object
>
kv
)
{
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
,
@RequestBody
Map
<
String
,
Object
>
kv
)
{
...
@@ -278,7 +278,7 @@ public class PreparationMoneyController extends BaseController {
...
@@ -278,7 +278,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/replenishmentSubmit"
)
@PostMapping
(
value
=
"/replenishmentSubmit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补货申请"
,
notes
=
"补货申请"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补货申请"
,
notes
=
"补货申请"
)
@
Global
Transactional
@Transactional
public
ResponseModel
replenishmentSubmit
(
@RequestBody
HygfReplenishment
hygfReplenishment
)
{
public
ResponseModel
replenishmentSubmit
(
@RequestBody
HygfReplenishment
hygfReplenishment
)
{
// HygfReplenishment hygfReplenishment1 = new HygfReplenishment();
// HygfReplenishment hygfReplenishment1 = new HygfReplenishment();
// BeanUtils.copyProperties(hygfReplenishment,hygfReplenishment1);
// BeanUtils.copyProperties(hygfReplenishment,hygfReplenishment1);
...
@@ -302,7 +302,7 @@ public class PreparationMoneyController extends BaseController {
...
@@ -302,7 +302,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/replenishmentAudit"
)
@PostMapping
(
value
=
"/replenishmentAudit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补货审核"
,
notes
=
"补货审核"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补货审核"
,
notes
=
"补货审核"
)
@
Global
Transactional
@Transactional
public
ResponseModel
replenishmentAudit
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
,
@RequestBody
Map
<
String
,
Object
>
kv
)
{
public
ResponseModel
replenishmentAudit
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
,
@RequestBody
Map
<
String
,
Object
>
kv
)
{
preparationMoneyServiceImpl
.
replenishmentAudit
(
sequenceNbr
,
kv
);
preparationMoneyServiceImpl
.
replenishmentAudit
(
sequenceNbr
,
kv
);
return
CommonResponseNewUtil
.
success
();
return
CommonResponseNewUtil
.
success
();
...
@@ -311,7 +311,7 @@ public class PreparationMoneyController extends BaseController {
...
@@ -311,7 +311,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/submitOrder"
)
@PostMapping
(
value
=
"/submitOrder"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补货审核"
,
notes
=
"补货审核"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补货审核"
,
notes
=
"补货审核"
)
@
Global
Transactional
@Transactional
public
ResponseModel
submitOrder
(
@RequestParam
(
value
=
"instanceId"
)
String
instanceId
,
public
ResponseModel
submitOrder
(
@RequestParam
(
value
=
"instanceId"
)
String
instanceId
,
@RequestParam
(
value
=
"isSubmit"
)
String
isSubmit
,
@RequestParam
(
value
=
"isSubmit"
)
String
isSubmit
,
@RequestBody
PreparationMoney
model
)
{
@RequestBody
PreparationMoney
model
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/UnitInfoController.java
View file @
595eb981
...
@@ -25,7 +25,6 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel;
...
@@ -25,7 +25,6 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import
com.yeejoin.amos.feign.privilege.model.GroupModel
;
import
com.yeejoin.amos.feign.privilege.model.GroupModel
;
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.GlobalTransactional
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
...
@@ -33,6 +32,7 @@ import org.apache.commons.lang.StringUtils;
...
@@ -33,6 +32,7 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
...
@@ -262,7 +262,7 @@ public class UnitInfoController extends BaseController {
...
@@ -262,7 +262,7 @@ public class UnitInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/unitRegister"
)
@PostMapping
(
value
=
"/unitRegister"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"单位注册"
,
notes
=
"单位注册"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"单位注册"
,
notes
=
"单位注册"
)
@
Global
Transactional
@Transactional
public
ResponseModel
<
UnitRegisterDto
>
save
(
@RequestBody
UnitRegisterDto
model
)
{
public
ResponseModel
<
UnitRegisterDto
>
save
(
@RequestBody
UnitRegisterDto
model
)
{
try
{
try
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/feign/TaskV2FeignService.java
View file @
595eb981
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
feign
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
feign
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
...
@@ -16,7 +17,8 @@ import java.util.List;
...
@@ -16,7 +17,8 @@ import java.util.List;
* @apiNote 待办Feign调用
* @apiNote 待办Feign调用
* @date 2024-05-16
* @date 2024-05-16
*/
*/
@FeignClient
(
name
=
"AMOS-API-PRIVILEGE"
,
path
=
"/systemctl/v2/task"
,
configuration
=
{
XidFeignConfiguration
.
class
})
//@FeignClient(name = "AMOS-API-PRIVILEGE", path = "/systemctl/v2/task", configuration = {XidFeignConfiguration.class})
@FeignClient
(
name
=
"AMOS-API-PRIVILEGE"
,
path
=
"/systemctl/v2/task"
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
TaskV2FeignService
{
public
interface
TaskV2FeignService
{
/**
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/feign/WorkFlowFeignService.java
View file @
595eb981
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
feign
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
feign
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.workflow.model.*
;
import
com.yeejoin.amos.feign.workflow.model.*
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
...
@@ -8,7 +9,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -8,7 +9,7 @@ import org.springframework.web.bind.annotation.*;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@FeignClient
(
name
=
"${workflow.feign.name}"
,
path
=
"workflow"
,
configuration
=
{
XidFeignConfiguration
.
class
})
@FeignClient
(
name
=
"${workflow.feign.name}"
,
path
=
"workflow"
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
WorkFlowFeignService
{
public
interface
WorkFlowFeignService
{
/***
/***
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/feign/WorkflowFeignClient.java
View file @
595eb981
...
@@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.*;
...
@@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.*;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@FeignClient
(
name
=
"${workflow.feign.name:AMOS-API-WORKFLOW}"
,
path
=
"workflow"
,
configuration
=
{
MultipartSupportConfig
.
class
})
@FeignClient
(
name
=
"${workflow.feign.name:AMOS-API-WORKFLOW}"
,
path
=
"workflow"
,
configuration
=
{
XidFeignConfiguration
.
class
})
//
@FeignClient(name = "${workflow.feign.name:AMOS-API-WORKFLOW}", path = "workflow", configuration = {XidFeignConfiguration.class})
public
interface
WorkflowFeignClient
{
public
interface
WorkflowFeignClient
{
/***
/***
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/feign/XidFeignConfiguration.java
View file @
595eb981
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
feign
;
//package com.yeejoin.amos.boot.module.hygf.biz.feign;
//
import
feign.RequestInterceptor
;
//import feign.RequestInterceptor;
import
feign.RequestTemplate
;
//import feign.RequestTemplate;
import
feign.codec.Encoder
;
//import feign.codec.Encoder;
import
feign.form.spring.SpringFormEncoder
;
//import feign.form.spring.SpringFormEncoder;
import
io.seata.core.context.RootContext
;
//import io.seata.core.context.RootContext;
import
org.springframework.beans.factory.ObjectFactory
;
//import org.springframework.beans.factory.ObjectFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
//import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.boot.autoconfigure.http.HttpMessageConverters
;
//import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
//import org.springframework.cloud.openfeign.support.SpringEncoder;
import
org.springframework.context.annotation.Bean
;
//import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Configuration
;
//import org.springframework.context.annotation.Configuration;
import
org.springframework.util.StringUtils
;
//import org.springframework.util.StringUtils;
import
org.springframework.web.context.request.RequestContextListener
;
//import org.springframework.web.context.request.RequestContextListener;
//
@Configuration
//@Configuration
public
class
XidFeignConfiguration
implements
RequestInterceptor
{
//public class XidFeignConfiguration implements RequestInterceptor {
@Autowired
// @Autowired
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
// private ObjectFactory<HttpMessageConverters> messageConverters;
//
@Bean
// @Bean
public
Encoder
feignFormEncoder
()
{
// public Encoder feignFormEncoder() {
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
// return new SpringFormEncoder(new SpringEncoder(messageConverters));
}
// }
/**
// /**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
// * 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* @return
// * @return
*/
// */
@Bean
// @Bean
public
RequestContextListener
requestInterceptor
()
{
// public RequestContextListener requestInterceptor() {
return
new
RequestContextListener
();
// return new RequestContextListener();
}
// }
//
@Override
// @Override
public
void
apply
(
RequestTemplate
template
)
{
// public void apply(RequestTemplate template) {
String
xid
=
RootContext
.
getXID
();
// String xid = RootContext.getXID();
if
(
StringUtils
.
hasText
(
xid
)){
// if(StringUtils.hasText(xid)){
template
.
header
(
RootContext
.
KEY_XID
,
xid
);
// template.header(RootContext.KEY_XID, xid);
}
// }
}
// }
}
//}
\ No newline at end of file
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/AcceptanceRectificationOrderServiceImpl.java
View file @
595eb981
...
@@ -20,11 +20,11 @@ import com.yeejoin.amos.boot.module.hygf.api.service.IAcceptanceRectificationOrd
...
@@ -20,11 +20,11 @@ import com.yeejoin.amos.boot.module.hygf.api.service.IAcceptanceRectificationOrd
import
com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
@@ -103,7 +103,7 @@ public class AcceptanceRectificationOrderServiceImpl extends BaseService<Accepta
...
@@ -103,7 +103,7 @@ public class AcceptanceRectificationOrderServiceImpl extends BaseService<Accepta
* 提交整改并触发工作流
* 提交整改并触发工作流
*/
*/
@
Global
Transactional
@Transactional
public
AcceptanceRectificationOrderDto
updateAndDriveWorkflow
(
AcceptanceRectificationOrderDto
model
,
String
userId
)
{
public
AcceptanceRectificationOrderDto
updateAndDriveWorkflow
(
AcceptanceRectificationOrderDto
model
,
String
userId
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/AcceptanceServiceImpl.java
View file @
595eb981
...
@@ -19,11 +19,11 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.PeasantHouseholdMapper;
...
@@ -19,11 +19,11 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.PeasantHouseholdMapper;
import
com.yeejoin.amos.boot.module.hygf.api.service.IAcceptanceService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IAcceptanceService
;
import
com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
...
@@ -115,7 +115,7 @@ public class AcceptanceServiceImpl implements IAcceptanceService {
...
@@ -115,7 +115,7 @@ public class AcceptanceServiceImpl implements IAcceptanceService {
return
Optional
.
ofNullable
(
item
).
orElse
(
new
AcceptanceCheckItem
());
return
Optional
.
ofNullable
(
item
).
orElse
(
new
AcceptanceCheckItem
());
}
}
@Override
@Override
@
Global
Transactional
@Transactional
public
void
checkAccept
(
Long
basicGridAcceptanceId
,
String
userId
)
{
public
void
checkAccept
(
Long
basicGridAcceptanceId
,
String
userId
)
{
String
lockName
=
String
.
format
(
"LockName:checkAccept:%s"
,
basicGridAcceptanceId
);
String
lockName
=
String
.
format
(
"LockName:checkAccept:%s"
,
basicGridAcceptanceId
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
View file @
595eb981
...
@@ -13,7 +13,6 @@ import com.yeejoin.amos.boot.module.hygf.api.service.IBasicGridAcceptanceService
...
@@ -13,7 +13,6 @@ import com.yeejoin.amos.boot.module.hygf.api.service.IBasicGridAcceptanceService
import
com.yeejoin.amos.boot.module.hygf.api.util.NumberUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.util.NumberUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -94,7 +93,7 @@ public class BasicGridAcceptanceServiceImpl
...
@@ -94,7 +93,7 @@ public class BasicGridAcceptanceServiceImpl
return
grid
;
return
grid
;
}
}
@
Global
Transactional
@Transactional
public
synchronized
HygfOnGrid
saveAndCommit
(
HygfOnGrid
grid
,
String
userId
)
{
public
synchronized
HygfOnGrid
saveAndCommit
(
HygfOnGrid
grid
,
String
userId
)
{
BasicGridAcceptance
basicGridAcceptance
=
basicGridAcceptanceMapper
BasicGridAcceptance
basicGridAcceptance
=
basicGridAcceptanceMapper
...
@@ -202,7 +201,7 @@ public class BasicGridAcceptanceServiceImpl
...
@@ -202,7 +201,7 @@ public class BasicGridAcceptanceServiceImpl
return
bool
;
return
bool
;
}
}
@
Global
Transactional
@Transactional
public
void
execute
(
AcceptanceCheckItem
dto
,
String
userId
)
{
public
void
execute
(
AcceptanceCheckItem
dto
,
String
userId
)
{
String
lockName
=
String
.
format
(
"LockName:executeWorkflow:%s"
,
dto
.
getBasicGridAcceptanceId
());
String
lockName
=
String
.
format
(
"LockName:executeWorkflow:%s"
,
dto
.
getBasicGridAcceptanceId
());
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/FinancingInfoServiceImpl.java
View file @
595eb981
...
@@ -35,7 +35,6 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO;
...
@@ -35,7 +35,6 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HygfIcbcServiceImpl.java
0 → 100644
View file @
595eb981
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.icbc.api.IcbcConstants
;
import
com.icbc.api.UiIcbcClient
;
import
com.icbc.api.request.JftUiUserEntrustopenacctSubmitRequestV1
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IHygfIcbcService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.PrintWriter
;
import
java.util.UUID
;
/**
* 并网信息服务实现类
*
* @author system_generator
* @date 2024-01-12
*/
@Service
@Slf4j
public
class
HygfIcbcServiceImpl
implements
IHygfIcbcService
{
private
static
final
long
serialVersionUID
=
1L
;
// 合作方 APPID
private
static
final
String
APP_ID
=
"11000000000000028870"
;
// 此处替换合作方 APPID 对应私钥
private
static
final
String
MY_PRIVATE_KEY
=
"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDAlcIeANdqipul3/qAIRlknSacHiFCMzLzUJisGcr9ipm3p2rir8WDsac2MxgtUt+f89SGNoWyjv4q0/QAKQQTd5U3KuGAksCJLBGVibuFe7G7YGYVezUksjvocvp8GIinCIkzq67KL2SOpGXAu3s+282rx8AxdTZA/EhXQvbORbWz5+DamyY+wS7Maa8KmIOb6WZPtiXgENZxDHAafrqW8Gt1BnVfJNf5yS5J9Wl+LcR1EPvi5iH8dSIdn1ZMVupoREjV/DvItSogVehsqTRZWuekAo2xH9YEli1UMG/l3deViRn/A4VmPPzdv0xXpn/yO+OTjWez+KmSmJfAZXBvAgMBAAECggEABRYviWFWTz8X+1qeIDI/nHO2KFt3X2tAxkJztd/8h5PYmYw3e4NPATp5Ayp4UgIlW/ExxNW91EiImBL/F939eJIpA8sDJ8U4hqb+U+fOZyksOZnDOIAHmE+I24vl588yFM9Z6F55gGeeDVJ0SZHqIG/nz8i339aLt02yj3N6V1peQugBP6L9arcD+gVu4F70whkqW+lHBK/WzX1OazqEx3Ip175jqzi9/0vO/h/kqnGGXuMi2VeuAPsa+d0a6lf/FScxqCt3t6dCkJ5DPA1MCj81dPi5ZfCM/vE0N8I6LEV+RyC7bb4YVO/PoicFjb2j8vfLvldOUrsvkNH51dZusQKBgQDpMHacOBpIuVzEFfNtS9SgA96cUV6NCSmHoQppJ/p9xKzY4DpcqoOCIBT4WCvVe6PeN5mrjzt8Q5gJWxiq0tVgIF9k8GjLmuiJ2v4Qh8aUmlRwn0T0DYiX/Y7uzX+pRlkpoKrSktlTOT9vmGwZDGDk0h2+H3hZ3YQEucfA6bhHmQKBgQDTbHrbr1WsUR9lrdLaGi/Uphpl3BXLuCnJXav3yIZOktO5V68MfPZXLP7aaNtbK3n0YHD+Uv8wpHBBSWQYjVYlGdvlniA/W1pr73GZJECFfS1BmmFC4GG3E92D5IkmrcPlUuz8XxKrlwHnfW1F0MoDvhp930vS0tS6u+WYTt9dRwKBgCeEQPVkRIACeYf5OFFTQmsDfNv8pgs8fD8xuTPsxHQ/uhLenMVLWBHbIfKb7oG0/CYSQgZitW/vfHpJZ7q7E9HAaqoOW5P1YmbKJ7fhanOQW7LiKqs5B+bJ30j0piendkCpq4kXvaBu2SMuL1NnV5wvRz8K0jhYY6DxYrp8YPAxAoGAZxWTaZ25tgTvvBHeprzx6Ur7wAJpFiU7KpVjjbLV2WW5mbro/LvJGIQ11qQdn/w4wDBtp3MsPblPimWQSnBPOlO7Zd+NdZbDJbFfv/1vACcic8Qj/AmPW0ZyUSaSwKskwqGGLx7j6Yn9QbNkHhBJDz4XiJvhSm/FjS6kKXj7a20CgYEArnEiPmL5g1Ca/qKK9ql8Q6P9gipIfGGpaFu23y0trbcFpVn8Oos/ic0Jgw4Xiz+rqvb6bW2V6lqBJ+9/kdn0i7zlZxKNpYsW2xFgi04OU3d5HkGL16Y1rpqMYYEhjFaOIn7J8P046UYR99yaybgQd18TE6oFrX8OL5uY8M4ge4Y="
;
// 指定《聚富通委托代扣签约同步开户页面服务V1》URL
private
static
final
String
serviceUrl
=
"https://gw.open.icbc.com.cn/ui/jft/ui/user/entrustopenacct/submit/V1"
;
private
static
final
String
corpNo
=
"020240710000001169"
;
private
static
final
String
trxChannel
=
"05"
;
// 05表示小程序
// 此处替换合作方 AES 加密秘钥
private
static
final
String
AES_Key
=
"nuCVNzIxOTHZWv8YjEeYQA=="
;
private
static
final
String
CAMS_PUBLIC_KEY
=
"655CE8706E6ED9A30B92E57D8D645ADDE8C541C27C5C5AFD529C610C4C0B04F9074E3B6E933C50A3316AEA60CEF461BE4C7916D2AF51170D3A2631394A7F3939"
;
@Override
public
void
icbcRegisterWalletUrl
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
{
try
{
UiIcbcClient
client
=
new
UiIcbcClient
(
APP_ID
,
IcbcConstants
.
SIGN_TYPE_RSA2
,
MY_PRIVATE_KEY
,
IcbcConstants
.
CHARSET_UTF8
);
String
userId
=
req
.
getParameter
(
"userId"
);
JftUiUserEntrustopenacctSubmitRequestV1
request
=
new
JftUiUserEntrustopenacctSubmitRequestV1
();
request
.
setServiceUrl
(
serviceUrl
);
JftUiUserEntrustopenacctSubmitRequestV1
.
JftUiUserEntrustopenacctSubmitRequestV1Biz
bizContent
=
new
JftUiUserEntrustopenacctSubmitRequestV1
.
JftUiUserEntrustopenacctSubmitRequestV1Biz
();
bizContent
.
setAppId
(
APP_ID
);
bizContent
.
setCorpNo
(
corpNo
);
bizContent
.
setOutUserId
(
userId
);
bizContent
.
setCorpSerno
(
UUID
.
randomUUID
().
toString
());
bizContent
.
setTrxChannel
(
trxChannel
);
bizContent
.
setSignProtocol
(
"0"
);
// 是否对接缴费代扣流程
// bizContent.setOutVendorId("MAA7TGFK-2"); // 企业外系统编号
// bizContent.setProjectId(UUID.randomUUID().toString().substring(0, 16)); // 缴费项目编号
// bizContent.setBusiCode(userId); // 缴费编号
// bizContent.setProtocolEndDate("2030-12-30");
// bizContent.setProtocolLimitAmount("99999999999999999");
// bizContent.setCallbackUrl("https://www.icbc.com.cn/notify");
// bizContent.setJumpUrl("https://www.icbc.com.cn/jumpback?userId=xxx");
// bizContent.setFailJumpUrl("https://www.icbc.com.cn/jumpback?userId=xxx");
bizContent
.
setCamsPublicKey
(
CAMS_PUBLIC_KEY
);
request
.
setBizContent
(
bizContent
);
// 调用工行 SDK,生成自动提交表单,将用户跳转到收方入驻页面
resp
.
setHeader
(
"Content-Type"
,
"text/html;charset="
+
IcbcConstants
.
CHARSET_UTF8
);
PrintWriter
out
=
resp
.
getWriter
();
out
.
write
(
"<html>"
);
out
.
write
(
"<head>"
);
out
.
write
(
"<meta http-equiv=\"Content-Type\" content=\"text/html;charset="
+
IcbcConstants
.
CHARSET_UTF8
+
"\">"
);
out
.
write
(
"</head>"
);
out
.
write
(
"<body>"
);
System
.
out
.
println
(
"111111111111111118888888888888"
+
client
.
buildPostForm
(
request
).
toString
());
out
.
write
(
client
.
buildPostForm
(
request
));
out
.
write
(
"</body>"
);
out
.
write
(
"</html>"
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
BadRequest
(
"报错了"
);
}
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
View file @
595eb981
...
@@ -27,6 +27,8 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
...
@@ -27,6 +27,8 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
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
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -68,24 +70,27 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -68,24 +70,27 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
@Value
(
"${hygf.user.group.empty}"
)
@Value
(
"${hygf.user.group.empty}"
)
private
long
userGroupempty
;
private
long
userGroupempty
;
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PersonnelBusinessServiceImpl
.
class
);
/**
/**
* 分页查询
* 分页查询
*/
*/
public
Page
<
PersonnelBusinessDto
>
queryForPersonnelBusinessPage
(
Page
<
PersonnelBusinessDto
>
page
)
{
public
Page
<
PersonnelBusinessDto
>
queryForPersonnelBusinessPage
(
Page
<
PersonnelBusinessDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
return
this
.
queryForPage
(
page
,
null
,
false
);
}
}
/**
/**
* 列表查询 示例
* 列表查询 示例
*/
*/
public
List
<
PersonnelBusinessDto
>
queryForPersonnelBusinessList
()
{
public
List
<
PersonnelBusinessDto
>
queryForPersonnelBusinessList
()
{
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
@Override
@Override
public
IPage
<
CompanyDtoUserDto
>
getCompanyDtoUserDto
(
CompanyDtoUserDto
dto
)
{
public
IPage
<
CompanyDtoUserDto
>
getCompanyDtoUserDto
(
CompanyDtoUserDto
dto
)
{
Map
<
String
,
String
>
map
=
personnelBusinessMapper
.
getorgcode
(
dto
.
getAmosUnitId
());
Map
<
String
,
String
>
map
=
personnelBusinessMapper
.
getorgcode
(
dto
.
getAmosUnitId
());
dto
.
setAmosUnitOrgCode
(
map
.
get
(
"orgCode"
));
dto
.
setAmosUnitOrgCode
(
map
.
get
(
"orgCode"
));
IPage
<
CompanyDtoUserDto
>
pag
=
personnelBusinessMapper
.
getCompanyDtoUserDtopage
(
dto
);
IPage
<
CompanyDtoUserDto
>
pag
=
personnelBusinessMapper
.
getCompanyDtoUserDtopage
(
dto
);
...
@@ -93,11 +98,11 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -93,11 +98,11 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
}
}
@Transactional
@Transactional
public
void
savePersonnelBusiness
(
UserDataDto
model
)
{
public
void
savePersonnelBusiness
(
UserDataDto
model
)
{
UserDataZHDto
userDataZHDto
=
model
.
getUserDataZHDto
();
UserDataZHDto
userDataZHDto
=
model
.
getUserDataZHDto
();
UserDataJBDto
userDataJBDto
=
model
.
getUserDataJBDto
();
UserDataJBDto
userDataJBDto
=
model
.
getUserDataJBDto
();
FeignClientResult
<
AgencyUserModel
>
userResult
=
null
;
FeignClientResult
<
AgencyUserModel
>
userResult
=
null
;
//新增平台用户
//新增平台用户
try
{
try
{
// 1 创建平台用户
// 1 创建平台用户
List
<
RoleModel
>
userRoleList
=
new
ArrayList
<>();
List
<
RoleModel
>
userRoleList
=
new
ArrayList
<>();
...
@@ -114,13 +119,13 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -114,13 +119,13 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
roleSeqMap
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userDataZHDto
.
getRole
());
roleSeqMap
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userDataZHDto
.
getRole
());
orgRoles
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userRoleList
);
orgRoles
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userRoleList
);
// agencyUserModel.setAppCodes(split);
// agencyUserModel.setAppCodes(split);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
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
());
}
}
List
<
String
>
userId
=
new
ArrayList
<>();
List
<
String
>
userId
=
new
ArrayList
<>();
userId
.
add
(
userResult
.
getResult
().
getUserId
());
userId
.
add
(
userResult
.
getResult
().
getUserId
());
...
@@ -130,7 +135,7 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -130,7 +135,7 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
//新增人员基础信息表
//新增人员基础信息表
PublicAgencyUser
publicAgencyUser
=
new
PublicAgencyUser
();
PublicAgencyUser
publicAgencyUser
=
new
PublicAgencyUser
();
publicAgencyUser
.
setRealName
(
userDataJBDto
.
getRealName
());
publicAgencyUser
.
setRealName
(
userDataJBDto
.
getRealName
());
publicAgencyUser
.
setGender
(
userDataJBDto
.
getGender
());
publicAgencyUser
.
setGender
(
userDataJBDto
.
getGender
());
publicAgencyUser
.
setJobNumber
(
userDataJBDto
.
getJobNumber
());
publicAgencyUser
.
setJobNumber
(
userDataJBDto
.
getJobNumber
());
...
@@ -139,35 +144,35 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -139,35 +144,35 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
publicAgencyUser
.
setAmosId
(
userDataJBDto
.
getAmosUnitId
());
publicAgencyUser
.
setAmosId
(
userDataJBDto
.
getAmosUnitId
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
seleteOne
(
userDataJBDto
.
getAmosUnitId
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
seleteOne
(
userDataJBDto
.
getAmosUnitId
());
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"新增人员失败!"
+
companyResult
.
getDevMessage
());
throw
new
BadRequest
(
"新增人员失败!"
+
companyResult
.
getDevMessage
());
}
}
publicAgencyUser
.
setAmosOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
publicAgencyUser
.
setAmosOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
publicAgencyUser
.
setAmosUserId
(
userResult
.
getResult
().
getUserId
());
publicAgencyUser
.
setAmosUserId
(
userResult
.
getResult
().
getUserId
());
publicAgencyUser
.
setAmosUserName
(
userDataZHDto
.
getUserName
());
publicAgencyUser
.
setAmosUserName
(
userDataZHDto
.
getUserName
());
publicAgencyUser
.
setPassword
(
DesUtil
.
encode
(
userDataZHDto
.
getPassword
(),
secretKey
));
publicAgencyUser
.
setPassword
(
DesUtil
.
encode
(
userDataZHDto
.
getPassword
(),
secretKey
));
publicAgencyUser
.
setRole
(
JSON
.
toJSONString
(
userDataZHDto
.
getRole
()));
publicAgencyUser
.
setRole
(
JSON
.
toJSONString
(
userDataZHDto
.
getRole
()));
publicAgencyUser
.
setLockStatus
(
"UNLOCK"
);
publicAgencyUser
.
setLockStatus
(
"UNLOCK"
);
publicAgencyUser
.
setLockTime
(
new
Date
());
publicAgencyUser
.
setLockTime
(
new
Date
());
publicAgencyUser
.
setHeight
(
userDataJBDto
.
getHeight
());
publicAgencyUser
.
setHeight
(
userDataJBDto
.
getHeight
());
publicAgencyUser
.
setWeight
(
userDataJBDto
.
getWeight
());
publicAgencyUser
.
setWeight
(
userDataJBDto
.
getWeight
());
publicAgencyUser
.
setEmergencyTelephone
(
userDataJBDto
.
getEmergencyTelephone
());
publicAgencyUser
.
setEmergencyTelephone
(
userDataJBDto
.
getEmergencyTelephone
());
publicAgencyUser
.
setDomicileAddress
(
userDataJBDto
.
getDomicileAddress
());
publicAgencyUser
.
setDomicileAddress
(
userDataJBDto
.
getDomicileAddress
());
publicAgencyUser
.
setPosition
(
userDataJBDto
.
getPosition
()
!=
null
?
JSON
.
toJSONString
(
userDataJBDto
.
getPosition
()):
null
);
publicAgencyUser
.
setPosition
(
userDataJBDto
.
getPosition
()
!=
null
?
JSON
.
toJSONString
(
userDataJBDto
.
getPosition
())
:
null
);
publicAgencyUser
.
setNowAddress
(
userDataJBDto
.
getNowAddress
());
publicAgencyUser
.
setNowAddress
(
userDataJBDto
.
getNowAddress
());
publicAgencyUser
.
setNativePlace
(
userDataJBDto
.
getNativePlace
());
publicAgencyUser
.
setNativePlace
(
userDataJBDto
.
getNativePlace
());
publicAgencyUser
.
setPoliticalOutlook
(
userDataJBDto
.
getPoliticalOutlook
());
publicAgencyUser
.
setPoliticalOutlook
(
userDataJBDto
.
getPoliticalOutlook
());
publicAgencyUserMapper
.
insert
(
publicAgencyUser
);
publicAgencyUserMapper
.
insert
(
publicAgencyUser
);
PersonnelBusiness
re
=
new
PersonnelBusiness
();
PersonnelBusiness
re
=
new
PersonnelBusiness
();
FeignClientResult
<
CompanyModel
>
companyResult1
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
FeignClientResult
<
CompanyModel
>
companyResult1
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
if
(
companyResult1
==
null
||
companyResult1
.
getStatus
()
!=
200
)
{
if
(
companyResult1
==
null
||
companyResult1
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"新增人员失败!"
+
companyResult1
.
getDevMessage
());
throw
new
BadRequest
(
"新增人员失败!"
+
companyResult1
.
getDevMessage
());
}
}
re
.
setRegionalCompaniesSeq
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
re
.
setRegionalCompaniesSeq
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
re
.
setRegionalCompaniesName
(
companyResult1
.
getResult
().
getCompanyName
());
re
.
setRegionalCompaniesName
(
companyResult1
.
getResult
().
getCompanyName
());
re
.
setRegionalCompaniesCode
(
companyResult1
.
getResult
().
getOrgCode
());
re
.
setRegionalCompaniesCode
(
companyResult1
.
getResult
().
getOrgCode
());
re
.
setCertificate
(
model
.
getUserDataZZDto
()
!=
null
?
JSON
.
toJSONString
(
model
.
getUserDataZZDto
().
getCertificate
()):
null
);
re
.
setCertificate
(
model
.
getUserDataZZDto
()
!=
null
?
JSON
.
toJSONString
(
model
.
getUserDataZZDto
().
getCertificate
())
:
null
);
re
.
setAmosUnitId
(
companyResult
.
getResult
().
getSequenceNbr
());
re
.
setAmosUnitId
(
companyResult
.
getResult
().
getSequenceNbr
());
re
.
setAmosUnitName
(
companyResult
.
getResult
().
getCompanyName
());
re
.
setAmosUnitName
(
companyResult
.
getResult
().
getCompanyName
());
re
.
setAmosUnitOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
re
.
setAmosUnitOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
...
@@ -176,8 +181,8 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -176,8 +181,8 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
personnelBusinessMapper
.
insert
(
re
);
personnelBusinessMapper
.
insert
(
re
);
//增加人员权限
//增加人员权限
List
<
String
>
lisk
=
new
ArrayList
<>();
List
<
String
>
lisk
=
new
ArrayList
<>();
StdUserEmpower
stdUserEmpower
=
new
StdUserEmpower
();
StdUserEmpower
stdUserEmpower
=
new
StdUserEmpower
();
lisk
.
add
(
re
.
getRegionalCompaniesCode
());
lisk
.
add
(
re
.
getRegionalCompaniesCode
());
stdUserEmpower
.
setAmosUserId
(
publicAgencyUser
.
getAmosUserId
());
stdUserEmpower
.
setAmosUserId
(
publicAgencyUser
.
getAmosUserId
());
...
@@ -186,10 +191,7 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -186,10 +191,7 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
userEmpowerMapper
.
insert
(
stdUserEmpower
);
userEmpowerMapper
.
insert
(
stdUserEmpower
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
){
if
(
userResult
!=
null
&&
userResult
.
getResult
()
!=
null
if
(
userResult
!=
null
&&
userResult
.
getResult
()
!=
null
&&
StringUtils
.
isNotEmpty
(
userResult
.
getResult
().
getUserId
()))
{
&&
StringUtils
.
isNotEmpty
(
userResult
.
getResult
().
getUserId
()))
{
Privilege
.
agencyUserClient
.
multDeleteUser
(
userResult
.
getResult
().
getUserId
());
Privilege
.
agencyUserClient
.
multDeleteUser
(
userResult
.
getResult
().
getUserId
());
...
@@ -202,20 +204,20 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -202,20 +204,20 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
@Transactional
@Transactional
public
void
updatePersonnelBusiness
(
UserDataDto
model
,
long
id
)
{
public
void
updatePersonnelBusiness
(
UserDataDto
model
,
long
id
)
{
PublicAgencyUser
publicAgencyUser
=
publicAgencyUserMapper
.
selectById
(
id
);
PublicAgencyUser
publicAgencyUser
=
publicAgencyUserMapper
.
selectById
(
id
);
UserDataZHDto
userDataZHDto
=
model
.
getUserDataZHDto
();
UserDataZHDto
userDataZHDto
=
model
.
getUserDataZHDto
();
UserDataJBDto
userDataJBDto
=
model
.
getUserDataJBDto
();
UserDataJBDto
userDataJBDto
=
model
.
getUserDataJBDto
();
FeignClientResult
<
AgencyUserModel
>
userResult
=
null
;
FeignClientResult
<
AgencyUserModel
>
userResult
=
null
;
try
{
try
{
List
<
Long
>
newRole
=
userDataZHDto
.
getRole
();
List
<
Long
>
newRole
=
userDataZHDto
.
getRole
();
List
<
Long
>
oldRole
=
JSONArray
.
parseArray
(
publicAgencyUser
.
getRole
(),
Long
.
class
);
List
<
Long
>
oldRole
=
JSONArray
.
parseArray
(
publicAgencyUser
.
getRole
(),
Long
.
class
);
for
(
Long
item
:
oldRole
)
{
for
(
Long
item
:
oldRole
)
{
if
(!
newRole
.
contains
(
item
))
{
if
(!
newRole
.
contains
(
item
))
{
throw
new
BadRequest
(
"角色只能增加, 不能删除"
);
throw
new
BadRequest
(
"角色只能增加, 不能删除"
);
}
}
}
}
...
@@ -238,9 +240,9 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -238,9 +240,9 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
// 将创建用户加入用户组
// 将创建用户加入用户组
userResult
=
Privilege
.
agencyUserClient
.
update
(
agencyUserModel
,
publicAgencyUser
.
getAmosUserId
());
userResult
=
Privilege
.
agencyUserClient
.
update
(
agencyUserModel
,
publicAgencyUser
.
getAmosUserId
());
if
(
userResult
==
null
||
userResult
.
getStatus
()
!=
200
)
{
if
(
userResult
==
null
||
userResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"修改人员失败!"
+
userResult
.
getDevMessage
());
throw
new
BadRequest
(
"修改人员失败!"
+
userResult
.
getDevMessage
());
}
}
List
<
String
>
userId
=
new
ArrayList
<>();
List
<
String
>
userId
=
new
ArrayList
<>();
userId
.
add
(
userResult
.
getResult
().
getUserId
());
userId
.
add
(
userResult
.
getResult
().
getUserId
());
...
@@ -258,56 +260,56 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -258,56 +260,56 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
publicAgencyUser
.
setAmosId
(
userDataJBDto
.
getAmosUnitId
());
publicAgencyUser
.
setAmosId
(
userDataJBDto
.
getAmosUnitId
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
seleteOne
(
userDataJBDto
.
getAmosUnitId
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
seleteOne
(
userDataJBDto
.
getAmosUnitId
());
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"修改人员失败!"
+
companyResult
.
getDevMessage
());
throw
new
BadRequest
(
"修改人员失败!"
+
companyResult
.
getDevMessage
());
}
}
publicAgencyUser
.
setAmosOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
publicAgencyUser
.
setAmosOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
publicAgencyUser
.
setAmosUserName
(
userDataZHDto
.
getUserName
());
publicAgencyUser
.
setAmosUserName
(
userDataZHDto
.
getUserName
());
publicAgencyUser
.
setPassword
(
DesUtil
.
encode
(
userDataZHDto
.
getPassword
(),
secretKey
));
publicAgencyUser
.
setPassword
(
DesUtil
.
encode
(
userDataZHDto
.
getPassword
(),
secretKey
));
publicAgencyUser
.
setRole
(
JSON
.
toJSONString
(
userDataZHDto
.
getRole
()));
publicAgencyUser
.
setRole
(
JSON
.
toJSONString
(
userDataZHDto
.
getRole
()));
publicAgencyUser
.
setLockStatus
(
"UNLOCK"
);
publicAgencyUser
.
setLockStatus
(
"UNLOCK"
);
publicAgencyUser
.
setLockTime
(
new
Date
());
publicAgencyUser
.
setLockTime
(
new
Date
());
publicAgencyUser
.
setHeight
(
userDataJBDto
.
getHeight
());
publicAgencyUser
.
setHeight
(
userDataJBDto
.
getHeight
());
publicAgencyUser
.
setWeight
(
userDataJBDto
.
getWeight
());
publicAgencyUser
.
setWeight
(
userDataJBDto
.
getWeight
());
publicAgencyUser
.
setEmergencyTelephone
(
userDataJBDto
.
getEmergencyTelephone
());
publicAgencyUser
.
setEmergencyTelephone
(
userDataJBDto
.
getEmergencyTelephone
());
publicAgencyUser
.
setDomicileAddress
(
userDataJBDto
.
getDomicileAddress
());
publicAgencyUser
.
setDomicileAddress
(
userDataJBDto
.
getDomicileAddress
());
publicAgencyUser
.
setPosition
(
userDataJBDto
.
getPosition
()
!=
null
?
JSON
.
toJSONString
(
userDataJBDto
.
getPosition
()):
null
);
publicAgencyUser
.
setPosition
(
userDataJBDto
.
getPosition
()
!=
null
?
JSON
.
toJSONString
(
userDataJBDto
.
getPosition
())
:
null
);
publicAgencyUser
.
setNowAddress
(
userDataJBDto
.
getNowAddress
());
publicAgencyUser
.
setNowAddress
(
userDataJBDto
.
getNowAddress
());
publicAgencyUser
.
setNativePlace
(
userDataJBDto
.
getNativePlace
());
publicAgencyUser
.
setNativePlace
(
userDataJBDto
.
getNativePlace
());
publicAgencyUser
.
setPoliticalOutlook
(
userDataJBDto
.
getPoliticalOutlook
());
publicAgencyUser
.
setPoliticalOutlook
(
userDataJBDto
.
getPoliticalOutlook
());
publicAgencyUserMapper
.
updateById
(
publicAgencyUser
);
publicAgencyUserMapper
.
updateById
(
publicAgencyUser
);
LambdaQueryWrapper
<
PersonnelBusiness
>
qug
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PersonnelBusiness
>
qug
=
new
LambdaQueryWrapper
<>();
qug
.
eq
(
PersonnelBusiness:
:
getFoundationId
,
publicAgencyUser
.
getSequenceNbr
());
qug
.
eq
(
PersonnelBusiness:
:
getFoundationId
,
publicAgencyUser
.
getSequenceNbr
());
PersonnelBusiness
re
=
personnelBusinessMapper
.
selectOne
(
qug
);
PersonnelBusiness
re
=
personnelBusinessMapper
.
selectOne
(
qug
);
FeignClientResult
<
CompanyModel
>
companyResult1
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
FeignClientResult
<
CompanyModel
>
companyResult1
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
if
(
companyResult1
==
null
||
companyResult1
.
getStatus
()
!=
200
)
{
if
(
companyResult1
==
null
||
companyResult1
.
getStatus
()
!=
200
)
{
throw
new
BadRequest
(
"修改人员失败!"
+
companyResult1
.
getDevMessage
());
throw
new
BadRequest
(
"修改人员失败!"
+
companyResult1
.
getDevMessage
());
}
}
re
.
setRegionalCompaniesSeq
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
re
.
setRegionalCompaniesSeq
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
re
.
setRegionalCompaniesName
(
companyResult1
.
getResult
().
getCompanyName
());
re
.
setRegionalCompaniesName
(
companyResult1
.
getResult
().
getCompanyName
());
re
.
setRegionalCompaniesCode
(
companyResult1
.
getResult
().
getOrgCode
());
re
.
setRegionalCompaniesCode
(
companyResult1
.
getResult
().
getOrgCode
());
re
.
setCertificate
(
model
.
getUserDataZZDto
()
!=
null
?
JSON
.
toJSONString
(
model
.
getUserDataZZDto
().
getCertificate
()):
null
);
re
.
setCertificate
(
model
.
getUserDataZZDto
()
!=
null
?
JSON
.
toJSONString
(
model
.
getUserDataZZDto
().
getCertificate
())
:
null
);
re
.
setAmosUnitId
(
companyResult
.
getResult
().
getSequenceNbr
());
re
.
setAmosUnitId
(
companyResult
.
getResult
().
getSequenceNbr
());
re
.
setAmosUnitName
(
companyResult
.
getResult
().
getCompanyName
());
re
.
setAmosUnitName
(
companyResult
.
getResult
().
getCompanyName
());
re
.
setAmosUnitOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
re
.
setAmosUnitOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
personnelBusinessMapper
.
updateById
(
re
);
personnelBusinessMapper
.
updateById
(
re
);
//增加人员权限
//增加人员权限
List
<
String
>
lisk
=
new
ArrayList
<>();
List
<
String
>
lisk
=
new
ArrayList
<>();
LambdaQueryWrapper
<
StdUserEmpower
>
uo
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
StdUserEmpower
>
uo
=
new
LambdaQueryWrapper
();
uo
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
publicAgencyUser
.
getAmosUserId
());
uo
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
publicAgencyUser
.
getAmosUserId
());
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
uo
);
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
uo
);
// lisk.add(publicAgencyUser.getAmosOrgCode());
// lisk.add(publicAgencyUser.getAmosOrgCode());
lisk
.
add
(
re
.
getRegionalCompaniesCode
());
lisk
.
add
(
re
.
getRegionalCompaniesCode
());
if
(
stdUserEmpower
!=
null
)
{
if
(
stdUserEmpower
!=
null
)
{
stdUserEmpower
.
setAmosUserId
(
publicAgencyUser
.
getAmosUserId
());
stdUserEmpower
.
setAmosUserId
(
publicAgencyUser
.
getAmosUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
}
else
{
}
else
{
stdUserEmpower
=
new
StdUserEmpower
();
stdUserEmpower
=
new
StdUserEmpower
();
stdUserEmpower
.
setAmosUserId
(
publicAgencyUser
.
getAmosUserId
());
stdUserEmpower
.
setAmosUserId
(
publicAgencyUser
.
getAmosUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
stdUserEmpower
.
setPermissionType
(
"HYGF"
);
stdUserEmpower
.
setPermissionType
(
"HYGF"
);
...
@@ -315,11 +317,7 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -315,11 +317,7 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
BadRequest
(
e
.
getMessage
());
throw
new
BadRequest
(
e
.
getMessage
());
...
@@ -328,48 +326,40 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -328,48 +326,40 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
}
}
@Transactional
@Transactional
public
void
replace
(
String
id
){
public
void
replace
(
String
id
)
{
try
{
try
{
//获取当前用户
//获取当前用户
LambdaQueryWrapper
<
PublicAgencyUser
>
qud
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PublicAgencyUser
>
qud
=
new
LambdaQueryWrapper
<>();
qud
.
eq
(
PublicAgencyUser:
:
getSequenceNbr
,
id
);
qud
.
eq
(
PublicAgencyUser:
:
getSequenceNbr
,
id
);
PublicAgencyUser
publicAgencyUse
=
publicAgencyUserMapper
.
selectOne
(
qud
);
PublicAgencyUser
publicAgencyUse
=
publicAgencyUserMapper
.
selectOne
(
qud
);
LambdaQueryWrapper
<
PersonnelBusiness
>
qug
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PersonnelBusiness
>
qug
=
new
LambdaQueryWrapper
<>();
qug
.
eq
(
PersonnelBusiness:
:
getFoundationId
,
publicAgencyUse
.
getSequenceNbr
());
qug
.
eq
(
PersonnelBusiness:
:
getFoundationId
,
publicAgencyUse
.
getSequenceNbr
());
PersonnelBusiness
personnelBusines
=
personnelBusinessMapper
.
selectOne
(
qug
);
PersonnelBusiness
personnelBusines
=
personnelBusinessMapper
.
selectOne
(
qug
);
personnelBusines
.
setUserType
(
"2"
);
personnelBusines
.
setUserType
(
"2"
);
personnelBusinessMapper
.
updateById
(
personnelBusines
);
personnelBusinessMapper
.
updateById
(
personnelBusines
);
//获取经销商管理员
//获取经销商管理员
LambdaQueryWrapper
<
UnitInfo
>
qudg
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
UnitInfo
>
qudg
=
new
LambdaQueryWrapper
<>();
qudg
.
eq
(
UnitInfo:
:
getAmosCompanySeq
,
personnelBusines
.
getAmosDealerId
());
qudg
.
eq
(
UnitInfo:
:
getAmosCompanySeq
,
personnelBusines
.
getAmosDealerId
());
UnitInfo
unitInfo
=
unitInfoMapper
.
selectOne
(
qudg
);
UnitInfo
unitInfo
=
unitInfoMapper
.
selectOne
(
qudg
);
LambdaQueryWrapper
<
PublicAgencyUser
>
qudx
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PublicAgencyUser
>
qudx
=
new
LambdaQueryWrapper
<>();
qudx
.
eq
(
PublicAgencyUser:
:
getAmosUserId
,
unitInfo
.
getAdminUserId
());
qudx
.
eq
(
PublicAgencyUser:
:
getAmosUserId
,
unitInfo
.
getAdminUserId
());
PublicAgencyUser
publicAgencyUsex
=
publicAgencyUserMapper
.
selectOne
(
qudx
);
PublicAgencyUser
publicAgencyUsex
=
publicAgencyUserMapper
.
selectOne
(
qudx
);
LambdaQueryWrapper
<
PersonnelBusiness
>
qugf
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PersonnelBusiness
>
qugf
=
new
LambdaQueryWrapper
<>();
qugf
.
eq
(
PersonnelBusiness:
:
getFoundationId
,
publicAgencyUsex
.
getSequenceNbr
());
qugf
.
eq
(
PersonnelBusiness:
:
getFoundationId
,
publicAgencyUsex
.
getSequenceNbr
());
PersonnelBusiness
personnelBusinesx
=
personnelBusinessMapper
.
selectOne
(
qugf
);
PersonnelBusiness
personnelBusinesx
=
personnelBusinessMapper
.
selectOne
(
qugf
);
personnelBusinesx
.
setUserType
(
"1"
);
personnelBusinesx
.
setUserType
(
"1"
);
personnelBusinessMapper
.
updateById
(
personnelBusinesx
);
personnelBusinessMapper
.
updateById
(
personnelBusinesx
);
unitInfo
.
setAdminLoginName
(
publicAgencyUse
.
getAmosUserName
());
unitInfo
.
setAdminLoginName
(
publicAgencyUse
.
getAmosUserName
());
unitInfo
.
setAdminPhone
(
publicAgencyUse
.
getEmergencyTelephone
());
unitInfo
.
setAdminPhone
(
publicAgencyUse
.
getEmergencyTelephone
());
unitInfo
.
setAdminUserId
(
publicAgencyUse
.
getAmosUserId
());
unitInfo
.
setAdminUserId
(
publicAgencyUse
.
getAmosUserId
());
unitInfo
.
setAdminUserName
(
publicAgencyUse
.
getRealName
());
unitInfo
.
setAdminUserName
(
publicAgencyUse
.
getRealName
());
unitInfoMapper
.
updateById
(
unitInfo
);
unitInfoMapper
.
updateById
(
unitInfo
);
//修改管理员
//修改管理员
List
<
Long
>
roidx
=
JSONArray
.
parseArray
(
publicAgencyUsex
.
getRole
(),
Long
.
class
);
List
<
Long
>
roidx
=
JSONArray
.
parseArray
(
publicAgencyUsex
.
getRole
(),
Long
.
class
);
//修改平台用户
//修改平台用户
...
@@ -377,43 +367,42 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -377,43 +367,42 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
userId
.
add
(
publicAgencyUse
.
getAmosUserId
());
userId
.
add
(
publicAgencyUse
.
getAmosUserId
());
System
.
out
.
println
(
"删除旧管理员===================================:"
+
publicAgencyUsex
.
getAmosUserId
());
System
.
out
.
println
(
"删除旧管理员===================================:"
+
publicAgencyUsex
.
getAmosUserId
());
List
<
String
>
userId1
=
new
ArrayList
<>();
List
<
String
>
userId1
=
new
ArrayList
<>();
if
(
roidx
!=
null
&&!
roidx
.
isEmpty
()&&
roidx
.
size
()==
1
&&
roidx
.
get
(
0
).
longValue
()==
userGroupId
)
{
if
(
roidx
!=
null
&&
!
roidx
.
isEmpty
()
&&
roidx
.
size
()
==
1
&&
roidx
.
get
(
0
).
longValue
()
==
userGroupId
)
{
//新增空角色防止单位丢失
//新增空角色防止单位丢失
userId1
.
add
(
publicAgencyUsex
.
getAmosUserId
());
userId1
.
add
(
publicAgencyUsex
.
getAmosUserId
());
Privilege
.
groupUserClient
.
create
(
userGroupempty
,
userId1
);
Privilege
.
groupUserClient
.
create
(
userGroupempty
,
userId1
);
}
}
//删除旧管理员
//删除旧管理员
Privilege
.
groupUserClient
.
deleteGroupUser
(
userGroupId
,
publicAgencyUsex
.
getAmosUserId
());
Privilege
.
groupUserClient
.
deleteGroupUser
(
userGroupId
,
publicAgencyUsex
.
getAmosUserId
());
// 1 修改平台用户
// 1 修改平台用户
Privilege
.
groupUserClient
.
create
(
userGroupId
,
userId
);
Privilege
.
groupUserClient
.
create
(
userGroupId
,
userId
);
System
.
out
.
println
(
"新增角色用户===================================:"
+
userId
);
System
.
out
.
println
(
"新增角色用户===================================:"
+
userId
);
//修改权限
//修改权限
if
(
roidx
==
null
)
{
if
(
roidx
==
null
)
{
publicAgencyUsex
.
setRole
(
null
);
publicAgencyUsex
.
setRole
(
null
);
}
else
{
}
else
{
roidx
.
remove
(
userGroupId
);
roidx
.
remove
(
userGroupId
);
publicAgencyUsex
.
setRole
(
CollectionUtil
.
isEmpty
(
roidx
)
?
JSON
.
toJSONString
(
Arrays
.
asList
(
userGroupempty
)):
JSON
.
toJSONString
(
roidx
));
publicAgencyUsex
.
setRole
(
CollectionUtil
.
isEmpty
(
roidx
)
?
JSON
.
toJSONString
(
Arrays
.
asList
(
userGroupempty
))
:
JSON
.
toJSONString
(
roidx
));
}
}
//修改当前用户角色权限
//修改当前用户角色权限
List
<
Long
>
roid
=
JSONArray
.
parseArray
(
publicAgencyUse
.
getRole
(),
Long
.
class
);
List
<
Long
>
roid
=
JSONArray
.
parseArray
(
publicAgencyUse
.
getRole
(),
Long
.
class
);
if
(
roid
==
null
)
{
if
(
roid
==
null
)
{
roid
=
new
ArrayList
<>();
roid
=
new
ArrayList
<>();
}
}
roid
.
add
(
userGroupId
);
roid
.
add
(
userGroupId
);
if
(
roid
.
contains
(
userGroupempty
)){
if
(
roid
.
contains
(
userGroupempty
))
{
roid
.
remove
(
userGroupempty
);
roid
.
remove
(
userGroupempty
);
Privilege
.
groupUserClient
.
deleteGroupUser
(
userGroupempty
,
publicAgencyUsex
.
getAmosUserId
());
Privilege
.
groupUserClient
.
deleteGroupUser
(
userGroupempty
,
publicAgencyUsex
.
getAmosUserId
());
}
}
publicAgencyUse
.
setRole
(
JSON
.
toJSONString
(
roid
));
publicAgencyUse
.
setRole
(
JSON
.
toJSONString
(
roid
));
...
@@ -421,58 +410,51 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -421,58 +410,51 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
publicAgencyUserMapper
.
updateById
(
publicAgencyUse
);
publicAgencyUserMapper
.
updateById
(
publicAgencyUse
);
//旧管理员去除
List
<
String
>
li
=
null
;
LambdaQueryWrapper
<
StdUserEmpower
>
uo
=
new
LambdaQueryWrapper
();
uo
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
publicAgencyUsex
.
getAmosUserId
());
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
uo
);
li
=
stdUserEmpower
.
getAmosOrgCode
();
if
(
stdUserEmpower
!=
null
)
{
stdUserEmpower
.
setAmosOrgCode
(
null
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
}
else
{
//旧管理员去除
stdUserEmpower
=
new
StdUserEmpower
();
List
<
String
>
li
=
null
;
stdUserEmpower
.
setAmosOrgCode
(
null
);
LambdaQueryWrapper
<
StdUserEmpower
>
uo
=
new
LambdaQueryWrapper
();
stdUserEmpower
.
setPermissionType
(
"HYGF"
);
uo
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
publicAgencyUsex
.
getAmosUserId
());
stdUserEmpower
.
setAmosUserId
(
publicAgencyUsex
.
getAmosUserId
());
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
uo
);
userEmpowerMapper
.
insert
(
stdUserEmpower
);
li
=
stdUserEmpower
.
getAmosOrgCode
();
}
if
(
stdUserEmpower
!=
null
){
stdUserEmpower
.
setAmosOrgCode
(
null
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
}
else
{
stdUserEmpower
=
new
StdUserEmpower
();
stdUserEmpower
.
setAmosOrgCode
(
null
);
stdUserEmpower
.
setPermissionType
(
"HYGF"
);
stdUserEmpower
.
setAmosUserId
(
publicAgencyUsex
.
getAmosUserId
());
userEmpowerMapper
.
insert
(
stdUserEmpower
);
}
//新管理员新增
LambdaQueryWrapper
<
StdUserEmpower
>
uo1
=
new
LambdaQueryWrapper
();
uo1
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
publicAgencyUse
.
getAmosUserId
());
StdUserEmpower
stdUserEmpower1
=
userEmpowerMapper
.
selectOne
(
uo1
);
if
(
stdUserEmpower1
!=
null
){
//新管理员新增
stdUserEmpower1
.
setAmosOrgCode
(
li
);
LambdaQueryWrapper
<
StdUserEmpower
>
uo1
=
new
LambdaQueryWrapper
();
userEmpowerMapper
.
updateById
(
stdUserEmpower1
);
uo1
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
publicAgencyUse
.
getAmosUserId
());
StdUserEmpower
stdUserEmpower1
=
userEmpowerMapper
.
selectOne
(
uo1
);
}
else
{
stdUserEmpower1
=
new
StdUserEmpower
();
stdUserEmpower1
.
setAmosOrgCode
(
li
);
stdUserEmpower1
.
setPermissionType
(
"HYGF"
);
stdUserEmpower1
.
setAmosUserId
(
publicAgencyUse
.
getAmosUserId
());
userEmpowerMapper
.
insert
(
stdUserEmpower1
);
}
if
(
stdUserEmpower1
!=
null
)
{
stdUserEmpower1
.
setAmosOrgCode
(
li
);
userEmpowerMapper
.
updateById
(
stdUserEmpower1
);
}
else
{
stdUserEmpower1
=
new
StdUserEmpower
();
stdUserEmpower1
.
setAmosOrgCode
(
li
);
stdUserEmpower1
.
setPermissionType
(
"HYGF"
);
stdUserEmpower1
.
setAmosUserId
(
publicAgencyUse
.
getAmosUserId
());
userEmpowerMapper
.
insert
(
stdUserEmpower1
);
}
UserMessage
userMessage
=
new
UserMessage
(
TaskTypeStationEnum
.
设置管理员
.
getCode
(),
personnelBusines
.
getSequenceNbr
()
,
publicAgencyUse
.
getAmosUserId
(),
new
Date
(),
"您已成为单位管理员。"
,
personnelBusines
.
getAmosUnitOrgCode
());
UserMessage
userMessage
=
new
UserMessage
(
TaskTypeStationEnum
.
设置管理员
.
getCode
(),
personnelBusines
.
getSequenceNbr
(),
publicAgencyUse
.
getAmosUserId
(),
new
Date
(),
"您已成为单位管理员。"
,
personnelBusines
.
getAmosUnitOrgCode
());
userMessageMapper
.
insert
(
userMessage
);
userMessageMapper
.
insert
(
userMessage
);
emqKeeper
.
getMqttClient
().
publish
(
"MY_MESSAGE"
,
JSON
.
toJSONString
(
userMessage
).
getBytes
(),
2
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
"MY_MESSAGE"
,
JSON
.
toJSONString
(
userMessage
).
getBytes
(),
2
,
false
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
BadRequest
(
"设置失败!"
);
throw
new
BadRequest
(
"设置失败!"
);
}
}
...
@@ -480,27 +462,27 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -480,27 +462,27 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
@Override
@Override
public
UserDataDto
getPersonnelBusinessById
(
String
id
)
{
public
UserDataDto
getPersonnelBusinessById
(
String
id
)
{
LambdaQueryWrapper
<
PublicAgencyUser
>
qud
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PublicAgencyUser
>
qud
=
new
LambdaQueryWrapper
<>();
qud
.
eq
(
PublicAgencyUser:
:
getSequenceNbr
,
id
);
qud
.
eq
(
PublicAgencyUser:
:
getSequenceNbr
,
id
);
PublicAgencyUser
publicAgencyUse
=
publicAgencyUserMapper
.
selectOne
(
qud
);
PublicAgencyUser
publicAgencyUse
=
publicAgencyUserMapper
.
selectOne
(
qud
);
LambdaQueryWrapper
<
PersonnelBusiness
>
qug
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PersonnelBusiness
>
qug
=
new
LambdaQueryWrapper
<>();
qug
.
eq
(
PersonnelBusiness:
:
getFoundationId
,
publicAgencyUse
.
getSequenceNbr
());
qug
.
eq
(
PersonnelBusiness:
:
getFoundationId
,
publicAgencyUse
.
getSequenceNbr
());
PersonnelBusiness
personnelBusines
=
personnelBusinessMapper
.
selectOne
(
qug
);
PersonnelBusiness
personnelBusines
=
personnelBusinessMapper
.
selectOne
(
qug
);
UserDataZHDto
userDataZHDto
=
new
UserDataZHDto
();
UserDataZHDto
userDataZHDto
=
new
UserDataZHDto
();
UserDataJBDto
userDataJBDto
=
new
UserDataJBDto
();
UserDataJBDto
userDataJBDto
=
new
UserDataJBDto
();
UserDataZZDto
userDataZZDto
=
new
UserDataZZDto
();
UserDataZZDto
userDataZZDto
=
new
UserDataZZDto
();
userDataZZDto
.
setCertificate
(
personnelBusines
.
getCertificate
()
!=
null
?
JSONArray
.
parseArray
(
personnelBusines
.
getCertificate
(),
JSONObject
.
class
):
null
);
userDataZZDto
.
setCertificate
(
personnelBusines
.
getCertificate
()
!=
null
?
JSONArray
.
parseArray
(
personnelBusines
.
getCertificate
(),
JSONObject
.
class
)
:
null
);
userDataZHDto
.
setRole
(
JSONArray
.
parseArray
(
publicAgencyUse
.
getRole
(),
long
.
class
));
userDataZHDto
.
setRole
(
JSONArray
.
parseArray
(
publicAgencyUse
.
getRole
(),
long
.
class
));
userDataZHDto
.
setUserName
(
publicAgencyUse
.
getAmosUserName
());
userDataZHDto
.
setUserName
(
publicAgencyUse
.
getAmosUserName
());
BeanUtils
.
copyProperties
(
publicAgencyUse
,
userDataJBDto
);
BeanUtils
.
copyProperties
(
publicAgencyUse
,
userDataJBDto
);
userDataJBDto
.
setPosition
(
JSONArray
.
parseArray
(
publicAgencyUse
.
getPosition
(),
String
.
class
));
userDataJBDto
.
setPosition
(
JSONArray
.
parseArray
(
publicAgencyUse
.
getPosition
(),
String
.
class
));
userDataJBDto
.
setRegionalCompaniesSeq
(
personnelBusines
.
getRegionalCompaniesSeq
()
!=
null
?
personnelBusines
.
getRegionalCompaniesSeq
().
toString
():
null
);
userDataJBDto
.
setRegionalCompaniesSeq
(
personnelBusines
.
getRegionalCompaniesSeq
()
!=
null
?
personnelBusines
.
getRegionalCompaniesSeq
().
toString
()
:
null
);
userDataJBDto
.
setAmosUnitId
(
personnelBusines
.
getAmosUnitId
());
userDataJBDto
.
setAmosUnitId
(
personnelBusines
.
getAmosUnitId
());
Boolean
hasOperationRecords
=
hasOperationRecords
(
id
);
Boolean
hasOperationRecords
=
hasOperationRecords
(
id
);
...
@@ -517,17 +499,16 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -517,17 +499,16 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
userDataJBDto
.
setUnallowModify
(
hasOperationRecords
?
"unallow"
:
"allow"
);
userDataJBDto
.
setUnallowModify
(
hasOperationRecords
?
"unallow"
:
"allow"
);
}
}
return
new
UserDataDto
(
userDataZHDto
,
userDataJBDto
,
userDataZZDto
);
return
new
UserDataDto
(
userDataZHDto
,
userDataJBDto
,
userDataZZDto
);
}
}
/**
/**
* 用户是否有业务操作
* 用户是否有业务操作
*
*
*
* @param id id
* @param id id
* @return {@link Boolean}
* @return {@link Boolean}
* @author yangyang
* @throws
* @throws
* @author yangyang
* @date 2024/7/3 16:24
* @date 2024/7/3 16:24
*/
*/
public
Boolean
hasOperationRecords
(
String
id
)
{
public
Boolean
hasOperationRecords
(
String
id
)
{
...
@@ -598,4 +579,44 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -598,4 +579,44 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
}
}
@Override
public
Boolean
deleteBySequenceNbrs
(
String
sequenceNbrs
)
{
//根据sequenceNbr查询用户userId
if
(
StringUtils
.
isEmpty
(
sequenceNbrs
))
{
throw
new
BadRequest
(
"入参:sequenceNbrs为空"
);
}
List
<
String
>
sequenceNbrList
=
new
ArrayList
<>();
String
[]
sequenceNbrArray
=
sequenceNbrs
.
split
(
","
);
for
(
String
sequenceNbr
:
sequenceNbrArray
)
{
String
userId
=
personnelBusinessMapper
.
selectUserInfo
(
Long
.
valueOf
(
sequenceNbr
));
//添加校验,如果业务表里面有相关的用户id不能删除
List
<
String
>
tableName
=
personnelBusinessMapper
.
selectHygfTableName
();
if
(
CollectionUtil
.
isNotEmpty
(
tableName
))
{
for
(
String
table
:
tableName
)
{
int
count
=
personnelBusinessMapper
.
countByUserId
(
table
,
userId
);
if
(
count
>
0
)
{
logger
.
error
(
"sequenceNbr:{}对应的用户:{},对应的表:{}有操作记录无法删除"
,
sequenceNbr
,
userId
,
table
);
sequenceNbrList
.
add
(
sequenceNbr
);
return
false
;
}
}
}
try
{
//删除平台表账号
Privilege
.
agencyUserClient
.
multDeleteUser
(
userId
);
personnelBusinessMapper
.
deleteSubByUserId
(
userId
);
//删除hygf_personnel_business表中数据
personnelBusinessMapper
.
deleteHpbByFoundationId
(
Long
.
valueOf
(
sequenceNbr
));
//删除std_user_empower表中数据
personnelBusinessMapper
.
deleteSueByUserId
(
userId
);
return
null
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"sequenceNbr:{}对应删除失败"
,
sequenceNbr
);
sequenceNbrList
.
add
(
sequenceNbr
);
}
}
return
true
;
}
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PowerStationServiceImpl.java
View file @
595eb981
...
@@ -21,7 +21,6 @@ import com.yeejoin.amos.boot.module.hygf.biz.feign.WorkflowFeignClient;
...
@@ -21,7 +21,6 @@ import com.yeejoin.amos.boot.module.hygf.biz.feign.WorkflowFeignClient;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
View file @
595eb981
...
@@ -34,7 +34,6 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO;
...
@@ -34,7 +34,6 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
io.seata.spring.annotation.GlobalTransactional
;
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
;
...
@@ -916,7 +915,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -916,7 +915,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
}
}
@
Global
Transactional
@Transactional
public
void
uploadVoucher
(
PreparationMoney
model
,
String
instanceId
,
String
isSubmit
)
{
public
void
uploadVoucher
(
PreparationMoney
model
,
String
instanceId
,
String
isSubmit
)
{
//经销商暂存则只更新发货单属性 不进行业务推动
//经销商暂存则只更新发货单属性 不进行业务推动
if
(
"1"
.
equals
(
isSubmit
))
{
if
(
"1"
.
equals
(
isSubmit
))
{
...
@@ -1033,7 +1032,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -1033,7 +1032,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
}
}
@
Global
Transactional
@Transactional
public
void
replenishmentRollback
(
Long
sequenceNbr
)
{
public
void
replenishmentRollback
(
Long
sequenceNbr
)
{
LambdaQueryWrapper
<
HygfPreparationMoneyAuditing
>
lambda
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
HygfPreparationMoneyAuditing
>
lambda
=
new
LambdaQueryWrapper
();
lambda
.
eq
(
HygfPreparationMoneyAuditing:
:
getPreparationMoneyId
,
sequenceNbr
);
lambda
.
eq
(
HygfPreparationMoneyAuditing:
:
getPreparationMoneyId
,
sequenceNbr
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/SurveyInformationServiceImpl.java
View file @
595eb981
...
@@ -25,7 +25,6 @@ import com.yeejoin.amos.component.robot.AmosRequestContext;
...
@@ -25,7 +25,6 @@ import com.yeejoin.amos.component.robot.AmosRequestContext;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
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.GlobalTransactional
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
@@ -149,7 +148,7 @@ public class SurveyInformationServiceImpl
...
@@ -149,7 +148,7 @@ public class SurveyInformationServiceImpl
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
@
Global
Transactional
@Transactional
public
SurveyInfoAllDto
saveSurveyInfo
(
SurveyInfoAllDto
surveyInfoAllDto
,
String
operationType
)
{
public
SurveyInfoAllDto
saveSurveyInfo
(
SurveyInfoAllDto
surveyInfoAllDto
,
String
operationType
)
{
String
lockName
=
null
;
String
lockName
=
null
;
try
{
try
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/WorkflowImpl.java
View file @
595eb981
...
@@ -7,7 +7,6 @@ import com.yeejoin.amos.boot.module.hygf.biz.feign.WorkflowFeignClient;
...
@@ -7,7 +7,6 @@ import com.yeejoin.amos.boot.module.hygf.biz.feign.WorkflowFeignClient;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-dev.properties
View file @
595eb981
...
@@ -119,7 +119,7 @@ spring.security.user.password=a1234560
...
@@ -119,7 +119,7 @@ spring.security.user.password=a1234560
fire-rescue
=
123
fire-rescue
=
123
mybatis-plus.global-config.db-config.
update-strategy
=
ignored
mybatis-plus.global-config.db-config.
field-strategy
=
IGNORED
# user-amos setting : This value is the secretkey for person manage moudle accout password encryption.please don't change it!!!
# user-amos setting : This value is the secretkey for person manage moudle accout password encryption.please don't change it!!!
amos.secret.key
=
qaz
amos.secret.key
=
qaz
...
@@ -246,9 +246,3 @@ spring.elasticsearch.rest.connection-timeout=30000
...
@@ -246,9 +246,3 @@ spring.elasticsearch.rest.connection-timeout=30000
spring.elasticsearch.rest.username
=
elastic
spring.elasticsearch.rest.username
=
elastic
spring.elasticsearch.rest.password
=
123456
spring.elasticsearch.rest.password
=
123456
spring.elasticsearch.rest.read-timeout
=
30000
spring.elasticsearch.rest.read-timeout
=
30000
## 47环境 排除es报错引进无用配置 业务未实际使用es
spring.elasticsearch.rest.uris
=
http://47.92.234.253:9200
spring.elasticsearch.rest.connection-timeout
=
30000
spring.elasticsearch.rest.username
=
elastic
spring.elasticsearch.rest.password
=
123456
spring.elasticsearch.rest.read-timeout
=
30000
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-kingbase8.properties
View file @
595eb981
## DB properties:
## DB properties:
spring.datasource.dynamic.primary
=
mysql-service
spring.datasource.dynamic.primary
=
mysql-service
spring.datasource.mysql-service.driver-class-name
=
com.kingbase8.Driver
spring.datasource.mysql-service.jdbc-url
=
jdbc:kingbase8://10.20.1.176:54321/amos_project?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8¤tSchema=root
#spring.datasource.mysql-service.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.mysql-service.jdbc-url=jdbc:mysql://47.92.234.253:3306/amos_project?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.mysql-service.username
=
root
spring.datasource.mysql-service.username
=
root
spring.datasource.mysql-service.password
=
Yeejoin@2020
spring.datasource.mysql-service.password
=
Yeejoin@2020
spring.datasource.mysql-service.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.mysql-service.type
=
com.zaxxer.hikari.HikariDataSource
...
@@ -50,11 +52,11 @@ spring.datasource.tdengine-service.connection-test-query: SELECT 1
...
@@ -50,11 +52,11 @@ spring.datasource.tdengine-service.connection-test-query: SELECT 1
## eureka properties:
## eureka properties:
eureka.instance.hostname
=
10.20.1.160
eureka.instance.hostname
=
47.92.234.253
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties:
## redis properties:
spring.redis.database
=
1
spring.redis.database
=
1
spring.redis.host
=
10.20.1.210
spring.redis.host
=
47.92.234.253
spring.redis.port
=
6379
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.password
=
yeejoin@2020
...
@@ -90,7 +92,7 @@ lettuce.timeout=10000
...
@@ -90,7 +92,7 @@ lettuce.timeout=10000
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://
10.20.1.210
:2883
emqx.broker
=
tcp://
47.92.234.253
:2883
emqx.user-name
=
admin
emqx.user-name
=
admin
emqx.password
=
public
emqx.password
=
public
emqx.max-inflight
=
1000
emqx.max-inflight
=
1000
...
@@ -125,7 +127,7 @@ amos.secret.key=qaz
...
@@ -125,7 +127,7 @@ amos.secret.key=qaz
# if your service can't be access ,you can use this setting , you need change ip as your.
# if your service can't be access ,you can use this setting , you need change ip as your.
#eureka.instance.prefer-ip-address=true
#eureka.instance.prefer-ip-address=true
#eureka.instance.ip-address=172.16.3.122
#eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url
=
tcp://
10.20.1.210
:61616
spring.activemq.broker-url
=
tcp://
47.92.234.253
:61616
spring.activemq.user
=
admin
spring.activemq.user
=
admin
spring.activemq.password
=
admin
spring.activemq.password
=
admin
spring.jms.pub-sub-domain
=
false
spring.jms.pub-sub-domain
=
false
...
@@ -231,12 +233,18 @@ dealer.amosDealerId=1767820997374775298
...
@@ -231,12 +233,18 @@ dealer.amosDealerId=1767820997374775298
#Seata Config
#Seata Config
seata.tx-service-group
=
hygf-seata
seata.tx-service-group
=
hygf-seata
seata.service.grouplist.hygf-seata
=
47.92.234.253
:8091
seata.service.grouplist.hygf-seata
=
172.16.0.29
:8091
# Seata 配置
# Seata 配置
seata.enabled
=
true
seata.enabled
=
true
seata.enable-auto-data-source-proxy
=
false
seata.enable-auto-data-source-proxy
=
false
#seata.client.undo.log-serialization=kryo
#seata.client.undo.log-serialization=kryo
#
seata.datasource.autoproxy.datasource-proxy-mode
=
original
## 47环境 排除es报错引进无用配置 业务未实际使用es
seata.datasource.autoproxy.enabled
=
true
spring.elasticsearch.rest.uris
=
http://47.92.234.253:9200
seata.datasource.autoproxy.data-source-names
=
postgresql
spring.elasticsearch.rest.connection-timeout
=
30000
\ No newline at end of file
spring.elasticsearch.rest.username
=
elastic
spring.elasticsearch.rest.password
=
123456
spring.elasticsearch.rest.read-timeout
=
30000
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application.properties
View file @
595eb981
...
@@ -2,7 +2,7 @@ spring.application.name=AMOS-HYGF-CZ
...
@@ -2,7 +2,7 @@ spring.application.name=AMOS-HYGF-CZ
server.servlet.context-path
=
/hygf
server.servlet.context-path
=
/hygf
server.port
=
33330
server.port
=
33330
server.uri-encoding
=
UTF-8
server.uri-encoding
=
UTF-8
spring.profiles.active
=
dev
spring.profiles.active
=
kingbase8
spring.jackson.time-zone
=
GMT+8
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-${spring.profiles.active}.xml
logging.config
=
classpath:logback-${spring.profiles.active}.xml
...
@@ -56,7 +56,7 @@ amos.system.user.user-name=hygf_robot
...
@@ -56,7 +56,7 @@ amos.system.user.user-name=hygf_robot
amos.system.user.password
=
a1234560
amos.system.user.password
=
a1234560
amos.system.user.product
=
AMOS_STUDIO_WEB
amos.system.user.product
=
AMOS_STUDIO_WEB
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.app-key
=
AMOS_STUDIO
workflow.feign.name
=
AMOS-API-WORKFLOW
-CZ
workflow.feign.name
=
AMOS-API-WORKFLOW
feign.okhttp.enabled
=
true
feign.okhttp.enabled
=
true
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/logback-dev.xml
View file @
595eb981
...
@@ -28,16 +28,16 @@
...
@@ -28,16 +28,16 @@
</encoder>
</encoder>
</appender>
</appender>
<!--myibatis log configure-->
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"
INFO
"
/>
<logger
name=
"com.apache.ibatis"
level=
"
DEBUG
"
/>
<logger
name=
"java.sql.Connection"
level=
"
INFO
"
/>
<logger
name=
"java.sql.Connection"
level=
"
DEBUG
"
/>
<logger
name=
"java.sql.Statement"
level=
"
INFO
"
/>
<logger
name=
"java.sql.Statement"
level=
"
DEBUG
"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"
INFO
"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"
DEBUG
"
/>
<logger
name=
"com.baomidou.mybatisplus"
level=
"
INFO
"
/>
<logger
name=
"com.baomidou.mybatisplus"
level=
"
DEBUG
"
/>
<logger
name=
"org.springframework"
level=
"
INFO
"
/>
<logger
name=
"org.springframework"
level=
"
DEBUG
"
/>
<logger
name=
"org.typroject"
level=
"
INFO
"
/>
<logger
name=
"org.typroject"
level=
"
DEBUG
"
/>
<logger
name=
"com.yeejoin"
level=
"
INFO
"
/>
<logger
name=
"com.yeejoin"
level=
"
DEBUG
"
/>
<!-- 日志输出级别 -->
<!-- 日志输出级别 -->
<root
level=
"
INFO
"
>
<root
level=
"
DEBUG
"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT"
/>
</root>
</root>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/logback-kingbase8.xml
View file @
595eb981
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<logger
name=
"org.typroject"
level=
"DEBUG"
/>
<logger
name=
"org.typroject"
level=
"DEBUG"
/>
<logger
name=
"com.yeejoin"
level=
"DEBUG"
/>
<logger
name=
"com.yeejoin"
level=
"DEBUG"
/>
<!-- 日志输出级别 -->
<!-- 日志输出级别 -->
<root
level=
"
INFO
"
>
<root
level=
"
DEBUG
"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT"
/>
</root>
</root>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TDBigScreenAnalyseController.java
View file @
595eb981
...
@@ -193,7 +193,7 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -193,7 +193,7 @@ public class TDBigScreenAnalyseController extends BaseController {
String
finalStationCode
=
stationCode
;
String
finalStationCode
=
stationCode
;
// List<String> dateList = dateInfoBy15.stream().map(i -> i.get("date")).collect(Collectors.toList());
// List<String> dateList = dateInfoBy15.stream().map(i -> i.get("date")).collect(Collectors.toList());
String
finalAreaCode
=
areaCode
;
String
finalAreaCode
=
areaCode
;
if
((
WarningPeriodEnum
.
DAY
.
getName
().
equals
(
analysisType
)
||
analysisType
==
null
))
{
if
((
WarningPeriodEnum
.
DAY
.
getName
().
equals
(
analysisType
)))
{
List
<
String
>
fullDateList
=
dateList
.
stream
().
map
(
s
->
{
List
<
String
>
fullDateList
=
dateList
.
stream
().
map
(
s
->
{
return
s
+
" 00:00:00"
;
return
s
+
" 00:00:00"
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
...
@@ -215,7 +215,7 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -215,7 +215,7 @@ public class TDBigScreenAnalyseController extends BaseController {
String
value
=
map
.
get
(
date
)
!=
null
?
String
.
valueOf
(
map
.
get
(
date
))
:
"100"
;
String
value
=
map
.
get
(
date
)
!=
null
?
String
.
valueOf
(
map
.
get
(
date
))
:
"100"
;
valueList
.
add
(
String
.
valueOf
(
Math
.
round
(
Double
.
valueOf
(
value
)
*
10.0
)
/
10.0
));
valueList
.
add
(
String
.
valueOf
(
Math
.
round
(
Double
.
valueOf
(
value
)
*
10.0
)
/
10.0
));
}
}
}
else
if
(
WarningPeriodEnum
.
MINUTES
.
getName
().
equals
(
analysisType
))
{
}
else
if
(
WarningPeriodEnum
.
MINUTES
.
getName
().
equals
(
analysisType
)
||
analysisType
==
null
)
{
List
<
Map
<
String
,
Object
>>
healthListInfo
=
fanHealthIndexMapper
.
getInfoByMoment
(
finalAreaCode
,
List
<
Map
<
String
,
Object
>>
healthListInfo
=
fanHealthIndexMapper
.
getInfoByMoment
(
finalAreaCode
,
finalStationCode
,
dateList
);
finalStationCode
,
dateList
);
Map
<
String
,
Object
>
map
=
healthListInfo
.
stream
().
collect
(
Collectors
Map
<
String
,
Object
>
map
=
healthListInfo
.
stream
().
collect
(
Collectors
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
595eb981
...
@@ -129,16 +129,17 @@
...
@@ -129,16 +129,17 @@
FROM
FROM
${tableName}
${tableName}
<where>
<where>
ANALYSIS_TYPE = '按
天
'
ANALYSIS_TYPE = '按
10分钟
'
<!-- AND DATE_ADD(DATE_FORMAT( REC_DATE, '%Y-%m-%d' ),INTERVAL 1 DAY) = CURRENT_DATE-->
<!-- AND DATE_ADD(DATE_FORMAT( REC_DATE, '%Y-%m-%d' ),INTERVAL 1 DAY) = CURRENT_DATE-->
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
<!-- AND CURRENT_DATE = get_time_add(1,'DAY')-->
<if
test=
"stationCode != null and stationCode != ''"
>
AND REC_DATE >= get_time_sub(9,'MINUTE')
AND GATEWAY_ID = #{stationCode}
<if
test=
"stationCode != null and stationCode != ''"
>
AND ANALYSIS_OBJ_TYPE = '场站'
AND GATEWAY_ID = #{stationCode}
</if>
AND ANALYSIS_OBJ_TYPE = '场站'
</where>
</if>
limit 1
</where>
</select>
limit 1
</select>
<select
id=
"getHealthScoreInfoByStationByMinute"
resultType=
"java.math.BigDecimal"
>
<select
id=
"getHealthScoreInfoByStationByMinute"
resultType=
"java.math.BigDecimal"
>
SELECT
SELECT
round(IFNULL( HEALTH_INDEX , 100 ), 1) AS healthIndex
round(IFNULL( HEALTH_INDEX , 100 ), 1) AS healthIndex
...
@@ -246,35 +247,37 @@
...
@@ -246,35 +247,37 @@
ARAE
ARAE
FROM fan_health_index_latest_data
FROM fan_health_index_latest_data
WHERE ANALYSIS_OBJ_TYPE = '片区'
WHERE ANALYSIS_OBJ_TYPE = '片区'
AND ANALYSIS_TYPE = '按
天
'
AND ANALYSIS_TYPE = '按
10分钟
'
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE - INTERVAL 1 DAY-->
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE - INTERVAL 1 DAY-->
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')
<!--AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')-->
GROUP BY ARAE
AND REC_DATE >= get_time_sub(9,'MINUTE')
UNION ALL
GROUP BY ARAE
(
UNION ALL
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
(
ARAE
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
FROM pv_health_index_latest_data
ARAE
WHERE ANALYSIS_OBJ_TYPE = '片区'
FROM pv_health_index_latest_data
AND ANALYSIS_TYPE = '按天'
WHERE ANALYSIS_OBJ_TYPE = '片区'
<!--AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE - INTERVAL 1 DAY-->
AND ANALYSIS_TYPE = '按10分钟'
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')
<!--AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE - INTERVAL 1 DAY-->
GROUP BY ARAE
<!--AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')-->
)
AND REC_DATE >= get_time_sub(9,'MINUTE')
) a
GROUP BY ARAE
GROUP BY a.ARAE
)
</select>
) a
<select
id=
"getAllEquipAlarmInfoByStation"
resultType=
"java.util.Map"
>
GROUP BY a.ARAE
SELECT a.*
</select>
FROM (
<select
id=
"getAllEquipAlarmInfoByStation"
resultType=
"java.util.Map"
>
SELECT STATION AS station,
SELECT a.*
WARNING_NAME AS warningName,
FROM (
count(1) AS num,
SELECT STATION AS station,
(SELECT count(1)
WARNING_NAME AS warningName,
FROM idx_biz_fan_warning_record wr
count(1) AS num,
WHERE ((wr.DISPOSOTION_STATE = '待确认')
(SELECT count(1)
or (wr.DISPOSOTION_STATE = '已确认' and
FROM idx_biz_fan_warning_record wr
<!--wr.DISPOSOTION_DATE > DATE_ADD(now(), INTERVAL - 3 DAY )))-->
WHERE ((wr.DISPOSOTION_STATE = '待确认')
or (wr.DISPOSOTION_STATE = '已确认' and
<!--wr.DISPOSOTION_DATE > DATE_ADD(now(), INTERVAL - 3 DAY )))-->
wr.DISPOSOTION_DATE > get_time_sub(3,'DAY')
wr.DISPOSOTION_DATE > get_time_sub(3,'DAY')
AND wr.STATION = STATION
AND wr.STATION = STATION
) AS allNum
) AS allNum
...
@@ -318,9 +321,10 @@
...
@@ -318,9 +321,10 @@
fan_health_index_latest_data
fan_health_index_latest_data
<where>
<where>
ANALYSIS_OBJ_TYPE = '场站'
ANALYSIS_OBJ_TYPE = '场站'
AND ANALYSIS_TYPE = '按
天
'
AND ANALYSIS_TYPE = '按
10分钟
'
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')-->
AND REC_DATE >= get_time_sub(9,'MINUTE')
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ARAE like concat('%', #{areaCode}, '%')
</if>
</if>
...
@@ -335,9 +339,10 @@
...
@@ -335,9 +339,10 @@
pv_health_index_latest_data
pv_health_index_latest_data
<where>
<where>
ANALYSIS_OBJ_TYPE = '场站'
ANALYSIS_OBJ_TYPE = '场站'
AND ANALYSIS_TYPE = '按
天
'
AND ANALYSIS_TYPE = '按
10分钟
'
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')-->
AND REC_DATE >= get_time_sub(9,'MINUTE')
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ARAE like concat('%', #{areaCode}, '%')
</if>
</if>
...
@@ -491,9 +496,10 @@
...
@@ -491,9 +496,10 @@
fan_health_index_latest_data
fan_health_index_latest_data
<where>
<where>
ANALYSIS_OBJ_TYPE = '子系统'
ANALYSIS_OBJ_TYPE = '子系统'
AND ANALYSIS_TYPE = '按
天
'
AND ANALYSIS_TYPE = '按
10分钟
'
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')-->
AND REC_DATE >= get_time_sub(9,'MINUTE')
<if
test=
"equipmentName != null and equipmentName != ''"
>
<if
test=
"equipmentName != null and equipmentName != ''"
>
AND EQUIPMENT_NAME like concat( '%', #{equipmentName} ,'风机')
AND EQUIPMENT_NAME like concat( '%', #{equipmentName} ,'风机')
</if>
</if>
...
@@ -529,7 +535,7 @@
...
@@ -529,7 +535,7 @@
fan_health_index_latest_data
fan_health_index_latest_data
<where>
<where>
ANALYSIS_OBJ_TYPE = '设备'
ANALYSIS_OBJ_TYPE = '设备'
AND ANALYSIS_TYPE = '按
天
'
AND ANALYSIS_TYPE = '按
10分钟
'
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
<if
test=
"gatewayId != null and gatewayId != ''"
>
<if
test=
"gatewayId != null and gatewayId != ''"
>
...
@@ -588,7 +594,7 @@
...
@@ -588,7 +594,7 @@
fan_health_index_latest_data
fan_health_index_latest_data
<where>
<where>
ANALYSIS_OBJ_TYPE= '测点'
ANALYSIS_OBJ_TYPE= '测点'
AND ANALYSIS_TYPE = '按
天
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND POINT_NAME IS NOT NULL
AND POINT_NAME IS NOT NULL
AND POINT_NAME != ''
AND POINT_NAME != ''
<if
test=
"subSystem != null and subSystem != ''"
>
<if
test=
"subSystem != null and subSystem != ''"
>
...
@@ -648,7 +654,7 @@
...
@@ -648,7 +654,7 @@
pv_health_index_latest_data
pv_health_index_latest_data
<where>
<where>
ANALYSIS_OBJ_TYPE = '子阵'
ANALYSIS_OBJ_TYPE = '子阵'
AND ANALYSIS_TYPE = '按
天
'
AND ANALYSIS_TYPE = '按
10分钟
'
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
<if
test=
"gatewayId != null and gatewayId != ''"
>
<if
test=
"gatewayId != null and gatewayId != ''"
>
...
@@ -666,418 +672,419 @@
...
@@ -666,418 +672,419 @@
pv_health_index_latest_data
pv_health_index_latest_data
<where>
<where>
ANALYSIS_OBJ_TYPE = '设备'
ANALYSIS_OBJ_TYPE = '设备'
AND ANALYSIS_TYPE = '按
天
'
AND ANALYSIS_TYPE = '按
10分钟
'
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')-->
<if
test=
"subarray != null and subarray != ''"
>
AND REC_DATE >= get_time_sub(9,'MINUTE')
AND SUBARRAY = concat('#', #{subarray})
<if
test=
"subarray != null and subarray != ''"
>
</if>
AND SUBARRAY = concat('#', #{subarray})
<if
test=
"gatewayId != null and gatewayId != ''"
>
</if>
AND GATEWAY_ID = #{gatewayId}
<if
test=
"gatewayId != null and gatewayId != ''"
>
</if>
AND GATEWAY_ID = #{gatewayId}
</where>
</if>
group by EQUIPMENT_NAME
</where>
</select>
group by EQUIPMENT_NAME
<select
id=
"getPvSumSystemListByEquipment"
resultType=
"java.util.Map"
>
</select>
SELECT
<select
id=
"getPvSumSystemListByEquipment"
resultType=
"java.util.Map"
>
EQUIPMENT_NAME as equipmentName
SELECT
FROM
EQUIPMENT_NAME as equipmentName
idx_biz_pv_point_process_variable_classification
FROM
<where>
idx_biz_pv_point_process_variable_classification
EQUIPMENT_NAME IS NOT NULL
<where>
AND EQUIPMENT_NAME != ''
EQUIPMENT_NAME IS NOT NULL
AND TAG_CODE = '分析变量'
AND EQUIPMENT_NAME != ''
<if
test=
"subarray != null and subarray != ''"
>
AND TAG_CODE = '分析变量'
AND SUBARRAY = concat('#', #{subarray})
<if
test=
"subarray != null and subarray != ''"
>
</if>
AND SUBARRAY = concat('#', #{subarray})
<if
test=
"gatewayId != null and gatewayId != ''"
>
</if>
AND GATEWAY_ID = #{gatewayId}
<if
test=
"gatewayId != null and gatewayId != ''"
>
</if>
AND GATEWAY_ID = #{gatewayId}
</where>
</if>
GROUP BY
</where>
EQUIPMENT_NAME
GROUP BY
</select>
EQUIPMENT_NAME
<select
id=
"getPvHealthInfoBySubSystem"
resultType=
"java.util.Map"
>
</select>
SELECT
<select
id=
"getPvHealthInfoBySubSystem"
resultType=
"java.util.Map"
>
IFNULL(HEALTH_INDEX, 100) AS healthIndex,
SELECT
POINT_NAME AS pointName
IFNULL(HEALTH_INDEX, 100) AS healthIndex,
FROM
POINT_NAME AS pointName
pv_health_index_latest_data
FROM
<where>
pv_health_index_latest_data
ANALYSIS_OBJ_TYPE = '测点'
<where>
AND ANALYSIS_TYPE = '按天'
ANALYSIS_OBJ_TYPE = '测点'
AND POINT_NAME IS NOT NULL
AND ANALYSIS_TYPE = '按10分钟'
AND POINT_NAME != ''
AND POINT_NAME IS NOT NULL
<if
test=
"equipmentName != null and equipmentName != ''"
>
AND POINT_NAME != ''
AND EQUIPMENT_NAME = #{equipmentName}
<if
test=
"equipmentName != null and equipmentName != ''"
>
</if>
AND EQUIPMENT_NAME = #{equipmentName}
<if
test=
"gatewayId != null and gatewayId != ''"
>
</if>
AND GATEWAY_ID = #{gatewayId}
<if
test=
"gatewayId != null and gatewayId != ''"
>
</if>
AND GATEWAY_ID = #{gatewayId}
</where>
</if>
GROUP BY
</where>
POINT_NAME
GROUP BY
</select>
POINT_NAME
<select
id=
"getPvWarningInfoBySubSystem"
resultType=
"java.util.Map"
>
</select>
SELECT
<select
id=
"getPvWarningInfoBySubSystem"
resultType=
"java.util.Map"
>
POINT_NAME as pointName,
SELECT
WARNING_NAME as warningName
POINT_NAME as pointName,
FROM
WARNING_NAME as warningName
idx_biz_pv_warning_record
FROM
<where>
idx_biz_pv_warning_record
DISPOSOTION_STATE = '待确认'
<where>
<if
test=
"equipmentName != null and equipmentName != ''"
>
DISPOSOTION_STATE = '待确认'
AND EQUIPMENT_NAME = #{equipmentName}
<if
test=
"equipmentName != null and equipmentName != ''"
>
</if>
AND EQUIPMENT_NAME = #{equipmentName}
<if
test=
"gatewayId != null and gatewayId != ''"
>
</if>
AND GATEWAY_ID = #{gatewayId}
<if
test=
"gatewayId != null and gatewayId != ''"
>
</if>
AND GATEWAY_ID = #{gatewayId}
</where>
</if>
GROUP BY
</where>
POINT_NAME
GROUP BY
ORDER BY
POINT_NAME
WARNING_NAME ASC
ORDER BY
</select>
WARNING_NAME ASC
<select
id=
"getPvPointNameListBySumSystem"
resultType=
"java.util.Map"
>
</select>
SELECT
<select
id=
"getPvPointNameListBySumSystem"
resultType=
"java.util.Map"
>
POINT_NAME as pointName,
SELECT
INDEX_ADDRESS as indexAddress,
POINT_NAME as pointName,
STATION AS station
INDEX_ADDRESS as indexAddress,
FROM
STATION AS station
idx_biz_pv_point_process_variable_classification
FROM
<where>
idx_biz_pv_point_process_variable_classification
TAG_CODE = '分析变量'
<where>
<if
test=
"equipmentName != null and equipmentName != ''"
>
TAG_CODE = '分析变量'
AND EQUIPMENT_NAME = #{equipmentName}
<if
test=
"equipmentName != null and equipmentName != ''"
>
</if>
AND EQUIPMENT_NAME = #{equipmentName}
<if
test=
"gatewayId != null and gatewayId != ''"
>
</if>
AND GATEWAY_ID = #{gatewayId}
<if
test=
"gatewayId != null and gatewayId != ''"
>
</if>
AND GATEWAY_ID = #{gatewayId}
</where>
</if>
GROUP BY
</where>
POINT_NAME
GROUP BY
</select>
POINT_NAME
<select
id=
"getPointNameByIndexAddress"
resultType=
"java.lang.String"
>
</select>
select POINT_NAME
<select
id=
"getPointNameByIndexAddress"
resultType=
"java.lang.String"
>
from ${tableName}
select POINT_NAME
where INDEX_ADDRESS = #{varDesc}
from ${tableName}
and GATEWAY_ID = #{gatewayId}
where INDEX_ADDRESS = #{varDesc}
limit 1
and GATEWAY_ID = #{gatewayId}
limit 1
</select>
</select>
<select
id=
"getFullViewRecall"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO"
>
<select
id=
"getFullViewRecall"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO"
>
SELECT a.*,
SELECT a.*,
row_number() over ( ORDER BY pointName ) AS id
row_number() over ( ORDER BY pointName ) AS id
FROM (
FROM (
(SELECT ARAE AS area,
(SELECT ARAE AS area,
STATION AS station,
STATION AS station,
EQUIPMENT_NAME AS equipmentName,
EQUIPMENT_NAME AS equipmentName,
SUB_SYSTEM AS subSystem,
SUB_SYSTEM AS subSystem,
POINT_NAME AS pointName,
POINT_NAME AS pointName,
INDEX_ADDRESS AS indexAddress,
INDEX_ADDRESS AS indexAddress,
KKS
KKS
FROM idx_biz_fan_point_process_variable_classification
FROM idx_biz_fan_point_process_variable_classification
WHERE TAG_CODE = '分析变量'
WHERE TAG_CODE = '分析变量'
AND ARAE is not null
AND ARAE is not null
AND STATION is not null
AND STATION is not null
AND EQUIPMENT_NAME is not null
AND EQUIPMENT_NAME is not null
AND SUB_SYSTEM is not null
AND SUB_SYSTEM is not null
AND POINT_NAME is not null
AND POINT_NAME is not null
AND INDEX_ADDRESS is not null
AND INDEX_ADDRESS is not null
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
)
)
UNION ALL
UNION ALL
(SELECT ARAE AS area,
(SELECT ARAE AS area,
STATION AS station,
STATION AS station,
SUBARRAY AS equipmentName,
SUBARRAY AS equipmentName,
EQUIPMENT_NAME AS subSystem,
EQUIPMENT_NAME AS subSystem,
POINT_NAME AS pointName,
POINT_NAME AS pointName,
INDEX_ADDRESS AS indexAddress,
INDEX_ADDRESS AS indexAddress,
KKS
KKS
FROM idx_biz_pv_point_process_variable_classification
FROM idx_biz_pv_point_process_variable_classification
WHERE TAG_CODE = '分析变量'
WHERE TAG_CODE = '分析变量'
AND ARAE is not null
AND ARAE is not null
AND STATION is not null
AND STATION is not null
AND SUBARRAY is not null
AND SUBARRAY is not null
AND EQUIPMENT_NAME is not null
AND EQUIPMENT_NAME is not null
AND POINT_NAME is not null
AND POINT_NAME is not null
AND INDEX_ADDRESS is not null
AND INDEX_ADDRESS is not null
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
)
)
) a
) a
ORDER BY a.station ASC, a.equipmentName ASC, a.equipmentName asc, a.subSystem asc
ORDER BY a.station ASC, a.equipmentName ASC, a.equipmentName asc, a.subSystem asc
</select>
</select>
<select
id=
"getStationIndexInfo"
resultType=
"java.util.Map"
>
<select
id=
"getStationIndexInfo"
resultType=
"java.util.Map"
>
SELECT a.STATION AS station,
SELECT a.STATION AS station,
ROUND(avg(a.avgHealthIndex), 2) AS healthIndex
ROUND(avg(a.avgHealthIndex), 2) AS healthIndex
FROM (
FROM (
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
STATION AS STATION
FROM idx_biz_fan_health_index
WHERE ANALYSIS_OBJ_TYPE = '场站'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
GROUP BY STATION
UNION ALL
(
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
STATION AS STATION
STATION AS STATION
FROM idx_biz_
fan
_health_index
FROM idx_biz_
pv
_health_index
WHERE ANALYSIS_OBJ_TYPE = '场站'
WHERE ANALYSIS_OBJ_TYPE = '场站'
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
GROUP BY STATION
GROUP BY STATION
UNION ALL
)
(
) a
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
GROUP BY a.STATION
STATION AS STATION
</select>
FROM idx_biz_pv_health_index
<select
id=
"getEquipmentIndexInfo"
resultType=
"java.util.Map"
>
WHERE ANALYSIS_OBJ_TYPE = '场站'
SELECT a.equipmentName AS equipmentName,
AND ANALYSIS_TYPE = '按天'
ROUND(avg(a.avgHealthIndex), 2) AS healthIndex
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
FROM (
GROUP BY STATION
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
)
EQUIPMENT_NAME AS equipmentName
) a
FROM idx_biz_fan_health_index
GROUP BY a.STATION
WHERE ANALYSIS_OBJ_TYPE = '设备'
</select>
AND ANALYSIS_TYPE = '按天'
<select
id=
"getEquipmentIndexInfo"
resultType=
"java.util.Map"
>
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
SELECT a.equipmentName AS equipmentName,
GROUP BY EQUIPMENT_NAME
ROUND(avg(a.avgHealthIndex), 2) AS healthIndex
UNION ALL
FROM
(
(
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
EQUIPMENT_NAME
AS equipmentName
SUBARRAY
AS equipmentName
FROM idx_biz_
fan
_health_index
FROM idx_biz_
pv
_health_index
WHERE ANALYSIS_OBJ_TYPE = '
设备
'
WHERE ANALYSIS_OBJ_TYPE = '
子阵
'
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
GROUP BY EQUIPMENT_NAME
GROUP BY SUBARRAY
UNION ALL
)
(
) a
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
where equipmentName is not null
SUBARRAY AS equipmentName
and equipmentName != ''
FROM idx_biz_pv_health_index
GROUP BY
WHERE ANALYSIS_OBJ_TYPE = '子阵'
a.equipmentName
AND ANALYSIS_TYPE = '按天'
</select>
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
<select
id=
"getSubSystemIndexInfo"
resultType=
"java.util.Map"
>
GROUP BY SUBARRAY
)
) a
where equipmentName is not null
and equipmentName != ''
GROUP BY
a.equipmentName
</select>
<select
id=
"getSubSystemIndexInfo"
resultType=
"java.util.Map"
>
SELECT a.subSystem AS subSystem,
SELECT a.subSystem AS subSystem,
ROUND(avg(a.avgHealthIndex), 2) AS healthIndex
ROUND(avg(a.avgHealthIndex), 2) AS healthIndex
FROM (
FROM (
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
SUB_SYSTEM AS subSystem
FROM idx_biz_fan_health_index
WHERE ANALYSIS_OBJ_TYPE = '子系统'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
GROUP BY SUB_SYSTEM
UNION ALL
(
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
SUB_SYSTEM
AS subSystem
EQUIPMENT_NAME
AS subSystem
FROM idx_biz_
fan
_health_index
FROM idx_biz_
pv
_health_index
WHERE ANALYSIS_OBJ_TYPE = '
子系统
'
WHERE ANALYSIS_OBJ_TYPE = '
设备
'
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
GROUP BY SUB_SYSTEM
GROUP BY EQUIPMENT_NAME
UNION ALL
)
(
) a
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
where subSystem is not null
EQUIPMENT_NAME AS subSystem
and subSystem != ''
FROM idx_biz_pv_health_index
GROUP BY
WHERE ANALYSIS_OBJ_TYPE = '设备'
a.subSystem
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
GROUP BY EQUIPMENT_NAME
)
) a
where subSystem is not null
and subSystem != ''
GROUP BY
a.subSystem
</select>
</select>
<select
id=
"getPointNameIndexInfo"
resultType=
"java.util.Map"
>
<select
id=
"getPointNameIndexInfo"
resultType=
"java.util.Map"
>
SELECT IFNULL(MAX(HEALTH_INDEX), 100) AS healthIndex,
concat(MAX(STATION), '_', INDEX_ADDRESS) as gatewayIndexAddress
FROM idx_biz_fan_health_index
WHERE ANALYSIS_OBJ_TYPE = '测点'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
GROUP BY INDEX_ADDRESS
UNION ALL
(
SELECT IFNULL(MAX(HEALTH_INDEX), 100) AS healthIndex,
SELECT IFNULL(MAX(HEALTH_INDEX), 100) AS healthIndex,
concat(MAX(STATION), '_', INDEX_ADDRESS) as gatewayIndexAddress
concat(MAX(STATION), '_', INDEX_ADDRESS) as gatewayIndexAddress
FROM idx_biz_
fan
_health_index
FROM idx_biz_
pv
_health_index
WHERE ANALYSIS_OBJ_TYPE = '测点'
WHERE ANALYSIS_OBJ_TYPE = '测点'
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
GROUP BY INDEX_ADDRESS
GROUP BY INDEX_ADDRESS
UNION ALL
)
(
</select>
SELECT IFNULL(MAX(HEALTH_INDEX), 100) AS healthIndex,
<select
id=
"getHealthLevelInfoList"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthLevel"
>
concat(MAX(STATION), '_', INDEX_ADDRESS) as gatewayIndexAddress
SELECT CONCAT(`STATUS`, '_', ANALYSIS_OBJ_TYPE) AS analysisObjType,
FROM idx_biz_pv_health_index
HEALTH_LEVEL AS healthLevel,
WHERE ANALYSIS_OBJ_TYPE = '测点'
GROUP_LOWER_LIMIT AS groupLowerLimit,
AND ANALYSIS_TYPE = '按天'
GROUP_UPPER_LIMIT AS groupUpperLimit
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE
FROM idx_biz_fan_health_level
GROUP BY INDEX_ADDRESS
WHERE (STATUS IS NOT NULL
)
OR STATUS != '')
</select>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<select
id=
"getHealthLevelInfoList"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthLevel"
>
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
SELECT CONCAT(`STATUS`, '_', ANALYSIS_OBJ_TYPE) AS analysisObjType,
#{item}
HEALTH_LEVEL AS healthLevel,
</foreach>
GROUP_LOWER_LIMIT AS groupLowerLimit,
</if>
GROUP_UPPER_LIMIT AS groupUpperLimit
UNION ALL
FROM idx_biz_fan_health_level
SELECT CONCAT(`STATUS`, '_', ANALYSIS_OBJ_TYPE) AS analysisObjType,
WHERE (STATUS IS NOT NULL
HEALTH_LEVEL AS healthLevel,
OR STATUS != '')
GROUP_LOWER_LIMIT AS groupLowerLimit,
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
GROUP_UPPER_LIMIT AS groupUpperLimit
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
FROM idx_biz_pv_health_level
#{item}
WHERE (STATUS IS NOT NULL
</foreach>
OR STATUS != '')
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
<select
id=
"getAddressInfo"
resultType=
"java.lang.String"
>
select index_address
from wl_equipment_specific_index
where gateway_id = '1668801435891929089'
and data_type = 'analog' limit 100
</select>
<select
id=
"queryForLeftTableList"
resultType=
"map"
>
SELECT
b.*,
IFNULL(CAST(HEALTH_INDEX AS UNSIGNED), 100 ) as HEALTH_INDEX ,
IFNULL( ibfhi.HEALTH_LEVEL, '安全' ) as HEALTH_LEVEL,
(case ibfhi.HEALTH_LEVEL
WHEN '危险' THEN 3
WHEN '警告' THEN 2
WHEN '注意' THEN 1
ELSE 0 end) as status
FROM
(
SELECT
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` AS `EQUIPMENT_NAME`,
`idx_biz_fan_point_process_variable_classification`.`STATION` AS `STATION`
FROM
`idx_biz_fan_point_process_variable_classification`
WHERE
`idx_biz_fan_point_process_variable_classification`.`TAG_CODE` = '分析变量'
GROUP BY
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME`
ORDER BY
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` ASC
) b
LEFT JOIN `idx_biz_fan_health_index` `ibfhi` ON ( ( `b`.`EQUIPMENT_NAME` = `ibfhi`.`EQUIPMENT_NAME` ) )
AND ibfhi.ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_TYPE = '按天' AND
DATE_FORMAT(ibfhi.REC_DATE,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
<where>
<if
test=
"STATION != '' and STATION != null"
>
b.STATION = #{STATION}
</if>
</if>
UNION ALL
<if
test=
"HEALTHLEVEL != '' and HEALTHLEVEL != null"
>
SELECT CONCAT(`STATUS`, '_', ANALYSIS_OBJ_TYPE) AS analysisObjType,
AND HEALTH_LEVEL = #{HEALTHLEVEL}
HEALTH_LEVEL AS healthLevel,
GROUP_LOWER_LIMIT AS groupLowerLimit,
GROUP_UPPER_LIMIT AS groupUpperLimit
FROM idx_biz_pv_health_level
WHERE (STATUS IS NOT NULL
OR STATUS != '')
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</if>
</select>
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
<select
id=
"getAddressInfo"
resultType=
"java.lang.String"
>
AND b.EQUIPMENT_NAME = #{EQUIPMENTNAME}
select index_address
</if>
from wl_equipment_specific_index
</where>
where gateway_id = '1668801435891929089'
order by HEALTH_INDEX ASC
and data_type = 'analog' limit 100
limit ${current},${size}
</select>
</select>
<select
id=
"queryForLeftTableList"
resultType=
"map"
>
<select
id=
"queryForLeftTableListCount"
resultType=
"int"
>
SELECT
SELECT
b.*,
count(1)
IFNULL(CAST(HEALTH_INDEX AS UNSIGNED), 100 ) as HEALTH_INDEX ,
FROM
IFNULL( ibfhi.HEALTH_LEVEL, '安全' ) as HEALTH_LEVEL,
(
(case ibfhi.HEALTH_LEVEL
SELECT
WHEN '危险' THEN 3
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` AS `EQUIPMENT_NAME`,
WHEN '警告' THEN 2
`idx_biz_fan_point_process_variable_classification`.`STATION` AS `STATION`
WHEN '注意' THEN 1
FROM
ELSE 0 end) as status
`idx_biz_fan_point_process_variable_classification`
FROM
WHERE
(
`idx_biz_fan_point_process_variable_classification`.`TAG_CODE` = '分析变量'
SELECT
GROUP BY
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` AS `EQUIPMENT_NAME`,
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME`
`idx_biz_fan_point_process_variable_classification`.`STATION` AS `STATION`
ORDER BY
FROM
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` ASC
`idx_biz_fan_point_process_variable_classification`
) b
WHERE
LEFT JOIN `idx_biz_fan_health_index` `ibfhi` ON ( ( `b`.`EQUIPMENT_NAME` = `ibfhi`.`EQUIPMENT_NAME` ) )
`idx_biz_fan_point_process_variable_classification`.`TAG_CODE` = '分析变量'
AND ibfhi.ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_TYPE = '按天' AND
GROUP BY
DATE_FORMAT(ibfhi.REC_DATE,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME`
<where>
ORDER BY
<if
test=
"STATION != '' and STATION != null"
>
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` ASC
b.STATION = #{STATION}
) b
</if>
LEFT JOIN `idx_biz_fan_health_index` `ibfhi` ON ( ( `b`.`EQUIPMENT_NAME` = `ibfhi`.`EQUIPMENT_NAME` ) )
<if
test=
"HEALTHLEVEL != '' and HEALTHLEVEL != null"
>
AND ibfhi.ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_TYPE = '按天' AND
AND HEALTH_LEVEL = #{HEALTHLEVEL}
DATE_FORMAT(ibfhi.REC_DATE,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
</if>
<where>
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
<if
test=
"STATION != '' and STATION != null"
>
AND b.EQUIPMENT_NAME = #{EQUIPMENTNAME}
b.STATION = #{STATION}
</if>
</if>
</where>
<if
test=
"HEALTHLEVEL != '' and HEALTHLEVEL != null"
>
</select>
AND HEALTH_LEVEL = #{HEALTHLEVEL}
<select
id=
"queryForLeftTableListNum"
resultType=
"map"
>
</if>
SELECT
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND b.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
</where>
order by HEALTH_INDEX ASC
limit ${current},${size}
</select>
<select
id=
"queryForLeftTableListCount"
resultType=
"int"
>
SELECT
count(1)
FROM
(
SELECT
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` AS `EQUIPMENT_NAME`,
`idx_biz_fan_point_process_variable_classification`.`STATION` AS `STATION`
FROM
`idx_biz_fan_point_process_variable_classification`
WHERE
`idx_biz_fan_point_process_variable_classification`.`TAG_CODE` = '分析变量'
GROUP BY
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME`
ORDER BY
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` ASC
) b
LEFT JOIN `idx_biz_fan_health_index` `ibfhi` ON ( ( `b`.`EQUIPMENT_NAME` = `ibfhi`.`EQUIPMENT_NAME` ) )
AND ibfhi.ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_TYPE = '按天' AND
DATE_FORMAT(ibfhi.REC_DATE,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
<where>
<if
test=
"STATION != '' and STATION != null"
>
b.STATION = #{STATION}
</if>
<if
test=
"HEALTHLEVEL != '' and HEALTHLEVEL != null"
>
AND HEALTH_LEVEL = #{HEALTHLEVEL}
</if>
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND b.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
</where>
</select>
<select
id=
"queryForLeftTableListNum"
resultType=
"map"
>
SELECT
CAST(ibfhi.HEALTH_INDEX AS UNSIGNED) as value
CAST(ibfhi.HEALTH_INDEX AS UNSIGNED) as value
FROM
FROM
(
(
SELECT
SELECT
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` AS `EQUIPMENT_NAME`,
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` AS `EQUIPMENT_NAME`,
`idx_biz_fan_point_process_variable_classification`.`STATION` AS `STATION`
`idx_biz_fan_point_process_variable_classification`.`STATION` AS `STATION`
FROM
FROM
`idx_biz_fan_point_process_variable_classification`
`idx_biz_fan_point_process_variable_classification`
WHERE
WHERE
`idx_biz_fan_point_process_variable_classification`.`TAG_CODE` = '分析变量'
`idx_biz_fan_point_process_variable_classification`.`TAG_CODE` = '分析变量'
GROUP BY
GROUP BY
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME`
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME`
ORDER BY
ORDER BY
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` ASC
`idx_biz_fan_point_process_variable_classification`.`EQUIPMENT_NAME` ASC
) b
) b
LEFT JOIN `idx_biz_fan_health_index` `ibfhi` ON ( ( `b`.`EQUIPMENT_NAME` = `ibfhi`.`EQUIPMENT_NAME` ) )
LEFT JOIN `idx_biz_fan_health_index` `ibfhi` ON ( ( `b`.`EQUIPMENT_NAME` = `ibfhi`.`EQUIPMENT_NAME` ) )
AND ibfhi.ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_TYPE = '按天' AND
AND ibfhi.ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_OBJ_TYPE = '设备' AND ANALYSIS_TYPE = '按天' AND
DATE_FORMAT(ibfhi.REC_DATE,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
DATE_FORMAT(ibfhi.REC_DATE,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
<where>
<where>
<if
test=
"STATION != '' and STATION != null"
>
<if
test=
"STATION != '' and STATION != null"
>
b.STATION = #{STATION}
b.STATION = #{STATION}
</if>
</if>
<if
test=
"HEALTHLEVEL != '' and HEALTHLEVEL != null"
>
<if
test=
"HEALTHLEVEL != '' and HEALTHLEVEL != null"
>
AND HEALTH_LEVEL = #{HEALTHLEVEL}
AND HEALTH_LEVEL = #{HEALTHLEVEL}
</if>
</if>
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND b.EQUIPMENT_NAME = #{EQUIPMENTNAME}
AND b.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
</if>
</where>
</where>
</select>
</select>
<select
id=
"queryForLeftTableListByPoint"
resultType=
"map"
>
<select
id=
"queryForLeftTableListByPoint"
resultType=
"map"
>
SELECT
SELECT
b.*
b.*
FROM
FROM
(
(
SELECT
SELECT
POINT_NAME ,
POINT_NAME ,
STATION,
STATION,
CAST(HEALTH_INDEX AS UNSIGNED) as HEALTH_INDEX,
CAST(HEALTH_INDEX AS UNSIGNED) as HEALTH_INDEX,
CAST(HEALTH_INDEX AS UNSIGNED) as value,
CAST(HEALTH_INDEX AS UNSIGNED) as value,
HEALTH_LEVEL,
HEALTH_LEVEL,
( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status,
( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status,
SUB_SYSTEM,
SUB_SYSTEM,
REC_DATE,
REC_DATE,
EQUIPMENT_NAME,
EQUIPMENT_NAME,
INDEX_ADDRESS,
INDEX_ADDRESS,
ANALYSIS_OBJ_SEQ,
ANALYSIS_OBJ_SEQ,
ANALYSIS_TYPE
ANALYSIS_TYPE
FROM
FROM
`idx_biz_fan_health_index`
`idx_biz_fan_health_index`
WHERE
WHERE
ANALYSIS_OBJ_TYPE = '测点'
ANALYSIS_OBJ_TYPE = '测点'
<!--AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )-->
<!--AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )-->
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= get_time_sub(1,'HOUR') )
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= get_time_sub(1,'HOUR') )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
<!--OR ( ANALYSIS_TYPE = '按10分钟' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )-->
<!--OR ( ANALYSIS_TYPE = '按10分钟' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )-->
...
@@ -1703,9 +1710,10 @@
...
@@ -1703,9 +1710,10 @@
FROM
FROM
fan_health_index_latest_data
fan_health_index_latest_data
<where>
<where>
ANALYSIS_TYPE = '按天'
ANALYSIS_TYPE = '按10分钟'
<!-- AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURDATE() - INTERVAL 1 DAY-->
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURDATE() - INTERVAL 1 DAY-->
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY') -->
AND REC_DATE >= get_time_sub(9,'MINUTE')
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ARAE like concat('%', #{areaCode}, '%')
AND ANALYSIS_OBJ_TYPE = '片区'
AND ANALYSIS_OBJ_TYPE = '片区'
...
@@ -1725,64 +1733,65 @@
...
@@ -1725,64 +1733,65 @@
FROM
FROM
pv_health_index_latest_data
pv_health_index_latest_data
<where>
<where>
ANALYSIS_TYPE = '按天
'
ANALYSIS_TYPE = '按10分钟
'
<!-- AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURDATE() - INTERVAL 1 DAY-->
<!-- AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURDATE() - INTERVAL 1 DAY-->
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')-->
<if
test=
"areaCode != null and areaCode != ''"
>
AND REC_DATE >= get_time_sub(9,'MINUTE')
AND ARAE like concat('%', #{areaCode}, '%')
<if
test=
"areaCode != null and areaCode != ''"
>
AND ANALYSIS_OBJ_TYPE = '片区'
AND ARAE like concat('%', #{areaCode}, '%')
</if>
AND ANALYSIS_OBJ_TYPE = '片区'
<if
test=
"stationCode != null and stationCode != ''"
>
</if>
AND GATEWAY_ID = #{stationCode}
<if
test=
"stationCode != null and stationCode != ''"
>
AND ANALYSIS_OBJ_TYPE = '场站'
AND GATEWAY_ID = #{stationCode}
</if>
AND ANALYSIS_OBJ_TYPE = '场站'
<if
test=
"(stationCode == null or stationCode == '') and (areaCode == null or areaCode == '')"
>
</if>
AND ANALYSIS_OBJ_TYPE = '片区'
<if
test=
"(stationCode == null or stationCode == '') and (areaCode == null or areaCode == '')"
>
</if>
AND ANALYSIS_OBJ_TYPE = '片区'
</where>
</if>
)
</where>
) a
)
</select>
) a
<!--<select id="getDateInfoBy15" resultType="java.util.Map">
</select>
SELECT
<!--<select id="getDateInfoBy15" resultType="java.util.Map">
DATE_FORMAT( DATE_ADD(( DATE( DATE_ADD( CURDATE() - INTERVAL 1 DAY, INTERVAL - 15 DAY ))), INTERVAL @s DAY ), '%Y-%m-%d' ) AS date,
SELECT
@s := @s + 1 AS `index`
DATE_FORMAT( DATE_ADD(( DATE( DATE_ADD( CURDATE() - INTERVAL 1 DAY, INTERVAL - 15 DAY ))), INTERVAL @s DAY ), '%Y-%m-%d' ) AS date,
FROM
@s := @s + 1 AS `index`
mysql.help_topic,
FROM
( SELECT @s := 1 ) temp
mysql.help_topic,
WHERE
( SELECT @s := 1 ) temp
DATEDIFF( CURDATE() - INTERVAL 1 DAY, DATE( DATE_ADD( CURDATE() - INTERVAL 1 DAY, INTERVAL - 15 DAY )) ) >= @s
WHERE
</select>
DATEDIFF( CURDATE() - INTERVAL 1 DAY, DATE( DATE_ADD( CURDATE() - INTERVAL 1 DAY, INTERVAL - 15 DAY )) ) >= @s
<select id="getDateInfo" resultType="java.util.Map">
</select>
SELECT
<select id="getDateInfo" resultType="java.util.Map">
DATE_FORMAT( DATE_ADD(( DATE( DATE_ADD( #{endTime}, INTERVAL - DATEDIFF( #{endTime}, #{startTime})-1 DAY ))), INTERVAL @s DAY ), '%Y-%m-%d' ) AS date,
SELECT
@s := @s + 1 AS `index`
DATE_FORMAT( DATE_ADD(( DATE( DATE_ADD( #{endTime}, INTERVAL - DATEDIFF( #{endTime}, #{startTime})-1 DAY ))), INTERVAL @s DAY ), '%Y-%m-%d' ) AS date,
FROM
@s := @s + 1 AS `index`
mysql.help_topic,
FROM
( SELECT @s := 1 ) temp
mysql.help_topic,
WHERE
( SELECT @s := 1 ) temp
DATEDIFF( #{endTime}, DATE( DATE_ADD( #{endTime}, INTERVAL - DATEDIFF( #{endTime}, #{startTime})-1 DAY )) ) >= @s
WHERE
</select>
DATEDIFF( #{endTime}, DATE( DATE_ADD( #{endTime}, INTERVAL - DATEDIFF( #{endTime}, #{startTime})-1 DAY )) ) >= @s
<select id="getHourInfo" resultType="java.util.Map">
</select>
SELECT
<select id="getHourInfo" resultType="java.util.Map">
DATE_FORMAT( DATE_ADD(( DATE(#{startTime})), INTERVAL @s-1 HOUR ), '%Y-%m-%d %H:%i:%s' ) AS date,
SELECT
( @s := @s + 1 )- 1 AS `index`
DATE_FORMAT( DATE_ADD(( DATE(#{startTime})), INTERVAL @s-1 HOUR ), '%Y-%m-%d %H:%i:%s' ) AS date,
FROM
( @s := @s + 1 )- 1 AS `index`
mysql.help_topic,
FROM
( SELECT @s := 1 ) temp
mysql.help_topic,
WHERE
( SELECT @s := 1 ) temp
TIMESTAMPDIFF( HOUR, #{startTime} , #{endTime}) >= @s-1
WHERE
</select>
TIMESTAMPDIFF( HOUR, #{startTime} , #{endTime}) >= @s-1
<select id="getMomentInfo" resultType="java.util.Map">
</select>
SELECT
<select id="getMomentInfo" resultType="java.util.Map">
DATE_FORMAT( DATE_ADD(( DATE(#{startTime})), INTERVAL (@s-1)*10 MINUTE ), '%Y-%m-%d %H:%i:%s' ) AS date,
SELECT
( @s := @s + 1 )- 1 AS `index`
DATE_FORMAT( DATE_ADD(( DATE(#{startTime})), INTERVAL (@s-1)*10 MINUTE ), '%Y-%m-%d %H:%i:%s' ) AS date,
FROM
( @s := @s + 1 )- 1 AS `index`
mysql.help_topic,
FROM
( SELECT @s := 1 ) temp
mysql.help_topic,
WHERE
( SELECT @s := 1 ) temp
TIMESTAMPDIFF( MINUTE, #{startTime} , #{endTime})/10 >= @s-1
WHERE
</select>-->
TIMESTAMPDIFF( MINUTE, #{startTime} , #{endTime})/10 >= @s-1
</select>-->
<select
id=
"getHealthIndexByIndexAddress"
resultType=
"java.util.Map"
>
<select
id=
"getHealthIndexByIndexAddress"
resultType=
"java.util.Map"
>
select ROUND(ifnull(HEALTH_INDEX, 100.0), 1) as healthIndex,
select ROUND(ifnull(HEALTH_INDEX, 100.0), 1) as healthIndex,
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/BitTypeHandler.java
0 → 100644
View file @
595eb981
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
config
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
org.apache.ibatis.type.BaseTypeHandler
;
import
org.apache.ibatis.type.JdbcType
;
import
org.apache.ibatis.type.MappedJdbcTypes
;
@MappedJdbcTypes
(
JdbcType
.
BIT
)
public
class
BitTypeHandler
extends
BaseTypeHandler
<
Boolean
>
{
@Override
public
void
setNonNullParameter
(
PreparedStatement
ps
,
int
i
,
Boolean
parameter
,
JdbcType
jdbcType
)
throws
SQLException
{
//原生的boolean会再sql上加上引号比如'0'或者'1',人大金仓不支持,支持不带引号的
//ps.setBoolean(i, parameter);
ps
.
setInt
(
i
,
parameter
?
1
:
0
);
}
@Override
public
Boolean
getNullableResult
(
ResultSet
rs
,
String
columnName
)
throws
SQLException
{
return
rs
.
getBoolean
(
columnName
);
}
@Override
public
Boolean
getNullableResult
(
ResultSet
rs
,
int
columnIndex
)
throws
SQLException
{
return
rs
.
getBoolean
(
columnIndex
);
}
@Override
public
Boolean
getNullableResult
(
java
.
sql
.
CallableStatement
cs
,
int
columnIndex
)
throws
SQLException
{
return
cs
.
getBoolean
(
columnIndex
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/application-kingbase8.properties
View file @
595eb981
...
@@ -4,33 +4,33 @@ spring.db1.datasource.type: com.alibaba.druid.pool.DruidDataSource
...
@@ -4,33 +4,33 @@ spring.db1.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url
=
jdbc:kingbase8://10.20.1.176:54321/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8¤tSchema=root
spring.db1.datasource.url
=
jdbc:kingbase8://10.20.1.176:54321/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8¤tSchema=root
spring.db1.datasource.username
=
root
spring.db1.datasource.username
=
root
spring.db1.datasource.password
=
Yeejoin@2020
spring.db1.datasource.password
=
Yeejoin@2020
spring.db1.datasource.driver-class-name
:
com.kingbase8.Driver
spring.db1.datasource.driver-class-name
=
com.kingbase8.Driver
## db2-sync_data
## db2-sync_data
spring.db2.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.url
=
jdbc:kingbase8://10.20.1.176:54321/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8¤tSchema=root
spring.db2.datasource.url
=
jdbc:kingbase8://10.20.1.176:54321/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8¤tSchema=root
spring.db2.datasource.username
=
root
spring.db2.datasource.username
=
root
spring.db2.datasource.password
=
Yeejoin@2020
spring.db2.datasource.password
=
Yeejoin@2020
spring.db2.datasource.driver-class-name
:
com.kingbase8.Driver
spring.db2.datasource.driver-class-name
=
com.kingbase8.Driver
##db3
spring.db3.datasource.url
=
jdbc:TAOS-RS://10.20.1.157:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.url
=
jdbc:TAOS-RS://10.20.0.203:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.username
=
root
spring.db3.datasource.username
=
root
spring.db3.datasource.password
=
taosdata
spring.db3.datasource.password
=
taosdata
spring.db3.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
spring.db3.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
##db4
spring.db4.datasource.url
=
jdbc:TAOS-RS://10.20.
1.157:6041/iot
_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.url
=
jdbc:TAOS-RS://10.20.
0.203:6041/analysis
_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.username
=
root
spring.db4.datasource.username
=
root
spring.db4.datasource.password
=
taosdata
spring.db4.datasource.password
=
taosdata
spring.db4.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
spring.db4.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
# kingbase8 backquote not support
mybatis-plus.global-config.db-config.table-field-strategy
=
ignore
## eureka properties:
## eureka properties:
eureka.instance.hostname
=
10.20.1.160
#eureka.instance.hostname=139.9.173.44
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
eureka.instance.prefer-ip-address
=
true
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@47.92.234.253:10001/eureka/
## redis properties:
## redis properties:
spring.redis.database
=
1
spring.redis.database
=
1
spring.redis.host
=
10.20.1.210
spring.redis.host
=
47.92.234.253
spring.redis.port
=
6379
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.password
=
yeejoin@2020
...
@@ -65,17 +65,18 @@ lettuce.timeout=10000
...
@@ -65,17 +65,18 @@ lettuce.timeout=10000
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.client-id
=
AMOS-JXIOP-BIGSCREEN
emqx.broker
=
tcp://10.20.1.210:2883
emqx.client-user-name
=
emqx.client-password
=
emqx.broker
=
tcp://47.92.234.253:2883
emqx.user-name
=
admin
emqx.user-name
=
admin
emqx.password
=
public
emqx.password
=
public
mqtt.scene.host
=
mqtt://
10.20.1.210
:8083/mqtt
mqtt.scene.host
=
mqtt://
47.92.234.253
:8083/mqtt
mqtt.client.product.id
=
mqtt
mqtt.client.product.id
=
mqtt
mqtt.topic
=
topic_mqtt
mqtt.topic
=
topic_mqtt
spring.mqtt.completionTimeout
=
3000
spring.mqtt.completionTimeout
=
3000
emqx.max-inflight
=
1000
emqx.max-inflight
=
1000
emqx.client-user-name
=
admin
emqx.client-password
=
public
## influxDB
## influxDB
#spring.influx.url= http://172.16.3.155:18186
#spring.influx.url= http://172.16.3.155:18186
...
@@ -98,7 +99,8 @@ emqx.client-password=public
...
@@ -98,7 +99,8 @@ emqx.client-password=public
#spring.influx.bufferLimit=20000
#spring.influx.bufferLimit=20000
#spring.influx.url=http://10.20.1.157:18086
# influxDB
#spring.influx.url= http://192.168.120.102:18086
#spring.influx.password=Yeejoin@2020
#spring.influx.password=Yeejoin@2020
#spring.influx.user=root
#spring.influx.user=root
#spring.influx.database=iot_platform
#spring.influx.database=iot_platform
...
@@ -128,28 +130,19 @@ amos.secret.key=qaz
...
@@ -128,28 +130,19 @@ amos.secret.key=qaz
#eureka.instance.ip-address=172.16.3.122
#eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url
=
tcp://
10.20.1.210
:61616
spring.activemq.broker-url
=
tcp://
47.92.234.253
:61616
spring.activemq.user
=
admin
spring.activemq.user
=
admin
spring.activemq.password
=
admin
spring.activemq.password
=
admin
spring.jms.pub-sub-domain
=
false
spring.jms.pub-sub-domain
=
false
myqueue
=
amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
myqueue
=
amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
spring.elasticsearch.rest.uris
=
http://10.20.0.223:9200
spring.elasticsearch.rest.connection-timeout
=
30000
spring.elasticsearch.rest.username
=
elastic
spring.elasticsearch.rest.password
=
Yeejoin@2020
spring.elasticsearch.rest.read-timeout
=
30000
# ?????????
# ?????????
fan.statuts.stattuspath
=
upload/jxiop/device_status
fan.statuts.stattuspath
=
upload/jxiop/device_status
pictureUrl
=
upload/jxiop/syz/
pictureUrl
=
upload/jxiop/syz/
# Ԥ
large.cron
=
0 0/5 * * * ?
idx.predict.serviceUrl
=
http://10.20.1.157:8095/jxdj/predict-data
forecast.url
=
forecast.url
=
logic
=
\ No newline at end of file
logic
=
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/application.properties
View file @
595eb981
...
@@ -2,7 +2,7 @@ spring.application.name=AMOS-JXIOP-BIGSCREEN-CZ
...
@@ -2,7 +2,7 @@ spring.application.name=AMOS-JXIOP-BIGSCREEN-CZ
server.servlet.context-path
=
/jxiop-bigscreen
server.servlet.context-path
=
/jxiop-bigscreen
server.port
=
33300
server.port
=
33300
server.uri-encoding
=
UTF-8
server.uri-encoding
=
UTF-8
spring.profiles.active
=
dev1
spring.profiles.active
=
kingbase8
spring.jackson.time-zone
=
GMT+8
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-${spring.profiles.active}.xml
logging.config
=
classpath:logback-${spring.profiles.active}.xml
...
@@ -75,11 +75,7 @@ station.section=10
...
@@ -75,11 +75,7 @@ station.section=10
gl.sum.column
=
日发电量,月发电量,年发电量
gl.sum.column
=
日发电量,月发电量,年发电量
gl.avg.column
=
有功功率,日利用小时,瞬时风速
gl.avg.column
=
有功功率,日利用小时,瞬时风速
spring.elasticsearch.rest.uris
=
http://139.9.173.44:9200
spring.elasticsearch.rest.connection-timeout
=
30000
spring.elasticsearch.rest.username
=
elastic
spring.elasticsearch.rest.password
=
Yeejoin@2020
spring.elasticsearch.rest.read-timeout
=
30000
daily.power.generation.cron
=
0 0/1 * * * ?
daily.power.generation.cron
=
0 0/1 * * * ?
moon.power.generation.cron
=
0 0/1 * * * ?
moon.power.generation.cron
=
0 0/1 * * * ?
...
...
pom.xml
View file @
595eb981
...
@@ -329,10 +329,10 @@
...
@@ -329,10 +329,10 @@
<module>
amos-boot-biz-common
</module>
<module>
amos-boot-biz-common
</module>
<module>
amos-boot-core
</module>
<module>
amos-boot-core
</module>
<module>
amos-boot-data
</module>
<module>
amos-boot-data
</module>
<module>
amos-boot-module
</module
>
<!-- <module>amos-boot-module</module>--
>
<module>
amos-boot-system-ccs
</module
>
<!-- <module>amos-boot-system-ccs</module>--
>
<module>
amos-boot-system-jcs
</module
>
<!-- <module>amos-boot-system-jcs</module>--
>
<module>
amos-boot-system-equip
</module
>
<!-- <module>amos-boot-system-equip</module>--
>
<module>
amos-boot-system-jxiop
</module>
<module>
amos-boot-system-jxiop
</module>
</modules>
</modules>
</project>
</project>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment