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
77dea08c
Commit
77dea08c
authored
Dec 19, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安装告知代码优化
parent
1990e510
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
IJgInstallationNoticeService.java
...t/module/jg/api/service/IJgInstallationNoticeService.java
+1
-1
JgInstallationNoticeController.java
...ule/jg/biz/controller/JgInstallationNoticeController.java
+7
-2
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+15
-3
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 @
77dea08c
...
...
@@ -31,7 +31,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @param noticeDto 安装告知
* @param op 操作类型
*/
JgInstallationNoticeDto
updateInstallationNotice
(
JgInstallationNoticeDto
noticeDto
,
String
op
);
JgInstallationNoticeDto
updateInstallationNotice
(
String
submitType
,
JgInstallationNoticeDto
noticeDto
,
String
op
);
/**
* 分页查询
...
...
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 @
77dea08c
...
...
@@ -19,6 +19,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
...
...
@@ -59,12 +60,16 @@ public class JgInstallationNoticeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新安装告知"
,
notes
=
"根据sequenceNbr更新安装告知"
)
public
ResponseModel
<
JgInstallationNoticeDto
>
updateBySequenceNbrJgInstallationNotice
(
@Request
Body
Map
<
String
,
Object
>
model
,
@RequestParam
(
"op"
)
String
op
)
{
public
ResponseModel
<
JgInstallationNoticeDto
>
updateBySequenceNbrJgInstallationNotice
(
@Request
Param
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
JgInstallationNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"installationInfo"
)),
JgInstallationNoticeDto
.
class
,
true
);
if
(
Objects
.
isNull
(
installationInfo
))
{
throw
new
IllegalArgumentException
(
"参数installationInfo不能为空"
);
}
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
updateInstallationNotice
(
installationInfo
,
op
));
Object
o
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"installationInfo"
)).
get
(
"proxyStatementAttachment"
);
Object
o1
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"installationInfo"
)).
get
(
"installContractAttachment"
);
installationInfo
.
setProxyStatementAttachmentList
((
List
<
Map
<
String
,
Object
>>)
o
);
installationInfo
.
setInstallContractAttachmentList
((
List
<
Map
<
String
,
Object
>>)
o1
);
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
updateInstallationNotice
(
submitType
,
installationInfo
,
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/JgInstallationNoticeServiceImpl.java
View file @
77dea08c
...
...
@@ -44,6 +44,7 @@ import org.springframework.util.Assert;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.io.File
;
...
...
@@ -134,7 +135,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
installationInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
installationInfo
.
put
(
"receiveOrgCreditCode"
,
notice
.
getReceiveOrgCreditCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getInspectUnitId
())
&&
ValidationUtil
.
isEmpty
(
notice
.
getInspectUnitName
()))
{
installationInfo
.
put
(
"inspectUnitId"
,
notice
.
getInspectUnitId
()
+
"_"
+
notice
.
getInspectUnitName
());
}
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
...
...
@@ -164,14 +167,15 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
* @param noticeDto 安装告知
*/
@SuppressWarnings
({
"rawtypes"
,
"Duplicates"
})
public
JgInstallationNoticeDto
updateInstallationNotice
(
JgInstallationNoticeDto
noticeDto
,
String
op
)
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
op
))
{
public
JgInstallationNoticeDto
updateInstallationNotice
(
String
submitType
,
JgInstallationNoticeDto
noticeDto
,
String
op
)
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
// 字段转换
this
.
convertField
(
noticeDto
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
AjaxResult
ajaxResult
;
// 发起流程
if
(!
StringUtils
.
hasText
(
noticeDto
.
getInstanceId
()))
{
...
...
@@ -209,7 +213,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
}
else
{
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
}
return
noticeDto
;
}
...
...
@@ -477,8 +485,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
void
convertField
(
JgInstallationNoticeDto
model
)
{
// 处理图片
if
(!
ValidationUtil
.
isEmpty
(
model
.
getProxyStatementAttachmentList
()))
{
model
.
setProxyStatementAttachment
(
JSON
.
toJSONString
(
model
.
getProxyStatementAttachmentList
()));
}
if
(!
ValidationUtil
.
isEmpty
(
model
.
getInstallContractAttachmentList
()))
{
model
.
setInstallContractAttachment
(
JSON
.
toJSONString
(
model
.
getInstallContractAttachmentList
()));
}
// 分割省市区字段
String
province
=
model
.
getProvince
();
...
...
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