Browse Source

Merge branch 'master' of http://121.42.41.42:7070/r/epmet-cloud into dev_tripreport

master
yinzuomei 3 years ago
parent
commit
8004402485
  1. 10
      epmet-cloud-generator/src/main/resources/template/Controller.java.vm
  2. 4
      epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm
  3. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  4. 3
      epmet-gateway/src/main/resources/bootstrap.yml
  5. 9
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java
  6. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  7. 9
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
  8. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  9. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerAgencyDao.xml
  10. 19
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java
  11. 1
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml
  12. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/constant/NeighborhoodConstant.java
  13. 97
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcEmployeeRegisterDTO.java
  14. 74
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcEmployeeRegisterDetailDTO.java
  15. 91
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcGroupPeopleRegisterDTO.java
  16. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/DetailByTypeFormDTO.java
  17. 53
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EmployeeRegisterListFormDTO.java
  18. 14
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EnterpriseFormDTO.java
  19. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EnterprisePageFormDTO.java
  20. 27
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GroupPeopleRegisterListFormDTO.java
  21. 36
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EmployeeRegisterListResultDTO.java
  22. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EnterpriseDetailDTO.java
  23. 21
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GroupPeopleRegisterListResultDTO.java
  24. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java
  25. 117
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEmployeeRegisterController.java
  26. 72
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEmployeeRegisterDetailController.java
  27. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEnterpriseController.java
  28. 99
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcGroupPeopleRegisterController.java
  29. 55
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcEmployeeRegisterDao.java
  30. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcEmployeeRegisterDetailDao.java
  31. 22
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcGroupPeopleRegisterDao.java
  32. 44
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEmployeeRegisterDetailEntity.java
  33. 49
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEmployeeRegisterEntity.java
  34. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEnterpriseChangeRecordEntity.java
  35. 15
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEnterpriseEntity.java
  36. 49
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcGroupPeopleRegisterEntity.java
  37. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/EnterpriseExportExcelDTO.java
  38. 27
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/EnterpriseImportExcelDTO.java
  39. 24
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcEnterpriseExcelImportListener.java
  40. 78
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEmployeeRegisterDetailService.java
  41. 95
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEmployeeRegisterService.java
  42. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEnterpriseService.java
  43. 88
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcGroupPeopleRegisterService.java
  44. 83
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterDetailServiceImpl.java
  45. 195
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterServiceImpl.java
  46. 157
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEnterpriseServiceImpl.java
  47. 133
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcGroupPeopleRegisterServiceImpl.java
  48. 24
      epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.45__place_category.sql
  49. 48
      epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.46__ic_employee.sql
  50. BIN
      epmet-module/gov-org/gov-org-server/src/main/resources/excel/enterprise_patrol_import_tem.xlsx
  51. 152
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEmployeeRegisterDao.xml
  52. 6
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEmployeeRegisterDetailDao.xml
  53. 5
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEnterpriseDao.xml
  54. 29
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcGroupPeopleRegisterDao.xml
  55. 1
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.79__epidemic_special_attention_idcard.sql

10
epmet-cloud-generator/src/main/resources/template/Controller.java.vm

@ -2,7 +2,6 @@ package ${package}.controller;
import ${main}.commons.tools.aop.NoRepeatSubmit;
import ${main}.commons.tools.page.PageData;
import ${main}.commons.tools.utils.ExcelUtils;
import ${main}.commons.tools.utils.Result;
import ${main}.commons.tools.validator.AssertUtils;
import ${main}.commons.tools.validator.ValidatorUtils;
@ -10,7 +9,6 @@ import ${main}.commons.tools.validator.group.AddGroup;
import ${main}.commons.tools.validator.group.UpdateGroup;
import ${main}.commons.tools.validator.group.DefaultGroup;
import ${package}.dto.${className}DTO;
import ${package}.excel.${className}Excel;
import ${package}.service.${className}Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -71,12 +69,4 @@ public class ${className}Controller {
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<${className}DTO> list = ${classname}Service.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, ${className}Excel.class);
}
}

4
epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm

