Browse Source

列表啊

master
zxc 3 years ago
parent
commit
aa5c2aaccf
  1. 3
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EmployeeRegisterListFormDTO.java
  2. 3
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EmployeeRegisterListResultDTO.java
  3. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcEmployeeRegisterDao.java
  5. 18
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterServiceImpl.java
  6. 87
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEmployeeRegisterDao.xml

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

@ -5,6 +5,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* @Author zxc * @Author zxc
@ -47,4 +48,6 @@ public class EmployeeRegisterListFormDTO extends PageFormDTO implements Serializ
*/ */
@NotBlank(message = "registerId不能为空",groups = RegisterDetailList.class) @NotBlank(message = "registerId不能为空",groups = RegisterDetailList.class)
private String registerId; private String registerId;
private List<String> registerIds;
} }

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

@ -21,6 +21,8 @@ public class EmployeeRegisterListResultDTO implements Serializable {
private String latestNatTime; private String latestNatTime;
private String registerId; private String registerId;
private String agencyId;
public EmployeeRegisterListResultDTO() { public EmployeeRegisterListResultDTO() {
this.placeOrgName = ""; this.placeOrgName = "";
this.name = ""; this.name = "";
@ -29,5 +31,6 @@ public class EmployeeRegisterListResultDTO implements Serializable {
this.ymjzCount = NumConstant.ZERO; this.ymjzCount = NumConstant.ZERO;
this.latestNatTime = ""; this.latestNatTime = "";
this.registerId = ""; this.registerId = "";
this.agencyId = "";
} }
} }

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

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

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

