人车管理-修改
This commit is contained in:
parent
7f2c4af11f
commit
a7ac882e30
|
|
@ -43,7 +43,11 @@ public class DeviceOfBdServiceImpl implements IDeviceOfBdService {
|
|||
@Override
|
||||
public List<DeviceBdVo> getDeviceBdList(DeviceBdDto dto) {
|
||||
List<DeviceBdVo> list = new ArrayList<>();
|
||||
list = mapper.getDeviceBdList(dto);
|
||||
try {
|
||||
list = mapper.getDeviceBdList(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("获取边带列表",e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +85,11 @@ public class DeviceOfBdServiceImpl implements IDeviceOfBdService {
|
|||
@Override
|
||||
public AjaxResult getDeviceBdById(DeviceBdDto dto) {
|
||||
DeviceBdVo vo = new DeviceBdVo();
|
||||
vo = mapper.getDeviceBdById(dto);
|
||||
try {
|
||||
vo = mapper.getDeviceBdById(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("边带设备详情",e);
|
||||
}
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +117,11 @@ public class DeviceOfBdServiceImpl implements IDeviceOfBdService {
|
|||
@Override
|
||||
public List<DeviceBdChildVo> getDeviceBdChildList(DeviceBdDto dto) {
|
||||
List<DeviceBdChildVo> list = new ArrayList<>();
|
||||
list = mapper.getDeviceBdChildList(dto);
|
||||
try {
|
||||
list = mapper.getDeviceBdChildList(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("获取边带子设备列表",e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
@ -146,7 +158,11 @@ public class DeviceOfBdServiceImpl implements IDeviceOfBdService {
|
|||
@Override
|
||||
public AjaxResult getDeviceBdChildById(DeviceBdDto dto) {
|
||||
DeviceBdChildVo vo = new DeviceBdChildVo();
|
||||
vo = mapper.getDeviceBdChildById(dto);
|
||||
try {
|
||||
vo = mapper.getDeviceBdChildById(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("边带子设备详情",e);
|
||||
}
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import com.securitycontrol.system.api.RemoteFileService;
|
|||
import com.securitycontrol.system.api.domain.SysFile;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
|
|
@ -48,7 +47,11 @@ public class HumanServiceImpl implements HumanService {
|
|||
@Override
|
||||
public List<HumanManageVo> getHumanLists(ParamDto dto) {
|
||||
List<HumanManageVo> list = new ArrayList<>();
|
||||
list = mapper.getHumanLists(dto);
|
||||
try {
|
||||
list = mapper.getHumanLists(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("获取人员列表",e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
@ -156,28 +159,32 @@ public class HumanServiceImpl implements HumanService {
|
|||
@Override
|
||||
public AjaxResult getPersonnelById(ParamDto dto) {
|
||||
HumanManageVo vo = new HumanManageVo();
|
||||
vo = mapper.getPersonnelById(dto);
|
||||
String decryptIdNumber = AesCbcUtils.decrypt(vo.getIdNumber());
|
||||
if(decryptIdNumber != null){
|
||||
vo.setIdNumber(decryptIdNumber);
|
||||
}
|
||||
List<ResourceFileVo> resourceFileVos = mapper.getFiles(vo.getUserId());
|
||||
if (CollectionUtils.isNotEmpty(resourceFileVos)) {
|
||||
List<HumanManageVo.FileData> list = new ArrayList<>();
|
||||
for (ResourceFileVo fileVo : resourceFileVos) {
|
||||
String base64 = null;
|
||||
Result<SysFile> result = remoteFileService.getImgBase64(fileVo.getFileId(), SecurityConstants.INNER);
|
||||
if (result != null && result.getCode() == HttpStatus.SUCCESS && result.getData() != null) {
|
||||
String jsonString = JSON.toJSONString(result.getData());
|
||||
JSONObject item = JSON.parseObject(jsonString);
|
||||
base64 = item.getString("url");
|
||||
}
|
||||
HumanManageVo.FileData fileData = new HumanManageVo.FileData();
|
||||
fileData.setFileId(fileVo.getFileId());
|
||||
fileData.setBase64Url(base64);
|
||||
list.add(fileData);
|
||||
try {
|
||||
vo = mapper.getPersonnelById(dto);
|
||||
String decryptIdNumber = AesCbcUtils.decrypt(vo.getIdNumber());
|
||||
if(decryptIdNumber != null){
|
||||
vo.setIdNumber(decryptIdNumber);
|
||||
}
|
||||
vo.setFileData(list);
|
||||
List<ResourceFileVo> resourceFileVos = mapper.getFiles(vo.getUserId());
|
||||
if (CollectionUtils.isNotEmpty(resourceFileVos)) {
|
||||
List<HumanManageVo.FileData> list = new ArrayList<>();
|
||||
for (ResourceFileVo fileVo : resourceFileVos) {
|
||||
String base64 = null;
|
||||
Result<SysFile> result = remoteFileService.getImgBase64(fileVo.getFileId(), SecurityConstants.INNER);
|
||||
if (result != null && result.getCode() == HttpStatus.SUCCESS && result.getData() != null) {
|
||||
String jsonString = JSON.toJSONString(result.getData());
|
||||
JSONObject item = JSON.parseObject(jsonString);
|
||||
base64 = item.getString("url");
|
||||
}
|
||||
HumanManageVo.FileData fileData = new HumanManageVo.FileData();
|
||||
fileData.setFileId(fileVo.getFileId());
|
||||
fileData.setBase64Url(base64);
|
||||
list.add(fileData);
|
||||
}
|
||||
vo.setFileData(list);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("人员详情",e);
|
||||
}
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
|
@ -212,21 +219,25 @@ public class HumanServiceImpl implements HumanService {
|
|||
@Override
|
||||
public AjaxResult viewPersonnelFile(ParamDto dto) {
|
||||
List<HumanManageVo.FileData> list = new ArrayList<>();
|
||||
List<ResourceFileVo> resourceFileVos = mapper.getFiles(dto.getId());
|
||||
if (CollectionUtils.isNotEmpty(resourceFileVos)) {
|
||||
for (ResourceFileVo fileVo : resourceFileVos) {
|
||||
String base64 = null;
|
||||
Result<SysFile> result = remoteFileService.getImgBase64(fileVo.getFileId(), SecurityConstants.INNER);
|
||||
if (result != null && result.getCode() == HttpStatus.SUCCESS && result.getData() != null) {
|
||||
String jsonString = JSON.toJSONString(result.getData());
|
||||
JSONObject item = JSON.parseObject(jsonString);
|
||||
base64 = item.getString("url");
|
||||
try {
|
||||
List<ResourceFileVo> resourceFileVos = mapper.getFiles(dto.getId());
|
||||
if (CollectionUtils.isNotEmpty(resourceFileVos)) {
|
||||
for (ResourceFileVo fileVo : resourceFileVos) {
|
||||
String base64 = null;
|
||||
Result<SysFile> result = remoteFileService.getImgBase64(fileVo.getFileId(), SecurityConstants.INNER);
|
||||
if (result != null && result.getCode() == HttpStatus.SUCCESS && result.getData() != null) {
|
||||
String jsonString = JSON.toJSONString(result.getData());
|
||||
JSONObject item = JSON.parseObject(jsonString);
|
||||
base64 = item.getString("url");
|
||||
}
|
||||
HumanManageVo.FileData fileData = new HumanManageVo.FileData();
|
||||
fileData.setFileId(fileVo.getFileId());
|
||||
fileData.setBase64Url(base64);
|
||||
list.add(fileData);
|
||||
}
|
||||
HumanManageVo.FileData fileData = new HumanManageVo.FileData();
|
||||
fileData.setFileId(fileVo.getFileId());
|
||||
fileData.setBase64Url(base64);
|
||||
list.add(fileData);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("人员照片预览",e);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
@ -234,7 +245,11 @@ public class HumanServiceImpl implements HumanService {
|
|||
@Override
|
||||
public List<UserAccessVo> getPersonnelAccessLists(ParamDto dto) {
|
||||
List<UserAccessVo> list = new ArrayList<>();
|
||||
list = mapper.getPersonnelAccessLists(dto);
|
||||
try {
|
||||
list = mapper.getPersonnelAccessLists(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("获取人员出入记录",e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,10 +35,14 @@ public class TeamServiceImpl implements TeamService {
|
|||
@Override
|
||||
public List<TeamManageVo> getTeamLists(ParamDto dto) {
|
||||
List<TeamManageVo> list = new ArrayList<>();
|
||||
list = mapper.getTeamLists(dto);
|
||||
for (TeamManageVo vo : list) {
|
||||
int num = mapper.getTeamUserNum(vo.getTeamId());
|
||||
vo.setTeamNum(String.valueOf(num));
|
||||
try {
|
||||
list = mapper.getTeamLists(dto);
|
||||
for (TeamManageVo vo : list) {
|
||||
int num = mapper.getTeamUserNum(vo.getTeamId());
|
||||
vo.setTeamNum(String.valueOf(num));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取班组列表",e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
|
@ -138,7 +142,11 @@ public class TeamServiceImpl implements TeamService {
|
|||
@Override
|
||||
public List<HumanManageVo> getTeamUserLists(ParamDto dto) {
|
||||
List<HumanManageVo> list = new ArrayList<>();
|
||||
list = mapper.getTeamUserLists(dto);
|
||||
try {
|
||||
list = mapper.getTeamUserLists(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("获取班组人员列表",e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
@ -161,15 +169,19 @@ public class TeamServiceImpl implements TeamService {
|
|||
Map<String, Object> map = new HashMap<>(16);
|
||||
List<Map<String, String>> teamUsers = new ArrayList<>();
|
||||
List<Map<String, String>> noBandingUsers = new ArrayList<>();
|
||||
List<Map<String, String>> list = mapper.getTeamUserAndNoBandingUser(dto);
|
||||
if(CollectionUtils.isNotEmpty(list)){
|
||||
for (Map<String, String> stringMap : list) {
|
||||
if(Objects.equals(stringMap.get("type"),"1")){
|
||||
teamUsers.add(stringMap);
|
||||
}else if(Objects.equals(stringMap.get("type"),"2")){
|
||||
noBandingUsers.add(stringMap);
|
||||
try {
|
||||
List<Map<String, String>> list = mapper.getTeamUserAndNoBandingUser(dto);
|
||||
if(CollectionUtils.isNotEmpty(list)){
|
||||
for (Map<String, String> stringMap : list) {
|
||||
if(Objects.equals(stringMap.get("type"),"1")){
|
||||
teamUsers.add(stringMap);
|
||||
}else if(Objects.equals(stringMap.get("type"),"2")){
|
||||
noBandingUsers.add(stringMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取班组组员和未加入班组人员",e);
|
||||
}
|
||||
map.put("teamUsers",teamUsers);
|
||||
map.put("noBandingUsers",noBandingUsers);
|
||||
|
|
|
|||
Loading…
Reference in New Issue