Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
15550b9a
Commit
15550b9a
authored
Aug 22, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
c0a4bd08
cffd14e1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1248 additions
and
22 deletions
+1248
-22
ControllerAop.java
...a/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
+3
-0
HouseholdContractEnum.java
...amos/boot/module/hygf/api/Enum/HouseholdContractEnum.java
+47
-0
ContractDataDto.java
...eejoin/amos/boot/module/hygf/api/dto/ContractDataDto.java
+32
-0
HouseholdContractDto.java
...n/amos/boot/module/hygf/api/dto/HouseholdContractDto.java
+139
-0
HouseholdContractPageDto.java
...os/boot/module/hygf/api/dto/HouseholdContractPageDto.java
+41
-0
TemplateParamDto.java
...ejoin/amos/boot/module/hygf/api/dto/TemplateParamDto.java
+15
-0
UnitInfoDto.java
...om/yeejoin/amos/boot/module/hygf/api/dto/UnitInfoDto.java
+13
-0
HouseholdContract.java
...n/amos/boot/module/hygf/api/entity/HouseholdContract.java
+248
-0
PreparationMoney.java
...in/amos/boot/module/hygf/api/entity/PreparationMoney.java
+6
-0
UnitInfo.java
...om/yeejoin/amos/boot/module/hygf/api/entity/UnitInfo.java
+11
-0
HouseholdContractMapper.java
.../boot/module/hygf/api/mapper/HouseholdContractMapper.java
+14
-0
IHouseholdContractService.java
...ot/module/hygf/api/service/IHouseholdContractService.java
+12
-0
HouseholdContractMapper.xml
...api/src/main/resources/mapper/HouseholdContractMapper.xml
+5
-0
HouseholdContractController.java
...dule/hygf/biz/controller/HouseholdContractController.java
+142
-0
QiyuesuoController.java
...s/boot/module/hygf/biz/controller/QiyuesuoController.java
+0
-0
UnitInfoController.java
...s/boot/module/hygf/biz/controller/UnitInfoController.java
+11
-3
HouseholdContractServiceImpl.java
...e/hygf/biz/service/impl/HouseholdContractServiceImpl.java
+91
-0
QiyuesuoServiceImpl.java
...oot/module/hygf/biz/service/impl/QiyuesuoServiceImpl.java
+234
-0
application-dev.properties
...le-hygf-biz/src/main/resources/application-dev.properties
+5
-2
SmartAnalyseEnum.java
...oin/amos/boot/module/jxiop/biz/Enum/SmartAnalyseEnum.java
+39
-0
MyServiceThread.java
...in/amos/boot/module/jxiop/biz/Thread/MyServiceThread.java
+46
-0
AnalyseController.java
...s/boot/module/jxiop/biz/controller/AnalyseController.java
+12
-12
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+81
-4
PersonBasicMapper.xml
...jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
+1
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
View file @
15550b9a
...
...
@@ -97,6 +97,9 @@ public class ControllerAop {
urls
.
add
(
"^/tzs/flc-unit-info/verifyTelCode/[A-Za-z0-9]+/[A-Za-z0-9]+"
);
urls
.
add
(
"^/tzs/flc-unit-info/hasExistUser/[A-Za-z0-9_-]+"
);
urls
.
add
(
"/tzs/reg-unit-info/save"
);
urls
.
add
(
"/hygf/unit-info/region/tree"
);
urls
.
add
(
"/hygf/unit-info/management-unit/tree"
);
// 获取请求路径
for
(
String
uri
:
urls
)
{
Pattern
p
=
Pattern
.
compile
(
uri
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/HouseholdContractEnum.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/21
*/
@Getter
@AllArgsConstructor
public
enum
HouseholdContractEnum
{
发起状态
_
已发起
(
"已发起"
,
"已发起"
),
发起状态
_
未发起
(
"未发起"
,
"未发起"
),
验证状态
_
已验证
(
"已验证"
,
"已验证"
),
验证状态
_
未验证
(
"未验证"
,
"未验证"
),
盖章状态
_
未盖章
(
"未盖章"
,
"未盖章"
),
盖章状态
_
已盖章
(
"已盖章"
,
"已盖章"
),
签字状态
_
已签字
(
"已签字"
,
"已签字"
),
签字状态
_
未签字
(
"未签字"
,
"未签字"
),
勘察状态
_
未勘察
(
"未勘察"
,
"未勘察"
),
勘察状态
_
已勘察
(
"已勘察"
,
"已勘察"
),
合同状态
_
未签署
(
"未签署"
,
"未签署"
),
合同状态
_
已签署
(
"已签署"
,
"已签署"
),
合同状态
_
已作废
(
"已作废"
,
"已作废"
);
/**
* 名称,描述
*/
private
String
name
;
/**
* 编码
*/
private
String
code
;
public
static
PowerStationNodeEnum
getNodeByCode
(
String
code
)
{
PowerStationNodeEnum
powerStationNodeEnum
=
null
;
for
(
PowerStationNodeEnum
type:
PowerStationNodeEnum
.
values
())
{
if
(
type
.
getCode
().
equals
(
code
))
{
powerStationNodeEnum
=
type
;
break
;
}
}
return
powerStationNodeEnum
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/ContractDataDto.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/21
*/
@Data
public
class
ContractDataDto
{
String
username
;
String
contact
;
String
IDCard
;
String
subject
;
String
endTime
;
String
expireTime
;
String
category
;
String
companyTenantName
;
String
companyUsername
;
String
companyContact
;
Long
emplateId
;
String
companykeyword
;
Integer
companyPage
;
Double
companyOffsetX
;
Double
companyOffsetY
;
String
personalkeyword
;
Integer
personalPage
;
Double
personalOffsetX
;
Double
personalOffsetY
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/HouseholdContractDto.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
*
*
* @author system_generator
* @date 2023-08-21
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"HouseholdContractDto"
,
description
=
""
)
public
class
HouseholdContractDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"勘察状态"
)
private
String
surveyStatus
;
@ApiModelProperty
(
value
=
"合同状态"
)
private
String
status
;
@ApiModelProperty
(
value
=
"签字状态"
)
private
String
signStatus
;
@ApiModelProperty
(
value
=
"盖章状态"
)
private
String
stampStatus
;
@ApiModelProperty
(
value
=
"甲方"
)
private
String
partyA
;
@ApiModelProperty
(
value
=
"乙方"
)
private
String
partyB
;
@ApiModelProperty
(
value
=
"合同编号"
)
private
String
contractNumber
;
@ApiModelProperty
(
value
=
"农户编号"
)
private
String
peasantHouseholdNumber
;
@ApiModelProperty
(
value
=
"农户身份证"
)
private
String
peasantHouseholdCard
;
@ApiModelProperty
(
value
=
"经销商id"
)
private
Long
dealerId
;
@ApiModelProperty
(
value
=
"经销商code"
)
private
String
dealerCode
;
@ApiModelProperty
(
value
=
"经销商名称"
)
private
String
dealerName
;
@ApiModelProperty
(
value
=
"合同名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"模板id"
)
private
Long
contractTemplateId
;
@ApiModelProperty
(
value
=
"合同文件地址"
)
private
String
contractUrl
;
@ApiModelProperty
(
value
=
"办理人"
)
private
String
sealedUser
;
@ApiModelProperty
(
value
=
"农户id"
)
private
Long
peasantHouseholdId
;
@ApiModelProperty
(
value
=
"所属区域公司id"
)
private
Long
regionalCompaniesSeq
;
@ApiModelProperty
(
value
=
"所属区域公司名称"
)
private
String
regionalCompaniesName
;
@ApiModelProperty
(
value
=
"所属区域公司code"
)
private
String
regionalCompaniesCode
;
@ApiModelProperty
(
value
=
"农户手机号"
)
private
String
peasantHouseholdPhone
;
@ApiModelProperty
(
value
=
"项目详细地址"
)
private
String
projectAddressDetail
;
@ApiModelProperty
(
value
=
"常住详细地址"
)
private
String
permanentAddressDetail
;
@ApiModelProperty
(
value
=
"常住地址"
)
private
String
permanentAddressName
;
@ApiModelProperty
(
value
=
"项目地址"
)
private
String
projectAddressName
;
@ApiModelProperty
(
value
=
"免租期免租期"
)
private
String
rentFree
;
@ApiModelProperty
(
value
=
"租金计算日期"
)
private
Date
rentCalculationDate
;
@ApiModelProperty
(
value
=
"租期结束日期"
)
private
Date
leaseEndDate
;
@ApiModelProperty
(
value
=
"建设规模"
)
private
Double
constructionScale
;
@ApiModelProperty
(
value
=
"组件数量块"
)
private
Integer
componentQuantityBlock
;
@ApiModelProperty
(
value
=
"总投资"
)
private
Double
totalInvestment
;
@ApiModelProperty
(
value
=
"组件功率"
)
private
Double
componentPower
;
@ApiModelProperty
(
value
=
"电站功率"
)
private
Double
stationPower
;
@ApiModelProperty
(
value
=
"合同契约锁id"
)
private
Double
contractLockId
;
@ApiModelProperty
(
value
=
"印章id"
)
private
Double
sealId
;
/**
* 发起状态
* */
private
String
initiateStatus
;
/**
* 签署时间
* */
private
Date
signingTime
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/HouseholdContractPageDto.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/21
*/
@Data
public
class
HouseholdContractPageDto
extends
Page
<
HouseholdContract
>
{
String
orderBy
;
Boolean
isASC
;
//合同名称
String
name
;
/**
* 发起状态
* */
private
String
initiateStatus
;
/**
* 农户id
*/
private
Long
peasantHouseholdId
;
/**
* 经销商id
*/
private
Long
dealerId
;
/**
* 勘察状态
*/
private
String
surveyStatus
;
/**
* 签字状态
*/
private
String
signStatus
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/TemplateParamDto.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/21
*/
@Data
public
class
TemplateParamDto
{
private
String
key
;
private
String
value
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/UnitInfoDto.java
View file @
15550b9a
...
...
@@ -93,6 +93,19 @@ public class UnitInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"管辖单位id"
)
private
String
managementUnitId
;
//所属区域公司id
private
Long
regionalCompaniesSeq
;
//所属区域公司名称
private
String
regionalCompaniesName
;
//所属区域公司code
private
String
regionalCompaniesCode
;
/**
*是否加入黑名单
* */
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/HouseholdContract.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
*
*
* @author system_generator
* @date 2023-08-21
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"hygf_household_contract"
)
public
class
HouseholdContract
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 勘察状态
*/
@TableField
(
"survey_status"
)
private
String
surveyStatus
;
/**
* 合同状态
*/
@TableField
(
"status"
)
private
String
status
;
/**
* 签字状态
*/
@TableField
(
"sign_status"
)
private
String
signStatus
;
/**
* 盖章状态
*/
@TableField
(
"stamp_status"
)
private
String
stampStatus
;
/**
* 甲方
*/
@TableField
(
"party_a"
)
private
String
partyA
;
/**
* 乙方
*/
@TableField
(
"party_b"
)
private
String
partyB
;
/**
* 合同编号
*/
@TableField
(
"contract_number"
)
private
String
contractNumber
;
/**
* 农户编号
*/
@TableField
(
"peasant_household_number"
)
private
String
peasantHouseholdNumber
;
/**
* 农户身份证
*/
@TableField
(
"peasant_household_card"
)
private
String
peasantHouseholdCard
;
/**
* 经销商id
*/
@TableField
(
"dealer_id"
)
private
Long
dealerId
;
/**
* 经销商code
*/
@TableField
(
"dealer_code"
)
private
String
dealerCode
;
/**
* 经销商名称
*/
@TableField
(
"dealer_name"
)
private
String
dealerName
;
/**
* 合同名称
*/
@TableField
(
"name"
)
private
String
name
;
/**
* 模板id
*/
@TableField
(
"contract_template_id"
)
private
Long
contractTemplateId
;
/**
* 合同文件地址
*/
@TableField
(
"contract_url"
)
private
String
contractUrl
;
/**
* 办理人
*/
@TableField
(
"sealed_user"
)
private
String
sealedUser
;
/**
* 农户id
*/
@TableField
(
"peasant_household_id"
)
private
Long
peasantHouseholdId
;
/**
* 所属区域公司id
*/
@TableField
(
"regional_companies_seq"
)
private
Long
regionalCompaniesSeq
;
/**
* 所属区域公司名称
*/
@TableField
(
"regional_companies_name"
)
private
String
regionalCompaniesName
;
/**
* 所属区域公司code
*/
@TableField
(
"regional_companies_code"
)
private
String
regionalCompaniesCode
;
/**
* 农户手机号
*/
@TableField
(
"peasant_household_phone"
)
private
String
peasantHouseholdPhone
;
/**
* 项目详细地址
*/
@TableField
(
"project_address_detail"
)
private
String
projectAddressDetail
;
/**
* 常住详细地址
*/
@TableField
(
"permanent_address_detail"
)
private
String
permanentAddressDetail
;
/**
* 常住地址
*/
@TableField
(
"permanent_address_name"
)
private
String
permanentAddressName
;
/**
* 项目地址
*/
@TableField
(
"project_address_name"
)
private
String
projectAddressName
;
/**
* 免租期
免租期
*/
@TableField
(
"rent_free"
)
private
String
rentFree
;
/**
* 租金计算日期
*/
@TableField
(
"rent_calculation_date"
)
private
Date
rentCalculationDate
;
/**
* 租期结束日期
*/
@TableField
(
"lease_end_date"
)
private
Date
leaseEndDate
;
/**
* 建设规模
*/
@TableField
(
"construction_scale"
)
private
Double
constructionScale
;
/**
* 组件数量块
*/
@TableField
(
"component_quantity_block"
)
private
Integer
componentQuantityBlock
;
/**
* 总投资
*/
@TableField
(
"total_investment"
)
private
Double
totalInvestment
;
/**
* 组件功率
*/
@TableField
(
"component_power"
)
private
Double
componentPower
;
/**
* 电站功率
*/
@TableField
(
"station_power"
)
private
Double
stationPower
;
/***
*合同契约锁id'
* */
@TableField
(
"contract_lock_id"
)
private
Double
contractLockId
;
/**
* 印章id
* */
@TableField
(
"seal_id"
)
private
Double
sealId
;
/**
* 发起状态
* */
@TableField
(
"initiate_status"
)
private
String
initiateStatus
;
/**
* 签署时间
* */
@TableField
(
"signing_time"
)
private
Date
signingTime
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/PreparationMoney.java
View file @
15550b9a
...
...
@@ -181,5 +181,11 @@ public class PreparationMoney extends BaseEntity {
*/
@TableField
(
"total_price"
)
private
Double
totalPrice
;
/**
*
* 验证 状态
* */
@TableField
(
"validating"
)
private
String
validating
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/UnitInfo.java
View file @
15550b9a
...
...
@@ -181,6 +181,17 @@ public class UnitInfo extends BaseEntity {
//所属区域公司id
@TableField
(
"regional_companies_seq"
)
private
Long
regionalCompaniesSeq
;
//所属区域公司名称
@TableField
(
"regional_companies_name"
)
private
String
regionalCompaniesName
;
//所属区域公司code
@TableField
(
"regional_companies_code"
)
private
String
regionalCompaniesCode
;
@TableField
(
exist
=
false
)
private
List
<
CommonFile
>
headCardPhotoFrontList
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/HouseholdContractMapper.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* Mapper 接口
*
* @author system_generator
* @date 2023-08-21
*/
public
interface
HouseholdContractMapper
extends
BaseMapper
<
HouseholdContract
>
{
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IHouseholdContractService.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
/**
* 接口类
*
* @author system_generator
* @date 2023-08-21
*/
public
interface
IHouseholdContractService
{
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/HouseholdContractMapper.xml
0 → 100644
View file @
15550b9a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.api.mapper.HouseholdContractMapper"
>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HouseholdContractController.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.HouseholdContractEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HouseholdContractPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.HouseholdContractServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HouseholdContractDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
/**
*
*
* @author system_generator
* @date 2023-08-21
*/
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/household-contract"
)
public
class
HouseholdContractController
extends
BaseController
{
@Autowired
HouseholdContractServiceImpl
householdContractServiceImpl
;
/**
* 新增
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
HouseholdContractDto
>
save
(
@RequestBody
HouseholdContractDto
model
)
{
model
=
householdContractServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
HouseholdContractDto
>
updateBySequenceNbrHouseholdContract
(
@RequestBody
HouseholdContractDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
householdContractServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除"
,
notes
=
"根据sequenceNbr删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
householdContractServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
HouseholdContractDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
householdContractServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
IPage
<
HouseholdContract
>
>
queryForPage
(
HouseholdContractPageDto
dto
)
{
return
ResponseHelper
.
buildResponse
(
householdContractServiceImpl
.
queryForPreparationMoneyPage
(
dto
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
HouseholdContractDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
householdContractServiceImpl
.
queryForHouseholdContractList
());
}
//去签署
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"根据sequenceNbr发起"
,
notes
=
"根据sequenceNbr发起"
)
public
ResponseModel
<
HouseholdContractDto
>
qsBySequenceNbrHouseholdContract
(
@RequestBody
HouseholdContractDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
householdContractServiceImpl
.
updateWithModel
(
model
));
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/QiyuesuoController.java
0 → 100644
View file @
15550b9a
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/controller/UnitInfoController.java
View file @
15550b9a
...
...
@@ -17,6 +17,7 @@ import com.yeejoin.amos.component.feign.config.InnerInvokException;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -72,6 +73,10 @@ public class UnitInfoController extends BaseController {
@Value
(
"${hygf.sms.tempCode}"
)
private
String
smsTempCode
;
@Value
(
"${regionalCompanies.company.seq}"
)
private
Long
regionalCompanies
;
@Autowired
SendSmsCode
sendSmsCode
;
...
...
@@ -231,12 +236,15 @@ public class UnitInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/management-unit/tree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"管辖机构树"
,
notes
=
"管辖机构树"
)
public
ResponseModel
<
Collection
>
managementUnitTree
(
@RequestParam
(
required
=
false
)
String
orgCode
)
{
public
ResponseModel
<
Collection
<
CompanyModel
>
>
managementUnitTree
(
@RequestParam
(
required
=
false
)
String
orgCode
)
{
RequestContext
.
setAppKey
(
"AMOS_STUDIO"
);
RequestContext
.
setProduct
(
"AMOS_STUDIO_WEB"
);
RequestContext
.
setToken
(
requestContext
.
getToken
());
Collection
result
=
unitInfoServiceImpl
.
getManagementUnitTree
(
orgCode
);
return
ResponseHelper
.
buildResponse
(
result
);
FeignClientResult
<
Collection
<
CompanyModel
>>
feignClientResult
=
Privilege
.
companyClient
.
querySubAgencyTree
(
regionalCompanies
);
Collection
<
CompanyModel
>
companyModel
=
(
List
<
CompanyModel
>)
feignClientResult
.
getResult
();
return
ResponseHelper
.
buildResponse
(
companyModel
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HouseholdContractServiceImpl.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.HouseholdContractEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HouseholdContractPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PreparationPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PreparationMoney
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.HouseholdContractMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IHouseholdContractService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HouseholdContractDto
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
/**
* 服务实现类
*
* @author system_generator
* @date 2023-08-21
*/
@Service
public
class
HouseholdContractServiceImpl
extends
BaseService
<
HouseholdContractDto
,
HouseholdContract
,
HouseholdContractMapper
>
implements
IHouseholdContractService
{
@Autowired
HouseholdContractMapper
householdContractMapper
;
/**
* 列表查询 示例
*/
public
List
<
HouseholdContractDto
>
queryForHouseholdContractList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 分页查询
*/
public
IPage
<
HouseholdContract
>
queryForPreparationMoneyPage
(
HouseholdContractPageDto
dto
)
{
//列表数据组装
QueryWrapper
<
HouseholdContract
>
qw
=
new
QueryWrapper
<>();
qw
.
like
(
StringUtils
.
isNotEmpty
(
dto
.
getName
()),
"name"
,
dto
.
getName
());
qw
.
eq
(
StringUtils
.
isNotEmpty
(
dto
.
getInitiateStatus
()),
"initiate_status"
,
dto
.
getInitiateStatus
()
);
qw
.
eq
(
dto
.
getPeasantHouseholdId
()!=
null
,
"peasant_household_id"
,
dto
.
getPeasantHouseholdId
()
);
qw
.
eq
(
dto
.
getDealerId
()!=
null
,
"dealer_id"
,
dto
.
getDealerId
()
);
qw
.
eq
(
StringUtils
.
isNotEmpty
(
dto
.
getInitiateStatus
()),
"initiate_status"
,
dto
.
getInitiateStatus
()
);
qw
.
eq
(
StringUtils
.
isNotEmpty
(
dto
.
getSurveyStatus
()),
"survey_status"
,
dto
.
getSurveyStatus
()
);
qw
.
eq
(
StringUtils
.
isNotEmpty
(
dto
.
getSignStatus
()),
"sign_status"
,
dto
.
getSignStatus
()
);
if
(
StringUtils
.
isNotEmpty
(
dto
.
getOrderBy
()))
{
qw
.
orderBy
(
Boolean
.
TRUE
,
dto
.
getIsASC
(),
dto
.
getOrderBy
());
}
else
{
qw
.
orderBy
(
Boolean
.
TRUE
,
Boolean
.
FALSE
,
"rec_date"
);
}
IPage
<
HouseholdContract
>
warningQuestionInfoIPage
=
householdContractMapper
.
selectPage
(
dto
,
qw
);
return
warningQuestionInfoIPage
;
}
//农户注册成功后生成合同
public
void
addHouseholdContract
(
HouseholdContract
householdContract
){
householdContract
.
setContractNumber
(
this
.
getnum
());
//合同编号
householdContract
.
setSurveyStatus
(
HouseholdContractEnum
.
勘察状态
_
未勘察
.
getCode
());
householdContract
.
setStatus
(
HouseholdContractEnum
.
合同状态
_
未签署
.
getCode
());
householdContract
.
setSignStatus
(
HouseholdContractEnum
.
签字状态
_
未签字
.
getCode
());
householdContract
.
setStampStatus
(
HouseholdContractEnum
.
盖章状态
_
未盖章
.
getCode
());
householdContract
.
setInitiateStatus
(
HouseholdContractEnum
.
发起状态
_
未发起
.
getCode
());
householdContractMapper
.
insert
(
householdContract
);
}
public
String
getnum
()
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"YYYYMMddHHmmssSSS"
);
Date
date
=
new
Date
();
String
s
=
"HT"
+
format
.
format
(
date
);
return
s
;
}
}
\ 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/QiyuesuoServiceImpl.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.qiyuesuo.sdk.v2.SdkClient
;
import
com.qiyuesuo.sdk.v2.bean.*
;
import
com.qiyuesuo.sdk.v2.exception.BaseSdkException
;
import
com.qiyuesuo.sdk.v2.json.JSONUtils
;
import
com.qiyuesuo.sdk.v2.request.*
;
import
com.qiyuesuo.sdk.v2.response.DocumentAddResult
;
import
com.qiyuesuo.sdk.v2.response.MiniappTicketResult
;
import
com.qiyuesuo.sdk.v2.response.SdkResponse
;
import
com.yeejoin.amos.boot.module.common.api.dto.ContractDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ContractDataDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TemplateParamDto
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/21
*/
@Service
public
class
QiyuesuoServiceImpl
{
@Value
(
"${qiyuesuo.serverUrl}"
)
String
serverUrl
;
@Value
(
"${qiyuesuo.accessKey}"
)
String
accessKey
;
@Value
(
"${qiyuesuo.accessSecret}"
)
String
accessSecret
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
QiyuesuoServiceImpl
.
class
);
/***
*
* 个人权限
* */
public
SdkResponse
<
MiniappTicketResult
>
getSdkResponse
(
UserAuthMiniappTicketRequest
request
){
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
String
response
=
null
;
try
{
response
=
sdkClient
.
service
(
request
);
}
catch
(
Exception
e
)
{
throw
new
BaseSdkException
(
"调用接口错误,错误原因:"
+
e
.
getMessage
());
}
SdkResponse
<
MiniappTicketResult
>
result
=
JSONUtils
.
toQysResponse
(
response
,
MiniappTicketResult
.
class
);
if
(!
result
.
getCode
().
equals
(
0
))
{
throw
new
BaseSdkException
(
"获取个人认证Ticket失败,失败原因:"
+
result
.
getCode
()+
","
+
result
.
getMessage
());
}
return
result
;
}
/**
合同授权
*
* **/
public
SdkResponse
<
MiniappTicketResult
>
getContractSdkResponse
(
ContractMiniappTicketRequest
request
){
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
String
response
=
null
;
try
{
response
=
sdkClient
.
service
(
request
);
}
catch
(
Exception
e
)
{
throw
new
BaseSdkException
(
"调用接口错误,错误原因:"
+
e
.
getMessage
());
}
SdkResponse
<
MiniappTicketResult
>
result
=
JSONUtils
.
toQysResponse
(
response
,
MiniappTicketResult
.
class
);
if
(!
result
.
getCode
().
equals
(
0
))
{
throw
new
BaseSdkException
(
"获取合同签署Ticket失败,失败原因:"
+
result
.
getCode
()
+
","
+
result
.
getMessage
());
}
return
result
;
}
/**
*创建合同
*
*
* **/
public
Long
addContract
(
ContractDataDto
contractDataDto
,
List
<
TemplateParamDto
>
templateParam
){
String
username
=
contractDataDto
.
getUsername
();
String
contact
=
contractDataDto
.
getContact
();
String
IDCard
=
contractDataDto
.
getIDCard
();
String
subject
=
contractDataDto
.
getSubject
();
String
endTime
=
contractDataDto
.
getEndTime
();
String
expireTime
=
contractDataDto
.
getExpireTime
();
String
category
=
contractDataDto
.
getCategory
();
String
companyTenantName
=
contractDataDto
.
getCompanyTenantName
();
String
companyUsername
=
contractDataDto
.
getCompanyUsername
();
String
companyContact
=
contractDataDto
.
getCompanyContact
();
Long
emplateId
=
contractDataDto
.
getEmplateId
();
String
companykeyword
=
contractDataDto
.
getCompanykeyword
();
Integer
companyPage
=
contractDataDto
.
getCompanyPage
();
Double
companyOffsetX
=
contractDataDto
.
getCompanyOffsetX
();
Double
companyOffsetY
=
contractDataDto
.
getCompanyOffsetY
();
String
personalkeyword
=
contractDataDto
.
getPersonalkeyword
();
Integer
personalPage
=
contractDataDto
.
getPersonalPage
();
Double
personalOffsetX
=
contractDataDto
.
getPersonalOffsetX
();
Double
personalOffsetY
=
contractDataDto
.
getPersonalOffsetY
();
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
// 合同基本参数
//进行日期格式化
Contract
contract
=
new
Contract
();
contract
.
setSubject
(
subject
);
contract
.
setDescription
(
subject
);
contract
.
setExpireTime
(
expireTime
);
contract
.
setEndTime
(
endTime
);
contract
.
setCategory
(
new
Category
(
category
));
contract
.
setSend
(
false
);
// 个人
Signatory
signatory1
=
new
Signatory
();
signatory1
.
setTenantName
(
username
);
signatory1
.
setTenantType
(
"PERSONAL"
);
signatory1
.
setReceiver
(
new
User
(
username
,
contact
,
"MOBILE"
));
signatory1
.
setSerialNo
(
1
);
// 对接方
Signatory
signatory2
=
new
Signatory
();
signatory2
.
setTenantName
(
companyTenantName
);
signatory2
.
setTenantType
(
"COMPANY"
);
signatory2
.
setReceiver
(
new
User
(
companyUsername
,
companyContact
,
"MOBILE"
));
signatory2
.
setSerialNo
(
2
);
Action
action
=
new
Action
(
"COMPANY"
,
0
);
signatory2
.
addAction
(
action
);
// 设置签署方
contract
.
addSignatory
(
signatory1
);
contract
.
addSignatory
(
signatory2
);
// 创建合同
ContractDraftRequest
request
=
new
ContractDraftRequest
(
contract
);
String
response
=
sdkClient
.
service
(
request
);
SdkResponse
<
Contract
>
responseObj
=
JSONUtils
.
toQysResponse
(
response
,
Contract
.
class
);
// 返回结果
Contract
result
=
new
Contract
();
if
(
responseObj
.
getCode
()
==
0
)
{
result
=
responseObj
.
getResult
();
logger
.
info
(
JSON
.
toJSONString
(
responseObj
));
}
else
{
logger
.
info
(
"请求失败,错误码:{},错误信息:{}"
,
responseObj
.
getCode
(),
responseObj
.
getMessage
());
}
DocumentAddResult
documentAddResult
=
this
.
getDocumentAddResult
(
result
.
getId
(),
subject
,
templateParam
,
emplateId
);
List
<
Signatory
>
list
=
result
.
getSignatories
();
Long
ActionId
=
null
;
Long
SignatoryId
=
null
;
for
(
Signatory
signatory
:
list
)
{
if
(
signatory
.
getTenantType
().
equals
(
"COMPANY"
)){
ActionId
=
signatory
.
getActions
().
get
(
0
).
getId
();
}
else
{
SignatoryId
=
signatory
.
getId
();
}
}
// 发起时可以设置签署位置
Stamper
stamper
=
new
Stamper
();
stamper
.
setActionId
(
ActionId
);
stamper
.
setDocumentId
(
documentAddResult
.
getDocumentId
());
stamper
.
setKeyword
(
companykeyword
);
stamper
.
setType
(
"COMPANY"
);
stamper
.
setPage
(
companyPage
);
stamper
.
setOffsetX
(
companyOffsetX
);
stamper
.
setOffsetY
(
companyOffsetY
);
Stamper
stamper2
=
new
Stamper
();
stamper2
.
setSignatoryId
(
SignatoryId
);
stamper2
.
setDocumentId
(
documentAddResult
.
getDocumentId
());
stamper
.
setKeyword
(
personalkeyword
);
stamper2
.
setType
(
"PERSONAL"
);
stamper2
.
setPage
(
personalPage
);
stamper2
.
setOffsetX
(
personalOffsetX
);
stamper2
.
setOffsetY
(
personalOffsetY
);
List
<
Stamper
>
stampers
=
new
ArrayList
<>();
stampers
.
add
(
stamper
);
stampers
.
add
(
stamper2
);
SdkResponse
<
Object
>
data
=
this
.
getSdkResponse
(
result
.
getId
(),
stampers
);
return
result
.
getId
();
}
public
DocumentAddResult
getDocumentAddResult
(
Long
contractId
,
String
subject
,
List
<
TemplateParamDto
>
templateParam
,
Long
emplateId
)
{
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
// 添加合同文档
List
<
TemplateParam
>
params
=
new
ArrayList
<>();
for
(
TemplateParamDto
templateParamDto
:
templateParam
)
{
params
.
add
(
new
TemplateParam
(
templateParamDto
.
getKey
(),
templateParamDto
.
getValue
()));
}
DocumentAddByTemplateRequest
request
=
new
DocumentAddByTemplateRequest
(
contractId
,
emplateId
,
params
,
subject
);
String
response
=
sdkClient
.
service
(
request
);
SdkResponse
<
DocumentAddResult
>
responseObj
=
JSONUtils
.
toQysResponse
(
response
,
DocumentAddResult
.
class
);
DocumentAddResult
result
=
null
;
if
(
responseObj
.
getCode
()
==
0
)
{
result
=
responseObj
.
getResult
();
logger
.
info
(
"添加合同文档成功,文档ID:{}"
,
JSON
.
toJSONString
(
result
));
}
else
{
logger
.
info
(
"请求失败,错误码:{},错误信息:{}"
,
responseObj
.
getCode
(),
responseObj
.
getMessage
());
}
return
result
;
}
public
SdkResponse
<
Object
>
getSdkResponse
(
Long
contractId
,
List
<
Stamper
>
stampers
){
SdkClient
sdkClient
=
new
SdkClient
(
serverUrl
,
accessKey
,
accessSecret
);
// 发起合同
SdkResponse
<
Object
>
responseObj
=
null
;
ContractSendRequest
request
=
new
ContractSendRequest
(
contractId
,
stampers
);
String
response
=
sdkClient
.
service
(
request
);
responseObj
=
JSONUtils
.
toQysResponse
(
response
);
if
(
responseObj
.
getCode
()
==
0
)
{
logger
.
info
(
"合同发起成功"
);
}
else
{
logger
.
info
(
"请求失败,错误码:{},错误信息:{}"
,
responseObj
.
getCode
(),
responseObj
.
getMessage
());
}
return
responseObj
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-dev.properties
View file @
15550b9a
...
...
@@ -111,4 +111,7 @@ hygf.user.group.id=1679755750924120066
unitInfo.station.examine.planId
=
51776087-a9cf-4a87-9a03-24fd24a8cf45
hygf.sms.tempCodeJXS
=
SMS_HYGF_0002
\ No newline at end of file
hygf.sms.tempCodeJXS
=
SMS_HYGF_0002
regionalCompanies.company.seq
=
1693499571071619074
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/Enum/SmartAnalyseEnum.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
Enum
;
public
enum
SmartAnalyseEnum
{
FAN_QJHF
(
"FAN_QJHF"
,
"风机区间变量划分"
),
FAN_XGX
(
"FAN_XGX"
,
"风机相关性"
),
FAN_ZXZ
(
"FAN_ZXZ"
,
"风机中心值"
),
PV_QJHF
(
"PV_QJHF"
,
"光伏区间变量划分"
),
PV_XGX
(
"PV_XGX"
,
"光伏相关性"
),
PV_ZXZ
(
"PV_ZXZ"
,
"光伏中心值"
);
private
String
key
;
private
String
name
;
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
SmartAnalyseEnum
(
String
key
,
String
name
)
{
this
.
key
=
key
;
this
.
name
=
name
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/Thread/MyServiceThread.java
0 → 100644
View file @
15550b9a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
Thread
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.SmartAnalyseEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.util.HashMap
;
public
class
MyServiceThread
extends
Thread
{
Logger
logger
=
LoggerFactory
.
getLogger
(
MyServiceThread
.
class
);
private
String
startTime
;
private
String
endTime
;
private
CommonServiceImpl
commonService
;
private
String
type
;
public
MyServiceThread
(
CommonServiceImpl
commonService
,
String
startTime
,
String
endTime
,
String
type
)
{
this
.
commonService
=
commonService
;
this
.
startTime
=
startTime
;
this
.
endTime
=
endTime
;
this
.
type
=
type
;
}
@Override
public
void
run
()
{
if
(
type
.
equals
(
SmartAnalyseEnum
.
FAN_QJHF
.
getKey
()))
{
this
.
commonService
.
getFanConditionVariablesByTime
(
this
.
startTime
,
this
.
endTime
);
logger
.
info
(
"--------------------------开始通过线程调用风机区间划分算法-----------------------"
);
}
else
if
(
type
.
equals
(
SmartAnalyseEnum
.
FAN_XGX
.
getKey
()))
{
this
.
commonService
.
getFanConditionVariablesByTimeAnalyse
(
startTime
,
endTime
);
logger
.
info
(
"--------------------------开始通过线程调用风机相关性算法-----------------------"
);
}
else
if
(
type
.
equals
(
SmartAnalyseEnum
.
FAN_ZXZ
.
getKey
()))
{
this
.
commonService
.
getFanConditionVariablesByTimeAnalyse1
(
startTime
,
endTime
);
logger
.
info
(
"--------------------------开始通过线程调用风机中心值算法-----------------------"
);
}
else
if
(
type
.
equals
(
SmartAnalyseEnum
.
PV_QJHF
.
getKey
()))
{
this
.
commonService
.
getPvConditionVariablesByTime
(
startTime
,
endTime
);
logger
.
info
(
"--------------------------开始通过线程调用光伏区间划分算法-----------------------"
);
}
else
if
(
type
.
equals
(
SmartAnalyseEnum
.
PV_XGX
.
getKey
()))
{
this
.
commonService
.
getPvConditionVariablesByTimeAnalyse
(
startTime
,
endTime
);
logger
.
info
(
"--------------------------开始通过线程调用光伏相关性算法-----------------------"
);
}
else
if
(
type
.
equals
(
SmartAnalyseEnum
.
PV_ZXZ
.
getKey
()))
{
this
.
commonService
.
getPvConditionVariablesByTimeAnalyse1
(
startTime
,
endTime
);
logger
.
info
(
"--------------------------开始通过线程调用光伏中心值算法-----------------------"
);
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/AnalyseController.java
View file @
15550b9a
...
...
@@ -29,38 +29,38 @@ public class AnalyseController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"工况测点区间划分-风机"
,
notes
=
"工况测点区间划分-风机"
)
@GetMapping
(
value
=
"/getFanConditionVariablesByTime"
)
public
void
getFanConditionVariablesByTime
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
commonServiceImpl
.
getFanConditionVariablesByTime
(
startTime
,
endTime
);
public
ResponseModel
<
String
>
getFanConditionVariablesByTime
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getFanConditionVariablesByTimeThread
(
startTime
,
endTime
)
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"工况测点区间划分-光伏"
,
notes
=
"工况测点区间划分-光伏"
)
@GetMapping
(
value
=
"/getPvConditionVariablesByTime"
)
public
void
getPvConditionVariablesByTime
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
commonServiceImpl
.
getPvConditionVariablesByTime
(
startTime
,
endTime
);
public
ResponseModel
<
String
>
getPvConditionVariablesByTime
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getPvConditionVariablesByTimeThread
(
startTime
,
endTime
)
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"相关性分析-风机"
,
notes
=
"相关性分析-风机"
)
@GetMapping
(
value
=
"/getFanConditionVariablesByTimeAnalyse"
)
public
void
getFanConditionVariablesByTimeAnalyse
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
commonServiceImpl
.
getFanConditionVariablesByTimeAnalyse
(
startTime
,
endTime
);
public
ResponseModel
<
String
>
getFanConditionVariablesByTimeAnalyse
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getFanConditionVariablesByTimeAnalyseThread
(
startTime
,
endTime
)
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"相关性分析-风机"
,
notes
=
"相关性分析-风机"
)
@GetMapping
(
value
=
"/getPvConditionVariablesByTimeAnalyse"
)
public
void
getPvConditionVariablesByTimeAnalyse
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
commonServiceImpl
.
getPvConditionVariablesByTimeAnalyse
(
startTime
,
endTime
);
public
ResponseModel
<
String
>
getPvConditionVariablesByTimeAnalyse
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getPvConditionVariablesByTimeAnalyseThread
(
startTime
,
endTime
)
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"中心值计算-风机"
,
notes
=
"中心值计算-风机"
)
@GetMapping
(
value
=
"/getFanConditionVariablesByTimeAnalyse1"
)
public
void
getFanConditionVariablesByTimeAnalyse1
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
commonServiceImpl
.
getFanConditionVariablesByTimeAnalyse1
(
startTime
,
endTime
);
public
ResponseModel
<
String
>
getFanConditionVariablesByTimeAnalyse1
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getFanConditionVariablesByTimeAnalyse1Thread
(
startTime
,
endTime
)
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"中心值计算-光伏"
,
notes
=
"中心值计算-光伏"
)
@GetMapping
(
value
=
"/getPvConditionVariablesByTimeAnalyse1"
)
public
void
getPvConditionVariablesByTimeAnalyse1
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
commonServiceImpl
.
getPvConditionVariablesByTimeAnalyse1
(
startTime
,
endTime
);
public
ResponseModel
<
String
>
getPvConditionVariablesByTimeAnalyse1
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
)
{
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getPvConditionVariablesByTimeAnalyse1Thread
(
startTime
,
endTime
)
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
15550b9a
...
...
@@ -7,6 +7,8 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.SmartAnalyseEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Thread.MyServiceThread
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointProcessVariableClassificationDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointProcessVariableClassificationDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.*
;
...
...
@@ -36,6 +38,7 @@ import java.util.stream.Collectors;
@Service
public
class
CommonServiceImpl
{
private
static
final
HashMap
<
String
,
Object
>
cacheExecInfo
=
new
HashMap
<>();
//utc时间格式
public
static
final
String
FORMAT_UTC
=
"yyyy-MM-dd'T'HH:mm:ss'Z'"
;
public
static
final
String
FORMAT_DEFAULT
=
"yyyy-MM-dd HH:mm:ss"
;
...
...
@@ -50,21 +53,21 @@ public class CommonServiceImpl {
//----------------工况变量工况变量划分请求属性配置------------------------
@Value
(
"${gkblhffan.url:74435221-796d-43c0-ae72-319792b8f89e}"
)
String
gkqjhfurlfan
;
@Value
(
"${gkblhfpv.url:
e884fccf-b7ac-4fa4-bdb7-a5b6ff7319ec
}"
)
@Value
(
"${gkblhfpv.url:
728d13ae-f333-4e36-b55c-6a0b6bb3b150
}"
)
String
gkqjhfurlpv
;
@Value
(
"${gkblhf.key:input 1}"
)
String
gkqjhfkey
;
//----------------工况变量相关性计算请求属性配置------------------------
@Value
(
"${gkxgxfxfan.url:b5797e0a-d456-44d3-9f21-9528e5321b74}"
)
String
gkxgxfxurlfan
;
@Value
(
"${gkxgxfxpv.url:
f5457bfe-0780-418d-9287-c4f31d3fb4c7
}"
)
@Value
(
"${gkxgxfxpv.url:
3d583330-1b3c-4c7a-b904-9e94f3de9fc9
}"
)
String
gkxgxfxurlpv
;
@Value
(
"${gkxgxfx.key:input 1}"
)
String
gkxgxfxkey
;
//----------------工况变量中心值计算相关请求属性配置------------------------
@Value
(
"${gkzxzjsfan.url:a6f8d689-0028-445e-b797-493b5ac65e42}"
)
String
gkzxzjsurlfan
;
@Value
(
"${gkzxzjspv.url:
5c9fc897-a9f2-4563-8d7b-8cf60c6a663f
}"
)
@Value
(
"${gkzxzjspv.url:
0945f8f6-faa6-4bd6-87fd-c7bed37d9bdc
}"
)
String
gkzxzjsurlpv
;
@Value
(
"${gkzxzjs.key:input 1}"
)
String
gkzxzjskey1
;
...
...
@@ -144,6 +147,18 @@ public class CommonServiceImpl {
return
idxBizPvPointProcessVariableClassificationHashMap
;
}
public
String
getFanConditionVariablesByTimeThread
(
String
startTime
,
String
endTime
)
{
String
result
=
"开始计算"
;
if
(!
ObjectUtils
.
isEmpty
(
cacheExecInfo
.
get
(
SmartAnalyseEnum
.
FAN_QJHF
.
getKey
()))){
result
=
"正在计算中"
;
}
else
{
MyServiceThread
myServiceThread
=
new
MyServiceThread
(
this
,
startTime
,
endTime
,
SmartAnalyseEnum
.
FAN_QJHF
.
getKey
());
myServiceThread
.
start
();
cacheExecInfo
.
put
(
SmartAnalyseEnum
.
FAN_QJHF
.
getKey
(),
myServiceThread
);
}
return
result
;
}
//遍历工况列表数据-风机
public
void
getFanConditionVariablesByTime
(
String
startTime
,
String
endTime
)
{
String
startTimeUTC
=
getUtcTimeString
(
startTime
);
...
...
@@ -155,6 +170,19 @@ public class CommonServiceImpl {
foreachHandlerConditionVariabFan
(
s
,
list
,
startTimeUTC
,
endTimeUTC
);
}
});
cacheExecInfo
.
remove
(
SmartAnalyseEnum
.
FAN_QJHF
.
getKey
());
}
public
String
getPvConditionVariablesByTimeThread
(
String
startTime
,
String
endTime
)
{
String
result
=
"开始计算"
;
if
(!
ObjectUtils
.
isEmpty
(
cacheExecInfo
.
get
(
SmartAnalyseEnum
.
PV_QJHF
.
getKey
()))){
result
=
"正在计算中"
;
}
else
{
MyServiceThread
myServiceThread
=
new
MyServiceThread
(
this
,
startTime
,
endTime
,
SmartAnalyseEnum
.
PV_QJHF
.
getKey
());
myServiceThread
.
start
();
cacheExecInfo
.
put
(
SmartAnalyseEnum
.
PV_QJHF
.
getKey
(),
myServiceThread
);
}
return
result
;
}
//遍历工况列表数据-光伏
...
...
@@ -168,6 +196,7 @@ public class CommonServiceImpl {
foreachHandlerConditionVariabPv
(
s
,
list
,
startTimeUTC
,
endTimeUTC
);
}
});
cacheExecInfo
.
remove
(
SmartAnalyseEnum
.
FAN_QJHF
.
getKey
());
}
//遍历查询数据并调用并计算-风机
...
...
@@ -284,6 +313,17 @@ public class CommonServiceImpl {
return
idxBizPvPointProcessVariableClassificationHashMap
;
}
public
String
getFanConditionVariablesByTimeAnalyseThread
(
String
startTime
,
String
endTime
)
{
String
result
=
"开始计算"
;
if
(!
ObjectUtils
.
isEmpty
(
cacheExecInfo
.
get
(
SmartAnalyseEnum
.
FAN_XGX
.
getKey
()))){
result
=
"正在计算中"
;
}
else
{
MyServiceThread
myServiceThread
=
new
MyServiceThread
(
this
,
startTime
,
endTime
,
SmartAnalyseEnum
.
FAN_XGX
.
getKey
());
myServiceThread
.
start
();
cacheExecInfo
.
put
(
SmartAnalyseEnum
.
FAN_XGX
.
getKey
(),
myServiceThread
);
}
return
result
;
}
//相关性分析-风机入口
public
void
getFanConditionVariablesByTimeAnalyse
(
String
startTime
,
String
endTime
)
{
String
startTimeUTC
=
getUtcTimeString
(
startTime
);
...
...
@@ -298,8 +338,20 @@ public class CommonServiceImpl {
}
});
});
cacheExecInfo
.
remove
(
SmartAnalyseEnum
.
FAN_XGX
.
getKey
());
}
public
String
getPvConditionVariablesByTimeAnalyseThread
(
String
startTime
,
String
endTime
)
{
String
result
=
"开始计算"
;
if
(!
ObjectUtils
.
isEmpty
(
cacheExecInfo
.
get
(
SmartAnalyseEnum
.
PV_XGX
.
getKey
()))){
result
=
"正在计算中"
;
}
else
{
MyServiceThread
myServiceThread
=
new
MyServiceThread
(
this
,
startTime
,
endTime
,
SmartAnalyseEnum
.
PV_XGX
.
getKey
());
myServiceThread
.
start
();
cacheExecInfo
.
put
(
SmartAnalyseEnum
.
PV_XGX
.
getKey
(),
myServiceThread
);
}
return
result
;
}
//相关性分析-光伏入口
public
void
getPvConditionVariablesByTimeAnalyse
(
String
startTime
,
String
endTime
)
{
String
startTimeUTC
=
getUtcTimeString
(
startTime
);
...
...
@@ -314,6 +366,7 @@ public class CommonServiceImpl {
}
});
});
cacheExecInfo
.
remove
(
SmartAnalyseEnum
.
PV_XGX
.
getKey
());
}
//遍历处理数据-组装风机
...
...
@@ -452,7 +505,18 @@ public class CommonServiceImpl {
return
resultList
;
}
//中心值计算-风电
public
String
getFanConditionVariablesByTimeAnalyse1Thread
(
String
startTime
,
String
endTime
)
{
String
result
=
"开始计算"
;
if
(!
ObjectUtils
.
isEmpty
(
cacheExecInfo
.
get
(
SmartAnalyseEnum
.
FAN_ZXZ
.
getKey
())))
{
result
=
"正在计算中"
;
}
else
{
MyServiceThread
myServiceThread
=
new
MyServiceThread
(
this
,
startTime
,
endTime
,
SmartAnalyseEnum
.
FAN_ZXZ
.
getKey
());
myServiceThread
.
start
();
cacheExecInfo
.
put
(
SmartAnalyseEnum
.
FAN_ZXZ
.
getKey
(),
myServiceThread
);
}
return
result
;
}
//中心值计算-风电
public
void
getFanConditionVariablesByTimeAnalyse1
(
String
startTime
,
String
endTime
)
{
String
startTimeUTC
=
getUtcTimeString
(
startTime
);
String
endTimeUTC
=
getUtcTimeString
(
endTime
);
...
...
@@ -466,8 +530,20 @@ public class CommonServiceImpl {
}
});
});
cacheExecInfo
.
remove
(
SmartAnalyseEnum
.
FAN_ZXZ
.
getKey
());
}
public
String
getPvConditionVariablesByTimeAnalyse1Thread
(
String
startTime
,
String
endTime
)
{
String
result
=
"开始计算"
;
if
(!
ObjectUtils
.
isEmpty
(
cacheExecInfo
.
get
(
SmartAnalyseEnum
.
PV_ZXZ
.
getKey
())))
{
result
=
"正在计算中"
;
}
else
{
MyServiceThread
myServiceThread
=
new
MyServiceThread
(
this
,
startTime
,
endTime
,
SmartAnalyseEnum
.
PV_ZXZ
.
getKey
());
myServiceThread
.
start
();
cacheExecInfo
.
put
(
SmartAnalyseEnum
.
PV_ZXZ
.
getKey
(),
myServiceThread
);
}
return
result
;
}
//中心值计算-光伏
public
void
getPvConditionVariablesByTimeAnalyse1
(
String
startTime
,
String
endTime
)
{
String
startTimeUTC
=
getUtcTimeString
(
startTime
);
...
...
@@ -483,6 +559,7 @@ public class CommonServiceImpl {
});
});
cacheExecInfo
.
remove
(
SmartAnalyseEnum
.
PV_ZXZ
.
getKey
());
}
//中心值参数组装-风电
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
View file @
15550b9a
...
...
@@ -210,7 +210,7 @@
<select
id=
"getPersonYardByPage"
resultType=
"java.util.Map"
>
SELECT
ifnull(b.name, '') as
n
ame ,
ifnull(b.name, '') as
personN
ame ,
ifnull(a.qrcode_color, '') AS qrCodeColor,
ifnull(c.station_name, '') AS stationName
FROM
...
...
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