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
4110860e
Commit
4110860e
authored
Dec 14, 2023
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg): 安装告知-详情编辑、删除等接口
parent
32534ce5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
193 additions
and
54 deletions
+193
-54
JgInstallationNotice.java
.../amos/boot/module/jg/api/entity/JgInstallationNotice.java
+13
-18
JgInstallationNoticeMapper.java
...boot/module/jg/api/mapper/JgInstallationNoticeMapper.java
+20
-6
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+42
-3
JgInstallationNoticeController.java
...ule/jg/biz/controller/JgInstallationNoticeController.java
+31
-19
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+87
-8
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgInstallationNotice.java
View file @
4110860e
...
@@ -3,18 +3,13 @@ package com.yeejoin.amos.boot.module.jg.api.entity;
...
@@ -3,18 +3,13 @@ package com.yeejoin.amos.boot.module.jg.api.entity;
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.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
*
*
* @author system_generator
* @author system_generator
* @date 2023-12-12
* @date 2023-12-12
*/
*/
...
@@ -51,10 +46,10 @@ public class JgInstallationNotice extends BaseEntity {
...
@@ -51,10 +46,10 @@ public class JgInstallationNotice extends BaseEntity {
private
Integer
deviceNum
;
private
Integer
deviceNum
;
/**
/**
* 安装单位
id
* 安装单位
统一信用代码
*/
*/
@TableField
(
"install_unit_id
"
)
@TableField
(
"install_unit_credit_code
"
)
private
String
installUnit
Id
;
private
String
installUnit
CreditCode
;
/**
/**
* 安装许可证编号
* 安装许可证编号
...
@@ -159,10 +154,10 @@ public class JgInstallationNotice extends BaseEntity {
...
@@ -159,10 +154,10 @@ public class JgInstallationNotice extends BaseEntity {
private
Date
installEndDate
;
private
Date
installEndDate
;
/**
/**
* 产权单位
id
* 产权单位
统一信用代码
*/
*/
@TableField
(
"property_unit_id
"
)
@TableField
(
"property_unit_credit_code
"
)
private
String
propertyUnit
Id
;
private
String
propertyUnit
CreditCode
;
/**
/**
* 产权单位
* 产权单位
...
@@ -171,10 +166,10 @@ public class JgInstallationNotice extends BaseEntity {
...
@@ -171,10 +166,10 @@ public class JgInstallationNotice extends BaseEntity {
private
String
propertyUnitName
;
private
String
propertyUnitName
;
/**
/**
* 使用单位
id
* 使用单位
统一信用代码
*/
*/
@TableField
(
"use_unit_id
"
)
@TableField
(
"use_unit_credit_code
"
)
private
String
useUnit
Id
;
private
String
useUnit
CreditCode
;
/**
/**
* 使用单位
* 使用单位
...
@@ -183,10 +178,10 @@ public class JgInstallationNotice extends BaseEntity {
...
@@ -183,10 +178,10 @@ public class JgInstallationNotice extends BaseEntity {
private
String
useUnitName
;
private
String
useUnitName
;
/**
/**
* 接收机构
ID
* 接收机构
统一信用代码
*/
*/
@TableField
(
"receive_org_id
"
)
@TableField
(
"receive_org_credit_code
"
)
private
String
receiveOrg
Id
;
private
String
receiveOrg
CreditCode
;
/**
/**
* 接收机构
* 接收机构
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgInstallationNoticeMapper.java
View file @
4110860e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.Collection
;
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.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* Mapper 接口
* Mapper 接口
*
*
...
@@ -18,5 +16,21 @@ import org.apache.ibatis.annotations.Param;
...
@@ -18,5 +16,21 @@ import org.apache.ibatis.annotations.Param;
* @date 2023-12-12
* @date 2023-12-12
*/
*/
public
interface
JgInstallationNoticeMapper
extends
CustomBaseMapper
<
JgInstallationNotice
>
{
public
interface
JgInstallationNoticeMapper
extends
CustomBaseMapper
<
JgInstallationNotice
>
{
/**
* 分页查询
*
* @param page 分页对象
* @param model 查询参数
* @param type 类型:enterprise-企业端、supervision-监管端
* @return 安装告知列表
*/
Page
<
JgInstallationNotice
>
queryForPage
(
Page
<
JgInstallationNotice
>
page
,
@Param
(
"param"
)
JgInstallationNoticeDto
model
,
@Param
(
"type"
)
String
type
);
Page
<
JgInstallationNotice
>
queryForPage
(
Page
<
JgInstallationNotice
>
page
,
@Param
(
"param"
)
JgInstallationNoticeDto
model
,
@Param
(
"type"
)
String
type
);
/**
* 根据安装告知编号查询设备、设计、制造等信息
*
* @param sequenceNbr 安装告知编号
*/
@MapKey
(
"sequenceNbr"
)
List
<
Map
<
String
,
Object
>>
queryEquipInformation
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
4110860e
...
@@ -7,14 +7,11 @@
...
@@ -7,14 +7,11 @@
isn.sequence_nbr AS sequenceNbr,
isn.sequence_nbr AS sequenceNbr,
isn.apply_no AS applyNo,
isn.apply_no AS applyNo,
isn.notice_date AS noticeDate,
isn.notice_date AS noticeDate,
isn.use_unit_id AS useUnitId,
isn.use_unit_name AS useUnitName,
isn.use_unit_name AS useUnitName,
isn.receive_org_id AS receiveOrgId,
isn.receive_org_name AS receiveOrgName,
isn.receive_org_name AS receiveOrgName,
isn.region_no AS regionNo,
isn.region_no AS regionNo,
isn.address AS address,
isn.address AS address,
isn.notice_status AS noticeStatus,
isn.notice_status AS noticeStatus,
isn.install_unit_id AS installUnitId,
isn.install_unit_name AS installUnitName
isn.install_unit_name AS installUnitName
FROM
FROM
tzs_jg_installation_notice isn
tzs_jg_installation_notice isn
...
@@ -45,4 +42,46 @@
...
@@ -45,4 +42,46 @@
isn.notice_date DESC
isn.notice_date DESC
</select>
</select>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
select
isn.sequence_nbr AS sequenceNbr,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
-- 产品编号
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
ri.equ_price AS equPrice,
ri.product_photo AS productPhoto,
di.design_unit_credit_code AS designUnitCreditCode,
di.design_unit_name AS designUnitName,
di.design_license_num AS designLicenseNum,
di.design_use_date AS designUseDate,
di.design_date AS designDate,
di.drawing_do AS drawingDo,
di.appraisal_unit AS appraisalUnit,
di.appraisal_date AS appraisalDate,
di.design_doc AS designDoc,
di.design_standard AS designStandard,
fi.produce_unit_credit_code AS produceUnitCreditCode,
fi.produce_unit_name AS produceUnitName,
fi.produce_license_num AS produceLicenseNum,
fi.factory_num AS factoryNum,
fi.produce_date AS produceDate,
fi.imported AS imported,
fi.produce_country AS produceCountry,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain
FROM
tzs_jg_installation_notice isn
LEFT JOIN tzs_jg_relation_equip re ON re.business_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.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_inspection_detection_info idi ON idi.record = re.equip_id
WHERE
isn.sequence_nbr = #{sequenceNbr}
</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/JgInstallationNoticeController.java
View file @
4110860e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
cn.hutool.core.bean.BeanUtil
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
...
@@ -20,8 +16,10 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -20,8 +16,10 @@ 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
x.servlet.http.HttpServletRequest
;
import
java
.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
/**
/**
* 安装告知
* 安装告知
...
@@ -53,27 +51,28 @@ public class JgInstallationNoticeController extends BaseController {
...
@@ -53,27 +51,28 @@ public class JgInstallationNoticeController extends BaseController {
/**
/**
* 根据sequenceNbr更新
* 根据sequenceNbr更新
*
*
* @param sequenceNbr 主键
* @param model 安装告知
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/
{sequenceNbr}
"
)
@PutMapping
(
value
=
"/
update
"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新安装告知"
,
notes
=
"根据sequenceNbr更新安装告知"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新安装告知"
,
notes
=
"根据sequenceNbr更新安装告知"
)
public
ResponseModel
<
JgInstallationNoticeDto
>
updateBySequenceNbrJgInstallationNotice
(
@RequestBody
JgInstallationNoticeDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
JgInstallationNoticeDto
>
updateBySequenceNbrJgInstallationNotice
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
JgInstallationNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"installationInfo"
)),
JgInstallationNoticeDto
.
class
,
true
);
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
updateWithModel
(
model
));
if
(
Objects
.
isNull
(
installationInfo
))
{
throw
new
IllegalArgumentException
(
"参数installationInfo不能为空"
);
}
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
updateInstallationNotice
(
installationInfo
));
}
}
/**
/**
* 根据sequenceNbr删除
* 根据sequenceNbr删除
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/
{sequenceNbr}
"
)
@DeleteMapping
(
value
=
"/
delete
"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除安装告知"
,
notes
=
"根据sequenceNbr删除安装告知"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除安装告知"
,
notes
=
"根据sequenceNbr删除安装告知"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
[]
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
removeById
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
removeById
(
sequenceNbr
));
}
}
...
@@ -81,16 +80,29 @@ public class JgInstallationNoticeController extends BaseController {
...
@@ -81,16 +80,29 @@ public class JgInstallationNoticeController extends BaseController {
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/
{sequenceNbr}
"
)
@GetMapping
(
value
=
"/
details
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个安装告知"
,
notes
=
"根据sequenceNbr查询单个安装告知"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个安装告知"
,
notes
=
"根据sequenceNbr查询单个安装告知"
)
public
ResponseModel
<
JgInstallationNoticeDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
Map
<
String
,
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
queryBySeq
(
sequenceNbr
));
Map
<
String
,
Object
>>>
selectOne
(
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
queryBySequenceNbr
(
sequenceNbr
));
}
}
/**
/**
* 根据sequenceNbr批量删除
*
* @param sequenceNbrs 主键
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/batchDelete"
)
@ApiOperation
(
value
=
"根据sequenceNbr删除维保合同备案"
,
notes
=
"根据sequenceNbr删除维保合同备案"
)
public
ResponseModel
<
Boolean
>
deleteForBatch
(
@RequestParam
(
"sequenceNbrs"
)
Long
[]
sequenceNbrs
)
{
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
deleteForBatch
(
sequenceNbrs
));
}
/**
* 列表分页查询
* 列表分页查询
*
*
* @param current 当前页
* @param current 当前页
...
...
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 @
4110860e
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.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRelationEquip
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRelationEquip
;
import
com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum
;
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.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
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.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
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.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -28,13 +34,70 @@ import java.util.stream.Collectors;
...
@@ -28,13 +34,70 @@ import java.util.stream.Collectors;
public
class
JgInstallationNoticeServiceImpl
extends
BaseService
<
JgInstallationNoticeDto
,
JgInstallationNotice
,
JgInstallationNoticeMapper
>
implements
IJgInstallationNoticeService
{
public
class
JgInstallationNoticeServiceImpl
extends
BaseService
<
JgInstallationNoticeDto
,
JgInstallationNotice
,
JgInstallationNoticeMapper
>
implements
IJgInstallationNoticeService
{
@Autowired
@Autowired
JgRelationEquipMapper
jgRelationEquipMapper
;
@Autowired
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
@Autowired
@Autowired
JgRelationEquipMapper
jgRelationEquipMapper
;
private
ICommonService
commonService
;
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return 安装告知
*/
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
// 安装告知信息
JgInstallationNotice
notice
=
jgInstallationNoticeMapper
.
selectById
(
sequenceNbr
);
Map
<
String
,
Object
>
installationInfo
=
BeanUtil
.
beanToMap
(
notice
);
installationInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
installationInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
installationInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgInstallationNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"installationInfo"
,
installationInfo
);
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
}};
}
/**
* 更新安装告知
*
* @param noticeDto 安装告知
*/
@SuppressWarnings
(
"rawtypes"
)
public
JgInstallationNoticeDto
updateInstallationNotice
(
JgInstallationNoticeDto
noticeDto
)
{
this
.
convertField
(
noticeDto
);
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"installationNotification"
);
dto
.
setBusinessKey
(
"1"
);
AjaxResult
ajaxResult
;
try
{
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
()));
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
return
noticeDto
;
}
/**
/**
* 分页查询
* 分页查询
*
* @param page 分页对象
* @param model 查询参数
* @param type 类型:enterprise-企业端、supervision-监管端
* @return 安装告知列表
*/
*/
public
Page
<
JgInstallationNoticeDto
>
queryForJgInstallationNoticePage
(
Page
<
JgInstallationNotice
>
page
,
JgInstallationNoticeDto
model
,
String
type
)
{
public
Page
<
JgInstallationNoticeDto
>
queryForJgInstallationNoticePage
(
Page
<
JgInstallationNotice
>
page
,
JgInstallationNoticeDto
model
,
String
type
)
{
Page
<
JgInstallationNotice
>
noticePage
=
jgInstallationNoticeMapper
.
queryForPage
(
page
,
model
,
type
);
Page
<
JgInstallationNotice
>
noticePage
=
jgInstallationNoticeMapper
.
queryForPage
(
page
,
model
,
type
);
...
@@ -63,6 +126,22 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -63,6 +126,22 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
/**
* 批量删除
*
* @param sequenceNbrs 主键
* @return 是否删除成功
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
deleteForBatch
(
Long
[]
sequenceNbrs
)
{
if
(
Objects
.
isNull
(
sequenceNbrs
)
||
sequenceNbrs
.
length
==
0
)
{
return
false
;
}
Collection
<
JgInstallationNotice
>
jgInstallationNotices
=
this
.
listByIds
(
Arrays
.
asList
(
sequenceNbrs
));
jgInstallationNotices
.
forEach
(
notice
->
notice
.
setIsDelete
(
true
));
return
this
.
updateBatchById
(
jgInstallationNotices
);
}
@Override
@Override
public
void
saveNotice
(
JgInstallationNoticeDto
model
)
{
public
void
saveNotice
(
JgInstallationNoticeDto
model
)
{
...
@@ -75,7 +154,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -75,7 +154,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// 调用方法
// 调用方法
List
<
String
>
applyNoList
=
new
ArrayList
<>();
List
<
String
>
applyNoList
=
new
ArrayList
<>();
Random
random
=
new
Random
();
Random
random
=
new
Random
();
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
applyNoList
.
add
(
String
.
valueOf
(
random
.
nextInt
()));
applyNoList
.
add
(
String
.
valueOf
(
random
.
nextInt
()));
}
}
...
@@ -111,7 +190,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -111,7 +190,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
void
convertField
(
JgInstallationNoticeDto
model
)
{
private
void
convertField
(
JgInstallationNoticeDto
model
)
{
// 处理图片
// 处理图片
String
proxyStatementAttachment
=
convertImageUrl
(
model
.
getInstallContractAttachmentList
());
String
proxyStatementAttachment
=
convertImageUrl
(
model
.
getInstallContractAttachmentList
());
String
installContractAttachment
=
convertImageUrl
(
model
.
getProxyStatementAttachmentList
());
String
installContractAttachment
=
convertImageUrl
(
model
.
getProxyStatementAttachmentList
());
model
.
setProxyStatementAttachment
(
proxyStatementAttachment
);
model
.
setProxyStatementAttachment
(
proxyStatementAttachment
);
model
.
setInstallContractAttachment
(
installContractAttachment
);
model
.
setInstallContractAttachment
(
installContractAttachment
);
...
@@ -172,7 +251,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -172,7 +251,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
}
}
private
String
convertImageUrl
(
List
<
Map
<
String
,
String
>>
urlList
)
{
private
String
convertImageUrl
(
List
<
Map
<
String
,
String
>>
urlList
)
{
String
urls
=
""
;
String
urls
=
""
;
if
(!
CollectionUtils
.
isEmpty
(
urlList
))
{
if
(!
CollectionUtils
.
isEmpty
(
urlList
))
{
urls
=
urlList
.
stream
().
map
(
map
->
map
.
get
(
"url"
)).
collect
(
Collectors
.
joining
(
","
));
urls
=
urlList
.
stream
().
map
(
map
->
map
.
get
(
"url"
)).
collect
(
Collectors
.
joining
(
","
));
...
...
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