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
2bd57061
Commit
2bd57061
authored
Nov 22, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
9bb1742a
b6685aaf
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
142 additions
and
67 deletions
+142
-67
RuleTypeEnum.java
.../com/yeejoin/amos/boot/biz/common/enums/RuleTypeEnum.java
+2
-2
IFirefightersService.java
.../boot/module/common/api/service/IFirefightersService.java
+0
-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
FirefightersServiceImpl.java
...dule/common/biz/service/impl/FirefightersServiceImpl.java
+1
-2
FirefightersController.java
...oot/module/jcs/biz/controller/FirefightersController.java
+41
-54
UserController.java
...ejoin/amos/patrol/business/controller/UserController.java
+0
-0
MsgRo.java
...main/java/com/yeejoin/amos/patrol/business/dto/MsgRo.java
+4
-1
RulePlanService.java
...in/amos/patrol/business/service/impl/RulePlanService.java
+2
-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-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/enums/RuleTypeEnum.java
View file @
2bd57061
...
...
@@ -11,8 +11,8 @@ public enum RuleTypeEnum {
// 防火监督
计划提交
(
"计划提交"
,
"addPlan"
,
"auditPage"
,
RuleConstant
.
WEB
,
RuleConstant
.
TASK
),
计划审核
(
"计划审核"
,
"planAudit"
,
"auditPage"
,
RuleConstant
.
APP_WEB
,
RuleConstant
.
TASK
),
计划审核完成
(
"计划审核完成"
,
"planAuditAll"
,
"formulatePage"
,
RuleConstant
.
APP_WEB
,
RuleConstant
.
NOTIFY
),
计划审核
(
"计划审核"
,
"planAudit"
,
"auditPage"
,
RuleConstant
.
APP_WEB
,
RuleConstant
.
NOTIFY
),
计划审核完成
(
"计划审核完成"
,
"planAuditAll"
,
"formulatePage"
,
RuleConstant
.
APP_WEB
,
RuleConstant
.
TASK
),
计划生成
(
"计划生成"
,
"addPlanTask"
,
null
,
RuleConstant
.
APP
,
RuleConstant
.
TASK
),
计划完成
(
"计划完成"
,
"planCompleted"
,
null
,
RuleConstant
.
APP_WEB
,
RuleConstant
.
NOTIFY
),
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IFirefightersService.java
View file @
2bd57061
...
...
@@ -29,10 +29,6 @@ public interface IFirefightersService {
void
saveFirefighters
(
FirefightersInfoDto
firefighters
);
Firefighters
selectByAmosOrgId
(
Long
id
);
}
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 @
2bd57061
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 @
2bd57061
...
...
@@ -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-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FirefightersServiceImpl.java
View file @
2bd57061
...
...
@@ -89,14 +89,13 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
@Override
public
Firefighters
selectByAmosOrgId
(
Long
id
)
{
QueryWrapper
<
Firefighters
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"amos_user_id"
,
id
);
Firefighters
firefighters
=
firefightersMapper
.
selectOne
(
queryWrapper
);
return
firefighters
;
}
/**
* 导出列表
*/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersController.java
View file @
2bd57061
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireTeamServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
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
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -35,6 +7,8 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
...
@@ -42,23 +16,29 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersInfoDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersZhDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.Firefighters
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersContacts
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersContract
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersEducation
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersJacket
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersPost
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersThought
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersContactsServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersContractServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersEducationServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersPostServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersThoughtServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.entity.*
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireTeamServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirefightersJacketServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
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.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
/**
* 消防队员
...
...
@@ -107,7 +87,7 @@ public class FirefightersController extends BaseController {
public
ResponseModel
<
FirefightersInfoDto
>
saveFirefighters
(
@RequestBody
FirefightersInfoDto
firefighters
)
{
try
{
/*3184 消防人员,编辑页面岗位选择子分类保存成功后,概要中岗位未修改 chenzhao start 2021-10-19*/
if
(
firefighters
.
getFirefighters
().
getJobTitleCode
()
!=
null
&&
!
firefighters
.
getFirefighters
().
getJobTitleCode
().
equals
(
""
))
{
if
(
firefighters
.
getFirefighters
().
getJobTitleCode
()
!=
null
&&
!
firefighters
.
getFirefighters
().
getJobTitleCode
().
equals
(
""
))
{
DataDictionary
gwmc
=
dataDictionaryService
.
getByCode
(
firefighters
.
getFirefighters
().
getJobTitleCode
(),
"GWMC"
);
firefighters
.
getFirefighters
().
setJobTitle
(
gwmc
.
getName
());
}
...
...
@@ -132,8 +112,8 @@ public class FirefightersController extends BaseController {
@Transactional
public
ResponseModel
<
Object
>
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
//BUG 2761 判断人员删除时的逻辑 如果被选为队伍联系人则无法被删除 bykongfm
List
fireTeam
=
iFireTeamService
.
list
(
new
LambdaQueryWrapper
<
FireTeam
>().
eq
(
FireTeam:
:
getIsDelete
,
false
).
eq
(
FireTeam:
:
getContactUserId
,
id
));
if
(
fireTeam
.
size
()
>
0
)
{
List
fireTeam
=
iFireTeamService
.
list
(
new
LambdaQueryWrapper
<
FireTeam
>().
eq
(
FireTeam:
:
getIsDelete
,
false
).
eq
(
FireTeam:
:
getContactUserId
,
id
));
if
(
fireTeam
.
size
()
>
0
)
{
return
ResponseHelper
.
buildResponse
(
"-1"
);
}
QueryWrapper
<
FirefightersJacket
>
queryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -181,17 +161,17 @@ public class FirefightersController extends BaseController {
try
{
Firefighters
firefighter
=
firefighters
.
getFirefighters
();
// BUG2168 居住地户籍所在地为空判断 bykongfm
if
(
firefighter
.
getResidenceDetails
()
!=
null
)
{
if
(
firefighter
.
getResidenceDetails
()
!=
null
)
{
FeignClientResult
<
RegionModel
>
region
=
Systemctl
.
regionClient
.
getRegion
(
Long
.
parseLong
(
firefighter
.
getResidenceDetails
()));
firefighter
.
setResidence
(
region
.
getResult
().
getRegionName
());
}
/*3184 消防人员,编辑页面岗位选择子分类保存成功后,概要中岗位未修改 chenzhao start 2021-10-19*/
if
(
firefighter
.
getJobTitleCode
()
!=
null
)
{
if
(
firefighter
.
getJobTitleCode
()
!=
null
)
{
DataDictionary
gwmc
=
dataDictionaryService
.
getByCode
(
firefighter
.
getJobTitleCode
(),
"GWMC"
);
firefighter
.
setJobTitle
(
gwmc
.
getName
());
}
/*3184 消防人员,编辑页面岗位选择子分类保存成功后,概要中岗位未修改 chenzhao end 2021-10-19*/
if
(
firefighter
.
getNativePlace
()
!=
null
)
{
if
(
firefighter
.
getNativePlace
()
!=
null
)
{
FeignClientResult
<
RegionModel
>
nativePlace
=
Systemctl
.
regionClient
.
getRegion
(
Long
.
parseLong
(
firefighter
.
getNativePlace
()));
firefighter
.
setNativePlaceValue
(
nativePlace
.
getResult
().
getRegionName
());
}
...
...
@@ -217,7 +197,6 @@ public class FirefightersController extends BaseController {
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
ResponseModel
<
Object
>
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
if
(
redisUtils
.
hasKey
(
RedisKey
.
FIREFIGHTERS_ID
+
id
))
{
Object
obj
=
redisUtils
.
get
(
RedisKey
.
FIREFIGHTERS_ID
+
id
);
return
ResponseHelper
.
buildResponse
(
obj
);
...
...
@@ -233,6 +212,19 @@ public class FirefightersController extends BaseController {
}
/**
* 根据amos ID查询
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getFirefighterByAmosUserId"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据AmosId查询"
,
notes
=
"根据AmosId查询"
)
public
ResponseModel
<
Object
>
selectByAmosId
()
{
Firefighters
firefighters
=
iFirefightersService
.
selectByAmosOrgId
(
Long
.
valueOf
(
getUserId
()));
return
ResponseHelper
.
buildResponse
(
firefighters
);
}
/**
* 列表详情展示
*/
...
...
@@ -332,9 +324,4 @@ public class FirefightersController extends BaseController {
List
<
Menu
>
menus
=
iFirefightersService
.
getFirefightersJobTitleCount
();
return
ResponseHelper
.
buildResponse
(
menus
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/UserController.java
View file @
2bd57061
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dto/MsgRo.java
View file @
2bd57061
...
...
@@ -15,7 +15,7 @@ import java.util.Map;
@RuleFact
(
value
=
"消防巡查"
,
project
=
"消息规则"
)
public
class
MsgRo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4210693601552557441
L
;
private
static
final
long
serialVersionUID
=
-
2766051871044757100
L
;
@Label
(
"名称"
)
private
String
name
;
...
...
@@ -47,4 +47,7 @@ public class MsgRo implements Serializable {
@Label
(
value
=
"扩展参数"
)
private
Map
<
String
,
String
>
extras
;
@Label
(
value
=
"类别"
)
private
Integer
category
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/RulePlanService.java
View file @
2bd57061
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
service
.
impl
;
import
com.yeejoin.amos.boot.biz.common.constants.RuleConstant
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.patrol.business.dto.MsgRo
;
import
com.yeejoin.amos.patrol.business.param.PushMsgParam
;
...
...
@@ -38,6 +39,7 @@ public class RulePlanService {
msgRo
.
setExtras
(
pushMsgParam
.
getExtras
());
msgRo
.
setIsSendApp
(
true
);
msgRo
.
setIsSendWeb
(
true
);
msgRo
.
setCategory
(
RuleConstant
.
NOTIFY
);
//触发规则
try
{
ruleTrigger
.
publish
(
msgRo
,
packageId
,
new
String
[
0
]);
...
...
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 @
2bd57061
...
...
@@ -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 @
2bd57061
...
...
@@ -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 @
2bd57061
...
...
@@ -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 @
2bd57061
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 @
2bd57061
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