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
58db1d9f
Commit
58db1d9f
authored
Dec 20, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复移装相关问题
parent
0ee40935
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
201 additions
and
87 deletions
+201
-87
JgTransferNoticeDto.java
...join/amos/boot/module/jg/api/dto/JgTransferNoticeDto.java
+6
-0
JgTransferNotice.java
...join/amos/boot/module/jg/api/entity/JgTransferNotice.java
+3
-0
JgTransferNoticeMapper.xml
...-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
+19
-10
JgTransferNoticeByWorkFlowController.java
.../biz/controller/JgTransferNoticeByWorkFlowController.java
+85
-0
JgTransferNoticeController.java
.../module/jg/biz/controller/JgTransferNoticeController.java
+3
-3
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+85
-74
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/dto/JgTransferNoticeDto.java
View file @
58db1d9f
...
...
@@ -36,6 +36,9 @@ public class JgTransferNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"告知状态"
)
private
String
noticeStatus
;
@ApiModelProperty
(
value
=
"告知状态"
)
private
String
noticeStatusDesc
;
@ApiModelProperty
(
value
=
"施工单位统一信用代码"
)
private
String
installUnitCreditCode
;
...
...
@@ -173,6 +176,9 @@ public class JgTransferNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"完整地址"
)
private
String
fullAddress
;
@ApiModelProperty
(
value
=
"userId"
)
private
String
promoter
;
public
String
getFullAddress
()
{
return
(
StringUtils
.
isEmpty
(
this
.
provinceName
)
?
""
:
this
.
provinceName
)
+
(
StringUtils
.
isEmpty
(
this
.
cityName
)
?
""
:
this
.
cityName
)
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgTransferNotice.java
View file @
58db1d9f
...
...
@@ -279,4 +279,7 @@ public class JgTransferNotice extends BaseEntity {
@TableField
(
"province_name"
)
private
String
provinceName
;
@TableField
(
"promoter"
)
private
String
promoter
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
View file @
58db1d9f
...
...
@@ -12,12 +12,13 @@
tjtn.address AS address,
tjtn.notice_status AS noticeStatus,
tjtn.install_unit_name AS installUnitName,
tjtn.province AS provinceName,
tjtn.city AS cityName,
tjtn.county AS countyName,
tjtn.province
_name
AS provinceName,
tjtn.city
_name
AS cityName,
tjtn.county
_name
AS countyName,
tjtn.instance_id AS instanceId,
tjtn.transfer_type AS transferType,
tjtn.plan_date AS planDate
tjtn.plan_date AS planDate,
tjtn.promoter AS promoter
FROM
tzs_jg_transfer_notice tjtn
<where>
...
...
@@ -38,11 +39,18 @@
<if
test=
"param.noticeStatus != null and param.noticeStatus != ''"
>
AND tjtn.notice_status = #{param.noticeStatus}
</if>
<if
test=
"param.transferType != null and param.transferType != '' and param.transferType == '10002'"
>
AND tjtn.transfer_type = '区内移装'
</if>
<if
test=
"param.transferType != null and param.transferType != '' and param.transferType == '10003'"
>
AND tjtn.transfer_type = '跨区移装'
</if>
</if>
<if
test=
"type == 'supervision'"
>
AND (tjtn.notice_status in ('6612', '6613', '6614') or tjtn.status in('6614') )
AND tjtn.notice_status in ('6612', '6613', '6614')
AND tjtn.receive_org_code = #{orgCode}
</if>
<if
test=
"
orgCode != null and orgCode != '
'"
>
<if
test=
"
type == 'enterprise
'"
>
AND tjtn.install_unit_credit_code = #{orgCode}
</if>
</where>
...
...
@@ -71,9 +79,10 @@
tjtn.construction_contract AS constructionContract,
tjtn.transfer_type AS transferType,
tjtn.factory_use_site_street AS factoryUseSiteStreet,
tjtn.province AS provinceName,
tjtn.city AS cityName,
tjtn.county AS countyName,
tjtn.province_name AS provinceName,
tjtn.city_name AS cityName,
tjtn.county_name AS countyName,
tjtn.promoter AS promoter,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
...
...
@@ -110,7 +119,7 @@
ui.ADDRESS AS useUnitAddress
FROM
tzs_jg_transfer_notice tjtn
LEFT JOIN tzs_jg_
installation
_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
LEFT JOIN tzs_jg_
transfer
_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgTransferNoticeByWorkFlowController.java
0 → 100644
View file @
58db1d9f
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgTransferNoticeServiceImpl
;
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-transfer-workflow"
)
public
class
JgTransferNoticeByWorkFlowController
{
@Autowired
JgTransferNoticeServiceImpl
jgTransferNoticeService
;
/**
* 提交
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/submit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"移装告知提交"
,
notes
=
"移装告知提交"
)
public
ResponseModel
<
JgTransferNoticeDto
>
submit
(
@RequestBody
JgTransferNoticeDto
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
<
JgTransferNoticeDto
>
cancel
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
JgTransferNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"transferNoticeInfo"
)),
JgTransferNoticeDto
.
class
,
true
);
if
(
Objects
.
isNull
(
installationInfo
))
{
throw
new
IllegalArgumentException
(
"参数transferNoticeInfo不能为空"
);
}
jgTransferNoticeService
.
cancel
(
installationInfo
);
return
ResponseHelper
.
buildResponse
(
installationInfo
);
}
/**
* 受理
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/accept"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"移装告知受理"
,
notes
=
"移装告知受理"
)
public
ResponseModel
<
JgTransferNoticeDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
// TODO 受理移装告知流程
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
LinkedHashMap
installationInfo
=
(
LinkedHashMap
)
model1
.
get
(
"transferNoticeInfo"
);
JgTransferNoticeDto
JgTransferNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
installationInfo
),
JgTransferNoticeDto
.
class
);
jgTransferNoticeService
.
accept
(
JgTransferNoticeDto
,
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/controller/JgTransferNoticeController.java
View file @
58db1d9f
...
...
@@ -65,12 +65,12 @@ public class JgTransferNoticeController extends BaseController {
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
JgTransferNoticeDto
transferNoticeInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"transferInfo"
)),
JgTransferNoticeDto
.
class
,
true
);
JgTransferNoticeDto
transferNoticeInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"transfer
Notice
Info"
)),
JgTransferNoticeDto
.
class
,
true
);
if
(
Objects
.
isNull
(
transferNoticeInfo
))
{
throw
new
IllegalArgumentException
(
"参数transferInfo不能为空"
);
}
Object
o
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"transfer
Info"
)).
get
(
"proxyStatementAttachmen
t"
);
Object
o1
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"transfer
Info"
)).
get
(
"installContractAttachmen
t"
);
Object
o
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"transfer
NoticeInfo"
)).
get
(
"proxyStatementAttachmentLis
t"
);
Object
o1
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"transfer
NoticeInfo"
)).
get
(
"installContractAttachmentLis
t"
);
transferNoticeInfo
.
setConstructionContractList
((
List
<
Map
<
String
,
Object
>>)
o
);
transferNoticeInfo
.
setPowerOfAttorneyList
((
List
<
Map
<
String
,
Object
>>)
o1
);
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
updateTransferNotice
(
submitType
,
transferNoticeInfo
,
op
));
...
...
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/JgTransferNoticeServiceImpl.java
View file @
58db1d9f
...
...
@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
...
...
@@ -44,6 +46,7 @@ import org.springframework.util.CollectionUtils;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -86,6 +89,8 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
SupervisoryCodeInfoMapper
supervisoryCodeInfoMapper
;
@Autowired
RedisUtils
redisUtils
;
public
static
byte
[]
file2byte
(
File
file
)
{
try
{
...
...
@@ -120,20 +125,27 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
transferNotice
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
transferNotice
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
transferNotice
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
transferNotice
.
put
(
"receiveOrgCode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getFactoryUseSiteStreet
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getStreetName
()))
{
transferNotice
.
put
(
"factoryUseSiteStreet"
,
notice
.
getFactoryUseSiteStreet
()
+
"_"
+
notice
.
getStreetName
());
}
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
,
"powerOfAttorney
List"
,
"constructionContractList"
,
"deviceLis
t"
};
"proxyStatementAttachment"
,
"installContractAttachment"
,
"powerOfAttorney
"
,
"constructionContrac
t"
};
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgTransferNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
for
(
String
s
:
fields
)
{
if
(
transferNotice
.
containsKey
(
s
))
{
transferNotice
.
put
(
s
,
JSON
.
parseArray
(
transferNotice
.
get
(
s
).
toString
()));
if
(
"powerOfAttorney"
.
equalsIgnoreCase
(
s
))
{
transferNotice
.
put
(
"powerOfAttorneyList"
,
JSON
.
parseArray
(
transferNotice
.
get
(
s
).
toString
()));
}
else
if
(
"constructionContract"
.
equalsIgnoreCase
(
s
))
{
transferNotice
.
put
(
"constructionContractList"
,
JSON
.
parseArray
(
transferNotice
.
get
(
s
).
toString
()));
}
else
{
transferNotice
.
put
(
s
,
JSON
.
parseArray
(
transferNotice
.
get
(
s
).
toString
()));
}
}
if
(
equipmentInfos
.
get
(
0
).
containsKey
(
s
))
{
equipmentInfos
.
get
(
0
).
put
(
s
,
JSON
.
parseArray
(
equipmentInfos
.
get
(
0
).
get
(
s
).
toString
()));
...
...
@@ -212,7 +224,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
// word转pdf
File
pdfFile
;
try
{
pdfFile
=
this
.
wordToPdf
(
"
maintain
-notification-report.ftl"
,
placeholders
);
pdfFile
=
this
.
wordToPdf
(
"
transfer
-notification-report.ftl"
,
placeholders
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
...
...
@@ -275,19 +287,20 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
*/
@SuppressWarnings
({
"rawtypes"
,
"Duplicates"
})
public
JgTransferNoticeDto
updateTransferNotice
(
String
submitType
,
JgTransferNoticeDto
noticeDto
,
String
op
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
// 字段转换
this
.
convertField
(
noticeDto
);
noticeDto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
AjaxResult
ajaxResult
;
// 发起流程
if
(!
StringUtils
.
hasText
(
noticeDto
.
getInstanceId
()))
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"
maintain
Notification"
);
dto
.
setProcessDefinitionKey
(
"
transfer
Notification"
);
dto
.
setBusinessKey
(
"1"
);
try
{
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
...
...
@@ -335,11 +348,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
*/
public
Page
<
JgTransferNoticeDto
>
queryForJgTransferNoticePage
(
Page
<
JgTransferNotice
>
page
,
JgTransferNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
;
if
(
type
.
equals
(
"enterprise"
))
{
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
}
else
{
orgCode
=
reginParams
.
getCompany
().
getOrgCode
();
}
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
Page
<
JgTransferNotice
>
noticePage
=
jgTransferNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
...
...
@@ -351,7 +360,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
BeanUtils
.
copyProperties
(
notice
,
noticeDto
);
if
(
Objects
.
nonNull
(
notice
.
getNoticeStatus
()))
{
String
noticeStatusDesc
=
FlowStatusEnum
.
getNameByType
(
Long
.
valueOf
(
notice
.
getNoticeStatus
()));
noticeDto
.
setNoticeStatus
(
noticeStatusDesc
);
noticeDto
.
setNoticeStatus
Desc
(
noticeStatusDesc
);
}
return
noticeDto
;
}).
collect
(
java
.
util
.
stream
.
Collectors
.
toList
());
...
...
@@ -382,7 +391,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
// 获取告知单号
List
<
String
>
applyNoList
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
A
ZGZ
.
getCode
(),
deviceList
.
size
());
List
<
String
>
applyNoList
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
Y
ZGZ
.
getCode
(),
deviceList
.
size
());
if
(
CollectionUtils
.
isEmpty
(
applyNoList
))
{
return
;
}
...
...
@@ -426,6 +435,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
BeanUtils
.
copyProperties
(
model
,
dto
);
int
i
=
deviceList
.
indexOf
(
obj
);
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
...
...
@@ -455,12 +465,12 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
private
void
convertField
(
JgTransferNoticeDto
model
)
{
// 处理图片
if
(!
ValidationUtil
.
isEmpty
(
model
.
getPowerOfAttorneyList
()))
{
model
.
setPowerOfAttorney
(
JSON
.
toJSONString
(
model
.
getPowerOfAttorneyList
()));
}
if
(!
ValidationUtil
.
isEmpty
(
model
.
getConstructionContractList
()))
{
if
(!
ValidationUtil
.
isEmpty
(
model
.
getConstructionContractList
()))
{
model
.
setConstructionContract
(
JSON
.
toJSONString
(
model
.
getConstructionContractList
()));
}
if
(!
ValidationUtil
.
isEmpty
(
model
.
getPowerOfAttorneyList
()))
{
model
.
setPowerOfAttorney
(
JSON
.
toJSONString
(
model
.
getPowerOfAttorneyList
()));
}
// 分割省市区字段
String
province
=
model
.
getProvince
();
...
...
@@ -468,7 +478,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
String
[]
provinceList
=
province
.
split
(
"_"
);
if
(
provinceList
.
length
>
1
)
{
model
.
setProvince
(
provinceList
[
0
]);
model
.
setProvince
(
provinceList
[
1
]);
model
.
setProvince
Name
(
provinceList
[
1
]);
}
}
...
...
@@ -477,7 +487,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
String
[]
cityList
=
city
.
split
(
"_"
);
if
(
cityList
.
length
>
1
)
{
model
.
setCity
(
cityList
[
0
]);
model
.
setCity
(
cityList
[
1
]);
model
.
setCity
Name
(
cityList
[
1
]);
}
}
...
...
@@ -486,7 +496,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
String
[]
countyList
=
county
.
split
(
"_"
);
if
(
countyList
.
length
>
1
)
{
model
.
setCounty
(
countyList
[
0
]);
model
.
setCounty
(
countyList
[
1
]);
model
.
setCounty
Name
(
countyList
[
1
]);
}
}
...
...
@@ -508,15 +518,15 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
String
inspectUnitId
=
model
.
getInspectionUnitCreditCode
();
if
(!
ObjectUtils
.
isEmpty
(
inspectUnitId
))
{
String
[]
inspectUnitIdList
=
inspectUnitId
.
split
(
"_"
);
if
(
inspectUnitIdList
.
length
>
1
)
{
model
.
setInspectionUnitCreditCode
(
inspectUnitIdList
[
0
]);
model
.
setInspection
UnitName
(
inspectUnitIdList
[
1
]);
}
}
//
// String inspectUnitId = model.getInspectUnitId
();
//
if (!ObjectUtils.isEmpty(inspectUnitId)) {
//
String[] inspectUnitIdList = inspectUnitId.split("_");
//
if (inspectUnitIdList.length > 1) {
// model.setInspectUnitId
(inspectUnitIdList[0]);
// model.setInspect
UnitName(inspectUnitIdList[1]);
//
}
//
}
String
factoryUseSiteStreet
=
model
.
getFactoryUseSiteStreet
();
if
(!
ObjectUtils
.
isEmpty
(
factoryUseSiteStreet
))
{
...
...
@@ -574,60 +584,61 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
public
void
accept
(
JgTransferNoticeDto
dto
,
String
op
)
{
JgTransferNotice
J
gTransferNotice
=
this
.
jgTransferNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
JgTransferNotice
j
gTransferNotice
=
this
.
jgTransferNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
// 组装设备注册代码
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ym
=
null
;
try
{
ym
=
DateUtils
.
dateFormat
(
new
Date
(),
DateUtils
.
DATE_PATTERN_MM
);
}
catch
(
ParseException
e
)
{
log
.
error
(
"日期转换失败:{}"
,
e
);
}
LambdaQueryWrapper
<
JgTransferNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgTransferNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
JgTransferNoticeEq
jgRelationEquip
=
jgTransferNoticeEqMapper
.
selectOne
(
queryWrapper
);
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
OtherInfo
tzsJgOtherInfo
=
tzsJgOtherInfoMapper
.
selectOne
(
queryWrapper1
);
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
JgTransferNotice
.
getCity
()).
append
(
ym
);
String
equCode
=
stringBuffer
.
toString
();
String
deviceRegistrationCode
=
iCreateCodeService
.
createDeviceRegistrationCode
(
equCode
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
JgTransferNotice
.
getCity
());
map
.
put
(
"countyCode"
,
JgTransferNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
// map.put("isXiXian", JgTransferNotice.getIsXixian() == null ? "0" : JgTransferNotice.getIsXixian());
Map
<
String
,
Object
>
mapCode
;
ResponseModel
<
Map
<
String
,
Object
>>
code
=
tzsServiceFeignClient
.
createCode
(
map
);
mapCode
=
code
.
getResult
();
// StringBuffer stringBuffer = new StringBuffer();
// String ym = null;
// try {
// ym = DateUtils.dateFormat(new Date(), DateUtils.DATE_PATTERN_MM);
// } catch (ParseException e) {
// log.error("日期转换失败:{}", e);
// }
LambdaQueryWrapper
<
SupervisoryCodeInfo
>
queryWrapper3
=
new
LambdaQueryWrapper
<>();
queryWrapper3
.
eq
(
SupervisoryCodeInfo:
:
getSupervisoryCode
,
mapCode
.
get
(
"superviseCode"
).
toString
());
SupervisoryCodeInfo
supervisoryCodeInfo
=
supervisoryCodeInfoMapper
.
selectOne
(
queryWrapper3
);
supervisoryCodeInfo
.
setStatus
(
"1"
);
supervisoryCodeInfoMapper
.
updateById
(
supervisoryCodeInfo
);
// LambdaQueryWrapper<JgTransferNoticeEq> queryWrapper = new LambdaQueryWrapper<>();
// queryWrapper.eq(JgTransferNoticeEq::getEquipTransferId, dto.getSequenceNbr());
// JgTransferNoticeEq jgRelationEquip = jgTransferNoticeEqMapper.selectOne(queryWrapper);
//
// LambdaQueryWrapper<OtherInfo> queryWrapper1 = new LambdaQueryWrapper<>();
// queryWrapper1.eq(OtherInfo::getRecord, jgRelationEquip.getEquId());
// OtherInfo tzsJgOtherInfo = tzsJgOtherInfoMapper.selectOne(queryWrapper1);
//
// LambdaQueryWrapper<RegistrationInfo> queryWrapper2 = new LambdaQueryWrapper<>();
// queryWrapper2.eq(RegistrationInfo::getRecord, jgRelationEquip.getEquId());
// RegistrationInfo tzsJgRegistrationInfo = tzsJgRegistrationInfoMapper.selectOne(queryWrapper2);
//
//
// stringBuffer.append(tzsJgRegistrationInfo.getEquCategory()).append(JgTransferNotice.getCity()).append(ym);
// String equCode = stringBuffer.toString();
// String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
// Map<String, Object> map = new HashMap<>();
// map.put("cityCode", JgTransferNotice.getCity());
// map.put("countyCode", JgTransferNotice.getCounty());
// map.put("equCategory", tzsJgRegistrationInfo.getEquCategory());
//// map.put("isXiXian", JgTransferNotice.getIsXixian() == null ? "0" : JgTransferNotice.getIsXixian());
// Map<String, Object> mapCode;
// ResponseModel<Map<String, Object>> code = tzsServiceFeignClient.createCode(map);
// mapCode = code.getResult();
//
// LambdaQueryWrapper<SupervisoryCodeInfo> queryWrapper3 = new LambdaQueryWrapper<>();
// queryWrapper3.eq(SupervisoryCodeInfo::getSupervisoryCode, mapCode.get("superviseCode").toString());
// SupervisoryCodeInfo supervisoryCodeInfo = supervisoryCodeInfoMapper.selectOne(queryWrapper3);
// supervisoryCodeInfo.setStatus("1");
// supervisoryCodeInfoMapper.updateById(supervisoryCodeInfo);
// boolean submit = submit(JgTransferNotice, op);
// if(submit) {
boolean
submit
=
submit
(
jgTransferNotice
,
op
);
if
(
submit
)
{
jgTransferNotice
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
if
(
"0"
.
equals
(
op
))
{
J
gTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
HAVE_PROCESSED
.
getCode
()));
j
gTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
HAVE_PROCESSED
.
getCode
()));
// this.generateMaintainNoticeReport(JgTransferNotice.getSequenceNbr());
}
else
{
J
gTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
J
gTransferNotice
.
setInstanceStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
j
gTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
j
gTransferNotice
.
setInstanceStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
}
jgTransferNoticeMapper
.
updateById
(
J
gTransferNotice
);
//
}
jgTransferNoticeMapper
.
updateById
(
j
gTransferNotice
);
}
// // 组装监管码
// String division = "";
...
...
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