Преглед изворни кода

pms 瑞鹰日报 目前工序 等功能优化

zhangcl пре 6 дана
родитељ
комит
a9ad6fe5ed

+ 4 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrydailyreport/vo/IotRyDailyReportPageReqVO.java

@@ -79,7 +79,10 @@ public class IotRyDailyReportPageReqVO extends PageParam {
     @Schema(description = "当日生产情况生产动态", example = "1")
     private String productionStatus;
 
-    @Schema(description = "下步工作计划")
+    @Schema(description = "目前工序")
+    private String currentOperation;
+
+    @Schema(description = "下步工作计划 currentOperation")
     private String nextPlan;
 
     @Schema(description = "施工状态(动迁 准备 施工 完工)", example = "1")

+ 5 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrydailyreport/vo/IotRyDailyReportRespVO.java

@@ -126,7 +126,11 @@ public class IotRyDailyReportRespVO {
     @ExcelProperty("当日生产情况生产动态")
     private String productionStatus;
 
-    @Schema(description = "下步工作计划")
+    @Schema(description = "目前工序")
+    @ExcelProperty("目前工序")
+    private String currentOperation;
+
+    @Schema(description = "下步工作计划 currentOperation")
     @ExcelProperty("下步工作计划")
     private String nextPlan;
 

+ 4 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrydailyreport/vo/IotRyDailyReportSaveReqVO.java

@@ -93,7 +93,10 @@ public class IotRyDailyReportSaveReqVO {
     @Schema(description = "当日生产情况生产动态", example = "1")
     private String productionStatus;
 
-    @Schema(description = "下步工作计划")
+    @Schema(description = "目前工序")
+    private String currentOperation;
+
+    @Schema(description = "下步工作计划 下部工序")
     private String nextPlan;
 
     @Schema(description = "施工状态(动迁 准备 施工 完工)", example = "1")

+ 5 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/iotrydailyreport/IotRyDailyReportDO.java

@@ -148,7 +148,11 @@ public class IotRyDailyReportDO extends BaseDO {
      */
     private String productionStatus;
     /**
-     * 下步工作计划
+     * 目前工序
+     */
+    private String currentOperation;
+    /**
+     * 下步工作计划 下部工序
      */
     private String nextPlan;
     /**

+ 61 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/iotrydailyreport/IotRyDailyReportMapper.java

@@ -26,12 +26,14 @@ import java.util.Objects;
 @Mapper
 public interface IotRyDailyReportMapper extends BaseMapperX<IotRyDailyReportDO> {
 
-    default PageResult<IotRyDailyReportDO> selectPage(IotRyDailyReportPageReqVO reqVO) {
+    /* default PageResult<IotRyDailyReportDO> selectPage(IotRyDailyReportPageReqVO reqVO) {
+        // 获取查询参数中的projectClassification值
+        String projectClassification = reqVO.getProjectClassification();
         return selectPage(reqVO, new LambdaQueryWrapperX<IotRyDailyReportDO>()
                 .eqIfPresent(IotRyDailyReportDO::getDeptId, reqVO.getDeptId())
                 .eqIfPresent(IotRyDailyReportDO::getProjectId, reqVO.getProjectId())
                 .eqIfPresent(IotRyDailyReportDO::getTaskId, reqVO.getTaskId())
-                .eqIfPresent(IotRyDailyReportDO::getProjectClassification, reqVO.getProjectClassification())
+                // .eqIfPresent(IotRyDailyReportDO::getProjectClassification, reqVO.getProjectClassification())
                 .eqIfPresent(IotRyDailyReportDO::getRelocationDays, reqVO.getRelocationDays())
                 .betweenIfPresent(IotRyDailyReportDO::getLatestWellDoneTime, reqVO.getLatestWellDoneTime())
                 .eqIfPresent(IotRyDailyReportDO::getCurrentDepth, reqVO.getCurrentDepth())
@@ -64,6 +66,63 @@ public interface IotRyDailyReportMapper extends BaseMapperX<IotRyDailyReportDO>
                 .betweenIfPresent(IotRyDailyReportDO::getCreateTime, reqVO.getCreateTime())
                 .orderByDesc(IotRyDailyReportDO::getCreateTime)
                 .orderByAsc(IotRyDailyReportDO::getId));
+    } */
+
+    default PageResult<IotRyDailyReportDO> selectPage(IotRyDailyReportPageReqVO reqVO) {
+        // 获取查询参数中的 projectClassification 值
+        String projectClassification = reqVO.getProjectClassification();
+        LambdaQueryWrapperX<IotRyDailyReportDO> queryWrapper = new LambdaQueryWrapperX<IotRyDailyReportDO>();
+        // 创建查询包装器
+        queryWrapper
+                .eqIfPresent(IotRyDailyReportDO::getDeptId, reqVO.getDeptId())
+                .eqIfPresent(IotRyDailyReportDO::getProjectId, reqVO.getProjectId())
+                .eqIfPresent(IotRyDailyReportDO::getTaskId, reqVO.getTaskId())
+                .eqIfPresent(IotRyDailyReportDO::getRelocationDays, reqVO.getRelocationDays())
+                .betweenIfPresent(IotRyDailyReportDO::getLatestWellDoneTime, reqVO.getLatestWellDoneTime())
+                .eqIfPresent(IotRyDailyReportDO::getCurrentDepth, reqVO.getCurrentDepth())
+                .eqIfPresent(IotRyDailyReportDO::getDailyFootage, reqVO.getDailyFootage())
+                .eqIfPresent(IotRyDailyReportDO::getMonthlyFootage, reqVO.getMonthlyFootage())
+                .eqIfPresent(IotRyDailyReportDO::getAnnualFootage, reqVO.getAnnualFootage())
+                .eqIfPresent(IotRyDailyReportDO::getDailyPowerUsage, reqVO.getDailyPowerUsage())
+                .eqIfPresent(IotRyDailyReportDO::getMonthlyPowerUsage, reqVO.getMonthlyPowerUsage())
+                .eqIfPresent(IotRyDailyReportDO::getDailyFuel, reqVO.getDailyFuel())
+                .eqIfPresent(IotRyDailyReportDO::getMonthlyFuel, reqVO.getMonthlyFuel())
+                .betweenIfPresent(IotRyDailyReportDO::getNonProductionTime, reqVO.getNonProductionTime())
+                .eqIfPresent(IotRyDailyReportDO::getRyNptReason, reqVO.getRyNptReason())
+                .betweenIfPresent(IotRyDailyReportDO::getConstructionStartDate, reqVO.getConstructionStartDate())
+                .betweenIfPresent(IotRyDailyReportDO::getConstructionEndDate, reqVO.getConstructionEndDate())
+                .eqIfPresent(IotRyDailyReportDO::getProductionStatus, reqVO.getProductionStatus())
+                .eqIfPresent(IotRyDailyReportDO::getNextPlan, reqVO.getNextPlan())
+                .eqIfPresent(IotRyDailyReportDO::getRigStatus, reqVO.getRigStatus())
+                .eqIfPresent(IotRyDailyReportDO::getPersonnel, reqVO.getPersonnel())
+                .eqIfPresent(IotRyDailyReportDO::getMudDensity, reqVO.getMudDensity())
+                .eqIfPresent(IotRyDailyReportDO::getMudViscosity, reqVO.getMudViscosity())
+                .eqIfPresent(IotRyDailyReportDO::getLateralLength, reqVO.getLateralLength())
+                .eqIfPresent(IotRyDailyReportDO::getWellInclination, reqVO.getWellInclination())
+                .eqIfPresent(IotRyDailyReportDO::getAzimuth, reqVO.getAzimuth())
+                .eqIfPresent(IotRyDailyReportDO::getExtProperty, reqVO.getExtProperty())
+                .eqIfPresent(IotRyDailyReportDO::getSort, reqVO.getSort())
+                .eqIfPresent(IotRyDailyReportDO::getRemark, reqVO.getRemark())
+                .eqIfPresent(IotRyDailyReportDO::getStatus, reqVO.getStatus())
+                .eqIfPresent(IotRyDailyReportDO::getProcessInstanceId, reqVO.getProcessInstanceId())
+                .eqIfPresent(IotRyDailyReportDO::getAuditStatus, reqVO.getAuditStatus())
+                .betweenIfPresent(IotRyDailyReportDO::getCreateTime, reqVO.getCreateTime())
+                .orderByDesc(IotRyDailyReportDO::getCreateTime)
+                .orderByAsc(IotRyDailyReportDO::getId);
+
+        // 单独处理 projectClassification 条件
+        if ("1".equals(projectClassification)) {
+            // 当值为 "1" 时,查询 project_classification 为 "1" 或空字符串的记录
+            queryWrapper.and(wrapper -> wrapper
+                    .eq(IotRyDailyReportDO::getProjectClassification, "1")
+                    .or().eq(IotRyDailyReportDO::getProjectClassification, "")
+            );
+        } else {
+            // 其他情况:有值则精确匹配,无值则不添加条件(保持原逻辑)
+            queryWrapper.eqIfPresent(IotRyDailyReportDO::getProjectClassification, projectClassification);
+        }
+
+        return selectPage(reqVO, queryWrapper);
     }
 
     /**