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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
508 additions
and
210 deletions
+508
-210
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
+0
-0
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
+0
-0
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;
*/
public
class
BusinessException
extends
BaseException
{
private
String
code
=
""
;
private
String
code
;
public
BusinessException
(
String
message
)
{
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 {
private
String
gmtCreate
;
@ApiModelProperty
(
"ID"
)
@TableField
(
"id
S
tring"
)
@TableField
(
"id
_s
tring"
)
private
String
idString
;
@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
long
ts
=
System
.
currentTimeMillis
();
log
.
info
(
"-------碳银同步电站开始: {} ------- "
,
ts
);
List
<
String
>
projectNos
=
tanYinCustomerInfoMapper
.
listProjectNo
();
projectNos
.
add
(
"TF2024060312382700202"
);
String
powerDate
=
"2024-07-17"
;
// projectNos.add("TF2024060312382700202");
// String powerDate = "2024-07-17";
String
powerDate
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
if
(
CollectionUtils
.
isEmpty
(
projectNos
))
{
return
;
}
...
...
@@ -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
));
Map
<
String
,
JpStation
>
jpStationMap
=
jpStations
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
Function
.
identity
()));
List
<
TanYinInveterInfo
>
tanYinInveterInfos
=
new
ArrayList
();
for
(
TanYinStationInfo
tanYinStationInfo
:
tanYinStationInfos
)
{
tanYinStationInfo
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinStationInfoMapper
.
insert
(
tanYinStationInfo
);
...
...
@@ -250,7 +253,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
tanYinInveterInfo
.
setSn
(
inverterListDTO
.
getSn
());
tanYinInveterInfo
.
setSupplier
(
inverterListDTO
.
getSupplier
());
tanYinInveterInfo
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinInveterInfo
Mapper
.
insert
(
tanYinInveterInfo
);
tanYinInveterInfo
s
.
add
(
tanYinInveterInfo
);
}
String
stationId
=
tanYinStationInfo
.
getProjectNo
();
...
...
@@ -408,32 +411,23 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
}
else
{
TdHYGFStationAllGenerateMapper
.
insert
(
TdHYGFStationAllGenerate
);
}
}
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
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
))
{
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
<
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
()));
...
...
@@ -452,6 +446,12 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
for
(
TanYinInveterInfo
tanYinInveterInfo
:
tanYinInveterInfos
)
{
JSONObject
tanYinInveterInfoResultJson
=
tanYinInveterInfoResultMap
.
getJSONObject
(
tanYinInveterInfo
.
getSn
());
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
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_station_id"
,
tanYinInveterInfo
.
getProjectNo
())
...
...
@@ -471,6 +471,11 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
jpInverter
.
setUpdateTime
(
tanYinInveterInfoDTO
.
getGmtCreate
()
!=
null
?
new
Date
(
Long
.
parseLong
(
tanYinInveterInfoDTO
.
getGmtCreate
()))
:
new
Date
());
JpStation
jpStation
=
jpStationMap
.
get
(
tanYinInveterInfo
.
getProjectNo
());
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.setMonthPowerGeneration(jpStation.getMonthGenerate());
...
...
@@ -506,6 +511,8 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
jpInverterElectricity
.
setThirdCode
(
PVProducerInfoEnum
.
TANYIN
.
getCode
());
jpInverterElectricity
.
setThirdStationId
(
jpInverter
.
getThirdStationId
());
// jpInverterElectricity.setType("交流");
// jpInverterElectricity.setFrequency();// 频率
// jpInverterElectricity.setPower();// 功率
jpInverterElectricity
.
setName
(
name
);
if
(
tanYinInveterInfoResultJson
.
get
(
name
)
!=
null
&&
!
""
.
equals
(
tanYinInveterInfoResultJson
.
get
(
name
)))
{
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 {
UserDataDto
getPersonnelBusinessById
(
String
id
);
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 @@
<version>
1.10.4
</version>
<scope>
compile
</scope>
</dependency>
<dependency
>
<groupId>
io.github.openfeign
</groupId
>
<artifactId>
feign-httpclient
</artifactId
>
</dependency
>
<dependency
>
<groupId>
com.esotericsoftware.kryo
</groupId
>
<artifactId>
kryo
</artifactId
>
<version>
2.24.0
</version
>
</dependency
>
<dependency
>
<groupId>
de.javakaffee
</groupId
>
<artifactId>
kryo-serializers
</artifactId
>
<version>
0.45
</version
>
</dependency
>
<dependency
>
<groupId>
com.esotericsoftware
</groupId
>
<artifactId>
kryo
</artifactId
>
<version>
4.0.2
</version
>
</dependency
>
<dependency
>
<groupId>
cn.com.vastdata
</groupId
>
<artifactId>
vastbase-jdbc
</artifactId
>
<version>
2.7p
</version
>
</dependency
>
<dependency
>
<groupId>
io.seata
</groupId
>
<artifactId>
seata-spring-boot-starter
</artifactId
>
<version>
1.8.0
</version
>
</dependency
>
<!-- <dependency>--
>
<!-- <groupId>io.github.openfeign</groupId>--
>
<!-- <artifactId>feign-httpclient</artifactId>--
>
<!-- </dependency>--
>
<!-- <dependency>--
>
<!-- <groupId>com.esotericsoftware.kryo</groupId>--
>
<!-- <artifactId>kryo</artifactId>--
>
<!-- <version>2.24.0</version>--
>
<!-- </dependency>--
>
<!-- <dependency>--
>
<!-- <groupId>de.javakaffee</groupId>--
>
<!-- <artifactId>kryo-serializers</artifactId>--
>
<!-- <version>0.45</version>--
>
<!-- </dependency>--
>
<!-- <dependency>--
>
<!-- <groupId>com.esotericsoftware</groupId>--
>
<!-- <artifactId>kryo</artifactId>--
>
<!-- <version>4.0.2</version>--
>
<!-- </dependency>--
>
<!-- <dependency>--
>
<!-- <groupId>cn.com.vastdata</groupId>--
>
<!-- <artifactId>vastbase-jdbc</artifactId>--
>
<!-- <version>2.7p</version>--
>
<!-- </dependency>--
>
<!-- <dependency>--
>
<!-- <groupId>io.seata</groupId>--
>
<!-- <artifactId>seata-spring-boot-starter</artifactId>--
>
<!-- <version>1.8.0</version>--
>
<!-- </dependency>--
>
<!-- ICBC工行支付 -->
<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
;
...
...
@@ -7,7 +115,6 @@ 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
;
...
...
@@ -44,18 +151,16 @@ public class MysqlServerConfig {
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
(
"mysqlDataSource
Proxy
"
)
DataSource
dataSource
,
GlobalConfig
globalConfig
)
throws
Exception
{
public
SqlSessionFactory
mysqlSqlSessionFactory
(
@Qualifier
(
"mysqlDataSource"
)
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
);
//分页插件
...
...
@@ -70,7 +175,10 @@ public class MysqlServerConfig {
""
+
";"
);
interceptor
.
setProperties
(
properties
);
bean
.
setPlugins
(
new
Interceptor
[]
{
interceptor
,
paginationInterceptor
(),
userEmpowerInterceptor
(),
paginationInterceptor
()
});
...
...
@@ -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;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseNewUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseUtil
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
...
...
@@ -48,7 +48,7 @@ public class FinancingInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
@
Global
Transactional
@Transactional
public
ResponseModel
<
FinancingInfoDto
>
save
(
@RequestBody
FinancingInfoDto
model
)
{
model
=
financingInfoServiceImpl
.
saveModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
...
...
@@ -63,7 +63,7 @@ public class FinancingInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
@
Global
Transactional
@Transactional
public
ResponseModel
<
FinancingInfoDto
>
updateBySequenceNbrFinancingInfo
(
@RequestBody
FinancingInfoDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setFile
(
JSON
.
toJSONString
(
model
.
getFiles
()));
...
...
@@ -147,7 +147,7 @@ public class FinancingInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"撤回"
,
notes
=
"撤回"
)
@
Global
Transactional
@Transactional
@GetMapping
(
value
=
"/rollback"
)
public
ResponseModel
rollback
(
String
instanceId
,
String
peasantHouseholdId
)
{
financingInfoServiceImpl
.
rollback
(
instanceId
,
peasantHouseholdId
);
...
...
@@ -158,7 +158,7 @@ public class FinancingInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"审核"
,
notes
=
"审核"
)
@PostMapping
(
value
=
"/execueFlow"
)
@
Global
Transactional
@Transactional
public
ResponseModel
execueFlow
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
financingInfoServiceImpl
.
execueFlow
(
params
);
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 {
}
/**
* 根据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查询
*
* @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;
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.feign.privilege.model.AgencyUserModel
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -132,7 +132,7 @@ public class PowerStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"电站审核"
,
notes
=
"电站审核"
)
@PostMapping
(
value
=
"/powerStationExamine"
)
@
Global
Transactional
@Transactional
public
ResponseModel
<
String
>
powerStationExamine
(
@RequestParam
(
value
=
"pageId"
)
long
pageId
,
@RequestParam
(
value
=
"nodeCode"
)
String
nodeCode
,
@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
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.feign.privilege.model.AgencyUserModel
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -69,7 +69,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增发货单"
,
notes
=
"新增发货单"
)
@
Global
Transactional
@Transactional
@UserLimits
public
ResponseModel
<
PreparationMoney
>
save
(
@RequestParam
(
"isSubmit"
)
String
isSubmit
,
@RequestBody
PreparationMoney
model
)
{
AgencyUserModel
agencyUserModel
=
getUserInfo
();
...
...
@@ -257,7 +257,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/uploadVoucher"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传收获凭证"
,
notes
=
"上传收获凭证"
)
@
Global
Transactional
@Transactional
public
ResponseModel
uploadVoucher
(
@RequestParam
(
value
=
"instanceId"
,
required
=
false
)
String
instanceId
,
@RequestBody
PreparationMoney
model
,
String
isSubmit
)
{
preparationMoneyServiceImpl
.
uploadVoucher
(
model
,
instanceId
,
isSubmit
);
...
...
@@ -267,7 +267,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/excuteFlow"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"收货审核"
,
notes
=
"收货审核"
)
@
Global
Transactional
@Transactional
public
ResponseModel
excuteFlow
(
@RequestParam
(
value
=
"instanceId"
,
required
=
false
)
String
instanceId
,
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
,
@RequestBody
Map
<
String
,
Object
>
kv
)
{
...
...
@@ -278,7 +278,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/replenishmentSubmit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补货申请"
,
notes
=
"补货申请"
)
@
Global
Transactional
@Transactional
public
ResponseModel
replenishmentSubmit
(
@RequestBody
HygfReplenishment
hygfReplenishment
)
{
// HygfReplenishment hygfReplenishment1 = new HygfReplenishment();
// BeanUtils.copyProperties(hygfReplenishment,hygfReplenishment1);
...
...
@@ -302,7 +302,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/replenishmentAudit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补货审核"
,
notes
=
"补货审核"
)
@
Global
Transactional
@Transactional
public
ResponseModel
replenishmentAudit
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
,
@RequestBody
Map
<
String
,
Object
>
kv
)
{
preparationMoneyServiceImpl
.
replenishmentAudit
(
sequenceNbr
,
kv
);
return
CommonResponseNewUtil
.
success
();
...
...
@@ -311,7 +311,7 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/submitOrder"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补货审核"
,
notes
=
"补货审核"
)
@
Global
Transactional
@Transactional
public
ResponseModel
submitOrder
(
@RequestParam
(
value
=
"instanceId"
)
String
instanceId
,
@RequestParam
(
value
=
"isSubmit"
)
String
isSubmit
,
@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;
import
com.yeejoin.amos.feign.privilege.model.GroupModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -33,6 +32,7 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
...
...
@@ -262,7 +262,7 @@ public class UnitInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/unitRegister"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"单位注册"
,
notes
=
"单位注册"
)
@
Global
Transactional
@Transactional
public
ResponseModel
<
UnitRegisterDto
>
save
(
@RequestBody
UnitRegisterDto
model
)
{
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
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
...
...
@@ -16,7 +17,8 @@ import java.util.List;
* @apiNote 待办Feign调用
* @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
{
/**
...
...
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
;
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.feign.workflow.model.*
;
import
org.springframework.cloud.openfeign.FeignClient
;
...
...
@@ -8,7 +9,7 @@ import org.springframework.web.bind.annotation.*;
import
java.util.List
;
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
{
/***
...
...
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.*;
import
java.util.List
;
import
java.util.Map
;
@FeignClient
(
name
=
"${workflow.feign.name:AMOS-API-WORKFLOW}"
,
path
=
"workflow"
,
configuration
=
{
XidFeignConfiguration
.
class
})
@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})
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
;
import
feign.RequestInterceptor
;
import
feign.RequestTemplate
;
import
feign.codec.Encoder
;
import
feign.form.spring.SpringFormEncoder
;
import
io.seata.core.context.RootContext
;
import
org.springframework.beans.factory.ObjectFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.http.HttpMessageConverters
;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.context.request.RequestContextListener
;
@Configuration
public
class
XidFeignConfiguration
implements
RequestInterceptor
{
@Autowired
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
@Bean
public
Encoder
feignFormEncoder
()
{
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
}
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* @return
*/
@Bean
public
RequestContextListener
requestInterceptor
()
{
return
new
RequestContextListener
();
}
@Override
public
void
apply
(
RequestTemplate
template
)
{
String
xid
=
RootContext
.
getXID
();
if
(
StringUtils
.
hasText
(
xid
)){
template
.
header
(
RootContext
.
KEY_XID
,
xid
);
}
}
}
\ No newline at end of file
//package com.yeejoin.amos.boot.module.hygf.biz.feign;
//
//import feign.RequestInterceptor;
//import feign.RequestTemplate;
//import feign.codec.Encoder;
//import feign.form.spring.SpringFormEncoder;
//import io.seata.core.context.RootContext;
//import org.springframework.beans.factory.ObjectFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
//import org.springframework.cloud.openfeign.support.SpringEncoder;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.util.StringUtils;
//import org.springframework.web.context.request.RequestContextListener;
//
//@Configuration
//public class XidFeignConfiguration implements RequestInterceptor {
// @Autowired
// private ObjectFactory<HttpMessageConverters> messageConverters;
//
// @Bean
// public Encoder feignFormEncoder() {
// return new SpringFormEncoder(new SpringEncoder(messageConverters));
// }
// /**
// * 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
// * @return
// */
// @Bean
// public RequestContextListener requestInterceptor() {
// return new RequestContextListener();
// }
//
// @Override
// public void apply(RequestTemplate template) {
// String xid = RootContext.getXID();
// if(StringUtils.hasText(xid)){
// template.header(RootContext.KEY_XID, xid);
// }
// }
//}
\ 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
import
com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -103,7 +103,7 @@ public class AcceptanceRectificationOrderServiceImpl extends BaseService<Accepta
* 提交整改并触发工作流
*/
@
Global
Transactional
@Transactional
public
AcceptanceRectificationOrderDto
updateAndDriveWorkflow
(
AcceptanceRectificationOrderDto
model
,
String
userId
)
{
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;
import
com.yeejoin.amos.boot.module.hygf.api.service.IAcceptanceService
;
import
com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
org.springframework.util.StringUtils
;
...
...
@@ -115,7 +115,7 @@ public class AcceptanceServiceImpl implements IAcceptanceService {
return
Optional
.
ofNullable
(
item
).
orElse
(
new
AcceptanceCheckItem
());
}
@Override
@
Global
Transactional
@Transactional
public
void
checkAccept
(
Long
basicGridAcceptanceId
,
String
userId
)
{
String
lockName
=
String
.
format
(
"LockName:checkAccept:%s"
,
basicGridAcceptanceId
);
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
import
com.yeejoin.amos.boot.module.hygf.api.util.NumberUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -94,7 +93,7 @@ public class BasicGridAcceptanceServiceImpl
return
grid
;
}
@
Global
Transactional
@Transactional
public
synchronized
HygfOnGrid
saveAndCommit
(
HygfOnGrid
grid
,
String
userId
)
{
BasicGridAcceptance
basicGridAcceptance
=
basicGridAcceptanceMapper
...
...
@@ -202,7 +201,7 @@ public class BasicGridAcceptanceServiceImpl
return
bool
;
}
@
Global
Transactional
@Transactional
public
void
execute
(
AcceptanceCheckItem
dto
,
String
userId
)
{
String
lockName
=
String
.
format
(
"LockName:executeWorkflow:%s"
,
dto
.
getBasicGridAcceptanceId
());
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;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.springframework.beans.BeanUtils
;
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
This diff is collapsed.
Click to expand it.
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;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
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;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -916,7 +915,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
}
@
Global
Transactional
@Transactional
public
void
uploadVoucher
(
PreparationMoney
model
,
String
instanceId
,
String
isSubmit
)
{
//经销商暂存则只更新发货单属性 不进行业务推动
if
(
"1"
.
equals
(
isSubmit
))
{
...
...
@@ -1033,7 +1032,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
}
@
Global
Transactional
@Transactional
public
void
replenishmentRollback
(
Long
sequenceNbr
)
{
LambdaQueryWrapper
<
HygfPreparationMoneyAuditing
>
lambda
=
new
LambdaQueryWrapper
();
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;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
...
@@ -149,7 +148,7 @@ public class SurveyInformationServiceImpl
return
this
.
queryForList
(
""
,
false
);
}
@
Global
Transactional
@Transactional
public
SurveyInfoAllDto
saveSurveyInfo
(
SurveyInfoAllDto
surveyInfoAllDto
,
String
operationType
)
{
String
lockName
=
null
;
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;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
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
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!!!
amos.secret.key
=
qaz
...
...
@@ -246,9 +246,3 @@ spring.elasticsearch.rest.connection-timeout=30000
spring.elasticsearch.rest.username
=
elastic
spring.elasticsearch.rest.password
=
123456
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:
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.password
=
Yeejoin@2020
spring.datasource.mysql-service.type
=
com.zaxxer.hikari.HikariDataSource
...
...
@@ -50,11 +52,11 @@ spring.datasource.tdengine-service.connection-test-query: SELECT 1
## 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/
## redis properties:
spring.redis.database
=
1
spring.redis.host
=
10.20.1.210
spring.redis.host
=
47.92.234.253
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
...
...
@@ -90,7 +92,7 @@ lettuce.timeout=10000
emqx.clean-session
=
true
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.password
=
public
emqx.max-inflight
=
1000
...
...
@@ -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.
#eureka.instance.prefer-ip-address=true
#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.password
=
admin
spring.jms.pub-sub-domain
=
false
...
...
@@ -231,12 +233,18 @@ dealer.amosDealerId=1767820997374775298
#Seata Config
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.enabled
=
true
seata.enable-auto-data-source-proxy
=
false
#seata.client.undo.log-serialization=kryo
#
seata.datasource.autoproxy.datasource-proxy-mode
=
original
seata.datasource.autoproxy.enabled
=
true
seata.datasource.autoproxy.data-source-names
=
postgresql
\ No newline at end of file
## 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
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
server.servlet.context-path
=
/hygf
server.port
=
33330
server.uri-encoding
=
UTF-8
spring.profiles.active
=
dev
spring.profiles.active
=
kingbase8
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-${spring.profiles.active}.xml
...
...
@@ -56,7 +56,7 @@ amos.system.user.user-name=hygf_robot
amos.system.user.password
=
a1234560
amos.system.user.product
=
AMOS_STUDIO_WEB
amos.system.user.app-key
=
AMOS_STUDIO
workflow.feign.name
=
AMOS-API-WORKFLOW
-CZ
workflow.feign.name
=
AMOS-API-WORKFLOW
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 @@
</encoder>
</appender>
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"
INFO
"
/>
<logger
name=
"java.sql.Connection"
level=
"
INFO
"
/>
<logger
name=
"java.sql.Statement"
level=
"
INFO
"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"
INFO
"
/>
<logger
name=
"com.baomidou.mybatisplus"
level=
"
INFO
"
/>
<logger
name=
"org.springframework"
level=
"
INFO
"
/>
<logger
name=
"org.typroject"
level=
"
INFO
"
/>
<logger
name=
"com.yeejoin"
level=
"
INFO
"
/>
<logger
name=
"com.apache.ibatis"
level=
"
DEBUG
"
/>
<logger
name=
"java.sql.Connection"
level=
"
DEBUG
"
/>
<logger
name=
"java.sql.Statement"
level=
"
DEBUG
"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"
DEBUG
"
/>
<logger
name=
"com.baomidou.mybatisplus"
level=
"
DEBUG
"
/>
<logger
name=
"org.springframework"
level=
"
DEBUG
"
/>
<logger
name=
"org.typroject"
level=
"
DEBUG
"
/>
<logger
name=
"com.yeejoin"
level=
"
DEBUG
"
/>
<!-- 日志输出级别 -->
<root
level=
"
INFO
"
>
<root
level=
"
DEBUG
"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"STDOUT"
/>
</root>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/logback-kingbase8.xml
View file @
595eb981
...
...
@@ -37,7 +37,7 @@
<logger
name=
"org.typroject"
level=
"DEBUG"
/>
<logger
name=
"com.yeejoin"
level=
"DEBUG"
/>
<!-- 日志输出级别 -->
<root
level=
"
INFO
"
>
<root
level=
"
DEBUG
"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"STDOUT"
/>
</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 {
String
finalStationCode
=
stationCode
;
// List<String> dateList = dateInfoBy15.stream().map(i -> i.get("date")).collect(Collectors.toList());
String
finalAreaCode
=
areaCode
;
if
((
WarningPeriodEnum
.
DAY
.
getName
().
equals
(
analysisType
)
||
analysisType
==
null
))
{
if
((
WarningPeriodEnum
.
DAY
.
getName
().
equals
(
analysisType
)))
{
List
<
String
>
fullDateList
=
dateList
.
stream
().
map
(
s
->
{
return
s
+
" 00:00:00"
;
}).
collect
(
Collectors
.
toList
());
...
...
@@ -215,7 +215,7 @@ public class TDBigScreenAnalyseController extends BaseController {
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
));
}
}
else
if
(
WarningPeriodEnum
.
MINUTES
.
getName
().
equals
(
analysisType
))
{
}
else
if
(
WarningPeriodEnum
.
MINUTES
.
getName
().
equals
(
analysisType
)
||
analysisType
==
null
)
{
List
<
Map
<
String
,
Object
>>
healthListInfo
=
fanHealthIndexMapper
.
getInfoByMoment
(
finalAreaCode
,
finalStationCode
,
dateList
);
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
This diff is collapsed.
Click to expand it.
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
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.password
=
Yeejoin@2020
spring.db1.datasource.driver-class-name
:
com.kingbase8.Driver
spring.db1.datasource.driver-class-name
=
com.kingbase8.Driver
## db2-sync_data
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.username
=
root
spring.db2.datasource.password
=
Yeejoin@2020
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.db2.datasource.driver-class-name
=
com.kingbase8.Driver
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.password
=
taosdata
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.password
=
taosdata
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.instance.hostname
=
10.20.1.160
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
#eureka.instance.hostname=139.9.173.44
eureka.instance.prefer-ip-address
=
true
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@47.92.234.253:10001/eureka/
## redis properties:
spring.redis.database
=
1
spring.redis.host
=
10.20.1.210
spring.redis.host
=
47.92.234.253
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
...
...
@@ -65,17 +65,18 @@ lettuce.timeout=10000
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://10.20.1.210:2883
emqx.client-id
=
AMOS-JXIOP-BIGSCREEN
emqx.client-user-name
=
emqx.client-password
=
emqx.broker
=
tcp://47.92.234.253:2883
emqx.user-name
=
admin
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.topic
=
topic_mqtt
spring.mqtt.completionTimeout
=
3000
emqx.max-inflight
=
1000
emqx.client-user-name
=
admin
emqx.client-password
=
public
## influxDB
#spring.influx.url= http://172.16.3.155:18186
...
...
@@ -98,7 +99,8 @@ emqx.client-password=public
#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.user=root
#spring.influx.database=iot_platform
...
...
@@ -128,28 +130,19 @@ amos.secret.key=qaz
#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.password
=
admin
spring.jms.pub-sub-domain
=
false
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
pictureUrl
=
upload/jxiop/syz/
# Ԥ
idx.predict.serviceUrl
=
http://10.20.1.157:8095/jxdj/predict-data
large.cron
=
0 0/5 * * * ?
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
server.servlet.context-path
=
/jxiop-bigscreen
server.port
=
33300
server.uri-encoding
=
UTF-8
spring.profiles.active
=
dev1
spring.profiles.active
=
kingbase8
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-${spring.profiles.active}.xml
...
...
@@ -75,11 +75,7 @@ station.section=10
gl.sum.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 * * * ?
moon.power.generation.cron
=
0 0/1 * * * ?
...
...
pom.xml
View file @
595eb981
...
...
@@ -329,10 +329,10 @@
<module>
amos-boot-biz-common
</module>
<module>
amos-boot-core
</module>
<module>
amos-boot-data
</module>
<module>
amos-boot-module
</module
>
<module>
amos-boot-system-ccs
</module
>
<module>
amos-boot-system-jcs
</module
>
<module>
amos-boot-system-equip
</module
>
<!-- <module>amos-boot-module</module>--
>
<!-- <module>amos-boot-system-ccs</module>--
>
<!-- <module>amos-boot-system-jcs</module>--
>
<!-- <module>amos-boot-system-equip</module>--
>
<module>
amos-boot-system-jxiop
</module>
</modules>
</project>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment