wangxianzhang 3 years ago
parent
commit
b79b19aedd
  1. 5
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java
  2. 15
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java
  3. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/EnterpriseImportExcelDTO.java
  4. 26
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  5. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java
  6. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java
  7. 32
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RHZKStatisticsFormDTO.java
  8. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java
  9. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyNatListResultDTO.java
  10. 13
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java
  11. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/OwnerRelationResultDTO.java
  12. 38
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/RHZKStatisticsResultDTO.java
  13. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
  14. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
  15. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserConstant.java
  16. 18
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  17. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
  18. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNatEntity.java
  19. 55
      epmet-user/epmet-user-server/src/main/java/com/epmet/enums/RenHuConditionEnum.java
  20. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcNatImportExcelData.java
  21. 11
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java
  22. 82
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  23. 4
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.89__alter_ic_nat.sql
  24. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/ic_nat.xlsx
  25. 12
      epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml
  26. 47
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

5
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java

@ -1,7 +1,6 @@
package com.epmet.commons.tools.redis.common;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.dto.form.CustomerGridFormDTO;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.CommonAggFeignClient;
@ -56,6 +55,10 @@ public class CustomerOrgRedis {
* @date 2021/11/5 3:12 下午
*/
public static GridInfoCache getGridInfo(String gridId){
if (StringUtils.isBlank(gridId)) {
log.warn("查询网格缓存,gridId is null");
return null;
}
String key = RedisKeys.getGridInfoKey(gridId);
Map<String, Object> grid = customerOrgRedis.redisUtils.hGetAll(key);
if (!CollectionUtils.isEmpty(grid)) {

15
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java

@ -1,8 +1,10 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @author sun
@ -84,4 +86,17 @@ public class SubUserHouseListResultDTO implements Serializable {
*/
private Integer usingCommunityNum;
/**
* 人户一致人在户不在户在人不在
* 为空的 暂不清楚
*/
private Integer rhyzUserTotal = NumConstant.ZERO;
private BigDecimal rhyzUserRatio = NumConstant.ZERO_DECIMAL;
private Integer rzhbzUserTotal = NumConstant.ZERO;
private BigDecimal rzhbzUserRatio = NumConstant.ZERO_DECIMAL;
private Integer hzrbzUserTotal = NumConstant.ZERO;
private BigDecimal hzrbzUserRatio = NumConstant.ZERO_DECIMAL;
private Integer zbqcUserTotal = NumConstant.ZERO;
private BigDecimal zbqcUserRatio = NumConstant.ZERO_DECIMAL;
}

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

@ -90,7 +90,7 @@ public class EnterpriseImportExcelDTO {
* 默认0
*/
@ColumnWidth(20)
@ExcelProperty(value = "场所类别(九小场所/企事业单位)")
@ExcelProperty(value = "场所类别")
private String placeCategoryName;
@ColumnWidth(20)

26
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -943,6 +943,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
houseDTO.setOrgId(id);
houseList.add(houseChart(houseDTO));
}
//start 2022.11.17需求:http://zentao.elinkservice.cn/story-view-718.html
//原来饼图是:居民总数、常住人口数、流动人口数 后改为下面的人户状况饼图,后面如果所有客户都上线了,就把第2步的查询注释掉。
//2.直属下级列表的居民数据
UserChartFormDTO userDTO = new UserChartFormDTO();
userDTO.setOrgType(orgType);
@ -951,6 +953,15 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
if (!userResult.success()) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取居民人房统计数据失败" + userResult.getInternalMsg(), userResult.getMsg());
}
//end
//3.居民总数、人户一致、人在户不在、户在人不在,没填写是暂不清楚
RHZKStatisticsFormDTO rhzkStatisticsFormDTO = new RHZKStatisticsFormDTO();
rhzkStatisticsFormDTO.setOrgIds(idList);
rhzkStatisticsFormDTO.setOrgType(orgType);
Result<List<RHZKStatisticsResultDTO>> rhzkResult = epmetUserOpenFeignClient.renHuCondition(rhzkStatisticsFormDTO);
if (!rhzkResult.success()){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取居民人户状况统计数据失败" + rhzkResult.getInternalMsg(), rhzkResult.getMsg());
}
//3.汇总封装数据
SubUserHouseListResultDTO dto = null;
for (String id : idList) {
@ -994,6 +1005,21 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
// 网格这项数据为0
dto.setUsingCommunityNum(0);
}
for (RHZKStatisticsResultDTO r : rhzkResult.getData()) {
if (StringUtils.isNotBlank(r.getOrgId())){
if (r.getOrgId().equals(id)){
dto.setRhyzUserTotal(r.getRhyzUserTotal());
dto.setRhyzUserRatio(r.getRhyzUserRatio());
dto.setRzhbzUserTotal(r.getRzhbzUserTotal());
dto.setRzhbzUserRatio(r.getRzhbzUserRatio());
dto.setHzrbzUserTotal(r.getHzrbzUserTotal());
dto.setHzrbzUserRatio(r.getHzrbzUserRatio());
dto.setZbqcUserTotal(r.getZbqcUserTotal());
dto.setZbqcUserRatio(r.getZbqcUserRatio());
dto.setUserTotal(r.getUserTotal());
}
}
}
list.add(dto);
}
return list;

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java

@ -107,6 +107,11 @@ public class IcNatDTO implements Serializable {
*/
private String attachmentUrl;
/**
* 试管编号
*/
private String testTubeCode;
/**
* 删除标识
*/

4
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java

@ -89,6 +89,10 @@ public class AddIcNatFormDTO implements Serializable {
* 附件地址
*/
private String attachmentUrl;
/**
* 试管编号
*/
private String testTubeCode;
/**
* 是否客户下居民(0: 1:)
*/

32
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RHZKStatisticsFormDTO.java

@ -0,0 +1,32 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/11/16 13:26
*/
@Data
public class RHZKStatisticsFormDTO implements Serializable {
private static final long serialVersionUID = -4474168123286467820L;
private String orgId;
/**
* grid网格village小区
*/
private String orgType;
/**
* /epmetuser/icresiuser/rhzkList调用会赋值
*/
private List<String> orgIds;
//tokenDto中获取
private String staffId;
private String customerId;
}

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java

@ -27,6 +27,11 @@ public class UserChartFormDTO implements Serializable {
*/
private String type;
/**
* 人户一致:rhyz人在户不在rzhbz户在人不在hzrbz暂不清楚no全部all
*/
private String rhType;
private Integer pageNo = 1;
private Integer pageSize = 20;
private Boolean isPage = true;

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyNatListResultDTO.java

@ -73,4 +73,9 @@ public class MyNatListResultDTO implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date reportTime;
/**
* 试管编号
*/
private String testTubeCode;
}

13
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java

@ -73,14 +73,14 @@ public class NatListResultDTO implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
@ColumnWidth(25)
@ExcelProperty(value = "采样时间",order = 4)
@ExcelProperty(value = "采样时间",order = 5)
private Date sampleTime;
/**
* 检测结果
*/
@ColumnWidth(20)
@ExcelProperty(value = "检测结果",order = 5)
@ExcelProperty(value = "检测结果",order = 7)
private String natResult;
/**
@ -99,8 +99,15 @@ public class NatListResultDTO implements Serializable {
* 检测地点
*/
@ColumnWidth(30)
@ExcelProperty(value = "检测地点",order = 7)
@ExcelProperty(value = "检测地点",order = 6)
private String natAddress;
/**
* 试管编号
*/
@ColumnWidth(30)
@ExcelProperty(value = "试管编号",order = 8)
private String testTubeCode;
}

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/OwnerRelationResultDTO.java

@ -25,5 +25,10 @@ public class OwnerRelationResultDTO implements Serializable {
private String userName;
private String isSelf;
private String relation;
/**
* 2022.11.17人户状况人户一致人在户不在户在人不在暂不清楚
*/
private String renHuCondition;
}
}

38
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/RHZKStatisticsResultDTO.java

@ -0,0 +1,38 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author zxc
* @DateTime 2022/11/16 09:15
*/
@Data
public class RHZKStatisticsResultDTO implements Serializable {
private static final long serialVersionUID = 6493812449146476415L;
private Integer userTotal = NumConstant.ZERO;
/**
* 人户一致人在户不在户在人不在
* 为空的 暂不清楚
*/
private Integer rhyzUserTotal = NumConstant.ZERO;
private BigDecimal rhyzUserRatio = NumConstant.ZERO_DECIMAL;
private Integer rzhbzUserTotal = NumConstant.ZERO;
private BigDecimal rzhbzUserRatio = NumConstant.ZERO_DECIMAL;
private Integer hzrbzUserTotal = NumConstant.ZERO;
private BigDecimal hzrbzUserRatio = NumConstant.ZERO_DECIMAL;
private Integer zbqcUserTotal = NumConstant.ZERO;
private BigDecimal zbqcUserRatio = NumConstant.ZERO_DECIMAL;
private String orgId;
@JsonIgnore
private Integer total;
@JsonIgnore
private String rhzk;
}

4
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java

@ -955,4 +955,8 @@ public interface EpmetUserOpenFeignClient {
@PostMapping("/epmetuser/dataSyncConfig/vaccineInfoScanTask")
Result vaccineInfoScanTask(@RequestBody DataSyncTaskParam formDTO);
@PostMapping("/epmetuser/icresiuser/rhzkList")
Result<List<RHZKStatisticsResultDTO>> renHuCondition(@RequestBody RHZKStatisticsFormDTO formDTO);
}

5
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java

@ -746,4 +746,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien
public Result vaccineInfoScanTask(DataSyncTaskParam formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "vaccineInfoScanTask", formDTO);
}
@Override
public Result<List<RHZKStatisticsResultDTO>> renHuCondition(RHZKStatisticsFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "renHuCondition", formDTO);
}
}

