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
57fdd284
Commit
57fdd284
authored
Dec 15, 2023
by
liufan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
f44ca374
8d0e6b26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
36 deletions
+44
-36
JyjcInspectionApplicationController.java
...c/biz/controller/JyjcInspectionApplicationController.java
+4
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+40
-36
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcInspectionApplicationController.java
View file @
57fdd284
...
...
@@ -69,6 +69,8 @@ public class JyjcInspectionApplicationController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
JyjcInspectionApplicationModel
>
save
(
@RequestBody
JyjcInspectionApplicationModel
model
)
{
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
model
.
setApplicationUnitCode
(
selectedOrgInfo
.
getCompany
().
getCompanyCode
());
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
save
(
model
));
}
...
...
@@ -131,6 +133,8 @@ public class JyjcInspectionApplicationController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
JyjcInspectionApplicationModel
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
jyjcInspectionApplicationServiceImpl
.
selectBySeq
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
...
...
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/JyjcInspectionApplicationServiceImpl.java
View file @
57fdd284
...
...
@@ -23,9 +23,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
service
.
impl
.
WorkflowExcuteServiceImpl
.
buildOrderNo
;
...
...
@@ -37,7 +35,7 @@ import static com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServic
* @date 2023-12-14
*/
@Service
public
class
JyjcInspectionApplicationServiceImpl
extends
BaseService
<
JyjcInspectionApplicationModel
,
JyjcInspectionApplication
,
JyjcInspectionApplicationMapper
>
implements
IJyjcInspectionApplicationService
{
public
class
JyjcInspectionApplicationServiceImpl
extends
BaseService
<
JyjcInspectionApplicationModel
,
JyjcInspectionApplication
,
JyjcInspectionApplicationMapper
>
implements
IJyjcInspectionApplicationService
{
/**
* 分页查询
*/
...
...
@@ -54,29 +52,27 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
WorkflowFeignService
workflowFeignService
;
public
JyjcInspectionApplicationModel
save
(
@RequestBody
JyjcInspectionApplicationModel
model
)
{
//开启报检流程工作流
if
(
!
model
.
getOperationType
().
equals
(
"2"
))
{
if
(
model
.
getOperationType
().
equals
(
"0"
)){
if
(
!
model
.
getOperationType
().
equals
(
"2"
))
{
if
(
model
.
getOperationType
().
equals
(
"0"
))
{
JSONObject
body
=
new
JSONObject
();
String
businessKey
=
buildOrderNo
();
body
.
put
(
WorkFlowEnum
.
BUSINESSKEY
.
getCode
(),
businessKey
);
body
.
put
(
WorkFlowEnum
.
processDefinitionKey
.
getCode
(),
model
.
getProcessKey
());
JSONObject
jsonObject
=
workflowFeignService
.
start
Process
(
body
);
String
processId
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jsonObject
.
get
(
"
result
"
))).
getString
(
"id"
);
JSONObject
jsonObject
=
workflowFeignService
.
start
ByVariable
(
body
);
String
processId
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jsonObject
.
get
(
"
data
"
))).
getString
(
"id"
);
model
.
setProcessInstanceId
(
processId
);
model
.
setStatus
(
"已提交"
);
}
else
if
(
model
.
getOperationType
().
equals
(
"1"
))
{
}
else
if
(
model
.
getOperationType
().
equals
(
"1"
))
{
model
.
setStatus
(
"草稿"
);
}
model
.
setApplicationNo
(
UUID
.
randomUUID
().
toString
());
model
.
setApplicationDate
(
new
Date
());
model
=
this
.
createWithModel
(
model
);
//保存报检装备监管码
if
(
model
.
getEquip
().
size
()
>
0
)
{
if
(
null
!=
model
.
getEquip
()&&
model
.
getEquip
().
size
()
>
0
)
{
List
<
Map
<
String
,
Object
>>
equip
=
model
.
getEquip
();
List
<
String
>
jgm
=
equip
.
stream
().
map
(
e
->
e
.
get
(
"equipUnicode"
).
toString
()).
collect
(
Collectors
.
toList
());
for
(
String
s
:
jgm
)
{
...
...
@@ -92,7 +88,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
List
<
String
>
enumNameList
=
DocumentEnum
.
getEnumNameList
();
List
<
JyjcInspectionApplicationAttachmentModel
>
attachmentModels
=
new
ArrayList
<>();
for
(
String
code
:
enumNameList
)
{
if
(
map
.
containsKey
(
code
)){
if
(
map
.
containsKey
(
code
))
{
JyjcInspectionApplicationAttachment
attachments
=
new
JyjcInspectionApplicationAttachment
();
attachments
.
setAttachmentType
(
code
);
attachments
.
setAttachmentUrl
(
JSONObject
.
toJSONString
(
map
.
get
(
code
)));
...
...
@@ -100,11 +96,11 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
jyjcInspectionApplicationAttachmentService
.
getBaseMapper
().
insert
(
attachments
);
}
}
}
else
{
}
else
{
//更新报检装备监管码
jyjcInspectionApplicationEquipService
.
getBaseMapper
().
deleteByApplicationSeq
(
model
.
getSequenceNbr
());
if
(
model
.
getEquip
().
size
()
>
0
)
{
if
(
model
.
getEquip
().
size
()
>
0
)
{
List
<
Map
<
String
,
Object
>>
equip
=
model
.
getEquip
();
List
<
String
>
jgm
=
equip
.
stream
().
map
(
e
->
e
.
get
(
"equipUnicode"
).
toString
()).
collect
(
Collectors
.
toList
());
for
(
String
s
:
jgm
)
{
...
...
@@ -122,7 +118,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
jyjcInspectionApplicationAttachmentService
.
getBaseMapper
().
deleteByApplicationSeq
(
model
.
getSequenceNbr
());
for
(
String
code
:
enumNameList
)
{
if
(
map
.
containsKey
(
code
)){
if
(
map
.
containsKey
(
code
))
{
JyjcInspectionApplicationAttachment
attachments
=
new
JyjcInspectionApplicationAttachment
();
attachments
.
setAttachmentType
(
code
);
attachments
.
setAttachmentUrl
(
JSONObject
.
toJSONString
(
map
.
get
(
code
)));
...
...
@@ -137,13 +133,13 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
public
void
deleteBatchData
(
List
<
Long
>
sequenceNbr
){
public
void
deleteBatchData
(
List
<
Long
>
sequenceNbr
)
{
List
<
JyjcInspectionApplication
>
jyjcInspectionApplications
=
this
.
getBaseMapper
().
selectBatchIds
(
sequenceNbr
);
long
count
=
jyjcInspectionApplications
.
stream
().
filter
(
e
->
!
e
.
getStatus
().
equals
(
"已撤销"
)
&&
!
e
.
getStatus
().
equals
(
"已撤回"
)).
count
();
if
(
count
>
0
){
throw
new
BadRequest
(
"存在 非已撤销、已退回状态的报检单 不可删除!"
)
if
(
count
>
0
)
{
throw
new
BadRequest
(
"存在 非已撤销、已退回状态的报检单 不可删除!"
)
;
}
...
...
@@ -160,26 +156,33 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
public
Page
<
JyjcInspectionApplication
>
queryForJyjcInspectionApplicationPage
(
Page
<
JyjcInspectionApplication
>
page
,
String
applicationNo
,
String
inspectionClassify
,
String
applicationUnitCode
,
String
equipClassify
,
String
inspectionUnitCode
,
String
applicationUnitName
,
String
inspectionUnitName
,
String
applicationDate
,
String
acceptDate
,
String
inspectionChargePerson
,
String
status
,
String
bizType
)
{
return
this
.
getBaseMapper
().
queryForDataList
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
applicationUnitName
,
equipClassify
,
inspectionUnitCode
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
);
String
applicationNo
,
String
inspectionClassify
,
String
applicationUnitCode
,
String
equipClassify
,
String
inspectionUnitCode
,
String
applicationUnitName
,
String
inspectionUnitName
,
String
applicationDate
,
String
acceptDate
,
String
inspectionChargePerson
,
String
status
,
String
bizType
)
{
return
this
.
getBaseMapper
().
queryForDataList
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
applicationUnitName
,
equipClassify
,
inspectionUnitCode
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
);
}
/**
* 列表查询 示例
*/
public
List
<
JyjcInspectionApplicationModel
>
queryForJyjcInspectionApplicationList
()
{
return
this
.
queryForList
(
""
,
false
);
public
List
<
JyjcInspectionApplicationModel
>
queryForJyjcInspectionApplicationList
()
{
return
this
.
queryForList
(
""
,
false
);
}
public
JyjcInspectionApplicationModel
selectBySeq
(
Long
sequenceNbr
)
{
JyjcInspectionApplicationModel
model
=
this
.
selectBySeq
(
sequenceNbr
);
return
model
;
}
}
\ No newline at end of file
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