Commit 88028080 authored by hkl's avatar hkl

feat:1.首页代码提交

parent 577addc5
...@@ -7,6 +7,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch; ...@@ -7,6 +7,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.jeecg.modules.homePage.vo.DiseaseVO;
import org.jeecg.modules.homePage.vo.ToDoDetailVO; import org.jeecg.modules.homePage.vo.ToDoDetailVO;
import java.util.List; import java.util.List;
...@@ -31,4 +32,6 @@ public interface AnalysisBatchMapper extends BaseMapper<AnalysisBatch> { ...@@ -31,4 +32,6 @@ public interface AnalysisBatchMapper extends BaseMapper<AnalysisBatch> {
List<ToDoDetailVO> getTodoList(String currentUserId); List<ToDoDetailVO> getTodoList(String currentUserId);
List<Map<String, Object>> getIsEditList(List<String> analysisBatchIds); List<Map<String, Object>> getIsEditList(List<String> analysisBatchIds);
List<DiseaseVO> diseaseList(String analysisBatchCode);
} }
...@@ -141,4 +141,56 @@ ...@@ -141,4 +141,56 @@
</foreach> </foreach>
GROUP BY t1.id GROUP BY t1.id
</select> </select>
<select id="diseaseList" resultType="org.jeecg.modules.homePage.vo.DiseaseVO">
SELECT
analysis.id,
analysis.unit_score_level,
analysis.unit_score_level_str,
analysis.unit_center_mileage mileage,
t2.transfinite_type overrunType,
t2.transfinite_type diseaseType,
t2.transfinite_type diseaseTypeName,
t2.transfinite_grade overrunLevel,
t2.transfinite_grade_name,
t2.allow_value peakValue,
t2.measure_point_value longitude,
t2.measure_point_value - t2.allow_value dataDifference
FROM
(
SELECT
t1.id,
t1.analysis_batch_code,
t1.analysis_batch_id,
t1.unit_id,
t1.unit_code,
t1.unit_device_code,
t1.unit_type,
t1.unit_type_name,
t1.unit_start_mileage unit_starting_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.unit_score,
t1.unit_score_level,
t1.unit_score_level_str,
t1.remark,
( SELECT IF ( COUNT( 1 )> 0, 1, 0 ) FROM t_dsa_analysis_batch_unit_device_transfinite WHERE analysis_batch_unit_device_id = t1.id AND is_work = 1 ) AS is_work,
( SELECT IF ( COUNT( 1 )> 0, 1, 0 ) FROM t_dsa_analysis_batch_unit_device_transfinite WHERE analysis_batch_unit_device_id = t1.id ) AS is_transfinite,
( SELECT IF ( COUNT( 1 )> 0, 1, 0 ) FROM t_mw_work_batch_detail WHERE analysis_batch_unit_device_id = t1.id LIMIT 1 ) AS work_status
FROM
t_dsa_analysis_batch_unit_device t1
WHERE
t1.analysis_batch_id = #{analysisBatchCode}
) analysis
LEFT JOIN t_dsa_analysis_batch_unit_device_transfinite t2 ON t2.analysis_batch_unit_device_id = analysis.id
WHERE
1 = 1
AND analysis.unit_score_level = 3
AND analysis.is_transfinite = 1
AND analysis.is_work = 1
ORDER BY
unit_starting_mileage
</select>
</mapper> </mapper>
...@@ -8,6 +8,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch; ...@@ -8,6 +8,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.jeecg.modules.homePage.vo.DiseaseVO;
import org.jeecg.modules.homePage.vo.ToDoDetailVO; import org.jeecg.modules.homePage.vo.ToDoDetailVO;
import java.util.List; import java.util.List;
...@@ -38,4 +39,11 @@ public interface IAnalysisBatchService extends IService<AnalysisBatch> { ...@@ -38,4 +39,11 @@ public interface IAnalysisBatchService extends IService<AnalysisBatch> {
List<ToDoDetailVO> getTodoList(String currentUserId); List<ToDoDetailVO> getTodoList(String currentUserId);
List<Map<String, Object>> getIsEditList(List<String> analysisBatchIds); List<Map<String, Object>> getIsEditList(List<String> analysisBatchIds);
/**
* 病害列表
* @param analysisBatchCode
* @return
*/
List<DiseaseVO> diseaseList(String analysisBatchCode);
} }
...@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.dynamicStaticAnalysis.util.StrUtil; import org.jeecg.modules.dynamicStaticAnalysis.util.StrUtil;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.jeecg.modules.homePage.vo.DiseaseVO;
import org.jeecg.modules.homePage.vo.ToDoDetailVO; import org.jeecg.modules.homePage.vo.ToDoDetailVO;
import org.jeecg.modules.utils.BeanCopyUtil; import org.jeecg.modules.utils.BeanCopyUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -175,5 +176,10 @@ public class AnalysisBatchServiceImpl extends ServiceImpl<AnalysisBatchMapper, A ...@@ -175,5 +176,10 @@ public class AnalysisBatchServiceImpl extends ServiceImpl<AnalysisBatchMapper, A
return this.baseMapper.getIsEditList(analysisBatchIds); return this.baseMapper.getIsEditList(analysisBatchIds);
} }
@Override
public List<DiseaseVO> diseaseList(String analysisBatchCode) {
return this.baseMapper.diseaseList(analysisBatchCode);
}
} }
package org.jeecg.modules.homePage.face.impl; package org.jeecg.modules.homePage.face.impl;
import org.jeecg.modules.checkData.service.IMovementRecordsMasterService; import org.jeecg.modules.checkData.service.IMovementRecordsMasterService;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService; import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService;
import org.jeecg.modules.homePage.dto.DiseaseDTO; import org.jeecg.modules.homePage.dto.DiseaseDTO;
import org.jeecg.modules.homePage.face.HomePageFace; import org.jeecg.modules.homePage.face.HomePageFace;
...@@ -63,29 +64,45 @@ public class HomePageFaceImpl implements HomePageFace { ...@@ -63,29 +64,45 @@ public class HomePageFaceImpl implements HomePageFace {
@Override @Override
public List<DiseaseVO> diseaseList(DiseaseDTO dto) { public List<DiseaseVO> diseaseList(DiseaseDTO dto) {
List<DiseaseVO> records = new ArrayList<>(); AnalysisBatch one = analysisBatchService.lambdaQuery()
.orderByDesc(AnalysisBatch::getUpdateTime)
DiseaseVO vo = new DiseaseVO(); .last("limit 1")
vo.setId("1682308697792339970"); .one();
vo.setLineAliasCode("SDK");
vo.setMileage("21556"); List<DiseaseVO> records = analysisBatchService.diseaseList(one.getId());
vo.setOverrunType("左轨向"); for (DiseaseVO record : records) {
vo.setOverrunLevel("1"); record.setLineAliasId(one.getLineAliasId());
vo.setLongitude("2"); if (one.getLineAliasId().equals("1")) {
vo.setPeakValue("-10.44"); record.setLineAliasCode("SDK");
vo.setDataDifference("-0.44"); } else {
records.add(vo); record.setLineAliasCode("XDK");
}
DiseaseVO vo2 = new DiseaseVO(); }
vo2.setId("1682308697792339970"); //
vo2.setLineAliasCode("SDK"); // // 病害里程,取分
vo2.setMileage("21556"); // List<DiseaseVO> records = new ArrayList<>();
vo2.setOverrunType("左轨向"); //
vo2.setOverrunLevel("1"); // DiseaseVO vo = new DiseaseVO();
vo2.setLongitude("2"); // vo.setId("1682308697792339970");
vo2.setPeakValue("-10.44"); // vo.setLineAliasCode("SDK");
vo2.setDataDifference("-0.44"); // vo.setMileage("21556");
records.add(vo2); // vo.setOverrunType("左轨向");
// vo.setOverrunLevel("1");
// vo.setLongitude("2");
// vo.setPeakValue("-10.44");
// vo.setDataDifference("-0.44");
// records.add(vo);
//
// DiseaseVO vo2 = new DiseaseVO();
// vo2.setId("1682308697792339970");
// vo2.setLineAliasCode("SDK");
// vo2.setMileage("21556");
// vo2.setOverrunType("左轨向");
// vo2.setOverrunLevel("1");
// vo2.setLongitude("2");
// vo2.setPeakValue("-10.44");
// vo2.setDataDifference("-0.44");
// records.add(vo2);
return records; return records;
} }
......
...@@ -10,6 +10,9 @@ public class DiseaseVO { ...@@ -10,6 +10,9 @@ public class DiseaseVO {
@ApiModelProperty("id") @ApiModelProperty("id")
private String id; private String id;
@ApiModelProperty("线别id")
private String lineAliasId;
@ApiModelProperty("冠名") @ApiModelProperty("冠名")
private String lineAliasCode; private String lineAliasCode;
...@@ -22,9 +25,6 @@ public class DiseaseVO { ...@@ -22,9 +25,6 @@ public class DiseaseVO {
@ApiModelProperty("超限等级") @ApiModelProperty("超限等级")
private String overrunLevel; private String overrunLevel;
@ApiModelProperty("线别id")
private String lineAliasId;
@ApiModelProperty("长度") @ApiModelProperty("长度")
private String longitude; private String longitude;
......
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