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
bf2f86ee
Commit
bf2f86ee
authored
Dec 26, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改检验检测bug
parent
3ba9fc4b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
13 deletions
+21
-13
JyjcInspectionApplicationController.java
...c/biz/controller/JyjcInspectionApplicationController.java
+6
-2
CommonserviceImpl.java
.../boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
+1
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+12
-9
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+1
-1
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+1
-1
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/JyjcInspectionApplicationController.java
View file @
bf2f86ee
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -59,7 +60,6 @@ public class JyjcInspectionApplicationController extends BaseController {
if
(
null
==
model
.
get
(
"equip"
)
||
model
.
getJSONArray
(
"equip"
).
size
()
<
1
){
return
CommonResponseUtil
.
failure
(
"未选择报检设备时不可提交"
);
}
}
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
save
(
model
));
}
...
...
@@ -211,7 +211,11 @@ public class JyjcInspectionApplicationController extends BaseController {
@PostMapping
(
value
=
"/flow/{type}/receive"
)
public
ResponseModel
<
HashMap
<
String
,
String
>>
execueFlow
(
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestBody
Map
<
String
,
Object
>
params
)
{
params
.
put
(
"type"
,
type
);
jyjcInspectionApplicationServiceImpl
.
doReceive
(
params
);
try
{
jyjcInspectionApplicationServiceImpl
.
doReceive
(
params
);
}
catch
(
Exception
e
){
return
CommonResponseUtil
.
failure
(
"该项流程发生变化,请返回列表刷新查看状态后重试"
);
}
HashMap
<
String
,
String
>
result
=
new
HashMap
<>();
result
.
put
(
"result"
,
"success"
);
return
ResponseHelper
.
buildResponse
(
result
);
...
...
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 @
bf2f86ee
...
...
@@ -46,6 +46,7 @@ public class CommonserviceImpl {
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
userInfoQueryWrapper
.
eq
(
"unit_code"
,
unitCode
);
userInfoQueryWrapper
.
like
(
"post"
,
jyjcUserPost
);
userInfoQueryWrapper
.
eq
(
"is_delete"
,
false
);
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/JyjcInspectionApplicationServiceImpl.java
View file @
bf2f86ee
...
...
@@ -15,6 +15,7 @@ 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.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.*
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.DocumentEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.ResultStatusEnum
;
...
...
@@ -40,6 +41,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
...
@@ -110,9 +112,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
try
{
//开启报检流程工作流
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
startByVariable
(
dto
);
String
id
=
((
Map
)
ajaxResult
.
getResult
()).
get
(
"id"
).
toString
();
String
id
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
getResult
()))
.
get
(
"id"
).
toString
();
// String id = ((Map) ajaxResult.getResult()).get("id").toString();
model
.
setProcessInstanceId
(
id
);
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"
0
"
).
put
(
"instanceId"
,
id
).
put
(
"comments"
,
""
).
build
());
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"
提交
"
).
put
(
"instanceId"
,
id
).
put
(
"comments"
,
""
).
build
());
// region 获取下一个流程节点的数据
...
...
@@ -130,6 +133,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
model
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()));
//6611 对应数据字典 检验流程状态 待受理
}
else
if
(
model
.
getOperationType
().
equals
(
"1"
))
{
model
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
LambdaQueryWrapper
<
JyjcOpeningApplication
>
wa
=
new
LambdaQueryWrapper
<
JyjcOpeningApplication
>().
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
model
.
getInspectionUnitCode
()).
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
...
...
@@ -168,7 +172,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
// endregion
if
(
null
==
model
.
getSequenceNbr
()){
model
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
model
=
this
.
createWithModel
(
model
);
}
else
{
model
=
this
.
updateWithModel
(
model
);
...
...
@@ -239,7 +242,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
model
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()));
//6611 对应数据字典 检验流程状态 待受理
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"
0
"
).
put
(
"instanceId"
,
model
.
getProcessInstanceId
()).
put
(
"comments"
,
""
).
build
());
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"
提交
"
).
put
(
"instanceId"
,
model
.
getProcessInstanceId
()).
put
(
"comments"
,
""
).
build
());
Map
<
String
,
Object
>
nextNodeInfo
=
workflowHelper
.
getNextWorkflowNode
(
model
.
getProcessInstanceId
());
String
role
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
model
.
setNextExecuteIds
(
role
);
...
...
@@ -259,15 +262,14 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
List
<
JyjcInspectionApplication
>
jyjcInspectionApplications
=
this
.
getBaseMapper
().
selectBatchIds
(
sequenceNbr
);
long
count
=
jyjcInspectionApplications
.
stream
().
filter
(
e
->
e
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
(
))
||
e
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
(
))
e
.
getStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()
))
||
e
.
getStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()
))
).
count
();
if
(
count
>
0
)
{
throw
new
BadRequest
(
"存在 已完成、待受理状态的报检单 不可删除!"
);
}
this
.
deleteBatchSeq
(
sequenceNbr
);
for
(
Long
seq
:
sequenceNbr
)
{
jyjcInspectionApplicationEquipService
.
getBaseMapper
().
deleteByApplicationSeq
(
seq
);
...
...
@@ -450,6 +452,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"执行工作流错误, => {}"
,
params
,
e
);
throw
new
BaseException
(
"该项流程发生变化,刷新查看状态后重试"
,
"400"
,
""
);
}
}
...
...
@@ -491,7 +494,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
List
<
String
>
persons
=
JSONArray
.
parseArray
(
JSON
.
toJSONString
(
params
.
get
(
"inspectionChargePerson"
)),
String
.
class
);
// List<String> phones = JSONArray.parseArray(JSON.toJSONString(params.get("inspectionChargePhone")), String.class);
String
inspectionChargePerson
=
String
.
join
(
","
,
persons
);
String
inspectionChargePerson
=
persons
==
null
?
""
:
String
.
join
(
","
,
persons
);
String
inspectionChargePhone
=
(
String
)
params
.
get
(
"inspectionChargePhone"
);
String
processDescription
=
(
String
)
params
.
get
(
"comments"
);
if
(
StringUtils
.
isNotBlank
(
inspectionChargePerson
))
{
...
...
@@ -518,7 +521,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
this
.
getBaseMapper
().
updatePromoter
(
entity
.
getSequenceNbr
());
}
//逻辑变更为 通过后才对办理时间赋值
if
(
status
.
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
(
))){
if
(
status
.
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()
))){
entity
.
setAcceptDate
(
new
Date
());
entity
.
setInnerPersonCode
(
params
.
getOrDefault
(
"innerPersonCode"
,
""
).
toString
());
}
...
...
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 @
bf2f86ee
...
...
@@ -121,7 +121,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
model
.
setApplyTime
(
new
Date
());
model
.
setWorkflowProstanceId
(
instanceId
);
// 默认自动执行第一步
execueFlowNoBusiness
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"
0
"
).
put
(
"instanceId"
,
instanceId
).
put
(
"comments"
,
""
).
build
());
execueFlowNoBusiness
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"
提交
"
).
put
(
"instanceId"
,
instanceId
).
put
(
"comments"
,
""
).
build
());
// 查询下节点任务
Map
<
String
,
Object
>
nextNodeInfo
=
workflowHelper
.
getNextWorkflowNode
(
instanceId
);
String
role
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
bf2f86ee
...
...
@@ -165,7 +165,7 @@
tz_base_enterprise_info info
inner JOIN tz_jyjc_opening_application tjoa ON info.use_code = tjoa.unit_code
AND status = '6616'
where unit_type LIKE CONCAT('%',#{unitType},'%')
where unit_type LIKE CONCAT('%',#{unitType},'%')
group by info.use_code
</select>
<select
id=
"selectBySeq"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo"
>
select * from tz_base_enterprise_info where sequence_nbr = #{sequenceNbr}
...
...
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