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
56c6215d
Commit
56c6215d
authored
Apr 07, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
投融资接口
parent
c3fbb199
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
174 additions
and
21 deletions
+174
-21
FinancingAuditEnum.java
...in/amos/boot/module/hygf/api/Enum/FinancingAuditEnum.java
+2
-2
FinancingRectificationOrderDto.java
...t/module/hygf/api/dto/FinancingRectificationOrderDto.java
+3
-1
FinancingRectificationOrder.java
...t/module/hygf/api/entity/FinancingRectificationOrder.java
+7
-1
FinancingRectificationOrderMapper.java
...le/hygf/api/mapper/FinancingRectificationOrderMapper.java
+2
-2
IFinancingRectificationOrderService.java
...hygf/api/service/IFinancingRectificationOrderService.java
+1
-1
FinancingRectificationOrderMapper.xml
...ources/mapper/mysql/FinancingRectificationOrderMapper.xml
+1
-1
FinancingInfoController.java
...t/module/hygf/biz/controller/FinancingInfoController.java
+5
-0
FinancingRectificationOrderController.java
...biz/controller/FinancingRectificationOrderController.java
+120
-0
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+27
-7
FinancingRectificationOrderServiceImpl.java
.../service/impl/FinancingRectificationOrderServiceImpl.java
+5
-5
WorkFlowService.java
...os/boot/module/hygf/biz/service/impl/WorkFlowService.java
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/FinancingAuditEnum.java
View file @
56c6215d
...
...
@@ -9,9 +9,9 @@ import lombok.Getter;
public
enum
FinancingAuditEnum
{
待融资审核
(
"FinancingAudit"
,
"待融资审核"
),
审核不通过
(
"AuditReject"
,
"
审核不通过
"
),
审核不通过
(
"AuditReject"
,
"
整改待推送
"
),
待整改
(
"WaitAbarbeitung"
,
"待整改"
),
整改待推送
(
"AbarbeitungWaitPush"
,
"
整改待推送
"
),
整改待推送
(
"AbarbeitungWaitPush"
,
"
审核不通过
"
),
审核通过
(
"AuditPass"
,
"审核通过"
),
放款完成
(
"complete"
,
"放款完成"
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/FinancingRectificationOrderDto.java
View file @
56c6215d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -26,6 +26,8 @@ public class FinancingRectificationOrderDto extends BaseDto {
@ApiModelProperty
(
value
=
"农户id"
)
private
Long
peasantHouseholdId
;
@ApiModelProperty
(
value
=
"农户名称"
)
private
String
peasantHouseholdName
;
@ApiModelProperty
(
value
=
"问题描述"
)
private
String
problemDescription
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/FinancingRectificationOrder.java
View file @
56c6215d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
entity
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
...
...
@@ -34,6 +34,12 @@ public class FinancingRectificationOrder extends BaseEntity {
@TableField
(
"peasant_household_id"
)
private
Long
peasantHouseholdId
;
/**
* 农户名称
*/
@TableField
(
"peasant_household_name"
)
private
String
peasantHouseholdName
;
/**
* 问题描述
*/
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/FinancingRectificationOrderMapper.java
View file @
56c6215d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.
jxiop
.api.entity.FinancingRectificationOrder
;
import
com.yeejoin.amos.boot.module.
hygf
.api.entity.FinancingRectificationOrder
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IFinancingRectificationOrderService.java
View file @
56c6215d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/FinancingRectificationOrderMapper.xml
View file @
56c6215d
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.
jxiop
.api.mapper.FinancingRectificationOrderMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.
hygf
.api.mapper.FinancingRectificationOrderMapper"
>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/FinancingInfoController.java
View file @
56c6215d
...
...
@@ -70,6 +70,11 @@ public class FinancingInfoController extends BaseController {
map
.
put
(
"approvalStatus"
,
"0"
);
financingInfoServiceImpl
.
execueFlow
(
map
);
}
// if model.getStatus().equals("")){
// Map<String, Object> map = BeanUtil.beanToMap(model);
// map.put("approvalStatus","0");
// financingInfoServiceImpl.execueFlow(map);
// }
return
ResponseHelper
.
buildResponse
(
model
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/FinancingRectificationOrderController.java
0 → 100644
View file @
56c6215d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.FinancingRectificationOrderServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingRectificationOrderDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
/**
* 投融整改单
*
* @author system_generator
* @date 2024-04-02
*/
@RestController
@Api
(
tags
=
"投融整改单Api"
)
@RequestMapping
(
value
=
"/financing-rectification-order"
)
public
class
FinancingRectificationOrderController
extends
BaseController
{
@Autowired
FinancingRectificationOrderServiceImpl
financingRectificationOrderServiceImpl
;
/**
* 新增投融整改单
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增投融整改单"
,
notes
=
"新增投融整改单"
)
public
ResponseModel
<
FinancingRectificationOrderDto
>
save
(
@RequestBody
FinancingRectificationOrderDto
model
)
{
model
=
financingRectificationOrderServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新投融整改单"
,
notes
=
"根据sequenceNbr更新投融整改单"
)
public
ResponseModel
<
FinancingRectificationOrderDto
>
updateBySequenceNbrFinancingRectificationOrder
(
@RequestBody
FinancingRectificationOrderDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
financingRectificationOrderServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除投融整改单"
,
notes
=
"根据sequenceNbr删除投融整改单"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
financingRectificationOrderServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个投融整改单"
,
notes
=
"根据sequenceNbr查询单个投融整改单"
)
public
ResponseModel
<
FinancingRectificationOrderDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
financingRectificationOrderServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"投融整改单分页查询"
,
notes
=
"投融整改单分页查询"
)
public
ResponseModel
<
Page
<
FinancingRectificationOrderDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
FinancingRectificationOrderDto
>
page
=
new
Page
<
FinancingRectificationOrderDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
financingRectificationOrderServiceImpl
.
queryForFinancingRectificationOrderPage
(
page
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"投融整改单列表全部数据查询"
,
notes
=
"投融整改单列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
FinancingRectificationOrderDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
financingRectificationOrderServiceImpl
.
queryForFinancingRectificationOrderList
());
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/FinancingInfoServiceImpl.java
View file @
56c6215d
...
...
@@ -18,8 +18,8 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfo;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IFinancingInfoService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto
;
import
com.yeejoin.amos.boot.module.
jxiop
.api.entity.FinancingRectificationOrder
;
import
com.yeejoin.amos.boot.module.
jxiop
.biz.service.impl.FinancingRectificationOrderServiceImpl
;
import
com.yeejoin.amos.boot.module.
hygf
.api.entity.FinancingRectificationOrder
;
import
com.yeejoin.amos.boot.module.
hygf
.biz.service.impl.FinancingRectificationOrderServiceImpl
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
...
...
@@ -109,6 +109,10 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
dto
.
setProcessDefinitionKey
(
PROCESSKEY
);
dto
.
setBusinessKey
(
String
.
valueOf
(
new
Date
().
getTime
()));
dto
.
setCompleteFirstTask
(
true
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"isFlag"
,
"1"
);
dto
.
setVariables
(
map
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
List
<
ProcessTaskDTO
>
processTaskDTOS
=
workFlowService
.
startBatch
(
actWorkflowBatchDTO
);
...
...
@@ -162,12 +166,18 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
//组装信息
TaskResultDTO
task
=
new
TaskResultDTO
();
task
.
setResultCode
(
"approvalStatus"
);
task
.
setTaskId
(
financingAuditing
.
getNextTaskId
());
task
.
setComment
(
params
.
getOrDefault
(
"comments"
,
""
).
toString
());
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
task
.
setVariable
(
map
);
map
.
put
(
"approvalStatus"
,
params
.
get
(
"approvalStatus"
));
if
(
params
.
containsKey
(
"isFlag"
)){
task
.
setResultCode
(
"isFlag"
);
map
.
put
(
"isFlag"
,
params
.
get
(
"isFlag"
));
}
else
{
task
.
setResultCode
(
"approvalStatus"
);
map
.
put
(
"approvalStatus"
,
params
.
get
(
"approvalStatus"
));
}
//执行流程
ProcessTaskDTO
processTaskDTO
=
workFlowService
.
complete
(
financingAuditing
.
getNextTaskId
(),
task
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfo
(
CollectionUtil
.
newArrayList
(
processTaskDTO
));
...
...
@@ -191,12 +201,22 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
financingInfo
.
setStatus
(
statusName
);
this
.
updateById
(
financingInfo
);
if
(
params
.
get
(
"approvalStatus"
).
equals
(
"7"
)){
FinancingRectificationOrder
financingRectificationOrder
=
new
FinancingRectificationOrder
();
if
(
params
.
containsKey
(
"isFlag"
)&&
params
.
get
(
"isFlag"
).
equals
(
"0"
)
&&
workflowResultDto
.
getNextNodeKey
().
equals
(
FinancingAuditEnum
.
待整改
.
getCode
())){
LambdaQueryWrapper
<
FinancingRectificationOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FinancingRectificationOrder:
:
getPeasantHouseholdId
,
financingInfo
.
getPeasantHouseholdId
());
queryWrapper
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
queryWrapper
.
last
(
"limit 1"
);
FinancingRectificationOrder
oldData
=
financingRectificationOrderService
.
getBaseMapper
().
selectOne
(
queryWrapper
);
FinancingRectificationOrder
financingRectificationOrder
=
new
FinancingRectificationOrder
();
if
(
ObjectUtils
.
isNotEmpty
(
oldData
)){
BeanUtils
.
copyProperties
(
oldData
,
financingRectificationOrder
);
}
financingRectificationOrder
.
setRectificationOrderCode
(
String
.
valueOf
(
new
Date
().
getTime
()));
financingRectificationOrder
.
setRectificationStatus
(
"待整改"
);
financingRectificationOrder
.
setRectificationDescription
(
params
.
getOrDefault
(
"rectificationDescription"
,
""
).
toString
());
financingRectificationOrder
.
setPeasantHouseholdId
(
(
Long
)
params
.
get
(
"peasantHouseholdId"
)
);
financingRectificationOrder
.
setPeasantHouseholdId
(
financingInfo
.
getPeasantHouseholdId
()
);
financingRectificationOrderService
.
save
(
financingRectificationOrder
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/FinancingRectificationOrderServiceImpl.java
View file @
56c6215d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.
jxiop
.api.entity.FinancingRectificationOrder
;
import
com.yeejoin.amos.boot.module.
jxiop
.api.mapper.FinancingRectificationOrderMapper
;
import
com.yeejoin.amos.boot.module.
jxiop
.api.service.IFinancingRectificationOrderService
;
import
com.yeejoin.amos.boot.module.
jxiop
.api.dto.FinancingRectificationOrderDto
;
import
com.yeejoin.amos.boot.module.
hygf
.api.entity.FinancingRectificationOrder
;
import
com.yeejoin.amos.boot.module.
hygf
.api.mapper.FinancingRectificationOrderMapper
;
import
com.yeejoin.amos.boot.module.
hygf
.api.service.IFinancingRectificationOrderService
;
import
com.yeejoin.amos.boot.module.
hygf
.api.dto.FinancingRectificationOrderDto
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/WorkFlowService.java
View file @
56c6215d
...
...
@@ -45,7 +45,7 @@ public class WorkFlowService {
processInstanceDTO
=
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
stopProcess
(
processInstanceId
));
}
catch
(
Exception
e
)
{
log
.
error
(
"调用工作流批量停止失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流批量
启动
失败"
);
throw
new
RuntimeException
(
"调用工作流批量
停止
失败"
);
}
return
processInstanceDTO
;
}
...
...
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