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
1648b89f
Commit
1648b89f
authored
Dec 18, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安装告知代码优化
parent
bf7f52d5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
IJgInstallationNoticeService.java
...t/module/jg/api/service/IJgInstallationNoticeService.java
+2
-1
JgInstallationNoticeController.java
...ule/jg/biz/controller/JgInstallationNoticeController.java
+4
-1
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+9
-5
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/service/IJgInstallationNoticeService.java
View file @
1648b89f
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
...
...
@@ -56,7 +57,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @param model 数据
* @param submitType 保存类型
*/
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgInstallationNoticeDto
>
model
);
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgInstallationNoticeDto
>
model
,
ReginParams
reginParams
);
/**
* 打印告知单
...
...
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 @
1648b89f
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
...
...
@@ -44,7 +45,9 @@ public class JgInstallationNoticeController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增安装告知"
,
notes
=
"新增安装告知"
)
public
ResponseModel
<
String
>
save
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
JgInstallationNoticeDto
>
model
)
{
iJgInstallationNoticeService
.
saveNotice
(
submitType
,
model
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
iJgInstallationNoticeService
.
saveNotice
(
submitType
,
model
,
reginParams
);
return
ResponseHelper
.
buildResponse
(
""
);
}
...
...
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 @
1648b89f
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.aspose.words.SaveFormat
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -378,7 +379,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Override
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgInstallationNoticeDto
>
jgInstallationNoticeDtoMap
)
{
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgInstallationNoticeDto
>
jgInstallationNoticeDtoMap
,
ReginParams
reginParams
)
{
JgInstallationNoticeDto
model
=
jgInstallationNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
// 字段转换
convertField
(
model
);
...
...
@@ -435,6 +436,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
int
i
=
deviceList
.
indexOf
(
obj
);
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
...
...
@@ -591,14 +595,14 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
dto
.
getCity
()).
append
(
ym
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
jgInstallationNotice
.
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
(
"cityCode"
,
jgInstallationNotice
.
getCity
());
map
.
put
(
"countyCode"
,
jgInstallationNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
dto
.
getIsXixian
());
map
.
put
(
"isXiXian"
,
jgInstallationNotice
.
getIsXixian
()
==
null
?
"0"
:
jgInstallationNotice
.
getIsXixian
());
Map
<
String
,
Object
>
mapCode
;
ResponseModel
<
Map
<
String
,
Object
>>
code
=
tzsServiceFeignClient
.
createCode
(
map
);
mapCode
=
code
.
getResult
();
...
...
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