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
7e1df1e3
Commit
7e1df1e3
authored
Dec 15, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.撤回接口调整。
2.新增根据公司人员获取接口。 3.调整根据申请时间过滤不生效问题。
parent
766b7009
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
136 additions
and
34 deletions
+136
-34
JyjcOpeningApplicationMapper.java
.../module/jyjc/api/mapper/JyjcOpeningApplicationMapper.java
+1
-1
JyjcOpeningApplicationMapper.xml
...rc/main/resources/mapper/JyjcOpeningApplicationMapper.xml
+8
-4
CommonController.java
...mos/boot/module/jyjc/biz/controller/CommonController.java
+58
-0
JyjcOpeningApplicationController.java
...jyjc/biz/controller/JyjcOpeningApplicationController.java
+1
-1
WorkflowFeignClient.java
.../amos/boot/module/jyjc/biz/feign/WorkflowFeignClient.java
+3
-1
CommonserviceImpl.java
.../boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
+22
-2
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+43
-25
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcOpeningApplicationMapper.java
View file @
7e1df1e3
...
@@ -15,6 +15,6 @@ import org.apache.ibatis.annotations.Param;
...
@@ -15,6 +15,6 @@ import org.apache.ibatis.annotations.Param;
public
interface
JyjcOpeningApplicationMapper
extends
BaseMapper
<
JyjcOpeningApplication
>
{
public
interface
JyjcOpeningApplicationMapper
extends
BaseMapper
<
JyjcOpeningApplication
>
{
Page
<
JyjcOpeningApplicationModel
>
selectJyjcOpeningApplicationList
(
@Param
(
"page"
)
Page
<
JyjcOpeningApplication
>
page
,
Page
<
JyjcOpeningApplicationModel
>
selectJyjcOpeningApplicationList
(
@Param
(
"page"
)
Page
<
JyjcOpeningApplication
>
page
,
@Param
(
"jyjcOpeningApplicationModel"
)
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
);
@Param
(
"jyjcOpeningApplicationModel"
)
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
,
@Param
(
"applyStartTime"
)
String
applyStartTime
,
@Param
(
"applyendTime"
)
String
applyendTime
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcOpeningApplicationMapper.xml
View file @
7e1df1e3
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
workflow_prostance_id,
workflow_prostance_id,
workflow_role,
workflow_role,
unit_code_name,
unit_code_name,
status,
status_name
status_name
from tz_jyjc_opening_application
from tz_jyjc_opening_application
<where>
<where>
...
@@ -33,13 +34,16 @@
...
@@ -33,13 +34,16 @@
and unit_code like concat('%',#{jyjcOpeningApplicationModel.unitCode},'%')
and unit_code like concat('%',#{jyjcOpeningApplicationModel.unitCode},'%')
</if>
</if>
<if
test=
"jyjcOpeningApplicationModel.acceptDate != '' and jyjcOpeningApplicationModel.acceptDate != null"
>
<if
test=
"jyjcOpeningApplicationModel.acceptDate != '' and jyjcOpeningApplicationModel.acceptDate != null"
>
and accept_date
like concat('%',#{jyjcOpeningApplicationModel.acceptDate},'%')
and accept_date
= #{jyjcOpeningApplicationModel.acceptDate},
</if>
</if>
<if
test=
"jyjcOpeningApplicationModel.status != '' and jyjcOpeningApplicationModel.status != null"
>
<if
test=
"jyjcOpeningApplicationModel.status != '' and jyjcOpeningApplicationModel.status != null"
>
and status like concat('%',#{jyjcOpeningApplicationModel.status},'%')
and status = #{jyjcOpeningApplicationModel.status}
</if>
<if
test=
"applyendTime != '' and applyendTime != null"
>
and apply_time
<
= #{applyendTime}
</if>
</if>
<if
test=
"
jyjcOpeningApplicationModel.applyTime != '' and jyjcOpeningApplicationModel.apply
Time != null"
>
<if
test=
"
applyStartTime != '' and applyStart
Time != null"
>
and apply_time
like concat('%',#{jyjcOpeningApplicationModel.applyTime},'%')
and apply_time
>
=#{applyStartTime}
</if>
</if>
</where>
</where>
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/CommonController.java
0 → 100644
View file @
7e1df1e3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcOpeningApplicationServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
*
* @author system_generator
* @date 2023-12-13
*/
@RestController
@Api
(
tags
=
"公共接口controller"
)
@RequestMapping
(
value
=
"/common"
)
public
class
CommonController
extends
BaseController
{
@Autowired
CommonserviceImpl
commonserviceImpl
;
/**
* 新增
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getJyjcPersonByUnitCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据公司的unitCode获取检测检验人员列表"
,
notes
=
"根据公司的unitCode获取检测检验人员列表"
)
public
ResponseModel
<
List
<
TzsUserInfo
>>
getUserInfosByUnitCode
(
@RequestParam
String
unitCode
)
{
return
ResponseHelper
.
buildResponse
(
commonserviceImpl
.
getUserInfosByUnitCode
(
unitCode
));
}
}
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 @
7e1df1e3
...
@@ -186,7 +186,7 @@ public class JyjcOpeningApplicationController extends BaseController {
...
@@ -186,7 +186,7 @@ public class JyjcOpeningApplicationController extends BaseController {
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"撤回业务开通申请"
,
notes
=
"撤回业务开通申请"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"撤回业务开通申请"
,
notes
=
"撤回业务开通申请"
)
@GetMapping
(
value
=
"/
stop
Flow"
)
@GetMapping
(
value
=
"/
rollBack
Flow"
)
public
void
overflow
(
@RequestParam
(
"instanceId"
)
String
instanceId
)
{
public
void
overflow
(
@RequestParam
(
"instanceId"
)
String
instanceId
)
{
jyjcOpeningApplicationServiceImpl
.
stopFlow
(
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/feign/WorkflowFeignClient.java
View file @
7e1df1e3
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jyjc.biz.feign;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jyjc.biz.feign;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -56,6 +57,7 @@ public interface WorkflowFeignClient {
...
@@ -56,6 +57,7 @@ public interface WorkflowFeignClient {
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
,
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
,
@PathVariable
(
value
=
"processInstanceId"
)
String
processInstanceId
);
@PathVariable
(
value
=
"processInstanceId"
)
String
processInstanceId
);
@RequestMapping
(
value
=
"/v2/task/rollBack/{processInstanceId}"
,
method
=
RequestMethod
.
POST
)
JSONObject
rollBack
(
@PathVariable
(
value
=
"processInstanceId"
)
String
processInstanceId
);
}
}
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/CommonserviceImpl.java
View file @
7e1df1e3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper
;
import
org.apache.xmlbeans.impl.xb.xsdschema.Public
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.util.List
;
@Service
@Service
public
class
CommonserviceImpl
{
public
class
CommonserviceImpl
{
@Value
(
"${jyjc.user-post:6615}"
)
private
String
jyjcUserPost
;
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
TzsUserInfoMapper
userInfoMapper
;
/**
/**
* @description 获取当前用户注册信息
* @return ReginParams
* @return ReginParams
* @description 获取当前用户注册信息
*/
*/
ReginParams
getReginParamsOfCurrentUser
()
{
public
ReginParams
getReginParamsOfCurrentUser
()
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
return
reginParams
;
return
reginParams
;
}
}
public
List
<
TzsUserInfo
>
getUserInfosByUnitCode
(
String
unitCode
)
{
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
userInfoQueryWrapper
.
eq
(
"unit_code"
,
unitCode
);
userInfoQueryWrapper
.
like
(
"post"
,
jyjcUserPost
);
List
<
TzsUserInfo
>
userInfos
=
userInfoMapper
.
selectList
(
userInfoQueryWrapper
);
return
userInfos
;
}
}
}
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 @
7e1df1e3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.map.MapBuilder
;
import
cn.hutool.core.map.MapBuilder
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
...
@@ -42,6 +44,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -42,6 +44,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
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
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
@@ -64,10 +67,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -64,10 +67,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
@Autowired
@Autowired
JyjcOpeningApplicationMapper
jyjcOpeningApplicationMapper
;
JyjcOpeningApplicationMapper
jyjcOpeningApplicationMapper
;
@Resource
(
type
=
JyjcBaseMapper
.
class
)
@Resource
(
type
=
JyjcBaseMapper
.
class
)
private
JyjcBaseMapper
baseMapper
;
private
JyjcBaseMapper
baseMapper
;
@Value
(
"${process-definition-key.jyjc.openapplication:}"
)
@Value
(
"${process-definition-key.jyjc.openapplication:}"
)
private
String
processDefinitionKey
;
private
String
processDefinitionKey
;
@Value
(
"${jyjc.user-post:6615}"
)
@Value
(
"${jyjc.user-post:6615}"
)
...
@@ -86,7 +89,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -86,7 +89,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
@Autowired
@Autowired
private
WorkflowFeignClient
workflowFeignClient
;
private
WorkflowFeignClient
workflowFeignClient
;
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
public
JyjcOpeningApplicationModel
saveOrUpdateModel
(
JyjcOpeningApplicationModel
model
,
Boolean
enableStartFlow
)
{
public
JyjcOpeningApplicationModel
saveOrUpdateModel
(
JyjcOpeningApplicationModel
model
,
Boolean
enableStartFlow
)
{
try
{
try
{
if
(
enableStartFlow
)
{
if
(
enableStartFlow
)
{
...
@@ -94,7 +97,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -94,7 +97,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
String
instanceId
=
startFlow
();
String
instanceId
=
startFlow
();
JSONObject
dataObject
=
getTask
(
instanceId
);
JSONObject
dataObject
=
getTask
(
instanceId
);
JSONArray
executorArray
=
dataObject
.
getJSONObject
(
"nodeInfo"
).
getJSONArray
(
"executor"
);
JSONArray
executorArray
=
dataObject
.
getJSONObject
(
"nodeInfo"
).
getJSONArray
(
"executor"
);
if
(!
ValidationUtil
.
isEmpty
(
executorArray
))
{
if
(!
ValidationUtil
.
isEmpty
(
executorArray
))
{
String
roleGroups
=
executorArray
.
stream
().
map
(
json
->
Optional
.
ofNullable
(((
LinkedHashMap
)
json
).
get
(
"groupId"
)).
orElse
(
""
).
toString
()).
collect
(
Collectors
.
joining
(
","
));
String
roleGroups
=
executorArray
.
stream
().
map
(
json
->
Optional
.
ofNullable
(((
LinkedHashMap
)
json
).
get
(
"groupId"
)).
orElse
(
""
).
toString
()).
collect
(
Collectors
.
joining
(
","
));
model
.
setWorkflowRole
(
roleGroups
);
model
.
setWorkflowRole
(
roleGroups
);
}
}
...
@@ -105,7 +108,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -105,7 +108,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// model.setStatus(!ValidationUtil.isEmpty(dataObject) && !ValidationUtil.isEmpty(dataObject.get("status")) ? String.valueOf(dataObject.get("status")) : "");
// model.setStatus(!ValidationUtil.isEmpty(dataObject) && !ValidationUtil.isEmpty(dataObject.get("status")) ? String.valueOf(dataObject.get("status")) : "");
model
.
setWorkflowProstanceId
(
instanceId
);
model
.
setWorkflowProstanceId
(
instanceId
);
// 默认自动执行第一步
// 默认自动执行第一步
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"0"
).
put
(
"instanceId"
,
instanceId
).
put
(
"comments"
,
""
).
build
());
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"0"
).
put
(
"instanceId"
,
instanceId
).
put
(
"comments"
,
""
).
build
());
}
else
{
}
else
{
model
.
setStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()
+
""
);
model
.
setStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()
+
""
);
model
.
setStatusName
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
model
.
setStatusName
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
...
@@ -126,12 +129,12 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -126,12 +129,12 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
}
}
}
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
public
JyjcOpeningApplicationModel
resubmit
(
JyjcOpeningApplicationModel
model
)
{
public
JyjcOpeningApplicationModel
resubmit
(
JyjcOpeningApplicationModel
model
)
{
model
.
setStatus
(
FlowStatusEnum
.
SUBMITTED
.
getCode
()
+
""
);
model
.
setStatus
(
FlowStatusEnum
.
SUBMITTED
.
getCode
()
+
""
);
model
.
setStatusName
(
FlowStatusEnum
.
SUBMITTED
.
getName
());
model
.
setStatusName
(
FlowStatusEnum
.
SUBMITTED
.
getName
());
model
=
this
.
updateWithModel
(
model
);
model
=
this
.
updateWithModel
(
model
);
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"0"
).
put
(
"instanceId"
,
model
.
getWorkflowProstanceId
()).
put
(
"comments"
,
""
).
build
());
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"0"
).
put
(
"instanceId"
,
model
.
getWorkflowProstanceId
()).
put
(
"comments"
,
""
).
build
());
return
model
;
return
model
;
}
}
...
@@ -170,7 +173,14 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -170,7 +173,14 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
}
public
Page
<
JyjcOpeningApplicationModel
>
queryForJyjcOpeningApplicationPage
(
Page
<
JyjcOpeningApplication
>
page
,
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
)
{
public
Page
<
JyjcOpeningApplicationModel
>
queryForJyjcOpeningApplicationPage
(
Page
<
JyjcOpeningApplication
>
page
,
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
)
{
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationModel
);
String
applyStartTime
=
""
;
String
applyEndTime
=
""
;
if
(
ObjectUtils
.
isNotEmpty
(
jyjcOpeningApplicationModel
.
getApplyTime
()))
{
String
date
=
DateUtil
.
format
(
jyjcOpeningApplicationModel
.
getApplyTime
(),
DatePattern
.
NORM_DATE_PATTERN
);
applyStartTime
=
date
+
" 00:00:00"
;
applyEndTime
=
date
+
" 23:59:59"
;
}
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationModel
,
applyStartTime
,
applyEndTime
);
}
}
public
Page
<
JyjcOpeningApplicationModel
>
querypageForCompany
(
Page
<
JyjcOpeningApplication
>
page
,
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
)
{
public
Page
<
JyjcOpeningApplicationModel
>
querypageForCompany
(
Page
<
JyjcOpeningApplication
>
page
,
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
)
{
...
@@ -179,7 +189,15 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -179,7 +189,15 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
if
(
companyBo
.
getLevel
().
equals
(
"company"
))
{
if
(
companyBo
.
getLevel
().
equals
(
"company"
))
{
jyjcOpeningApplicationModel
.
setUnitCode
(
companyBo
.
getCompanyCode
());
jyjcOpeningApplicationModel
.
setUnitCode
(
companyBo
.
getCompanyCode
());
}
}
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationModel
);
String
applyStartTime
=
""
;
String
applyEndTime
=
""
;
if
(
ObjectUtils
.
isNotEmpty
(
jyjcOpeningApplicationModel
.
getApplyTime
()))
{
String
date
=
DateUtil
.
format
(
jyjcOpeningApplicationModel
.
getApplyTime
(),
DatePattern
.
NORM_DATE_PATTERN
);
applyStartTime
=
date
+
" 00:00:00"
;
applyEndTime
=
date
+
" 23:59:59"
;
}
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationModel
,
applyStartTime
,
applyEndTime
);
}
}
...
@@ -203,7 +221,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -203,7 +221,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
jyjcOpeningApplicationModel
=
new
JyjcOpeningApplicationModel
();
jyjcOpeningApplicationModel
=
new
JyjcOpeningApplicationModel
();
}
}
String
unitCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
unitCode
=
reginParams
.
getCompany
().
getCompanyCode
();
unitCode
=
"91611103MAC4Q1EG7B"
;
// 测试用,之后务必删除!!!
unitCode
=
"91611103MAC4Q1EG7B"
;
// 测试用,之后务必删除!!!
QueryWrapper
enterpriseInfoQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
enterpriseInfoQueryWrapper
=
new
QueryWrapper
<>();
enterpriseInfoQueryWrapper
.
eq
(
"use_code"
,
unitCode
);
enterpriseInfoQueryWrapper
.
eq
(
"use_code"
,
unitCode
);
TzBaseEnterpriseInfo
baseUnitLicenceEntity
=
enterpriseInfoMapper
.
selectOne
(
enterpriseInfoQueryWrapper
);
TzBaseEnterpriseInfo
baseUnitLicenceEntity
=
enterpriseInfoMapper
.
selectOne
(
enterpriseInfoQueryWrapper
);
...
@@ -221,7 +239,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -221,7 +239,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
}
jyjcOpeningApplicationModel
.
setLongitude
(
baseUnitLicenceEntity
.
getLongitude
());
jyjcOpeningApplicationModel
.
setLongitude
(
baseUnitLicenceEntity
.
getLongitude
());
jyjcOpeningApplicationModel
.
setLatitude
(
baseUnitLicenceEntity
.
getLatitude
());
jyjcOpeningApplicationModel
.
setLatitude
(
baseUnitLicenceEntity
.
getLatitude
());
if
(
ObjectUtils
.
isNotEmpty
(
baseUnitLicenceEntity
.
getUnitBusinessLicense
()))
{
if
(
ObjectUtils
.
isNotEmpty
(
baseUnitLicenceEntity
.
getUnitBusinessLicense
()))
{
jyjcOpeningApplicationModel
.
setUnitBusinessLicense
(
JSONArray
.
parseArray
(
baseUnitLicenceEntity
.
getUnitBusinessLicense
(),
AttachmentDto
.
class
));
jyjcOpeningApplicationModel
.
setUnitBusinessLicense
(
JSONArray
.
parseArray
(
baseUnitLicenceEntity
.
getUnitBusinessLicense
(),
AttachmentDto
.
class
));
}
}
}
}
...
@@ -233,7 +251,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -233,7 +251,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
List
<
TzBaseUnitLicenceDto
>
baseUnitLicences
=
baseMapper
.
selectBaseUnitLicenceList
(
MapBuilder
.<
String
,
Object
>
create
()
List
<
TzBaseUnitLicenceDto
>
baseUnitLicences
=
baseMapper
.
selectBaseUnitLicenceList
(
MapBuilder
.<
String
,
Object
>
create
()
.
put
(
"unitCode"
,
unitCode
)
.
put
(
"unitCode"
,
unitCode
)
// .put("licenceType", LicenceTypeEnum.JYJC.getCode())
// .put("licenceType", LicenceTypeEnum.JYJC.getCode())
.
build
());
.
build
());
jyjcOpeningApplicationModel
.
setBaseUnitLicences
(
baseUnitLicences
);
jyjcOpeningApplicationModel
.
setBaseUnitLicences
(
baseUnitLicences
);
// 获取检验人员信息
// 获取检验人员信息
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
...
@@ -280,10 +298,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -280,10 +298,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
/**
/**
* 接收/驳回通知检验单
* 接收/驳回通知检验单
*/
*/
public
void
execueFlow
(
Map
<
String
,
Object
>
params
)
{
public
void
execueFlow
(
Map
<
String
,
Object
>
params
)
{
String
op
=
params
.
get
(
"op"
).
toString
();
String
op
=
params
.
get
(
"op"
).
toString
();
String
instanceId
=
params
.
get
(
"instanceId"
).
toString
();
String
instanceId
=
params
.
get
(
"instanceId"
).
toString
();
String
comments
=
params
.
get
(
"comments"
).
toString
();
String
comments
=
params
.
get
(
"comments"
).
toString
();
try
{
try
{
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
...
@@ -293,8 +311,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -293,8 +311,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// dto.setResult(op);
// dto.setResult(op);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
taskId
);
HashMap
<
String
,
Object
>
varibalble
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
varibalble
=
new
HashMap
<>();
varibalble
.
put
(
"approvalStatus"
,
op
);
varibalble
.
put
(
"approvalStatus"
,
op
);
dto
.
setVariable
(
varibalble
);
dto
.
setVariable
(
varibalble
);
dto
.
setComment
(
comments
);
dto
.
setComment
(
comments
);
//执行流程
//执行流程
...
@@ -303,10 +321,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -303,10 +321,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
}
updateModelByInstanceId
(
instanceId
,
"0"
.
equals
(
op
)
?
FlowStatusEnum
.
HAVE_PROCESSED
.
getCode
()
+
""
:
FlowStatusEnum
.
REJECTED
.
getCode
()
+
""
);
updateModelByInstanceId
(
instanceId
,
"0"
.
equals
(
op
)
?
FlowStatusEnum
.
HAVE_PROCESSED
.
getCode
()
+
""
:
FlowStatusEnum
.
REJECTED
.
getCode
()
+
""
);
if
(
op
.
equals
(
"0"
))
{
if
(
op
.
equals
(
"0"
))
{
String
originalDataId
=
params
.
get
(
"originalDataId"
).
toString
();
String
originalDataId
=
params
.
get
(
"originalDataId"
).
toString
();
JyjcOpeningApplication
jyjcOpeningApplication
=
jyjcOpeningApplicationMapper
.
selectById
(
originalDataId
);
JyjcOpeningApplication
jyjcOpeningApplication
=
jyjcOpeningApplicationMapper
.
selectById
(
originalDataId
);
List
<
String
>
detectionRegion
=
Arrays
.
asList
(
params
.
get
(
"detectionRegion"
).
toString
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
split
(
","
))
;
List
<
String
>
detectionRegion
=
Arrays
.
asList
(
params
.
get
(
"detectionRegion"
).
toString
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
split
(
","
))
;
// String detectionRegionName = params.get("detectionRegionName").toString();
// String detectionRegionName = params.get("detectionRegionName").toString();
jyjcOpeningApplication
.
setDetectionRegion
(
detectionRegion
);
jyjcOpeningApplication
.
setDetectionRegion
(
detectionRegion
);
// jyjcOpeningApplication.setDetectionRegionName(detectionRegionName);
// jyjcOpeningApplication.setDetectionRegionName(detectionRegionName);
...
@@ -320,11 +338,11 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -320,11 +338,11 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
/**
/**
* 撤回流程办理单
* 撤回流程办理单
*/
*/
public
void
stopFlow
(
String
instanceId
)
{
public
void
stopFlow
(
String
instanceId
)
{
try
{
try
{
//撤回流程
//撤回流程
AjaxResult
ajaxResult1
=
Workflow
.
taskClient
.
stopProcess
(
instanceId
);
JSONObject
jsonObject
=
workflowFeignClient
.
rollBack
(
instanceId
);
if
(
ObjectUtils
.
isEmpty
(
ajaxResult1
))
{
if
(
ObjectUtils
.
isEmpty
(
jsonObject
))
{
}
}
updateModelByInstanceId
(
instanceId
,
FlowStatusEnum
.
REJECTED
.
getCode
()
+
""
);
updateModelByInstanceId
(
instanceId
,
FlowStatusEnum
.
REJECTED
.
getCode
()
+
""
);
...
@@ -339,7 +357,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -339,7 +357,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
private
String
getWorkflowRoleGroups
(
JSONObject
dataObject
)
{
private
String
getWorkflowRoleGroups
(
JSONObject
dataObject
)
{
JSONArray
executorArray
=
dataObject
.
getJSONObject
(
"nodeInfo"
).
getJSONArray
(
"executor"
);
JSONArray
executorArray
=
dataObject
.
getJSONObject
(
"nodeInfo"
).
getJSONArray
(
"executor"
);
if
(!
ValidationUtil
.
isEmpty
(
executorArray
))
{
if
(!
ValidationUtil
.
isEmpty
(
executorArray
))
{
return
executorArray
.
stream
().
map
(
json
->
Optional
.
ofNullable
(((
LinkedHashMap
)
json
).
get
(
"groupId"
)).
orElse
(
""
).
toString
()).
collect
(
Collectors
.
joining
(
","
));
return
executorArray
.
stream
().
map
(
json
->
Optional
.
ofNullable
(((
LinkedHashMap
)
json
).
get
(
"groupId"
)).
orElse
(
""
).
toString
()).
collect
(
Collectors
.
joining
(
","
));
}
}
return
null
;
return
null
;
...
...
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