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
573df079
Commit
573df079
authored
Dec 18, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
93dd0010
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
216 additions
and
107 deletions
+216
-107
JgUseRegistration.java
...oin/amos/boot/module/jg/api/entity/JgUseRegistration.java
+3
-0
UseStatusEnum.java
.../yeejoin/amos/boot/module/jg/api/enums/UseStatusEnum.java
+39
-0
WorkFlowFeignService.java
...os/boot/module/jg/flc/api/fegin/WorkFlowFeignService.java
+6
-2
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+13
-5
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+29
-61
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+126
-39
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgUseRegistration.java
View file @
573df079
...
@@ -155,4 +155,7 @@ public class JgUseRegistration extends BaseEntity {
...
@@ -155,4 +155,7 @@ public class JgUseRegistration extends BaseEntity {
@TableField
(
"inspect_unit_credit_code"
)
@TableField
(
"inspect_unit_credit_code"
)
private
String
inspectUnitCreditCode
;
private
String
inspectUnitCreditCode
;
@TableField
(
"instance_status"
)
private
String
instanceStatus
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/UseStatusEnum.java
0 → 100644
View file @
573df079
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* 使用登记状态西悉尼
*/
@Getter
@AllArgsConstructor
public
enum
UseStatusEnum
{
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
),
RECEIVE
(
"一级受理"
,
"receive"
,
"一级受理待受理"
),
PRELIMINARY
(
"二级受理"
,
"preliminary"
,
"二级受理待受理"
),
REEXAMINE
(
"三级受理"
,
"reexamine"
,
"三级受理待受理"
);
private
final
String
name
;
private
final
String
code
;
private
final
String
pass
;
public
static
UseStatusEnum
getMessage
(
String
name
){
for
(
UseStatusEnum
constants
:
values
())
{
if
(
constants
.
getName
().
equals
(
name
))
{
return
constants
;
}
}
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/flc/api/fegin/WorkFlowFe
gi
nService.java
→
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/flc/api/fegin/WorkFlowFe
ig
nService.java
View file @
573df079
...
@@ -14,9 +14,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -14,9 +14,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.util.Map
;
import
java.util.Map
;
//@FeignClient(value = "AMOS-API-WORKFLOW", configuration = {FeignConfiguration.class})
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
MultipartSupportConfig
.
class
})
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
WorkFlowFe
gi
nService
{
public
interface
WorkFlowFe
ig
nService
{
/***
/***
* 根据task_id 获取节点信息
* 根据task_id 获取节点信息
...
@@ -64,5 +64,9 @@ public interface WorkFlowFeginService {
...
@@ -64,5 +64,9 @@ public interface WorkFlowFeginService {
@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-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
573df079
...
@@ -14,7 +14,10 @@
...
@@ -14,7 +14,10 @@
jri.PRODUCT_NAME as productName,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME,'-',use.CITY_NAME,'-',use.COUNTY_NAME) as place
concat(use.PROVINCE_NAME,'-',use.CITY_NAME,'-',use.COUNTY_NAME) as place,
ur.instance_id as instanceId,
re.equip_id as equipId,
ur.apply_no as applyNo
from tzs_jg_use_registration ur
from tzs_jg_use_registration ur
LEFT JOIN tzs_jg_relation_equip re on ur.sequence_nbr = re.business_id
LEFT JOIN tzs_jg_relation_equip re on ur.sequence_nbr = re.business_id
LEFT JOIN idx_biz_jg_register_info jri on re.equip_id = jri.RECORD
LEFT JOIN idx_biz_jg_register_info jri on re.equip_id = jri.RECORD
...
@@ -35,12 +38,16 @@
...
@@ -35,12 +38,16 @@
and ur.use_unit_name like concat('%',#{dto.useUnitName},'%')
and ur.use_unit_name like concat('%',#{dto.useUnitName},'%')
</if>
</if>
</where>
</where>
order by ur.rec_date desc
</select>
</select>
<select
id=
"getDetail"
resultType=
"java.util.Map"
>
<select
id=
"getDetail"
resultType=
"java.util.Map"
>
SELECT jri.EQU_CODE as equCode,
SELECT jri.EQU_CODE as equCode,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
-- (SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
(SELECT name from tz_equipment_category where code = jri.EQU_LIST) as equList,
-- (SELECT name from tz_equipment_category where code = jri.EQU_LIST) as equList,
(SELECT name from tz_equipment_category where code = jri.EQU_DEFINE) as equDefine,
-- (SELECT name from tz_equipment_category where code = jri.EQU_DEFINE) as equDefine,
jri.EQU_CATEGORY as equCategory,
jri.EQU_LIST as equList,
jri.EQU_DEFINE as equDefine,
jri.PRODUCT_NAME as productName,
jri.PRODUCT_NAME as productName,
jri.EQU_TYPE as equType,
jri.EQU_TYPE as equType,
jri.PRODUCT_PHOTO as proDuctPhoto,
jri.PRODUCT_PHOTO as proDuctPhoto,
...
@@ -84,7 +91,8 @@
...
@@ -84,7 +91,8 @@
ADDRESS as address,
ADDRESS as address,
PROVINCE as province,
PROVINCE as province,
CITY as city,
CITY as city,
COUNTY as county
COUNTY as county,
USE_INNER_CODE as useInnerCode
FROM "idx_biz_jg_use_info" where RECORD = #{id}
FROM "idx_biz_jg_use_info" where RECORD = #{id}
</select>
</select>
<select
id=
"getEquipListPage"
resultType=
"java.util.Map"
>
<select
id=
"getEquipListPage"
resultType=
"java.util.Map"
>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
573df079
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeginService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
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
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
@@ -48,6 +45,22 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -48,6 +45,22 @@ public class JgUseRegistrationController extends BaseController {
return
ResponseHelper
.
buildResponse
(
"ok"
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgUseRegistrationServiceImpl
.
flowExecute
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
true
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/withdraw"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"撤回"
,
notes
=
"撤回"
)
public
ResponseModel
<
Object
>
withdraw
(
@RequestBody
JSONObject
map
)
{
jgUseRegistrationServiceImpl
.
withdraw
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/deleteBatch"
)
@PostMapping
(
value
=
"/deleteBatch"
)
...
@@ -98,61 +111,16 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -98,61 +111,16 @@ public class JgUseRegistrationController extends BaseController {
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getDetail
(
id
));
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getDetail
(
id
));
}
}
@Autowired
WorkFlowFeginService
workFlowFeginService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/test"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
""
,
notes
=
""
)
@GetMapping
(
value
=
"/getMessage"
)
public
ResponseModel
test
(
@RequestParam
(
"op"
)
String
op
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getMessage
()
{
String
instanceId
=
""
;
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
//启动流程
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
try
{
map
.
put
(
"useUnitCreditCode"
,
selectedOrgInfo
.
getCompany
().
getCompanyCode
());
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
map
.
put
(
"useUnitName"
,
selectedOrgInfo
.
getCompany
().
getCompanyName
());
dto
.
setProcessDefinitionKey
(
"useRegistration"
);
return
ResponseHelper
.
buildResponse
(
map
);
dto
.
setBusinessKey
(
"1"
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
ResponseHelper
.
buildResponse
(
instanceId
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/test1"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
""
,
notes
=
""
)
public
void
overProjectFlowExecute
(
@RequestParam
(
"op"
)
String
op
,
@RequestParam
(
"instanceId"
)
String
instanceId
)
{
try
{
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
// JSONObject taskNoAuth = workFlowFeginService.getTaskNoAuth(instanceId);
// FeignClientResult<JSONObject> nodeInfo = workFlowFeginService.getNodeInfo(taskId);
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
// dto.setResult(op);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"啦啦啦啦!!!!!"
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
dto
.
setVariable
(
map
);
// FeignClientResult reject = Workflow.taskV2Client.reject(taskId, dto);
//执行流程
AjaxResult
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
if
(
ObjectUtils
.
isEmpty
(
ajaxResult1
))
{
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
View file @
573df079
...
@@ -2,33 +2,38 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
...
@@ -2,33 +2,38 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRelationEquip
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRelationEquip
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.UseStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgRelationEquipMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgRelationEquipMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeginService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.OtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.OtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.
component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.
boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -52,16 +57,21 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -52,16 +57,21 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
@Autowired
@Autowired
private
JgRelationEquipMapper
jgRelationEquipMapper
;
private
JgRelationEquipMapper
jgRelationEquipMapper
;
@Autowired
@Autowired
WorkFlowFeginService
workFlowFeginService
;
WorkFlowFeignService
workFlowFeginService
;
@Autowired
private
ICreateCodeService
iCreateCodeService
;
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
)
{
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
)
{
return
this
.
baseMapper
.
getListPage
(
page
,
dto
);
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
);
return
listPage
;
}
}
public
Page
<
Map
<
String
,
Object
>>
getEquipList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
factoryNum
,
String
equList
,
String
equCategory
)
{
return
this
.
baseMapper
.
getEquipListPage
(
page
,
factoryNum
,
equList
,
equCategory
);
public
Page
<
Map
<
String
,
Object
>>
getEquipList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
factoryNum
,
String
equList
,
String
equCategory
)
{
return
this
.
baseMapper
.
getEquipListPage
(
page
,
factoryNum
,
equList
,
equCategory
);
}
}
public
void
save
(
JSONObject
map
){
public
void
save
(
JSONObject
map
)
{
UseInfo
useInfo
=
new
UseInfo
();
UseInfo
useInfo
=
new
UseInfo
();
BeanUtil
.
copyProperties
(
map
,
useInfo
);
BeanUtil
.
copyProperties
(
map
,
useInfo
);
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
...
@@ -77,7 +87,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -77,7 +87,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 使用登记信息
// 使用登记信息
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
LambdaQueryWrapper
<
OtherInfo
>
otherLambda
=
new
QueryWrapper
<
OtherInfo
>().
lambda
();
LambdaQueryWrapper
<
OtherInfo
>
otherLambda
=
new
QueryWrapper
<
OtherInfo
>().
lambda
();
otherLambda
.
eq
(
OtherInfo
::
getRecord
,
map
.
get
(
"equipId"
));
otherLambda
.
eq
(
OtherInfo
:
:
getRecord
,
map
.
get
(
"equipId"
));
OtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
OtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
jgUseRegistration
.
setSupervisoryCode
(
supervisoryCode
);
jgUseRegistration
.
setSupervisoryCode
(
supervisoryCode
);
...
@@ -85,34 +95,54 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -85,34 +95,54 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration
.
setUseUnitCreditCode
(
useInfo
.
getUseUnitCreditCode
());
jgUseRegistration
.
setUseUnitCreditCode
(
useInfo
.
getUseUnitCreditCode
());
jgUseRegistration
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
jgUseRegistration
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
jgUseRegistration
.
setInspectUnitName
(
map
.
get
(
"inspectOrgName"
).
toString
());
jgUseRegistration
.
setInspectUnitName
(
map
.
get
(
"inspectOrgName"
).
toString
());
// jgUseRegistration.setAuditStatus();
// jgUseRegistration.setUseRegistrationCode();
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
this
.
save
(
jgUseRegistration
);
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
// 业务管理设备信息保存
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
JgRelationEquip
jgRelationEquip
=
new
JgRelationEquip
();
}
else
{
jgRelationEquip
.
setBusinessId
(
jgUseRegistration
.
getSequenceNbr
().
toString
());
jgRelationEquip
.
setEquipId
(
map
.
get
(
"equipId"
).
toString
());
// 业务管理设备信息保存
jgRelationEquip
.
setBusinessType
(
String
.
valueOf
(
BusinessTypeEnum
.
USAGE_REGISTRATION
.
getCode
()));
JgRelationEquip
jgRelationEquip
=
new
JgRelationEquip
();
jgRelationEquipMapper
.
insert
(
jgRelationEquip
);
jgRelationEquip
.
setEquipId
(
map
.
get
(
"equipId"
).
toString
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
))){
jgRelationEquip
.
setBusinessType
(
String
.
valueOf
(
BusinessTypeEnum
.
USAGE_REGISTRATION
.
getCode
()));
// 启动并执行流程
List
<
String
>
applicationFormCode
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
SY
.
getCode
(),
1
);
String
instanceId
=
startByVariable
();
jgUseRegistration
.
setApplyNo
(
applicationFormCode
.
get
(
0
));
if
(
ObjectUtils
.
isEmpty
(
instanceId
)){
jgUseRegistration
.
setAuditStatus
(
"待提交"
);
jgUseRegistration
.
setStatus
(
UseStatusEnum
.
SUBMIT
.
getPass
());
this
.
save
(
jgUseRegistration
);
jgRelationEquip
.
setBusinessId
(
jgUseRegistration
.
getSequenceNbr
().
toString
());
jgRelationEquipMapper
.
insert
(
jgRelationEquip
);
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
String
instanceId
=
""
;
if
(
map
.
containsKey
(
"instanceId"
))
{
instanceId
=
map
.
get
(
"instanceId"
).
toString
();
}
else
{
// 启动并执行流程
instanceId
=
startByVariable
();
}
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
// 执行流程
// 执行流程
flowExecute
(
instanceId
,
"1"
,
"备注"
+
System
.
currentTimeMillis
());
String
status
=
flowExecute
(
instanceId
,
"0"
,
""
,
false
);
jgUseRegistration
.
setInstanceStatus
(
status
);
jgUseRegistration
.
setAuditStatus
(
"已提交"
);
jgUseRegistration
.
setStatus
(
UseStatusEnum
.
RECEIVE
.
getPass
());
}
}
jgUseRegistration
.
setInstanceId
(
instanceId
);
jgUseRegistration
.
setInstanceId
(
instanceId
);
this
.
update
();
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
}
}
}
}
public
String
startByVariable
()
{
public
String
startByVariable
()
{
String
instanceId
=
""
;
String
instanceId
=
""
;
//启动流程
//启动流程
try
{
try
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"useRegistration
New
"
);
dto
.
setProcessDefinitionKey
(
"useRegistration"
);
dto
.
setBusinessKey
(
"submit"
);
dto
.
setBusinessKey
(
"submit"
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
...
@@ -122,31 +152,87 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -122,31 +152,87 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
instanceId
;
return
instanceId
;
}
}
public
void
flowExecute
(
String
instanceId
,
String
operate
,
String
comment
){
public
String
flowExecute
(
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
)
{
String
role
=
""
;
String
taskName
=
"流程结束"
;
try
{
try
{
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
task
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
JSONObject
taskMessage
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
task
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
String
taskId
=
taskMessage
.
getString
(
"id"
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workFlowFeginService
.
getNodeInfo
(
taskId
);
//组装信息
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
comment
+
System
.
currentTimeMillis
()
);
dto
.
setComment
(
comment
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
map
.
put
(
"approvalStatus"
,
operate
);
dto
.
setVariable
(
map
);
dto
.
setVariable
(
map
);
//执行流程
//执行流程
AjaxResult
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
// 查询下节点任务
if
(
ObjectUtils
.
isEmpty
(
ajaxResult1
))
{
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
taskName
=
nextTask
.
getString
(
"name"
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
if
(((
Map
)
datum
).
containsKey
(
"groupId"
))
{
role
=
((
Map
)
datum
).
get
(
"groupId"
).
toString
();
continue
;
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(
update
)
{
updateStatus
(
instanceId
,
taskName
,
role
);
}
return
role
;
}
public
void
updateStatus
(
String
instanceId
,
String
taskName
,
String
role
)
{
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
lambda
.
eq
(
JgUseRegistration:
:
getInstanceId
,
instanceId
);
JgUseRegistration
jgUseRegistration
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
if
(
"流程结束"
.
equals
(
taskName
))
{
jgUseRegistration
.
setStatus
(
taskName
);
jgUseRegistration
.
setAuditStatus
(
"已完成"
);
}
else
{
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getInstanceStatus
()))
{
jgUseRegistration
.
setInstanceStatus
(
jgUseRegistration
.
getInstanceStatus
()
+
","
+
role
);
}
else
{
jgUseRegistration
.
setInstanceStatus
(
role
);
}
}
UseStatusEnum
message
=
UseStatusEnum
.
getMessage
(
taskName
);
jgUseRegistration
.
setStatus
(
message
.
getPass
());
}
this
.
getBaseMapper
().
update
(
jgUseRegistration
,
lambda
);
}
public
void
withdraw
(
String
instanceId
)
{
String
taskName
=
""
;
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
lambda
.
eq
(
JgUseRegistration:
:
getInstanceId
,
instanceId
);
try
{
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
taskName
=
nextTask
.
getString
(
"name"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
taskName
))
{
UseStatusEnum
message
=
UseStatusEnum
.
getMessage
(
taskName
);
jgUseRegistration
.
setStatus
(
message
.
getPass
());
}
this
.
getBaseMapper
().
update
(
jgUseRegistration
,
lambda
);
}
}
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
...
@@ -163,6 +249,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -163,6 +249,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
Map
<
String
,
Object
>
useDetail
=
this
.
baseMapper
.
getUseDetail
(
id
);
Map
<
String
,
Object
>
useDetail
=
this
.
baseMapper
.
getUseDetail
(
id
);
detail
.
putAll
(
inspectDetail
);
detail
.
putAll
(
inspectDetail
);
detail
.
putAll
(
useDetail
);
detail
.
putAll
(
useDetail
);
detail
.
putAll
(
useDetail
);
detail
.
put
(
"proDuctPhoto"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"proDuctPhoto"
))));
detail
.
put
(
"proDuctPhoto"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"proDuctPhoto"
))));
detail
.
put
(
"factoryStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"factoryStandard"
))));
detail
.
put
(
"factoryStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"factoryStandard"
))));
detail
.
put
(
"productQualityYieldProve"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"productQualityYieldProve"
))));
detail
.
put
(
"productQualityYieldProve"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"productQualityYieldProve"
))));
...
...
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