Browse Source

bug修改

master
sunyuchao 4 years ago
parent
commit
56e0b68937
  1. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java
  2. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserTransferRecordServiceImpl.java
  3. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java

@ -248,7 +248,9 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl<IcUserChangeR
//4.批量新增数据,先删后增【只删除新增节点的历史数据】
baseDao.delByCustomerId(customerId, "add");
icUserChangeDetailedService.delByCustomerId(customerId, "add");
log.info("初始变更记录数据,总条数->" + changeList.size());
icUserChangeRecordService.insertBatch(changeList);
log.info("初始变更记录明细数据,总条数->" + detailedList.size());
icUserChangeDetailedService.insertBatch(detailedList);
}

5
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserTransferRecordServiceImpl.java

@ -41,6 +41,7 @@ import com.epmet.feign.OperCustomizeOpenFeignClient;
import com.epmet.service.IcUserChangeDetailedService;
import com.epmet.service.IcUserChangeRecordService;
import com.epmet.service.IcUserTransferRecordService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -161,13 +162,13 @@ public class IcUserTransferRecordServiceImpl extends BaseServiceImpl<IcUserTrans
.append(result1.getData().getNeighborHoodDTO().getNeighborHoodName()).append("-").append(result1.getData().getBuildingDTO().getBuildingName()).append("-")
.append(result1.getData().getBuildingUnitDTO().getUnitName()).append("-").append(result1.getData().getHouseDTO().getHouseName());
changeRecordEntity.setBeforeChangeName(beforeName.toString());
StringBuffer afterName = new StringBuffer("-");
StringBuffer afterName = new StringBuffer();
if ("in".equals(formDTO.getType())) {
afterName.append(result2.getData().getAgencyDTO().getOrganizationName()).append("-").append(result2.getData().getGridDTO().getGridName()).append("-")
.append(result2.getData().getNeighborHoodDTO().getNeighborHoodName()).append("-").append(result2.getData().getBuildingDTO().getBuildingName()).append("-")
.append(result2.getData().getBuildingUnitDTO().getUnitName()).append("-").append(result2.getData().getHouseDTO().getHouseName());
}
changeRecordEntity.setAfterChangeName(afterName.toString());
changeRecordEntity.setAfterChangeName(StringUtils.isEmpty(afterName.toString()) ? "-" : afterName.toString());
changeRecordEntity.setChangeTime(formDTO.getTransferTime());
changeRecordEntity.setRemark(formDTO.getRemark());
icUserChangeRecordService.insert(changeRecordEntity);

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

@ -611,7 +611,7 @@
FROM
ic_resi_user iru
<!-- 只查询在变更记录表不存在新增节点的居民 -->
LEFT JOIN ic_user_change_record iucr ON iru.id = iucr.ic_user_id AND iucr.type = 'add'
LEFT JOIN ic_user_change_record iucr ON iru.id = iucr.ic_user_id AND iucr.type = 'add' AND iucr.del_flag = '0'
WHERE
iucr.ic_user_id IS NULL
AND iru.del_flag = '0'

Loading…
Cancel
Save