Browse Source

fix: 计划自列表查询问题处理

master_tdsql
hxh 10 months ago
parent
commit
e5f08d5e98
  1. 6
      shuili-system/src/main/java/com/kms/yxgh/df/dto/DfRecordDetailDto.java
  2. 5
      shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfPlanMapper.java

6
shuili-system/src/main/java/com/kms/yxgh/df/dto/DfRecordDetailDto.java

@ -108,11 +108,13 @@ public class DfRecordDetailDto {
private String createName;
@ApiModelProperty("所有巡查项目")
private Long allItem;
private Long allItem = 0L;
private Long remaining = 0L;
@ApiModelProperty("当前已巡查项")
public Long getCurrentItem() {
return (long) Optional.ofNullable(this.items).map(List::size).orElse(0);
return allItem - remaining;
}

5
shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfPlanMapper.java

@ -13,7 +13,6 @@ import org.apache.ibatis.annotations.*;
import org.apache.ibatis.jdbc.SQL;
import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -107,10 +106,10 @@ public interface DfPlanMapper extends BaseMapper<DfPlan> {
"AND exists (select 1 from bs_sgc_df_xsjhzx zx where zx.operator_uid = #{searchDto.user}) " +
"</if>" +
"<if test='searchDto != null and searchDto.isStart != null and searchDto.isStart == true'>" +
"AND r.remaining > 0 " +
"AND r.id is not null " +
"</if>" +
"<if test='searchDto != null and searchDto.isStart != null and searchDto.isStart == false'>" +
"AND r.remaining = 0 " +
"AND r.id is null " +
"</if>" +
"ORDER BY last_time desc,sub.start_date " +
"</script>")

Loading…
Cancel
Save