Browse Source

Merge remote-tracking branch 'origin/dev_epidemic_situation' into dev_epidemic_situation

master
jianjun 3 years ago
parent
commit
f172892aa5
  1. 9
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcVaccineListResultDTO.java
  2. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineEntity.java
  3. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
  4. 115
      epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml

9
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcVaccineListResultDTO.java

@ -20,17 +20,16 @@ import java.util.Date;
public class IcVaccineListResultDTO implements Serializable { public class IcVaccineListResultDTO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 核酸记录Id
*/
@ExcelIgnore
private String icNatId;
/** /**
* 组织Id * 组织Id
*/ */
@ExcelIgnore @ExcelIgnore
private String agencyId; private String agencyId;
private String vaccineId;
private String userId;
/** /**
* 居民端小程序的人resi;数字社区的居民icresi;未关联上的other * 居民端小程序的人resi;数字社区的居民icresi;未关联上的other
*/ */

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

@ -1,5 +1,7 @@
package com.epmet.entity; package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
@ -24,6 +26,7 @@ public class IcVaccineEntity extends BaseEpmetEntity {
/** /**
* 客户Id customer.id * 客户Id customer.id
*/ */
@TableField(fill = FieldFill.INSERT_UPDATE)
private String customerId; private String customerId;
/** /**
@ -84,6 +87,6 @@ public class IcVaccineEntity extends BaseEpmetEntity {
/** /**
* 备注 * 备注
*/ */
private String remaek; private String remark;
} }

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java

