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
cd4ee238
Commit
cd4ee238
authored
Aug 02, 2023
by
caotao
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
ac085722
79fc0cea
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
650 additions
and
44 deletions
+650
-44
FeignBasicAuthRequestInterceptor.java
...ot/biz/common/feign/FeignBasicAuthRequestInterceptor.java
+42
-0
FeignErrorDecoder.java
...yeejoin/amos/boot/biz/common/feign/FeignErrorDecoder.java
+26
-0
MultipartSupportConfig.java
...in/amos/boot/biz/common/feign/MultipartSupportConfig.java
+10
-8
DealerReviewEnum.java
...join/amos/boot/module/hygf/api/Enum/DealerReviewEnum.java
+42
-0
CommonFile.java
...com/yeejoin/amos/boot/module/hygf/api/dto/CommonFile.java
+29
-0
ReviewDto.java
.../com/yeejoin/amos/boot/module/hygf/api/dto/ReviewDto.java
+14
-0
UnitInfoData.java
...m/yeejoin/amos/boot/module/hygf/api/dto/UnitInfoData.java
+25
-0
UnitInfoDto.java
...om/yeejoin/amos/boot/module/hygf/api/dto/UnitInfoDto.java
+2
-2
CommerceInfo.java
...eejoin/amos/boot/module/hygf/api/entity/CommerceInfo.java
+9
-0
DealerReview.java
...eejoin/amos/boot/module/hygf/api/entity/DealerReview.java
+1
-1
UnitInfo.java
...om/yeejoin/amos/boot/module/hygf/api/entity/UnitInfo.java
+13
-2
IdxFeginService.java
...join/amos/boot/module/hygf/api/fegin/IdxFeginService.java
+26
-1
IDealerReviewService.java
...os/boot/module/hygf/api/service/IDealerReviewService.java
+4
-2
IUnitInfoService.java
...n/amos/boot/module/hygf/api/service/IUnitInfoService.java
+16
-0
DealerReviewMapper.xml
...hygf-api/src/main/resources/mapper/DealerReviewMapper.xml
+21
-3
UnitInfoController.java
...s/boot/module/hygf/biz/controller/UnitInfoController.java
+92
-6
WorkflowFeignClient.java
.../amos/boot/module/hygf/biz/feign/WorkflowFeignClient.java
+23
-4
DealerReviewServiceImpl.java
...module/hygf/biz/service/impl/DealerReviewServiceImpl.java
+111
-2
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+135
-4
application-dev.properties
...le-hygf-biz/src/main/resources/application-dev.properties
+6
-5
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+3
-4
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/feign/FeignBasicAuthRequestInterceptor.java
0 → 100644
View file @
cd4ee238
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
feign
;
import
feign.RequestInterceptor
;
import
feign.RequestTemplate
;
import
org.springframework.web.context.request.RequestAttributes
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/1
*/
public
class
FeignBasicAuthRequestInterceptor
implements
RequestInterceptor
{
public
FeignBasicAuthRequestInterceptor
()
{
}
@Override
public
void
apply
(
RequestTemplate
template
)
{
RequestAttributes
requestAttributes
=
RequestContextHolder
.
getRequestAttributes
();
if
(
requestAttributes
==
null
)
{
return
;
}
ServletRequestAttributes
attributes
=
(
ServletRequestAttributes
)
requestAttributes
;
HttpServletRequest
request
=
attributes
.
getRequest
();
//设置header
String
token
=
request
.
getHeader
(
"token"
);
if
(
token
==
null
)
{
token
=
request
.
getHeader
(
"X-Access-Token"
);
}
String
product
=
request
.
getHeader
(
"product"
);
String
appKey
=
request
.
getHeader
(
"appKey"
);
template
.
header
(
"token"
,
token
);
template
.
header
(
"product"
,
product
);
template
.
header
(
"appKey"
,
appKey
);
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/feign/FeignErrorDecoder.java
0 → 100644
View file @
cd4ee238
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
feign
;
import
feign.Response
;
import
feign.Util
;
import
feign.codec.ErrorDecoder
;
import
java.io.IOException
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/1
*/
public
class
FeignErrorDecoder
implements
ErrorDecoder
{
@Override
public
Exception
decode
(
String
s
,
Response
response
)
{
String
msg
=
null
;
try
{
msg
=
Util
.
toString
(
response
.
body
().
asReader
());
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
throw
new
RuntimeException
(
msg
);
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/feign/MultipartSupportConfig.java
View file @
cd4ee238
...
@@ -19,6 +19,15 @@ import feign.form.spring.SpringFormEncoder;
...
@@ -19,6 +19,15 @@ import feign.form.spring.SpringFormEncoder;
@Configuration
@Configuration
public
class
MultipartSupportConfig
{
public
class
MultipartSupportConfig
{
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* @return
*/
@Bean
public
FeignAuthRequestInterceptor
basicAuthRequestInterceptor
()
{
return
new
FeignAuthRequestInterceptor
();
}
@Autowired
@Autowired
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
...
@@ -26,12 +35,5 @@ public class MultipartSupportConfig {
...
@@ -26,12 +35,5 @@ public class MultipartSupportConfig {
public
Encoder
feignFormEncoder
()
{
public
Encoder
feignFormEncoder
()
{
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
}
}
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* @return
*/
@Bean
public
RequestContextListener
requestInterceptor
()
{
return
new
RequestContextListener
();
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/DealerReviewEnum.java
0 → 100644
View file @
cd4ee238
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/1
*/
@Getter
@AllArgsConstructor
public
enum
DealerReviewEnum
{
经销商确认
(
"经销商确认"
,
"jxs_02"
),
经销商管理员审核
(
"经销商管理员审核"
,
"jxs_03"
);
/**
* 名称,描述
*/
private
String
name
;
/**
* 编码
*/
private
String
code
;
public
static
DealerReviewEnum
getNodeByCode
(
String
code
)
{
DealerReviewEnum
dealerReviewEnum
=
null
;
for
(
DealerReviewEnum
type:
DealerReviewEnum
.
values
())
{
if
(
type
.
getCode
().
equals
(
code
))
{
dealerReviewEnum
=
type
;
break
;
}
}
return
dealerReviewEnum
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/CommonFile.java
0 → 100644
View file @
cd4ee238
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/2
*/
@Data
public
class
CommonFile
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
url
;
private
String
name
;
private
String
uid
;
private
String
status
;
public
CommonFile
(
String
url
,
String
name
,
String
uid
,
String
status
)
{
this
.
url
=
url
;
this
.
name
=
name
;
this
.
uid
=
uid
;
this
.
status
=
status
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/ReviewDto.java
View file @
cd4ee238
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
...
@@ -21,5 +22,18 @@ public class ReviewDto {
...
@@ -21,5 +22,18 @@ public class ReviewDto {
private
String
userNum
;
private
String
userNum
;
private
String
blacklist
;
private
String
blacklist
;
private
String
auditStatus
;
private
String
auditStatus
;
private
String
processInstanceId
;
private
String
taskId
;
private
String
processDefinitionId
;
private
String
nodeRouting
;
private
String
nodeRole
;
private
String
nextProcessNode
;
private
String
flowTaskId
;
private
String
planInstanceId
;
private
String
adminUserId
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/UnitInfoData.java
0 → 100644
View file @
cd4ee238
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.CommerceInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.UnitInfo
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/2
*/
@Data
public
class
UnitInfoData
{
UnitInfo
unitInfoJB
;
UnitInfo
unitInfoZH
;
CommerceInfo
unitInfoGS
;
public
UnitInfoData
(
UnitInfo
unitInfoJB
,
UnitInfo
unitInfoZH
,
CommerceInfo
unitInfoGS
)
{
this
.
unitInfoJB
=
unitInfoJB
;
this
.
unitInfoZH
=
unitInfoZH
;
this
.
unitInfoGS
=
unitInfoGS
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/UnitInfoDto.java
View file @
cd4ee238
...
@@ -96,9 +96,9 @@ public class UnitInfoDto extends BaseDto {
...
@@ -96,9 +96,9 @@ public class UnitInfoDto extends BaseDto {
/**
/**
*是否加入黑名单
*是否加入黑名单
* */
* */
private
String
blacklist
;
private
int
blacklist
;
/**
/**
*审核状态
*审核状态
* */
* */
private
String
auditStatus
;
private
int
auditStatus
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/CommerceInfo.java
View file @
cd4ee238
...
@@ -3,10 +3,12 @@ package com.yeejoin.amos.boot.module.hygf.api.entity;
...
@@ -3,10 +3,12 @@ package com.yeejoin.amos.boot.module.hygf.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.CommonFile
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* 经销商单位信息
* 经销商单位信息
...
@@ -70,4 +72,11 @@ public class CommerceInfo extends BaseEntity {
...
@@ -70,4 +72,11 @@ public class CommerceInfo extends BaseEntity {
@TableField
(
"unit_seq"
)
@TableField
(
"unit_seq"
)
private
Long
unitSeq
;
private
Long
unitSeq
;
@TableField
(
exist
=
false
)
private
List
<
CommonFile
>
legalPersonCardPhotoFrontList
;
@TableField
(
exist
=
false
)
private
List
<
CommonFile
>
legalPersonCardPhotoBackList
;
@TableField
(
exist
=
false
)
private
List
<
CommonFile
>
businessLicensePhotoList
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/DealerReview.java
View file @
cd4ee238
...
@@ -31,7 +31,7 @@ public class DealerReview extends BaseEntity {
...
@@ -31,7 +31,7 @@ public class DealerReview extends BaseEntity {
* 经销商id
* 经销商id
*/
*/
@TableField
(
"unit_info_id"
)
@TableField
(
"unit_info_id"
)
private
Stri
ng
unitInfoId
;
private
Lo
ng
unitInfoId
;
/**
/**
* 任务id
* 任务id
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/UnitInfo.java
View file @
cd4ee238
...
@@ -3,11 +3,13 @@ package com.yeejoin.amos.boot.module.hygf.api.entity;
...
@@ -3,11 +3,13 @@ package com.yeejoin.amos.boot.module.hygf.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.CommonFile
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* 经销商人员信息
* 经销商人员信息
...
@@ -170,10 +172,19 @@ public class UnitInfo extends BaseEntity {
...
@@ -170,10 +172,19 @@ public class UnitInfo extends BaseEntity {
*是否加入黑名单
*是否加入黑名单
* */
* */
@TableField
(
"blacklist"
)
@TableField
(
"blacklist"
)
private
String
blacklist
;
private
int
blacklist
;
/**
/**
*审核状态
*审核状态
* */
* */
@TableField
(
"audit_status"
)
@TableField
(
"audit_status"
)
private
String
auditStatus
;
private
int
auditStatus
;
@TableField
(
exist
=
false
)
private
List
<
CommonFile
>
headCardPhotoFrontList
;
@TableField
(
exist
=
false
)
private
List
<
CommonFile
>
headCardPhotoBackList
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/fegin/IdxFeginService.java
View file @
cd4ee238
...
@@ -24,11 +24,36 @@ public interface IdxFeginService {
...
@@ -24,11 +24,36 @@ public interface IdxFeginService {
@RequestParam
(
value
=
"topic"
,
required
=
false
)
String
topic
,
@RequestParam
(
value
=
"topic"
,
required
=
false
)
String
topic
,
@RequestParam
(
value
=
"tableName"
,
required
=
false
)
String
tableName
,
@RequestParam
(
value
=
"tableName"
,
required
=
false
)
String
tableName
,
@RequestBody
Map
<
String
,
Object
>
kv
)
throws
Exception
;
@RequestBody
Map
<
String
,
Object
>
kv
)
throws
Exception
;
/**
/**
*通用表单提交 数据填报
*通用表单提交 数据填报
*/
*/
@RequestMapping
(
value
=
"/report/form/getRecordData/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/report/form/getRecordData/{id}"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
<
JSONObject
>
getRecord
(
@PathVariable
(
"id"
)
String
id
);
FeignClientResult
<
JSONObject
>
getRecord
(
@PathVariable
(
"id"
)
String
id
);
@RequestMapping
(
value
=
"/table/submit"
,
method
=
RequestMethod
.
POST
)
FeignClientResult
<
String
>
tokenSubmit
(
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
,
@RequestParam
(
value
=
"pageId"
)
long
pageId
,
@RequestParam
(
value
=
"taskId"
,
required
=
false
)
String
taskId
,
@RequestParam
(
value
=
"planInstanceId"
,
required
=
false
)
String
planInstanceId
,
@RequestParam
(
value
=
"bizField"
,
required
=
false
)
String
bizField
,
@RequestParam
(
value
=
"topic"
,
required
=
false
)
String
topic
,
@RequestParam
(
value
=
"tableName"
,
required
=
false
)
String
tableName
,
@RequestBody
Map
<
String
,
Object
>
kv
)
throws
Exception
;
/**
*通用表单提交 数据填报
*/
@RequestMapping
(
value
=
"/report/form/getRecordData/{id}"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
<
JSONObject
>
getRecordtoken
(
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
,
@PathVariable
(
"id"
)
String
id
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IDealerReviewService.java
View file @
cd4ee238
...
@@ -4,6 +4,8 @@ package com.yeejoin.amos.boot.module.hygf.api.service;
...
@@ -4,6 +4,8 @@ package com.yeejoin.amos.boot.module.hygf.api.service;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.DealerReview
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PowerStation
;
/**
/**
*
*
...
@@ -12,7 +14,7 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto;
...
@@ -12,7 +14,7 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto;
* */
* */
public
interface
IDealerReviewService
{
public
interface
IDealerReviewService
{
public
PageInfo
<
ReviewDto
>
queryForDealerReviewPage
(
int
pageNum
,
int
pageSize
,
ReviewDto
reviewDto
);
public
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
ReviewDto
>
queryForDealerReviewPage
(
int
pageNum
,
int
pageSize
,
ReviewDto
reviewDto
);
boolean
saveDealerReview
(
DealerReview
dealerReview
,
boolean
flag
,
boolean
token
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IUnitInfoService.java
View file @
cd4ee238
...
@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.hygf.api.service;
...
@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.hygf.api.service;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UnitRegisterDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UnitRegisterDto
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Map
;
/**
/**
* 经销商人员信息接口类
* 经销商人员信息接口类
...
@@ -18,6 +19,21 @@ public interface IUnitInfoService {
...
@@ -18,6 +19,21 @@ public interface IUnitInfoService {
UnitRegisterDto
registerUnit
(
UnitRegisterDto
model
);
UnitRegisterDto
registerUnit
(
UnitRegisterDto
model
);
/**
* 经销商审核接口
* @param pageId 表单id
* @param nodeCode 执行节点code
* @param stationId 经销商审核记录id
* @param taskId 任务id
* @param planInstanceId 实例id
* @param kv 表单数据
* @return idx表id
*/
String
powerStationExamine
(
long
pageId
,
String
nodeCode
,
String
stationId
,
String
taskId
,
String
planInstanceId
,
Map
<
String
,
Object
>
kv
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/DealerReviewMapper.xml
View file @
cd4ee238
...
@@ -12,9 +12,27 @@
...
@@ -12,9 +12,27 @@
u.head_name headName,
u.head_name headName,
u.head_phone headPhone,
u.head_phone headPhone,
u.register_pcd registerPcd,
u.register_pcd registerPcd,
u.blacklist blacklist,
(CASE
u.audit_status auditStatus
WHEN u.blacklist=0 THEN '否'
from hygf_commerce_info c LEFT JOIN hygf_unit_info u on c.unit_seq=u.sequence_nbr
ELSE '是'
END
) blacklist,
(CASE
WHEN u.audit_status=1 THEN '审核中'
WHEN u.audit_status=2 THEN '完成'
WHEN u.audit_status=3 THEN '不通过'
END
) auditStatus,
d.process_instance_id processInstanceId,
d.process_definition_id processDefinitionId,
d.task_id taskId,
d.node_routing nodeRouting,
d.node_role nodeRole,
d.next_process_node nextProcessNode,
d.flow_task_id flowTaskId,
d.plan_instance_id planInstanceId,
u.admin_user_id adminUserId
from hygf_commerce_info c LEFT JOIN hygf_unit_info u on c.unit_seq=u.sequence_nbr LEFT JOIN hygf_dealer_review d on d.unit_info_id=u.sequence_nbr
<where>
<where>
u.is_delete=0
u.is_delete=0
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/UnitInfoController.java
View file @
cd4ee238
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UnitRegisterDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.CommerceInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.DealerReview
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.UnitInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.hwsms.SendSmsCode
;
import
com.yeejoin.amos.boot.module.hygf.api.hwsms.SendSmsCode
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.CommerceInfoMapper
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.DealerReviewServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.DealerReviewServiceImpl
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
...
@@ -15,6 +20,7 @@ import com.yeejoin.amos.feign.systemctl.model.RegionModel;
...
@@ -15,6 +20,7 @@ import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.poi.util.ArrayUtil
;
import
org.apache.poi.util.ArrayUtil
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpRequest
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -22,6 +28,7 @@ import io.swagger.annotations.Api;
...
@@ -22,6 +28,7 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.io.File
;
import
java.util.*
;
import
java.util.*
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.UnitInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.UnitInfoServiceImpl
;
...
@@ -37,7 +44,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -37,7 +44,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UnitInfoDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
@@ -70,6 +76,9 @@ public class UnitInfoController extends BaseController {
...
@@ -70,6 +76,9 @@ public class UnitInfoController extends BaseController {
public
static
final
String
HYGF_USER_TEL
=
"hygf_tel_"
;
public
static
final
String
HYGF_USER_TEL
=
"hygf_tel_"
;
@Autowired
@Autowired
DealerReviewServiceImpl
dealerReviewServiceImpl
;
DealerReviewServiceImpl
dealerReviewServiceImpl
;
@Autowired
CommerceInfoMapper
commerceInfoMapper
;
/**
/**
* 验证码过期时间
* 验证码过期时间
...
@@ -116,6 +125,23 @@ public class UnitInfoController extends BaseController {
...
@@ -116,6 +125,23 @@ public class UnitInfoController extends BaseController {
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getOne/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个经销商人员信息"
,
notes
=
"根据sequenceNbr查询单个经销商人员信息"
)
public
ResponseModel
<
UnitInfoData
>
getOne
(
@PathVariable
String
sequenceNbr
)
{
UnitInfo
unitInfo
=
unitInfoServiceImpl
.
getById
(
sequenceNbr
);
unitInfo
.
setHeadCardPhotoBackList
(
toCommonFile
(
unitInfo
.
getHeadCardPhotoBack
()));
unitInfo
.
setHeadCardPhotoFrontList
(
toCommonFile
(
unitInfo
.
getHeadCardPhotoFront
()));
CommerceInfo
commerceInfo
=
commerceInfoMapper
.
selectOne
(
new
QueryWrapper
<
CommerceInfo
>().
eq
(
"unit_seq"
,
sequenceNbr
));
commerceInfo
.
setLegalPersonCardPhotoBackList
(
toCommonFile
(
commerceInfo
.
getLegalPersonCardPhotoBack
()));
commerceInfo
.
setBusinessLicensePhotoList
(
toCommonFile
(
commerceInfo
.
getBusinessLicensePhoto
()));
commerceInfo
.
setLegalPersonCardPhotoFrontList
(
toCommonFile
(
commerceInfo
.
getLegalPersonCardPhotoFront
()));
UnitInfoData
unitInfoData
=
new
UnitInfoData
(
unitInfo
,
unitInfo
,
commerceInfo
);
return
ResponseHelper
.
buildResponse
(
unitInfoData
);
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
...
@@ -138,9 +164,9 @@ public class UnitInfoController extends BaseController {
...
@@ -138,9 +164,9 @@ public class UnitInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/queryForDealerReviewPage"
)
@GetMapping
(
value
=
"/queryForDealerReviewPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"经销商人员信息分页查询"
,
notes
=
"经销商人员信息分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"经销商人员信息分页查询"
,
notes
=
"经销商人员信息分页查询"
)
public
ResponseModel
<
Page
Info
<
ReviewDto
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
ReviewDto
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"reviewDto"
)
ReviewDto
reviewDto
)
{
(
value
=
"size"
)
int
size
,
ReviewDto
reviewDto
)
{
Page
Info
<
ReviewDto
>
page
=
dealerReviewServiceImpl
.
queryForDealerReviewPage
(
current
,
size
,
reviewDto
);
Page
<
ReviewDto
>
page
=
dealerReviewServiceImpl
.
queryForDealerReviewPage
(
current
,
size
,
reviewDto
);
return
ResponseHelper
.
buildResponse
(
page
);
return
ResponseHelper
.
buildResponse
(
page
);
}
}
...
@@ -234,6 +260,21 @@ public class UnitInfoController extends BaseController {
...
@@ -234,6 +260,21 @@ public class UnitInfoController extends BaseController {
}
}
public
List
<
CommonFile
>
toCommonFile
(
String
url
){
List
<
CommonFile
>
list
=
new
ArrayList
<>();
CommonFile
commonFile
=
new
CommonFile
(
url
,
url
.
substring
(
url
.
lastIndexOf
(
File
.
separator
)+
1
),
UUID
.
randomUUID
().
toString
(),
"done"
);
list
.
add
(
commonFile
);
return
list
;
}
/**
/**
* 判断用户号码是否存在
* 判断用户号码是否存在
*
*
...
@@ -313,4 +354,49 @@ public class UnitInfoController extends BaseController {
...
@@ -313,4 +354,49 @@ public class UnitInfoController extends BaseController {
return
code
;
return
code
;
}
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"经销商审核"
,
notes
=
"经销商审核"
)
@PostMapping
(
value
=
"/powerStationExamine"
)
public
ResponseModel
<
String
>
powerStationExamine
(
@RequestParam
(
value
=
"pageId"
)
long
pageId
,
@RequestParam
(
value
=
"nodeCode"
)
String
nodeCode
,
@RequestParam
(
value
=
"stationId"
)
String
stationId
,
@RequestParam
(
value
=
"taskId"
)
String
taskId
,
@RequestParam
(
value
=
"planInstanceId"
)
String
planInstanceId
,
@RequestBody
Map
<
String
,
Object
>
kv
)
{
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
powerStationExamine
(
pageId
,
nodeCode
,
stationId
,
taskId
,
planInstanceId
,
kv
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"经销商人员加入黑名单/撤销黑名单"
,
notes
=
"经销商人员加入黑名单/撤销黑名单"
)
@GetMapping
(
value
=
"/updateUser"
)
public
ResponseModel
<
Object
>
updateUser
(
String
adminUserId
,
String
sequenceNbr
,
String
type
)
{
FeignClientResult
<
List
<
String
>>
userResult
=
null
;
UnitInfo
unitInfo
=
unitInfoServiceImpl
.
getById
(
sequenceNbr
);
if
(
"LOCK"
.
equals
(
type
)){
userResult
=
Privilege
.
agencyUserClient
.
lockUsers
(
adminUserId
);
unitInfo
.
setBlacklist
(
1
);
}
else
{
userResult
=
Privilege
.
agencyUserClient
.
unlockUsers
(
adminUserId
);
unitInfo
.
setBlacklist
(
0
);
}
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
updateById
(
unitInfo
));
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/feign/WorkflowFeignClient.java
View file @
cd4ee238
...
@@ -3,10 +3,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -3,10 +3,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -39,4 +36,25 @@ public interface WorkflowFeignClient {
...
@@ -39,4 +36,25 @@ public interface WorkflowFeignClient {
@RequestMapping
(
value
=
"/history/task/nodeInfo"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
<
JSONObject
>
getNodeInfotoken
(
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
,
@RequestParam
(
value
=
"taskId"
)
String
taskId
);
/***
*
* 查询当前流程对应的可执行任务,无权限级别
* */
@RequestMapping
(
value
=
"/task/getTaskNoAuth/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
getTaskNoAuthtoken
(
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
,
@PathVariable
(
value
=
"processInstanceId"
)
String
processInstanceId
);
}
}
\ 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/DealerReviewServiceImpl.java
View file @
cd4ee238
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.DealerReviewDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.DealerReviewDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.WorkDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.DealerReview
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.DealerReview
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.DealerReviewMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.DealerReviewMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IDealerReviewService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IDealerReviewService
;
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
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* @description:
* @description:
...
@@ -24,12 +34,111 @@ import java.util.List;
...
@@ -24,12 +34,111 @@ import java.util.List;
public
class
DealerReviewServiceImpl
extends
BaseService
<
DealerReviewDto
,
DealerReview
,
DealerReviewMapper
>
implements
IDealerReviewService
{
public
class
DealerReviewServiceImpl
extends
BaseService
<
DealerReviewDto
,
DealerReview
,
DealerReviewMapper
>
implements
IDealerReviewService
{
@Autowired
@Autowired
DealerReviewMapper
dealerReviewMapper
;
DealerReviewMapper
dealerReviewMapper
;
private
static
final
String
IDX_REQUEST_STATE
=
"200"
;
@Autowired
WorkflowFeignClient
workflowFeignClient
;
@Autowired
AmosRequestContext
requestContext
;
@Value
(
"${amos.system.user.product}"
)
private
String
AMOS_STUDIO_WEB
;
@Value
(
"${amos.system.user.app-key}"
)
private
String
AMOS_STUDIO
;
@Override
@Override
public
PageInfo
<
ReviewDto
>
queryForDealerReviewPage
(
int
pageNum
,
int
pageSize
,
ReviewDto
reviewDto
){
public
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
ReviewDto
>
queryForDealerReviewPage
(
int
pageNum
,
int
pageSize
,
ReviewDto
reviewDto
){
PageHelper
.
startPage
(
pageNum
,
pageSize
);
PageHelper
.
startPage
(
pageNum
,
pageSize
);
List
<
ReviewDto
>
list
=
dealerReviewMapper
.
queryForDealerReviewPage
(
reviewDto
);
List
<
ReviewDto
>
list
=
dealerReviewMapper
.
queryForDealerReviewPage
(
reviewDto
);
PageInfo
<
ReviewDto
>
page
=
new
PageInfo
(
list
);
PageInfo
<
ReviewDto
>
page
=
new
PageInfo
(
list
);
return
page
;
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
ReviewDto
>
pagenew
=
new
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
ReviewDto
>();
pagenew
.
setCurrent
(
pageNum
);
pagenew
.
setTotal
(
page
.
getTotal
());
pagenew
.
setSize
(
pageSize
);
pagenew
.
setRecords
(
page
.
getList
());
return
pagenew
;
}
}
@Override
public
boolean
saveDealerReview
(
DealerReview
dealerReview
,
boolean
flag
,
boolean
token
)
{
try
{
//流程节点code
if
(
flag
)
{
String
flowTaskIdnext
=
this
.
getTaskNoAuth
(
dealerReview
.
getProcessInstanceId
(),
token
);
WorkDto
workDto
=
this
.
getNodeInfoCode
(
flowTaskIdnext
,
token
);
dealerReview
.
setNextProcessNode
(
workDto
.
getNextProcessNode
());
dealerReview
.
setNodeRole
(
workDto
.
getNodeRole
());
dealerReview
.
setNodeRouting
(
workDto
.
getNodeRouting
());
}
return
this
.
saveOrUpdate
(
dealerReview
);
}
catch
(
Exception
e
){
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
}
public
WorkDto
getNodeInfoCode
(
String
flowTaskId
,
boolean
token
){
WorkDto
workDto
=
null
;
try
{
FeignClientResult
<
JSONObject
>
jSONObject
=
null
;
if
(
token
){
jSONObject
=
workflowFeignClient
.
getNodeInfo
(
flowTaskId
);
}
else
{
jSONObject
=
workflowFeignClient
.
getNodeInfotoken
(
AMOS_STUDIO
,
AMOS_STUDIO_WEB
,
requestContext
.
getToken
(),
flowTaskId
);
}
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
jSONObject
.
getStatus
()))){
JSONObject
js
=
jSONObject
.
getResult
();
if
(
js
==
null
){
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
LinkedHashMap
taskInfo
=
js
.
get
(
"taskInfo"
)!=
null
?(
LinkedHashMap
)
js
.
get
(
"taskInfo"
):
null
;
String
nextProcessNode
=
taskInfo
!=
null
?
taskInfo
.
get
(
"taskDefinitionKey"
).
toString
():
null
;
List
<
LinkedHashMap
>
executor
=
js
.
get
(
"executor"
)!=
null
?(
List
<
LinkedHashMap
>)
js
.
get
(
"executor"
):
null
;
String
nodeRole
=
null
;
if
(!
executor
.
isEmpty
()){
List
<
String
>
idList
=
executor
.
stream
().
map
(
e
->
e
.
get
(
"groupId"
).
toString
()).
collect
(
Collectors
.
toList
());
nodeRole
=
StringUtils
.
join
(
idList
,
","
);
}
LinkedHashMap
extensionInfo
=
js
.
get
(
"extensionInfo"
)!=
null
?(
LinkedHashMap
)
js
.
get
(
"extensionInfo"
):
null
;
String
nodeRouting
=
extensionInfo
!=
null
?
extensionInfo
.
get
(
"nodeRole"
).
toString
():
null
;
workDto
=
new
WorkDto
(
nodeRouting
,
nodeRole
,
nextProcessNode
);
}
return
workDto
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
}
public
String
getTaskNoAuth
(
String
processInstanceId
,
boolean
token
){
String
flowTaskId
=
null
;
try
{
JSONObject
jSONObject
=
null
;
if
(
token
){
jSONObject
=
workflowFeignClient
.
getTaskNoAuth
(
processInstanceId
);
}
else
{
jSONObject
=
workflowFeignClient
.
getTaskNoAuthtoken
(
AMOS_STUDIO
,
AMOS_STUDIO_WEB
,
requestContext
.
getToken
(),
processInstanceId
);
}
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
jSONObject
.
get
(
"code"
)))){
LinkedHashMap
jsd
=
jSONObject
.
get
(
"data"
)!=
null
?(
LinkedHashMap
)
jSONObject
.
get
(
"data"
):
null
;
flowTaskId
=
jsd
!=
null
?
jsd
.
get
(
"id"
).
toString
():
null
;
}
if
(
flowTaskId
==
null
){
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
return
flowTaskId
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
View file @
cd4ee238
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.DealerReviewEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationNodeEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.CommerceInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.CommerceInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UnitRegisterDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UnitRegisterDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.
CommerceInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.
*
;
import
com.yeejoin.amos.boot.module.hygf.api.
entity.UnitInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.
fegin.IdxFeginService
;
import
com.yeejoin.amos.boot.module.hygf.api.fegin.PrivilegeFeginService
;
import
com.yeejoin.amos.boot.module.hygf.api.fegin.PrivilegeFeginService
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.DealerReviewMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.UnitInfoMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.UnitInfoMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IDealerReviewService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IUnitInfoService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IUnitInfoService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.component.feign.config.TokenOperation
;
import
com.yeejoin.amos.component.feign.config.TokenOperation
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
...
@@ -24,8 +32,10 @@ import com.yeejoin.amos.feign.privilege.model.RoleModel;
...
@@ -24,8 +32,10 @@ import com.yeejoin.amos.feign.privilege.model.RoleModel;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
@@ -65,10 +75,35 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -65,10 +75,35 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
@Autowired
@Autowired
CommerceInfoServiceImpl
commerceInfoService
;
CommerceInfoServiceImpl
commerceInfoService
;
@Autowired
IDealerReviewService
dealerReviewService
;
@Value
(
"${hygf.user.group.id}"
)
@Value
(
"${hygf.user.group.id}"
)
private
long
userGroupId
;
private
long
userGroupId
;
@Autowired
IdxFeginService
idxFeginService
;
private
static
final
String
regionRedis
=
"app_region_redis"
;
private
static
final
String
OPERATION_TYPE_SUBMIT
=
"submit"
;
private
static
final
String
OPERATION_TYPE_APPLY
=
"apply"
;
private
static
final
String
IDX_REQUEST_STATE
=
"200"
;
private
static
final
String
VERIFY_RESULT_YES
=
"0"
;
private
static
final
String
VERIFY_RESULT_NO
=
"1"
;
@Autowired
DealerReviewMapper
dealerReviewMapper
;
@Value
(
"${power.station.examine.pageId}"
)
private
long
pageId
;
@Autowired
AmosRequestContext
requestContext
;
@Value
(
"${unitInfo.station.examine.planId}"
)
private
String
planId
;
@Value
(
"${amos.system.user.product}"
)
private
String
AMOS_STUDIO_WEB
;
@Value
(
"${amos.system.user.app-key}"
)
private
String
AMOS_STUDIO
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -97,13 +132,15 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -97,13 +132,15 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
}
}
@Override
@Override
@Transactional
public
UnitRegisterDto
registerUnit
(
UnitRegisterDto
model
)
{
public
UnitRegisterDto
registerUnit
(
UnitRegisterDto
model
)
{
UnitInfoDto
regUnitInfo
=
model
.
getUnitInfoDto
();
UnitInfoDto
regUnitInfo
=
model
.
getUnitInfoDto
();
try
{
try
{
// 1. 调用平台进行创建单位、用户信息
// 1. 调用平台进行创建单位、用户信息
this
.
createCompanyAndUser
(
regUnitInfo
);
this
.
createCompanyAndUser
(
regUnitInfo
);
// 2.插入单位表
// 2.插入单位表
regUnitInfo
=
this
.
createWithModel
(
regUnitInfo
);
// regUnitInfo = this.createWithModel(regUnitInfo);
regUnitInfo
=
this
.
createWithModelnew
(
regUnitInfo
);
CommerceInfoDto
commerceInfo
=
model
.
getCommerceInfoDto
();
CommerceInfoDto
commerceInfo
=
model
.
getCommerceInfoDto
();
commerceInfo
.
setUnitSeq
(
regUnitInfo
.
getSequenceNbr
());
commerceInfo
.
setUnitSeq
(
regUnitInfo
.
getSequenceNbr
());
commerceInfo
=
commerceInfoService
.
createWithModel
(
commerceInfo
);
commerceInfo
=
commerceInfoService
.
createWithModel
(
commerceInfo
);
...
@@ -275,4 +312,97 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -275,4 +312,97 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
throw
new
RuntimeException
(
e
.
getMessage
());
throw
new
RuntimeException
(
e
.
getMessage
());
}
}
}
}
public
UnitInfoDto
createWithModelnew
(
UnitInfoDto
regUnitInfo
){
regUnitInfo
.
setBlacklist
(
0
);
regUnitInfo
.
setAuditStatus
(
1
);
regUnitInfo
.
setManagementUnit
(
"经销商事业部"
);
regUnitInfo
=
this
.
createWithModel
(
regUnitInfo
);
this
.
submitExamine
(
regUnitInfo
);
return
regUnitInfo
;
}
private
void
submitExamine
(
UnitInfoDto
regUnitInfo
)
{
String
taskId
=
null
;
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>(
1
);
objectMap
.
put
(
"describe"
,
"经销商已上传信息"
);
// 第一步启动工作流
DealerReview
dealerReview
=
new
DealerReview
();
// 保存并审核
try
{
FeignClientResult
<
String
>
submit
=
idxFeginService
.
tokenSubmit
(
AMOS_STUDIO
,
AMOS_STUDIO_WEB
,
requestContext
.
getToken
(),
pageId
,
taskId
,
planId
,
null
,
null
,
null
,
objectMap
);
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
submit
.
getStatus
())))
{
String
code
=
submit
.
getResult
();
// 插入记录表
dealerReview
.
setPlanInstanceId
(
planId
);
dealerReview
.
setUnitInfoId
(
regUnitInfo
.
getSequenceNbr
());
// 获取流程信息
FeignClientResult
<
JSONObject
>
record
=
idxFeginService
.
getRecordtoken
(
AMOS_STUDIO
,
AMOS_STUDIO_WEB
,
requestContext
.
getToken
(),
code
);
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
record
.
getStatus
())))
{
JSONObject
resultObj
=
record
.
getResult
();
String
taskIdNew
=
String
.
valueOf
(
resultObj
.
get
(
"taskId"
));
String
processInstanceId
=
String
.
valueOf
(
resultObj
.
get
(
"processInstanceId"
));
String
flowTaskId
=
String
.
valueOf
(
resultObj
.
get
(
"flowTaskId"
));
dealerReview
.
setTaskId
(
taskIdNew
);
dealerReview
.
setProcessInstanceId
(
processInstanceId
);
dealerReview
.
setFlowTaskId
(
flowTaskId
);
dealerReview
.
setNextProcessNode
(
DealerReviewEnum
.
经销商管理员审核
.
getCode
());
}
dealerReviewService
.
saveDealerReview
(
dealerReview
,
true
,
false
);
}
else
{
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
}
catch
(
Exception
e
){
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
}
@Override
@Transactional
public
String
powerStationExamine
(
long
pageId
,
String
nodeCode
,
String
stationId
,
String
taskId
,
String
planInstanceId
,
Map
<
String
,
Object
>
kv
)
{
// 2.更新审核记录表
try
{
DealerReview
dealerReview
=
dealerReviewMapper
.
selectOne
(
new
QueryWrapper
<
DealerReview
>().
eq
(
"unit_info_id"
,
stationId
));
UnitInfo
unitInfo
=
this
.
getById
(
stationId
);
DealerReviewEnum
nodeByCode
=
DealerReviewEnum
.
getNodeByCode
(
nodeCode
);
if
(
DealerReviewEnum
.
经销商管理员审核
.
getCode
().
equals
(
nodeCode
))
{
String
result
=
String
.
valueOf
(
kv
.
get
(
"approvalStatue"
));
if
(
VERIFY_RESULT_NO
.
equals
(
result
))
{
// 1. 更新经销商状态
unitInfo
.
setAuditStatus
(
3
);
}
else
{
// 1. 更新经销商状态
unitInfo
.
setAuditStatus
(
2
);
Privilege
.
agencyUserClient
.
unlockUsers
(
unitInfo
.
getAdminUserId
());
}
}
// 2. 更新流程状态
String
code
=
null
;
// 3. 工作流执行
FeignClientResult
<
String
>
submit
=
idxFeginService
.
submit
(
pageId
,
taskId
,
planInstanceId
,
null
,
null
,
null
,
kv
);
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
submit
.
getStatus
())))
{
code
=
submit
.
getResult
();
// 获取流程信息
FeignClientResult
<
JSONObject
>
record
=
idxFeginService
.
getRecord
(
code
);
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
record
.
getStatus
())))
{
JSONObject
resultObj
=
record
.
getResult
();
String
flowTaskId
=
String
.
valueOf
(
resultObj
.
get
(
"flowTaskId"
));
dealerReview
.
setFlowTaskId
(
flowTaskId
);
}
dealerReviewService
.
saveDealerReview
(
dealerReview
,
false
,
true
);
}
this
.
saveOrUpdate
(
unitInfo
);
}
catch
(
Exception
e
){
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
return
code
;
}
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-dev.properties
View file @
cd4ee238
...
@@ -78,8 +78,6 @@ amos.secret.key=qaz
...
@@ -78,8 +78,6 @@ amos.secret.key=qaz
# if your service can't be access ,you can use this setting , you need change ip as your.
# if your service can't be access ,you can use this setting , you need change ip as your.
#eureka.instance.prefer-ip-address=true
#eureka.instance.prefer-ip-address=true
#eureka.instance.ip-address=172.16.3.122
#eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url
=
tcp://139.9.173.44:61616
spring.activemq.broker-url
=
tcp://139.9.173.44:61616
spring.activemq.user
=
admin
spring.activemq.user
=
admin
spring.activemq.password
=
admin
spring.activemq.password
=
admin
...
@@ -103,9 +101,13 @@ sms.huawei.sender=1069368924410006092
...
@@ -103,9 +101,13 @@ sms.huawei.sender=1069368924410006092
# 签名名称
# 签名名称
sms.huawei.signature
=
华为云短信测试
sms.huawei.signature
=
华为云短信测试
#
电站审核pageId
#
审核pageId确认
power.station.examine.pageId
=
1680853427061551106
power.station.examine.pageId
=
1680853427061551106
# 电站审核计划id
# 电站审核计划id
power.station.examine.planId
=
c4ed1873-0dc6-4518-a7a9-dbc588ef35e5
power.station.examine.planId
=
c4ed1873-0dc6-4518-a7a9-dbc588ef35e5
# 用户组userGroupId
# 用户组userGroupId
hygf.user.group.id
=
1679755750924120066
hygf.user.group.id
=
1679755750924120066
\ No newline at end of file
unitInfo.station.examine.planId
=
51776087-a9cf-4a87-9a03-24fd24a8cf45
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
cd4ee238
...
@@ -1385,7 +1385,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1385,7 +1385,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
String
url
=
""
;
String
url
=
""
;
if
(
listDatum
.
getDisplayName
().
contains
(
"手车工作位置"
)){
if
(
listDatum
.
getDisplayName
().
contains
(
"手车工作位置"
)){
String
[]
split
=
listDatum
.
getPictureName
().
split
(
":"
);
String
[]
split
=
listDatum
.
getPictureName
().
split
(
":"
);
if
(
listDatum
.
getValue
().
equals
(
"
tru
e"
)){
if
(
listDatum
.
getValue
().
equals
(
"
fals
e"
)){
String
[]
split1
=
split
[
0
].
split
(
","
);
String
[]
split1
=
split
[
0
].
split
(
","
);
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"scsurl"
,
pictureUrl
+
split1
[
0
]);
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"scsurl"
,
pictureUrl
+
split1
[
0
]);
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"scxurl"
,
pictureUrl
+
split1
[
1
]);
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"scxurl"
,
pictureUrl
+
split1
[
1
]);
...
@@ -1396,10 +1396,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1396,10 +1396,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
}
}
else
{
}
else
{
if
(
listDatum
.
getValue
().
equals
(
"false"
)){
if
(
listDatum
.
getValue
().
equals
(
"false"
)){
url
=
pictureUrl
+
listDatum
.
getPictureName
().
replace
(
"green"
,
"red"
);
}
else
{
url
=
pictureUrl
+
listDatum
.
getPictureName
();
url
=
pictureUrl
+
listDatum
.
getPictureName
();
}
else
{
url
=
pictureUrl
+
listDatum
.
getPictureName
().
replace
(
"green"
,
"red"
);
}
}
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"url"
,
url
);
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"url"
,
url
);
}
}
...
...
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