Commit 786ff9db7234ca4bb786b7b39966f101d5987895
1 parent
95d30924
app养护计划明细提交
Showing
10 changed files
with
251 additions
and
29 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/inspectionplan/vo/AppInspectionPlanCommitRespVO.java
| ... | ... | @@ -9,6 +9,7 @@ import org.springframework.format.annotation.DateTimeFormat; |
| 9 | 9 | import java.time.LocalDateTime; |
| 10 | 10 | import java.util.List; |
| 11 | 11 | |
| 12 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; | |
| 12 | 13 | import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 13 | 14 | |
| 14 | 15 | @Schema(description = "管理后台 - 巡检计划提交明细 Response VO") |
| ... | ... | @@ -27,6 +28,13 @@ public class AppInspectionPlanCommitRespVO { |
| 27 | 28 | @Schema(description = "排序号:第n次计划", requiredMode = Schema.RequiredMode.REQUIRED) |
| 28 | 29 | private Integer sortNum; |
| 29 | 30 | |
| 31 | + @Schema(description = "次数 如:1/3等", requiredMode = Schema.RequiredMode.REQUIRED, example = "1/3") | |
| 32 | + private String rate; | |
| 33 | + | |
| 34 | + @Schema(description = "周期ID: 1:日/次;2:周/次;3:月/次;4:年/次", requiredMode = Schema.RequiredMode.REQUIRED, example = "6415") | |
| 35 | + @ExcelProperty("周期ID: 1:日/次;2:周/次;3:月/次;4:年/次") | |
| 36 | + private Integer cycleId; | |
| 37 | + | |
| 30 | 38 | @Schema(description = "业务线: yl-园林;wy-物业:sz-市政") |
| 31 | 39 | private String busiLine; |
| 32 | 40 | |
| ... | ... | @@ -82,6 +90,14 @@ public class AppInspectionPlanCommitRespVO { |
| 82 | 90 | @Schema(description = "备注", example = "你猜") |
| 83 | 91 | private String remark; |
| 84 | 92 | |
| 93 | + @Schema(description = "执行开始时间") | |
| 94 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) | |
| 95 | + private LocalDateTime beginTime; | |
| 96 | + | |
| 97 | + @Schema(description = "执行时间") | |
| 98 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) | |
| 99 | + private LocalDateTime endTime; | |
| 100 | + | |
| 85 | 101 | |
| 86 | 102 | |
| 87 | 103 | } |
| 88 | 104 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/AppMaintainPlanController.java
| ... | ... | @@ -48,15 +48,6 @@ public class AppMaintainPlanController { |
| 48 | 48 | @Resource |
| 49 | 49 | private MaintainPlanService maintainPlanService; |
| 50 | 50 | |
| 51 | - @GetMapping("/get") | |
| 52 | - @Operation(summary = "获得养护计划汇总") | |
| 53 | - @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 54 | - @PreAuthorize("@ss.hasPermission('garden:maintain-plan:query')") | |
| 55 | - public CommonResult<MaintainPlanRespVO> getMaintainPlan(@RequestParam("id") Long id) { | |
| 56 | - MaintainPlanDO maintainPlan = maintainPlanService.getMaintainPlan(id); | |
| 57 | - return success(BeanUtils.toBean(maintainPlan, MaintainPlanRespVO.class)); | |
| 58 | - } | |
| 59 | - | |
| 60 | 51 | /** |
| 61 | 52 | * APP获得养护计划汇总分页-按道路 |
| 62 | 53 | */ | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/AppMaintainPlanDetailController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.maintainplan; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 6 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 7 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 8 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 9 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanDetailPageReqVO; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanDetailRespVO; | |
| 11 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanDetailSaveReqVO; | |
| 12 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; | |
| 13 | +import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDetailDO; | |
| 14 | +import com.zteits.urbanops.module.garden.service.maintainplan.MaintainPlanDetailService; | |
| 15 | +import io.swagger.v3.oas.annotations.Operation; | |
| 16 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 17 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 18 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 19 | +import jakarta.annotation.Resource; | |
| 20 | +import jakarta.servlet.http.HttpServletResponse; | |
| 21 | +import jakarta.validation.Valid; | |
| 22 | +import jakarta.validation.constraints.Max; | |
| 23 | +import jakarta.validation.constraints.Min; | |
| 24 | +import jakarta.validation.constraints.NotNull; | |
| 25 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 26 | +import org.springframework.validation.annotation.Validated; | |
| 27 | +import org.springframework.web.bind.annotation.*; | |
| 28 | + | |
| 29 | +import java.io.IOException; | |
| 30 | +import java.util.List; | |
| 31 | + | |
| 32 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 33 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 34 | + | |
| 35 | +@Tag(name = "APP管理 - 养护计划明细") | |
| 36 | +@RestController | |
| 37 | +@RequestMapping("/app/garden/maintain-plan-detail") | |
| 38 | +@Validated | |
| 39 | +public class AppMaintainPlanDetailController { | |
| 40 | + | |
| 41 | + @Resource | |
| 42 | + private MaintainPlanDetailService maintainPlanDetailService; | |
| 43 | + | |
| 44 | + | |
| 45 | + @GetMapping("/get/details-road") | |
| 46 | + @Operation(summary = "app-获得养护计划明细") | |
| 47 | + @Parameter(name = "road_id", description = "道路ID", required = true, example = "1024") | |
| 48 | + @Parameter(name = "finish_state", description = "完成状态 1:未完成;2:已完成;3:已失效", required = true, example = "1024") | |
| 49 | + // @PreAuthorize("@ss.hasPermission('app:garden:maintain-plan-detail:road:query')") | |
| 50 | + public CommonResult<List<AppMaintainPlanDetailRespVO>> appMaintainPlanDetailListByRoad(@RequestParam("road_id") @NotNull Long roadId, @RequestParam("finish_state") Integer finishState) { | |
| 51 | + List<AppMaintainPlanDetailRespVO> list = maintainPlanDetailService.appMaintainPlanDetailListByRoad(roadId, finishState); | |
| 52 | + return success(list); | |
| 53 | + } | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | +} | |
| 0 | 58 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanDetailRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.maintainplan.vo; | |
| 2 | + | |
| 3 | +import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | |
| 4 | +import cn.idev.excel.annotation.ExcelProperty; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import jakarta.validation.constraints.NotNull; | |
| 7 | +import lombok.Data; | |
| 8 | + | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | + | |
| 11 | +@Schema(description = "管理后台 - 养护计划 Response VO") | |
| 12 | +@Data | |
| 13 | +@ExcelIgnoreUnannotated | |
| 14 | +public class AppMaintainPlanDetailRespVO { | |
| 15 | + | |
| 16 | + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 17 | + private String batchNo; | |
| 18 | + | |
| 19 | + @Schema(description = "计划编码", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 20 | + private String planNo; | |
| 21 | + | |
| 22 | + @Schema(description = "计划名称", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 23 | + private String planName; | |
| 24 | + | |
| 25 | + @Schema(description = "排序号:第n次计划", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 26 | + private Integer sortNum; | |
| 27 | + | |
| 28 | + @Schema(description = "养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;", requiredMode = Schema.RequiredMode.REQUIRED, example = "24742") | |
| 29 | + private Integer planTypeId; | |
| 30 | + | |
| 31 | + @Schema(description = "次数 如:1/3等", requiredMode = Schema.RequiredMode.REQUIRED, example = "1/3") | |
| 32 | + private String rate; | |
| 33 | + | |
| 34 | + @Schema(description = "周期ID: 1:日/次;2:周/次;3:月/次;4:年/次", requiredMode = Schema.RequiredMode.REQUIRED, example = "6415") | |
| 35 | + private Integer cycleId; | |
| 36 | + | |
| 37 | + @Schema(description = "计划次数") | |
| 38 | + private Integer planNum; | |
| 39 | + | |
| 40 | + @Schema(description = "完成百分比", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 41 | + private Double finishPercent; | |
| 42 | + | |
| 43 | + @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 44 | + private Integer finishState; | |
| 45 | + | |
| 46 | + @Schema(description = "执行开始时间") | |
| 47 | + private LocalDateTime beginTime; | |
| 48 | + | |
| 49 | + @Schema(description = "执行时间") | |
| 50 | + private LocalDateTime endTime; | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | +} | |
| 0 | 55 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanPagePlanTypeRespVO.java
| ... | ... | @@ -19,35 +19,36 @@ public class AppMaintainPlanPagePlanTypeRespVO { |
| 19 | 19 | @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED, example = "32704") |
| 20 | 20 | private String batchNo; |
| 21 | 21 | |
| 22 | - @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32704") | |
| 23 | - private Long roadId; | |
| 22 | + @Schema(description = "计划编码", example = "王五") | |
| 23 | + private String planNo; | |
| 24 | 24 | |
| 25 | - @Schema(description = "道路名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "32704") | |
| 26 | - private String roadName; | |
| 25 | + @Schema(description = "计划名称", example = "王五") | |
| 26 | + private String planName; | |
| 27 | 27 | |
| 28 | - @Schema(description = "街道ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8439") | |
| 29 | - private String streetId; | |
| 28 | + @Schema(description = "养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;", requiredMode = Schema.RequiredMode.REQUIRED, example = "24742") | |
| 29 | + @NotNull(message = "养护类型不能为空") | |
| 30 | + private Integer planTypeId; | |
| 30 | 31 | |
| 31 | - @Schema(description = "街道名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 32 | - private String streetName; | |
| 32 | + @Schema(description = "次数 如:1/3等", requiredMode = Schema.RequiredMode.REQUIRED, example = "1/3") | |
| 33 | + @ExcelProperty("次数 如:1/3等") | |
| 34 | + private String rate; | |
| 33 | 35 | |
| 34 | - @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", requiredMode = Schema.RequiredMode.REQUIRED, example = "8588") | |
| 35 | - private Integer levelId; | |
| 36 | + @Schema(description = "周期ID: 1:日/次;2:周/次;3:月/次;4:年/次", requiredMode = Schema.RequiredMode.REQUIRED, example = "6415") | |
| 37 | + @ExcelProperty("周期ID: 1:日/次;2:周/次;3:月/次;4:年/次") | |
| 38 | + private Integer cycleId; | |
| 36 | 39 | |
| 37 | - @Schema(description = "完成状态 1:未完成;2:已完成;3:已失效") | |
| 38 | - @NotNull(message = "完成状态不能为空") | |
| 39 | - @Min(value = 1, message = "状态最小为1") | |
| 40 | - @Max(value = 3, message = "状态不能大于4") | |
| 41 | - private Integer finishState; | |
| 42 | 40 | |
| 43 | - @Schema(description = "计划次数", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 41 | + @Schema(description = "计划次数") | |
| 44 | 42 | @ExcelProperty("计划次数") |
| 45 | 43 | private Integer planNum; |
| 46 | 44 | |
| 47 | - @Schema(description = "已完成次数", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 48 | - @ExcelProperty("已完成次数") | |
| 49 | - private Integer planFinishNum; | |
| 45 | + @Schema(description = "完成百分比", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 46 | + @ExcelProperty("完成百分比") | |
| 47 | + private Double finishPercent; | |
| 50 | 48 | |
| 49 | + @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 50 | + @ExcelProperty("完成状态 1:未完成;2:进行中;3:已完成") | |
| 51 | + private Integer finishState; | |
| 51 | 52 | |
| 52 | 53 | @Schema(description = "执行开始时间") |
| 53 | 54 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/maintainplan/MaintainPlanDetailMapper.java
| ... | ... | @@ -4,11 +4,19 @@ package com.zteits.urbanops.module.garden.dal.mysql.maintainplan; |
| 4 | 4 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 5 | 5 | import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 6 | 6 | import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; |
| 7 | +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | |
| 8 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; | |
| 7 | 9 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDetailDO; |
| 10 | +import org.apache.commons.lang3.StringUtils; | |
| 8 | 11 | import org.apache.ibatis.annotations.Mapper; |
| 9 | 12 | import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; |
| 10 | 13 | import org.apache.ibatis.annotations.Param; |
| 11 | 14 | |
| 15 | +import java.time.LocalDate; | |
| 16 | +import java.util.ArrayList; | |
| 17 | +import java.util.Arrays; | |
| 18 | +import java.util.List; | |
| 19 | + | |
| 12 | 20 | /** |
| 13 | 21 | * 养护计划 Mapper |
| 14 | 22 | * |
| ... | ... | @@ -37,4 +45,17 @@ public interface MaintainPlanDetailMapper extends BaseMapperX<MaintainPlanDetail |
| 37 | 45 | |
| 38 | 46 | int deleteByBatchNo(@Param("batchNo") String batchNo); |
| 39 | 47 | |
| 48 | + /** | |
| 49 | + * app-查询指定业务线的指定道路的养护计划 | |
| 50 | + * @param busiLineList | |
| 51 | + * @param roadId | |
| 52 | + * @param companyId | |
| 53 | + * @param roleIds | |
| 54 | + * @param now | |
| 55 | + * @return | |
| 56 | + */ | |
| 57 | + List<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoad(@Param("busiLineList") List<String> busiLineList, @Param("roadId") Long roadId, @Param("companyId") Long companyId, | |
| 58 | + @Param("roleIds") List<Long> roleIds, @Param("localDate") LocalDate now, @Param("finishState") Integer finishState); | |
| 59 | + | |
| 60 | + | |
| 40 | 61 | } |
| 41 | 62 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanDetailService.java
| 1 | 1 | package com.zteits.urbanops.module.garden.service.maintainplan; |
| 2 | 2 | |
| 3 | 3 | import java.util.*; |
| 4 | + | |
| 5 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; | |
| 4 | 6 | import jakarta.validation.*; |
| 5 | 7 | import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; |
| 6 | 8 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDetailDO; |
| ... | ... | @@ -58,4 +60,11 @@ public interface MaintainPlanDetailService { |
| 58 | 60 | */ |
| 59 | 61 | PageResult<MaintainPlanDetailDO> getMaintainPlanDetailPage(MaintainPlanDetailPageReqVO pageReqVO); |
| 60 | 62 | |
| 63 | + /** | |
| 64 | + * 按照道路查询养护计划列表 | |
| 65 | + * @param roadId 道路ID | |
| 66 | + * @return | |
| 67 | + */ | |
| 68 | + List<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoad(Long roadId, Integer finishState); | |
| 69 | + | |
| 61 | 70 | } |
| 62 | 71 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanDetailServiceImpl.java
| 1 | 1 | package com.zteits.urbanops.module.garden.service.maintainplan; |
| 2 | 2 | |
| 3 | +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; | |
| 5 | +import com.zteits.urbanops.module.system.api.permission.RoleApi; | |
| 6 | +import org.apache.commons.lang3.StringUtils; | |
| 3 | 7 | import org.springframework.stereotype.Service; |
| 4 | 8 | import jakarta.annotation.Resource; |
| 5 | 9 | import org.springframework.validation.annotation.Validated; |
| 6 | 10 | |
| 11 | +import java.time.LocalDate; | |
| 7 | 12 | import java.util.*; |
| 8 | 13 | import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; |
| 9 | 14 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDetailDO; |
| ... | ... | @@ -25,6 +30,9 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService |
| 25 | 30 | @Resource |
| 26 | 31 | private MaintainPlanDetailMapper maintainPlanDetailMapper; |
| 27 | 32 | |
| 33 | + @Resource | |
| 34 | + private RoleApi roleApi; | |
| 35 | + | |
| 28 | 36 | @Override |
| 29 | 37 | public Long createMaintainPlanDetail(MaintainPlanDetailSaveReqVO createReqVO) { |
| 30 | 38 | // 插入 |
| ... | ... | @@ -75,4 +83,19 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService |
| 75 | 83 | return maintainPlanDetailMapper.selectPage(pageReqVO); |
| 76 | 84 | } |
| 77 | 85 | |
| 86 | + @Override | |
| 87 | + public List<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoad(Long roadId, Integer finishState) { | |
| 88 | + String busiLine = SecurityFrameworkUtils.getBusiLine(); | |
| 89 | + Long companyId = SecurityFrameworkUtils.getCompanyId(); | |
| 90 | + List<String> busiLineList = new ArrayList<>(); | |
| 91 | + if (StringUtils.isNotEmpty(busiLine)) { | |
| 92 | + busiLineList = Arrays.asList(busiLine.split(",")); | |
| 93 | + } | |
| 94 | + | |
| 95 | + /*1.查询登录用户角色*/ | |
| 96 | + List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); | |
| 97 | + LocalDate now = LocalDate.now(); | |
| 98 | + return maintainPlanDetailMapper.appMaintainPlanDetailListByRoad(busiLineList, roadId, companyId, roleIds, now, finishState); | |
| 99 | + } | |
| 100 | + | |
| 78 | 101 | } |
| 79 | 102 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanDetailMapper.xml
| ... | ... | @@ -12,4 +12,54 @@ |
| 12 | 12 | <delete id="deleteByBatchNo"> |
| 13 | 13 | delete from garden_maintain_plan_detail where batch_no =#{batchNo} |
| 14 | 14 | </delete> |
| 15 | + | |
| 16 | + <select id="appMaintainPlanDetailListByRoad" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO"> | |
| 17 | + SELECT | |
| 18 | + c.batch_no, | |
| 19 | + c.plan_no, | |
| 20 | + a.plan_name, | |
| 21 | + a.plan_type_id, | |
| 22 | + a.rate, | |
| 23 | + a.cycle_id, | |
| 24 | + c.plan_num, | |
| 25 | + c.finish_percent, | |
| 26 | + c.finish_state, | |
| 27 | + c.begin_time, | |
| 28 | + c.end_time, | |
| 29 | + c.sort_num | |
| 30 | + FROM | |
| 31 | + garden_maintain_plan a, | |
| 32 | + garden_maintain_plan_role b, | |
| 33 | + garden_maintain_plan_detail c | |
| 34 | + WHERE | |
| 35 | + a.batch_no = b.batch_no | |
| 36 | + and a.batch_no=b.batch_no | |
| 37 | + AND a.dept_id =b.dept_id | |
| 38 | + AND a.deleted=0 | |
| 39 | + AND a.company_id = #{companyId} | |
| 40 | + AND a.road_id = #{roadId} | |
| 41 | + <if test="roleIds != null and roleIds.size() > 0"> | |
| 42 | + AND b.role_id IN | |
| 43 | + <foreach collection="roleIds" item="roleId" open="(" separator="," close=")"> | |
| 44 | + #{roleId} | |
| 45 | + </foreach> | |
| 46 | + </if> | |
| 47 | + <if test="busiLineList != null and busiLineList.size() > 0"> | |
| 48 | + AND a.busi_line IN | |
| 49 | + <foreach collection="busiLineList" item="busiLine" open="(" separator="," close=")"> | |
| 50 | + #{busiLine} | |
| 51 | + </foreach> | |
| 52 | + </if> | |
| 53 | + <!--状态 1:未完成;2:已完成;3:已失效--> | |
| 54 | + <if test="finishState == 3"> | |
| 55 | + <![CDATA[and c.end_time < #{localDate}]]> | |
| 56 | + </if> | |
| 57 | + <if test="finishState == 2"> | |
| 58 | + and c.finish_state = #{finishState} | |
| 59 | + </if> | |
| 60 | + <if test="finishState == 1"> | |
| 61 | + and c.finish_state = #{finishState} | |
| 62 | + <![CDATA[and c.end_time >= #{localDate}]]> | |
| 63 | + </if> | |
| 64 | + </select> | |
| 15 | 65 | </mapper> |
| 16 | 66 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanMapper.xml
| ... | ... | @@ -91,7 +91,7 @@ |
| 91 | 91 | AND a.dept_id =b.dept_id |
| 92 | 92 | AND a.deleted=0 |
| 93 | 93 | AND a.company_id = #{req.companyId} |
| 94 | - AND a.company_id = #{req.planTypeId} | |
| 94 | + AND a.plan_type_id = #{req.planTypeId} | |
| 95 | 95 | <if test="req.planName != null and req.planName !=''"> |
| 96 | 96 | AND a.plan_type_id LIKE CONCAT('%',#{req.planName},'%') |
| 97 | 97 | </if> | ... | ... |