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
abac3cd1
Commit
abac3cd1
authored
Dec 22, 2023
by
王果
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
2d567d4e
8890576e
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
128 additions
and
41 deletions
+128
-41
MaintenceStatusEnum.java
...in/amos/boot/module/jg/api/enums/MaintenceStatusEnum.java
+2
-2
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+1
-1
JgMaintenanceContractMapper.xml
...src/main/resources/mapper/JgMaintenanceContractMapper.xml
+4
-2
JgReformNoticeMapper.xml
...jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
+1
-1
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+7
-4
JgMaintenanceContractController.java
...le/jg/biz/controller/JgMaintenanceContractController.java
+2
-1
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+1
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+9
-4
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+11
-3
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+1
-1
JyjcInspectionApplicationMapper.java
...dule/jyjc/api/mapper/JyjcInspectionApplicationMapper.java
+2
-0
JyjcOpeningApplicationRequstDto.java
...odule/jyjc/api/model/JyjcOpeningApplicationRequstDto.java
+2
-2
JyjcInspectionApplicationMapper.xml
...main/resources/mapper/JyjcInspectionApplicationMapper.xml
+6
-1
JyjcOpeningApplicationMapper.xml
...rc/main/resources/mapper/JyjcOpeningApplicationMapper.xml
+3
-0
JyjcInspectionApplicationController.java
...c/biz/controller/JyjcInspectionApplicationController.java
+22
-5
JyjcOpeningApplicationController.java
...jyjc/biz/controller/JyjcOpeningApplicationController.java
+4
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+7
-9
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+43
-4
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/enums/MaintenceStatusEnum.java
View file @
abac3cd1
...
...
@@ -10,8 +10,8 @@ import lombok.Getter;
@AllArgsConstructor
public
enum
MaintenceStatusEnum
{
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
,
"维保单位已驳回"
,
"使用单位撤回"
),
RECEIVE
(
"维保单位审核确认"
,
"receive"
,
"维保单位待受理"
,
"监管单位已驳回"
,
"维保单位撤回"
),
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
,
"维保单位已驳回"
,
"使用单位
已
撤回"
),
RECEIVE
(
"维保单位审核确认"
,
"receive"
,
"维保单位待受理"
,
"监管单位已驳回"
,
"维保单位
已
撤回"
),
PRELIMINARY
(
"监管单位审核"
,
"preliminary"
,
"监管单位待受理"
,
""
,
""
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
abac3cd1
...
...
@@ -27,7 +27,7 @@
</select>
<select
id=
"getUserInfo"
resultType=
"java.util.Map"
>
SELECT
*
phone
FROM
"tzs_user_info"
WHERE
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintenanceContractMapper.xml
View file @
abac3cd1
...
...
@@ -128,7 +128,9 @@
rec_date,
create_user_id,
create_date,
instance_id
instance_id,
promoter,
next_execute_ids
FROM
amos_tzs_biz.tzs_jg_maintenance_contract
<where>
...
...
@@ -155,7 +157,7 @@
and receive_org_code = #{contractDto.receiveOrgCode}
</if>
<if
test=
"contractDto.roleIds != null"
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
<foreach
collection=
'
contractDto.
roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
instance_status like concat('%',#{role},'%')
</foreach>
</if>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
View file @
abac3cd1
...
...
@@ -64,7 +64,7 @@
</if>
</where>
ORDER BY
isn.
rec_date
DESC
isn.
apply_no
DESC
</select>
<select
id=
"queryEquipInformation"
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/CommonController.java
View file @
abac3cd1
...
...
@@ -7,7 +7,9 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
javafx.scene.chart.ValueAxis
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
...
@@ -85,8 +87,9 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getSecurityAdmin"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查找当前公司下所属的安全管理员"
,
notes
=
"查找当前公司下所属的安全管理员"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getSecurityAdmin
(
@RequestParam
(
value
=
"type"
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getSecurityAdmin
(
type
));
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getSecurityAdmin
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"useUnitCode"
,
required
=
false
)
String
useUnitCode
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getSecurityAdmin
(
type
,
useUnitCode
));
}
...
...
@@ -96,8 +99,8 @@ public class CommonController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUser
Info
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询
安全管理员的基本信息"
,
notes
=
"查询安全管理员的基本信息
"
)
@GetMapping
(
value
=
"/getUser
Phone
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询
用户对应联系方式"
,
notes
=
"查询用户对应联系方式
"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserInfo
(
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getUserInfo
(
sequenceNbr
));
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgMaintenanceContractController.java
View file @
abac3cd1
...
...
@@ -208,12 +208,13 @@ public class JgMaintenanceContractController extends BaseController {
public
ResponseModel
<
Page
<
JgMaintenanceContractVo
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"phase"
)
int
phase
,
Map
<
String
,
Object
>
map
,
JgMaintenanceContractDto
maintenanceContractDto
)
{
Page
<
JgMaintenanceContract
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
Page
<
JgMaintenanceContractVo
>
contractDtoPage
=
jgMaintenanceContractServiceImpl
.
queryForPage
(
page
,
phase
,
ma
intenanceContractDto
,
reginParams
);
Page
<
JgMaintenanceContractVo
>
contractDtoPage
=
jgMaintenanceContractServiceImpl
.
queryForPage
(
page
,
phase
,
ma
p
,
reginParams
);
return
ResponseHelper
.
buildResponse
(
contractDtoPage
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
abac3cd1
...
...
@@ -25,7 +25,7 @@ public interface ICommonService {
List
<
Map
<
String
,
Object
>>
getUnitListByType
(
String
type
);
List
<
Map
<
String
,
Object
>>
getSecurityAdmin
(
String
typ
e
);
List
<
Map
<
String
,
Object
>>
getSecurityAdmin
(
String
type
,
String
useUnitCod
e
);
Map
<
String
,
Object
>
getUserInfo
(
String
sequenceNbr
);
...
...
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/CommonServiceImpl.java
View file @
abac3cd1
...
...
@@ -171,10 +171,12 @@ public class CommonServiceImpl implements ICommonService {
}
@Override
public
List
<
Map
<
String
,
Object
>>
getSecurityAdmin
(
String
type
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
String
companyCode
=
company
.
getCompanyCode
();
public
List
<
Map
<
String
,
Object
>>
getSecurityAdmin
(
String
type
,
String
companyCode
)
{
if
(
ObjectUtils
.
isEmpty
(
companyCode
))
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
companyCode
=
company
.
getCompanyCode
();
}
String
postName
=
null
;
if
(
type
.
equals
(
"use"
))
{
postName
=
"安全管理员"
;
...
...
@@ -185,6 +187,9 @@ public class CommonServiceImpl implements ICommonService {
if
(
type
.
equals
(
"agw"
))
{
postName
=
"安改维负责人"
;
}
if
(
type
.
equals
(
"wbry"
))
{
postName
=
"维保人员"
;
}
return
ObjectUtils
.
isEmpty
(
postName
)
?
new
ArrayList
<>()
:
commonMapper
.
getSecurityAdmin
(
companyCode
,
postName
);
}
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
abac3cd1
...
...
@@ -41,6 +41,7 @@ import org.springframework.util.ObjectUtils;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.awt.print.Book
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -53,6 +54,7 @@ import java.util.stream.Collectors;
@Service
public
class
JgMaintenanceContractServiceImpl
extends
BaseService
<
JgMaintenanceContractDto
,
JgMaintenanceContract
,
JgMaintenanceContractMapper
>
implements
IJgMaintenanceContractService
{
public
static
final
String
SUBMIT_DATA
=
"0"
;
public
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
public
static
final
String
WB_PROCESS_DEFINITION_KEY
=
"maintenanceFiling"
;
private
static
final
String
HANDLING_STATUS_DICTIONARY
=
"JGGZZZ"
;
...
...
@@ -79,8 +81,13 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
*/
public
Page
<
JgMaintenanceContractVo
>
queryForPage
(
Page
<
JgMaintenanceContract
>
page
,
int
phase
,
JgMaintenanceContractDto
dto
,
// JgMaintenanceContractDto dto,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
)
{
// JgMaintenanceContractDto dto = new JgMaintenanceContractDto();
// JgMaintenanceContractDto dto = (JgMaintenanceContractDto)map;
JgMaintenanceContractDto
dto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
.
get
(
"jgMaintenanceContractDto"
)),
JgMaintenanceContractDto
.
class
);
Page
<
JgMaintenanceContractDto
>
contractList
=
new
Page
<>();
Page
<
JgMaintenanceContractVo
>
result
=
new
Page
<>();
CompanyBo
company
=
reginParams
.
getCompany
();
...
...
@@ -374,6 +381,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
// 新增编辑
if
(
"add"
.
equals
(
String
.
valueOf
(
map
.
get
(
"pageType"
))))
{
contract
.
setStatus
(
SUBMIT_DATA
.
equals
(
submit
)
?
MaintenceStatusEnum
.
SUBMIT
.
getPass
()
:
MaintenceStatusEnum
.
RECEIVE
.
getPass
());
this
.
save
(
contract
);
}
else
{
this
.
getBaseMapper
().
updateById
(
contract
);
...
...
@@ -414,7 +422,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
){
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
role
=
""
;
String
taskName
=
"流程结束"
;
String
taskName
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()
;
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
JgMaintenanceContract
jgMaintenanceContract
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
try
{
...
...
@@ -435,7 +443,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(!
"流程结束"
.
equals
(
taskName
)){
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()
.
equals
(
taskName
)){
role
=
String
.
join
(
","
,
roleList
);
jgMaintenanceContract
.
setNextExecuteIds
(
role
);
jgMaintenanceContract
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
...
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/JgReformNoticeServiceImpl.java
View file @
abac3cd1
...
...
@@ -485,7 +485,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
dto
.
setEquCategory
(
String
.
valueOf
(
obj
.
get
(
"EQU_CATEGORY"
)));
dto
.
setEquListCode
(
String
.
valueOf
(
obj
.
get
(
"EQU_
LIST_COD
E"
)));
dto
.
setEquListCode
(
String
.
valueOf
(
obj
.
get
(
"EQU_
DEFIN
E"
)));
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcInspectionApplicationMapper.java
View file @
abac3cd1
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEqui
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel
;
import
org.springframework.data.repository.query.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -19,6 +20,7 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
public
Page
<
JyjcInspectionApplicationModel
>
queryForDataList
(
Page
<
JyjcInspectionApplication
>
page
,
String
applicationNo
,
String
inspectionClassify
,
String
applicationUnitCode
,
String
applicationUnitName
,
String
equipClassify
,
String
inspectionUnitCode
,
String
inspectionUnitName
,
String
applicationDate
,
String
acceptDate
,
String
inspectionChargePerson
,
String
status
,
String
bizType
);
// public Page<JyjcInspectionApplicationModel> queryForDataList( Page<JyjcInspectionApplication> page, String applicationNo, String inspectionClassify, String applicationUnitCode,String applicationUnitName, String equipClassify, String inspectionUnitCode,String inspectionUnitName, String applicationDate, String acceptDate, String inspectionChargePerson, String status , String bizType, List<String> roleIds);
Page
<
JyjcInspectionApplicationEquipModel
>
listByCategory
(
Page
<
JyjcInspectionApplicationEquipModel
>
page
,
@Param
(
"equipClassify"
)
String
equipClassify
);
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcOpeningApplicationRequstDto.java
View file @
abac3cd1
...
...
@@ -44,6 +44,6 @@ public class JyjcOpeningApplicationRequstDto {
@ApiModelProperty
(
value
=
"申请时间"
)
private
String
applyTime
;
@ApiModelProperty
(
value
=
"supervision: 监管; enterprise: 企业"
)
private
String
type
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionApplicationMapper.xml
View file @
abac3cd1
...
...
@@ -47,7 +47,7 @@
and inspection_unit_code in (select use_code from tz_base_enterprise_info where use_unit like concat('%',#{inspectionUnitName},'%'))
</if>
<if
test=
"inspectionUnitCode != null and inspectionUnitCode != ''"
>
and inspection_unit_code = #{inspectionUnitCode}
and inspection_unit_code = #{inspectionUnitCode}
and status != '6610'
</if>
<if
test=
"applicationUnitCode != null and applicationUnitCode != ''"
>
and application_unit_code = #{applicationUnitCode}
...
...
@@ -73,6 +73,11 @@
<if
test=
"bizType != null and bizType != ''"
>
and biz_type = #{bizType}
</if>
<!-- <if test="roleIds.size()>0">-->
<!-- <foreach collection="roleIds" item="item" separator="or">-->
<!-- and workflow_role like concat('%',#{item},'%')-->
<!-- </foreach>-->
<!-- </if>-->
</where>
order by tzjia.application_no desc
</select>
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcOpeningApplicationMapper.xml
View file @
abac3cd1
...
...
@@ -48,6 +48,9 @@
<if
test=
"applyStartTime != '' and applyStartTime != null"
>
and apply_time
>
=#{applyStartTime}
</if>
<if
test=
"jyjcOpeningApplicationRequstDto.type == 'supervision'"
>
and status not in ('6610')
</if>
</where>
order by sequence_nbr desc
...
...
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 @
abac3cd1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
controller
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
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.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
;
...
...
@@ -15,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -50,8 +53,16 @@ public class JyjcInspectionApplicationController extends BaseController {
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
model
.
put
(
"applicationUnitCode"
,
selectedOrgInfo
.
getCompany
().
getCompanyCode
());
if
(
model
.
get
(
"operationType"
).
toString
().
equals
(
"2"
)
||
model
.
get
(
"operationType"
).
toString
().
equals
(
"0"
)){
if
(
null
==
model
.
get
(
"equip"
)
||
model
.
getJSONArray
(
"equip"
).
size
()
<
1
){
return
CommonResponseUtil
.
failure
(
"未选择报检设备时不可提交"
);
}
}
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
save
(
model
));
}
}
...
...
@@ -133,14 +144,16 @@ public class JyjcInspectionApplicationController extends BaseController {
@RequestParam
(
required
=
false
)
String
applicationDate
,
@RequestParam
(
required
=
false
)
String
acceptDate
,
@RequestParam
(
required
=
false
)
String
inspectionChargePerson
,
@RequestParam
(
required
=
false
)
String
status
,
String
bizType
)
{
@RequestParam
(
required
=
false
)
String
status
,
@RequestParam
(
required
=
false
)
String
roles
,
String
bizType
)
{
Page
<
JyjcInspectionApplication
>
page
=
new
Page
<
JyjcInspectionApplication
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
inspectionUnitCode
=
reginParams
.
getCompany
().
getCompanyCode
();
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
queryForJyjcInspectionApplicationPage
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
equipClassify
,
inspectionUnitCode
,
applicationUnitName
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
));
List
<
String
>
roleIds
=
StrUtil
.
split
(
roles
,
","
);
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
queryForJyjcInspectionApplicationPage
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
equipClassify
,
inspectionUnitCode
,
applicationUnitName
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
));
}
...
...
@@ -158,14 +171,18 @@ public class JyjcInspectionApplicationController extends BaseController {
@RequestParam
(
required
=
false
)
String
applicationDate
,
@RequestParam
(
required
=
false
)
String
acceptDate
,
@RequestParam
(
required
=
false
)
String
inspectionChargePerson
,
@RequestParam
(
required
=
false
)
String
status
,
String
bizType
)
{
@RequestParam
(
required
=
false
)
String
roles
,
@RequestParam
(
required
=
false
)
String
status
,
String
bizType
)
{
Page
<
JyjcInspectionApplication
>
page
=
new
Page
<
JyjcInspectionApplication
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
applicationUnitCode
=
reginParams
.
getCompany
().
getCompanyCode
();
List
<
String
>
roleIds
=
StrUtil
.
split
(
roles
,
","
);
// return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.queryForJyjcInspectionApplicationPage(page,applicationNo,inspectionClassify,applicationUnitCode,equipClassify,inspectionUnitCode,applicationUnitName,inspectionUnitName,applicationDate,acceptDate,inspectionChargePerson,status,bizType,roleIds));
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
queryForJyjcInspectionApplicationPage
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
equipClassify
,
inspectionUnitCode
,
applicationUnitName
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
));
}
}
/**
* 列表全部数据查询
...
...
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 @
abac3cd1
...
...
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcOpeningApplicationServiceImpl
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -75,6 +76,9 @@ public class JyjcOpeningApplicationController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"保存并提交"
,
notes
=
"保存并提交"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
updateBySequenceNbrAndStartFlow
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@RequestParam
(
value
=
"sequenceNbr"
,
required
=
false
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
if
(
ValidationUtil
.
isEmpty
(
model
.
getBaseUnitLicences
())
||
ValidationUtil
.
isEmpty
(
model
.
getUserInfos
()))
{
throw
new
BadRequest
(
"企业资质信息和检验人员信息为空,无法提交!"
);
}
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
saveOrUpdateModel
(
model
,
true
));
}
...
...
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 @
abac3cd1
...
...
@@ -104,10 +104,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
if
(!
model
.
getOperationType
().
equals
(
"2"
))
{
if
(
model
.
getOperationType
().
equals
(
"0"
))
{
if
(
null
==
model
.
getEquip
()
||
model
.
getEquip
().
size
()
<
1
){
throw
new
BadRequest
(
"未选择报检设备时不可提交"
);
}
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
model
.
getProcessKey
());
dto
.
setBusinessKey
(
buildOrderNo
());
...
...
@@ -134,7 +130,6 @@ 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
());
...
...
@@ -149,7 +144,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
model
.
setApplicationNo
(
codes
.
get
(
0
));
model
.
setApplicationDate
(
new
Date
());
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
...
@@ -172,6 +166,7 @@ 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
);
...
...
@@ -297,9 +292,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
String
applicationDate
,
String
acceptDate
,
String
inspectionChargePerson
,
String
status
,
String
bizType
)
{
String
status
,
String
bizType
)
{
return
this
.
getBaseMapper
().
queryForDataList
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
applicationUnitName
,
equipClassify
,
inspectionUnitCode
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
);
// return this.getBaseMapper().queryForDataList(page, applicationNo, inspectionClassify, applicationUnitCode, applicationUnitName, equipClassify, inspectionUnitCode, inspectionUnitName, applicationDate, acceptDate, inspectionChargePerson, status, bizType,roleIds);
return
this
.
getBaseMapper
().
queryForDataList
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
applicationUnitName
,
equipClassify
,
inspectionUnitCode
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
);
}
...
...
@@ -512,7 +508,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
//此处自己撤销也赋予了办理日期 存在问题 与驳回 通过区分处理
if
(
rollBack
)
{
this
.
getBaseMapper
().
updatePromoter
(
entity
.
getSequenceNbr
());
}
else
{
}
//逻辑变更为 通过后才对办理时间赋值
if
(
status
.
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
())){
entity
.
setAcceptDate
(
new
Date
());
}
this
.
updateById
(
entity
);
...
...
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 @
abac3cd1
...
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
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.core.conditions.update.UpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
...
@@ -145,7 +146,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
model
.
setUnitCode
(
companyBo
.
getCompanyCode
());
model
.
setUnitCodeName
(
companyBo
.
getCompanyName
());
ResponseModel
<
Map
<
String
,
Object
>>
result
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
);
//
ResponseModel<Map<String, Object>> result = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.JY.getCode(), 1);
List
<
String
>
codes
=
createCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
);
model
.
setApplicationSeq
(
codes
.
get
(
0
));
model
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
...
...
@@ -195,12 +196,46 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
entity
.
setStatus
(
status
);
entity
.
setStatusName
(
FlowStatusEnum
.
getNameByType
(
Long
.
parseLong
(
status
)));
// region 更新其他的数据为已作废
if
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()).
equals
(
status
))
{
doDiscard
(
entity
.
getUnitCode
(),
entity
.
getSequenceNbr
());
entity
.
setAcceptDate
(
new
Date
());
}
// endregion
this
.
updateById
(
entity
);
if
(
rollBack
)
{
this
.
getBaseMapper
().
updatePromoter
(
entity
.
getSequenceNbr
());
}
}
/**
* 完成的时候废弃其他已完成的申请单
*
*
* @param unitCode unitCode
* @param sequenceNbr sequenceNbr
* @return {@link Boolean}
* @author yangyang
* @throws
* @date 2023/12/22 09:23
*/
public
Boolean
doDiscard
(
String
unitCode
,
Long
sequenceNbr
)
{
if
(
StringUtils
.
isBlank
(
unitCode
)
||
sequenceNbr
==
null
)
{
return
false
;
}
List
<
Long
>
ids
=
this
.
lambdaQuery
().
select
(
JyjcOpeningApplication:
:
getSequenceNbr
)
.
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
unitCode
)
.
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
())
.
list
().
stream
().
filter
(
o
->
o
.
getSequenceNbr
().
compareTo
(
sequenceNbr
)
!=
0
)
.
map
(
JyjcOpeningApplication:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
if
(
ValidationUtil
.
isEmpty
(
ids
))
{
return
false
;
}
UpdateWrapper
<
JyjcOpeningApplication
>
updateWrapper
=
new
UpdateWrapper
<>();
updateWrapper
.
set
(
"status"
,
FlowStatusEnum
.
TO_BE_DISCARD
.
getCode
()).
set
(
"status_name"
,
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
()).
in
(
"SEQUENCE_NBR"
,
ids
);
return
this
.
update
(
updateWrapper
);
}
/**
* 分页查询
...
...
@@ -225,6 +260,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
applyStartTime
=
date
+
" 00:00:00"
;
applyEndTime
=
date
+
" 23:59:59"
;
}
// 设置为监管端
jyjcOpeningApplicationRequstDto
.
setType
(
"supervision"
);
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationRequstDto
,
applyStartTime
,
applyEndTime
);
}
...
...
@@ -242,6 +279,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
applyStartTime
=
date
+
" 00:00:00"
;
applyEndTime
=
date
+
" 23:59:59"
;
}
jyjcOpeningApplicationRequstDto
.
setType
(
"enterprise"
);
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationRequstDto
,
applyStartTime
,
applyEndTime
);
}
...
...
@@ -303,6 +341,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// 获取检验人员信息
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
userInfoQueryWrapper
.
eq
(
"unit_code"
,
unitCode
);
userInfoQueryWrapper
.
eq
(
"is_delete"
,
true
);
List
<
TzsUserInfo
>
userInfos
=
userInfoMapper
.
selectList
(
userInfoQueryWrapper
);
if
(!
ValidationUtil
.
isEmpty
(
userInfos
))
{
// List<String> codes = userInfos.stream()
...
...
@@ -419,9 +458,9 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
jyjcOpeningApplication
.
setDetectionRegion
(
detectionRegion
);
}
// jyjcOpeningApplication.setDetectionRegionName(detectionRegionName);
if
(
ObjectUtils
.
isEmpty
(
jyjcOpeningApplication
.
getAcceptDate
())){
jyjcOpeningApplication
.
setAcceptDate
(
new
Date
());
}
//
if(ObjectUtils.isEmpty(jyjcOpeningApplication.getAcceptDate())){
//
jyjcOpeningApplication.setAcceptDate(new Date());
//
}
jyjcOpeningApplicationMapper
.
updateById
(
jyjcOpeningApplication
);
}
role
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
...
...
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