@ -1,6 +1,7 @@
package com.epmet.dao; package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcEmployeeRegisterDTO;
import com.epmet.dto.form.EmployeeRegisterListFormDTO; import com.epmet.dto.form.EmployeeRegisterListFormDTO;
import com.epmet.dto.result.EmployeeRegisterListResultDTO; import com.epmet.dto.result.EmployeeRegisterListResultDTO;
import com.epmet.entity.IcEmployeeRegisterEntity; import com.epmet.entity.IcEmployeeRegisterEntity;
@ -41,6 +42,7 @@ public interface IcEmployeeRegisterDao extends BaseDao<IcEmployeeRegisterEntity>
* @Date 2022/10/27 09:15 * @Date 2022/10/27 09:15
*/ */
List<EmployeeRegisterListResultDTO> employeeRegisterList(EmployeeRegisterListFormDTO formDTO); List<EmployeeRegisterListResultDTO> employeeRegisterList(EmployeeRegisterListFormDTO formDTO);
List<EmployeeRegisterListResultDTO> employeeRegisterListNoCheck(EmployeeRegisterListFormDTO formDTO);
/** /**
* @Description 员工疫情管理详情列表 * @Description 员工疫情管理详情列表

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

@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* 员工登记表 * 员工登记表
@ -144,14 +145,21 @@ public class IcEmployeeRegisterServiceImpl extends BaseServiceImpl<IcEmployeeReg
formDTO.setAgencyId(staffInfo.getAgencyId()); formDTO.setAgencyId(staffInfo.getAgencyId());
PageData<EmployeeRegisterListResultDTO> result = new PageData<>(); PageData<EmployeeRegisterListResultDTO> result = new PageData<>();
List<EmployeeRegisterListResultDTO> list; List<EmployeeRegisterListResultDTO> list;
// 未核酸检测的查询,根据所有企业下登记过的员工,筛出时间段内已检测的,剩下的就是未检测
if (formDTO.getIsPage()){ if (formDTO.getIsPage()){
PageInfo<EmployeeRegisterListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.employeeRegisterList(formDTO)); PageInfo<EmployeeRegisterListResultDTO> pageInfo = new PageInfo<>();
if (formDTO.getCheckStatus().equals(NumConstant.ONE_STR)){
pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.employeeRegisterList(formDTO));
}else {
// 已检测
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));
}
}
result.setList(pageInfo.getList()); result.setList(pageInfo.getList());
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal())));
}else {
list = baseDao.employeeRegisterList(formDTO);
result.setList(list);
result.setTotal(list.size());
} }
return result; return result;
} }

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

@ -36,44 +36,22 @@
ier.ID_CARD, ier.ID_CARD,
ier.ENTERPRISE_ID, ier.ENTERPRISE_ID,
ie.PLACE_ORG_NAME, ie.PLACE_ORG_NAME,
ie.PLACE_CATEGORY ie.PLACE_CATEGORY,
ie.AGENCY_ID
FROM ic_enterprise ie FROM ic_enterprise ie
INNER join ic_employee_register ier ON ier.ENTERPRISE_ID = ie.ID AND ier.DEL_FLAG = 0 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 left JOIN ic_employee_register_detail rd ON rd.REGISTER_ID = ier.ID AND rd.DEL_FLAG = 0
WHERE ie.DEL_FLAG = 0 WHERE ie.DEL_FLAG = 0
AND CONCAT(ie.AGENCY_PIDS,':',ie.AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%') AND CONCAT(ie.AGENCY_PIDS,':',ie.AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%')
<if test='null == checkStatus or checkStatus == ""'>
<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>
</if>
ORDER BY rd.CREATED_TIME DESC ORDER BY rd.CREATED_TIME DESC
)t )t
where 1=1 where 1=1
<choose> <if test='null != natStartDate and natStartDate != ""'>
<when test='checkStatus == "1" '> AND DATE_FORMAT(LATEST_NAT_TIME,'%Y-%m-%d') >= #{natStartDate}
<if test='null != natStartDate and natStartDate != ""'> </if>
AND DATE_FORMAT(LATEST_NAT_TIME,'%Y-%m-%d') >= #{natStartDate} <if test='null != natEndDate and natEndDate != ""'>
</if> AND DATE_FORMAT(LATEST_NAT_TIME,'%Y-%m-%d') <![CDATA[<=]]> #{natEndDate}
<if test='null != natEndDate and natEndDate != ""'> </if>
AND DATE_FORMAT(LATEST_NAT_TIME,'%Y-%m-%d') <![CDATA[<=]]> #{natEndDate}
</if>
</when>
<when test='checkStatus == "0" '>
<if test='null != natStartDate and natStartDate != ""'>
AND DATE_FORMAT(LATEST_NAT_TIME,'%Y-%m-%d') <![CDATA[<=]]> #{natStartDate}
</if>
<if test='null != natEndDate and natEndDate != ""'>
AND DATE_FORMAT(LATEST_NAT_TIME,'%Y-%m-%d') >= #{natEndDate}
</if>
</when>
<otherwise>
</otherwise>
</choose>
<if test='null != placeOrgName and placeOrgName != ""'> <if test='null != placeOrgName and placeOrgName != ""'>
AND PLACE_ORG_NAME LIKE CONCAT('%',#{placeOrgName},'%') AND PLACE_ORG_NAME LIKE CONCAT('%',#{placeOrgName},'%')
</if> </if>
@ -102,6 +80,7 @@
rd.YMJZ_COUNT, rd.YMJZ_COUNT,
rd.LATEST_NAT_TIME, rd.LATEST_NAT_TIME,
ie.PLACE_ORG_NAME, ie.PLACE_ORG_NAME,
ie.AGENCY_ID,
ier.ID AS registerId ier.ID AS registerId
FROM ic_employee_register ier FROM ic_employee_register ier
LEFT JOIN ic_enterprise ie ON ie.ID = ier.ENTERPRISE_ID AND ie.DEL_FLAG = 0 LEFT JOIN ic_enterprise ie ON ie.ID = ier.ENTERPRISE_ID AND ie.DEL_FLAG = 0
@ -116,4 +95,52 @@
</if> </if>
ORDER BY rd.LATEST_NAT_TIME DESC,rd.CREATED_TIME desc ORDER BY rd.LATEST_NAT_TIME DESC,rd.CREATED_TIME desc
</select> </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 registerId NOT IN (
<foreach collection="registerIds" item="id" separator=",">
#{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> </mapper>
Loading…
Cancel
Save