9
epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserConstant.java

@ -108,4 +108,13 @@ public interface UserConstant {
* 居民信息 子表中的主表id
*/
String IC_RESI_USER = "IC_RESI_USER";
/**
* 人户一致人在户不在户在人不在
* 为空的 暂不清楚
*/
String R_H_Y_Z = "rhyz";
String R_Z_H_B_Z = "rzhbz";
String H_Z_R_B_Z = "hzrbz";
String Z_B_Q_C = "";
}

18
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -1467,4 +1467,22 @@ public class IcResiUserController implements ResultDataResolver {
return new Result<IcResiUserInfoCache>().ok(icResiUserService.getIcResiUserInfo(userId));
}
/**
* @Description 人户状况统计查询
* @param tokenDto
* @Author zxc
* @Date 2022/11/16 09:22
*/
@PostMapping("rhzk")
public Result<RHZKStatisticsResultDTO> renHuCondition(@LoginUser TokenDto tokenDto,@RequestBody RHZKStatisticsFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
return new Result<RHZKStatisticsResultDTO>().ok(icResiUserService.renHuCondition(formDTO));
}
@PostMapping("rhzkList")
public Result<List<RHZKStatisticsResultDTO>> renHuConditionList(@RequestBody RHZKStatisticsFormDTO formDTO){
return new Result<List<RHZKStatisticsResultDTO>>().ok(icResiUserService.renHuConditionList(formDTO));
}
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java

