Browse Source

heSuanCount+houseType

master
yinzuomei 4 years ago
parent
commit
0dca863fed
  1. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectFormDTO.java
  2. 6
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java
  3. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java
  4. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java
  5. 24
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java

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

@ -27,6 +27,7 @@ public class IcResiCollectFormDTO implements Serializable {
/**
* 客户Id customer.id
*/
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
private String customerId;
/**
@ -84,13 +85,13 @@ public class IcResiCollectFormDTO implements Serializable {
* 1自由0租住
*/
@NotNull(message = "房子属于自由还是组织?", groups = {InternalShowGroup.class, ExternalShowGroup.class})
private Integer houserType;
private Integer houseType;
/**
* 户主姓名
*/
@NotBlank(message = "户主姓名不能为空", groups = {InternalShowGroup.class, ExternalShowGroup.class})
private String houserHolerName;
private String houseHolerName;
/**
* 居住成员人数

6
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java

@ -6,6 +6,10 @@ import java.io.Serializable;
@Data
public class IcResiCollectMemFormDTO implements Serializable {
/**
* 客户Id customer.id
*/
private String customerId;
/**
* 居住成员1姓名
*/
@ -24,7 +28,7 @@ public class IcResiCollectMemFormDTO implements Serializable {
/**
* 居住成员1是否参加几轮全员核算检测数字1-10
*/
private Integer hesuanCount;
private Integer heSuanCount;
/**
* 居住成员1新冠疫苗接种情况;1:已全程接种2未全程接种0未接种

7
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java

@ -1,13 +1,10 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 居民信息采集表
*
@ -74,12 +71,12 @@ public class IcResiCollectEntity extends BaseEpmetEntity {
/**
* 1自由0租住
*/
private Integer houserType;
private Integer houseType;
/**
* 户主姓名
*/
private String houserHolerName;
private String houseHolerName;
/**
* 居住成员人数

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

@ -1,13 +1,10 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 居民信息成员表
*
@ -49,7 +46,7 @@ public class IcResiMemberEntity extends BaseEpmetEntity {
/**
* 居住成员1是否参加几轮全员核算检测数字1-10
*/
private Integer hesuanCount;
private Integer heSuanCount;
/**
* 居住成员1新冠疫苗接种情况;1:已全程接种2未全程接种0未接种

24
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java

@ -6,6 +6,7 @@ import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IcResiCollectDao;
import com.epmet.dao.IcResiMemberDao;
import com.epmet.dto.IcNeighborHoodDTO;
import com.epmet.dto.form.IcResiCollectFormDTO;
import com.epmet.entity.IcResiCollectEntity;
@ -28,7 +29,8 @@ import java.util.List;
public class IcResiCollectServiceImpl extends BaseServiceImpl<IcResiCollectDao, IcResiCollectEntity> implements IcResiCollectService {
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private IcResiMemberDao icResiMemberDao;
@Override
@Transactional(rollbackFor = Exception.class)
@ -36,14 +38,20 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl<IcResiCollectDao,
IcResiCollectEntity origin=baseDao.selectByAddress(formDTO.getAddress());
if(null==origin){
//插入主表、成员表
IcResiCollectEntity insert=ConvertUtils.sourceToTarget(formDTO,IcResiCollectEntity.class);
if("internal".equals(formDTO.getOrigin())){
//查询楼栋个信息
IcNeighborHoodDTO neighborHoodDTO=queryIcNeighborHood(formDTO.getVillageId());
IcResiCollectEntity insert = ConvertUtils.sourceToTarget(formDTO, IcResiCollectEntity.class);
if ("internal".equals(formDTO.getOrigin())) {
//根据小区id查询网格相关信息
IcNeighborHoodDTO neighborHoodDTO = queryIcNeighborHood(formDTO.getVillageId());
insert.setGridId(neighborHoodDTO.getGridId());
insert.setAgencyId(neighborHoodDTO.getAgencyId());
insert.setPids(neighborHoodDTO.getAgencyPids());
}
List<IcResiMemberEntity> memberList=ConvertUtils.sourceToTarget(formDTO.getMemberList(),IcResiMemberEntity.class);
baseDao.insert(insert);
List<IcResiMemberEntity> memberList = ConvertUtils.sourceToTarget(formDTO.getMemberList(), IcResiMemberEntity.class);
memberList.forEach(mem -> {
mem.setIcResiCollectId(insert.getId());
icResiMemberDao.insert(mem);
});
}else{
//查询成员表

Loading…
Cancel
Save