问题修改
This commit is contained in:
parent
1fd63a2a9c
commit
b9ab775fab
|
|
@ -161,7 +161,11 @@
|
||||||
<artifactId>dom4j</artifactId>
|
<artifactId>dom4j</artifactId>
|
||||||
<version>1.6.1</version>
|
<version>1.6.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>org.redisson</groupId>
|
||||||
|
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||||
|
<version>3.10.6</version>
|
||||||
|
</dependency>-->
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ public class BusinessConstants {
|
||||||
public static final int TYPE2 = 2;
|
public static final int TYPE2 = 2;
|
||||||
public static final int TYPE3 = 0;
|
public static final int TYPE3 = 0;
|
||||||
public static final Long PARENT_ID = 0L;
|
public static final Long PARENT_ID = 0L;
|
||||||
|
public static final String PARENT_ID_STR = "0";
|
||||||
|
public static final String PARENT_ID_STR2 = "-1";
|
||||||
public static final Integer LEVEL = 4;
|
public static final Integer LEVEL = 4;
|
||||||
public static final Integer LEVEL1 = 1;
|
public static final Integer LEVEL1 = 1;
|
||||||
public static final Integer LEVEL2 = 2;
|
public static final Integer LEVEL2 = 2;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import java.util.List;
|
||||||
@Data
|
@Data
|
||||||
public class TeamPeopleTreeVo {
|
public class TeamPeopleTreeVo {
|
||||||
/**id*/
|
/**id*/
|
||||||
private Long id;
|
private String id;
|
||||||
/**名称*/
|
/**名称*/
|
||||||
private String label;
|
private String label;
|
||||||
/**手环编号*/
|
/**手环编号*/
|
||||||
|
|
@ -23,7 +23,7 @@ public class TeamPeopleTreeVo {
|
||||||
/**手环级联编号*/
|
/**手环级联编号*/
|
||||||
private String devCode;
|
private String devCode;
|
||||||
/**父ID*/
|
/**父ID*/
|
||||||
private Long parentId;
|
private String parentId;
|
||||||
/**人员类型*/
|
/**人员类型*/
|
||||||
private Integer userType;
|
private Integer userType;
|
||||||
private List<TeamPeopleTreeVo> children = new ArrayList<>();
|
private List<TeamPeopleTreeVo> children = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -333,8 +333,8 @@ public class ConsControlServiceImpl implements IConsControlService {
|
||||||
List<TeamPeopleTreeVo> list = new ArrayList<>();
|
List<TeamPeopleTreeVo> list = new ArrayList<>();
|
||||||
list = mapper.getTeamPersonByTower(dto);
|
list = mapper.getTeamPersonByTower(dto);
|
||||||
for (TeamPeopleTreeVo vo : list) {
|
for (TeamPeopleTreeVo vo : list) {
|
||||||
//忽略工程数据
|
//忽略第一层级和第二层级 只保留人员层级
|
||||||
if (Objects.equals(vo.getParentId(), BusinessConstants.PARENT_ID) || Objects.equals(vo.getId(), BusinessConstants.PARENT_ID)) {
|
if (Objects.equals(vo.getParentId(), BusinessConstants.PARENT_ID_STR) || Objects.equals(vo.getParentId(), BusinessConstants.PARENT_ID_STR2)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String[] valArr = vo.getLabel().split("-");
|
String[] valArr = vo.getLabel().split("-");
|
||||||
|
|
@ -370,13 +370,34 @@ public class ConsControlServiceImpl implements IConsControlService {
|
||||||
return AjaxResult.error("手环编码不能为空");
|
return AjaxResult.error("手环编码不能为空");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 批量下发手环人脸验证指令-未对接
|
StringBuilder sb = new StringBuilder();
|
||||||
|
List<BraceletParamsDto.SpotCheckInfo> spotCheckList = dto.getSpotCheckList();
|
||||||
|
for (BraceletParamsDto.SpotCheckInfo spotCheckInfo : spotCheckList) {
|
||||||
|
if(StringUtils.isNotBlank(spotCheckInfo.getShCode())){
|
||||||
|
sb.append(spotCheckInfo.getShCode()).append("@");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(sb) && (sb.lastIndexOf("@") == sb.length() - 1)){
|
||||||
|
sb.delete(sb.lastIndexOf("@"),sb.length());
|
||||||
|
}
|
||||||
|
// 批量下发手环人脸验证指令
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.toString(), e);
|
log.error(e.toString(), e);
|
||||||
}
|
}
|
||||||
return AjaxResult.success("已下达手环人脸验证抽检指令");
|
return AjaxResult.success("已下达手环人脸验证抽检指令");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("str").append("@").append("bstr").append("@");
|
||||||
|
System.out.println(sb.lastIndexOf("@"));
|
||||||
|
System.out.println(sb.length() - 1);
|
||||||
|
if(sb.lastIndexOf("@") == sb.length() - 1){
|
||||||
|
sb.delete(sb.lastIndexOf("@"),sb.length());
|
||||||
|
}
|
||||||
|
System.err.println(sb.toString());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult checkConfig(CheckConfigVo vo) {
|
public AjaxResult checkConfig(CheckConfigVo vo) {
|
||||||
|
|
|
||||||
|
|
@ -253,10 +253,17 @@ public class PersonMgeServiceImpl implements IPersonMgeService {
|
||||||
vo.setPhone(Sm4Utils.encode(vo.getPhone()));
|
vo.setPhone(Sm4Utils.encode(vo.getPhone()));
|
||||||
mapper.editPerson(vo);
|
mapper.editPerson(vo);
|
||||||
delFileId = uploadFile(file, vo);
|
delFileId = uploadFile(file, vo);
|
||||||
if (StringUtils.isNotEmpty(vo.getDelFiles())) {
|
if (file!=null) {
|
||||||
String personImgBase64 = getPersonImgBase64(vo.getDelFiles());
|
if(StringUtils.isNotBlank(vo.getDelFiles())){
|
||||||
// 删除人脸库,添加人脸照片至人脸库
|
String personImgBase64 = getPersonImgBase64(vo.getDelFiles());
|
||||||
AjaxResult delAjax = delFaceToLibrary(personImgBase64, FaceCodeUtil.DEL, "bz-" + vo.getId());
|
// 删除人脸库,添加人脸照片至人脸库
|
||||||
|
AjaxResult delAjax = delFaceToLibrary(personImgBase64, FaceCodeUtil.DEL, "bz-" + vo.getId());
|
||||||
|
String[] delFiles = vo.getDelFiles().split(",");
|
||||||
|
for (String fileId : delFiles) {
|
||||||
|
resourceFileMapper.delResourceFile(vo.getFileId());
|
||||||
|
remoteFileService.delFile(fileId, SecurityConstants.INNER);
|
||||||
|
}
|
||||||
|
}
|
||||||
AjaxResult ajaxResult = addFaceToLibrary(BytesToMultipartFileUtil.multipartFileToBase64(file), FaceCodeUtil.ADD, "bz-" + vo.getId());
|
AjaxResult ajaxResult = addFaceToLibrary(BytesToMultipartFileUtil.multipartFileToBase64(file), FaceCodeUtil.ADD, "bz-" + vo.getId());
|
||||||
JSONObject data = JSONObject.parseObject(JSONObject.toJSONString(ajaxResult.get("data")));
|
JSONObject data = JSONObject.parseObject(JSONObject.toJSONString(ajaxResult.get("data")));
|
||||||
Integer code = data.getInteger("code");
|
Integer code = data.getInteger("code");
|
||||||
|
|
@ -267,11 +274,6 @@ public class PersonMgeServiceImpl implements IPersonMgeService {
|
||||||
}else{
|
}else{
|
||||||
mapper.updatePeoplePushStatus(vo.getId(),0);
|
mapper.updatePeoplePushStatus(vo.getId(),0);
|
||||||
}
|
}
|
||||||
String[] delFiles = vo.getDelFiles().split(",");
|
|
||||||
for (String fileId : delFiles) {
|
|
||||||
resourceFileMapper.delResourceFile(vo.getFileId());
|
|
||||||
remoteFileService.delFile(fileId, SecurityConstants.INNER);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("修改人员", e);
|
log.error("修改人员", e);
|
||||||
|
|
@ -472,18 +474,6 @@ public class PersonMgeServiceImpl implements IPersonMgeService {
|
||||||
if(StringUtils.isNotBlank(errorInfo)){
|
if(StringUtils.isNotBlank(errorInfo)){
|
||||||
return AjaxResult.error(errorInfo);
|
return AjaxResult.error(errorInfo);
|
||||||
}
|
}
|
||||||
/*if (StringUtils.isNotBlank(existData)) {
|
|
||||||
return AjaxResult.error(existData);
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotBlank(existData2)) {
|
|
||||||
return AjaxResult.error(existData2);
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotBlank(existData3)) {
|
|
||||||
return AjaxResult.error(existData3);
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotBlank(existData4)) {
|
|
||||||
return AjaxResult.error(existData4);
|
|
||||||
}*/
|
|
||||||
// 校验库中数据的身份证号、手机号、安全帽编号、马甲编号是否重复
|
// 校验库中数据的身份证号、手机号、安全帽编号、马甲编号是否重复
|
||||||
List<Map<String, String>> personIsExist = mapper.personIsExist(new PersonVo());
|
List<Map<String, String>> personIsExist = mapper.personIsExist(new PersonVo());
|
||||||
List<Map<String, String>> aqmCodes = mapper.aqmCodeIsExist();
|
List<Map<String, String>> aqmCodes = mapper.aqmCodeIsExist();
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
null AS devCode,
|
null AS devCode,
|
||||||
null AS userType
|
null AS userType
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT twt.team_id AS id,
|
SELECT DISTINCT CONCAT('team-',twt.team_id) AS id,
|
||||||
twt.team_name AS label,
|
twt.team_name AS label,
|
||||||
0 AS parentId,
|
0 AS parentId,
|
||||||
null AS shCode,
|
null AS shCode,
|
||||||
|
|
@ -343,7 +343,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT tpe.id,
|
SELECT tpe.id,
|
||||||
CONCAT(tpe.name,'-',tpe.phone) AS label,
|
CONCAT(tpe.name,'-',tpe.phone) AS label,
|
||||||
tpe.team_id AS parentId,
|
CONCAT('team-',tpe.team_id) AS parentId,
|
||||||
tb.sh_code AS shCode,
|
tb.sh_code AS shCode,
|
||||||
IFNULL(tb.dev_code,'') AS devCode,
|
IFNULL(tb.dev_code,'') AS devCode,
|
||||||
0 AS userType
|
0 AS userType
|
||||||
|
|
@ -354,7 +354,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT tlu.id,
|
SELECT tlu.id,
|
||||||
CONCAT(tlu.name,'-',tlu.phone) AS label,
|
CONCAT(tlu.name,'-',tlu.phone) AS label,
|
||||||
tlu.team_id AS parentId,
|
CONCAT('team-',tlu.team_id) AS parentId,
|
||||||
tb.sh_code AS shCode,
|
tb.sh_code AS shCode,
|
||||||
IFNULL(tb.dev_code,'') AS devCode,
|
IFNULL(tb.dev_code,'') AS devCode,
|
||||||
1 AS userType
|
1 AS userType
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue