Commit 48210361 authored by hkl's avatar hkl

feat:1.bug修复

parent 31133260
......@@ -65,6 +65,10 @@
<properties>
<package.environment>dev</package.environment>
</properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 黄康林本地配置-->
......@@ -73,10 +77,6 @@
<properties>
<package.environment>hkl</package.environment>
</properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 测试环境-->
......@@ -93,7 +93,6 @@
<properties>
<package.environment>pressure</package.environment>
</properties>
</profile>
<!-- 生成环境环境-->
......
......@@ -15,6 +15,7 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.checkData.dto.RecordsMasterCheckDTO;
import org.jeecg.modules.checkData.entity.*;
import org.jeecg.modules.checkData.service.*;
......@@ -138,6 +139,7 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
recordsMasterCheck.setUpdateTime(new Date());
recordsMasterCheck.setDelFlag("0");
if (ObjectUtil.isEmpty(recordsMasterCheck.getId())) {
recordsMasterCheck.setId(UUIDGenerator.generate());
this.service.save(recordsMasterCheck);
} else {
this.service.updateById(recordsMasterCheck);
......
package org.jeecg.modules.checkData.face.impl;
import cn.hutool.core.util.ObjectUtil;
import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.checkData.entity.MovementCourse;
import org.jeecg.modules.checkData.entity.MovementCourseInfo;
......@@ -71,7 +72,16 @@ public class MovementRecordsMasterFaceImpl implements MovementRecordsMasterFace
@Override
public void updateLabourCheckItem(MovementCourse record) {
movementCourseService.lambdaUpdate()
.set(MovementCourse::getCourseStartingMileage, record.getCourseStartingMileage())
.set(MovementCourse::getCourseEndMileage, record.getCourseEndMileage())
.set(MovementCourse::getCurveRadius, record.getCurveRadius())
.set(MovementCourse::getSuperHigh, record.getSuperHigh())
.set(MovementCourse::getWiden, record.getWiden())
.set(MovementCourse::getSlopeRatio, record.getSlopeRatio())
.set(MovementCourse::getLongExtent, record.getLongExtent())
.eq(MovementCourse::getId, record.getId())
.update();
}
/**
......
......@@ -1189,7 +1189,7 @@ public class AnalysisAlgorithm {
transfinite.setEkItemId(movementOverReport.getId());
transfinite.setMeasurePointValue(movementOverReport.getPeakValue());
transfinite.setIsWork(isWork);
transfinite.setDiseaseMileage(movementOverReport.getMileage());
transfinite.setDiseaseMileage(movementOverReport.getMileage().multiply(new BigDecimal("1000")));
transfinite.setTransfiniteGradeName(reasonLabel);
......@@ -1238,8 +1238,6 @@ public class AnalysisAlgorithm {
BigDecimal checkItemEndMileage = checkItem.getCourseEndMileage();
// System.out.printf("【" + checkItemStartingMileage + "-" + checkItemEndMileage + "]");
// 2.2.1 命中检查项目
if (checkItemStartingMileage.compareTo(centerMileage) <= 0 && checkItemEndMileage.compareTo(centerMileage) > 0) {
List<RailInspectionEquipmentItemDetail> movementCourseInfos = checkItemItemDetailMap.get(checkItem.getId());
......@@ -1270,8 +1268,11 @@ public class AnalysisAlgorithm {
map.setCheckDetailEndMileage(currentEndEndMileage);
movementCheckDataUnitDeviceMaps.add(map);
// 计算超限:如果为null则计算,否则和单元绑定
if (null == transfinite) {
movementCourseInfo.setCurrentStartMileage(currentStartMileage);
movementCourseInfo.setCurrentEndEndMileage(currentEndEndMileage);
transfinite = this.railDeviceCheckTransfinite(analysisBatch, movementCourseInfo);
} else {
unitDevice.put("railDeviceTransfinite", transfinite);
......
package org.jeecg.modules.dynamicStaticAnalysis.controller;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -20,6 +21,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
......@@ -62,9 +64,9 @@ public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAna
// 查询明细
List<AnalysisBatchQueryVO> records = pageData.getRecords();
if (ObjectUtil.isNotEmpty(records)) {
// 新增明细
List<String> analysisBatchIds = records.stream().map(AnalysisBatchQueryVO::getId).collect(Collectors.toList());
List<CheckBatchVO> checkBatchList = this.service.listRecordDetail(analysisBatchIds);
if (ObjectUtil.isNotEmpty(checkBatchList)) {
Map<String, List<CheckBatchVO>> analysisBatchMap = checkBatchList.stream().collect(Collectors.groupingBy(CheckBatchVO::getAnalysisBatchId));
records.forEach(record -> {
......@@ -72,6 +74,21 @@ public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAna
record.setCheckBatchList(checkBatchVOS);
});
}
// 获取是否可编辑列表
List<Map<String, Object>> isEditList = this.service.getIsEditList(analysisBatchIds);
if (ObjectUtil.isNotEmpty(isEditList)) {
Map<String, Boolean> isEditMap = isEditList.stream().collect(
Collectors.toMap(
key -> key.get("id").toString(),
value -> !Convert.toBool(value.get("isEdit"))
)
);
records.forEach(record -> {
record.setEdit(isEditMap.get(record.getId()));
});
}
}
return Result.OK(pageData);
......
......@@ -10,6 +10,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.jeecg.modules.homePage.vo.ToDoDetailVO;
import java.util.List;
import java.util.Map;
/**
* <p>
......@@ -28,4 +29,6 @@ public interface AnalysisBatchMapper extends BaseMapper<AnalysisBatch> {
List<CheckBatchVO> listRecordDetail(List<String> analysisBatchIds);
List<ToDoDetailVO> getTodoList(String currentUserId);
List<Map<String, Object>> getIsEditList(List<String> analysisBatchIds);
}
......@@ -127,4 +127,18 @@
AND t3.create_by = #{currentUserId}
</if>
</select>
<select id="getIsEditList" resultType="java.util.Map">
SELECT
t1.id,
COUNT(t3.analysis_batch_unit_device_id) isEdit
FROM
t_dsa_analysis_batch t1
LEFT JOIN t_dsa_analysis_batch_unit_device t2 ON t1.id = t2.analysis_batch_id
LEFT JOIN t_mw_work_batch_detail t3 ON t2.id = t3.analysis_batch_unit_device_id
WHERE t1.id IN
<foreach collection="analysisBatchIds" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
GROUP BY t1.id
</select>
</mapper>
......@@ -11,6 +11,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.jeecg.modules.homePage.vo.ToDoDetailVO;
import java.util.List;
import java.util.Map;
/**
* <p>
......@@ -35,4 +36,6 @@ public interface IAnalysisBatchService extends IService<AnalysisBatch> {
List<CheckBatchVO> listRecordDetail(List<String> analysisBatchIds);
List<ToDoDetailVO> getTodoList(String currentUserId);
List<Map<String, Object>> getIsEditList(List<String> analysisBatchIds);
}
......@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* <p>
......@@ -169,5 +170,10 @@ public class AnalysisBatchServiceImpl extends ServiceImpl<AnalysisBatchMapper, A
return this.baseMapper.getTodoList(currentUserId);
}
@Override
public List<Map<String, Object>> getIsEditList(List<String> analysisBatchIds) {
return this.baseMapper.getIsEditList(analysisBatchIds);
}
}
......@@ -73,6 +73,9 @@ public class AnalysisBatchQueryVO {
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("是否可以编辑 ture-可编辑 false-不可编辑")
private boolean isEdit;
@ApiModelProperty("动静态分析-检查批次VO")
private List<CheckBatchVO> checkBatchList;
}
......@@ -36,6 +36,7 @@
<if test="dto.lineAliasId != null and dto.lineAliasId != ''">
AND t1.line_alias_id = #{dto.lineAliasId}
</if>
ORDER BY t1.create_time DESC
</select>
<select id="getUnitDevicePage" resultType="java.util.Map">
......
......@@ -32,10 +32,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -130,7 +127,9 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatchDetail.setUnitScore(detailDTO.getUnitScore());
workBatchDetail.setUnitScoreLevel(detailDTO.getUnitScoreLevel());
workBatchDetail.setRemark(detailDTO.getRemark());
workBatchDetail.setUpdateTime(new Date());
workBatchDetail.setCreateTime(new Date());
workBatchDetail.setWorkStatus(0);
workBatchDetailMapper.insert(workBatchDetail);
}
}
......@@ -178,6 +177,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatchDetail.setUnitScore(transfiniteDTO.getUnitScore());
workBatchDetail.setUnitScoreLevel(transfiniteDTO.getUnitScoreLevel());
workBatchDetail.setUnitScoreLevelStr(transfiniteDTO.getUnitScoreLevelStr());
workBatchDetail.setWorkStatus(0);
workBatchDetailList.add(workBatchDetail);
}
......
......@@ -131,7 +131,7 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource:
master:
url: jdbc:mysql://47.94.207.62:3306/hzgw2?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
url: jdbc:mysql://47.94.207.62:3306/hzgw3?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
username: root
password: superAdmin&321
driver-class-name: com.mysql.jdbc.Driver
......
......@@ -131,7 +131,7 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/hzgw2?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
url: jdbc:mysql://127.0.0.1:3306/hzgw3?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
username: root
password: superAdmin&321
driver-class-name: com.mysql.jdbc.Driver
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment