feat():设定值接口修改
This commit is contained in:
@@ -26,7 +26,7 @@ public class ModSetupResult {
|
||||
private String coilId;
|
||||
|
||||
@ApiModelProperty(value = "道次号")
|
||||
private Integer passId;
|
||||
private Integer passno;
|
||||
|
||||
@ApiModelProperty(value = "机架号")
|
||||
private Integer standId;
|
||||
|
||||
@@ -14,12 +14,10 @@ public class CrmPdoExcoilForm {
|
||||
@ApiModelProperty(value = "钢卷号")
|
||||
private String encoilid;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "开始日期")
|
||||
private LocalDateTime startDate;
|
||||
private String startDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "结束日期")
|
||||
private LocalDateTime endDate;
|
||||
private String endDate;
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public class ModSetupResultForm {
|
||||
private String grade;
|
||||
|
||||
@ApiModelProperty(value = "道次号")
|
||||
private Integer passId;
|
||||
private Integer passno;
|
||||
|
||||
@ApiModelProperty(value = "退火厚度")
|
||||
private Integer annealThick;
|
||||
|
||||
@@ -67,8 +67,8 @@ public class CrmPdoExcoilServiceImpl extends ServiceImpl<CrmPdoExcoilMapper, Crm
|
||||
queryWrapper.eq("exit_coilid", form.getEncoilid()).eq("encoilid", form.getEncoilid());
|
||||
}
|
||||
|
||||
queryWrapper.ge("start_date", form.getStartDate() + "00:00:00");
|
||||
queryWrapper.le("start_date", form.getStartDate() + "23:59:59");
|
||||
queryWrapper.ge("start_date", form.getStartDate() + " 00:00:00");
|
||||
queryWrapper.le("start_date", form.getStartDate() + " 23:59:59");
|
||||
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@@ -21,23 +21,28 @@ public class ModSetupResultServiceImpl extends ServiceImpl<ModSetupResultMapper,
|
||||
|
||||
// 确保各个字段的非空验证
|
||||
if (StringUtils.isEmpty(form.getGrade()) || form.getAnnealThick() == null ||
|
||||
form.getEntryThick() == null || form.getExitThick() == null || form.getPassId() == null) {
|
||||
form.getEntryThick() == null || form.getExitThick() == null || form.getPassno() == null) {
|
||||
throw new IllegalArgumentException("必要的字段缺失");
|
||||
}
|
||||
|
||||
// 去除Double类型的字段的小数位
|
||||
int annealThick = form.getAnnealThick();
|
||||
int entryThick = form.getEntryThick().intValue(); // 去除小数位
|
||||
int exitThick = form.getExitThick().intValue(); // 去除小数位
|
||||
int passId = form.getPassId();
|
||||
// 获取厚度并处理
|
||||
int annealThick = Math.round(form.getAnnealThick() * 100); // 乘以100并四舍五入
|
||||
int entryThick = (int) Math.round(form.getEntryThick() * 100); // 乘以100并四舍五入
|
||||
int exitThick = (int) Math.round(form.getExitThick() * 100); // 乘以100并四舍五入
|
||||
|
||||
// 格式化为三位数字
|
||||
String annealThickStr = String.format("%03d", annealThick);
|
||||
String entryThickStr = String.format("%03d", entryThick);
|
||||
String exitThickStr = String.format("%03d", exitThick);
|
||||
|
||||
// 根据字段构建 calcId
|
||||
String calcId = form.getGrade() + annealThick + entryThick + exitThick + passId;
|
||||
String calcId = form.getGrade() + annealThickStr + entryThickStr + exitThickStr + form.getPassno();
|
||||
|
||||
// 实际查询代码(根据 calcId 查询数据)
|
||||
// 这里假设查询方法为根据 calcId 查找结果
|
||||
LambdaQueryWrapper<ModSetupResult> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ModSetupResult::getCalcId,calcId);
|
||||
queryWrapper.eq(ModSetupResult::getCalcId, calcId);
|
||||
|
||||
List<ModSetupResult> results = this.baseMapper.selectList(queryWrapper);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public class ModSetupResultVO {
|
||||
private String coilId;
|
||||
|
||||
@ApiModelProperty(value = "道次号")
|
||||
private Integer passId;
|
||||
private Integer passno;
|
||||
|
||||
@ApiModelProperty(value = "入口厚度")
|
||||
private Float entryThick;
|
||||
|
||||
Reference in New Issue
Block a user