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
16c73517
Commit
16c73517
authored
Sep 14, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增代办任务,消息
parent
e6f99a39
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
254 additions
and
97 deletions
+254
-97
UserMessagePageDto.java
...oin/amos/boot/module/hygf/api/dto/UserMessagePageDto.java
+46
-0
DealerReview.java
...eejoin/amos/boot/module/hygf/api/entity/DealerReview.java
+3
-0
UserMessage.java
...yeejoin/amos/boot/module/hygf/api/entity/UserMessage.java
+12
-0
IDealerReviewService.java
...os/boot/module/hygf/api/service/IDealerReviewService.java
+1
-1
IPowerStationService.java
...os/boot/module/hygf/api/service/IPowerStationService.java
+1
-1
HouseholdContractController.java
...dule/hygf/biz/controller/HouseholdContractController.java
+9
-12
ToDoTasksController.java
.../boot/module/hygf/biz/controller/ToDoTasksController.java
+30
-1
UserMessageController.java
...oot/module/hygf/biz/controller/UserMessageController.java
+16
-17
DealerReviewServiceImpl.java
...module/hygf/biz/service/impl/DealerReviewServiceImpl.java
+8
-3
HouseholdContractServiceImpl.java
...e/hygf/biz/service/impl/HouseholdContractServiceImpl.java
+2
-2
PeasantHouseholdServiceImpl.java
...le/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
+2
-2
PersonnelBusinessServiceImpl.java
...e/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
+17
-15
PowerStationServiceImpl.java
...module/hygf/biz/service/impl/PowerStationServiceImpl.java
+7
-4
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+1
-1
ToDoTasksServiceImpl.java
...ot/module/hygf/biz/service/impl/ToDoTasksServiceImpl.java
+45
-16
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+23
-18
UserMessageServiceImpl.java
.../module/hygf/biz/service/impl/UserMessageServiceImpl.java
+27
-0
application.properties
...module-hygf-biz/src/main/resources/application.properties
+4
-4
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/UserMessagePageDto.java
0 → 100644
View file @
16c73517
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.ToDoTasks
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.UserMessage
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @description:
* @author: tw
* @createDate: 2023/8/21
*/
@Data
public
class
UserMessagePageDto
extends
Page
<
UserMessage
>
{
/**
* 任务类型
*/
private
String
type
;
/**
* 用户id
*/
private
String
amosUserId
;
/**
* 消息创建时间
*/
private
Date
creationTime
;
/**
* 消息内容
*/
private
String
taskName
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/DealerReview.java
View file @
16c73517
...
@@ -75,4 +75,6 @@ public class DealerReview extends BaseEntity {
...
@@ -75,4 +75,6 @@ public class DealerReview extends BaseEntity {
@TableField
(
"plan_instance_id"
)
@TableField
(
"plan_instance_id"
)
private
String
planInstanceId
;
private
String
planInstanceId
;
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/UserMessage.java
View file @
16c73517
...
@@ -58,4 +58,16 @@ public class UserMessage extends BaseEntity {
...
@@ -58,4 +58,16 @@ public class UserMessage extends BaseEntity {
@TableField
(
"amos_org_code"
)
@TableField
(
"amos_org_code"
)
private
String
amosOrgCode
;
private
String
amosOrgCode
;
public
UserMessage
(
String
type
,
Long
businessId
,
String
amosUserId
,
Date
creationTime
,
String
taskName
,
String
amosOrgCode
)
{
this
.
type
=
type
;
this
.
businessId
=
businessId
;
this
.
amosUserId
=
amosUserId
;
this
.
creationTime
=
creationTime
;
this
.
taskName
=
taskName
;
this
.
amosOrgCode
=
amosOrgCode
;
}
public
UserMessage
()
{
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IDealerReviewService.java
View file @
16c73517
...
@@ -16,5 +16,5 @@ public interface IDealerReviewService {
...
@@ -16,5 +16,5 @@ public interface IDealerReviewService {
public
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
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
);
boolean
saveDealerReview
(
DealerReview
dealerReview
,
boolean
flag
,
boolean
token
,
String
name
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IPowerStationService.java
View file @
16c73517
...
@@ -19,7 +19,7 @@ public interface IPowerStationService {
...
@@ -19,7 +19,7 @@ public interface IPowerStationService {
* @param flag 是否是最后一个节点
* @param flag 是否是最后一个节点
* @return 状态
* @return 状态
*/
*/
boolean
savePowerStation
(
PowerStation
powerStation
,
boolean
flag
);
boolean
savePowerStation
(
PowerStation
powerStation
,
boolean
flag
,
String
name
);
/**
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HouseholdContractController.java
View file @
16c73517
...
@@ -9,9 +9,11 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto;
...
@@ -9,9 +9,11 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.ToDoTasks
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.ToDoTasks
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.UserMessage
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.HouseholdContractMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.HouseholdContractMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.PersonnelBusinessMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.PersonnelBusinessMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.ToDoTasksMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.ToDoTasksMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.UserMessageMapper
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.PeasantHouseholdServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.PeasantHouseholdServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.QiyuesuoServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.QiyuesuoServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.ToDoTasksServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.ToDoTasksServiceImpl
;
...
@@ -73,6 +75,8 @@ public class HouseholdContractController extends BaseController {
...
@@ -73,6 +75,8 @@ public class HouseholdContractController extends BaseController {
PersonnelBusinessMapper
personnelBusinessMapper
;
PersonnelBusinessMapper
personnelBusinessMapper
;
@Autowired
@Autowired
ToDoTasksMapper
toDoTasksMapper
;
ToDoTasksMapper
toDoTasksMapper
;
@Autowired
UserMessageMapper
userMessageMapper
;
/**
/**
* 新增
* 新增
*
*
...
@@ -191,7 +195,7 @@ public class HouseholdContractController extends BaseController {
...
@@ -191,7 +195,7 @@ public class HouseholdContractController extends BaseController {
householdContrac
.
setStatus
(
HouseholdContractEnum
.
合同状态
_
农户已签署
.
getCode
());
householdContrac
.
setStatus
(
HouseholdContractEnum
.
合同状态
_
农户已签署
.
getCode
());
//生成填报任务
//生成填报任务
ToDoTasks
toDoTasks1
=
new
ToDoTasks
(
TaskTypeStationEnum
.
合同填报
.
getCode
(),
householdContrac
.
getSequenceNbr
(),
TaskTypeStationEnum
.
合同填报
.
getCode
()
,
householdContrac
.
getDealerCode
());
ToDoTasks
toDoTasks1
=
new
ToDoTasks
(
TaskTypeStationEnum
.
合同填报
.
getCode
(),
householdContrac
.
getSequenceNbr
(),
"用户"
+
householdContrac
.
getPartyA
()+
"合同盖章"
,
householdContrac
.
getDealerCode
());
toDoTasksServiceImpl
.
addToDoTasksByRole
(
engineering
,
toDoTasks1
);
toDoTasksServiceImpl
.
addToDoTasksByRole
(
engineering
,
toDoTasks1
);
...
@@ -224,21 +228,12 @@ public class HouseholdContractController extends BaseController {
...
@@ -224,21 +228,12 @@ public class HouseholdContractController extends BaseController {
doTasks
.
setState
(
"已办"
);
doTasks
.
setState
(
"已办"
);
doTasks
.
setCompleteTime
(
new
Date
());
doTasks
.
setCompleteTime
(
new
Date
());
toDoTasksMapper
.
updateById
(
doTasks
);
toDoTasksMapper
.
updateById
(
doTasks
);
UserMessage
userMessage
=
new
UserMessage
(
doTasks
.
getType
(),
doTasks
.
getBusinessId
(),
doTasks
.
getAmosUserId
(),
new
Date
(),
doTasks
.
getTaskName
()+
"已完成"
,
doTasks
.
getAmosOrgCode
());
userMessageMapper
.
insert
(
userMessage
);
}
}
return
householdContractServiceImpl
.
updateById
(
householdContrac
);
return
householdContractServiceImpl
.
updateById
(
householdContrac
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/cancel/{sequenceNbr}"
)
@PostMapping
(
value
=
"/cancel/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"Post"
,
value
=
"作废"
,
notes
=
"作废"
)
@ApiOperation
(
httpMethod
=
"Post"
,
value
=
"作废"
,
notes
=
"作废"
)
...
@@ -260,6 +255,8 @@ public class HouseholdContractController extends BaseController {
...
@@ -260,6 +255,8 @@ public class HouseholdContractController extends BaseController {
if
(
doTasks
!=
null
){
if
(
doTasks
!=
null
){
doTasks
.
setState
(
"作废"
);
doTasks
.
setState
(
"作废"
);
toDoTasksMapper
.
updateById
(
doTasks
);
toDoTasksMapper
.
updateById
(
doTasks
);
UserMessage
userMessage
=
new
UserMessage
(
doTasks
.
getType
(),
doTasks
.
getBusinessId
(),
doTasks
.
getAmosUserId
(),
new
Date
(),
doTasks
.
getTaskName
()+
"已作废"
,
doTasks
.
getAmosOrgCode
());
userMessageMapper
.
insert
(
userMessage
);
}
}
return
householdContractServiceImpl
.
updateById
(
householdContrac
);
return
householdContractServiceImpl
.
updateById
(
householdContrac
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/ToDoTasksController.java
View file @
16c73517
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.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ToDoTasksPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ToDoTasksPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.ToDoTasks
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.ToDoTasks
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.ToDoTasksMapper
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
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.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.ToDoTasksServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.ToDoTasksServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -34,7 +40,8 @@ public class ToDoTasksController extends BaseController {
...
@@ -34,7 +40,8 @@ public class ToDoTasksController extends BaseController {
@Autowired
@Autowired
ToDoTasksServiceImpl
toDoTasksServiceImpl
;
ToDoTasksServiceImpl
toDoTasksServiceImpl
;
@Autowired
ToDoTasksMapper
toDoTasksMapper
;
/**
/**
* 新增人员任务
* 新增人员任务
*
*
...
@@ -119,4 +126,26 @@ public class ToDoTasksController extends BaseController {
...
@@ -119,4 +126,26 @@ public class ToDoTasksController extends BaseController {
public
ResponseModel
<
List
<
ToDoTasksDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
ToDoTasksDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
toDoTasksServiceImpl
.
queryForToDoTasksList
());
return
ResponseHelper
.
buildResponse
(
toDoTasksServiceImpl
.
queryForToDoTasksList
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/count"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个人员任务"
,
notes
=
"根据sequenceNbr查询单个人员任务"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
count
()
{
String
userid
=
getUserInfo
().
getUserId
();
LambdaQueryWrapper
<
ToDoTasks
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ToDoTasks:
:
getAmosUserId
,
userid
);
wrapper
.
eq
(
ToDoTasks:
:
getState
,
"待办"
);
Integer
DB
=
toDoTasksMapper
.
selectCount
(
wrapper
);
LambdaQueryWrapper
<
ToDoTasks
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
ToDoTasks:
:
getAmosUserId
,
userid
);
wrapper1
.
eq
(
ToDoTasks:
:
getState
,
"已办"
);
Integer
YB
=
toDoTasksMapper
.
selectCount
(
wrapper1
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"DB"
,
DB
==
null
?
0
:
DB
);
map
.
put
(
"YB"
,
YB
==
null
?
0
:
YB
);
return
ResponseHelper
.
buildResponse
(
map
);
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/UserMessageController.java
View file @
16c73517
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ToDoTasksPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UserMessagePageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.ToDoTasks
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.UserMessage
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -84,23 +89,14 @@ public class UserMessageController extends BaseController {
...
@@ -84,23 +89,14 @@ public class UserMessageController extends BaseController {
return
ResponseHelper
.
buildResponse
(
userMessageServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
userMessageServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
}
/**
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
* 列表分页查询
@GetMapping
(
value
=
"/page"
)
*
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"人员任务分页查询"
,
notes
=
"人员任务分页查询"
)
* @param current 当前页
public
ResponseModel
<
IPage
<
UserMessage
>>
queryForPage
(
UserMessagePageDto
userMessagePageDto
)
{
* @param current 每页大小
* @return
userMessagePageDto
.
setAmosUserId
(
getUserInfo
().
getUserId
());
*/
return
ResponseHelper
.
buildResponse
(
userMessageServiceImpl
.
queryUserMessagePageDto
(
userMessagePageDto
));
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
}
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"人员消息分页查询"
,
notes
=
"人员消息分页查询"
)
public
ResponseModel
<
Page
<
UserMessageDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
UserMessageDto
>
page
=
new
Page
<
UserMessageDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
userMessageServiceImpl
.
queryForUserMessagePage
(
page
));
}
/**
/**
* 列表全部数据查询
* 列表全部数据查询
...
@@ -113,4 +109,7 @@ public class UserMessageController extends BaseController {
...
@@ -113,4 +109,7 @@ public class UserMessageController extends BaseController {
public
ResponseModel
<
List
<
UserMessageDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
UserMessageDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
userMessageServiceImpl
.
queryForUserMessageList
());
return
ResponseHelper
.
buildResponse
(
userMessageServiceImpl
.
queryForUserMessageList
());
}
}
}
}
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 @
16c73517
...
@@ -13,8 +13,10 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.UnitInfoDto;
...
@@ -13,8 +13,10 @@ 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.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.entity.ToDoTasks
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.ToDoTasks
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.UserMessage
;
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.mapper.ToDoTasksMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.ToDoTasksMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.UserMessageMapper
;
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.boot.module.hygf.biz.feign.WorkflowFeignClient
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
...
@@ -55,7 +57,8 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
...
@@ -55,7 +57,8 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
private
String
AMOS_STUDIO_WEB
;
private
String
AMOS_STUDIO_WEB
;
@Value
(
"${amos.system.user.app-key}"
)
@Value
(
"${amos.system.user.app-key}"
)
private
String
AMOS_STUDIO
;
private
String
AMOS_STUDIO
;
@Autowired
UserMessageMapper
userMessageMapper
;
@Override
@Override
public
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
ReviewDto
>
queryForDealerReviewPage
(
int
pageNum
,
int
pageSize
,
ReviewDto
reviewDto
)
{
public
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
ReviewDto
>
queryForDealerReviewPage
(
int
pageNum
,
int
pageSize
,
ReviewDto
reviewDto
)
{
...
@@ -71,7 +74,7 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
...
@@ -71,7 +74,7 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
}
}
@Override
@Override
public
boolean
saveDealerReview
(
DealerReview
dealerReview
,
boolean
flag
,
boolean
token
)
{
public
boolean
saveDealerReview
(
DealerReview
dealerReview
,
boolean
flag
,
boolean
token
,
String
name
)
{
try
{
try
{
//流程节点code
//流程节点code
if
(
flag
)
{
if
(
flag
)
{
...
@@ -83,7 +86,7 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
...
@@ -83,7 +86,7 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
}
}
boolean
fl
=
this
.
saveOrUpdate
(
dealerReview
);
boolean
fl
=
this
.
saveOrUpdate
(
dealerReview
);
if
(
flag
)
{
if
(
flag
)
{
ToDoTasks
toDoTasks
=
new
ToDoTasks
(
TaskTypeStationEnum
.
经销商审核
.
getCode
(),
dealerReview
.
getSequenceNbr
(),
TaskTypeStationEnum
.
经销商审核
.
getCode
()
,
null
);
ToDoTasks
toDoTasks
=
new
ToDoTasks
(
TaskTypeStationEnum
.
经销商审核
.
getCode
(),
dealerReview
.
getSequenceNbr
(),
"经销商"
+
name
+
"审核"
,
null
);
toDoTasksServiceImpl
.
addToDoTasksByRole
(
dealerReview
.
getNodeRole
(),
toDoTasks
);
toDoTasksServiceImpl
.
addToDoTasksByRole
(
dealerReview
.
getNodeRole
(),
toDoTasks
);
}
else
{
}
else
{
LambdaQueryWrapper
<
ToDoTasks
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
ToDoTasks
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
@@ -95,6 +98,8 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
...
@@ -95,6 +98,8 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
doTasks
.
setState
(
"已办"
);
doTasks
.
setState
(
"已办"
);
doTasks
.
setCompleteTime
(
new
Date
());
doTasks
.
setCompleteTime
(
new
Date
());
toDoTasksMapper
.
updateById
(
doTasks
);
toDoTasksMapper
.
updateById
(
doTasks
);
UserMessage
userMessage
=
new
UserMessage
(
doTasks
.
getType
(),
doTasks
.
getBusinessId
(),
doTasks
.
getAmosUserId
(),
new
Date
(),
doTasks
.
getTaskName
()+
"已完成"
,
doTasks
.
getAmosOrgCode
());
userMessageMapper
.
insert
(
userMessage
);
}
}
}
}
return
fl
;
return
fl
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HouseholdContractServiceImpl.java
View file @
16c73517
...
@@ -190,7 +190,7 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
...
@@ -190,7 +190,7 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
householdContractMapper
.
updateById
(
householdContract
);
householdContractMapper
.
updateById
(
householdContract
);
//创建农户待办
//创建农户待办
ToDoTasks
toDoTasks1
=
new
ToDoTasks
(
TaskTypeStationEnum
.
合同填报
.
getCode
(),
householdContract
.
getSequenceNbr
(),
TaskTypeStationEnum
.
合同填报
.
getCode
()
,
householdContract
.
getDealerCode
());
ToDoTasks
toDoTasks1
=
new
ToDoTasks
(
TaskTypeStationEnum
.
合同填报
.
getCode
(),
householdContract
.
getSequenceNbr
(),
"用户"
+
householdContract
.
getPartyA
()+
"的合同填写"
,
householdContract
.
getDealerCode
());
PeasantHousehold
peasantHousehold
=
peasantHouseholdServiceImpl
.
getById
(
householdContract
.
getPeasantHouseholdId
());
PeasantHousehold
peasantHousehold
=
peasantHouseholdServiceImpl
.
getById
(
householdContract
.
getPeasantHouseholdId
());
toDoTasksServiceImpl
.
addToDoTasksByUserId
(
peasantHousehold
.
getAmosUserId
(),
toDoTasks1
);
toDoTasksServiceImpl
.
addToDoTasksByUserId
(
peasantHousehold
.
getAmosUserId
(),
toDoTasks1
);
return
householdContract
;
return
householdContract
;
...
@@ -296,7 +296,7 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
...
@@ -296,7 +296,7 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
householdContractMapper
.
updateById
(
householdContract
);
householdContractMapper
.
updateById
(
householdContract
);
//生成填报任务
//生成填报任务
ToDoTasks
toDoTasks1
=
new
ToDoTasks
(
TaskTypeStationEnum
.
合同填报
.
getCode
(),
householdContract
.
getSequenceNbr
(),
TaskTypeStationEnum
.
合同填报
.
getCode
()
,
householdContract
.
getDealerCode
());
ToDoTasks
toDoTasks1
=
new
ToDoTasks
(
TaskTypeStationEnum
.
合同填报
.
getCode
(),
householdContract
.
getSequenceNbr
(),
"用户"
+
householdContract
.
getPartyA
()+
"的合同填写"
,
householdContract
.
getDealerCode
());
PeasantHousehold
peasan
=
peasantHouseholdServiceImpl
.
getById
(
householdContract
.
getPeasantHouseholdId
());
PeasantHousehold
peasan
=
peasantHouseholdServiceImpl
.
getById
(
householdContract
.
getPeasantHouseholdId
());
toDoTasksServiceImpl
.
addToDoTasksByUserId
(
peasan
.
getAmosUserId
(),
toDoTasks1
);
toDoTasksServiceImpl
.
addToDoTasksByUserId
(
peasan
.
getAmosUserId
(),
toDoTasks1
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
View file @
16c73517
...
@@ -194,10 +194,10 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
...
@@ -194,10 +194,10 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
householdContractServiceImpl
.
addHouseholdContract
(
householdContract
);
householdContractServiceImpl
.
addHouseholdContract
(
householdContract
);
//生成待办任务
//生成待办任务
ToDoTasks
toDoTasks
=
new
ToDoTasks
(
TaskTypeStationEnum
.
电站勘察
.
getCode
(),
peasantHousehold
.
getSequenceNbr
(),
TaskTypeStationEnum
.
电站勘察
.
getCode
()
,
householdContract
.
getDealerCode
());
ToDoTasks
toDoTasks
=
new
ToDoTasks
(
TaskTypeStationEnum
.
电站勘察
.
getCode
(),
peasantHousehold
.
getSequenceNbr
(),
"用户"
+
householdContract
.
getPartyA
()+
"电站信息勘察"
,
householdContract
.
getDealerCode
());
toDoTasksServiceImpl
.
addToDoTasksByUserId
(
peasantHousehold
.
getDeveloperUserId
(),
toDoTasks
);
toDoTasksServiceImpl
.
addToDoTasksByUserId
(
peasantHousehold
.
getDeveloperUserId
(),
toDoTasks
);
ToDoTasks
toDoTasks1
=
new
ToDoTasks
(
TaskTypeStationEnum
.
合同填报
.
getCode
(),
householdContract
.
getSequenceNbr
(),
TaskTypeStationEnum
.
合同填报
.
getCode
()
,
householdContract
.
getDealerCode
());
ToDoTasks
toDoTasks1
=
new
ToDoTasks
(
TaskTypeStationEnum
.
合同填报
.
getCode
(),
householdContract
.
getSequenceNbr
(),
"用户"
+
householdContract
.
getPartyA
()+
"的合同待发起"
,
householdContract
.
getDealerCode
());
toDoTasksServiceImpl
.
addToDoTasksByUserId
(
peasantHousehold
.
getDeveloperUserId
(),
toDoTasks1
);
toDoTasksServiceImpl
.
addToDoTasksByUserId
(
peasantHousehold
.
getDeveloperUserId
(),
toDoTasks1
);
return
model
;
return
model
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
View file @
16c73517
...
@@ -99,13 +99,13 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -99,13 +99,13 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
roleSeqMap
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userDataZHDto
.
getRole
());
roleSeqMap
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userDataZHDto
.
getRole
());
orgRoles
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userRoleList
);
orgRoles
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userRoleList
);
agencyUserModel
.
setAppCodes
(
split
);
//
agencyUserModel.setAppCodes(split);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
// 将创建用户加入用户组
// 将创建用户加入用户组
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
if
(
userResult
==
null
||
userResult
.
get
Result
()
==
null
)
{
if
(
userResult
==
null
||
userResult
.
get
Status
()!=
200
)
{
throw
new
BadRequest
(
"新增人员失败!"
);
throw
new
BadRequest
(
"新增人员失败!"
+
userResult
.
getDevMessage
()
);
}
}
List
<
String
>
userId
=
new
ArrayList
<>();
List
<
String
>
userId
=
new
ArrayList
<>();
userId
.
add
(
userResult
.
getResult
().
getUserId
());
userId
.
add
(
userResult
.
getResult
().
getUserId
());
...
@@ -124,8 +124,8 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -124,8 +124,8 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
publicAgencyUser
.
setAmosId
(
userDataJBDto
.
getAmosUnitId
());
publicAgencyUser
.
setAmosId
(
userDataJBDto
.
getAmosUnitId
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
seleteOne
(
userDataJBDto
.
getAmosUnitId
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
seleteOne
(
userDataJBDto
.
getAmosUnitId
());
if
(
companyResult
==
null
||
companyResult
.
get
Result
()
==
null
)
{
if
(
companyResult
==
null
||
companyResult
.
get
Status
()!=
200
)
{
throw
new
BadRequest
(
"新增人员失败
"
);
throw
new
BadRequest
(
"新增人员失败
!"
+
companyResult
.
getDevMessage
()
);
}
}
publicAgencyUser
.
setAmosOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
publicAgencyUser
.
setAmosOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
publicAgencyUser
.
setAmosUserId
(
userResult
.
getResult
().
getUserId
());
publicAgencyUser
.
setAmosUserId
(
userResult
.
getResult
().
getUserId
());
...
@@ -146,8 +146,8 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -146,8 +146,8 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
PersonnelBusiness
re
=
new
PersonnelBusiness
();
PersonnelBusiness
re
=
new
PersonnelBusiness
();
FeignClientResult
<
CompanyModel
>
companyResult1
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
FeignClientResult
<
CompanyModel
>
companyResult1
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
if
(
companyResult1
==
null
||
companyResult1
.
get
Result
()
==
null
)
{
if
(
companyResult1
==
null
||
companyResult1
.
get
Status
()!=
200
)
{
throw
new
BadRequest
(
"新增人员失败
"
);
throw
new
BadRequest
(
"新增人员失败
!"
+
companyResult1
.
getDevMessage
()
);
}
}
re
.
setRegionalCompaniesSeq
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
re
.
setRegionalCompaniesSeq
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
re
.
setRegionalCompaniesName
(
companyResult1
.
getResult
().
getCompanyName
());
re
.
setRegionalCompaniesName
(
companyResult1
.
getResult
().
getCompanyName
());
...
@@ -198,13 +198,13 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -198,13 +198,13 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
roleSeqMap
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userDataZHDto
.
getRole
());
roleSeqMap
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userDataZHDto
.
getRole
());
orgRoles
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userRoleList
);
orgRoles
.
put
(
Long
.
valueOf
(
userDataJBDto
.
getAmosUnitId
()),
userRoleList
);
agencyUserModel
.
setAppCodes
(
split
);
//
agencyUserModel.setAppCodes(split);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
// 将创建用户加入用户组
// 将创建用户加入用户组
userResult
=
Privilege
.
agencyUserClient
.
update
(
agencyUserModel
,
publicAgencyUser
.
getAmosUserId
());
userResult
=
Privilege
.
agencyUserClient
.
update
(
agencyUserModel
,
publicAgencyUser
.
getAmosUserId
());
if
(
userResult
==
null
||
userResult
.
get
Result
()
==
null
)
{
if
(
userResult
==
null
||
userResult
.
get
Status
()!=
200
)
{
throw
new
BadRequest
(
"修改人员失败!"
);
throw
new
BadRequest
(
"修改人员失败!"
+
userResult
.
getDevMessage
()
);
}
}
List
<
String
>
userId
=
new
ArrayList
<>();
List
<
String
>
userId
=
new
ArrayList
<>();
userId
.
add
(
userResult
.
getResult
().
getUserId
());
userId
.
add
(
userResult
.
getResult
().
getUserId
());
...
@@ -222,8 +222,8 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -222,8 +222,8 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
publicAgencyUser
.
setAmosId
(
userDataJBDto
.
getAmosUnitId
());
publicAgencyUser
.
setAmosId
(
userDataJBDto
.
getAmosUnitId
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
seleteOne
(
userDataJBDto
.
getAmosUnitId
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
seleteOne
(
userDataJBDto
.
getAmosUnitId
());
if
(
companyResult
==
null
||
companyResult
.
get
Result
()
==
null
)
{
if
(
companyResult
==
null
||
companyResult
.
get
Status
()!=
200
)
{
throw
new
BadRequest
(
"修改人员失败
"
);
throw
new
BadRequest
(
"修改人员失败
!"
+
companyResult
.
getDevMessage
()
);
}
}
publicAgencyUser
.
setAmosOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
publicAgencyUser
.
setAmosOrgCode
(
companyResult
.
getResult
().
getOrgCode
());
publicAgencyUser
.
setAmosUserName
(
userDataZHDto
.
getUserName
());
publicAgencyUser
.
setAmosUserName
(
userDataZHDto
.
getUserName
());
...
@@ -247,8 +247,8 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -247,8 +247,8 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
PersonnelBusiness
re
=
personnelBusinessMapper
.
selectOne
(
qug
);
PersonnelBusiness
re
=
personnelBusinessMapper
.
selectOne
(
qug
);
FeignClientResult
<
CompanyModel
>
companyResult1
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
FeignClientResult
<
CompanyModel
>
companyResult1
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
if
(
companyResult1
==
null
||
companyResult1
.
get
Result
()
==
null
)
{
if
(
companyResult1
==
null
||
companyResult1
.
get
Status
()!=
200
)
{
throw
new
BadRequest
(
"修改人员失败
"
);
throw
new
BadRequest
(
"修改人员失败
!"
+
companyResult1
.
getDevMessage
()
);
}
}
re
.
setRegionalCompaniesSeq
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
re
.
setRegionalCompaniesSeq
(
Long
.
valueOf
(
userDataJBDto
.
getRegionalCompaniesSeq
()));
re
.
setRegionalCompaniesName
(
companyResult1
.
getResult
().
getCompanyName
());
re
.
setRegionalCompaniesName
(
companyResult1
.
getResult
().
getCompanyName
());
...
@@ -302,7 +302,9 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -302,7 +302,9 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
unitInfo
.
setAdminLoginName
(
publicAgencyUse
.
getAmosUserName
());
unitInfo
.
setAdminLoginName
(
publicAgencyUse
.
getAmosUserName
());
unitInfo
.
setAdminPhone
(
publicAgencyUse
.
getEmergencyTelephone
());
unitInfo
.
setAdminPhone
(
publicAgencyUse
.
getEmergencyTelephone
());
unitInfo
.
setAdminUserId
(
publicAgencyUse
.
getAmosUserId
());
unitInfo
.
setAdminUserId
(
publicAgencyUse
.
getAmosUserId
());
unitInfo
.
setAdminUserName
(
publicAgencyUse
.
getRecUserName
());
unitInfo
.
setAdminUserName
(
publicAgencyUse
.
getRealName
());
unitInfoMapper
.
updateById
(
unitInfo
);
unitInfoMapper
.
updateById
(
unitInfo
);
List
<
String
>
userId
=
new
ArrayList
<>();
List
<
String
>
userId
=
new
ArrayList
<>();
...
...
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 @
16c73517
...
@@ -69,7 +69,8 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
...
@@ -69,7 +69,8 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
ToDoTasksMapper
toDoTasksMapper
;
ToDoTasksMapper
toDoTasksMapper
;
@Autowired
@Autowired
ToDoTasksServiceImpl
toDoTasksServiceImpl
;
ToDoTasksServiceImpl
toDoTasksServiceImpl
;
@Autowired
UserMessageMapper
userMessageMapper
;
public
Page
<
PowerStationDto
>
queryForPowerStationUserRoles
(
Page
<
PowerStationDto
>
page
,
String
powerStationCode
,
String
ownersName
,
AgencyUserModel
userInfo
){
public
Page
<
PowerStationDto
>
queryForPowerStationUserRoles
(
Page
<
PowerStationDto
>
page
,
String
powerStationCode
,
String
ownersName
,
AgencyUserModel
userInfo
){
String
serviceAgent
=
null
;
String
serviceAgent
=
null
;
// Map<Long, List<RoleModel>> orgRoles = userInfo.getOrgRoles();
// Map<Long, List<RoleModel>> orgRoles = userInfo.getOrgRoles();
...
@@ -112,7 +113,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
...
@@ -112,7 +113,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
@Override
@Override
@Transactional
@Transactional
public
boolean
savePowerStation
(
PowerStation
powerStation
,
boolean
flag
)
{
public
boolean
savePowerStation
(
PowerStation
powerStation
,
boolean
flag
,
String
name
)
{
try
{
try
{
//流程节点code
//流程节点code
if
(
flag
)
{
if
(
flag
)
{
...
@@ -128,7 +129,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
...
@@ -128,7 +129,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
//获取经销商orgcode
//获取经销商orgcode
PeasantHousehold
peasantHouseholdd
=
peasantHouseholdService
.
getById
(
powerStation
.
getPeasantHouseholdId
());
PeasantHousehold
peasantHouseholdd
=
peasantHouseholdService
.
getById
(
powerStation
.
getPeasantHouseholdId
());
ToDoTasks
toDoTasks
=
new
ToDoTasks
(
TaskTypeStationEnum
.
电站审核
.
getCode
(),
powerStation
.
getSequenceNbr
(),
TaskTypeStationEnum
.
电站审核
.
getCode
()
,
peasantHouseholdd
.
getDeveloperCode
());
ToDoTasks
toDoTasks
=
new
ToDoTasks
(
TaskTypeStationEnum
.
电站审核
.
getCode
(),
powerStation
.
getSequenceNbr
(),
"用户"
+
name
+
"电站审核"
,
peasantHouseholdd
.
getDeveloperCode
());
toDoTasksServiceImpl
.
addToDoTasksByRole
(
powerStation
.
getNodeRole
(),
toDoTasks
);
toDoTasksServiceImpl
.
addToDoTasksByRole
(
powerStation
.
getNodeRole
(),
toDoTasks
);
}
else
{
}
else
{
...
@@ -142,6 +143,8 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
...
@@ -142,6 +143,8 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
doTasks
.
setCompleteTime
(
new
Date
());
doTasks
.
setCompleteTime
(
new
Date
());
toDoTasksMapper
.
updateById
(
doTasks
);
toDoTasksMapper
.
updateById
(
doTasks
);
UserMessage
userMessage
=
new
UserMessage
(
doTasks
.
getType
(),
doTasks
.
getBusinessId
(),
doTasks
.
getAmosUserId
(),
new
Date
(),
doTasks
.
getTaskName
()+
"已完成"
,
doTasks
.
getAmosOrgCode
());
userMessageMapper
.
insert
(
userMessage
);
}
}
}
}
...
@@ -219,7 +222,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
...
@@ -219,7 +222,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
String
flowTaskId
=
String
.
valueOf
(
resultObj
.
get
(
"flowTaskId"
));
String
flowTaskId
=
String
.
valueOf
(
resultObj
.
get
(
"flowTaskId"
));
powerStation
.
setFlowTaskId
(
flowTaskId
);
powerStation
.
setFlowTaskId
(
flowTaskId
);
}
}
powerStationService
.
savePowerStation
(
powerStation
,
flag
);
powerStationService
.
savePowerStation
(
powerStation
,
flag
,
powerStation
.
getOwnersName
()
);
if
(!
flag
){
if
(!
flag
){
//更新农户状态
//更新农户状态
String
peasantHouseholdId
=
powerStation
.
getPeasantHouseholdId
();
String
peasantHouseholdId
=
powerStation
.
getPeasantHouseholdId
();
...
...
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 @
16c73517
...
@@ -235,7 +235,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
...
@@ -235,7 +235,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
powerStation
.
setFlowTaskId
(
flowTaskId
);
powerStation
.
setFlowTaskId
(
flowTaskId
);
powerStation
.
setNextProcessNode
(
PowerStationNodeEnum
.
设计审核
.
getCode
());
powerStation
.
setNextProcessNode
(
PowerStationNodeEnum
.
设计审核
.
getCode
());
}
}
powerStationService
.
savePowerStation
(
powerStation
,
true
);
powerStationService
.
savePowerStation
(
powerStation
,
true
,
powerStation
.
getOwnersName
()
);
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
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/ToDoTasksServiceImpl.java
View file @
16c73517
...
@@ -10,7 +10,9 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.TasksRole;
...
@@ -10,7 +10,9 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.TasksRole;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ToDoTasksPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ToDoTasksPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.ToDoTasks
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.ToDoTasks
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.UserMessage
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.ToDoTasksMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.ToDoTasksMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.UserMessageMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IToDoTasksService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IToDoTasksService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ToDoTasksDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ToDoTasksDto
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -24,6 +26,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -24,6 +26,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* 人员任务服务实现类
* 人员任务服务实现类
...
@@ -38,6 +41,9 @@ public class ToDoTasksServiceImpl extends BaseService<ToDoTasksDto,ToDoTasks,ToD
...
@@ -38,6 +41,9 @@ public class ToDoTasksServiceImpl extends BaseService<ToDoTasksDto,ToDoTasks,ToD
ToDoTasksMapper
toDoTasksMapper
;
ToDoTasksMapper
toDoTasksMapper
;
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
UserMessageMapper
userMessageMapper
;
final
static
Logger
log
=
LoggerFactory
.
getLogger
(
ToDoTasksServiceImpl
.
class
);
final
static
Logger
log
=
LoggerFactory
.
getLogger
(
ToDoTasksServiceImpl
.
class
);
/**
/**
...
@@ -81,9 +87,17 @@ public class ToDoTasksServiceImpl extends BaseService<ToDoTasksDto,ToDoTasks,ToD
...
@@ -81,9 +87,17 @@ public class ToDoTasksServiceImpl extends BaseService<ToDoTasksDto,ToDoTasks,ToD
doTasks
.
setState
(
"已办"
);
doTasks
.
setState
(
"已办"
);
doTasks
.
setCompleteTime
(
new
Date
());
doTasks
.
setCompleteTime
(
new
Date
());
toDoTasksMapper
.
updateById
(
doTasks
);
toDoTasksMapper
.
updateById
(
doTasks
);
UserMessage
userMessage
=
new
UserMessage
(
doTasks
.
getType
(),
doTasks
.
getBusinessId
(),
doTasks
.
getAmosUserId
(),
new
Date
(),
doTasks
.
getTaskName
()+
"已完成"
,
doTasks
.
getAmosOrgCode
());
userMessageMapper
.
insert
(
userMessage
);
}
}
toDoTasks
.
setAmosUserId
(
userId
);
toDoTasks
.
setAmosUserId
(
userId
);
toDoTasksMapper
.
insert
(
toDoTasks
);
toDoTasksMapper
.
insert
(
toDoTasks
);
UserMessage
userMessage
=
new
UserMessage
(
toDoTasks
.
getType
(),
toDoTasks
.
getBusinessId
(),
toDoTasks
.
getAmosUserId
(),
new
Date
(),
toDoTasks
.
getTaskName
()+
"待完成"
,
toDoTasks
.
getAmosOrgCode
());
userMessageMapper
.
insert
(
userMessage
);
}
}
@Override
@Override
...
@@ -102,38 +116,53 @@ public class ToDoTasksServiceImpl extends BaseService<ToDoTasksDto,ToDoTasks,ToD
...
@@ -102,38 +116,53 @@ public class ToDoTasksServiceImpl extends BaseService<ToDoTasksDto,ToDoTasks,ToD
doTasks
.
setState
(
"已办"
);
doTasks
.
setState
(
"已办"
);
doTasks
.
setCompleteTime
(
new
Date
());
doTasks
.
setCompleteTime
(
new
Date
());
toDoTasksMapper
.
updateById
(
doTasks
);
toDoTasksMapper
.
updateById
(
doTasks
);
UserMessage
userMessage
=
new
UserMessage
(
doTasks
.
getType
(),
doTasks
.
getBusinessId
(),
doTasks
.
getAmosUserId
(),
new
Date
(),
doTasks
.
getTaskName
()+
"已完成"
,
doTasks
.
getAmosOrgCode
());
userMessageMapper
.
insert
(
userMessage
);
}
}
synchronized
(
this
)
{
synchronized
(
this
)
{
if
(
redisUtils
.
hasKey
(
"TAKS_"
+
role
))
{
if
(
redisUtils
.
hasKey
(
"TAKS_"
+
role
))
{
List
<
TasksRole
>
list
=
JSON
.
parseArray
(
redisUtils
.
get
(
"TAKS_"
+
role
).
toString
(),
TasksRole
.
class
);
String
id
=
redisUtils
.
get
(
"TAKS_"
+
role
).
toString
();
toDoTasks
.
setAmosUserId
(
list
.
get
(
0
).
getAmosUserId
());
List
<
TasksRole
>
listd
=
toDoTasksMapper
.
getTasksRole
(
role
,
toDoTasks
.
getAmosOrgCode
());
list
.
remove
(
0
);
if
(
listd
!=
null
&&
!
listd
.
isEmpty
())
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
List
<
String
>
idList
=
listd
.
stream
().
map
(
TasksRole:
:
getAmosUserId
).
collect
(
Collectors
.
toList
());
redisUtils
.
set
(
"TAKS_"
+
role
,
JSON
.
toJSONString
(
list
));
if
(
idList
.
indexOf
(
id
)>-
1
){
}
else
{
if
(
idList
.
indexOf
(
id
)+
1
>
idList
.
size
()-
1
){
redisUtils
.
del
(
"TAKS_"
+
role
);
toDoTasks
.
setAmosUserId
(
idList
.
get
(
0
));
redisUtils
.
set
(
"TAKS_"
+
role
,
idList
.
get
(
0
));
}
else
{
toDoTasks
.
setAmosUserId
(
idList
.
get
(
idList
.
indexOf
(
id
)+
1
));
redisUtils
.
set
(
"TAKS_"
+
role
,
idList
.
get
(
idList
.
indexOf
(
id
)+
1
));
}
}
else
{
toDoTasks
.
setAmosUserId
(
idList
.
get
(
0
));
redisUtils
.
set
(
"TAKS_"
+
role
,
idList
.
get
(
0
));
}
}
else
{
log
.
info
(
"没有此角色人员!"
);
}
}
}
else
{
}
else
{
List
<
TasksRole
>
listd
=
toDoTasksMapper
.
getTasksRole
(
role
,
toDoTasks
.
getAmosOrgCode
());
List
<
TasksRole
>
listd
=
toDoTasksMapper
.
getTasksRole
(
role
,
toDoTasks
.
getAmosOrgCode
());
if
(
listd
!=
null
&&
!
listd
.
isEmpty
())
{
if
(
listd
!=
null
&&
!
listd
.
isEmpty
())
{
List
<
String
>
idList
=
listd
.
stream
().
map
(
TasksRole:
:
getAmosUserId
).
collect
(
Collectors
.
toList
());
toDoTasks
.
setAmosUserId
(
idList
.
get
(
0
));
redisUtils
.
set
(
"TAKS_"
+
role
,
idList
.
get
(
0
));
toDoTasks
.
setAmosUserId
(
listd
.
get
(
0
).
getAmosUserId
());
}
else
{
listd
.
remove
(
0
);
if
(
listd
!=
null
&&
!
listd
.
isEmpty
())
{
redisUtils
.
set
(
"TAKS_"
+
role
,
JSON
.
toJSONString
(
listd
));
}
}
else
{
log
.
info
(
"没有此角色人员!"
);
log
.
info
(
"没有此角色人员!"
);
}
}
}
}
toDoTasksMapper
.
insert
(
toDoTasks
);
toDoTasksMapper
.
insert
(
toDoTasks
);
UserMessage
userMessage
=
new
UserMessage
(
toDoTasks
.
getType
(),
toDoTasks
.
getBusinessId
(),
toDoTasks
.
getAmosUserId
(),
new
Date
(),
toDoTasks
.
getTaskName
()+
"待完成"
,
toDoTasks
.
getAmosOrgCode
());
userMessageMapper
.
insert
(
userMessage
);
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
info
(
"生成待办任务失败!"
);
log
.
info
(
"生成待办任务失败!"
);
...
...
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 @
16c73517
...
@@ -302,8 +302,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -302,8 +302,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
CompanyModel
companyInfo
=
new
CompanyModel
();
CompanyModel
companyInfo
=
new
CompanyModel
();
FeignClientResult
<
AgencyUserModel
>
userResult
=
null
;
FeignClientResult
<
AgencyUserModel
>
userResult
=
null
;
try
{
try
{
FeignClientResult
<
List
<
RoleModel
>>
roleListResult
=
Privilege
.
roleClient
.
queryRoleList
(
null
,
null
);
//
FeignClientResult<List<RoleModel>> roleListResult = Privilege.roleClient.queryRoleList(null, null);
List
<
RoleModel
>
allRoleList
=
roleListResult
.
getResult
();
//
List<RoleModel> allRoleList = roleListResult.getResult();
List
<
RoleModel
>
userRoleList
=
new
ArrayList
<>();
List
<
RoleModel
>
userRoleList
=
new
ArrayList
<>();
List
<
Long
>
roleIds
=
new
ArrayList
<>();
List
<
Long
>
roleIds
=
new
ArrayList
<>();
// 1创建公司
// 1创建公司
...
@@ -312,14 +312,16 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -312,14 +312,16 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
companyInfo
.
setParentId
(
Long
.
parseLong
(
regUnitInfo
.
getManagementUnitId
()));
companyInfo
.
setParentId
(
Long
.
parseLong
(
regUnitInfo
.
getManagementUnitId
()));
companyInfo
.
setLevel
(
"station"
);
companyInfo
.
setLevel
(
"station"
);
companyInfo
.
setCompanyName
(
regUnitInfo
.
getName
());
companyInfo
.
setCompanyName
(
regUnitInfo
.
getName
());
// companyInfo.setCompanyCode(regUnitInfo.getUnitTypeCod
e());
// companyInfo.setCompanyCode(regUnitInfo.getUnitTyp
e());
companyInfo
.
setContact
(
regUnitInfo
.
getHeadName
());
companyInfo
.
setContact
(
regUnitInfo
.
getHeadName
());
companyInfo
.
setCompanyType
(
regUnitInfo
.
getUnitType
());
companyInfo
.
setCompanyType
(
regUnitInfo
.
getUnitType
());
companyInfo
.
setLandlinePhone
(
regUnitInfo
.
getHeadPhone
());
companyInfo
.
setLandlinePhone
(
regUnitInfo
.
getHeadPhone
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
create
(
companyInfo
);
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
create
(
companyInfo
);
if
(
companyResult
==
null
||
companyResult
.
getResult
()
==
null
)
{
throw
new
BadRequest
(
"单位注册失败"
);
if
(
companyResult
==
null
||
companyResult
.
getStatus
()!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
companyResult
.
getDevMessage
());
}
}
String
adminUserName
=
regUnitInfo
.
getAdminUserName
();
String
adminUserName
=
regUnitInfo
.
getAdminUserName
();
String
loginName
=
regUnitInfo
.
getAdminLoginName
();
String
loginName
=
regUnitInfo
.
getAdminLoginName
();
String
pwd
=
regUnitInfo
.
getAdminLoginPwd
();
String
pwd
=
regUnitInfo
.
getAdminLoginPwd
();
...
@@ -337,24 +339,25 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -337,24 +339,25 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
List
<
String
>
split
=
Arrays
.
asList
(
StringUtils
.
split
(
appCodes
,
','
));
List
<
String
>
split
=
Arrays
.
asList
(
StringUtils
.
split
(
appCodes
,
','
));
Map
<
Long
,
List
<
Long
>>
roleSeqMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
Long
>>
roleSeqMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
userRoleList
=
allRoleList
.
stream
().
filter
(
r
->
r
.
getSequenceNbr
().
toString
().
equals
(
regUnitInfo
.
getRoleId
()))
//
userRoleList = allRoleList.stream().filter(r -> r.getSequenceNbr().toString().equals(regUnitInfo.getRoleId()))
.
collect
(
Collectors
.
toList
());
//
.collect(Collectors.toList());
userRoleList
.
forEach
(
r
->
{
//
userRoleList.forEach(r -> {
if
(!
roleIds
.
contains
(
r
.
getSequenceNbr
()))
{
//
if (!roleIds.contains(r.getSequenceNbr())) {
roleIds
.
add
(
r
.
getSequenceNbr
());
//
roleIds.add(r.getSequenceNbr());
}
//
}
});
//
});
// roleIds.add(Long.valueOf(regUnitInfo.getRoleId()));
// roleIds.add(Long.valueOf(regUnitInfo.getRoleId()));
roleIds
.
add
(
userGroupId
);
roleSeqMap
.
put
(
companyInfo
.
getSequenceNbr
(),
roleIds
);
roleSeqMap
.
put
(
companyInfo
.
getSequenceNbr
(),
roleIds
);
orgRoles
.
put
(
companyInfo
.
getSequenceNbr
(),
userRoleList
);
orgRoles
.
put
(
companyInfo
.
getSequenceNbr
(),
userRoleList
);
agencyUserModel
.
setAppCodes
(
split
);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
if
(
userResult
==
null
||
userResult
.
getResult
()
==
null
)
{
throw
new
BadRequest
(
"单位注册失败"
);
if
(
userResult
==
null
||
userResult
.
getStatus
()!=
200
)
{
throw
new
BadRequest
(
"单位注册失败!"
+
userResult
.
getDevMessage
());
}
}
// String[] userIds = { userResult.getResult().getUserId() };
regUnitInfo
.
setAdminUserId
(
userResult
.
getResult
().
getUserId
());
regUnitInfo
.
setAdminUserId
(
userResult
.
getResult
().
getUserId
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
());
regUnitInfo
.
setAmosCompanyCode
(
companyInfo
.
getOrgCode
());
regUnitInfo
.
setAmosCompanyCode
(
companyInfo
.
getOrgCode
());
...
@@ -397,6 +400,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -397,6 +400,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
try
{
try
{
FeignClientResult
<
String
>
submit
=
idxFeginService
.
tokenSubmit
(
AMOS_STUDIO
,
AMOS_STUDIO_WEB
,
requestContext
.
getToken
(),
pageId
,
taskId
,
planId
,
null
,
"DEALER_EXAMINE"
,
null
,
objectMap
);
FeignClientResult
<
String
>
submit
=
idxFeginService
.
tokenSubmit
(
AMOS_STUDIO
,
AMOS_STUDIO_WEB
,
requestContext
.
getToken
(),
pageId
,
taskId
,
planId
,
null
,
"DEALER_EXAMINE"
,
null
,
objectMap
);
System
.
out
.
println
(
"经销商注册发起"
+
AMOS_STUDIO
+
"@"
+
AMOS_STUDIO_WEB
+
"@"
+
requestContext
.
getToken
());
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
submit
.
getStatus
())))
{
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
submit
.
getStatus
())))
{
String
code
=
submit
.
getResult
();
String
code
=
submit
.
getResult
();
// 插入记录表
// 插入记录表
...
@@ -414,7 +419,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -414,7 +419,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
dealerReview
.
setFlowTaskId
(
flowTaskId
);
dealerReview
.
setFlowTaskId
(
flowTaskId
);
dealerReview
.
setNextProcessNode
(
DealerReviewEnum
.
经销商管理员审核
.
getCode
());
dealerReview
.
setNextProcessNode
(
DealerReviewEnum
.
经销商管理员审核
.
getCode
());
}
}
dealerReviewService
.
saveDealerReview
(
dealerReview
,
true
,
false
);
dealerReviewService
.
saveDealerReview
(
dealerReview
,
true
,
false
,
regUnitInfo
.
getName
()
);
}
else
{
}
else
{
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
}
...
@@ -467,7 +472,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -467,7 +472,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
String
flowTaskId
=
String
.
valueOf
(
resultObj
.
get
(
"flowTaskId"
));
String
flowTaskId
=
String
.
valueOf
(
resultObj
.
get
(
"flowTaskId"
));
dealerReview
.
setFlowTaskId
(
flowTaskId
);
dealerReview
.
setFlowTaskId
(
flowTaskId
);
}
}
dealerReviewService
.
saveDealerReview
(
dealerReview
,
false
,
true
);
dealerReviewService
.
saveDealerReview
(
dealerReview
,
false
,
true
,
unitInfo
.
getName
()
);
}
}
this
.
saveOrUpdate
(
unitInfo
);
this
.
saveOrUpdate
(
unitInfo
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/UserMessageServiceImpl.java
View file @
16c73517
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
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.dto.ToDoTasksPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UserMessagePageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.ToDoTasks
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.UserMessage
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.UserMessage
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.UserMessageMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.UserMessageMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IUserMessageService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IUserMessageService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UserMessageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UserMessageDto
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -17,6 +24,10 @@ import java.util.List;
...
@@ -17,6 +24,10 @@ import java.util.List;
*/
*/
@Service
@Service
public
class
UserMessageServiceImpl
extends
BaseService
<
UserMessageDto
,
UserMessage
,
UserMessageMapper
>
implements
IUserMessageService
{
public
class
UserMessageServiceImpl
extends
BaseService
<
UserMessageDto
,
UserMessage
,
UserMessageMapper
>
implements
IUserMessageService
{
@Autowired
UserMessageMapper
userMessageMapper
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -30,4 +41,19 @@ public class UserMessageServiceImpl extends BaseService<UserMessageDto,UserMessa
...
@@ -30,4 +41,19 @@ public class UserMessageServiceImpl extends BaseService<UserMessageDto,UserMessa
public
List
<
UserMessageDto
>
queryForUserMessageList
()
{
public
List
<
UserMessageDto
>
queryForUserMessageList
()
{
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
public
IPage
<
UserMessage
>
queryUserMessagePageDto
(
UserMessagePageDto
dto
)
{
//列表数据组装
QueryWrapper
<
UserMessage
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
StringUtils
.
isNotEmpty
(
dto
.
getType
()),
"type"
,
dto
.
getType
()
);
qw
.
eq
(
StringUtils
.
isNotEmpty
(
dto
.
getAmosUserId
()),
"amos_user_id"
,
dto
.
getAmosUserId
()
);
qw
.
orderBy
(
Boolean
.
TRUE
,
Boolean
.
FALSE
,
"creation_time"
);
IPage
<
UserMessage
>
toDoTasksPage
=
userMessageMapper
.
selectPage
(
dto
,
qw
);
return
toDoTasksPage
;
}
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application.properties
View file @
16c73517
...
@@ -30,8 +30,8 @@ spring.liquibase.enabled=true
...
@@ -30,8 +30,8 @@ spring.liquibase.enabled=true
## eureka properties:
## eureka properties:
#
eureka.instance.prefer-ip-address=true
eureka.instance.prefer-ip-address
=
true
#
eureka.instance.ip-address=172.16.3.41
eureka.instance.ip-address
=
172.16.3.41
eureka.client.registry-fetch-interval-seconds
=
5
eureka.client.registry-fetch-interval-seconds
=
5
eureka.instance.health-check-url-path
=
/actuator/health
eureka.instance.health-check-url-path
=
/actuator/health
eureka.instance.lease-expiration-duration-in-seconds
=
10
eureka.instance.lease-expiration-duration-in-seconds
=
10
...
@@ -58,8 +58,8 @@ spring.http.encoding.force=true
...
@@ -58,8 +58,8 @@ spring.http.encoding.force=true
privilege.fegin.name
=
AMOS-API-PRIVILEGE
privilege.fegin.name
=
AMOS-API-PRIVILEGE
feign.client.config.default.connect-timeout
=
2
0000
feign.client.config.default.connect-timeout
=
4
0000
feign.client.config.default.read-timeout
=
2
0000
feign.client.config.default.read-timeout
=
4
0000
amos.system.user.user-name
=
hygf_admin
amos.system.user.user-name
=
hygf_admin
amos.system.user.password
=
a1234567
amos.system.user.password
=
a1234567
...
...
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