@ -442,4 +442,6 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
ResiAndLocalResiResultDTO getResiCount(@Param("agencyId")String agencyId,@Param("idCard")String idCard,@Param("customerId")String customerId);
List<IcResiUserDTO> getResiUserList(ComparisonFormDTO formDTO);
List<RHZKStatisticsResultDTO> getUserByRenHu(RHZKStatisticsFormDTO formDTO);
}

5
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNatEntity.java

@ -94,6 +94,11 @@ public class IcNatEntity extends BaseEpmetEntity {
*/
private String attachmentUrl;
/**
* 试管编号
*/
private String testTubeCode;
@TableField(exist = false)
private String agencyId;

55
epmet-user/epmet-user-server/src/main/java/com/epmet/enums/RenHuConditionEnum.java

@ -0,0 +1,55 @@
package com.epmet.enums;
import org.apache.commons.lang3.StringUtils;
/**
* 居民信息里的人户状况枚举类
*/
public enum RenHuConditionEnum {
/**
* 人户一致人在户不在户在人不在
* 为空的 暂不清楚
*/
RHYZ("rhyz","人户一致"),
RZHBZ("rzhbz","人在户不在"),
HZRBZ("hzrbz","户在人不在"),
ZBQC("","暂不清楚"),
;
private String code;
private String name;
public static String getNameByCode(String code){
if (StringUtils.isBlank(code)){
return ZBQC.name;
}
for (RenHuConditionEnum e : values()) {
if (e.getCode().equals(code)){
return e.getName();
}
}
return ZBQC.name;
}
RenHuConditionEnum(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

3
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcNatImportExcelData.java

@ -43,6 +43,9 @@ public class IcNatImportExcelData {
@ExcelProperty("检测结果")
private String natResultZh;
@ExcelProperty("试管编号")
private String testTubeCode;
@Data
public static class RowRemarkMessage {

11
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java

@ -525,4 +525,15 @@ public interface IcResiUserService extends BaseService<IcResiUserEntity> {
IcResiUserInfoCache getIcResiUserInfo(String userId);
void epidemicPreventionExport(EpidemicPreventionFormDTO formDTO, HttpServletResponse response) throws IOException;
/**
* @Description 人户状况统计查询
* @param formDTO
* @Author zxc
* @Date 2022/11/16 09:22
*/
RHZKStatisticsResultDTO renHuCondition(RHZKStatisticsFormDTO formDTO);
List<RHZKStatisticsResultDTO> renHuConditionList(RHZKStatisticsFormDTO formDTO);
}

82
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -64,6 +64,7 @@ import com.epmet.dto.result.demand.IcResiDemandDictDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.resi.IcResiNonDynamicResultDTO;
import com.epmet.entity.*;
import com.epmet.enums.RenHuConditionEnum;
import com.epmet.excel.EpidemicPreventionExportExcel;
import com.epmet.excel.support.ExportResiUserItemDTO;
import com.epmet.feign.*;
@ -1483,6 +1484,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
if (RelationshipEnum.SELF.getCode().equals(item.getYhzgx())) {
result.setOwnerName(item.getName());
}
//2022.11.17 返参增加人户状况名称
if (StringUtils.isBlank(item.getRhzk())){
bean.setRenHuCondition(RenHuConditionEnum.ZBQC.getName());
}else {
bean.setRenHuCondition(RenHuConditionEnum.getNameByCode(item.getRhzk()));
}
return bean;
}).collect(Collectors.toList());
result.setUserList(userList);
@ -3645,4 +3652,79 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
}
}
/**
* @Description 人户状况统计查询
* @param formDTO
* @Author zxc
* @Date 2022/11/16 09:22
*/
@Override
public RHZKStatisticsResultDTO renHuCondition(RHZKStatisticsFormDTO formDTO) {
if (StringUtils.isBlank(formDTO.getOrgId())){
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo){
throw new EpmetException("未查询到工作人员:"+formDTO.getStaffId());
}
formDTO.setOrgId(staffInfo.getAgencyId());
formDTO.setOrgType("agency");
}
List<RHZKStatisticsResultDTO> userByRenHu = baseDao.getUserByRenHu(formDTO);
RHZKStatisticsResultDTO r = new RHZKStatisticsResultDTO();
if (CollectionUtils.isEmpty(userByRenHu)){
return r;
}
r.setOrgId(formDTO.getOrgId());
r.setUserTotal(userByRenHu.stream().collect(Collectors.summingInt(RHZKStatisticsResultDTO::getTotal)));
userByRenHu.forEach(u -> {
switch (u.getRhzk()){
case UserConstant.R_H_Y_Z:
r.setRhyzUserTotal(u.getTotal());
r.setRhyzUserRatio(getRatio(r.getUserTotal(),u.getTotal()));
break;
case UserConstant.R_Z_H_B_Z:
r.setRzhbzUserTotal(u.getTotal());
r.setRzhbzUserRatio(getRatio(r.getUserTotal(),u.getTotal()));
break;
case UserConstant.H_Z_R_B_Z:
r.setHzrbzUserTotal(u.getTotal());
r.setHzrbzUserRatio(getRatio(r.getUserTotal(),u.getTotal()));
break;
case UserConstant.Z_B_Q_C:
r.setZbqcUserTotal(u.getTotal());
r.setZbqcUserRatio(getRatio(r.getUserTotal(),u.getTotal()));
break;
default:
break;
}
});
return r;
}
@Override
public List<RHZKStatisticsResultDTO> renHuConditionList(RHZKStatisticsFormDTO formDTO) {
if (CollectionUtils.isEmpty(formDTO.getOrgIds())){
return new ArrayList<>();
}
List<RHZKStatisticsResultDTO> result = new ArrayList<>();
formDTO.getOrgIds().forEach(o -> {
formDTO.setOrgId(o);
result.add(renHuCondition(formDTO));
});
return result;
}
/**
* @Description
* @param total 总人数
* @param fz 分子人数
* @Author zxc
* @Date 2022/11/16 10:12
*/
public BigDecimal getRatio(Integer total,Integer fz){
BigDecimal totalBig = new BigDecimal(total);
BigDecimal fzBig = new BigDecimal(fz);
return fzBig.multiply(NumConstant.ONE_HUNDRED_DECIMAL).divide(totalBig, NumConstant.TWO, BigDecimal.ROUND_HALF_UP);
}
}