@ -171,7 +171,7 @@ public class IcVaccineServiceImpl extends BaseServiceImpl<IcVaccineDao, IcVaccin
IcVaccineExcelImportListener listener = new IcVaccineExcelImportListener(userId, agencyId, loginUserDetails.getOrgIdPath().replace(":".concat(agencyId), ""), this); IcVaccineExcelImportListener listener = new IcVaccineExcelImportListener(userId, agencyId, loginUserDetails.getOrgIdPath().replace(":".concat(agencyId), ""), this);
EasyExcel.read(filePath.toFile(), IcNatImportExcelData.class, listener).headRowNumber(2).sheet(0).doRead(); EasyExcel.read(filePath.toFile(), IcVaccineImportExcelData.class, listener).headRowNumber(2).sheet(0).doRead();
Path errorDescFile = null; Path errorDescFile = null;
String errorDesFileUrl = null; String errorDesFileUrl = null;
@ -188,7 +188,7 @@ public class IcVaccineServiceImpl extends BaseServiceImpl<IcVaccineDao, IcVaccin
if (errorRows.size() > 0) { if (errorRows.size() > 0) {
try { try {
// 文件生成 // 文件生成
Path errorDescDir = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_nat", "import", "error_des"); Path errorDescDir = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_vaccine", "import", "error_des");
String fileName = UUID.randomUUID().toString().concat(".xlsx"); String fileName = UUID.randomUUID().toString().concat(".xlsx");
errorDescFile = errorDescDir.resolve(fileName); errorDescFile = errorDescDir.resolve(fileName);

115
epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml

@ -32,79 +32,68 @@
<select id="getIcVaccineList" resultType="com.epmet.dto.result.NatListResultDTO"> <select id="getIcVaccineList" resultType="com.epmet.dto.result.NatListResultDTO">
SELECT SELECT
a.ic_nat_id icNatId, a.IC_VACCINE_ID AS vaccineId,
a.agency_id agencyId, a.agency_id,
a.user_type userType, a.user_type,
b.user_id userId, b.`name`,
b.is_resi_user isResiUser, b.mobile,
b.`name` `name`, b.id_card,
b.mobile mobile, b.INOCULATE_TIME,
b.id_card idCard, b.INOCULATE_ADDRESS,
b.nat_time natTime, b.MANUFACTURER
b.nat_result natResult, FROM ic_vaccine_relation a
b.nat_address natAddress INNER JOIN ic_vaccine b ON a.IC_VACCINE_ID = b.ID AND b.DEL_FLAG = '0'
FROM WHERE a.DEL_FLAG = '0'
ic_nat_relation a AND a.customer_id = #{customerId}
INNER JOIN ic_nat b ON a.IC_NAT_ID = b.ID
WHERE
a.DEL_FLAG = '0'
AND b.DEL_FLAG = '0'
AND a.customer_id = #{customerId}
AND a.pids like concat('%', #{agencyId}, '%') AND a.pids like concat('%', #{agencyId}, '%')
<if test='null != name and "" != name'> <if test='null != name and "" != name'>
AND b.name like concat('%', #{name}, '%') AND b.name like concat('%', #{name}, '%')
</if> </if>
<if test='null != mobile and "" != mobile'> <if test='null != mobile and "" != mobile'>
AND b.mobile = #{mobile} AND b.mobile = #{mobile}
</if> </if>
<if test='null != idCard and "" != idCard'> <if test='null != idCard and "" != idCard'>
AND b.id_card = #{idCard} AND b.id_card = #{idCard}
</if> </if>
<if test='null != startTime and "" != startTime'> <if test='null != startTime and "" != startTime'>
AND b.nat_time <![CDATA[ >= ]]> #{startTime} AND b.INOCULATE_TIME <![CDATA[ >= ]]> #{startTime}
</if> </if>
<if test='null != endTime and "" != endTime'> <if test='null != endTime and "" != endTime'>
AND b.nat_time <![CDATA[ <= ]]> #{endTime} AND b.INOCULATE_TIME <![CDATA[ <= ]]> #{endTime}
</if> </if>
<if test='null != isResiUser and "" != isResiUser'> ORDER BY b.INOCULATE_TIME DESC, b.id ASC
AND b.is_resi_user = #{isResiUser}
</if>
ORDER BY b.nat_time DESC, b.id ASC
</select> </select>
<select id="getCustomerIcVaccineList" resultType="com.epmet.dto.result.NatListResultDTO"> <select id="getCustomerIcVaccineList" resultType="com.epmet.dto.result.NatListResultDTO">
SELECT SELECT
id icNatId, id vaccineId,
user_id userId,
is_resi_user isResiUser, is_resi_user isResiUser,
user_type userType, user_type userType,
`name` `name`, `name` `name`,
mobile mobile, mobile mobile,
id_card idCard, id_card idCard,
nat_time natTime, INOCULATE_TIME ,
nat_result natResult, INOCULATE_ADDRESS,
nat_address natAddress MANUFACTURER
FROM FROM ic_vaccine
ic_nat WHERE del_flag = '0'
WHERE AND customer_id = #{customerId}
del_flag = '0' <if test='null != name and "" != name'>
AND customer_id = #{customerId} AND name like concat('%', #{name}, '%')
<if test='null != name and "" != name'> </if>
AND name like concat('%', #{name}, '%') <if test='null != mobile and "" != mobile'>
</if> AND mobile = #{mobile}
<if test='null != mobile and "" != mobile'> </if>
AND mobile = #{mobile} <if test='null != idCard and "" != idCard'>
</if> AND id_card = #{idCard}
<if test='null != idCard and "" != idCard'> </if>
AND id_card = #{idCard} <if test='null != startTime and "" != startTime'>
</if> AND INOCULATE_TIME <![CDATA[ >= ]]> #{startTime}
<if test='null != startTime and "" != startTime'> </if>
AND nat_time <![CDATA[ >= ]]> #{startTime} <if test='null != endTime and "" != endTime'>
</if> AND INOCULATE_TIME <![CDATA[ <= ]]> #{endTime}
<if test='null != endTime and "" != endTime'> </if>
AND nat_time <![CDATA[ <= ]]> #{endTime} ORDER BY INOCULATE_TIME DESC, id ASC
</if>
ORDER BY nat_time DESC, id ASC
</select> </select>
<select id="getNatDTO" resultType="com.epmet.dto.IcNatDTO"> <select id="getNatDTO" resultType="com.epmet.dto.IcNatDTO">

Loading…
Cancel
Save