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
5245ac50
Commit
5245ac50
authored
Oct 12, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
两员配备需求修改
parent
fd724fd3
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
150 additions
and
35 deletions
+150
-35
TzsUserInfoDto.java
.../yeejoin/amos/boot/module/tcm/api/dto/TzsUserInfoDto.java
+7
-0
TzsUserInfo.java
.../yeejoin/amos/boot/module/tcm/api/entity/TzsUserInfo.java
+7
-0
TzsUserInfoMapper.java
...in/amos/boot/module/tcm/api/mapper/TzsUserInfoMapper.java
+3
-0
ITzsUserInfoService.java
...amos/boot/module/tcm/api/service/ITzsUserInfoService.java
+3
-1
TzsUserInfoVo.java
...om/yeejoin/amos/boot/module/tcm/api/vo/TzsUserInfoVo.java
+7
-0
TzsUserInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+22
-2
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+24
-15
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+42
-2
TzsUserEquipServiceImpl.java
.../module/tcm/biz/service/impl/TzsUserEquipServiceImpl.java
+1
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+34
-15
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/dto/TzsUserInfoDto.java
View file @
5245ac50
...
@@ -76,4 +76,11 @@ public class TzsUserInfoDto extends BaseDto {
...
@@ -76,4 +76,11 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"平台账号锁定状态"
)
@ApiModelProperty
(
value
=
"平台账号锁定状态"
)
private
String
lockStatus
;
private
String
lockStatus
;
@ApiModelProperty
(
value
=
"设备类型"
)
private
String
equipType
;
@ApiModelProperty
(
value
=
"设备绑定状态"
)
private
String
state
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/entity/TzsUserInfo.java
View file @
5245ac50
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
entity
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
@@ -137,4 +138,10 @@ public class TzsUserInfo extends BaseEntity {
...
@@ -137,4 +138,10 @@ public class TzsUserInfo extends BaseEntity {
*/
*/
@TableField
(
"lock_status"
)
@TableField
(
"lock_status"
)
private
String
lockStatus
;
private
String
lockStatus
;
/**
* 设备类型
*/
@TableField
(
value
=
"equip_type"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
equipType
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/mapper/TzsUserInfoMapper.java
View file @
5245ac50
...
@@ -8,11 +8,14 @@ import com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo;
...
@@ -8,11 +8,14 @@ import com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
public
interface
TzsUserInfoMapper
extends
BaseMapper
<
TzsUserInfo
>
{
public
interface
TzsUserInfoMapper
extends
BaseMapper
<
TzsUserInfo
>
{
Page
<
TzsUserInfoDto
>
selectPageMessage
(
@Param
(
"page"
)
Page
<
TzsUserInfoDto
>
page
,
@Param
(
"dto"
)
TzsUserInfoDto
dto
);
Page
<
TzsUserInfoDto
>
selectPageMessage
(
@Param
(
"page"
)
Page
<
TzsUserInfoDto
>
page
,
@Param
(
"dto"
)
TzsUserInfoDto
dto
);
List
<
Map
<
String
,
Object
>>
getUserType
(
@Param
(
"unitType"
)
String
unitType
);
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
);
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
);
Page
<
TzsEquipListDto
>
getAllEquipList
(
@Param
(
"page"
)
Page
<
TzsEquipListDto
>
page
,
Page
<
TzsEquipListDto
>
getAllEquipList
(
@Param
(
"page"
)
Page
<
TzsEquipListDto
>
page
,
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/ITzsUserInfoService.java
View file @
5245ac50
...
@@ -28,11 +28,13 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
...
@@ -28,11 +28,13 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
List
<
Map
<
String
,
Object
>>
getEquipmentType
(
String
creditCode
);
List
<
Map
<
String
,
Object
>>
getEquipmentType
(
String
creditCode
);
List
<
Map
<
String
,
Object
>>
getUserType
(
String
unitType
);
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
);
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
);
Map
<
String
,
Object
>
getCompanyType
();
Map
<
String
,
Object
>
getCompanyType
();
Page
<
TzsEquipListDto
>
getEquipList
(
String
type
,
String
userSeq
,
TzsEquipListDto
dto
,
Page
<
TzsEquipListDto
>
page
);
Page
<
TzsEquipListDto
>
getEquipList
(
String
type
,
String
userSeq
,
TzsEquipListDto
dto
,
Page
<
TzsEquipListDto
>
page
);
Boolean
equipBind
(
String
type
,
String
userSeq
,
Map
<
String
,
Object
>
map
);
Boolean
equipBind
(
String
type
,
String
userSeq
,
String
creditCode
,
Map
<
String
,
Object
>
map
);
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/vo/TzsUserInfoVo.java
View file @
5245ac50
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tcm.api.vo;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tcm.api.vo;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -114,4 +115,10 @@ public class TzsUserInfoVo {
...
@@ -114,4 +115,10 @@ public class TzsUserInfoVo {
*/
*/
@TableField
(
"lock_status"
)
@TableField
(
"lock_status"
)
private
String
lockStatus
;
private
String
lockStatus
;
/**
* 设备类型
*/
@ApiModelProperty
(
value
=
"设备类型"
)
private
JSONArray
equipType
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
5245ac50
...
@@ -21,7 +21,9 @@
...
@@ -21,7 +21,9 @@
CASE
CASE
WHEN gender = 1 THEN
WHEN gender = 1 THEN
'男' ELSE '女'
'男' ELSE '女'
END AS gender
END AS gender,
unit_code,
case when (SELECT count(1) from tzs_user_equip WHERE user_seq = sequence_nbr )>0 then '是' else '否' END as state
FROM
FROM
tzs_user_info
tzs_user_info
<where>
<where>
...
@@ -46,7 +48,13 @@
...
@@ -46,7 +48,13 @@
and amos_user_name like concat('%',#{dto.amosUserName},'%')
and amos_user_name like concat('%',#{dto.amosUserName},'%')
</if>
</if>
<if
test=
"dto.postName != '' and dto.postName != null"
>
<if
test=
"dto.postName != '' and dto.postName != null"
>
and post_name like concat('%',#{dto.postName},'%')
and post like concat('%',#{dto.postName},'%')
</if>
<if
test=
"dto.state != null and dto.state == 1 "
>
and sequence_nbr in (SELECT DISTINCT(user_seq) from tzs_user_equip)
</if>
<if
test=
"dto.state != null and dto.state == 0 "
>
and sequence_nbr not in (SELECT DISTINCT(user_seq) from tzs_user_equip)
</if>
</if>
</where>
</where>
order by rec_date desc
order by rec_date desc
...
@@ -128,4 +136,15 @@
...
@@ -128,4 +136,15 @@
AND ibjui."SEQUENCE_NBR" NOT IN (SELECT DISTINCT equip_id FROM tzs_user_equip WHERE credit_code = #{companyCode} )
AND ibjui."SEQUENCE_NBR" NOT IN (SELECT DISTINCT equip_id FROM tzs_user_equip WHERE credit_code = #{companyCode} )
</if>
</if>
</select>
</select>
<select
id=
"getUserType"
resultType=
"java.util.Map"
>
SELECT * FROM "cb_data_dictionary"
WHERE
<if
test=
"unitType != null and unitType != ''"
>
type = 'QYRYGW' or type = #{unitType}
</if>
<if
test=
"unitType == null or unitType == ''"
>
type like concat('QYRYGW','%')
</if>
</select>
</mapper>
</mapper>
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzsUserInfoController.java
View file @
5245ac50
...
@@ -20,6 +20,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
...
@@ -20,6 +20,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -65,14 +66,14 @@ public class TzsUserInfoController extends BaseController {
...
@@ -65,14 +66,14 @@ public class TzsUserInfoController extends BaseController {
tzsUserInfo
.
setUnitName
(
companyModel
.
getCompanyName
());
tzsUserInfo
.
setUnitName
(
companyModel
.
getCompanyName
());
tzsUserInfo
.
setUnitCode
(
companyModel
.
getCompanyCode
());
tzsUserInfo
.
setUnitCode
(
companyModel
.
getCompanyCode
());
tzsUserInfo
.
setRecDate
(
new
Date
());
tzsUserInfo
.
setRecDate
(
new
Date
());
Map
<
String
,
Object
>
qualificationsInfo
=
(
Map
<
String
,
Object
>)
map
.
get
(
"qualificationsInfo"
);
//
Map<String, Object> qualificationsInfo = (Map<String, Object>)map.get("qualificationsInfo");
Object
subForm
=
qualificationsInfo
.
get
(
"subForm"
);
//
Object subForm = qualificationsInfo.get("subForm");
List
<
TzsUserQualifications
>
list
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
subForm
),
TzsUserQualifications
.
class
);
//
List<TzsUserQualifications> list = JSON.parseArray(JSON.toJSONString(subForm), TzsUserQualifications.class);
tzsUserInfo
.
setPostName
(
tzsUserInfoServiceImpl
.
setPostName
(
tzsUserInfo
.
getPost
()));
tzsUserInfo
.
setPostName
(
tzsUserInfoServiceImpl
.
setPostName
(
tzsUserInfo
.
getPost
()));
tzsUserInfo
=
tzsUserInfoServiceImpl
.
createWithModel
(
tzsUserInfo
);
tzsUserInfo
=
tzsUserInfoServiceImpl
.
createWithModel
(
tzsUserInfo
);
if
(!
ObjectUtils
.
isEmpty
(
list
)){
//
if (!ObjectUtils.isEmpty(list)){
tzsUserInfoService
.
addQualificationsMessage
(
String
.
valueOf
(
tzsUserInfo
.
getSequenceNbr
()),
list
);
//
tzsUserInfoService.addQualificationsMessage(String.valueOf(tzsUserInfo.getSequenceNbr()),list);
}
//
}
return
ResponseHelper
.
buildResponse
(
tzsUserInfo
);
return
ResponseHelper
.
buildResponse
(
tzsUserInfo
);
}
}
...
@@ -94,16 +95,16 @@ public class TzsUserInfoController extends BaseController {
...
@@ -94,16 +95,16 @@ public class TzsUserInfoController extends BaseController {
}
}
tzsUserInfo
.
setUnitName
(
companyModel
.
getCompanyName
());
tzsUserInfo
.
setUnitName
(
companyModel
.
getCompanyName
());
tzsUserInfo
.
setUnitCode
(
companyModel
.
getCompanyCode
());
tzsUserInfo
.
setUnitCode
(
companyModel
.
getCompanyCode
());
Map
<
String
,
Object
>
qualificationsInfo
=
(
Map
<
String
,
Object
>)
map
.
get
(
"qualificationsInfo"
);
//
Map<String, Object> qualificationsInfo = (Map<String, Object>)map.get("qualificationsInfo");
Object
subForm
=
qualificationsInfo
.
get
(
"subForm"
);
//
Object subForm = qualificationsInfo.get("subForm");
List
<
TzsUserQualifications
>
list
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
subForm
),
TzsUserQualifications
.
class
);
//
List<TzsUserQualifications> list = JSON.parseArray(JSON.toJSONString(subForm), TzsUserQualifications.class);
tzsUserInfo
.
setSequenceNbr
(
rowId
);
tzsUserInfo
.
setSequenceNbr
(
rowId
);
tzsUserInfo
.
setRecDate
(
new
Date
());
tzsUserInfo
.
setRecDate
(
new
Date
());
tzsUserInfo
.
setPostName
(
tzsUserInfoServiceImpl
.
setPostName
(
tzsUserInfo
.
getPost
()));
tzsUserInfo
.
setPostName
(
tzsUserInfoServiceImpl
.
setPostName
(
tzsUserInfo
.
getPost
()));
tzsUserInfoServiceImpl
.
updateById
(
tzsUserInfo
);
tzsUserInfoServiceImpl
.
updateById
(
tzsUserInfo
);
if
(!
ObjectUtils
.
isEmpty
(
list
)){
//
if (!ObjectUtils.isEmpty(list)){
tzsUserInfoService
.
updateQualificationsMessage
(
String
.
valueOf
(
tzsUserInfo
.
getSequenceNbr
()),
list
);
//
tzsUserInfoService.updateQualificationsMessage(String.valueOf(tzsUserInfo.getSequenceNbr()),list);
}
//
}
return
ResponseHelper
.
buildResponse
(
tzsUserInfo
);
return
ResponseHelper
.
buildResponse
(
tzsUserInfo
);
}
}
...
@@ -191,10 +192,17 @@ public class TzsUserInfoController extends BaseController {
...
@@ -191,10 +192,17 @@ public class TzsUserInfoController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据单位类型获取人员类型"
,
notes
=
"根据单位类型获取人员类型"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUserType
(
@RequestParam
(
value
=
"unitType"
)
String
unitType
)
{
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
getUserType
(
unitType
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getEquipList"
)
@GetMapping
(
value
=
"/getEquipList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备查询(可绑定、可解绑)"
,
notes
=
"设备查询(可绑定、可解绑)"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备查询(可绑定、可解绑)"
,
notes
=
"设备查询(可绑定、可解绑)"
)
public
ResponseModel
<
IPage
<
TzsEquipListDto
>>
getEquipList
(
@RequestParam
(
value
=
"type"
)
String
type
,
public
ResponseModel
<
IPage
<
TzsEquipListDto
>>
getEquipList
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"userSeq"
)
String
userSeq
,
@RequestParam
(
value
=
"userSeq"
,
required
=
false
)
String
userSeq
,
@RequestParam
(
value
=
"current"
)
String
current
,
@RequestParam
(
value
=
"current"
)
String
current
,
@RequestParam
(
value
=
"size"
)
String
size
,
@RequestParam
(
value
=
"size"
)
String
size
,
TzsEquipListDto
dto
)
{
TzsEquipListDto
dto
)
{
...
@@ -207,11 +215,12 @@ public class TzsUserInfoController extends BaseController {
...
@@ -207,11 +215,12 @@ public class TzsUserInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@
Ge
tMapping
(
value
=
"/equipBind"
)
@
Pos
tMapping
(
value
=
"/equipBind"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备绑定解绑"
,
notes
=
"设备绑定解绑"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备绑定解绑"
,
notes
=
"设备绑定解绑"
)
public
ResponseModel
<
Boolean
>
equipBind
(
@RequestParam
(
value
=
"type"
)
String
type
,
public
ResponseModel
<
Boolean
>
equipBind
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"userSeq"
)
String
userSeq
,
@RequestParam
(
value
=
"userSeq"
)
String
userSeq
,
@RequestParam
(
value
=
"creditCode"
)
String
creditCode
,
@RequestBody
Map
<
String
,
Object
>
map
)
{
@RequestBody
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
equipBind
(
type
,
userSeq
,
map
));
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
equipBind
(
type
,
userSeq
,
creditCode
,
map
));
}
}
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
5245ac50
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tcm.biz.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tcm.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.alibaba.fastjson.TypeReference
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
@@ -15,7 +16,9 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.BaseUnitLicenceDto;
...
@@ -15,7 +16,9 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.BaseUnitLicenceDto;
import
com.yeejoin.amos.boot.module.tcm.api.dto.EquEnterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.EquEnterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.*
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.*
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.service.IBaseUnitLicenceService
;
import
com.yeejoin.amos.boot.module.tcm.api.service.IBaseUnitLicenceService
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzBaseEnterpriseInfoService
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzBaseEnterpriseInfoService
;
import
com.yeejoin.amos.boot.module.tcm.biz.utils.RedisUtil
;
import
com.yeejoin.amos.boot.module.tcm.biz.utils.RedisUtil
;
...
@@ -94,6 +97,9 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -94,6 +97,9 @@ public class TzBaseEnterpriseInfoServiceImpl
@Autowired
@Autowired
TzsBaseInstitutionServiceImpl
tzsBaseInstitutionService
;
TzsBaseInstitutionServiceImpl
tzsBaseInstitutionService
;
@Autowired
private
TzsUserInfoMapper
tzsUserInfoMapper
;
/**
/**
* 企业管理员变更缓存key前缀
* 企业管理员变更缓存key前缀
*/
*/
...
@@ -473,11 +479,16 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -473,11 +479,16 @@ public class TzBaseEnterpriseInfoServiceImpl
// //修改许可信息
// //修改许可信息
// List<BaseUnitLicence> licences = (List<BaseUnitLicence>) map.get("unitLicences");
// List<BaseUnitLicence> licences = (List<BaseUnitLicence>) map.get("unitLicences");
// baseUnitLicenceService.saveOrUpdateBatch(licences);
// baseUnitLicenceService.saveOrUpdateBatch(licences);
// 企业信息变更-同步修改企业下人员绑定设备类型
ArrayList
<
String
>
newData
=
new
ArrayList
<>();
JSONArray
objects
=
JSON
.
parseArray
(
tzBaseEnterpriseInfo
.
getEquipCategory
());
objects
.
forEach
(
item
->{
newData
.
add
(
item
.
toString
());
});
boolean
b
=
tzBaseEnterpriseInfoService
.
updateById
(
tzBaseEnterpriseInfo
);
boolean
b
=
tzBaseEnterpriseInfoService
.
updateById
(
tzBaseEnterpriseInfo
);
if
(
b
)
{
if
(
b
)
{
try
{
try
{
CompanyModel
updateModel
=
Privilege
.
companyClient
.
queryByCompanyCode
(
String
.
valueOf
(
map
.
get
(
"use
Unit
Code"
))).
getResult
();
CompanyModel
updateModel
=
Privilege
.
companyClient
.
queryByCompanyCode
(
String
.
valueOf
(
map
.
get
(
"useCode"
))).
getResult
();
HashMap
<
String
,
Object
>
parentMessage
=
(
HashMap
<
String
,
Object
>)
Privilege
.
companyClient
.
queryByOrgcode
(
String
.
valueOf
(
map
.
get
(
"superviseOrgCode"
))).
getResult
();
HashMap
<
String
,
Object
>
parentMessage
=
(
HashMap
<
String
,
Object
>)
Privilege
.
companyClient
.
queryByOrgcode
(
String
.
valueOf
(
map
.
get
(
"superviseOrgCode"
))).
getResult
();
// 目前平台返回key为compnay(存在拼写错误)
// 目前平台返回key为compnay(存在拼写错误)
CompanyModel
parentModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
parentMessage
.
get
(
"compnay"
)),
CompanyModel
.
class
);
CompanyModel
parentModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
parentMessage
.
get
(
"compnay"
)),
CompanyModel
.
class
);
...
@@ -486,6 +497,7 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -486,6 +497,7 @@ public class TzBaseEnterpriseInfoServiceImpl
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
"操作失败!"
);
throw
new
BadRequest
(
"操作失败!"
);
}
}
updateUserInfo
(
newData
,
String
.
valueOf
(
map
.
get
(
"useCode"
)));
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
=
new
TzBaseEnterpriseInfoDto
();
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
=
new
TzBaseEnterpriseInfoDto
();
BeanUtils
.
copyProperties
(
tzBaseEnterpriseInfo
,
tzBaseEnterpriseInfoDto
);
BeanUtils
.
copyProperties
(
tzBaseEnterpriseInfo
,
tzBaseEnterpriseInfoDto
);
return
tzBaseEnterpriseInfoDto
;
return
tzBaseEnterpriseInfoDto
;
...
@@ -495,6 +507,34 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -495,6 +507,34 @@ public class TzBaseEnterpriseInfoServiceImpl
}
}
private
void
updateUserInfo
(
ArrayList
<
String
>
newDate
,
String
creditCode
)
{
LambdaQueryWrapper
<
TzsUserInfo
>
lambda
=
new
QueryWrapper
<
TzsUserInfo
>().
lambda
();
lambda
.
eq
(
TzsUserInfo:
:
getUnitCode
,
creditCode
);
List
<
TzsUserInfo
>
tzsUserInfos
=
tzsUserInfoMapper
.
selectList
(
lambda
);
tzsUserInfos
.
forEach
(
item
->
{
boolean
update
=
false
;
JSONArray
objects
=
JSON
.
parseArray
(
item
.
getEquipType
());
ArrayList
<
String
>
oldDate
=
new
ArrayList
<>();
objects
.
forEach
(
itemTpe
->
{
oldDate
.
add
(
itemTpe
.
toString
());
});
for
(
Object
object
:
objects
)
{
if
(!
newDate
.
contains
(
object
))
{
update
=
true
;
oldDate
.
remove
(
object
.
toString
());
}
}
if
(
update
)
{
if
(!
ObjectUtils
.
isEmpty
(
oldDate
))
{
item
.
setEquipType
(
JSON
.
toJSONString
(
oldDate
));
}
else
{
item
.
setEquipType
(
null
);
}
tzsUserInfoMapper
.
updateById
(
item
);
}
});
}
@Override
@Override
public
String
setLabel
(
List
<
Long
>
enterpriseIds
,
List
<
String
>
enterpriseLabels
)
{
public
String
setLabel
(
List
<
Long
>
enterpriseIds
,
List
<
String
>
enterpriseLabels
)
{
List
<
TzBaseEnterpriseInfo
>
tzBaseEnterpriseInfos
=
tzBaseEnterpriseInfoMapper
.
selectBatchIds
(
enterpriseIds
);
List
<
TzBaseEnterpriseInfo
>
tzBaseEnterpriseInfos
=
tzBaseEnterpriseInfoMapper
.
selectBatchIds
(
enterpriseIds
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserEquipServiceImpl.java
View file @
5245ac50
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserEquipMapper;
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserEquipMapper;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzsUserEquipService
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzsUserEquipService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
@Service
@Service
public
class
TzsUserEquipServiceImpl
extends
BaseService
<
TzsUserEquipDto
,
TzsUserEquip
,
TzsUserEquipMapper
>
implements
ITzsUserEquipService
{
public
class
TzsUserEquipServiceImpl
extends
BaseService
<
TzsUserEquipDto
,
TzsUserEquip
,
TzsUserEquipMapper
>
implements
ITzsUserEquipService
{
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
5245ac50
...
@@ -84,7 +84,9 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -84,7 +84,9 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
tzsUserInfoDtoPage
.
getRecords
().
forEach
(
item
->
{
tzsUserInfoDtoPage
.
getRecords
().
forEach
(
item
->
{
if
(!
ObjectUtils
.
isEmpty
(
item
.
getProfile
()))
{
if
(!
ObjectUtils
.
isEmpty
(
item
.
getProfile
()))
{
List
<
CommonFile
>
commonFiles
=
JSON
.
parseArray
(
item
.
getProfile
(),
CommonFile
.
class
);
List
<
CommonFile
>
commonFiles
=
JSON
.
parseArray
(
item
.
getProfile
(),
CommonFile
.
class
);
item
.
setProfile
(
commonFiles
.
get
(
0
).
getUrl
());
if
(!
ObjectUtils
.
isEmpty
(
commonFiles
)){
item
.
setProfile
(
commonFiles
.
get
(
0
).
getUrl
());
}
}
}
if
(!
ObjectUtils
.
isEmpty
(
item
.
getBirthday
()))
{
if
(!
ObjectUtils
.
isEmpty
(
item
.
getBirthday
()))
{
int
age
=
getAge
(
item
.
getBirthday
());
int
age
=
getAge
(
item
.
getBirthday
());
...
@@ -174,22 +176,25 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -174,22 +176,25 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if
(!
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getPost
()))
{
if
(!
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getPost
()))
{
tzsUserInfoVo
.
setPost
(
JSON
.
parseArray
(
tzsUserInfo
.
getPost
()));
tzsUserInfoVo
.
setPost
(
JSON
.
parseArray
(
tzsUserInfo
.
getPost
()));
}
}
if
(!
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getEquipType
()))
{
tzsUserInfoVo
.
setEquipType
(
JSON
.
parseArray
(
tzsUserInfo
.
getEquipType
()));
}
tzsUserInfoVo
.
setIdentification
(
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getIdentification
())
?
new
ArrayList
()
:
JSON
.
parseArray
(
tzsUserInfo
.
getIdentification
()));
tzsUserInfoVo
.
setIdentification
(
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getIdentification
())
?
new
ArrayList
()
:
JSON
.
parseArray
(
tzsUserInfo
.
getIdentification
()));
tzsUserInfoVo
.
setProfile
(
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getProfile
())
?
new
ArrayList
()
:
JSON
.
parseArray
(
tzsUserInfo
.
getProfile
()));
tzsUserInfoVo
.
setProfile
(
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getProfile
())
?
new
ArrayList
()
:
JSON
.
parseArray
(
tzsUserInfo
.
getProfile
()));
maps
.
put
(
"userInfo"
,
tzsUserInfoVo
);
maps
.
put
(
"userInfo"
,
tzsUserInfoVo
);
LambdaQueryWrapper
<
TzsUserQualifications
>
lambda
=
new
QueryWrapper
<
TzsUserQualifications
>().
lambda
();
//
LambdaQueryWrapper<TzsUserQualifications> lambda = new QueryWrapper<TzsUserQualifications>().lambda();
lambda
.
eq
(
TzsUserQualifications:
:
getUserInfoId
,
id
);
//
lambda.eq(TzsUserQualifications::getUserInfoId, id);
ArrayList
<
TzsUserQualificationsVo
>
tzsUserQualificationsVos
=
new
ArrayList
<>();
//
ArrayList<TzsUserQualificationsVo> tzsUserQualificationsVos = new ArrayList<>();
List
<
TzsUserQualifications
>
list
=
tzsUserQualificationsService
.
getBaseMapper
().
selectList
(
lambda
);
//
List<TzsUserQualifications> list = tzsUserQualificationsService.getBaseMapper().selectList(lambda);
list
.
forEach
(
item
->
{
//
list.forEach(item -> {
TzsUserQualificationsVo
vo
=
new
TzsUserQualificationsVo
();
//
TzsUserQualificationsVo vo = new TzsUserQualificationsVo();
BeanUtils
.
copyProperties
(
item
,
vo
,
"file"
);
//
BeanUtils.copyProperties(item, vo, "file");
vo
.
setFile
(
ObjectUtils
.
isEmpty
(
item
.
getFile
())
?
new
ArrayList
()
:
JSON
.
parseArray
(
item
.
getFile
()));
//
vo.setFile(ObjectUtils.isEmpty(item.getFile()) ? new ArrayList() : JSON.parseArray(item.getFile()));
tzsUserQualificationsVos
.
add
(
vo
);
//
tzsUserQualificationsVos.add(vo);
});
//
});
HashMap
<
String
,
Object
>
subForm
=
new
HashMap
<>();
//
HashMap<String, Object> subForm = new HashMap<>();
subForm
.
put
(
"subForm"
,
tzsUserQualificationsVos
);
//
subForm.put("subForm", tzsUserQualificationsVos);
maps
.
put
(
"qualificationsInfo"
,
subForm
);
//
maps.put("qualificationsInfo", subForm);
return
maps
;
return
maps
;
}
}
...
@@ -334,6 +339,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -334,6 +339,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if
(
companyModels
.
isEmpty
()){
if
(
companyModels
.
isEmpty
()){
return
result
;
return
result
;
}
}
result
.
put
(
"creditCode"
,
companyModels
.
get
(
0
).
getCompanyCode
());
boolean
productCompany
=
false
;
boolean
productCompany
=
false
;
boolean
useCompany
=
false
;
boolean
useCompany
=
false
;
for
(
CompanyModel
companyModel
:
companyModels
)
{
for
(
CompanyModel
companyModel
:
companyModels
)
{
...
@@ -372,7 +378,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -372,7 +378,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
@Override
@Override
public
Boolean
equipBind
(
String
type
,
String
userSeq
,
Map
<
String
,
Object
>
map
)
{
public
Boolean
equipBind
(
String
type
,
String
userSeq
,
String
creditCode
,
Map
<
String
,
Object
>
map
)
{
Object
recordList
=
map
.
get
(
"ids"
);
Object
recordList
=
map
.
get
(
"ids"
);
List
<
String
>
ids
=
(
List
<
String
>)
recordList
;
List
<
String
>
ids
=
(
List
<
String
>)
recordList
;
List
<
TzsUserEquip
>
tzsUserEquipList
=
new
ArrayList
<>();
List
<
TzsUserEquip
>
tzsUserEquipList
=
new
ArrayList
<>();
...
@@ -382,6 +388,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -382,6 +388,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
TzsUserEquip
tzsUserEquip
=
new
TzsUserEquip
();
TzsUserEquip
tzsUserEquip
=
new
TzsUserEquip
();
tzsUserEquip
.
setEquipId
(
equipId
);
tzsUserEquip
.
setEquipId
(
equipId
);
tzsUserEquip
.
setUserSeq
(
userSeq
);
tzsUserEquip
.
setUserSeq
(
userSeq
);
tzsUserEquip
.
setCreditCode
(
creditCode
);
tzsUserEquipList
.
add
(
tzsUserEquip
);
tzsUserEquipList
.
add
(
tzsUserEquip
);
}
}
flag
=
tzsUserEquipService
.
saveBatch
(
tzsUserEquipList
);
flag
=
tzsUserEquipService
.
saveBatch
(
tzsUserEquipList
);
...
@@ -391,4 +398,16 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -391,4 +398,16 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
return
flag
;
return
flag
;
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
getUserType
(
String
unitType
)
{
if
(
unitType
.
equals
(
"pro"
)){
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SCDW"
);
}
else
if
(
unitType
.
equals
(
"use"
)){
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SYDW"
);
}
else
{
return
tzsUserInfoMapper
.
getUserType
(
null
);
}
}
}
}
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