Browse Source

核酸比对,关系表改为 agency_id+compare_rec_id唯一

dev
yinzuomei 3 years ago
parent
commit
d3a948d58a
  1. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatCompareRecordServiceImpl.java
  2. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/IcNatCompareRecRelationDao.xml

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

@ -285,7 +285,8 @@ public class IcNatCompareRecordServiceImpl extends BaseServiceImpl<IcNatCompareR
.set(IcNatCompareRecordEntity::getLatestImportTime, origin.getLatestImportTime()) .set(IcNatCompareRecordEntity::getLatestImportTime, origin.getLatestImportTime())
.set(IcNatCompareRecordEntity::getInternalRemark, origin.getInternalRemark()); .set(IcNatCompareRecordEntity::getInternalRemark, origin.getInternalRemark());
baseDao.update(null,updateWrapper); baseDao.update(null,updateWrapper);
IcNatCompareRecRelationEntity existRelationEntity=icNatCompareRecRelationDao.selectExist(data.getCustomerId(),origin.getId(),staffInfo.getAgencyId(),importDate); // 关系表 agency_id+compare_rec_id唯一
IcNatCompareRecRelationEntity existRelationEntity = icNatCompareRecRelationDao.selectExist(data.getCustomerId(), origin.getId(), staffInfo.getAgencyId(), null);
if(null!=existRelationEntity){ if(null!=existRelationEntity){
// 是否本社区(agency_id)下居民(0:否 1:是) // 是否本社区(agency_id)下居民(0:否 1:是)
if (null != icResiUserDTO && icResiUserDTO.getAgencyId().equals(staffInfo.getAgencyId())) { if (null != icResiUserDTO && icResiUserDTO.getAgencyId().equals(staffInfo.getAgencyId())) {
@ -295,6 +296,7 @@ public class IcNatCompareRecordServiceImpl extends BaseServiceImpl<IcNatCompareR
} }
//记录最后一次导入时间、最近一次操作人id,最近一次操作人姓名 //记录最后一次导入时间、最近一次操作人id,最近一次操作人姓名
existRelationEntity.setImportTime(importTime); existRelationEntity.setImportTime(importTime);
existRelationEntity.setImportDate(importDate);
existRelationEntity.setStaffId(staffInfo.getStaffId()); existRelationEntity.setStaffId(staffInfo.getStaffId());
existRelationEntity.setStaffName(staffInfo.getRealName()); existRelationEntity.setStaffName(staffInfo.getRealName());
existRelationEntity.setAgencyName(staffInfo.getAgencyName()); existRelationEntity.setAgencyName(staffInfo.getAgencyName());

2
epmet-user/epmet-user-server/src/main/resources/mapper/IcNatCompareRecRelationDao.xml

@ -33,6 +33,8 @@
AND r.CUSTOMER_ID = #{customerId} AND r.CUSTOMER_ID = #{customerId}
AND r.COMPARE_REC_ID = #{compareRecId} AND r.COMPARE_REC_ID = #{compareRecId}
AND r.AGENCY_ID = #{agencyId} AND r.AGENCY_ID = #{agencyId}
<if test='null != importDate and "" != importDate'>
AND r.IMPORT_DATE = #{importDate} AND r.IMPORT_DATE = #{importDate}
</if>
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save