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
a13937f5
Commit
a13937f5
authored
Jul 17, 2023
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审核提交
parent
2facb231
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
23 deletions
+107
-23
PowerStationProcessStateEnum.java
...ot/module/hygf/api/Enum/PowerStationProcessStateEnum.java
+27
-0
IPowerStationService.java
...os/boot/module/hygf/api/service/IPowerStationService.java
+10
-0
PowerStationServiceImpl.java
...module/hygf/biz/service/impl/PowerStationServiceImpl.java
+12
-0
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+46
-21
application-dev.properties
...le-hygf-biz/src/main/resources/application-dev.properties
+7
-2
pom.xml
amos-boot-system-jxiop/pom.xml
+5
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/PowerStationProcessStateEnum.java
0 → 100644
View file @
a13937f5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 电站审核状态
* @author DELL
*/
@Getter
@AllArgsConstructor
public
enum
PowerStationProcessStateEnum
{
进行中
(
"进行中"
,
"0"
),
不通过
(
"不通过"
,
"1"
),
完成
(
"完成"
,
"2"
),
作废
(
"作废"
,
"3"
);
/**
* 名称,描述
*/
private
String
name
;
/**
* 编码
*/
private
String
code
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IPowerStationService.java
View file @
a13937f5
...
...
@@ -18,4 +18,14 @@ public interface IPowerStationService {
*/
boolean
savePowerStation
(
PowerStation
powerStation
);
/**
* 根据农户id和流程状态获取实例
* @param id 农户id
* @param state 流程状态
* @return 电站实例
*/
PowerStation
getObjByNhId
(
String
id
,
String
state
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PowerStationServiceImpl.java
View file @
a13937f5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PowerStation
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.PowerStationMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IPowerStationService
;
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
;
...
...
@@ -36,4 +39,12 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
public
boolean
savePowerStation
(
PowerStation
powerStation
)
{
return
this
.
save
(
powerStation
);
}
@Override
public
PowerStation
getObjByNhId
(
String
id
,
String
state
)
{
LambdaQueryWrapper
<
PowerStation
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
PowerStation:
:
getProcessStatus
,
state
);
wrapper
.
eq
(
PowerStation:
:
getPeasantHouseholdId
,
id
);
return
this
.
baseMapper
.
selectOne
(
wrapper
);
}
}
\ 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/SurveyInformationServiceImpl.java
View file @
a13937f5
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.fegin.IdxFeginService
;
...
...
@@ -20,9 +21,11 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -67,6 +70,12 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
@Autowired
IPowerStationService
powerStationService
;
@Value
(
"${power.station.examine.pageId}"
)
private
long
pageId
;
@Value
(
"${power.station.examine.planId}"
)
private
String
planId
;
private
static
final
String
regionRedis
=
"app_region_redis"
;
private
static
final
String
OPERATION_TYPE_SUBMIT
=
"submit"
;
private
static
final
String
OPERATION_TYPE_APPLY
=
"apply"
;
...
...
@@ -167,32 +176,48 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
if
(
OPERATION_TYPE_SUBMIT
.
equals
(
operationType
)){
peasantHousehold
.
setSurveyOrNot
(
1
);
}
else
if
(
OPERATION_TYPE_APPLY
.
equals
(
operationType
)){
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>();
objectMap
.
put
(
"approveStatus"
,
"yes"
);
// 保存并审核
try
{
FeignClientResult
<
String
>
submit
=
idxFeginService
.
submit
(
1679778420550037506L
,
null
,
"c4ed1873-0dc6-4518-a7a9-dbc588ef35e5"
,
null
,
null
,
null
,
objectMap
);
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
submit
.
getStatus
())))
{
String
code
=
submit
.
getResult
();
peasantHousehold
.
setSurveyOrNot
(
2
);
peasantHousehold
.
setReview
(
1
);
// 插入记录表
PowerStation
powerStationDto
=
new
PowerStation
();
powerStationDto
.
setPowerStationCode
(
peasantHousehold
.
getPeasantHouseholdNo
());
powerStationDto
.
setOwnersName
(
peasantHousehold
.
getOwnersName
());
powerStationDto
.
setProjectAddress
(
peasantHousehold
.
getProjectAddressName
());
powerStationDto
.
setProcessStatus
(
"进行中"
);
powerStationService
.
savePowerStation
(
powerStationDto
);
log
.
info
(
"启动流程成功:{}"
,
code
);
}
}
catch
(
Exception
e
){
e
.
getMessage
();
}
// 提交审核
submitExamine
(
peasantHousehold
);
}
peasantHouseholdServiceImpl
.
saveOrUpdate
(
peasantHousehold
);
return
surveyInfoAllDto
;
}
private
void
submitExamine
(
PeasantHousehold
peasantHousehold
)
{
PowerStation
powerStation
=
powerStationService
.
getObjByNhId
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()),
PowerStationProcessStateEnum
.
进行中
.
getCode
());
String
taskId
=
null
;
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>();
if
(
ObjectUtils
.
isNotEmpty
(
powerStation
))
{
// 工作流执行一步
taskId
=
powerStation
.
getTaskId
();
objectMap
.
put
(
"approveStatus"
,
"yes"
);
}
else
{
// 第一步启动工作流
objectMap
.
put
(
"approveStatus"
,
"yes"
);
powerStation
=
new
PowerStation
();
}
// 保存并审核
try
{
FeignClientResult
<
String
>
submit
=
idxFeginService
.
submit
(
pageId
,
taskId
,
planId
,
null
,
null
,
null
,
objectMap
);
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
submit
.
getStatus
())))
{
peasantHousehold
.
setSurveyOrNot
(
2
);
peasantHousehold
.
setReview
(
1
);
String
code
=
submit
.
getResult
();
// 插入记录表
powerStation
.
setPowerStationCode
(
peasantHousehold
.
getPeasantHouseholdNo
());
powerStation
.
setOwnersName
(
peasantHousehold
.
getOwnersName
());
powerStation
.
setProjectAddress
(
peasantHousehold
.
getProjectAddressName
());
powerStation
.
setPeasantHouseholdId
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()));
powerStation
.
setProcessStatus
(
PowerStationProcessStateEnum
.
进行中
.
getCode
());
powerStationService
.
savePowerStation
(
powerStation
);
log
.
info
(
"流程执行成功:{}"
,
code
);
}
}
catch
(
Exception
e
){
e
.
getMessage
();
}
}
public
SurveyInfoAllDto
querySurveyInfo
(
String
surveyInformationId
,
AgencyUserModel
userInfo
)
{
SurveyInfoAllDto
surveyInfoAllDto
=
new
SurveyInfoAllDto
();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-dev.properties
View file @
a13937f5
...
...
@@ -101,4 +101,9 @@ sms.huawei.templateId=6aaeb4bf916d4db0a1942c598912519e
# 签名通道号
sms.huawei.sender
=
1069368924410006092
# 签名名称
sms.huawei.signature
=
华为云短信测试
\ No newline at end of file
sms.huawei.signature
=
华为云短信测试
# 电站审核pageId
power.station.examine.pageId
=
1679778420550037506
# 电站审核计划id
power.station.examine.planId
=
c4ed1873-0dc6-4518-a7a9-dbc588ef35e5
\ No newline at end of file
amos-boot-system-jxiop/pom.xml
View file @
a13937f5
...
...
@@ -90,6 +90,11 @@
<artifactId>
kingbase8
</artifactId>
<version>
8.6.0
</version>
</dependency>
<dependency>
<groupId>
org.messaginghub
</groupId>
<artifactId>
pooled-jms
</artifactId>
<version>
1.0.5
</version>
</dependency>
</dependencies>
</project>
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