refactor(repository): 优化设备查询和解决方案审核相关功能
- 修改设备查询条件,使用 LIKE 模糊匹配 - 重命名 SolutionMeasuresVO 中的 audited 字段为 approved,优化审核状态表示 - 更新 TicketSolutionServiceImpl 中的审核状态判断逻辑
This commit is contained in:
parent
e110af14fb
commit
30cf997c7b
|
|
@ -18,6 +18,6 @@ public class SolutionMeasuresVO {
|
||||||
//是否是审核人
|
//是否是审核人
|
||||||
private boolean inAudit=false;
|
private boolean inAudit=false;
|
||||||
|
|
||||||
// 是否已审核
|
// 是否审核通过,默认为null,表示未审核;false:不通过,true:通过
|
||||||
private boolean audited=false;
|
private Boolean approved;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,9 +61,9 @@ public class TicketSolutionServiceImpl extends ServiceImpl<TicketSolutionMapper,
|
||||||
Map<String, List<TicketSolution>> groupedSolutions = solutions.stream().collect(Collectors.groupingBy(TicketSolution::getDictionaryItemName, LinkedHashMap::new, Collectors.toList()));
|
Map<String, List<TicketSolution>> groupedSolutions = solutions.stream().collect(Collectors.groupingBy(TicketSolution::getDictionaryItemName, LinkedHashMap::new, Collectors.toList()));
|
||||||
SolutionMeasuresVO vo=new SolutionMeasuresVO();
|
SolutionMeasuresVO vo=new SolutionMeasuresVO();
|
||||||
TicketSolutionAudit audit =ticketSolutionAuditService.getByTicketAndUser(ticketId,AdminUserUtil.getUserId());
|
TicketSolutionAudit audit =ticketSolutionAuditService.getByTicketAndUser(ticketId,AdminUserUtil.getUserId());
|
||||||
if (Objects.nonNull(audit)){
|
if (Objects.nonNull(audit)) {
|
||||||
vo.setInAudit(true);
|
vo.setInAudit(true);
|
||||||
vo.setAudited(Objects.nonNull(audit.getState()));
|
vo.setApproved(Objects.isNull(audit.getState()) ? null : Objects.equals(audit.getState(), 1));
|
||||||
}
|
}
|
||||||
List<SolutionMeasuresItemVO> items = new ArrayList<>();
|
List<SolutionMeasuresItemVO> items = new ArrayList<>();
|
||||||
if (CollectionUtil.isEmpty(groupedSolutions)) {
|
if (CollectionUtil.isEmpty(groupedSolutions)) {
|
||||||
|
|
|
||||||
|
|
@ -22,22 +22,23 @@
|
||||||
</select>
|
</select>
|
||||||
<sql id="whr">
|
<sql id="whr">
|
||||||
<if test="query.deviceNo!=null and query.deviceNo!=''">
|
<if test="query.deviceNo!=null and query.deviceNo!=''">
|
||||||
and a.device_no=#{query.deviceNo}
|
and a.device_no LIKE concat('%', #{query.deviceNo}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="query.customerName!=null and query.customerName!=''">
|
<if test="query.customerName!=null and query.customerName!=''">
|
||||||
and a.customer_name=#{query.customerName}
|
and a.customer_name LIKE concat('%', #{query.customerName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="query.agentName!=null and query.agentName!=''">
|
<if test="query.agentName!=null and query.agentName!=''">
|
||||||
and a.agent_name=#{query.agentName}
|
and a.agent_name=#{query.agentName}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.modelNo!=null and query.modelNo!=''">
|
<if test="query.modelNo!=null and query.modelNo!=''">
|
||||||
and a.model_no=#{query.modelNo}
|
and a.model_no LIKE concat('%', #{query.modelNo}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="query.warrantyState!=null and query.warrantyState!=''">
|
<if test="query.warrantyState!=null and query.warrantyState!=''">
|
||||||
and a.warranty_state=#{query.warrantyState}
|
and a.warranty_state=#{query.warrantyState}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.warrantyStartDate!=null and query.warrantyStartDate!=''">
|
<if test="query.warrantyStartDate!=null and query.warrantyStartDate!=''">
|
||||||
and a.start_warranty_date >= #{query.warrantyStartDate} and start_warranty_date <= #{query.warrantyEndDate}
|
and a.start_warranty_date >= #{query.warrantyStartDate} and start_warranty_date <=
|
||||||
|
#{query.warrantyEndDate}
|
||||||
</if>
|
</if>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue