Browse Source

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

dev
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 {
private static final long serialVersionUID = 1L;
/**
* 核酸记录Id
*/
@ExcelIgnore
private String icNatId;
/**
* 组织Id
*/
@ExcelIgnore
private String agencyId;
private String vaccineId;
private String userId;
/**
* 居民端小程序的人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;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
@ -24,6 +26,7 @@ public class IcVaccineEntity extends BaseEpmetEntity {
/**
* 客户Id customer.id
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
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);
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;
String errorDesFileUrl = null;
@ -188,7 +188,7 @@ public class IcVaccineServiceImpl extends BaseServiceImpl<IcVaccineDao, IcVaccin
if (errorRows.size() > 0) {
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");
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
a.ic_nat_id icNatId,
a.agency_id agencyId,
a.user_type userType,
b.user_id userId,
b.is_resi_user isResiUser,
b.`name` `name`,
b.mobile mobile,
b.id_card idCard,
b.nat_time natTime,
b.nat_result natResult,
b.nat_address natAddress
FROM
ic_nat_relation a
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}
a.IC_VACCINE_ID AS vaccineId,
a.agency_id,
a.user_type,
b.`name`,
b.mobile,
b.id_card,
b.INOCULATE_TIME,
b.INOCULATE_ADDRESS,
b.MANUFACTURER
FROM ic_vaccine_relation a
INNER JOIN ic_vaccine b ON a.IC_VACCINE_ID = b.ID AND b.DEL_FLAG = '0'
WHERE a.DEL_FLAG = '0'
AND a.customer_id = #{customerId}
AND a.pids like concat('%', #{agencyId}, '%')
<if test='null != name and "" != name'>
AND b.name like concat('%', #{name}, '%')
</if>
<if test='null != mobile and "" != mobile'>
AND b.mobile = #{mobile}
</if>
<if test='null != idCard and "" != idCard'>
AND b.id_card = #{idCard}
</if>
<if test='null != startTime and "" != startTime'>
AND b.nat_time <![CDATA[ >= ]]> #{startTime}
</if>
<if test='null != endTime and "" != endTime'>
AND b.nat_time <![CDATA[ <= ]]> #{endTime}
</if>
<if test='null != isResiUser and "" != isResiUser'>
AND b.is_resi_user = #{isResiUser}
</if>
ORDER BY b.nat_time DESC, b.id ASC
<if test='null != name and "" != name'>
AND b.name like concat('%', #{name}, '%')
</if>
<if test='null != mobile and "" != mobile'>
AND b.mobile = #{mobile}
</if>
<if test='null != idCard and "" != idCard'>
AND b.id_card = #{idCard}
</if>
<if test='null != startTime and "" != startTime'>
AND b.INOCULATE_TIME <![CDATA[ >= ]]> #{startTime}
</if>
<if test='null != endTime and "" != endTime'>
AND b.INOCULATE_TIME <![CDATA[ <= ]]> #{endTime}
</if>
ORDER BY b.INOCULATE_TIME DESC, b.id ASC
</select>
<select id="getCustomerIcVaccineList" resultType="com.epmet.dto.result.NatListResultDTO">
SELECT
id icNatId,
user_id userId,
id vaccineId,
is_resi_user isResiUser,
user_type userType,
`name` `name`,
mobile mobile,
id_card idCard,
nat_time natTime,
nat_result natResult,
nat_address natAddress
FROM
ic_nat
WHERE
del_flag = '0'
AND customer_id = #{customerId}
<if test='null != name and "" != name'>
AND name like concat('%', #{name}, '%')
</if>
<if test='null != mobile and "" != mobile'>
AND mobile = #{mobile}
</if>
<if test='null != idCard and "" != idCard'>
AND id_card = #{idCard}
</if>
<if test='null != startTime and "" != startTime'>
AND nat_time <![CDATA[ >= ]]> #{startTime}
</if>
<if test='null != endTime and "" != endTime'>
AND nat_time <![CDATA[ <= ]]> #{endTime}
</if>
ORDER BY nat_time DESC, id ASC
INOCULATE_TIME ,
INOCULATE_ADDRESS,
MANUFACTURER
FROM ic_vaccine
WHERE del_flag = '0'
AND customer_id = #{customerId}
<if test='null != name and "" != name'>
AND name like concat('%', #{name}, '%')
</if>
<if test='null != mobile and "" != mobile'>
AND mobile = #{mobile}
</if>
<if test='null != idCard and "" != idCard'>
AND id_card = #{idCard}
</if>
<if test='null != startTime and "" != startTime'>
AND INOCULATE_TIME <![CDATA[ >= ]]> #{startTime}
</if>
<if test='null != endTime and "" != endTime'>
AND INOCULATE_TIME <![CDATA[ <= ]]> #{endTime}
</if>
ORDER BY INOCULATE_TIME DESC, id ASC
</select>
<select id="getNatDTO" resultType="com.epmet.dto.IcNatDTO">

Loading…
Cancel
Save