@ -9,7 +9,6 @@ import ${package}.commons.tools.constant.FieldConstant;
import ${package}.dao.${className}Dao;
import ${package}.dto.${className}DTO;
import ${package}.entity.${className}Entity;
import ${package}.redis.${className}Redis;
import ${package}.service.${className}Service;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -29,9 +28,6 @@ import java.util.Map;
@Service
public class ${className}ServiceImpl extends BaseServiceImpl<${className}Dao, ${className}Entity> implements ${className}Service {
@Autowired
private ${className}Redis ${classname}Redis;
@Override
public PageData<${className}DTO> page(Map<String, Object> params) {
IPage<${className}Entity> page = baseDao.selectPage(

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -267,6 +267,7 @@ public enum EpmetErrorCode {
NAT_RESULT_IS_NULL_ERROR(8932,"检测结果不能为空"),
SAMPLE_TIME_IS_NULL_ERROR(8933,"采样时间不能为空"),
SAMPLE_TIME_AND_RESULT_IS_NULL_ERROR(8934,"检测时间或结果不能为空"),
ID_CARD_ERROR(8935,"请输入正确的身份证号或护照号"),
DANGER_AREA_ERROR(8937,"风险地区已存在"),

3
epmet-gateway/src/main/resources/bootstrap.yml

@ -522,6 +522,9 @@ epmet:
- /gov/org/ichouse/houseoption
- /epmetuser/icresicollect/save
- /gov/org/customergrid/gridoption
# 员工登记、受众群体登记
- /gov/org/icEmployeeRegister/add
- /gov/org/icGroupPeopleRegister/add
# 外部应用认证,使用AccessToken等头进行认证
externalOpenUrls:
- /data/report/**

9
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java

@ -26,6 +26,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/**
* 机关单位信息表
@ -110,4 +111,12 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
List<String> getSubAgencyList(@Param("agencyId") String agencyId);
List<ScreenCustomerAgencyDTO> getSubAgencyListByAgency(@Param("customerId") String customerId, @Param("agencyId") String agencyId);
/**
* @Description 查询员工的证件号和手机号
* @param registerId
* @Author zxc
* @Date 2022/10/27 14:03
*/
Map<String, String> getEmployeeRegisterMobileAndIdCard(@Param("registerId") String registerId);
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -1095,6 +1095,14 @@ public class EpmetUserServiceImpl implements EpmetUserService {
result.setIdCard(info.get(NeighborhoodConstant.ID_CARD));
result.setMobile(info.get(NeighborhoodConstant.MOBILE));
msg.setContent("查看"+info.get(NeighborhoodConstant.NAME)+"的敏感信息(核酸检测信息)");
}else if (formDTO.getType().equals(NeighborhoodConstant.EMPLOYEE_EPIDEMIC_MANAGE_DETAIL)){
Map<String, String> info = govOrgService.getEmployeeRegisterMobileAndIdCard(formDTO.getId());
if (null == info){
throw new EpmetException("未查询到员工登记信息:"+formDTO.getId());
}
result.setIdCard(info.get(NeighborhoodConstant.ID_CARD));
result.setMobile(info.get(NeighborhoodConstant.MOBILE));
msg.setContent("查看"+info.get(NeighborhoodConstant.NAME)+"的敏感信息(员工登记信息)");
}
// 发送mq消息
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();

9
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java

@ -17,6 +17,7 @@ import com.epmet.dto.IcNeighborHoodDTO;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* @Author zxc
@ -292,4 +293,12 @@ public interface GovOrgService {
ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String customerId, String agencyId, Boolean isGetSubAllGrid);
/**
* @Description 查询员工的证件号和手机号
* @param registerId
* @Author zxc
* @Date 2022/10/27 14:03
*/
Map<String,String> getEmployeeRegisterMobileAndIdCard(String registerId);
}

11
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -1523,4 +1523,15 @@ public class GovOrgServiceImpl implements GovOrgService {
return resultDTO;
}
/**
* @Description 查询员工的证件号和手机号
* @param registerId
* @Author zxc
* @Date 2022/10/27 14:03
*/
@Override
public Map<String, String> getEmployeeRegisterMobileAndIdCard(String registerId) {
return customerAgencyDao.getEmployeeRegisterMobileAndIdCard(registerId);
}
}

5
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerAgencyDao.xml

@ -326,4 +326,9 @@
AND pid = #{agencyId}
</select>
<!-- 查询员工的证件号和手机号 -->
<select id="getEmployeeRegisterMobileAndIdCard" resultType="java.util.Map">
select MOBILE,ID_CARD from ic_employee_register where id = #{registerId}
</select>
</mapper>

19
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java

@ -17,6 +17,7 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
@ -46,6 +47,7 @@ import com.epmet.redis.IssueVoteDetailRedis;
import com.epmet.service.IssueService;
import com.epmet.service.IssueVoteDetailService;
import com.epmet.utils.ModuleConstants;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -207,10 +209,21 @@ public class IssueVoteDetailServiceImpl extends BaseServiceImpl<IssueVoteDetailD
}else {
resultDTO.setJoinVote(false);
}*/
IssueVoteDetailDTO issueVoteDetailDTO=baseDao.selectUserIssueDet(checkVoteFormDTO.getUserId(),checkVoteFormDTO.getIssueId());
if(null!=issueVoteDetailDTO){
// 查询issue_vote_detail 表校验当前用户是否投过票,因为生产数据老是出现一个人多条记录的情况,改用下面的方法
// IssueVoteDetailDTO issueVoteDetailDTO=baseDao.selectUserIssueDet(checkVoteFormDTO.getUserId(),checkVoteFormDTO.getIssueId());
// if(null!=issueVoteDetailDTO){
// resultDTO.setJoinVote(true);
// resultDTO.setAttitude(issueVoteDetailDTO.getAttitude());
// return resultDTO;
// }
LambdaQueryWrapper<IssueVoteDetailEntity> queryWrapper=new LambdaQueryWrapper<>();
queryWrapper.eq(IssueVoteDetailEntity::getIssueId,checkVoteFormDTO.getIssueId())
.eq(IssueVoteDetailEntity::getCreatedBy,checkVoteFormDTO.getUserId())
.orderByDesc(IssueVoteDetailEntity::getCreatedTime);
List<IssueVoteDetailEntity> list=baseDao.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(list)){
resultDTO.setJoinVote(true);
resultDTO.setAttitude(issueVoteDetailDTO.getAttitude());
resultDTO.setAttitude(list.get(0).getAttitude());
return resultDTO;
}
if (issuePublisher > NumConstant.ZERO || publisherResult.getCheckTopicPublisher() > NumConstant.ZERO){

1
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml

@ -39,6 +39,7 @@
del_flag = 0
AND issue_id = #{issueId}
AND created_by = #{userId}
order by CREATED_TIME desc limit 1
</select>
<!-- 议题表决折线图 -->

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/constant/NeighborhoodConstant.java

@ -63,4 +63,9 @@ public interface NeighborhoodConstant {
*/
String FOCUS_GROUP_SPECIAL_ATTENTION_HISTORY = "focusGroupSpecialAttentionHistory";
/**
* 员工疫情管理详情
*/
String EMPLOYEE_EPIDEMIC_MANAGE_DETAIL = "employeeEpidemicManageDetail";
}

97
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcEmployeeRegisterDTO.java

@ -0,0 +1,97 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* 员工登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Data
public class IcEmployeeRegisterDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
@NotBlank(message = "customerId不能为空",groups = {AddGroup.class})
private String customerId;
/**
* 场所id
*/
@NotBlank(message = "enterpriseId不能为空",groups = {AddGroup.class})
private String enterpriseId;
/**
* 姓名
*/
@NotBlank(message = "name不能为空",groups = {AddGroup.class})
private String name;
/**
* 手机号
*/
@NotBlank(message = "mobile不能为空",groups = {AddGroup.class})
private String mobile;
/**
* 身份证号或护照号
*/
@NotBlank(message = "idCard不能为空",groups = {AddGroup.class})
private String idCard;
@NotNull(message = "ymjzCount不能为空",groups = {AddGroup.class})
private Integer ymjzCount;
@NotNull(message = "latestNatTime不能为空",groups = {AddGroup.class})
@JsonFormat(pattern="yyyy-MM-dd")
private Date latestNatTime;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

74
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcEmployeeRegisterDetailDTO.java

@ -0,0 +1,74 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 员工登记明细表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Data
public class IcEmployeeRegisterDetailDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* ic_employee_register.ID
*/
private String registerId;
/**
* 疫苗接种次数0,1,2,3
*/
private Integer ymjzCount;
/**
* 最近一次核酸检测时间yyyy-MM-dd 日期
*/
private Date latestNatTime;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

91
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcGroupPeopleRegisterDTO.java

@ -0,0 +1,91 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* 受众群体登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Data
public class IcGroupPeopleRegisterDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
@NotBlank(message = "customerId不能为空",groups = {AddGroup.class})
private String customerId;
/**
* 场所id
*/
@NotBlank(message = "enterpriseId不能为空",groups = {AddGroup.class})
private String enterpriseId;
/**
* 核酸检测时间yyyy-MM-dd 日期
*/
@NotNull(message = "natTime不能为空",groups = {AddGroup.class})
@JsonFormat(pattern="yyyy-MM-dd")
private Date natTime;
/**
* 受众人数
*/
@NotNull(message = "szTotal不能为空",groups = {AddGroup.class})
private Integer szTotal;
/**
* 核酸检测人数
*/
@NotNull(message = "customerId不能为空",groups = {AddGroup.class})
private Integer hsjcTotal;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/DetailByTypeFormDTO.java

@ -17,6 +17,19 @@ public class DetailByTypeFormDTO implements Serializable {
public interface DetailByTypeForm{}
/**
* 房屋checkHouse
* 居民checkIcResiUser
* 居民防疫信息JMFYXX
* 行程随访routeFollow
* 疫苗接种记录vaccinationRecord
* 疫苗接种关注名单vaccineSpecialAttention
* 未做核酸比对noNatCompare
* 核酸检测记录natRecord
* 重点人群关注名单防疫隔离focusGroupSpecialAttentionQuarantine
* 重点人群关注名单历史记录focusGroupSpecialAttentionHistory
* 员工疫情管理详情employeeEpidemicManageDetail
*/
@NotBlank(message = "type不能为空",groups = DetailByTypeForm.class)
private String type;

53
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EmployeeRegisterListFormDTO.java

@ -0,0 +1,53 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/10/27 09:01
*/
@Data
public class EmployeeRegisterListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = -5327830228503748858L;
private String customerId;
private String staffId;
private String agencyId;
/**
* 核酸检测开始结束日期eg2022-02-02
*/
private String natStartDate;
private String natEndDate;
/**
* 检查状态1已检测0未检测
*/
private String checkStatus;
private String placeOrgName;
/**
* 场所类别0九小场所1企事业单位
*/
private String placeCategory;
private String name;
private String mobile;
private String idCard;
public interface RegisterDetailList{}
/**
* 人员详情列表使用
*/
@NotBlank(message = "registerId不能为空",groups = RegisterDetailList.class)
private String registerId;
private List<String> registerIds;
}

14
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EnterpriseFormDTO.java

@ -5,6 +5,7 @@ import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@ -44,6 +45,14 @@ public class EnterpriseFormDTO implements Serializable {
@NotBlank(message = "场所类型不能为空", groups = {AddShow.class})
private String placeType;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
@NotBlank(message = "场所类别不能为空", groups = {AddShow.class})
private String placeCategory;
/**
* 场所名称
*/
@ -77,9 +86,12 @@ public class EnterpriseFormDTO implements Serializable {
3:41-100人
4:100人以上
*/
@NotBlank(message = "规模不能为空", groups = {AddShow.class})
// @NotBlank(message = "规模不能为空", groups = {AddShow.class})
private String scale;
@NotNull(message = "规模不能为空",groups ={AddShow.class} )
private Integer scaleTotal;
/**
* 场所负责人
*/

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EnterprisePageFormDTO.java

@ -18,7 +18,7 @@ public class EnterprisePageFormDTO implements Serializable {
* 场所类型
*/
private String placeType;
private String placeCategory;
/**
* 场所名称
*/

27
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GroupPeopleRegisterListFormDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/10/27 10:47
*/
@Data
public class GroupPeopleRegisterListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 6837328932168590069L;
private String customerId;
private String staffId;
private String agencyId;
/**
* 核酸检测开始结束日期eg2022-02-02
*/
private String natStartDate;
private String natEndDate;
private String placeOrgName;
}

36
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EmployeeRegisterListResultDTO.java

@ -0,0 +1,36 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/10/27 09:10
*/
@Data
public class EmployeeRegisterListResultDTO implements Serializable {
private static final long serialVersionUID = -7966608283208846072L;
private String placeOrgName;
private String name;
private String mobile;
private String idCard;
private Integer ymjzCount;
private String latestNatTime;
private String registerId;
private String agencyId;
public EmployeeRegisterListResultDTO() {
this.placeOrgName = "";
this.name = "";
this.mobile = "";
this.idCard = "";
this.ymjzCount = NumConstant.ZERO;
this.latestNatTime = "";
this.registerId = "";
this.agencyId = "";
}
}

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EnterpriseDetailDTO.java

@ -37,7 +37,19 @@ public class EnterpriseDetailDTO implements Serializable {
* 场所类型来源于ic_coverage_category_dict
*/
private String placeType;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
private String placeCategory;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
private String placeCategoryName;
/**
* 场所类型名称
*/
@ -73,6 +85,7 @@ public class EnterpriseDetailDTO implements Serializable {
*/
private String scale;
private Integer scaleTotal;
/**
* 规模名称
*/

21
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GroupPeopleRegisterListResultDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/10/27 10:53
*/
@Data
public class GroupPeopleRegisterListResultDTO implements Serializable {
private static final long serialVersionUID = -3000826126115218664L;
private String placeOrgName;
private String natTime;
private String szTotal;
private String hsjcTotal;
private String id;
private String agencyId;
}

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java

@ -89,4 +89,7 @@ public interface CustomerAgencyConstant {
String AREA_CODE_SWITCH_CLOSED="closed";
String AREA_CODE_SWITCH_OPEN="open";
String JUMP_URL = "http://192.168.1.140/epmet-oper-gov/#/staffRegister?";
// String JUMP_URL = "https://epmet-open.elinkservice.cn/epmet-oper-gov/#/staffRegister?";
}

117
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEmployeeRegisterController.java

@ -0,0 +1,117 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.MaskResponse;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcEmployeeRegisterDTO;
import com.epmet.dto.form.EmployeeRegisterListFormDTO;
import com.epmet.dto.result.EmployeeRegisterListResultDTO;
import com.epmet.service.IcEmployeeRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 员工登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@RestController
@RequestMapping("icEmployeeRegister")
public class IcEmployeeRegisterController {
@Autowired
private IcEmployeeRegisterService icEmployeeRegisterService;
@RequestMapping("page")
public Result<PageData<IcEmployeeRegisterDTO>> page(@RequestParam Map<String, Object> params){
PageData<IcEmployeeRegisterDTO> page = icEmployeeRegisterService.page(params);
return new Result<PageData<IcEmployeeRegisterDTO>>().ok(page);
}
@PostMapping(value = "{id}")
public Result<IcEmployeeRegisterDTO> get(@PathVariable("id") String id){
IcEmployeeRegisterDTO data = icEmployeeRegisterService.get(id);
return new Result<IcEmployeeRegisterDTO>().ok(data);
}
/**
* @Description 新增 员工登记http://yapi.elinkservice.cn/project/102/interface/api/8214
* @param dto
* @Author zxc
* @Date 2022/10/27 08:57
*/
@NoRepeatSubmit
@PostMapping("add")
public Result save(@RequestBody IcEmployeeRegisterDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icEmployeeRegisterService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody IcEmployeeRegisterDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icEmployeeRegisterService.update(dto);
return new Result();
}
/**
* @Description 批量删除 http://yapi.elinkservice.cn/project/102/interface/api/8238
* @param ids
* @Author zxc
* @Date 2022/10/27 08:57
*/
@PostMapping("delete")
public Result delete(@LoginUser TokenDto tokenDto,@RequestBody List<String> ids){
icEmployeeRegisterService.delete(ids,tokenDto.getUserId());
return new Result();
}
/**
* @Description 员工疫情管理列表
* @param formDTO
* @param tokenDto
* @Author zxc
* @Date 2022/10/27 09:15
*/
@PostMapping("list")
@MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD })
public Result<PageData<EmployeeRegisterListResultDTO>> employeeRegisterList(@RequestBody EmployeeRegisterListFormDTO formDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
return new Result<PageData<EmployeeRegisterListResultDTO>>().ok(icEmployeeRegisterService.employeeRegisterList(formDTO));
}
/**
* @Description 员工疫情管理详情列表
* @param formDTO
* @param tokenDto
* @Author zxc
* @Date 2022/10/27 09:22
*/
@PostMapping("detailList")
@MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD })
public Result<PageData<EmployeeRegisterListResultDTO>> employeeRegisterDetailList(@RequestBody EmployeeRegisterListFormDTO formDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class, EmployeeRegisterListFormDTO.RegisterDetailList.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
return new Result<PageData<EmployeeRegisterListResultDTO>>().ok(icEmployeeRegisterService.employeeRegisterDetailList(formDTO));
}
}

72
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEmployeeRegisterDetailController.java

@ -0,0 +1,72 @@
package com.epmet.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.IcEmployeeRegisterDetailDTO;
import com.epmet.service.IcEmployeeRegisterDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 员工登记明细表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@RestController
@RequestMapping("icEmployeeRegisterDetail")
public class IcEmployeeRegisterDetailController {
@Autowired
private IcEmployeeRegisterDetailService icEmployeeRegisterDetailService;
@RequestMapping("page")
public Result<PageData<IcEmployeeRegisterDetailDTO>> page(@RequestParam Map<String, Object> params){
PageData<IcEmployeeRegisterDetailDTO> page = icEmployeeRegisterDetailService.page(params);
return new Result<PageData<IcEmployeeRegisterDetailDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<IcEmployeeRegisterDetailDTO> get(@PathVariable("id") String id){
IcEmployeeRegisterDetailDTO data = icEmployeeRegisterDetailService.get(id);
return new Result<IcEmployeeRegisterDetailDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody IcEmployeeRegisterDetailDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icEmployeeRegisterDetailService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody IcEmployeeRegisterDetailDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icEmployeeRegisterDetailService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
icEmployeeRegisterDetailService.delete(ids);
return new Result();
}
}

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEnterpriseController.java

@ -343,4 +343,20 @@ public class IcEnterpriseController implements ResultDataResolver {
icEnterpriseService.sendEnterprisePatrolRemindMessage();
return new Result();
}
/**
* @Description 登记码导出
* @param formDTO
* @param tokenDto
* @Author zxc
* @Date 2022/10/26 15:55
*/
@PostMapping("qrCodeExport")
public void qrCodeExport(@RequestBody EnterprisePageFormDTO formDTO, @LoginUser TokenDto tokenDto, HttpServletResponse response) throws IOException {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setCurrentStaffId(tokenDto.getUserId());
formDTO.setPageFlag(false);
icEnterpriseService.qrCodeExport(formDTO,response);
}
}

99
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcGroupPeopleRegisterController.java

@ -0,0 +1,99 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcGroupPeopleRegisterDTO;
import com.epmet.dto.form.GroupPeopleRegisterListFormDTO;
import com.epmet.dto.result.GroupPeopleRegisterListResultDTO;
import com.epmet.service.IcGroupPeopleRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 受众群体登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@RestController
@RequestMapping("icGroupPeopleRegister")
public class IcGroupPeopleRegisterController {
@Autowired
private IcGroupPeopleRegisterService icGroupPeopleRegisterService;
@RequestMapping("page")
public Result<PageData<IcGroupPeopleRegisterDTO>> page(@RequestParam Map<String, Object> params){
PageData<IcGroupPeopleRegisterDTO> page = icGroupPeopleRegisterService.page(params);
return new Result<PageData<IcGroupPeopleRegisterDTO>>().ok(page);
}
@PostMapping(value = "{id}")
public Result<IcGroupPeopleRegisterDTO> get(@PathVariable("id") String id){
IcGroupPeopleRegisterDTO data = icGroupPeopleRegisterService.get(id);
return new Result<IcGroupPeopleRegisterDTO>().ok(data);
}
/**
* 受众群体登记 http://yapi.elinkservice.cn/project/102/interface/api/8220
* @param dto
* @return
*/
@NoRepeatSubmit
@PostMapping("add")
public Result save(@RequestBody IcGroupPeopleRegisterDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icGroupPeopleRegisterService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody IcGroupPeopleRegisterDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icGroupPeopleRegisterService.update(dto);
return new Result();
}
/**
* 受众群体管理删除
* http://yapi.elinkservice.cn/project/102/interface/api/8250
* @param ids
* @return
*/
@PostMapping("delete")
public Result delete(@LoginUser TokenDto tokenDto,@RequestBody List<String> ids){
icGroupPeopleRegisterService.delete(ids,tokenDto.getUserId());
return new Result();
}
/**
* @Description 受众群体列表 http://yapi.elinkservice.cn/project/102/interface/api/8244
* @param tokenDto
* @param formDTO
* @Author zxc
* @Date 2022/10/27 10:51
*/
@PostMapping("list")
public Result<PageData<GroupPeopleRegisterListResultDTO>> groupPeopleRegisterList(@LoginUser TokenDto tokenDto, @RequestBody GroupPeopleRegisterListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
return new Result<PageData<GroupPeopleRegisterListResultDTO>>().ok(icGroupPeopleRegisterService.groupPeopleRegisterList(formDTO));
}
}

55
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcEmployeeRegisterDao.java

@ -0,0 +1,55 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcEmployeeRegisterDTO;
import com.epmet.dto.form.EmployeeRegisterListFormDTO;
import com.epmet.dto.result.EmployeeRegisterListResultDTO;
import com.epmet.entity.IcEmployeeRegisterEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 员工登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Mapper
public interface IcEmployeeRegisterDao extends BaseDao<IcEmployeeRegisterEntity> {
/**
* @Description 根据身份证查询是否存在
* @param idCard
* @Author zxc
* @Date 2022/10/26 17:34
*/
IcEmployeeRegisterEntity getEmployeeRegisterByIdCard(@Param("idCard")String idCard);
/**
* @Description 根据主表ID删除子表
* @param registerIds
* @Author zxc
* @Date 2022/10/26 17:34
*/
void delRegisterDetail(@Param("registerIds")List<String> registerIds,@Param("operUserId")String operUserId);
/**
* @Description 员工疫情管理列表
* @param formDTO
* @Author zxc
* @Date 2022/10/27 09:15
*/
List<EmployeeRegisterListResultDTO> employeeRegisterList(EmployeeRegisterListFormDTO formDTO);
List<EmployeeRegisterListResultDTO> employeeRegisterListNoCheck(EmployeeRegisterListFormDTO formDTO);
/**
* @Description 员工疫情管理详情列表
* @param formDTO
* @Author zxc
* @Date 2022/10/27 13:24
*/
List<EmployeeRegisterListResultDTO> employeeRegisterDetailList(EmployeeRegisterListFormDTO formDTO);
}

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcEmployeeRegisterDetailDao.java

@ -0,0 +1,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcEmployeeRegisterDetailEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 员工登记明细表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Mapper
public interface IcEmployeeRegisterDetailDao extends BaseDao<IcEmployeeRegisterDetailEntity> {
}

22
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcGroupPeopleRegisterDao.java

@ -0,0 +1,22 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.GroupPeopleRegisterListFormDTO;
import com.epmet.dto.result.GroupPeopleRegisterListResultDTO;
import com.epmet.entity.IcGroupPeopleRegisterEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 受众群体登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Mapper
public interface IcGroupPeopleRegisterDao extends BaseDao<IcGroupPeopleRegisterEntity> {
List<GroupPeopleRegisterListResultDTO> groupPeopleRegisterList(GroupPeopleRegisterListFormDTO formDTO);
}

44
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEmployeeRegisterDetailEntity.java

@ -0,0 +1,44 @@
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;
/**
* 员工登记明细表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_employee_register_detail")
public class IcEmployeeRegisterDetailEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* ic_employee_register.ID
*/
private String registerId;
/**
* 疫苗接种次数0,1,2,3
*/
private Integer ymjzCount;
/**
* 最近一次核酸检测时间yyyy-MM-dd 日期
*/
private Date latestNatTime;
}

49
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEmployeeRegisterEntity.java

@ -0,0 +1,49 @@
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;
/**
* 员工登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_employee_register")
public class IcEmployeeRegisterEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 场所id
*/
private String enterpriseId;
/**
* 姓名
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 身份证号或护照号
*/
private String idCard;
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEnterpriseChangeRecordEntity.java

@ -76,6 +76,10 @@ public class IcEnterpriseChangeRecordEntity extends BaseEpmetEntity {
*/
private String scale;
/**
* 规模手输数字
*/
private Integer scaleTotal;
/**
* 场所负责人
*/

15
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEnterpriseEntity.java

@ -45,6 +45,12 @@ public class IcEnterpriseEntity extends BaseEpmetEntity {
*/
private String placeType;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
private String placeCategory;
/**
* 场所名称
*/
@ -66,7 +72,8 @@ public class IcEnterpriseEntity extends BaseEpmetEntity {
private String latitude;
/**
* 字典value,场所规模
* 10.26需求此列就不再用了
* 字典value,场所规模
0:10人以下
1:10-20人
2:21-40人
@ -75,6 +82,12 @@ public class IcEnterpriseEntity extends BaseEpmetEntity {
*/
private String scale;
/**
* 10.26需求
* 规模手输数字
*/
private Integer scaleTotal;
/**
* 场所负责人
*/

49
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcGroupPeopleRegisterEntity.java

@ -0,0 +1,49 @@
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;
/**
* 受众群体登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_group_people_register")
public class IcGroupPeopleRegisterEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 场所id
*/
private String enterpriseId;
/**
* 核酸检测时间yyyy-MM-dd 日期
*/
private Date natTime;
/**
* 受众人数
*/
private Integer szTotal;
/**
* 核酸检测人数
*/
private Integer hsjcTotal;
}

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/EnterpriseExportExcelDTO.java

@ -22,7 +22,22 @@ public class EnterpriseExportExcelDTO {
@ExcelProperty(value = "场所类型")
@ColumnWidth(25)
private String placeTypeName;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
@ExcelIgnore
private String placeCategory;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
@ExcelProperty(value = "场所类别")
@ColumnWidth(25)
private String placeCategoryName;
/**
* 网格所属的组织Id
@ -70,6 +85,7 @@ public class EnterpriseExportExcelDTO {
@ExcelIgnore
private String scale;
private Integer scaleTotal;
/**
* 规模名称
*/

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

@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
@ -21,6 +22,16 @@ public class EnterpriseImportExcelDTO {
private String placeTypeName;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
@NotBlank(message = "场所类别不能为空")
@ExcelProperty(value = "场所类别")
private String placeCategoryName;
@NotBlank(message = "场所区域不能为空")
@ExcelProperty(value = "场所区域")
private String gridName;
@ -46,10 +57,11 @@ public class EnterpriseImportExcelDTO {
* 2:21-40人
* 3:41-100人
* 4:100人以上
* 改为手输数字了
*/
@NotBlank(message = "规模不能为空")
@NotNull(message = "规模不能为空")
@ExcelProperty(value = "规模")
private String scaleName;
private Integer scaleTotal;
/**
* 场所负责人
@ -72,6 +84,15 @@ public class EnterpriseImportExcelDTO {
@ExcelProperty(value = "场所类型")
private String placeTypeName;
/**
* 10.26需求
* 场所类别0九小场所1企事业单位
* 默认0
*/
@ColumnWidth(20)
@ExcelProperty(value = "场所类别(九小场所/企事业单位)")
private String placeCategoryName;
@ColumnWidth(20)
@ExcelProperty(value = "场所区域")
private String gridName;
@ -89,7 +110,7 @@ public class EnterpriseImportExcelDTO {
@ColumnWidth(20)
@ExcelProperty(value = "规模")
private String scaleName;
private Integer scaleTotal;
@ColumnWidth(20)
@ExcelProperty(value = "负责人")

24
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcEnterpriseExcelImportListener.java

@ -54,6 +54,12 @@ public class IcEnterpriseExcelImportListener implements ReadListener<EnterpriseI
this.gridMap=gridMap;
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
// 最后几条达不到阈值,这里必须再调用一次
execPersist();
}
@Override
public void invoke(EnterpriseImportExcelDTO data, AnalysisContext context) {
@ -70,9 +76,9 @@ public class IcEnterpriseExcelImportListener implements ReadListener<EnterpriseI
if(!placeTypeMap.containsKey(data.getPlaceTypeName())){
throw new ValidateException(String.format("【%s】场所类型不存在",data.getPlaceTypeName()));
}
if(!scaleMap.containsKey(data.getScaleName())){
/*if(!scaleMap.containsKey(data.getScaleName())){
throw new ValidateException(String.format("【%s】规模不存在",data.getScaleName()));
}
}*/
IcEnterpriseEntity enterpriseEntity = ConvertUtils.sourceToTarget(data, IcEnterpriseEntity.class);
enterpriseEntity.setCustomerId(currentCustomerId);
//网格id
@ -85,8 +91,9 @@ public class IcEnterpriseExcelImportListener implements ReadListener<EnterpriseI
enterpriseEntity.setLongitude(StrConstant.EPMETY_STR);
enterpriseEntity.setLatitude(StrConstant.EPMETY_STR);
//规模
enterpriseEntity.setScale(scaleMap.get(data.getScaleName()));
// enterpriseEntity.setScale(scaleMap.get(data.getScaleName()));
enterpriseEntity.setScaleTotal(data.getScaleTotal());
enterpriseEntity.setPlaceCategory("九小场所".equals(data.getPlaceCategoryName()) ? "0" : "1");
//网格id+场所名称
List<IcEnterpriseEntity> originList=icEnterpriseServiceImpl.selectForUniqueName(enterpriseEntity.getGridId(),enterpriseEntity.getPlaceOrgName(),null);
@ -117,10 +124,11 @@ public class IcEnterpriseExcelImportListener implements ReadListener<EnterpriseI
}
EnterpriseImportExcelDTO.ErrorRow errorRow = new EnterpriseImportExcelDTO.ErrorRow();
errorRow.setPlaceTypeName(data.getPlaceTypeName());
errorRow.setPlaceCategoryName(data.getPlaceCategoryName());
errorRow.setGridName(data.getGridName());
errorRow.setPlaceOrgName(data.getPlaceOrgName());
errorRow.setAddress(data.getAddress());
errorRow.setScaleName(data.getScaleName());
errorRow.setScaleTotal(data.getScaleTotal());
errorRow.setPersonInCharge(data.getPersonInCharge());
errorRow.setMobile(data.getMobile());
errorRow.setErrorInfo(errorMsg);
@ -128,12 +136,6 @@ public class IcEnterpriseExcelImportListener implements ReadListener<EnterpriseI
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
// 最后几条达不到阈值,这里必须再调用一次
execPersist();
}
/**
* 执行持久化
*/

78
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEmployeeRegisterDetailService.java

@ -0,0 +1,78 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcEmployeeRegisterDetailDTO;
import com.epmet.entity.IcEmployeeRegisterDetailEntity;
import java.util.List;
import java.util.Map;
/**
* 员工登记明细表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
public interface IcEmployeeRegisterDetailService extends BaseService<IcEmployeeRegisterDetailEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcEmployeeRegisterDetailDTO>
* @author generator
* @date 2022-10-26
*/
PageData<IcEmployeeRegisterDetailDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcEmployeeRegisterDetailDTO>
* @author generator
* @date 2022-10-26
*/
List<IcEmployeeRegisterDetailDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcEmployeeRegisterDetailDTO
* @author generator
* @date 2022-10-26
*/
IcEmployeeRegisterDetailDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-10-26
*/
void save(IcEmployeeRegisterDetailDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-10-26
*/
void update(IcEmployeeRegisterDetailDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-10-26
*/
void delete(String[] ids);
}

95
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEmployeeRegisterService.java

@ -0,0 +1,95 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcEmployeeRegisterDTO;
import com.epmet.dto.form.EmployeeRegisterListFormDTO;
import com.epmet.dto.result.EmployeeRegisterListResultDTO;
import com.epmet.entity.IcEmployeeRegisterEntity;
import java.util.List;
import java.util.Map;
/**
* 员工登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
public interface IcEmployeeRegisterService extends BaseService<IcEmployeeRegisterEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcEmployeeRegisterDTO>
* @author generator
* @date 2022-10-26
*/
PageData<IcEmployeeRegisterDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcEmployeeRegisterDTO>
* @author generator
* @date 2022-10-26
*/
List<IcEmployeeRegisterDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcEmployeeRegisterDTO
* @author generator
* @date 2022-10-26
*/
IcEmployeeRegisterDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-10-26
*/
void save(IcEmployeeRegisterDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-10-26
*/
void update(IcEmployeeRegisterDTO dto);
/**
* 批量删除
* @param ids
* @return void
* @author generator
* @date 2022-10-26
*/
void delete(List<String> ids,String operUserId);
/**
* @Description 员工疫情管理列表
* @param formDTO
* @Author zxc
* @Date 2022/10/27 09:15
*/
PageData<EmployeeRegisterListResultDTO> employeeRegisterList(EmployeeRegisterListFormDTO formDTO);
/**
* @Description 员工疫情管理详情列表
* @param formDTO
* @Author zxc
* @Date 2022/10/27 09:22
*/
PageData<EmployeeRegisterListResultDTO> employeeRegisterDetailList(EmployeeRegisterListFormDTO formDTO);
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEnterpriseService.java

@ -10,7 +10,11 @@ import com.epmet.dto.result.EnterpriseDetailDTO;
import com.epmet.dto.result.EnterprisePatrolResultDTO;
import com.epmet.entity.IcEnterpriseEntity;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
/**
@ -91,4 +95,12 @@ public interface IcEnterpriseService extends BaseService<IcEnterpriseEntity> {
*/
PageData<EnterpriseDetailDTO> page(Map<String, Object> params);
/**
* @Description 登记码导出
* @param formDTO
* @Author zxc
* @Date 2022/10/26 15:55
*/
void qrCodeExport(EnterprisePageFormDTO formDTO, HttpServletResponse response) throws IOException;
}

88
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcGroupPeopleRegisterService.java

@ -0,0 +1,88 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcGroupPeopleRegisterDTO;
import com.epmet.dto.form.GroupPeopleRegisterListFormDTO;
import com.epmet.dto.result.GroupPeopleRegisterListResultDTO;
import com.epmet.entity.IcGroupPeopleRegisterEntity;
import java.util.List;
import java.util.Map;
/**
* 受众群体登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
public interface IcGroupPeopleRegisterService extends BaseService<IcGroupPeopleRegisterEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcGroupPeopleRegisterDTO>
* @author generator
* @date 2022-10-26
*/
PageData<IcGroupPeopleRegisterDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcGroupPeopleRegisterDTO>
* @author generator
* @date 2022-10-26
*/
List<IcGroupPeopleRegisterDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcGroupPeopleRegisterDTO
* @author generator
* @date 2022-10-26
*/
IcGroupPeopleRegisterDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-10-26
*/
void save(IcGroupPeopleRegisterDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-10-26
*/
void update(IcGroupPeopleRegisterDTO dto);
/**
* 批量删除
* @param ids
* @return void
* @author generator
* @date 2022-10-26
*/
void delete(List<String> ids,String operUserId);
/**
* @Description 受众群体列表
* @param formDTO
* @Author zxc
* @Date 2022/10/27 10:51
*/
PageData<GroupPeopleRegisterListResultDTO> groupPeopleRegisterList(GroupPeopleRegisterListFormDTO formDTO);
}

83
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterDetailServiceImpl.java

@ -0,0 +1,83 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.IcEmployeeRegisterDetailDao;
import com.epmet.dto.IcEmployeeRegisterDetailDTO;
import com.epmet.entity.IcEmployeeRegisterDetailEntity;
import com.epmet.service.IcEmployeeRegisterDetailService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 员工登记明细表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Service
public class IcEmployeeRegisterDetailServiceImpl extends BaseServiceImpl<IcEmployeeRegisterDetailDao, IcEmployeeRegisterDetailEntity> implements IcEmployeeRegisterDetailService {
@Override
public PageData<IcEmployeeRegisterDetailDTO> page(Map<String, Object> params) {
IPage<IcEmployeeRegisterDetailEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IcEmployeeRegisterDetailDTO.class);
}
@Override
public List<IcEmployeeRegisterDetailDTO> list(Map<String, Object> params) {
List<IcEmployeeRegisterDetailEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcEmployeeRegisterDetailDTO.class);
}
private QueryWrapper<IcEmployeeRegisterDetailEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcEmployeeRegisterDetailEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcEmployeeRegisterDetailDTO get(String id) {
IcEmployeeRegisterDetailEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcEmployeeRegisterDetailDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcEmployeeRegisterDetailDTO dto) {
IcEmployeeRegisterDetailEntity entity = ConvertUtils.sourceToTarget(dto, IcEmployeeRegisterDetailEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IcEmployeeRegisterDetailDTO dto) {
IcEmployeeRegisterDetailEntity entity = ConvertUtils.sourceToTarget(dto, IcEmployeeRegisterDetailEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

195
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterServiceImpl.java

@ -0,0 +1,195 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.IdCardRegexUtils;
import com.epmet.dao.IcEmployeeRegisterDao;
import com.epmet.dto.IcEmployeeRegisterDTO;
import com.epmet.dto.form.EmployeeRegisterListFormDTO;
import com.epmet.dto.result.EmployeeRegisterListResultDTO;
import com.epmet.entity.IcEmployeeRegisterDetailEntity;
import com.epmet.entity.IcEmployeeRegisterEntity;
import com.epmet.service.IcEmployeeRegisterDetailService;
import com.epmet.service.IcEmployeeRegisterService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.RegExUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 员工登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Service
public class IcEmployeeRegisterServiceImpl extends BaseServiceImpl<IcEmployeeRegisterDao, IcEmployeeRegisterEntity> implements IcEmployeeRegisterService {
@Autowired
private IcEmployeeRegisterDetailService icEmployeeRegisterDetailService;
@Override
public PageData<IcEmployeeRegisterDTO> page(Map<String, Object> params) {
IPage<IcEmployeeRegisterEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IcEmployeeRegisterDTO.class);
}
@Override
public List<IcEmployeeRegisterDTO> list(Map<String, Object> params) {
List<IcEmployeeRegisterEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcEmployeeRegisterDTO.class);
}
private QueryWrapper<IcEmployeeRegisterEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcEmployeeRegisterEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcEmployeeRegisterDTO get(String id) {
IcEmployeeRegisterEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcEmployeeRegisterDTO.class);
}
/**
* @Description 新增
* @param dto
* @Author zxc
* @Date 2022/10/27 08:57
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcEmployeeRegisterDTO dto) {
if (!IdCardRegexUtils.validateIdCard(dto.getIdCard())) {
throw new EpmetException(EpmetErrorCode.ID_CARD_ERROR.getCode());
}
IcEmployeeRegisterDetailEntity detailEntity = ConvertUtils.sourceToTarget(dto, IcEmployeeRegisterDetailEntity.class);
// 先看看存在不
IcEmployeeRegisterEntity origin = baseDao.getEmployeeRegisterByIdCard(dto.getIdCard());
if (null == origin){
IcEmployeeRegisterEntity insertEntity = ConvertUtils.sourceToTarget(dto, IcEmployeeRegisterEntity.class);
insert(insertEntity);
detailEntity.setRegisterId(insertEntity.getId());
}else {
if(!origin.getName().equals(dto.getName())||!origin.getMobile().equals(dto.getMobile())){
origin.setMobile(dto.getMobile());
origin.setName(dto.getName());
origin.setUpdatedTime(new Date());
updateById(origin);
}
detailEntity.setRegisterId(origin.getId());
}
icEmployeeRegisterDetailService.insert(detailEntity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IcEmployeeRegisterDTO dto) {
IcEmployeeRegisterEntity entity = ConvertUtils.sourceToTarget(dto, IcEmployeeRegisterEntity.class);
updateById(entity);
}
/**
* @Description 批量删除
* @param ids
* @Author zxc
* @Date 2022/10/27 08:57
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(List<String> ids,String operUserId) {
if (CollectionUtils.isNotEmpty(ids)){
LambdaUpdateWrapper<IcEmployeeRegisterEntity> updateWrapper=new LambdaUpdateWrapper<>();
updateWrapper.in(IcEmployeeRegisterEntity::getId,ids);
updateWrapper.set(IcEmployeeRegisterEntity::getDelFlag, NumConstant.ONE_STR)
.set(IcEmployeeRegisterEntity::getUpdatedBy,operUserId)
.set(IcEmployeeRegisterEntity::getUpdatedTime,new Date());
baseDao.update(null,updateWrapper);
baseDao.delRegisterDetail(ids,operUserId);
}
}
/**
* @Description 员工疫情管理列表
* @param formDTO
* @Author zxc
* @Date 2022/10/27 09:15
*/
@Override
public PageData<EmployeeRegisterListResultDTO> employeeRegisterList(EmployeeRegisterListFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo){
throw new EpmetException("未查询到工作人员信息:"+formDTO.getStaffId());
}
formDTO.setAgencyId(staffInfo.getAgencyId());
PageData<EmployeeRegisterListResultDTO> result = new PageData<>();
// 未核酸检测的查询,根据所有企业下登记过的员工,筛出时间段内已检测的,剩下的就是未检测
if (formDTO.getIsPage()){
PageInfo<EmployeeRegisterListResultDTO> pageInfo = new PageInfo<>();
if (StringUtils.isNotBlank(formDTO.getCheckStatus()) && formDTO.getCheckStatus().equals(NumConstant.ZERO_STR)){
// 已检测
List<EmployeeRegisterListResultDTO> checked = baseDao.employeeRegisterList(formDTO);
if (CollectionUtils.isNotEmpty(checked)){
formDTO.setRegisterIds(checked.stream().map(m -> m.getRegisterId()).collect(Collectors.toList()));
pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.employeeRegisterListNoCheck(formDTO));
}
}else {
pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.employeeRegisterList(formDTO));
}
result.setList(pageInfo.getList());
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal())));
}
return result;
}
/**
* @Description 员工疫情管理详情列表
* @param formDTO
* @Author zxc
* @Date 2022/10/27 09:22
*/
@Override
public PageData<EmployeeRegisterListResultDTO> employeeRegisterDetailList(EmployeeRegisterListFormDTO formDTO) {
PageData<EmployeeRegisterListResultDTO> result = new PageData<>();
List<EmployeeRegisterListResultDTO> list;
if (formDTO.getIsPage()){
PageInfo<EmployeeRegisterListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.employeeRegisterDetailList(formDTO));
result.setList(pageInfo.getList());
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal())));
}else {
list = baseDao.employeeRegisterDetailList(formDTO);
result.setTotal(list.size());
result.setList(list);
}
return result;
}
}

