Browse Source

test

master
yinzuomei 2 years ago
parent
commit
8983c14465
  1. 18
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcDangerousChemicalsController.java
  2. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcDangerousChemicalsExcel.java
  3. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcDangerousChemicalsServiceImpl.java

18
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcDangerousChemicalsController.java

@ -133,6 +133,24 @@ public class IcDangerousChemicalsController {
return new Result(); return new Result();
} }
/**
* 批量删除
* @param tokenDto
* @param ids
* @return
*/
@PostMapping("batch-del")
public Result delete(@LoginUser TokenDto tokenDto, @RequestBody List<String> ids) {
ids.forEach(id->{
IcDangerousChemicalsAddEditFormDTO formDTO=new IcDangerousChemicalsAddEditFormDTO();
formDTO.setIcDangerousChemicalsId(id);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
icDangerousChemicalsService.delete(formDTO);
});
return new Result();
}
/** /**
* 重点危化品企业 查看详情 * 重点危化品企业 查看详情
* @param formDTO * @param formDTO

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcDangerousChemicalsExcel.java

@ -49,7 +49,7 @@ public class IcDangerousChemicalsExcel {
@ColumnWidth(25) @ColumnWidth(25)
private String securityPrincipalName; private String securityPrincipalName;
@ExcelProperty(value = "安全负责电话") @ExcelProperty(value = "安全负责电话")
@ColumnWidth(25) @ColumnWidth(25)
private String securityPrincipalMobile; private String securityPrincipalMobile;

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcDangerousChemicalsServiceImpl.java

@ -156,11 +156,11 @@ public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl<IcDangerous
CustomerStaffInfoCacheResult staffInfoCacheResult=CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getUserId()); CustomerStaffInfoCacheResult staffInfoCacheResult=CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getUserId());
entity.setAgencyId(staffInfoCacheResult.getAgencyId()); entity.setAgencyId(staffInfoCacheResult.getAgencyId());
entity.setAgencyIdPath(StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) ? staffInfoCacheResult.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfoCacheResult.getAgencyId()) : staffInfoCacheResult.getAgencyId()); entity.setAgencyIdPath(StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) ? staffInfoCacheResult.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfoCacheResult.getAgencyId()) : staffInfoCacheResult.getAgencyId());
if(OrgTypeEnum.GRID.equals(formDTO.getOrgType())){ if(OrgTypeEnum.GRID.getCode().equals(formDTO.getOrgType())){
// 获取网格信息 // 获取网格信息
CustomerGridDTO customerGridDTO=SpringContextUtils.getBean(CustomerGridService.class).get(formDTO.getOrgId()); CustomerGridDTO customerGridDTO=SpringContextUtils.getBean(CustomerGridService.class).get(formDTO.getOrgId());
entity.setOrgIdPath(PidUtils.convertPid2OrgIdPath(customerGridDTO.getId(),customerGridDTO.getPids())); entity.setOrgIdPath(PidUtils.convertPid2OrgIdPath(customerGridDTO.getId(),customerGridDTO.getPids()));
}else if(OrgTypeEnum.AGENCY.equals(formDTO.getOrgType())){ }else if(OrgTypeEnum.AGENCY.getCode().equals(formDTO.getOrgType())){
CustomerAgencyDTO customerAgencyDTO=SpringContextUtils.getBean(CustomerAgencyService.class).get(formDTO.getOrgId()); CustomerAgencyDTO customerAgencyDTO=SpringContextUtils.getBean(CustomerAgencyService.class).get(formDTO.getOrgId());
entity.setOrgIdPath(PidUtils.convertPid2OrgIdPath(customerAgencyDTO.getId(),customerAgencyDTO.getPids())); entity.setOrgIdPath(PidUtils.convertPid2OrgIdPath(customerAgencyDTO.getId(),customerAgencyDTO.getPids()));
} }
@ -195,11 +195,11 @@ public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl<IcDangerous
CustomerStaffInfoCacheResult staffInfoCacheResult=CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getUserId()); CustomerStaffInfoCacheResult staffInfoCacheResult=CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getUserId());
entity.setAgencyId(staffInfoCacheResult.getAgencyId()); entity.setAgencyId(staffInfoCacheResult.getAgencyId());
entity.setAgencyIdPath(StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) ? staffInfoCacheResult.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfoCacheResult.getAgencyId()) : staffInfoCacheResult.getAgencyId()); entity.setAgencyIdPath(StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) ? staffInfoCacheResult.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfoCacheResult.getAgencyId()) : staffInfoCacheResult.getAgencyId());
if(OrgTypeEnum.GRID.equals(formDTO.getOrgType())){ if(OrgTypeEnum.GRID.getCode().equals(formDTO.getOrgType())){
// 获取网格信息 // 获取网格信息
CustomerGridDTO customerGridDTO=SpringContextUtils.getBean(CustomerGridService.class).get(formDTO.getOrgId()); CustomerGridDTO customerGridDTO=SpringContextUtils.getBean(CustomerGridService.class).get(formDTO.getOrgId());
entity.setOrgIdPath(PidUtils.convertPid2OrgIdPath(customerGridDTO.getId(),customerGridDTO.getPids())); entity.setOrgIdPath(PidUtils.convertPid2OrgIdPath(customerGridDTO.getId(),customerGridDTO.getPids()));
}else if(OrgTypeEnum.AGENCY.equals(formDTO.getOrgType())){ }else if(OrgTypeEnum.AGENCY.getCode().equals(formDTO.getOrgType())){
CustomerAgencyDTO customerAgencyDTO=SpringContextUtils.getBean(CustomerAgencyService.class).get(formDTO.getOrgId()); CustomerAgencyDTO customerAgencyDTO=SpringContextUtils.getBean(CustomerAgencyService.class).get(formDTO.getOrgId());
entity.setOrgIdPath(PidUtils.convertPid2OrgIdPath(customerAgencyDTO.getId(),customerAgencyDTO.getPids())); entity.setOrgIdPath(PidUtils.convertPid2OrgIdPath(customerAgencyDTO.getId(),customerAgencyDTO.getPids()));
} }

Loading…
Cancel
Save