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
3d6f5df5
Commit
3d6f5df5
authored
Dec 21, 2023
by
LiuLin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
62d022b9
d85e8a56
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
203 additions
and
21 deletions
+203
-21
BizCustomDateSerializer.java
...os/boot/module/jg/api/common/BizCustomDateSerializer.java
+76
-0
JgReformNoticeDto.java
...eejoin/amos/boot/module/jg/api/dto/JgReformNoticeDto.java
+12
-5
JgReformNotice.java
...eejoin/amos/boot/module/jg/api/entity/JgReformNotice.java
+6
-0
EquipTypeEnum.java
.../yeejoin/amos/boot/module/jg/api/enums/EquipTypeEnum.java
+31
-0
MaintenceStatusEnum.java
...in/amos/boot/module/jg/api/enums/MaintenceStatusEnum.java
+2
-2
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+19
-0
JgMaintenanceContractController.java
...le/jg/biz/controller/JgMaintenanceContractController.java
+24
-0
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+11
-14
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+22
-0
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/common/BizCustomDateSerializer.java
0 → 100644
View file @
3d6f5df5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
common
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.core.JsonGenerator
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.JsonSerializer
;
import
com.fasterxml.jackson.databind.SerializerProvider
;
import
com.fasterxml.jackson.databind.ser.std.StdSerializer
;
import
org.apache.commons.lang3.StringUtils
;
import
org.typroject.tyboot.core.foundation.utils.DateTimeUtil
;
import
java.io.IOException
;
import
java.lang.reflect.Field
;
import
java.text.SimpleDateFormat
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @JsonComponent 会覆盖JsonFormat, 这里解析字段提升JsonFormat优先级
* <p>
* ProjectName: amos-boot-biz
* PackageName: com.yeejoin.amos.boot.module.jg.biz.config
*
* @author yangyang
* @version v1.0
* @date 2023/12/18 17:35
*/
public
class
BizCustomDateSerializer
extends
JsonSerializer
<
Date
>
{
private
List
<
String
>
customFields
=
Arrays
.
asList
(
"acceptDate"
,
"expiryDate"
,
"applicationDate"
);
public
BizCustomDateSerializer
()
{
}
@Override
public
void
serialize
(
Date
value
,
JsonGenerator
jgen
,
SerializerProvider
provider
)
throws
IOException
,
JsonProcessingException
{
try
{
Class
<?>
clazz
=
jgen
.
getCurrentValue
().
getClass
();
if
(
Objects
.
equals
(
clazz
,
HashMap
.
class
))
{
// 分页参数
if
(
customFields
.
contains
(
jgen
.
getOutputContext
().
getCurrentName
()))
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
DateTimeUtil
.
ISO_DATE
);
jgen
.
writeString
(
formatter
.
format
(
value
));
return
;
}
}
else
{
Field
field
=
clazz
.
getDeclaredField
(
jgen
.
getOutputContext
().
getCurrentName
());
if
(
Objects
.
equals
(
field
.
getType
(),
Date
.
class
))
{
if
(
field
.
isAnnotationPresent
(
JsonFormat
.
class
))
{
String
pattern
=
field
.
getAnnotation
(
JsonFormat
.
class
).
pattern
();
if
(
StringUtils
.
isNotBlank
(
pattern
))
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
pattern
);
jgen
.
writeString
(
formatter
.
format
(
value
));
return
;
}
}
}
}
jgen
.
writeString
(
defaultFormattedDate
(
value
));
}
catch
(
Exception
e
)
{
jgen
.
writeString
(
defaultFormattedDate
(
value
));
}
}
private
String
defaultFormattedDate
(
Date
value
)
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
DateTimeUtil
.
ISO_DATE_HOUR24_MIN_SEC
);
String
formattedDate
=
formatter
.
format
(
value
);
return
formattedDate
;
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgReformNoticeDto.java
View file @
3d6f5df5
...
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.yeejoin.amos.boot.module.jg.api.common.BizCustomDateSerializer
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
@@ -33,6 +35,8 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -33,6 +35,8 @@ public class JgReformNoticeDto extends BaseDto {
private
String
applyNo
;
private
String
applyNo
;
@ApiModelProperty
(
value
=
"告知日期"
)
@ApiModelProperty
(
value
=
"告知日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
noticeDate
;
private
Date
noticeDate
;
@ApiModelProperty
(
value
=
"告知状态"
)
@ApiModelProperty
(
value
=
"告知状态"
)
...
@@ -94,6 +98,7 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -94,6 +98,7 @@ public class JgReformNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"计划施工日期"
)
@ApiModelProperty
(
value
=
"计划施工日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
planDate
;
private
Date
planDate
;
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
...
@@ -153,9 +158,6 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -153,9 +158,6 @@ public class JgReformNoticeDto extends BaseDto {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"告知设备列表"
)
@ApiModelProperty
(
value
=
"告知设备列表"
)
private
List
<
Map
<
String
,
Object
>>
deviceList
;
private
List
<
Map
<
String
,
Object
>>
deviceList
;
//
// @ApiModelProperty (value = "告知单PDF URL")
// private String noticeReportUrl;
@ApiModelProperty
(
value
=
"区名字"
)
@ApiModelProperty
(
value
=
"区名字"
)
private
String
countyName
;
private
String
countyName
;
...
@@ -178,8 +180,6 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -178,8 +180,6 @@ public class JgReformNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"设备使用地点-街道(镇)"
)
@ApiModelProperty
(
value
=
"设备使用地点-街道(镇)"
)
private
String
streetName
;
private
String
streetName
;
//
// private String receiveOrgCreditCode;
@ApiModelProperty
(
value
=
"下一执行节点ids"
)
@ApiModelProperty
(
value
=
"下一执行节点ids"
)
private
String
nextExecuteIds
;
private
String
nextExecuteIds
;
...
@@ -189,4 +189,11 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -189,4 +189,11 @@ public class JgReformNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"告知单PDF URL"
)
@ApiModelProperty
(
value
=
"告知单PDF URL"
)
private
String
noticeReportUrl
;
private
String
noticeReportUrl
;
private
List
<
String
>
roleIds
;
private
String
dataType
;
@ApiModelProperty
(
value
=
"状态"
)
private
String
status
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgReformNotice.java
View file @
3d6f5df5
...
@@ -292,4 +292,10 @@ public class JgReformNotice extends BaseEntity {
...
@@ -292,4 +292,10 @@ public class JgReformNotice extends BaseEntity {
*/
*/
@TableField
(
"notice_report_url"
)
@TableField
(
"notice_report_url"
)
private
String
noticeReportUrl
;
private
String
noticeReportUrl
;
/**
* 状态
*/
@TableField
(
"status"
)
private
String
status
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/EquipTypeEnum.java
0 → 100644
View file @
3d6f5df5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
EquipTypeEnum
{
锅炉
(
"锅"
,
"1"
),
压力容器
(
"容"
,
"2"
),
电梯
(
"梯"
,
"3"
),
起重机械
(
"起"
,
"4"
),
场内机动车辆
(
"车"
,
"5"
),
大型游乐设施
(
"游"
,
"6"
),
压力管道
(
"管"
,
"8"
),
客运索道
(
"索"
,
"9"
);
private
final
String
name
;
private
final
String
code
;
public
static
String
getMessage
(
String
code
)
{
for
(
EquipTypeEnum
constants
:
values
())
{
if
(
constants
.
getCode
().
equals
(
code
))
{
return
constants
.
getName
();
}
}
return
null
;
}
}
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 @
3d6f5df5
...
@@ -10,8 +10,8 @@ import lombok.Getter;
...
@@ -10,8 +10,8 @@ import lombok.Getter;
@AllArgsConstructor
@AllArgsConstructor
public
enum
MaintenceStatusEnum
{
public
enum
MaintenceStatusEnum
{
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
,
"维保单位
受理
已驳回"
,
"使用单位撤回"
),
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
,
"维保单位已驳回"
,
"使用单位撤回"
),
RECEIVE
(
"维保单位审核确认"
,
"receive"
,
"维保单位待受理"
,
"监管单位
受理已驳回"
,
"维保单位受理
撤回"
),
RECEIVE
(
"维保单位审核确认"
,
"receive"
,
"维保单位待受理"
,
"监管单位
已驳回"
,
"维保单位
撤回"
),
PRELIMINARY
(
"监管单位审核"
,
"preliminary"
,
"监管单位待受理"
,
""
,
""
);
PRELIMINARY
(
"监管单位审核"
,
"preliminary"
,
"监管单位待受理"
,
""
,
""
);
...
...
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 @
3d6f5df5
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
...
@@ -5,6 +5,7 @@ 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.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -18,8 +19,12 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -18,8 +19,12 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
/**
* 装备分类
* 装备分类
...
@@ -123,4 +128,18 @@ public class CommonController extends BaseController {
...
@@ -123,4 +128,18 @@ public class CommonController extends BaseController {
String
companyCode
=
unitCode
.
split
(
"_"
)[
0
];
String
companyCode
=
unitCode
.
split
(
"_"
)[
0
];
return
ResponseHelper
.
buildResponse
(
commonService
.
getEnterpriseEmployee
(
companyCode
));
return
ResponseHelper
.
buildResponse
(
commonService
.
getEnterpriseEmployee
(
companyCode
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程状态枚举列表"
,
notes
=
"流程状态枚举列表"
)
@GetMapping
(
value
=
"/flow-status/list"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectForFlowStatusList
()
{
return
ResponseHelper
.
buildResponse
(
Arrays
.
stream
(
FlowStatusEnum
.
values
()).
map
(
this
::
mapPointTypeToMap
).
collect
(
Collectors
.
toList
()));
}
private
Map
<
String
,
Object
>
mapPointTypeToMap
(
FlowStatusEnum
e
)
{
Map
<
String
,
Object
>
record
=
new
HashMap
<>();
record
.
put
(
"key"
,
e
.
getCode
());
record
.
put
(
"label"
,
e
.
getName
());
return
record
;
}
}
}
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 @
3d6f5df5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -12,6 +13,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgMaintenanceContractSer
...
@@ -12,6 +13,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgMaintenanceContractSer
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
;
...
@@ -168,6 +170,28 @@ public class JgMaintenanceContractController extends BaseController {
...
@@ -168,6 +170,28 @@ public class JgMaintenanceContractController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgMaintenanceContractServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
true
);
jgMaintenanceContractServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
true
);
if
(
map
.
containsKey
(
"formData"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"formData"
))){
JgMaintenanceContract
dto
=
new
JgMaintenanceContract
();
Map
<
String
,
Object
>
formData
=
(
Map
<
String
,
Object
>)
map
.
get
(
"formData"
);
BeanUtil
.
copyProperties
(
formData
,
dto
);
JgMaintenanceContract
result
=
new
JgMaintenanceContract
();
if
(!
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceManagerOneId
()))
{
result
.
setSequenceNbr
(
dto
.
getSequenceNbr
());
//维保人员一
String
[]
maintenanceManagerOneInfo
=
dto
.
getMaintenanceManagerOneId
().
split
(
"_"
);
result
.
setMaintenanceManagerOneId
(
maintenanceManagerOneInfo
[
0
]);
result
.
setMaintenanceManagerOneName
(
maintenanceManagerOneInfo
[
1
]);
result
.
setMaintenanceManagerOnePhone
(
dto
.
getMaintenanceManagerOnePhone
());
//维保人员二
String
[]
maintenanceManagerTwoInfo
=
dto
.
getMaintenanceManagerTwoId
().
split
(
"_"
);
result
.
setMaintenanceManagerTwoId
(
maintenanceManagerTwoInfo
[
0
]);
result
.
setMaintenanceManagerTwoName
(
maintenanceManagerTwoInfo
[
1
]);
result
.
setMaintenanceManagerTwoPhone
(
dto
.
getMaintenanceManagerTwoPhone
());
}
jgMaintenanceContractServiceImpl
.
getBaseMapper
().
updateById
(
result
);
}
return
ResponseHelper
.
buildResponse
(
"ok"
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
}
...
...
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 @
3d6f5df5
...
@@ -91,11 +91,11 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -91,11 +91,11 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
}
else
if
(
MaintenanceEnum
.
WEIBAO
.
getCode
().
equals
(
phase
))
{
}
else
if
(
MaintenanceEnum
.
WEIBAO
.
getCode
().
equals
(
phase
))
{
//维保单位用"维保单位统一信用代码"匹配数据
//维保单位用"维保单位统一信用代码"匹配数据
dto
.
setMaintenanceUnitCode
(
company
.
getCompanyCode
()
+
"_"
+
company
.
getCompanyName
()
);
dto
.
setMaintenanceUnitCode
(
company
.
getCompanyCode
());
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
}
else
if
(
MaintenanceEnum
.
JIANGUAN
.
getCode
().
equals
(
phase
))
{
}
else
if
(
MaintenanceEnum
.
JIANGUAN
.
getCode
().
equals
(
phase
))
{
//监管单位用"接收机构统一使用代码"匹配
//监管单位用"接收机构统一使用代码"匹配
dto
.
setReceiveOrgCode
(
company
.
get
Org
Code
());
dto
.
setReceiveOrgCode
(
company
.
get
Company
Code
());
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
}
}
BeanUtils
.
copyProperties
(
contractList
,
result
);
BeanUtils
.
copyProperties
(
contractList
,
result
);
...
@@ -110,15 +110,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -110,15 +110,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
JgMaintenanceContractVo
vo
=
new
JgMaintenanceContractVo
();
JgMaintenanceContractVo
vo
=
new
JgMaintenanceContractVo
();
BeanUtils
.
copyProperties
(
dto
,
vo
);
BeanUtils
.
copyProperties
(
dto
,
vo
);
vo
.
setMaintenanceContract
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceContract
())
?
null
:
JSON
.
parseArray
(
dto
.
getMaintenanceContract
()));
vo
.
setMaintenanceContract
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceContract
())
?
null
:
JSON
.
parseArray
(
dto
.
getMaintenanceContract
()));
vo
.
setMaintenanceManagerOneName
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceManagerOneId
())
?
null
:
dto
.
getMaintenanceManagerOneId
().
split
(
"_"
)[
1
]);
vo
.
setMaintenanceManagerTwoName
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceManagerTwoId
())
?
null
:
dto
.
getMaintenanceManagerTwoId
().
split
(
"_"
)[
1
]);
List
<
Map
<
String
,
Object
>>
list
=
maintenanceContractMapper
.
selectEquipList
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
list
=
maintenanceContractMapper
.
selectEquipList
(
sequenceNbr
);
// ArrayList<EquipMessageVo> equipMessageVos = new ArrayList<>();
// list.forEach(item ->{
// EquipMessageVo equipMessageVo = new EquipMessageVo();
// BeanUtil.copyProperties(item, equipMessageVo);
// equipMessageVos.add(equipMessageVo);
// });
if
(!
ObjectUtils
.
isEmpty
(
list
)){
if
(!
ObjectUtils
.
isEmpty
(
list
)){
vo
.
setEquipmentLists
(
list
);
vo
.
setEquipmentLists
(
list
);
}
}
...
@@ -366,7 +358,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -366,7 +358,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract
.
setUseUnitName
(
company
.
getCompanyName
());
contract
.
setUseUnitName
(
company
.
getCompanyName
());
//管理员信息
//管理员信息
String
[]
MaintenanceManager
=
dto
.
getMaintenanceManagerId
().
split
(
"_"
);
String
[]
MaintenanceManager
=
dto
.
getMaintenanceManagerId
().
split
(
"_"
);
contract
.
setMaintenanceManagerId
(
dto
.
getMaintenanceManagerId
()
);
contract
.
setMaintenanceManagerId
(
MaintenanceManager
[
0
]
);
contract
.
setMaintenanceManagerName
(
MaintenanceManager
[
1
]);
contract
.
setMaintenanceManagerName
(
MaintenanceManager
[
1
]);
//接收机构信息
//接收机构信息
String
[]
splitReceiveOrgCode
=
dto
.
getReceiveOrgCode
().
split
(
"_"
);
String
[]
splitReceiveOrgCode
=
dto
.
getReceiveOrgCode
().
split
(
"_"
);
...
@@ -374,7 +366,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -374,7 +366,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract
.
setReceiveOrgName
(
splitReceiveOrgCode
[
1
]);
contract
.
setReceiveOrgName
(
splitReceiveOrgCode
[
1
]);
//维保单位信息
//维保单位信息
String
[]
splitMaintenanceUnitCode
=
dto
.
getMaintenanceUnitCode
().
split
(
"_"
);
String
[]
splitMaintenanceUnitCode
=
dto
.
getMaintenanceUnitCode
().
split
(
"_"
);
contract
.
setMaintenanceUnitCode
(
dto
.
getMaintenanceUnitCode
()
);
contract
.
setMaintenanceUnitCode
(
splitMaintenanceUnitCode
[
0
]
);
contract
.
setMaintenanceUnitName
(
splitMaintenanceUnitCode
[
1
]);
contract
.
setMaintenanceUnitName
(
splitMaintenanceUnitCode
[
1
]);
contract
.
setApplyStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
contract
.
setApplyStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
...
@@ -402,9 +394,14 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -402,9 +394,14 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
jgMaintenanceContractEqService
.
saveBatch
(
equipList
);
jgMaintenanceContractEqService
.
saveBatch
(
equipList
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
String
instanceId
=
null
;
// 提交启动流程
// 提交启动流程
String
instanceId
=
startByVariable
();
if
(
map
.
containsKey
(
"instanceId"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"instanceId"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
instanceId
)){
instanceId
=
String
.
valueOf
(
map
.
get
(
"instanceId"
));
}
else
{
instanceId
=
startByVariable
();
}
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
// 修改数据信息
// 修改数据信息
updateExecuteIds
(
instanceId
,
contract
.
getSequenceNbr
(),
"0"
);
updateExecuteIds
(
instanceId
,
contract
.
getSequenceNbr
(),
"0"
);
// 默认执行流程
// 默认执行流程
...
...
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 @
3d6f5df5
...
@@ -13,10 +13,12 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...
@@ -13,10 +13,12 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
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.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.UseStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.UseStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
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.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
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
;
...
@@ -36,6 +38,8 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -36,6 +38,8 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -65,6 +69,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -65,6 +69,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private
ICreateCodeService
iCreateCodeService
;
private
ICreateCodeService
iCreateCodeService
;
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
);
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
);
return
listPage
;
return
listPage
;
...
@@ -291,4 +297,19 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -291,4 +297,19 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
detail
;
return
detail
;
}
}
/**
* 参数为监管码
* @param supervisoryCode
* @return
*/
public
String
getCode
(
String
supervisoryCode
)
{
if
(!
ObjectUtils
.
isEmpty
(
supervisoryCode
)
&&
supervisoryCode
.
length
()
>
5
)
{
String
name
=
EquipTypeEnum
.
getMessage
(
supervisoryCode
.
substring
(
1
,
2
));
String
type
=
supervisoryCode
.
substring
(
2
,
4
);
String
city
=
supervisoryCode
.
substring
(
0
,
1
);
ResponseModel
<
String
>
stringResponseModel
=
tzsServiceFeignClient
.
useRegistrationCode
(
name
+
type
+
"陕"
+
city
);
return
stringResponseModel
.
getResult
();
}
return
null
;
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment