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
2411c821
Commit
2411c821
authored
Dec 13, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.新增驳回、接收、撤回接口
parent
16eecf69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
13 deletions
+92
-13
JyjcOpeningApplicationController.java
...jyjc/biz/controller/JyjcOpeningApplicationController.java
+27
-0
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+65
-13
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcOpeningApplicationController.java
View file @
2411c821
...
...
@@ -114,4 +114,31 @@ public class JyjcOpeningApplicationController extends BaseController {
public
ResponseModel
<
List
<
JyjcOpeningApplicationDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
queryForJyjcOpeningApplicationList
());
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"接收或者驳回业务开通申请"
,
notes
=
"接收或者驳回业务开通申请"
)
@GetMapping
(
value
=
"/execueFlow"
)
public
void
execueFlow
(
@RequestParam
(
"op"
)
String
op
,
@RequestParam
(
"instanceId"
)
String
instanceId
)
{
jyjcOpeningApplicationServiceImpl
.
execueFlow
(
op
,
instanceId
);
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"撤回业务开通申请"
,
notes
=
"撤回业务开通申请"
)
@GetMapping
(
value
=
"/stopFlow"
)
public
void
overflow
(
@RequestParam
(
"instanceId"
)
String
instanceId
)
{
jyjcOpeningApplicationServiceImpl
.
stopFlow
(
instanceId
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
2411c821
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
cn.hutool.core.map.MapBuilder
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
...
...
@@ -15,6 +17,8 @@ import com.yeejoin.amos.boot.module.tcm.api.enums.LicenceTypeEnum;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -28,6 +32,8 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
/**
* 服务实现类
*
...
...
@@ -35,7 +41,7 @@ import java.util.Map;
* @date 2023-12-13
*/
@Service
public
class
JyjcOpeningApplicationServiceImpl
extends
BaseService
<
JyjcOpeningApplicationDto
,
JyjcOpeningApplication
,
JyjcOpeningApplicationMapper
>
implements
IJyjcOpeningApplicationService
{
public
class
JyjcOpeningApplicationServiceImpl
extends
BaseService
<
JyjcOpeningApplicationDto
,
JyjcOpeningApplication
,
JyjcOpeningApplicationMapper
>
implements
IJyjcOpeningApplicationService
{
@Autowired
CommonserviceImpl
commonserviceImpl
;
...
...
@@ -69,34 +75,34 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
* 分页查询
*/
public
Page
<
JyjcOpeningApplicationDto
>
queryForJyjcOpeningApplicationPage
(
Page
<
JyjcOpeningApplicationDto
>
page
)
{
public
Page
<
JyjcOpeningApplicationDto
>
queryForJyjcOpeningApplicationPage
(
Page
<
JyjcOpeningApplicationDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
JyjcOpeningApplicationDto
>
queryForJyjcOpeningApplicationList
()
{
return
this
.
queryForList
(
""
,
false
);
public
List
<
JyjcOpeningApplicationDto
>
queryForJyjcOpeningApplicationList
()
{
return
this
.
queryForList
(
""
,
false
);
}
public
Page
<
JyjcOpeningApplicationDto
>
queryForJyjcOpeningApplicationPage
(
Page
<
JyjcOpeningApplication
>
page
,
JyjcOpeningApplicationDto
jyjcOpeningApplicationDto
)
{
public
Page
<
JyjcOpeningApplicationDto
>
queryForJyjcOpeningApplicationPage
(
Page
<
JyjcOpeningApplication
>
page
,
JyjcOpeningApplicationDto
jyjcOpeningApplicationDto
)
{
//根据申请单中的单位信息对于列表数据进行过滤
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
if
(
companyBo
.
getLevel
().
equals
(
"company"
))
{
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
if
(
companyBo
.
getLevel
().
equals
(
"company"
))
{
jyjcOpeningApplicationDto
.
setUnitCode
(
companyBo
.
getCompanyCode
());
}
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationDto
);
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationDto
);
}
/**
* 获取详情跳转
*
*
* @param
* @return {@link }
* @author yangyang
* @throws
* @author yangyang
*/
public
JyjcOpeningApplicationDto
queryDetail
(
Long
sequenceNbr
)
{
ReginParams
reginParams
=
commonserviceImpl
.
getReginParamsOfCurrentUser
();
...
...
@@ -105,7 +111,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
JyjcOpeningApplicationDto
jyjcOpeningApplicationDto
;
if
(
null
!=
sequenceNbr
)
{
jyjcOpeningApplicationDto
=
this
.
queryBySeq
(
sequenceNbr
);
jyjcOpeningApplicationDto
=
this
.
queryBySeq
(
sequenceNbr
);
}
else
{
jyjcOpeningApplicationDto
=
new
JyjcOpeningApplicationDto
();
}
...
...
@@ -113,8 +119,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
TzBaseEnterpriseInfoDto
baseEnterpriseInfoDto
=
baseMapper
.
selectEnterpriseInfo
(
unitCode
);
// 获取企业资质
List
<
TzBaseUnitLicenceDto
>
baseUnitLicences
=
baseMapper
.
selectBaseUnitLicenceList
(
MapBuilder
.<
String
,
Object
>
create
()
.
put
(
"unitCode"
,
unitCode
)
.
put
(
"licenceType"
,
LicenceTypeEnum
.
JYJC
.
getCode
()).
build
());
.
put
(
"unitCode"
,
unitCode
)
.
put
(
"licenceType"
,
LicenceTypeEnum
.
JYJC
.
getCode
()).
build
());
// 获取检验人员信息
List
<
TzsUserInfoDto
>
userInfos
=
baseMapper
.
selectUserInfoByUnitCodeList
(
unitCode
);
if
(
baseEnterpriseInfoDto
!=
null
)
{
...
...
@@ -128,4 +134,49 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
jyjcOpeningApplicationDto
.
setUserInfos
(
userInfos
);
return
jyjcOpeningApplicationDto
;
}
/**
* 接收/驳回通知检验单
*/
public
void
execueFlow
(
String
op
,
String
instanceId
)
{
try
{
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResult
(
op
);
dto
.
setResultCode
(
"condition"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"流程结束,你可以开始办理业务了"
);
//执行流程
AjaxResult
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
if
(
ObjectUtils
.
isEmpty
(
ajaxResult1
))
{
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
* 撤回流程办理单
*/
public
void
stopFlow
(
String
instanceId
)
{
try
{
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
//执行流程
AjaxResult
ajaxResult1
=
Workflow
.
taskClient
.
stopProcess
(
taskId
);
if
(
ObjectUtils
.
isEmpty
(
ajaxResult1
))
{
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
\ No newline at end of file
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