Commit 6ca0da31 authored by hkl's avatar hkl

feat:1.调整程序bug

parent 1f79342d
......@@ -112,7 +112,7 @@ public class AnalysisAlgorithm {
analysisBatchUnitDevice.setUnitDeviceCode(Convert.toStr(unitDevice.get("deviceCode")));
analysisBatchUnitDevice.setUnitType(Convert.toInt(unitDevice.get("type")));
analysisBatchUnitDevice.setUnitTypeName(Convert.toStr(unitDevice.get("typeName")));
analysisBatchUnitDevice.setUnitStartingMileage(Convert.toBigDecimal(unitDevice.get("startMileage")));
analysisBatchUnitDevice.setUnitStartMileage(Convert.toBigDecimal(unitDevice.get("startMileage")));
analysisBatchUnitDevice.setUnitCenterMileage(Convert.toBigDecimal(unitDevice.get("centerMileage")));
analysisBatchUnitDevice.setUnitEndMileage(Convert.toBigDecimal(unitDevice.get("endMileage")));
Object labourCheckData = unitDevice.get("labourCheck");
......
......@@ -78,8 +78,8 @@ public class AnalysisBatchUnitDevice implements Serializable {
private String unitDeviceCode;
@ApiModelProperty("设备单元起始里程")
@TableField("unit_starting_mileage")
private BigDecimal unitStartingMileage;
@TableField("unit_start_mileage")
private BigDecimal unitStartMileage;
@ApiModelProperty("设备单元中心里程")
@TableField("unit_center_mileage")
......
......@@ -37,7 +37,7 @@ public class DispatchDTO {
private String unitDeviceCode;
@ApiModelProperty("设备单元起始里程")
private BigDecimal unitStartingMileage;
private BigDecimal unitStartMileage;
@ApiModelProperty("设备单元中心里程")
private BigDecimal unitCenterMileage;
......
......@@ -17,7 +17,7 @@ import java.util.List;
* @since 2023-08-09
*/
@Data
@ApiModel(value = "PageSaveOrUpdateDTO对象", description = "维修作业管理-页面来源保存或更新dto")
@ApiModel(value = "WorkBatchSaveOrUpdateDTO对象", description = "维修作业管理-页面来源保存或更新dto")
public class WorkBatchSaveOrUpdateDTO {
private static final long serialVersionUID = 1L;
......@@ -40,7 +40,7 @@ public class WorkBatchSaveOrUpdateDTO {
private String lineAliasName;
@ApiModelProperty("作业起始里程")
private BigDecimal workStartingMileage;
private BigDecimal workStartMileage;
@ApiModelProperty("作业终点里程")
private BigDecimal workEndMileage;
......@@ -60,6 +60,6 @@ public class WorkBatchSaveOrUpdateDTO {
@ApiModelProperty("作业状态 0-未作业 1-已作业")
private Integer workStatus;
@ApiModelProperty("详情列表【就是】")
private List<DispatchDTO> detailList;
@ApiModelProperty("详情列表")
private List<WorkBatchSaveOrUpdateDetailDTO> detailList;
}
package org.jeecg.modules.maintenanceWork.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
@ApiModel(value = "WorkBatchSaveOrUpdateDetailDTO对象", description = "维修作业管理-页面来源保存或更新dto")
public class WorkBatchSaveOrUpdateDetailDTO {
@ApiModelProperty("分析批次单元设备id")
private String unitId;
@ApiModelProperty("单元设备code")
private String unitCode;
@ApiModelProperty("设备单元类型1-钢轨 2-曲线 3-竖曲线 4-道岔")
private Integer type;
@ApiModelProperty("设备单元类型名称")
private String unitTypeName;
@ApiModelProperty("设备编号")
private String unitDeviceCode;
@ApiModelProperty("设备单元起始里程")
private BigDecimal unitStartMileage;
@ApiModelProperty("设备单元中心里程")
private BigDecimal unitCenterMileage;
@ApiModelProperty("设备单元结束里程")
private BigDecimal unitEndMileage;
@ApiModelProperty("单元得分等级 1-优良 2-合格 3-失格")
private int unitScoreLevel;
@ApiModelProperty("单元得分")
private BigDecimal unitScore;
@ApiModelProperty("维修建议")
private String remark;
}
......@@ -82,8 +82,8 @@ public class WorkBatchDetail implements Serializable {
private String unitDeviceCode;
@ApiModelProperty("设备单元起始里程")
@TableField("unit_starting_mileage")
private BigDecimal unitStartingMileage;
@TableField("unit_start_mileage")
private BigDecimal unitStartMileage;
@ApiModelProperty("设备单元中心里程")
@TableField("unit_center_mileage")
......
......@@ -12,7 +12,7 @@
t1.unit_type,
t1.unit_type_name,
t1.unit_device_code,
t1.unit_starting_mileage,
t1.unit_start_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.unit_score_level,
......
......@@ -33,14 +33,14 @@
</select>
<select id="getUnitDevicePage" resultType="java.util.Map">
SELECT id,
SELECT id unitId,
unitCode,
deviceCode,
startMileage,
endMileage,
centerMileage,
type,
typeName
deviceCode unitDeviceCode,
startMileage unitStartMileage,
endMileage unitEndMileage,
centerMileage unitCenterMileage,
type unitType,
typeName unitTypeName
FROM (SELECT t1.id,
t1.unit_code unitCode,
t1.rail_code deviceCode,
......
......@@ -59,7 +59,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
WorkBatch workBatch = BeanUtil.copyProperties(dto, WorkBatch.class);
if (ObjectUtil.isEmpty(dto.getId())) {
workBatch.setId(UUIDGenerator.generate());
workBatch.setWorkStatus(9);
workBatch.setWorkStatus(0);
}
this.saveOrUpdate(workBatch);
......@@ -70,23 +70,24 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
LambdaQueryWrapper<WorkBatchDetail> delWrapper = Wrappers.lambdaQuery();
delWrapper.eq(WorkBatchDetail::getWorkBatchId, dto.getId());
workBatchDetailMapper.delete(delWrapper);
List<DispatchDTO> transfiniteList = dto.getDetailList();
for (DispatchDTO dispatchDTO : transfiniteList) {
List<WorkBatchSaveOrUpdateDetailDTO> transfiniteList = dto.getDetailList();
for (WorkBatchSaveOrUpdateDetailDTO detailDTO : transfiniteList) {
WorkBatchDetail workBatchDetail = new WorkBatchDetail();
workBatchDetail.setId(UUIDGenerator.generate());
workBatchDetail.setWorkBatchId(dto.getId());
workBatchDetail.setWorkBatchCode(dto.getWorkBatchCode());
workBatchDetail.setUnitId(dispatchDTO.getUnitId());
workBatchDetail.setUnitCode(dispatchDTO.getUnitCode());
workBatchDetail.setUnitType(dispatchDTO.getUnitType());
workBatchDetail.setUnitTypeName(dispatchDTO.getUnitTypeName());
workBatchDetail.setUnitDeviceCode(dispatchDTO.getUnitDeviceCode());
workBatchDetail.setUnitEndMileage(dispatchDTO.getUnitStartingMileage());
workBatchDetail.setUnitEndMileage(dispatchDTO.getUnitEndMileage());
workBatchDetail.setUnitCenterMileage(dispatchDTO.getUnitCenterMileage());
workBatchDetail.setUnitScore(dispatchDTO.getUnitScore());
workBatchDetail.setUnitScoreLevel(dispatchDTO.getUnitScoreLevel());
workBatchDetail.setUnitScoreLevelStr(dispatchDTO.getUnitScoreLevelStr());
workBatchDetail.setWorkBatchId(workBatch.getId());
workBatchDetail.setWorkBatchCode(workBatch.getWorkBatchCode());
workBatchDetail.setUnitId(detailDTO.getUnitId());
workBatchDetail.setUnitCode(detailDTO.getUnitCode());
workBatchDetail.setUnitType(detailDTO.getType());
workBatchDetail.setUnitTypeName(detailDTO.getUnitTypeName());
workBatchDetail.setUnitDeviceCode(detailDTO.getUnitDeviceCode());
workBatchDetail.setUnitStartMileage(detailDTO.getUnitStartMileage());
workBatchDetail.setUnitEndMileage(detailDTO.getUnitEndMileage());
workBatchDetail.setUnitCenterMileage(detailDTO.getUnitCenterMileage());
workBatchDetail.setUnitScore(detailDTO.getUnitScore());
workBatchDetail.setUnitScoreLevel(detailDTO.getUnitScoreLevel());
workBatchDetail.setRemark(detailDTO.getRemark());
workBatchDetailMapper.insert(workBatchDetail);
}
}
......@@ -121,7 +122,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatchDetail.setUnitType(transfiniteDTO.getUnitType());
workBatchDetail.setUnitTypeName(transfiniteDTO.getUnitTypeName());
workBatchDetail.setUnitDeviceCode(transfiniteDTO.getUnitDeviceCode());
workBatchDetail.setUnitEndMileage(transfiniteDTO.getUnitStartingMileage());
workBatchDetail.setUnitEndMileage(transfiniteDTO.getUnitStartMileage());
workBatchDetail.setUnitEndMileage(transfiniteDTO.getUnitEndMileage());
workBatchDetail.setUnitCenterMileage(transfiniteDTO.getUnitCenterMileage());
workBatchDetail.setUnitScore(transfiniteDTO.getUnitScore());
......@@ -164,7 +165,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatchDetail.setUnitType(unitDevice.getUnitType());
workBatchDetail.setUnitTypeName(unitDevice.getUnitTypeName());
workBatchDetail.setUnitDeviceCode(unitDevice.getUnitDeviceCode());
workBatchDetail.setUnitEndMileage(unitDevice.getUnitStartingMileage());
workBatchDetail.setUnitStartMileage(unitDevice.getUnitStartMileage());
workBatchDetail.setUnitEndMileage(unitDevice.getUnitEndMileage());
workBatchDetail.setUnitCenterMileage(unitDevice.getUnitCenterMileage());
workBatchDetail.setUnitScore(unitDevice.getUnitScore());
......
......@@ -30,42 +30,12 @@ public class WorkBatchDetailVO {
@ApiModelProperty("主键")
private String id;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("创建日期")
private Date createTime;
@ApiModelProperty("更新人")
private String updateBy;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("工作批次code")
private String workBatchCode;
@ApiModelProperty("工作批次id")
private String workBatchId;
@ApiModelProperty("检查批次号")
private String ekCode;
@ApiModelProperty("检查批id")
private String ekId;
@ApiModelProperty("检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查")
private Integer ekType;
@ApiModelProperty("检查日期")
private Date checkTime;
@ApiModelProperty("起始里程")
private BigDecimal startingMileage;
@ApiModelProperty("终点里程")
private BigDecimal endMileage;
@ApiModelProperty("单元设备id")
private String unitId;
......@@ -82,7 +52,7 @@ public class WorkBatchDetailVO {
private String unitDeviceCode;
@ApiModelProperty("设备单元起始里程")
private BigDecimal unitStartingMileage;
private BigDecimal unitStartMileage;
@ApiModelProperty("设备单元中心里程")
private BigDecimal unitCenterMileage;
......
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