| | |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.base.common.utils.ObjectUtils; |
| | | import cn.huge.module.cases.domain.dto.EvaluatePersonDTO; |
| | | import cn.huge.module.cases.domain.po.CaseAgent; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.cases.dao.mapper.CasePersonMapper; |
| | | import cn.huge.module.cases.domain.po.CasePerson; |
| | | import cn.huge.module.mediate.constant.CaseBaseConstsEnum; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | public List<CasePerson> listByCertiNo(String certiNo){ |
| | | return mapper.listByCertiNo(certiNo); |
| | | } |
| | | |
| | | /** |
| | | * 根据纠纷编号和当事人类型查询 |
| | | * @param caseId |
| | | * @param perType |
| | | * @return List<CasePerson> |
| | | */ |
| | | public List<CasePerson> listIdByCaseIdAndType(String caseId, String perType){ |
| | | QueryWrapper<CasePerson> casePersonQueryWrapper = new QueryWrapper<>(); |
| | | casePersonQueryWrapper.eq("case_id", caseId).eq("per_type", perType).orderByAsc("create_time"); |
| | | return mapper.selectList(casePersonQueryWrapper); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取当事人评价的人信息 |
| | | * @param caseId |
| | | * @return |
| | | */ |
| | | public EvaluatePersonDTO getEvaluatePerson(String caseId){ |
| | | EvaluatePersonDTO evaluatePersonDTO = new EvaluatePersonDTO(); |
| | | QueryWrapper<CasePerson> casePersonQueryWrapper = new QueryWrapper<>(); |
| | | casePersonQueryWrapper.eq("case_id", caseId).eq("per_type", CaseBaseConstsEnum.PERSON_TYPE_1.getIndex()).orderByAsc("create_time"); |
| | | List<CasePerson> casePersonList = mapper.selectList(casePersonQueryWrapper); |
| | | CasePerson casePerson = casePersonList.get(0); |
| | | if (StringUtils.isNotEmpty(casePerson.getPartyUserId())){ |
| | | evaluatePersonDTO.setId(casePerson.getId()); |
| | | } |
| | | if (CaseBaseConstsEnum.PERSON_CLASS_1.getIndex().equals(casePerson.getPerClass())){ |
| | | evaluatePersonDTO.setName(casePerson.getTrueName()+"(当事人)"); |
| | | }else { |
| | | evaluatePersonDTO.setName(casePerson.getDeputy()+"(当事人)"); |
| | | } |
| | | return evaluatePersonDTO; |
| | | } |
| | | } |