|
|
|
@ -258,6 +258,21 @@ public class MeterConfigController { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@RequestMapping("/saveCalibration") |
|
|
|
public Result<?> saveCalibration(MeterConfig config){ |
|
|
|
if(StringUtils.isEmpty(config.getJzVal())){ |
|
|
|
return Result.error("保存失败,校准值不能为空"); |
|
|
|
} |
|
|
|
UpdateWrapper<MeterConfig> update = new UpdateWrapper<>(); |
|
|
|
if(StringUtils.isNotEmpty(config.getIsJz())){ |
|
|
|
update.set("is_jz",config.getIsJz()); |
|
|
|
} |
|
|
|
update.set("jz_val",config.getJzVal()); |
|
|
|
update.eq("id",config.getId()); |
|
|
|
meterConfigService.update(update); |
|
|
|
return Result.OK("保存成功!"); |
|
|
|
} |
|
|
|
|
|
|
|
//同步配置文件到udp主机
|
|
|
|
@RequestMapping("/sendSynchronizationUdp") |
|
|
|
public Result<?> sendSynchronizationUdp(){ |
|
|
|
|