157
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEnterpriseServiceImpl.java

@ -1,7 +1,6 @@
package com.epmet.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -13,7 +12,7 @@ import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.CommonOperateTypeEnum;
import com.epmet.commons.tools.enums.CoveragePlaceTypeEnum;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.enums.EnvEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
@ -23,14 +22,10 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.FileUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.*;
import com.epmet.constant.SmsTemplateConstant;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.*;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.entity.*;
@ -47,7 +42,6 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
@ -60,12 +54,21 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import static com.epmet.service.impl.HouseServiceImpl.bufferedImageToInputStream;
/**
* 企事业单位表
@ -251,15 +254,23 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic
} else {
resultDto.setPlaceTypeName(coverageCategoryDictDao.selectCategoryName(Constant.DEFAULT_CUSTOMER, CoveragePlaceTypeEnum.ENTERPRISE_PATROL.getCode(), resultDto.getPlaceType()));
}
// 原规模,已废弃
// Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode());
// Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>();
// resultDto.setScaleName(dictMap.containsKey(resultDto.getScale()) ? dictMap.get(resultDto.getScale()) : StrConstant.EPMETY_STR);
//规模名称
Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode());
Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>();
resultDto.setScaleName(dictMap.containsKey(resultDto.getScale()) ? dictMap.get(resultDto.getScale()) : StrConstant.EPMETY_STR);
resultDto.setScaleName(resultDto.getScaleTotal()+"人");
if (StringUtils.isNotBlank(enterpriseEntity.getLatestResult()) && "0".equals(enterpriseEntity.getLatestResult())) {
resultDto.setLatestResultName("合格");
} else if (StringUtils.isNotBlank(enterpriseEntity.getLatestResult()) && "1".equals(enterpriseEntity.getLatestResult())) {
resultDto.setLatestResultName("不合格");
}
if ("0".equals(resultDto.getPlaceCategory())) {
// 0九小场所、1企事业单位
resultDto.setPlaceCategoryName("九小场所");
} else if ("1".equals(resultDto.getPlaceCategory())) {
resultDto.setPlaceCategoryName("企事业单位");
}
return resultDto;
}
@ -303,13 +314,18 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic
}
//本组织及下级
formDTO.setStaffAgencyId(staffInfo.getAgencyId());
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getPageFlag());
List<EnterpriseDetailDTO> list = baseDao.selectList(formDTO);
List<EnterpriseDetailDTO> list = new ArrayList<>();
if (formDTO.getPageFlag()){
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getPageFlag());
list = baseDao.selectList(formDTO);
}else {
list = baseDao.selectList(formDTO);
}
PageInfo<EnterpriseDetailDTO> pageInfo = new PageInfo<>(list);
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
//规模名称
Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode());
Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>();
//规模名称 已废弃用字典表,改为手动输入数字了
// Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode());
// Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>();
for (EnterpriseDetailDTO detailDTO : list) {
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(detailDTO.getGridId());
if (null != gridInfoCache) {
@ -322,7 +338,14 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic
} else {
detailDTO.setPlaceTypeName(coverageCategoryDictDao.selectCategoryName(Constant.DEFAULT_CUSTOMER, CoveragePlaceTypeEnum.ENTERPRISE_PATROL.getCode(), detailDTO.getPlaceType()));
}
detailDTO.setScaleName(dictMap.containsKey(detailDTO.getScale()) ? dictMap.get(detailDTO.getScale()) : StrConstant.EPMETY_STR);
// detailDTO.setScaleName(dictMap.containsKey(detailDTO.getScale()) ? dictMap.get(detailDTO.getScale()) : StrConstant.EPMETY_STR);
detailDTO.setScaleName(detailDTO.getScaleTotal() + "人");
if ("0".equals(detailDTO.getPlaceCategory())) {
// 0九小场所、1企事业单位
detailDTO.setPlaceCategoryName("九小场所");
} else if ("1".equals(detailDTO.getPlaceCategory())) {
detailDTO.setPlaceCategoryName("企事业单位");
}
}
}
return new PageData<>(list, pageInfo.getTotal());
@ -339,8 +362,9 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic
List<IcCoverageCategoryDictListResultDTO> dictList = coverageService.dictMap(customerId, CoveragePlaceTypeEnum.ENTERPRISE_PATROL.getCode());
Map<String, String> placeTypeMap = dictList.stream().collect(Collectors.toMap(IcCoverageCategoryDictListResultDTO::getLabel, IcCoverageCategoryDictListResultDTO::getValue));
//2、规模名称
Result<List<SysDictDataDTO>> dictMapRes = adminOpenFeignClient.dictDataList(DictTypeEnum.SCALE.getCode());
Map<String, String> scaleMap = dictMapRes.success() && CollectionUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData().stream().collect(Collectors.toMap(SysDictDataDTO::getDictLabel, SysDictDataDTO::getDictValue)) : new HashMap<>();
// Result<List<SysDictDataDTO>> dictMapRes = adminOpenFeignClient.dictDataList(DictTypeEnum.SCALE.getCode());
// Map<String, String> scaleMap = dictMapRes.success() && CollectionUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData().stream().collect(Collectors.toMap(SysDictDataDTO::getDictLabel, SysDictDataDTO::getDictValue)) : new HashMap<>();
Map<String, String> scaleMap=new HashMap<>();
//3、当前工作人员所属组织下的网格列表
List<GridListResultDTO> gridList = customerGridDao.selectGridList(staffInfo.getAgencyId());
if (CollectionUtils.isEmpty(gridList)) {
@ -508,13 +532,13 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic
CustomerGridEntity originGrid = customerGridDao.selectById(origin.getGridId());
Map<String, String> scaleMap;
/*Map<String, String> scaleMap;
Result<Map<String, String>> result = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode());
if (!result.success() || null == result.getData()) {
throw new EpmetException("查询字典信息失败" + JSON.toJSONString(result));
} else {
scaleMap = result.getData();
}
}*/
if (formDTO != null) {
if (!origin.getPlaceType().equals(formDTO.getPlaceType())) {
@ -536,12 +560,16 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic
if (!origin.getPlaceOrgName().equals(formDTO.getPlaceOrgName())) {
record.setPlaceOrgName(origin.getPlaceOrgName().concat("->").concat(formDTO.getPlaceOrgName()));
}
if (!origin.getScale().equals(formDTO.getScale())) {
/*if (!origin.getScale().equals(formDTO.getScale())) {
record.setScale(scaleMap.get(origin.getScale()).concat("->").concat(scaleMap.get(formDTO.getScale())));
} else {
record.setScale(scaleMap.get(origin.getScale()));
}*/
if (origin.getScaleTotal() != formDTO.getScaleTotal()) {
record.setScale(origin.getScaleTotal().toString().concat("->").concat(formDTO.getScaleTotal().toString()));
} else {
record.setScale(origin.getScaleTotal().toString());
}
if (!origin.getPersonInCharge().equals(formDTO.getPersonInCharge())) {
record.setPersonInCharge(origin.getPersonInCharge().concat("->").concat(formDTO.getPersonInCharge()));
}
@ -560,6 +588,89 @@ public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, Ic
record.setUpdatedTime(null);
record.setOriginId(origin.getId());
record.setType(type);
icEnterpriseChangeRecordService.insert(record);
}
/**
* @Description 登记码导出
* 开发环境45687aa479955f9d06204d415238f7cc
* 微笑崂山3fdd0380deff5b30f45376cdf995d1c1
* 烟台1535072605621841922
* 目前只给烟台用为了测试生产微笑崂山也放开
* @param formDTO
* @Author zxc
* @Date 2022/10/26 15:55
*/
@Override
public void qrCodeExport(EnterprisePageFormDTO formDTO, HttpServletResponse response) throws IOException {
if (!"45687aa479955f9d06204d415238f7cc".equals(formDTO.getCustomerId())
&& !"3fdd0380deff5b30f45376cdf995d1c1".equals(formDTO.getCustomerId())
&& !"1535072605621841922".equals(formDTO.getCustomerId())) {
return;
}
List<EnterpriseDetailDTO> list = list(formDTO).getList();
if (CollectionUtils.isEmpty(list)){
log.error("根据条件未查询到企事业单位信息,登记码压缩包不能导出!");
ServletOutputStream outputStream = response.getOutputStream();
outputStream.write("{\"code\":9999,\"msg\":\"未查到企事业单位信息\",\"data\":{}}".getBytes());
outputStream.flush();
return;
}
response.reset();
//文件的名称
String downloadFilename = "登记码压缩包.zip";
//转换中文否则可能会产生乱码
downloadFilename = URLEncoder.encode(downloadFilename, "UTF-8");
// 指明response的返回对象是文件流
response.setContentType("application/octet-stream; charset=UTF-8");
//设置下载格式和名称
response.setHeader("Content-Disposition", "attachment;filename=" + downloadFilename);
ZipOutputStream zip = new ZipOutputStream(response.getOutputStream());
//不同环境的码,访问的地址不一样
String jumpUrl="";
EnvEnum currentEnv = EnvEnum.getCurrentEnv();
if (EnvEnum.PROD.getCode().equals(currentEnv.getCode())) {
if ("1535072605621841922".equals(formDTO.getCustomerId())) {
// 烟台的客户id
jumpUrl = "https://epmet-yantai.elinkservice.cn";
} else if ("3fdd0380deff5b30f45376cdf995d1c1".equals(formDTO.getCustomerId())) {
// 微笑崂山
jumpUrl = "https://epmet-open.elinkservice.cn";
}
} else if (EnvEnum.TEST.getCode().equals(currentEnv.getCode())) {
// 最美琴岛
jumpUrl = "https://epmet-dev.elinkservice.cn/";
} else {
// 其余统一走开发环境
jumpUrl = "http://192.168.1.140";
}
for (EnterpriseDetailDTO l : list) {
try {
// CustomerAgencyConstant.JUMP_URL = "http://192.168.1.140/epmet-oper-gov/#/staffRegister?";
// String content = JUMP_URL + "enterpriseId=" + l.getEnterpriseId() + "&customerId=" + formDTO.getCustomerId() + "&placeOrgName=" + l.getPlaceOrgName();
String content = jumpUrl.concat("/epmet-oper-gov/#/staffRegister?") + "enterpriseId=" + l.getEnterpriseId() + "&customerId=" + formDTO.getCustomerId() + "&placeOrgName=" + l.getPlaceOrgName();
BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(l.getPlaceOrgName(), content);
byte[] buf = new byte[8192];
int len;
//添加到zip
zip.putNextEntry(new ZipEntry(l.getPlaceOrgName()+"_"+l.getEnterpriseId()+".png"));
InputStream inputStream = bufferedImageToInputStream(image);
//输出压缩包
while ((len = inputStream.read(buf)) > 0) {
zip.write(buf, 0, len);
}
inputStream.close();
} catch (IOException e) {
log.error(e.getMessage());
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "组装zip信息有误", "组装zip信息有误");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
zip.close();
}
}

133
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcGroupPeopleRegisterServiceImpl.java

@ -0,0 +1,133 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.IcGroupPeopleRegisterDao;
import com.epmet.dto.IcGroupPeopleRegisterDTO;
import com.epmet.dto.form.GroupPeopleRegisterListFormDTO;
import com.epmet.dto.result.GroupPeopleRegisterListResultDTO;
import com.epmet.entity.IcGroupPeopleRegisterEntity;
import com.epmet.service.IcGroupPeopleRegisterService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 受众群体登记表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-26
*/
@Service
public class IcGroupPeopleRegisterServiceImpl extends BaseServiceImpl<IcGroupPeopleRegisterDao, IcGroupPeopleRegisterEntity> implements IcGroupPeopleRegisterService {
@Override
public PageData<IcGroupPeopleRegisterDTO> page(Map<String, Object> params) {
IPage<IcGroupPeopleRegisterEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IcGroupPeopleRegisterDTO.class);
}
@Override
public List<IcGroupPeopleRegisterDTO> list(Map<String, Object> params) {
List<IcGroupPeopleRegisterEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcGroupPeopleRegisterDTO.class);
}
private QueryWrapper<IcGroupPeopleRegisterEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcGroupPeopleRegisterEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcGroupPeopleRegisterDTO get(String id) {
IcGroupPeopleRegisterEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcGroupPeopleRegisterDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcGroupPeopleRegisterDTO dto) {
IcGroupPeopleRegisterEntity entity = ConvertUtils.sourceToTarget(dto, IcGroupPeopleRegisterEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IcGroupPeopleRegisterDTO dto) {
IcGroupPeopleRegisterEntity entity = ConvertUtils.sourceToTarget(dto, IcGroupPeopleRegisterEntity.class);
updateById(entity);
}
/**
* 受众群体管理删除
* http://yapi.elinkservice.cn/project/102/interface/api/8250
* @param ids
* @param operUserId 当前操作人
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(List<String> ids,String operUserId) {
if (CollectionUtils.isNotEmpty(ids)){
LambdaUpdateWrapper<IcGroupPeopleRegisterEntity> updateWrapper=new LambdaUpdateWrapper<>();
updateWrapper.in(IcGroupPeopleRegisterEntity::getId,ids)
.set(IcGroupPeopleRegisterEntity::getUpdatedBy,operUserId)
.set(IcGroupPeopleRegisterEntity::getUpdatedTime,new Date())
.set(IcGroupPeopleRegisterEntity::getDelFlag, NumConstant.ONE_STR);
baseDao.update(null,updateWrapper);
// baseDao.deleteBatchIds(ids);
}
}
/**
* @Description 受众群体列表
* @param formDTO
* @Author zxc
* @Date 2022/10/27 10:51
*/
@Override
public PageData<GroupPeopleRegisterListResultDTO> groupPeopleRegisterList(GroupPeopleRegisterListFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo){
throw new EpmetException("未查询到工作人员信息:"+formDTO.getStaffId());
}
formDTO.setAgencyId(staffInfo.getAgencyId());
PageData<GroupPeopleRegisterListResultDTO> result = new PageData<>();
List<GroupPeopleRegisterListResultDTO> list;
if (formDTO.getIsPage()){
PageInfo<GroupPeopleRegisterListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.groupPeopleRegisterList(formDTO));
result.setList(pageInfo.getList());
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal())));
}else {
list = baseDao.groupPeopleRegisterList(formDTO);
result.setList(list);
result.setTotal(list.size());
}
return result;
}
}

