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
ea73776a
Commit
ea73776a
authored
Jul 20, 2021
by
付培阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联动单位接口
parent
686769f4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
20 deletions
+43
-20
LinkageUnitDto.java
...ejoin/amos/boot/module/common/api/dto/LinkageUnitDto.java
+2
-2
LinkageUnit.java
...ejoin/amos/boot/module/common/api/entity/LinkageUnit.java
+3
-3
ContractController.java
...boot/module/common/biz/controller/ContractController.java
+21
-11
ContractServiceImpl.java
...t/module/common/biz/service/impl/ContractServiceImpl.java
+16
-3
LinkageUnitServiceImpl.java
...odule/common/biz/service/impl/LinkageUnitServiceImpl.java
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/LinkageUnitDto.java
View file @
ea73776a
...
...
@@ -25,8 +25,8 @@ public class LinkageUnitDto extends BaseDto {
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
unitName
;
@ApiModelProperty
(
value
=
"单位
id
"
)
private
String
unit
Id
;
@ApiModelProperty
(
value
=
"单位
code
"
)
private
String
unit
Code
;
@ApiModelProperty
(
value
=
"父级单位id"
)
private
String
parentId
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/LinkageUnit.java
View file @
ea73776a
...
...
@@ -29,10 +29,10 @@ public class LinkageUnit extends BaseEntity {
private
String
unitName
;
/**
* 单位
id
* 单位
code
*/
@TableField
(
"unit_
id
"
)
private
String
unit
Id
;
@TableField
(
"unit_
code
"
)
private
String
unit
Code
;
/**
* 父级单位id
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/ContractController.java
View file @
ea73776a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
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.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.Date
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.ContractServiceImpl
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.ContractDto
;
...
...
@@ -41,7 +47,7 @@ public class ContractController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增维保合同"
,
notes
=
"新增维保合同"
)
public
ResponseModel
<
ContractDto
>
save
(
@RequestBody
ContractDto
model
)
throws
Exception
{
model
=
contractServiceImpl
.
saveContractDto
(
RequestContext
.
getAgencyCode
(),
model
);
model
=
contractServiceImpl
.
saveContractDto
(
RequestContext
.
getAgencyCode
(),
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
...
...
@@ -54,9 +60,10 @@ public class ContractController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新合同信息及附件"
,
notes
=
"更新合同信息及附件"
)
public
ResponseModel
<
ContractDto
>
updateBySequenceNbrContract
(
@RequestBody
ContractDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
throws
Exception
{
public
ResponseModel
<
ContractDto
>
updateBySequenceNbrContract
(
@RequestBody
ContractDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
throws
Exception
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
contractServiceImpl
.
updateAircraft
(
RequestContext
.
getAgencyCode
(),
model
));
return
ResponseHelper
.
buildResponse
(
contractServiceImpl
.
updateAircraft
(
RequestContext
.
getAgencyCode
(),
model
));
}
/**
...
...
@@ -69,7 +76,8 @@ public class ContractController extends BaseController {
@DeleteMapping
(
value
=
"/batch"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除合同信息 (无约束)"
,
notes
=
"删除合同信息 (无约束)"
)
public
ResponseModel
<
List
<
Long
>>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"ids"
)
String
ids
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
contractServiceImpl
.
multDeleteAircraft
(
RequestContext
.
getAgencyCode
(),
ids
));
return
ResponseHelper
.
buildResponse
(
contractServiceImpl
.
multDeleteAircraft
(
RequestContext
.
getAgencyCode
(),
ids
));
}
/**
...
...
@@ -80,9 +88,10 @@ public class ContractController extends BaseController {
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个维保合同"
,
notes
=
"查询单个维保合同"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个维保合同"
,
notes
=
"查询单个维保合同"
)
public
ResponseModel
<
ContractDto
>
selectOne
(
String
agencyCode
,
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
contractServiceImpl
.
queryByAircraftSeq
(
RequestContext
.
getAgencyCode
(),
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
contractServiceImpl
.
queryByAircraftSeq
(
RequestContext
.
getAgencyCode
(),
sequenceNbr
));
}
/**
...
...
@@ -94,13 +103,14 @@ public class ContractController extends BaseController {
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"维保合同分页查询"
,
notes
=
"维保合同分页查询"
)
public
ResponseModel
<
Page
<
ContractDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
siz
e
)
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"维保合同分页查询"
,
notes
=
"维保合同分页查询"
)
public
ResponseModel
<
Page
<
ContractDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
Long
companyId
,
String
name
,
Long
typeCode
,
Date
signedDat
e
)
{
Page
<
ContractDto
>
page
=
new
Page
<
ContractDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
contractServiceImpl
.
queryForContractPage
(
page
,
false
));
return
ResponseHelper
.
buildResponse
(
contractServiceImpl
.
queryForContractPage
(
page
,
false
,
companyId
,
name
,
typeCode
,
signedDate
));
}
/**
...
...
@@ -109,7 +119,7 @@ public class ContractController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"维保合同列表全部数据查询"
,
notes
=
"维保合同列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"维保合同列表全部数据查询"
,
notes
=
"维保合同列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
ContractDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
contractServiceImpl
.
queryForContractList
(
false
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/ContractServiceImpl.java
View file @
ea73776a
...
...
@@ -14,11 +14,14 @@ import org.typroject.tyboot.core.foundation.exception.BaseException;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.StringUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.DataNotFound
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -33,8 +36,12 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
/**
* 分页查询
*/
public
Page
<
ContractDto
>
queryForContractPage
(
Page
<
ContractDto
>
page
,
Boolean
isDelete
)
{
return
this
.
queryForPage
(
page
,
null
,
false
,
isDelete
);
public
Page
<
ContractDto
>
queryForContractPage
(
Page
<
ContractDto
>
page
,
Boolean
isDelete
,
@Condition
(
Operator
.
eq
)
Long
companyId
,
@Condition
(
Operator
.
like
)
String
name
,
@Condition
(
Operator
.
eq
)
Long
typeCode
,
@Condition
(
Operator
.
likeLeft
)
Date
signedDate
)
{
return
this
.
queryForPage
(
page
,
null
,
false
,
isDelete
,
companyId
,
name
,
typeCode
,
signedDate
);
}
/**
...
...
@@ -46,6 +53,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
/**
* 保存附件信息
*
* @param agencyCode
* @param attachments
* @param contractDto
...
...
@@ -71,6 +79,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
/**
* 保存附件
*
* @param agencyCode
* @param contractDto
* @return
...
...
@@ -95,6 +104,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
/**
* 保存合同信息
*
* @param agencyCode
* @param contractDto
* @return
...
...
@@ -105,12 +115,13 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
// 保存合同基本信息
contractDto
=
this
.
createWithModel
(
contractDto
);
// 保存附件信息
saveAircraftFile
(
agencyCode
,
contractDto
);
saveAircraftFile
(
agencyCode
,
contractDto
);
return
contractDto
;
}
/**
* 更新合同信息及附件
*
* @param agencyCode
* @param model
* @return
...
...
@@ -141,6 +152,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
/**
* 根据主键查询合同信息
*
* @param agencyCode
* @param seq
* @return
...
...
@@ -160,6 +172,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
/**
* 删除合同信息 (无约束)
*
* @param agencyCode
* @param ids
* @return
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/LinkageUnitServiceImpl.java
View file @
ea73776a
...
...
@@ -74,7 +74,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
Long
instanceId
=
dynamicFormInstanceService
.
commonSave
(
groupCode
,
map
);
linkageUnitDto
.
setInstanceId
(
instanceId
);
//2.保存基本信息
linkageUnitDto
.
setUnit
Id
(
getUnitCodeStr
());
linkageUnitDto
.
setUnit
Code
(
getUnitCodeStr
());
LinkageUnitDto
model
=
createWithModel
(
linkageUnitDto
);
//3.返回保存后的数据
return
model
;
...
...
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