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
63dfffad
Commit
63dfffad
authored
Dec 15, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_tzs_register
parents
338a2beb
a87a0278
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
462 additions
and
64 deletions
+462
-64
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+1
-0
JgInstallationAccDto.java
...oin/amos/boot/module/jg/api/dto/JgInstallationAccDto.java
+13
-0
JgInstallationNoticeDto.java
.../amos/boot/module/jg/api/dto/JgInstallationNoticeDto.java
+6
-2
JgInstallationNotice.java
.../amos/boot/module/jg/api/entity/JgInstallationNotice.java
+7
-0
FlowStatusEnum.java
...yeejoin/amos/boot/module/jg/api/enums/FlowStatusEnum.java
+6
-1
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+13
-4
JgInstallationByWorkFlowController.java
...jg/biz/controller/JgInstallationByWorkFlowController.java
+88
-0
TzsServiceFeignClient.java
.../amos/boot/module/jg/biz/feign/TzsServiceFeignClient.java
+27
-0
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+16
-14
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+214
-24
WordTemplateUtils.java
...join/amos/boot/module/jg/biz/utils/WordTemplateUtils.java
+0
-1
logback-dev.xml
...mos-boot-module-jg-biz/src/main/resources/logback-dev.xml
+1
-1
JyjcOpeningApplication.java
...s/boot/module/jyjc/api/entity/JyjcOpeningApplication.java
+2
-0
AttachmentTypeEnum.java
...n/amos/boot/module/jyjc/api/enums/AttachmentTypeEnum.java
+32
-0
JyjcInspectionResultModel.java
...boot/module/jyjc/api/model/JyjcInspectionResultModel.java
+7
-2
JyjcOpeningApplicationModel.java
...ot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
+2
-0
JyjcInspectionResultController.java
...e/jyjc/biz/controller/JyjcInspectionResultController.java
+2
-3
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+14
-9
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+5
-2
CategoryOtherInfoMapper.xml
...api/src/main/resources/mapper/CategoryOtherInfoMapper.xml
+6
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
View file @
63dfffad
...
@@ -25,6 +25,7 @@ public class DateUtils {
...
@@ -25,6 +25,7 @@ public class DateUtils {
public
static
final
String
MINUTE_ONLY_PATTERN
=
"mm"
;
public
static
final
String
MINUTE_ONLY_PATTERN
=
"mm"
;
public
static
final
String
HOUR_ONLY_PATTERN
=
"HH"
;
public
static
final
String
HOUR_ONLY_PATTERN
=
"HH"
;
public
static
final
String
DATE_PATTERN_NUM
=
"yyyyMMdd"
;
public
static
final
String
DATE_PATTERN_NUM
=
"yyyyMMdd"
;
public
static
final
String
DATE_PATTERN_MM
=
"yyyyMM"
;
public
static
final
String
CHN_DATE_PATTERN_YEAR
=
"yyyy年"
;
public
static
final
String
CHN_DATE_PATTERN_YEAR
=
"yyyy年"
;
public
static
final
String
CHN_DATE_PATTERN_MONTH
=
"MM月"
;
public
static
final
String
CHN_DATE_PATTERN_MONTH
=
"MM月"
;
public
static
final
String
CHN_DATE_PATTERN
=
"yyyy年MM月dd日"
;
public
static
final
String
CHN_DATE_PATTERN
=
"yyyy年MM月dd日"
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgInstallationAccDto.java
0 → 100644
View file @
63dfffad
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"JgInstallationAccDto"
,
description
=
""
)
public
class
JgInstallationAccDto
{
String
opinion
;
JgInstallationNoticeDto
model
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgInstallationNoticeDto.java
View file @
63dfffad
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.dto;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.dto;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -95,13 +96,13 @@ public class JgInstallationNoticeDto extends BaseDto {
...
@@ -95,13 +96,13 @@ public class JgInstallationNoticeDto extends BaseDto {
private
String
propertyUnitName
;
private
String
propertyUnitName
;
@ApiModelProperty
(
value
=
"使用单位id"
)
@ApiModelProperty
(
value
=
"使用单位id"
)
private
String
useUnit
Id
;
private
String
useUnit
CreditCode
;
@ApiModelProperty
(
value
=
"使用单位"
)
@ApiModelProperty
(
value
=
"使用单位"
)
private
String
useUnitName
;
private
String
useUnitName
;
@ApiModelProperty
(
value
=
"接收机构ID"
)
@ApiModelProperty
(
value
=
"接收机构ID"
)
private
String
receiveOrg
Id
;
private
String
receiveOrg
CreditCode
;
@ApiModelProperty
(
value
=
"接收机构"
)
@ApiModelProperty
(
value
=
"接收机构"
)
private
String
receiveOrgName
;
private
String
receiveOrgName
;
...
@@ -209,4 +210,7 @@ public class JgInstallationNoticeDto extends BaseDto {
...
@@ -209,4 +210,7 @@ public class JgInstallationNoticeDto extends BaseDto {
+
(
StringUtils
.
isEmpty
(
this
.
countyName
)
?
""
:
this
.
countyName
)
+
(
StringUtils
.
isEmpty
(
this
.
countyName
)
?
""
:
this
.
countyName
)
+
(
StringUtils
.
isEmpty
(
this
.
address
)
?
""
:
this
.
address
);
+
(
StringUtils
.
isEmpty
(
this
.
address
)
?
""
:
this
.
address
);
}
}
@ApiModelProperty
(
value
=
"设备注册代码"
)
private
String
equRegisterCode
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgInstallationNotice.java
View file @
63dfffad
...
@@ -341,4 +341,11 @@ public class JgInstallationNotice extends BaseEntity {
...
@@ -341,4 +341,11 @@ public class JgInstallationNotice extends BaseEntity {
@TableField
(
"notice_report_url"
)
@TableField
(
"notice_report_url"
)
private
String
noticeReportUrl
;
private
String
noticeReportUrl
;
/**
* 设备注册编码
*/
@TableField
(
"equ_register_code"
)
private
String
equRegisterCode
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/FlowStatusEnum.java
View file @
63dfffad
...
@@ -25,7 +25,12 @@ public enum FlowStatusEnum {
...
@@ -25,7 +25,12 @@ public enum FlowStatusEnum {
/**
/**
* 已驳回
* 已驳回
*/
*/
REJECTED
(
6614
,
"已驳回"
);
REJECTED
(
6614
,
"已驳回"
),
/**
* 已撤回
*/
ROBACK
(
6615
,
"已撤回"
);
private
final
int
code
;
private
final
int
code
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
63dfffad
...
@@ -16,7 +16,8 @@
...
@@ -16,7 +16,8 @@
isn.province_name AS provinceName,
isn.province_name AS provinceName,
isn.city_name AS cityName,
isn.city_name AS cityName,
isn.county_name AS countyName,
isn.county_name AS countyName,
isn.instance_id AS instanceId
isn.instance_id AS instanceId,
isn.notice_report_url AS noticeReportUrl
FROM
FROM
tzs_jg_installation_notice isn
tzs_jg_installation_notice isn
<where>
<where>
...
@@ -39,7 +40,7 @@
...
@@ -39,7 +40,7 @@
</if>
</if>
</if>
</if>
<if
test=
"type == 'supervision'"
>
<if
test=
"type == 'supervision'"
>
AND
isn.notice_status in ('6612', '6613', '6614'
)
AND
(isn.notice_status in ('6612', '6613', '6614') or isn.status in('6614')
)
</if>
</if>
</where>
</where>
ORDER BY
ORDER BY
...
@@ -61,10 +62,10 @@
...
@@ -61,10 +62,10 @@
isn.install_leader_name AS installLeaderName,
isn.install_leader_name AS installLeaderName,
isn.install_leader_phone AS installLeaderPhone,
isn.install_leader_phone AS installLeaderPhone,
isn.use_unit_name AS useUnitName,
isn.use_unit_name AS useUnitName,
isn.equ_register_code AS equRegisterCode,
ri.equ_list AS equList,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
ri.EQU_DEFINE AS equDefine,
-- 产品编号
ri.product_name AS productName,
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
ri.equ_type AS equType,
...
@@ -89,7 +90,13 @@
...
@@ -89,7 +90,13 @@
fi.produce_country AS produceCountry,
fi.produce_country AS produceCountry,
fi.factory_standard AS factoryStandard,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ui.safety_manager AS safetyManager,
ui.phone AS safetyManagerPhone,
ui.PROVINCE_NAME AS useUnitProvinceName,
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.ADDRESS AS useUnitAddress
FROM
FROM
tzs_jg_installation_notice isn
tzs_jg_installation_notice isn
LEFT JOIN tzs_jg_relation_equip re ON re.business_id = isn.sequence_nbr
LEFT JOIN tzs_jg_relation_equip re ON re.business_id = isn.sequence_nbr
...
@@ -97,7 +104,9 @@
...
@@ -97,7 +104,9 @@
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equip_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equip_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equip_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equip_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equip_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equip_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equip_id
WHERE
WHERE
isn.sequence_nbr = #{sequenceNbr}
isn.sequence_nbr = #{sequenceNbr}
LIMIT 1
</select>
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgInstallationByWorkFlowController.java
0 → 100644
View file @
63dfffad
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationAccDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
import
java.util.Objects
;
/**
* 安装告知
*
* @author system_generator
* @date 2023-12-12
*/
@RestController
@Api
(
tags
=
"安装告知工作流相关Api"
)
@RequestMapping
(
value
=
"/jg-installation-workflow"
)
public
class
JgInstallationByWorkFlowController
{
@Autowired
JgInstallationNoticeServiceImpl
jgInstallationNoticeServiceImpl
;
/**
* 提交
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/submit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"安装告知提交"
,
notes
=
"安装告知提交"
)
public
ResponseModel
<
JgInstallationNoticeDto
>
submit
(
@RequestBody
JgInstallationNoticeDto
model
,
String
op
)
{
// TODO 发起安装告知流程
// jgInstallationNoticeServiceImpl.submit(model, op);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 撤销
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/cancel"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"安装告知撤销"
,
notes
=
"安装告知撤销"
)
public
ResponseModel
<
JgInstallationNoticeDto
>
cancel
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
JgInstallationNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"installationInfo"
)),
JgInstallationNoticeDto
.
class
,
true
);
if
(
Objects
.
isNull
(
installationInfo
))
{
throw
new
IllegalArgumentException
(
"参数installationInfo不能为空"
);
}
jgInstallationNoticeServiceImpl
.
cancel
(
installationInfo
);
return
ResponseHelper
.
buildResponse
(
installationInfo
);
}
/**
* 受理
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/accept"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"安装告知受理"
,
notes
=
"安装告知受理"
)
public
ResponseModel
<
JgInstallationNoticeDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
// TODO 受理安装告知流程
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
LinkedHashMap
form
=
(
LinkedHashMap
)
model1
.
get
(
"form"
);
LinkedHashMap
installationInfo
=
(
LinkedHashMap
)
form
.
get
(
"installationInfo"
);
JgInstallationNoticeDto
jgInstallationNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
installationInfo
),
JgInstallationNoticeDto
.
class
);
jgInstallationNoticeServiceImpl
.
accept
(
jgInstallationNoticeDto
,
op
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/feign/TzsServiceFeignClient.java
0 → 100644
View file @
63dfffad
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
feign
;
import
com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Map
;
@FeignClient
(
name
=
"TZS-YMT-LL"
,
url
=
"172.16.3.155:11000"
,
path
=
"/ymt"
,
configuration
=
{
FeignConfiguration
.
class
})
public
interface
TzsServiceFeignClient
{
/**
* 创建监管码及96333
*
* @param map 请求体
* @return
*/
@RequestMapping
(
value
=
"/equipment-category/createSupervisorCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Map
<
String
,
Object
>>
createCode
(
@RequestBody
Map
<
String
,
Object
>
map
);
}
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/IdxBizJgRegisterInfoServiceImpl.java
View file @
63dfffad
...
@@ -431,31 +431,36 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -431,31 +431,36 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
}
}
// 默认条件【STATUS===""】
// 默认条件【STATUS===""
|| null
】
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"STATUS"
,
"null"
));
meBuilder
.
must
(
QueryBuilders
.
boolQuery
()
.
should
(
QueryBuilders
.
boolQuery
().
mustNot
(
QueryBuilders
.
existsQuery
(
"STATUS"
)))
.
should
(
QueryBuilders
.
boolQuery
().
must
(
QueryBuilders
.
matchPhraseQuery
(
"STATUS"
,
""
))));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
String
queryType
=
map
.
getString
(
"QUERY_TYPE"
);
String
queryType
=
map
.
getString
(
"QUERY_TYPE"
);
// //查询 安装告知【可告知设备列表】【EQU_STATE===
""
】
// //查询 安装告知【可告知设备列表】【EQU_STATE===
null
】
if
(!
ObjectUtils
.
isEmpty
(
queryType
)
&&
ValidationUtil
.
equals
(
queryType
,
"AZ"
))
{
if
(!
ObjectUtils
.
isEmpty
(
queryType
)
&&
ValidationUtil
.
equals
(
queryType
,
"AZ"
))
{
BoolQueryBuilder
azBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
azBuilder
=
QueryBuilders
.
boolQuery
();
azBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"EQU_STATE"
,
9999
));
azBuilder
.
must
Not
(
QueryBuilders
.
existsQuery
(
"EQU_STATE"
));
boolMust
.
must
(
azBuilder
);
boolMust
.
must
(
azBuilder
);
}
}
//查询 维保备案【可绑定设备列表】【
EQU_STATE==="" && INSPECT_REPORT!==9999(默认占位值
)】
//查询 维保备案【可绑定设备列表】【
(EQU_STATE=== null) && (INSPECT_REPORT!=="" && !null
)】
if
(!
ObjectUtils
.
isEmpty
(
queryType
)
&&
ValidationUtil
.
equals
(
queryType
,
"WB"
))
{
if
(!
ObjectUtils
.
isEmpty
(
queryType
)
&&
ValidationUtil
.
equals
(
queryType
,
"WB"
))
{
BoolQueryBuilder
wbBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
wbBuilder
=
QueryBuilders
.
boolQuery
();
wbBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"EQU_STATE"
,
9999
));
wbBuilder
.
mustNot
(
QueryBuilders
.
existsQuery
(
"EQU_STATE"
));
wbBuilder
.
mustNot
(
QueryBuilders
.
existsQuery
(
"INSPECT_REPORT"
));
wbBuilder
.
must
(
QueryBuilders
.
existsQuery
(
"INSPECT_REPORT"
));
wbBuilder
.
mustNot
(
QueryBuilders
.
matchPhraseQuery
(
"INSPECT_REPORT"
,
""
));
boolMust
.
must
(
wbBuilder
);
boolMust
.
must
(
wbBuilder
);
}
}
//查询 使用登记【可选设备列表】【EQU_STATUS===
"" && INSPECT_REPORT!==9999(默认占位值) && USE_ORG_CODE!==""
】
//查询 使用登记【可选设备列表】【EQU_STATUS===
null && (INSPECT_REPORT!=="" && !null) && (USE_ORG_CODE!=="" && !null)
】
if
(!
ObjectUtils
.
isEmpty
(
queryType
)
&&
ValidationUtil
.
equals
(
queryType
,
"SY"
))
{
if
(!
ObjectUtils
.
isEmpty
(
queryType
)
&&
ValidationUtil
.
equals
(
queryType
,
"SY"
))
{
BoolQueryBuilder
syBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
syBuilder
=
QueryBuilders
.
boolQuery
();
syBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"EQU_STATE"
,
9999
));
syBuilder
.
mustNot
(
QueryBuilders
.
existsQuery
(
"EQU_STATE"
));
syBuilder
.
mustNot
(
QueryBuilders
.
existsQuery
(
"INSPECT_REPORT"
));
syBuilder
.
must
(
QueryBuilders
.
existsQuery
(
"INSPECT_REPORT"
));
syBuilder
.
mustNot
(
QueryBuilders
.
existsQuery
(
"USE_ORG_CODE"
));
syBuilder
.
mustNot
(
QueryBuilders
.
matchPhraseQuery
(
"INSPECT_REPORT"
,
""
));
syBuilder
.
must
(
QueryBuilders
.
existsQuery
(
"USE_ORG_CODE"
));
syBuilder
.
mustNot
(
QueryBuilders
.
matchPhraseQuery
(
"USE_ORG_CODE"
,
""
));
boolMust
.
must
(
syBuilder
);
boolMust
.
must
(
syBuilder
);
}
}
...
@@ -638,9 +643,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -638,9 +643,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Map
<
String
,
Object
>
map
=
categoryOtherInfoMapper
.
selectDataById
(
id
);
Map
<
String
,
Object
>
map
=
categoryOtherInfoMapper
.
selectDataById
(
id
);
categoryOtherInfoMapper
.
updateEsStatus
(
id
);
categoryOtherInfoMapper
.
updateEsStatus
(
id
);
ESEquipmentCategoryDto
dto
=
JSON
.
parseObject
(
toJSONString
(
map
),
ESEquipmentCategoryDto
.
class
);
ESEquipmentCategoryDto
dto
=
JSON
.
parseObject
(
toJSONString
(
map
),
ESEquipmentCategoryDto
.
class
);
// 默认赋值占位,方便es条件搜索时使用
dto
.
setSTATUS
(
"null"
);
dto
.
setEQU_STATE
(
9999
);
Optional
<
ESEquipmentCategoryDto
>
data
=
esEquipmentCategory
.
findById
(
id
);
Optional
<
ESEquipmentCategoryDto
>
data
=
esEquipmentCategory
.
findById
(
id
);
if
(!
ObjectUtils
.
isEmpty
(
data
))
{
if
(!
ObjectUtils
.
isEmpty
(
data
))
{
esEquipmentCategory
.
deleteById
(
id
);
esEquipmentCategory
.
deleteById
(
id
);
...
...
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/JgInstallationNoticeServiceImpl.java
View file @
63dfffad
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
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.aspose.words.SaveFormat
;
import
com.aspose.words.SaveFormat
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
...
@@ -13,23 +15,34 @@ import com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum;
...
@@ -13,23 +15,34 @@ import com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper
;
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.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
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.boot.module.ymt.api.entity.TzsJgOtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsJgRegistrationInfo
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
@@ -38,9 +51,12 @@ import java.io.File;
...
@@ -38,9 +51,12 @@ import java.io.File;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.nio.file.Files
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.text.ParseException
;
/**
/**
* 服务实现类
* 服务实现类
...
@@ -49,17 +65,39 @@ import java.util.stream.Collectors;
...
@@ -49,17 +65,39 @@ import java.util.stream.Collectors;
* @date 2023-12-12
* @date 2023-12-12
*/
*/
@Service
@Service
public
class
JgInstallationNoticeServiceImpl
extends
BaseService
<
JgInstallationNoticeDto
,
JgInstallationNotice
,
JgInstallationNoticeMapper
>
implements
IJgInstallationNoticeService
{
public
class
JgInstallationNoticeServiceImpl
extends
BaseService
<
JgInstallationNoticeDto
,
JgInstallationNotice
,
JgInstallationNoticeMapper
>
implements
IJgInstallationNoticeService
{
public
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
public
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
public
static
final
String
PROCESS_DEFINITION_KEY
=
"installationNotification"
;
public
static
final
String
PROCESS_DEFINITION_KEY
=
"installationNotification"
;
public
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
public
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
//西安行政区划code
private
static
final
String
XIAN
=
"610100"
;
//咸阳行政区划code
private
static
final
String
XIAN_YANG
=
"610400"
;
@Autowired
@Autowired
private
JgRelationEquipMapper
jgRelationEquipMapper
;
EquipmentCategoryMapper
equipmentCategoryMapper
;
@Autowired
JgRelationEquipMapper
jgRelationEquipMapper
;
@Autowired
@Autowired
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
@Autowired
@Autowired
private
ICreateCodeService
iCreateCodeService
;
private
ICreateCodeService
iCreateCodeService
;
// @Autowired
// private EquipmentCategoryServiceImpl equipmentCategoryService;
@Autowired
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
@Autowired
OtherInfoMapper
tzsJgOtherInfoMapper
;
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
public
static
byte
[]
file2byte
(
File
file
)
{
public
static
byte
[]
file2byte
(
File
file
)
{
try
{
try
{
...
@@ -93,10 +131,26 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -93,10 +131,26 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
installationInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
installationInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
installationInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
installationInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
installationInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
installationInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
installationInfo
.
put
(
"receiveOrgCreditCode"
,
notice
.
getReceiveOrgCreditCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
installationInfo
.
put
(
"inspectUnitId"
,
notice
.
getInspectUnitId
()
+
"_"
+
notice
.
getInspectUnitName
());
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
};
// 设备信息
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgInstallationNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgInstallationNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
for
(
String
s:
fields
)
{
if
(
installationInfo
.
containsKey
(
s
))
{
installationInfo
.
put
(
s
,
JSON
.
parseArray
(
installationInfo
.
get
(
s
).
toString
()));
}
if
(
equipmentInfos
.
get
(
0
).
containsKey
(
s
))
{
equipmentInfos
.
get
(
0
).
put
(
s
,
JSON
.
parseArray
(
equipmentInfos
.
get
(
0
).
get
(
s
).
toString
()));
}
}
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"installationInfo"
,
installationInfo
);
this
.
put
(
"installationInfo"
,
installationInfo
);
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
...
@@ -125,13 +179,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -125,13 +179,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
dto
.
setBusinessKey
(
"1"
);
dto
.
setBusinessKey
(
"1"
);
try
{
try
{
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
noticeDto
.
setInstanceId
(
instanceId
);
noticeDto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
noticeDto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
log
.
error
(
"提交失败:{}"
,
e
);
}
}
...
@@ -152,8 +199,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -152,8 +199,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
AjaxResult
ajaxResult1
;
AjaxResult
ajaxResult1
;
try
{
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
if
(
ObjectUtils
.
isEmpty
(
ajaxResult1
))
{
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
noticeDto
.
set
Status
(
String
.
valueOf
(
FlowStatusEnum
.
REJECT
ED
.
getCode
()));
noticeDto
.
set
NoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESS
ED
.
getCode
()));
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
...
@@ -175,6 +222,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -175,6 +222,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
return
noticeDto
;
return
noticeDto
;
}
}
/**
/**
* 分页查询
* 分页查询
*
*
...
@@ -261,7 +310,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -261,7 +310,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders
.
put
(
"applyNo"
,
getValue
.
apply
(
"applyNo"
));
placeholders
.
put
(
"applyNo"
,
getValue
.
apply
(
"applyNo"
));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equ
ipCode"
));
// TODO: 设备代码
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equ
RegisterCode"
));
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"produceCode"
));
// TODO: 制造编号
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"produceCode"
));
// TODO: 制造编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
...
@@ -272,11 +321,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -272,11 +321,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders
.
put
(
"installLicenseExpirationDate"
,
getValue
.
apply
(
"installLicenseExpirationDate"
));
placeholders
.
put
(
"installLicenseExpirationDate"
,
getValue
.
apply
(
"installLicenseExpirationDate"
));
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"
useUnitName
"
));
// TODO: 施工单位地址
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"
installUnitAddress
"
));
// TODO: 施工单位地址
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"
useUnitLeaderName"
));
// TODO: 使用单位联系人
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"
safetyManager"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"
useUnitLeaderPhone"
));
// TODO: 使用单位联系人电话
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"
safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnit
LeaderAddress"
));
// TODO: 使用单位联系人地址
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnit
ProvinceName"
)
+
getValue
.
apply
(
"useUnitCityName"
)
+
getValue
.
apply
(
"useUnitCountyName"
)
+
getValue
.
apply
(
"useUnitAddress"
));
// 生成二维码
// 生成二维码
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"applyNo"
),
300
,
300
);
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"applyNo"
),
300
,
300
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
...
@@ -365,6 +414,24 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -365,6 +414,24 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 发起流程
// 发起流程
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
// String[] strIds = new String[deviceList.size()];
// String[] strKeys = new String[deviceList.size()];
//
// for (int i = 0; i<deviceList.size() ; i++
// ) {
// strIds[i] = PROCESS_DEFINITION_KEY;
// strKeys[i] = String.valueOf(i);
// }
// dto.setProcessDefinitionIds(String.join(",", strIds));
// dto.setProcessDefinitionKeys(String.join(",", strKeys));
// dto.setCompleteFirstTask(true);
//
// try {
// FeignClientResult result = Workflow.taskV2Client.startByVariable(dto);
// } catch (Exception e) {
// e.printStackTrace();
// }
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
"1"
);
dto
.
setBusinessKey
(
"1"
);
...
@@ -408,9 +475,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -408,9 +475,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
jgRelationEquip
.
setBusinessType
(
ApplicationFormTypeEnum
.
GZ
.
getCode
());
jgRelationEquip
.
setBusinessType
(
ApplicationFormTypeEnum
.
GZ
.
getCode
());
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
set
Notice
Status
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
}
else
{
}
else
{
dto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
dto
.
set
Notice
Status
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
}
list
.
add
(
dto
);
list
.
add
(
dto
);
equipList
.
add
(
jgRelationEquip
);
equipList
.
add
(
jgRelationEquip
);
...
@@ -462,20 +529,20 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -462,20 +529,20 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
// 分割单位
// 分割单位
String
useUnitId
=
model
.
getUseUnit
Id
();
String
useUnitId
=
model
.
getUseUnit
CreditCode
();
if
(!
ObjectUtils
.
isEmpty
(
useUnitId
))
{
if
(!
ObjectUtils
.
isEmpty
(
useUnitId
))
{
String
[]
useUnitList
=
useUnitId
.
split
(
"_"
);
String
[]
useUnitList
=
useUnitId
.
split
(
"_"
);
if
(
useUnitList
.
length
>
1
)
{
if
(
useUnitList
.
length
>
1
)
{
model
.
setUseUnit
Id
(
useUnitList
[
0
]);
model
.
setUseUnit
CreditCode
(
useUnitList
[
0
]);
model
.
setUseUnitName
(
useUnitList
[
1
]);
model
.
setUseUnitName
(
useUnitList
[
1
]);
}
}
}
}
String
receiveOrgId
=
model
.
getReceiveOrg
Id
();
String
receiveOrgId
=
model
.
getReceiveOrg
CreditCode
();
if
(!
ObjectUtils
.
isEmpty
(
receiveOrgId
))
{
if
(!
ObjectUtils
.
isEmpty
(
receiveOrgId
))
{
String
[]
receiveOrgIdList
=
receiveOrgId
.
split
(
"_"
);
String
[]
receiveOrgIdList
=
receiveOrgId
.
split
(
"_"
);
if
(
receiveOrgIdList
.
length
>
1
)
{
if
(
receiveOrgIdList
.
length
>
1
)
{
model
.
setReceiveOrg
Id
(
receiveOrgIdList
[
0
]);
model
.
setReceiveOrg
CreditCode
(
receiveOrgIdList
[
0
]);
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
}
}
...
@@ -497,4 +564,126 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -497,4 +564,126 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
return
urls
;
return
urls
;
}
}
public
boolean
submit
(
JgInstallationNoticeDto
noticeDto
,
String
op
)
{
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
noticeDto
.
getInstanceId
());
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"提交流程"
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
dto
.
setVariable
(
map
);
//执行流程
AjaxResult
ajaxResult1
=
null
;
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
return
true
;
}
else
{
return
false
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
return
false
;
}
}
public
void
cancel
(
JgInstallationNoticeDto
noticeDto
)
{
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
rollBack
(
noticeDto
.
getInstanceId
());
JgInstallationNotice
jgInstallationNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
if
(
ajaxResult
.
getStatus
()
==
200
)
{
jgInstallationNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
jgInstallationNotice
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
ROBACK
.
getCode
()));
jgInstallationNoticeMapper
.
updateById
(
jgInstallationNotice
);
}
}
public
void
accept
(
JgInstallationNoticeDto
dto
,
String
op
)
{
convertField
(
dto
);
// 组装设备注册代码
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ym
=
null
;
try
{
ym
=
DateUtils
.
dateFormat
(
new
Date
(),
DateUtils
.
DATE_PATTERN_MM
);
}
catch
(
ParseException
e
)
{
log
.
error
(
"日期转换失败:{}"
,
e
);
}
LambdaQueryWrapper
<
JgRelationEquip
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgRelationEquip:
:
getBusinessId
,
dto
.
getSequenceNbr
());
JgRelationEquip
jgRelationEquip
=
jgRelationEquipMapper
.
selectOne
(
queryWrapper
);
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquipId
());
OtherInfo
tzsJgOtherInfo
=
tzsJgOtherInfoMapper
.
selectOne
(
queryWrapper1
);
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquipId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
dto
.
getCity
()).
append
(
ym
);
String
equCode
=
stringBuffer
.
toString
();
String
deviceRegistrationCode
=
iCreateCodeService
.
createDeviceRegistrationCode
(
equCode
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
dto
.
getCity
());
map
.
put
(
"countyCode"
,
dto
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
dto
.
getIsXixian
());
Map
<
String
,
Object
>
mapCode
;
ResponseModel
<
Map
<
String
,
Object
>>
code
=
tzsServiceFeignClient
.
createCode
(
map
);
mapCode
=
code
.
getResult
();
boolean
submit
=
submit
(
dto
,
op
);
if
(
submit
)
{
if
(
"0"
.
equals
(
op
))
{
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
HAVE_PROCESSED
.
getCode
()));
}
else
{
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
dto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
}
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
dto
,
bean
);
bean
.
setEquRegisterCode
(
deviceRegistrationCode
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
// 更新其他业务表
tzsJgOtherInfo
.
setCode96333
(
mapCode
.
get
(
"code96333"
).
toString
());
tzsJgOtherInfo
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
tzsJgRegistrationInfo
.
setEquCode
(
deviceRegistrationCode
);
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
tzsJgRegistrationInfoMapper
.
updateById
(
tzsJgRegistrationInfo
);
}
// // 组装监管码
// String division = "";
// if (((XIAN.equals(dto.getCity()) || XIAN_YANG.equals(dto.getCity())) && "1".equals(dto.getIsXixian()))) {
// division = "X";
// } else {
// //生成监管码前缀
// Map<String, Object> divisionMap = equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQH.getCode(), dto.getCounty());
// division = ObjectUtils.isEmpty(divisionMap) ? equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQH.getCode(), dto.getCity()).get("code").toString() : divisionMap.get("code").toString();
// }
//
// // 组装96333码
// String prefix = "";
// if (((XIAN.equals(dto.getCity()) || XIAN_YANG.equals(dto.getCity())) && "1".equals(dto.getIsXixian()))) {
// prefix = EquipmentCategoryEnum.XXCSM.getValue();
// } else {
// Map<String, Object> elevatorMap = equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQHDT.getCode(), dto.getCounty());
// prefix = ObjectUtils.isEmpty(elevatorMap) ? equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQHDT.getCode(), dto.getCity()).get("code").toString() : elevatorMap.get("code").toString();
// }
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/utils/WordTemplateUtils.java
View file @
63dfffad
...
@@ -66,7 +66,6 @@ public class WordTemplateUtils {
...
@@ -66,7 +66,6 @@ public class WordTemplateUtils {
// 获取模板, 生成Word文档
// 获取模板, 生成Word文档
Template
freemarkerTemplate
=
configuration
.
getTemplate
(
templatePath
,
"UTF-8"
);
Template
freemarkerTemplate
=
configuration
.
getTemplate
(
templatePath
,
"UTF-8"
);
map
=
new
HashMap
<>(
map
);
File
docFile
=
createDoc
(
templatePath
,
map
,
freemarkerTemplate
);
File
docFile
=
createDoc
(
templatePath
,
map
,
freemarkerTemplate
);
// 转换Word文档
// 转换Word文档
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/logback-dev.xml
View file @
63dfffad
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
<logger
name=
"com.yeejoin"
level=
"INFO"
/>
<logger
name=
"com.yeejoin"
level=
"INFO"
/>
<!-- 日志输出级别 -->
<!-- 日志输出级别 -->
<root
level=
"
DEBUG
"
>
<root
level=
"
INFO
"
>
<!-- <appender-ref ref="FILE" /> -->
<!-- <appender-ref ref="FILE" /> -->
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT"
/>
<!-- <appender-ref ref="ELK" />-->
<!-- <appender-ref ref="ELK" />-->
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/entity/JyjcOpeningApplication.java
View file @
63dfffad
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -66,6 +67,7 @@ public class JyjcOpeningApplication extends BaseEntity {
...
@@ -66,6 +67,7 @@ public class JyjcOpeningApplication extends BaseEntity {
* 有效期至
* 有效期至
*/
*/
@TableField
(
"expiry_date"
)
@TableField
(
"expiry_date"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
expiryDate
;
private
Date
expiryDate
;
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/enums/AttachmentTypeEnum.java
0 → 100644
View file @
63dfffad
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
enums
;
public
enum
AttachmentTypeEnum
{
SPECIAL_EQUIPMENT_REPORT
(
"特种设备检验报告"
,
"1"
),
INSPECTION_CERTIFICATE
(
"监检证书"
,
"2"
);
private
String
name
;
private
String
code
;
public
String
getName
()
{
return
name
;
}
AttachmentTypeEnum
(
String
name
,
String
code
)
{
this
.
name
=
name
;
this
.
code
=
code
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcInspectionResultModel.java
View file @
63dfffad
...
@@ -7,6 +7,8 @@ import lombok.EqualsAndHashCode;
...
@@ -7,6 +7,8 @@ import lombok.EqualsAndHashCode;
import
org.typroject.tyboot.core.rdbms.model.BaseModel
;
import
org.typroject.tyboot.core.rdbms.model.BaseModel
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 业务开通申请表
* 业务开通申请表
...
@@ -124,8 +126,11 @@ public class JyjcInspectionResultModel extends BaseModel {
...
@@ -124,8 +126,11 @@ public class JyjcInspectionResultModel extends BaseModel {
private
String
useUnitCreditCode
;
private
String
useUnitCreditCode
;
@ApiModelProperty
(
value
=
"检验结果技术参数"
)
@ApiModelProperty
(
value
=
"检验结果技术参数"
)
private
JyjcInspectionResultParamModel
resultParamModel
;
private
Map
<
String
,
Object
>
resultParamModelMap
;
@ApiModelProperty
(
value
=
"检验结果附件"
)
@ApiModelProperty
(
value
=
"检验结果附件"
)
private
JyjcInspectionResultAttachmentModel
resultAttachmentModel
;
private
List
<
Map
<
String
,
Object
>>
resultAttachmentModelList
;
@ApiModelProperty
(
value
=
"附件类型(特种设备检验报告:1,监检证书:2)"
)
private
String
attachmentType
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
View file @
63dfffad
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jyjc.api.model;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jyjc.api.model;
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.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto
;
...
@@ -44,6 +45,7 @@ public class JyjcOpeningApplicationModel extends BaseModel {
...
@@ -44,6 +45,7 @@ public class JyjcOpeningApplicationModel extends BaseModel {
private
String
resultType
;
private
String
resultType
;
@ApiModelProperty
(
value
=
"有效期至"
)
@ApiModelProperty
(
value
=
"有效期至"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
expiryDate
;
private
Date
expiryDate
;
@ApiModelProperty
(
value
=
"受理日期(接收日期)"
)
@ApiModelProperty
(
value
=
"受理日期(接收日期)"
)
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcInspectionResultController.java
View file @
63dfffad
...
@@ -144,9 +144,8 @@ public class JyjcInspectionResultController extends BaseController {
...
@@ -144,9 +144,8 @@ public class JyjcInspectionResultController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/updateResult"
)
@PutMapping
(
value
=
"/updateResult"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"检验结果-上传结果和编辑结果"
,
notes
=
"检验结果-上传结果和编辑结果"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"检验结果-上传结果和编辑结果"
,
notes
=
"检验结果-上传结果和编辑结果"
)
public
ResponseModel
<
JyjcInspectionResultModel
>
updateJyjcInspectionResult
(
@RequestBody
Map
<
String
,
JyjcInspectionResultModel
>
model
)
{
public
ResponseModel
<
JyjcInspectionResultModel
>
updateJyjcInspectionResult
(
@RequestBody
JyjcInspectionResultModel
model
)
{
JyjcInspectionResultModel
inspectResult
=
model
.
get
(
"inspectResult"
);
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
updateJyjcInspectionResult
(
model
));
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
updateJyjcInspectionResult
(
inspectResult
));
}
}
/**
/**
...
...
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/JyjcInspectionResultServiceImpl.java
View file @
63dfffad
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
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.bo.ReginParams
;
...
@@ -20,18 +19,15 @@ import com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils;
...
@@ -20,18 +19,15 @@ import com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
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.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -95,10 +91,19 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -95,10 +91,19 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
public
JyjcInspectionResultModel
updateJyjcInspectionResult
(
JyjcInspectionResultModel
model
)
{
public
JyjcInspectionResultModel
updateJyjcInspectionResult
(
JyjcInspectionResultModel
model
)
{
updateWithModel
(
model
);
updateWithModel
(
model
);
if
(
ObjectUtil
.
isNotEmpty
(
model
.
getResultAttachmentModel
()))
if
(!
CollectionUtils
.
isEmpty
(
model
.
getResultAttachmentModelList
())){
attachmentService
.
createWithModel
(
model
.
getResultAttachmentModel
());
JyjcInspectionResultAttachment
attachment
=
new
JyjcInspectionResultAttachment
();
if
(
ObjectUtil
.
isNotEmpty
(
model
.
getResultParamModel
()))
attachment
.
setResultSeq
(
model
.
getSequenceNbr
());
resultParamService
.
createWithModel
(
model
.
getResultParamModel
());
attachment
.
setAttachmentUrl
(
JSON
.
toJSONString
(
model
.
getResultAttachmentModelList
()));
attachment
.
setAttachmentType
(
model
.
getAttachmentType
());
attachmentService
.
save
(
attachment
);
}
if
(!
CollectionUtils
.
isEmpty
(
model
.
getResultParamModelMap
())){
JyjcInspectionResultParam
resultParam
=
new
JyjcInspectionResultParam
();
resultParam
.
setResultSeq
(
model
.
getSequenceNbr
());
resultParam
.
setParamJson
(
JSON
.
toJSONString
(
model
.
getResultParamModelMap
()));
resultParamService
.
save
(
resultParam
);
}
return
model
;
return
model
;
}
}
...
...
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 @
63dfffad
...
@@ -124,7 +124,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -124,7 +124,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
model
.
setUnitCode
(
companyBo
.
getCompanyCode
());
model
.
setUnitCode
(
companyBo
.
getCompanyCode
());
model
.
setUnitCodeName
(
companyBo
.
getCompanyName
());
model
.
setUnitCodeName
(
companyBo
.
getCompanyName
());
model
.
setApplicationSeq
(
createCodeService
.
createDeviceRegistrationCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
()));
List
<
String
>
codes
=
createCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
);
model
.
setApplicationSeq
(
codes
.
get
(
0
));
return
this
.
createWithModel
(
model
);
return
this
.
createWithModel
(
model
);
}
else
{
}
else
{
return
this
.
updateWithModel
(
model
);
return
this
.
updateWithModel
(
model
);
...
@@ -220,13 +221,15 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -220,13 +221,15 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
if
(
ValidationUtil
.
isEmpty
(
reginParams
.
getCompany
()))
{
if
(
ValidationUtil
.
isEmpty
(
reginParams
.
getCompany
()))
{
throw
new
RuntimeException
(
"未指定人员归属单位信息"
);
throw
new
RuntimeException
(
"未指定人员归属单位信息"
);
}
}
String
unitCode
;
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
;
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
;
if
(
null
!=
sequenceNbr
)
{
if
(
null
!=
sequenceNbr
)
{
jyjcOpeningApplicationModel
=
this
.
queryBySeq
(
sequenceNbr
);
jyjcOpeningApplicationModel
=
this
.
queryBySeq
(
sequenceNbr
);
unitCode
=
jyjcOpeningApplicationModel
.
getUnitCode
();
}
else
{
}
else
{
jyjcOpeningApplicationModel
=
new
JyjcOpeningApplicationModel
();
jyjcOpeningApplicationModel
=
new
JyjcOpeningApplicationModel
();
unitCode
=
reginParams
.
getCompany
().
getCompanyCode
();
}
}
String
unitCode
=
reginParams
.
getCompany
().
getCompanyCode
();
// unitCode = "91611103MAC4Q1EG7B"; // 测试用,之后务必删除!!!
// unitCode = "91611103MAC4Q1EG7B"; // 测试用,之后务必删除!!!
QueryWrapper
enterpriseInfoQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
enterpriseInfoQueryWrapper
=
new
QueryWrapper
<>();
enterpriseInfoQueryWrapper
.
eq
(
"use_code"
,
unitCode
);
enterpriseInfoQueryWrapper
.
eq
(
"use_code"
,
unitCode
);
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/CategoryOtherInfoMapper.xml
View file @
63dfffad
...
@@ -65,7 +65,12 @@
...
@@ -65,7 +65,12 @@
USE_PLACE,
USE_PLACE,
ADDRESS,
ADDRESS,
EQU_STATE,
EQU_STATE,
STATUS
STATUS,
USE_INNER_CODE,
FACTORY_NUM,
PRODUCE_UNIT_NAME,
INSPECT_REPORT,
NEXT_INSPECT_DATE
from idx_biz_view_jg_all
from idx_biz_view_jg_all
WHERE SEQUENCE_NBR = #{id}
WHERE SEQUENCE_NBR = #{id}
</select>
</select>
...
...
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