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
5caa2e6d
Commit
5caa2e6d
authored
Jun 06, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加维保人员关联账户接口
parent
e15e6a5e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
9 deletions
+35
-9
MaintenanceCompanyMapper.java
...ot/module/common/api/mapper/MaintenanceCompanyMapper.java
+2
-0
IMaintenanceCompanyService.java
...module/common/api/service/IMaintenanceCompanyService.java
+2
-0
MaintenanceCompanyMapper.xml
...pi/src/main/resources/mapper/MaintenanceCompanyMapper.xml
+8
-0
MaintenanceCompanyController.java
...e/common/biz/controller/MaintenanceCompanyController.java
+15
-9
MaintenanceCompanyServiceImpl.java
...ommon/biz/service/impl/MaintenanceCompanyServiceImpl.java
+8
-0
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/mapper/MaintenanceCompanyMapper.java
View file @
5caa2e6d
...
...
@@ -33,4 +33,6 @@ public interface MaintenanceCompanyMapper extends BaseMapper<MaintenanceCompany>
List
<
MaintenanceCompany
>
findByCodeAndType
(
String
code
,
String
type
);
List
<
MaintenanceCompany
>
findByInstanceIdAndType
(
Long
instanceId
,
String
type
);
int
amosIdExist
(
String
amosId
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IMaintenanceCompanyService.java
View file @
5caa2e6d
...
...
@@ -170,4 +170,6 @@ public interface IMaintenanceCompanyService {
List
<
MaintenanceCompany
>
findPersonByAmosOrgId
(
String
code
,
String
userId
);
MaintenanceCompany
getOne
(
Long
parentId
);
Object
amosIdExist
(
String
amosId
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/MaintenanceCompanyMapper.xml
View file @
5caa2e6d
...
...
@@ -55,6 +55,14 @@ WHERE
</if>
</where>
</select>
<select
id=
"amosIdExist"
resultType=
"int"
>
select count(amos_org_id) from cb_maintenance_company where is_delete = 0 and amos_org_id = #{amosId}
</select>
<select
id=
"findByCodeAndType"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany"
>
SELECT
m.sequence_nbr,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/MaintenanceCompanyController.java
View file @
5caa2e6d
...
...
@@ -7,15 +7,7 @@ import javax.servlet.http.HttpServletRequest;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
...
@@ -90,6 +82,20 @@ public class MaintenanceCompanyController extends BaseController {
}
/**
* 判断关联账户是否已关联
*
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getAmosId/{amosId}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断关联账户是否已关联"
,
notes
=
"判断关联账户是否已关联"
)
public
ResponseModel
<
Object
>
getAmosId
(
@PathVariable
String
amosId
)
{
return
ResponseHelper
.
buildResponse
(
maintenanceCompanyService
.
amosIdExist
(
amosId
));
}
/**
* 检查员工编号是否已经存在,用于手动输入的员工编号校验
*
* @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/MaintenanceCompanyServiceImpl.java
View file @
5caa2e6d
...
...
@@ -391,6 +391,14 @@ public class MaintenanceCompanyServiceImpl
return
pegaIPage
;
}
public
Object
amosIdExist
(
String
amosId
)
{
int
num
=
maintenanceCompanyMapper
.
amosIdExist
(
amosId
);
if
(
num
>
0
)
{
return
false
;
}
return
true
;
}
@Override
public
IPage
<
Map
<
String
,
Object
>>
getPageMaintenanceList
(
Map
<
String
,
Object
>
paramsMap
)
{
if
(!
paramsMap
.
containsKey
(
"current"
)
&&
!
paramsMap
.
containsKey
(
"size"
))
{
...
...
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