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"> <sql id="segmentForPolicyRules">
<where> <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 != ''"> <if test="orgId != null and orgId != '' and orgType != null and orgType != ''">
<choose> <choose>
@ -84,23 +86,23 @@
</choose> </choose>
</if> </if>
<!-- 小区等条件 --> <!-- 小区等条件 -->
<if test="neighborHoodId != null"> <if test="neighborHoodId != null and neighborHoodId!=''">
and ic_resi_user.VILLAGE_ID=#{neighborHoodId} and ic_resi_user.VILLAGE_ID=#{neighborHoodId}
</if> </if>
<if test="buildingId != null"> <if test="buildingId != null and buildingId!=''">
and ic_resi_user.BUILD_ID=#{buildingId} and ic_resi_user.BUILD_ID=#{buildingId}
</if> </if>
<if test="unitId != null"> <if test="unitId != null and unitId!=''">
and ic_resi_user.UNIT_ID=#{unitId} and ic_resi_user.UNIT_ID=#{unitId}
</if> </if>
<if test="houseId != null"> <if test="houseId != null and houseId!=''">
and ic_resi_user.HOME_ID=#{houseId} and ic_resi_user.HOME_ID=#{houseId}
</if> </if>
<if test="idCard != null"> <if test="idCard != null and idCard!=''">
and ic_resi_user.ID_CARD like CONCAT('%'#{idCard}, '%') and ic_resi_user.ID_CARD like CONCAT('%',#{idCard}, '%')
</if> </if>
<if test="name != null"> <if test="name != null and name!=''">
and ic_resi_user.NAME like CONCAT('%'#{name}, '%') and ic_resi_user.NAME like CONCAT('%',#{name}, '%')
</if> </if>
<!-- 房屋id列表 --> <!-- 房屋id列表 -->
<if test="houseIds != null and houseIds.size() > 0"> <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; 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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; 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.IcServiceFeedbackV2Dao;
import com.epmet.dao.IcServiceRecordV2Dao; import com.epmet.dao.IcServiceRecordV2Dao;
import com.epmet.dao.IcServiceScopeDao; import com.epmet.dao.IcServiceScopeDao;
import com.epmet.dao.IcServiceScopeV2Dao;
import com.epmet.dto.IcServiceFeedbackV2DTO; import com.epmet.dto.IcServiceFeedbackV2DTO;
import com.epmet.dto.IcServiceRecordV2DTO; import com.epmet.dto.IcServiceRecordV2DTO;
import com.epmet.dto.IcServiceScopeV2DTO; import com.epmet.dto.IcServiceScopeV2DTO;
@ -67,11 +69,12 @@ public class IcServiceRecordV2ServiceImpl extends BaseServiceImpl<IcServiceRecor
private IcServiceFeedbackV2Service icServiceFeedbackV2Service; private IcServiceFeedbackV2Service icServiceFeedbackV2Service;
@Autowired @Autowired
private HeartAttachmentService heartAttachmentService; private HeartAttachmentService heartAttachmentService;
@Autowired @Autowired
private IcServiceScopeDao serviceScopeDao; private IcServiceScopeDao serviceScopeDao;
@Autowired @Autowired
private IcServiceFeedbackV2Dao serviceFeedbackV2Dao; private IcServiceFeedbackV2Dao serviceFeedbackV2Dao;
@Autowired
private IcServiceScopeV2Dao icServiceScopeV2Dao;
@Override @Override
public PageData<IcServiceRecordV2DTO> page(Map<String, Object> params) { 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())); log.error(String.format("取消服务记录失败,未查询到服务记录,服务记录Id->%s", formDTO.getServiceRecordId()));
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "取消服务记录失败,未查询到服务记录"); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "取消服务记录失败,未查询到服务记录");
} }
entity.setServiceStatus("cancel"); if (!"in_service".equals(entity.getServiceStatus())) {
baseDao.updateById(entity); 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 @Override

Loading…
Cancel
Save