24
epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.45__place_category.sql

@ -0,0 +1,24 @@
alter table ic_enterprise MODIFY COLUMN `SCALE` varchar(128) NOT NULL DEFAULT'-1' COMMENT '已弃用该字段,字典value,场所规模【\r\n0:10人以下\r\n1:10-20人\r\n2:21-40人\r\n3:41-100人\r\n4:100人以上】';
alter table ic_enterprise ADD COLUMN `SCALE_TOTAL` int(11) NOT NULL COMMENT '规模,手输数字' AFTER SCALE;
alter table ic_enterprise add COLUMN PLACE_CATEGORY varchar(32) NOT NULL DEFAULT '0' COMMENT '场所类别:0九小场所、1企事业单位' after PLACE_TYPE;
update ic_enterprise e
set e.SCALE_TOTAL=5
where e.SCALE=0;
update ic_enterprise e
set e.SCALE_TOTAL=15
where e.SCALE=1;
update ic_enterprise e
set e.SCALE_TOTAL=30
where e.SCALE=2;
update ic_enterprise e
set e.SCALE_TOTAL=70
where e.SCALE=3;
update ic_enterprise e
set e.SCALE_TOTAL=100
where e.SCALE=4;

48
epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.46__ic_employee.sql

@ -0,0 +1,48 @@
CREATE TABLE `ic_employee_register` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
`ENTERPRISE_ID` varchar(64) NOT NULL COMMENT '场所id',
`NAME` varchar(64) NOT NULL COMMENT '姓名',
`MOBILE` varchar(32) NOT NULL COMMENT '手机号',
`ID_CARD` varchar(32) NOT NULL COMMENT '身份证号或护照号',
`DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`),
KEY `IDX_ENTERPRISE_ID` (`ENTERPRISE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='员工登记表';
CREATE TABLE `ic_employee_register_detail` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
`REGISTER_ID` varchar(64) NOT NULL COMMENT 'ic_employee_register.ID',
`YMJZ_COUNT` int(11) NOT NULL COMMENT '疫苗接种次数:0,1,2,3',
`LATEST_NAT_TIME` date NOT NULL COMMENT '最近一次核酸检测时间:yyyy-MM-dd 日期',
`DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`),
KEY `IDX_REGISTER_ID` (`REGISTER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='员工登记明细表';
CREATE TABLE `ic_group_people_register` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
`ENTERPRISE_ID` varchar(64) NOT NULL COMMENT '场所id',
`NAT_TIME` date NOT NULL COMMENT '核酸检测时间:yyyy-MM-dd 日期',
`SZ_TOTAL` int(11) NOT NULL COMMENT '受众人数',
`HSJC_TOTAL` int(11) NOT NULL COMMENT '核酸检测人数',
`DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='受众群体登记表';

BIN
epmet-module/gov-org/gov-org-server/src/main/resources/excel/enterprise_patrol_import_tem.xlsx

Binary file not shown.

152
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEmployeeRegisterDao.xml

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcEmployeeRegisterDao">
<!-- 根据主表ID删除子表 -->
<update id="delRegisterDetail">
update ic_employee_register_detail
set del_flag = 1,
updated_time = NOW(),
UPDATED_BY = #{operUserId}
where REGISTER_ID in (
<foreach collection="registerIds" item="registerId" separator=",">
#{registerId}
</foreach>
)
</update>
<select id="getEmployeeRegisterByIdCard" resultType="com.epmet.entity.IcEmployeeRegisterEntity">
select * from ic_employee_register
where del_flag = 0 and id_card = #{idCard}
</select>
<!-- 员工疫情管理列表 -->
<select id="employeeRegisterList" resultType="com.epmet.dto.result.EmployeeRegisterListResultDTO">
SELECT
t.*
FROM(
SELECT
DISTINCT ier.ID AS registerId,
rd.YMJZ_COUNT,
rd.LATEST_NAT_TIME,
rd.CREATED_TIME,
ier.`NAME`,
ier.MOBILE,
ier.ID_CARD,
ier.ENTERPRISE_ID,
ie.PLACE_ORG_NAME,
ie.PLACE_CATEGORY,
ie.AGENCY_ID
FROM ic_enterprise ie
INNER join ic_employee_register ier ON ier.ENTERPRISE_ID = ie.ID AND ier.DEL_FLAG = 0
left JOIN ic_employee_register_detail rd ON rd.REGISTER_ID = ier.ID AND rd.DEL_FLAG = 0
WHERE ie.DEL_FLAG = 0
AND CONCAT(ie.AGENCY_PIDS,':',ie.AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%')
<if test='null != natStartDate and natStartDate != ""'>
AND DATE_FORMAT(rd.LATEST_NAT_TIME,'%Y-%m-%d') >= #{natStartDate}
</if>
<if test='null != natEndDate and natEndDate != ""'>
AND DATE_FORMAT(rd.LATEST_NAT_TIME,'%Y-%m-%d') <![CDATA[<=]]> #{natEndDate}
</if>
ORDER BY rd.CREATED_TIME DESC
)t
where 1=1
<if test='null != natStartDate and natStartDate != ""'>
AND DATE_FORMAT(LATEST_NAT_TIME,'%Y-%m-%d') >= #{natStartDate}
</if>
<if test='null != natEndDate and natEndDate != ""'>
AND DATE_FORMAT(LATEST_NAT_TIME,'%Y-%m-%d') <![CDATA[<=]]> #{natEndDate}
</if>
<if test='null != placeOrgName and placeOrgName != ""'>
AND PLACE_ORG_NAME LIKE CONCAT('%',#{placeOrgName},'%')
</if>
<if test='null != placeCategory and placeCategory != ""'>
AND PLACE_CATEGORY = #{placeCategory}
</if>
<if test='null != name and name != ""'>
AND name LIKE CONCAT('%',#{name},'%')
</if>
<if test='null != mobile and mobile != ""'>
AND mobile LIKE CONCAT('%',#{mobile},'%')
</if>
<if test='null != idCard and idCard != ""'>
AND ID_CARD LIKE CONCAT('%',#{idCard},'%')
</if>
GROUP BY t.registerId
ORDER BY LATEST_NAT_TIME desc
</select>
<!-- 员工疫情管理详情列表 -->
<select id="employeeRegisterDetailList" resultType="com.epmet.dto.result.EmployeeRegisterListResultDTO">
SELECT
ier.`NAME`,
ier.MOBILE,
ier.ID_CARD,
rd.YMJZ_COUNT,
rd.LATEST_NAT_TIME,
ie.PLACE_ORG_NAME,
ie.AGENCY_ID,
ier.ID AS registerId
FROM ic_employee_register ier
LEFT JOIN ic_enterprise ie ON ie.ID = ier.ENTERPRISE_ID AND ie.DEL_FLAG = 0
LEFT JOIN ic_employee_register_detail rd ON rd.REGISTER_ID = ier.ID AND rd.DEL_FLAG = 0
WHERE ier.DEL_FLAG = 0
AND ier.ID = #{registerId}
<if test='null != natStartDate and natStartDate != "" '>
AND DATE_FORMAT(rd.LATEST_NAT_TIME,'%Y-%m-%d') >= #{natStartDate}
</if>
<if test='null != natEndDate and natEndDate != "" '>
AND DATE_FORMAT(rd.LATEST_NAT_TIME,'%Y-%m-%d') <![CDATA[<=]]> #{natEndDate}
</if>
ORDER BY rd.LATEST_NAT_TIME DESC,rd.CREATED_TIME desc
</select>
<select id="employeeRegisterListNoCheck" resultType="com.epmet.dto.result.EmployeeRegisterListResultDTO">
SELECT
t.*
FROM(
SELECT
DISTINCT ier.ID AS registerId,
rd.YMJZ_COUNT,
rd.LATEST_NAT_TIME,
rd.CREATED_TIME,
ier.`NAME`,
ier.MOBILE,
ier.ID_CARD,
ier.ENTERPRISE_ID,
ie.PLACE_ORG_NAME,
ie.PLACE_CATEGORY,
ie.AGENCY_ID
FROM ic_enterprise ie
INNER join ic_employee_register ier ON ier.ENTERPRISE_ID = ie.ID AND ier.DEL_FLAG = 0
left JOIN ic_employee_register_detail rd ON rd.REGISTER_ID = ier.ID AND rd.DEL_FLAG = 0
WHERE ie.DEL_FLAG = 0
AND CONCAT(ie.AGENCY_PIDS,':',ie.AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%')
ORDER BY rd.CREATED_TIME DESC
)t
where 1=1
AND (
<foreach collection="registerIds" item="id" separator=" AND ">
registerId != #{id}
</foreach>
)
<if test='null != placeOrgName and placeOrgName != ""'>
AND PLACE_ORG_NAME LIKE CONCAT('%',#{placeOrgName},'%')
</if>
<if test='null != placeCategory and placeCategory != ""'>
AND PLACE_CATEGORY = #{placeCategory}
</if>
<if test='null != name and name != ""'>
AND name LIKE CONCAT('%',#{name},'%')
</if>
<if test='null != mobile and mobile != ""'>
AND mobile LIKE CONCAT('%',#{mobile},'%')
</if>
<if test='null != idCard and idCard != ""'>
AND ID_CARD LIKE CONCAT('%',#{idCard},'%')
</if>
GROUP BY t.registerId
ORDER BY LATEST_NAT_TIME desc
</select>
</mapper>

6
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEmployeeRegisterDetailDao.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcEmployeeRegisterDetailDao">
</mapper>

5
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEnterpriseDao.xml

@ -43,11 +43,13 @@
ie.AGENCY_ID,
ie.AGENCY_PIDS,
ie.PLACE_TYPE,
ie.PLACE_CATEGORY,
ie.PLACE_ORG_NAME,
ie.ADDRESS,
ie.LONGITUDE,
ie.LATITUDE,
ie.SCALE,
ie.SCALE_TOTAL,
ie.PERSON_IN_CHARGE,
ie.MOBILE,
ie.SOURCE_TYPE,
@ -74,6 +76,9 @@
<if test='null != placeType and "" != placeType'>
AND ie.PLACE_TYPE = #{placeType}
</if>
<if test='null != placeCategory and "" != placeCategory'>
AND ie.PLACE_CATEGORY = #{placeCategory}
</if>
<if test='null != placeOrgName and "" != placeOrgName'>
AND ie.PLACE_ORG_NAME LIKE concat( '%', #{placeOrgName}, '%' )
</if>

29
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcGroupPeopleRegisterDao.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcGroupPeopleRegisterDao">
<select id="groupPeopleRegisterList" resultType="com.epmet.dto.result.GroupPeopleRegisterListResultDTO">
SELECT
ie.PLACE_ORG_NAME,
pr.ID,
pr.NAT_TIME,
pr.SZ_TOTAL,
pr.HSJC_TOTAL,
ie.AGENCY_ID
FROM ic_enterprise ie
INNER JOIN ic_group_people_register pr ON pr.ENTERPRISE_ID = ie.ID AND pr.DEL_FLAG = 0
WHERE ie.DEL_FLAG = 0
AND CONCAT(ie.AGENCY_PIDS,':',ie.AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%')
<if test='null != placeOrgName and placeOrgName != "" '>
AND ie.PLACE_ORG_NAME LIKE CONCAT('%',#{placeOrgName},'%')
</if>
<if test='null != natStartDate and natStartDate != "" '>
AND DATE_FORMAT(pr.NAT_TIME,'%Y-%m-%d') >= #{natStartDate}
</if>
<if test='null != natEndDate and natEndDate != "" '>
AND DATE_FORMAT(pr.NAT_TIME,'%Y-%m-%d') >= #{natEndDate}
</if>
ORDER BY pr.NAT_TIME DESC,pr.CREATED_TIME desc
</select>
</mapper>

1
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.79__epidemic_special_attention_idcard.sql

@ -0,0 +1 @@
alter table ic_epidemic_special_attention MODIFY COLUMN ID_CARD VARCHAR(32) not null comment '身份证号';
Loading…
Cancel
Save