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
b6685aaf
Commit
b6685aaf
authored
Nov 22, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交企业变更 及 变更审核逻辑代码
parent
445c198b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
92 additions
and
4 deletions
+92
-4
IUnitInfoChangeService.java
...ot/module/tzs/flc/api/service/IUnitInfoChangeService.java
+3
-0
IUnitInfoService.java
...mos/boot/module/tzs/flc/api/service/IUnitInfoService.java
+10
-0
ElevatorServiceImpl.java
...boot/module/tzs/biz/service/impl/ElevatorServiceImpl.java
+3
-2
BeanDtoVoUtils.java
...eejoin/amos/boot/module/tzs/biz/utils/BeanDtoVoUtils.java
+1
-0
UnitInfoController.java
...oot/module/tzs/flc/biz/controller/UnitInfoController.java
+47
-2
UnitInfoChangeServiceImpl.java
...e/tzs/flc/biz/service/impl/UnitInfoChangeServiceImpl.java
+28
-0
UnitInfoServiceImpl.java
.../module/tzs/flc/biz/service/impl/UnitInfoServiceImpl.java
+0
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/service/IUnitInfoChangeService.java
View file @
b6685aaf
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
api
.
service
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
/**
* 企业信息变更表接口类
*
...
...
@@ -9,4 +11,5 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service;
*/
public
interface
IUnitInfoChangeService
{
UnitInfoDto
findLastChangInfo
(
Long
sourceId
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/service/IUnitInfoService.java
View file @
b6685aaf
...
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfoChange
;
/**
* 企业信息表接口类
...
...
@@ -21,5 +23,13 @@ public interface IUnitInfoService {
UnitInfoDto
getDtoById
(
Long
sequenceNbr
);
UnitInfoDto
getUnItDtoById
(
Long
sequenceNbr
);
UnitInfoDto
unitInfoToDto
(
UnitInfo
source
);
UnitInfoDto
unitChangeInfoToDto
(
UnitInfoChange
source
);
UnitInfoDto
getDtoByOrgId
(
Long
sequenceNbr
);
UnitInfoDto
changeUnInfo
(
UnitInfoDto
model
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/ElevatorServiceImpl.java
View file @
b6685aaf
...
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
import
com.yeejoin.amos.boot.module.tzs.api.entity.ElevatorInsure
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.ElevatorInsureRelation
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.ElevatorMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IElevatorInsureRelationService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IElevatorService
;
...
...
@@ -209,8 +210,8 @@ public class ElevatorServiceImpl extends BaseService<ElevatorDto, Elevator, Elev
temp
.
setType
(
"image"
);
temp
.
setUrl
(
filePath
);
qrCode
.
add
(
temp
);
Map
<
String
,
List
<
AttachmentDto
>>
attachmentMap
=
new
HashMap
<>(
);
attachmentMap
.
put
(
"qrCode"
,
qrCode
);
Map
<
String
,
List
<
AttachmentDto
>>
attachmentMap
=
sourceFileService
.
getAttachments
(
elevatorId
);
attachmentMap
.
put
(
TzsCommonParam
.
QR_CODE
,
qrCode
);
sourceFileService
.
saveAttachments
(
elevatorId
,
attachmentMap
);
return
filePath
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/utils/BeanDtoVoUtils.java
View file @
b6685aaf
...
...
@@ -267,6 +267,7 @@ public class BeanDtoVoUtils {
}
target
.
setFullAddress
(
item
.
getProvince
()
+
item
.
getCity
()
+
item
.
getDistrict
()
+
item
.
getStree
()
+
item
.
getCommunity
()
+
item
.
getAddress
());
target
.
setAdminLoginPwd
(
null
);
return
target
;
}
catch
(
Exception
e
)
{
return
null
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/UnitInfoController.java
View file @
b6685aaf
...
...
@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo
;
import
com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.UnitInfoChangeServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.UnitInfoServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
...
...
@@ -81,6 +82,9 @@ public class UnitInfoController extends BaseController {
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
@Autowired
UnitInfoChangeServiceImpl
unitInfoChangeServiceImpl
;
/**
* 获取组织机构树
*
...
...
@@ -256,7 +260,7 @@ public class UnitInfoController extends BaseController {
if
(
ValidationUtil
.
isEmpty
(
sequenceNbr
)
)
{
throw
new
BadRequest
(
"参数校验失败."
);
}
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
getDtoById
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
get
UnIt
DtoById
(
sequenceNbr
));
}
...
...
@@ -395,7 +399,14 @@ public class UnitInfoController extends BaseController {
for
(
CompanyModel
c
:
companys
)
{
OrgUsr
temp
=
iOrgUsrService
.
getOne
(
new
LambdaQueryWrapper
<
OrgUsr
>().
eq
(
OrgUsr:
:
getIsDelete
,
false
).
eq
(
OrgUsr:
:
getAmosOrgId
,
c
.
getSequenceNbr
()));
if
(
temp
!=
null
)
{
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
getDtoByOrgId
(
temp
.
getSequenceNbr
()));
// 企业信息查看判断是否变更 如果变更信息则返回变更中信息
result
=
unitInfoServiceImpl
.
getDtoByOrgId
(
temp
.
getSequenceNbr
());
if
(
result
.
getIsChange
()
&&
result
.
getUnitStatus
()
==
0
)
{
result
=
unitInfoChangeServiceImpl
.
findLastChangInfo
(
temp
.
getSequenceNbr
());
}
return
ResponseHelper
.
buildResponse
(
result
);
}
}
return
ResponseHelper
.
buildResponse
(
result
);
...
...
@@ -403,4 +414,38 @@ public class UnitInfoController extends BaseController {
/**
* 变更企业表
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/change"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"变更企业表"
,
notes
=
"变更企业表"
)
public
ResponseModel
<
UnitInfoDto
>
change
(
@RequestBody
UnitInfoDto
model
)
{
model
=
unitInfoServiceImpl
.
changeUnInfo
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 查询审批数据
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/approve/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询审批数据"
,
notes
=
"查询审批数据"
)
public
ResponseModel
<
UnitInfoDto
>
getApproveInfo
(
@PathVariable
Long
sequenceNbr
)
{
if
(
ValidationUtil
.
isEmpty
(
sequenceNbr
)
)
{
throw
new
BadRequest
(
"参数校验失败."
);
}
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
getDtoById
(
sequenceNbr
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/UnitInfoChangeServiceImpl.java
View file @
b6685aaf
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoChangeDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfoChange
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.mapper.UnitInfoChangeMapper
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.service.IUnitInfoChangeService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.service.IUnitInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.List
;
...
...
@@ -18,6 +23,10 @@ import java.util.List;
*/
@Service
public
class
UnitInfoChangeServiceImpl
extends
BaseService
<
UnitInfoChangeDto
,
UnitInfoChange
,
UnitInfoChangeMapper
>
implements
IUnitInfoChangeService
{
@Autowired
IUnitInfoService
iUnitInfoService
;
/**
* 分页查询
*/
...
...
@@ -31,4 +40,22 @@ public class UnitInfoChangeServiceImpl extends BaseService<UnitInfoChangeDto, Un
public
List
<
UnitInfoChangeDto
>
queryForFlcUnitInfoChangeList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 根据源码id 返回最新的变更记录
* @param sourceId
* @return
*/
@Override
public
UnitInfoDto
findLastChangInfo
(
Long
sourceId
)
{
UnitInfoChange
result
;
List
<
UnitInfoChange
>
changInfoList
=
this
.
list
(
new
LambdaQueryWrapper
<
UnitInfoChange
>().
eq
(
UnitInfoChange:
:
getIsDelete
,
false
).
eq
(
UnitInfoChange:
:
getSourceId
,
sourceId
).
orderByDesc
(
UnitInfoChange:
:
getRecDate
));
if
(
changInfoList
!=
null
&&
changInfoList
.
size
()
>
0
)
{
result
=
changInfoList
.
get
(
0
);
}
else
{
throw
new
BadRequest
(
"未找到变更记录"
);
}
return
iUnitInfoService
.
unitChangeInfoToDto
(
result
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/UnitInfoServiceImpl.java
View file @
b6685aaf
This diff is collapsed.
Click to expand it.
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