4
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.89__alter_ic_nat.sql

@ -0,0 +1,4 @@
-- 核酸记录表增加非必填字段“试管编号” 对应产蛋4679
ALTER TABLE `ic_nat`
ADD COLUMN `TEST_TUBE_CODE` varchar(255) NULL COMMENT '试管编号' AFTER `ATTACHMENT_URL`;

BIN
epmet-user/epmet-user-server/src/main/resources/excel/ic_nat.xlsx

Binary file not shown.

12
epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml

@ -16,7 +16,8 @@
nat_address natAddress,
file_name fileName,
attachment_url attachmentUrl,
created_time reportTime
created_time reportTime,
test_tube_code testTubeCode
FROM
ic_nat
WHERE
@ -45,7 +46,8 @@
b.nat_time natTime,
b.sample_time sampleTime,
b.nat_result natResult,
b.nat_address natAddress
b.nat_address natAddress,
b.test_tube_code testTubeCode
FROM
ic_nat_relation a
INNER JOIN ic_nat b ON a.IC_NAT_ID = b.ID
@ -93,7 +95,8 @@
nat_time natTime,
sample_time sampleTime,
nat_result natResult,
nat_address natAddress
nat_address natAddress,
test_tube_code testTubeCode
FROM
ic_nat
WHERE
@ -134,7 +137,8 @@
nat_time,
sample_time,
nat_result,
nat_address
nat_address,
test_tube_code
FROM
ic_nat
WHERE

