Browse Source

Merge branch 'dev_policy_service' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_policy_service

master
wangxianzhang 3 years ago
parent
commit
8403894172
  1. 20
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml
  2. 17
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordV2ServiceImpl.java

20
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml

@ -71,7 +71,9 @@
<sql id="segmentForPolicyRules">
<where>
ic_resi_user.CUSTOMER_ID=#{customerId}
ic_resi_user.status='0'
and ic_resi_user.CUSTOMER_ID=#{customerId}
and ic_resi_user.del_flag='0'
<!--组织过滤-->
<if test="orgId != null and orgId != '' and orgType != null and orgType != ''">
<choose>
@ -84,23 +86,23 @@
</choose>
</if>
<!-- 小区等条件 -->
<if test="neighborHoodId != null">
<if test="neighborHoodId != null and neighborHoodId!=''">
and ic_resi_user.VILLAGE_ID=#{neighborHoodId}
</if>
<if test="buildingId != null">
<if test="buildingId != null and buildingId!=''">
and ic_resi_user.BUILD_ID=#{buildingId}
</if>
<if test="unitId != null">
<if test="unitId != null and unitId!=''">
and ic_resi_user.UNIT_ID=#{unitId}
</if>
<if test="houseId != null">
<if test="houseId != null and houseId!=''">
and ic_resi_user.HOME_ID=#{houseId}
</if>
<if test="idCard != null">
and ic_resi_user.ID_CARD like CONCAT('%'#{idCard}, '%')
<if test="idCard != null and idCard!=''">
and ic_resi_user.ID_CARD like CONCAT('%',#{idCard}, '%')
</if>
<if test="name != null">
and ic_resi_user.NAME like CONCAT('%'#{name}, '%')
<if test="name != null and name!=''">
and ic_resi_user.NAME like CONCAT('%',#{name}, '%')
</if>
<!-- 房屋id列表 -->
<if test="houseIds != null and houseIds.size() > 0">

17
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordV2ServiceImpl.java

@ -1,5 +1,6 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@ -16,6 +17,7 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dao.IcServiceFeedbackV2Dao;
import com.epmet.dao.IcServiceRecordV2Dao;
import com.epmet.dao.IcServiceScopeDao;
import com.epmet.dao.IcServiceScopeV2Dao;
import com.epmet.dto.IcServiceFeedbackV2DTO;
import com.epmet.dto.IcServiceRecordV2DTO;
import com.epmet.dto.IcServiceScopeV2DTO;
@ -67,11 +69,12 @@ public class IcServiceRecordV2ServiceImpl extends BaseServiceImpl<IcServiceRecor
private IcServiceFeedbackV2Service icServiceFeedbackV2Service;
@Autowired
private HeartAttachmentService heartAttachmentService;
@Autowired
private IcServiceScopeDao serviceScopeDao;
@Autowired
private IcServiceFeedbackV2Dao serviceFeedbackV2Dao;
@Autowired
private IcServiceScopeV2Dao icServiceScopeV2Dao;
@Override
public PageData<IcServiceRecordV2DTO> page(Map<String, Object> params) {
@ -177,8 +180,16 @@ public class IcServiceRecordV2ServiceImpl extends BaseServiceImpl<IcServiceRecor
log.error(String.format("取消服务记录失败,未查询到服务记录,服务记录Id->%s", formDTO.getServiceRecordId()));
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "取消服务记录失败,未查询到服务记录");
}
entity.setServiceStatus("cancel");
baseDao.updateById(entity);
if (!"in_service".equals(entity.getServiceStatus())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format("服务状态:%s", entity.getServiceStatus()), "只有服务中的记录可以取消");
}
//2.删除主表、字表数据【进行中数据不存在反馈记录】
baseDao.deleteById(entity);
LambdaQueryWrapper<IcServiceScopeV2Entity> tWrapper = new LambdaQueryWrapper<>();
tWrapper.eq(IcServiceScopeV2Entity::getServiceRecordId, formDTO.getServiceRecordId());
icServiceScopeV2Dao.delete(tWrapper);
}
@Override

Loading…
Cancel
Save