Browse Source

政策依据下拉选

master
zxc 3 years ago
parent
commit
645b0a3101
  1. 1
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyPageFormDTO.java
  2. 16
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPolicyController.java
  3. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyService.java
  4. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java
  5. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordV2Dao.xml

1
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyPageFormDTO.java

@ -32,6 +32,7 @@ public class IcPolicyPageFormDTO extends PageFormDTO implements Serializable {
* 是否过期1已过期0未过期 * 是否过期1已过期0未过期
*/ */
private String expiredFlag; private String expiredFlag;
private String agencyId;
} }

16
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPolicyController.java

@ -10,7 +10,6 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.IcPolicyDTO; import com.epmet.dto.IcPolicyDTO;
import com.epmet.dto.IcPolicyItemResultDTO; import com.epmet.dto.IcPolicyItemResultDTO;
import com.epmet.dto.form.resi.HeartResisByPolicyRulesFormDTO;
import com.epmet.dto.IcPolicyRuleDTO; import com.epmet.dto.IcPolicyRuleDTO;
import com.epmet.dto.form.policy.IcPolicyFormDTO; import com.epmet.dto.form.policy.IcPolicyFormDTO;
import com.epmet.dto.form.policy.IcPolicyPageFormDTO; import com.epmet.dto.form.policy.IcPolicyPageFormDTO;
@ -18,7 +17,6 @@ import com.epmet.dto.form.resi.ResisByPolicyRulesFormDTO;
import com.epmet.dto.result.resi.ResiByPolicyInfoResultDTO; import com.epmet.dto.result.resi.ResiByPolicyInfoResultDTO;
import com.epmet.entity.IcPolicyRuleDetailEntity; import com.epmet.entity.IcPolicyRuleDetailEntity;
import com.epmet.service.IcPolicyService; import com.epmet.service.IcPolicyService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -145,6 +143,20 @@ public class IcPolicyController {
return new Result<PageData<IcPolicyDTO>>().ok(page); return new Result<PageData<IcPolicyDTO>>().ok(page);
} }
/**
* Desc: 政策列表下拉选
* @param tokenDto
* @param formDTO
* @author zxc
* @date 2022/7/21 09:48
*/
@PostMapping("policyListSelect")
public Result<List<IcPolicyDTO>> policyListSelect(@LoginUser TokenDto tokenDto, @RequestBody IcPolicyPageFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
return new Result<List<IcPolicyDTO>>().ok(icPolicyService.policyListSelect(formDTO));
}
/** /**
* 细则列表 * 细则列表
* @param customerId * @param customerId

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyService.java

@ -45,6 +45,14 @@ public interface IcPolicyService extends BaseService<IcPolicyEntity> {
*/ */
PageData<IcPolicyDTO> policyList(IcPolicyPageFormDTO formDTO); PageData<IcPolicyDTO> policyList(IcPolicyPageFormDTO formDTO);
/**
* Desc: 政策列表下拉选
* @param formDTO
* @author zxc
* @date 2022/7/21 09:48
*/
List<IcPolicyDTO> policyListSelect(IcPolicyPageFormDTO formDTO);
List<IcPolicyRuleDTO> ruleList(String customerId,String policyId); List<IcPolicyRuleDTO> ruleList(String customerId,String policyId);
IcPolicyDTO policyDetail(String customerId,String policyId); IcPolicyDTO policyDetail(String customerId,String policyId);

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java

@ -246,6 +246,16 @@ public class IcPolicyServiceImpl extends BaseServiceImpl<IcPolicyDao, IcPolicyEn
return new PageData<>(list, pageInfo.getTotal()); return new PageData<>(list, pageInfo.getTotal());
} }
@Override
public List<IcPolicyDTO> policyListSelect(IcPolicyPageFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo || StringUtils.isBlank(staffInfo.getAgencyId())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "工作人员缓存信息异常", "工作人员信息异常");
}
formDTO.setAgencyId(staffInfo.getAgencyId());
return baseDao.policyList(formDTO.getCustomerId(), formDTO.getAgencyId(), null,null,null);
}
@Override @Override
public List<IcPolicyRuleDTO> ruleList(String customerId, String policyId) { public List<IcPolicyRuleDTO> ruleList(String customerId, String policyId) {
LambdaQueryWrapper<IcPolicyRuleEntity> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<IcPolicyRuleEntity> wrapper = new LambdaQueryWrapper<>();

2
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordV2Dao.xml

@ -16,7 +16,7 @@
sr.SERVICE_STATUS, sr.SERVICE_STATUS,
IFNULL(sf.SERVICE_PEOPLE_NUMBER,0) AS servicePeopleNumber IFNULL(sf.SERVICE_PEOPLE_NUMBER,0) AS servicePeopleNumber
FROM ic_service_record_v2 sr FROM ic_service_record_v2 sr
INNER JOIN ic_service_feedback_v2 sf ON sf.SERVICE_RECORD_ID = sr.ID AND sf.DEL_FLAG = 0 left JOIN ic_service_feedback_v2 sf ON sf.SERVICE_RECORD_ID = sr.ID AND sf.DEL_FLAG = 0
INNER JOIN ic_service_scope_v2 ss ON ss.SERVICE_RECORD_ID = sr.ID AND ss.DEL_FLAG = '0' INNER JOIN ic_service_scope_v2 ss ON ss.SERVICE_RECORD_ID = sr.ID AND ss.DEL_FLAG = '0'
WHERE sr.DEL_FLAG = '0' WHERE sr.DEL_FLAG = '0'
AND ss.OBJECT_ID_PATH LIKE concat('%',#{orgId},'%') AND ss.OBJECT_ID_PATH LIKE concat('%',#{orgId},'%')

Loading…
Cancel
Save