47
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -1359,6 +1359,18 @@
<if test='null != type and type.trim() != "" and type == "ld" '>
AND (is_floating != '0' or is_floating is null)
</if>
<if test='null != rhType and rhType.trim() != "" and rhType == "rhyz" '>
AND RHZK = 'rhyz'
</if>
<if test='null != rhType and rhType.trim() != "" and rhType == "rzhbz" '>
AND RHZK = 'rzhbz'
</if>
<if test='null != rhType and rhType.trim() != "" and rhType == "hzrbz" '>
AND RHZK = 'hzrbz'
</if>
<if test='null != rhType and rhType.trim() != "" and rhType == "no" '>
AND(RHZK = '' or RHZK IS null)
</if>
<choose>
<when test='orgType == "agency"'>
AND (agency_id = #{orgId} OR pids LIKE CONCAT('%', #{orgId}, '%'))
@ -1402,6 +1414,41 @@
AND ID_CARD = #{idCard}
</select>
<!-- 根据人户状况查询每个类型的人数 -->
<select id="getUserByRenHu" resultType="com.epmet.dto.result.RHZKStatisticsResultDTO">
SELECT
COUNT(ID) AS total,
rhzk,
orgId
FROM
(SELECT
ID,
IFNULL(RHZK,'') AS rhzk,
<if test='orgType == "agency" '>
AGENCY_ID AS orgId
</if>
<if test='orgType == "grid" '>
GRID_ID AS orgId
</if>
<if test='orgType == "village" '>
VILLAGE_ID AS orgId
</if>
FROM ic_resi_user
WHERE DEL_FLAG = '0'
AND `STATUS` = '0'
<if test='orgType == "agency" '>
AND PIDS LIKE CONCAT('%',#{orgId},'%')
</if>
<if test='orgType == "grid" '>
AND GRID_ID = #{orgId}
</if>
<if test='orgType == "village" '>
AND VILLAGE_ID = #{orgId}
</if>
) t
GROUP BY rhzk
</select>
<select id="getResiUserList" resultType="com.epmet.dto.IcResiUserDTO">
SELECT
a.id,

Loading…
Cancel
Save