温度阈值
This commit is contained in:
parent
3533baa383
commit
7eb4a4fed8
@ -91,7 +91,7 @@ public class DryEquipmentInfoController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('dry:info:edit')")
|
||||
@Log(title = "设备信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/update")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DryEquipmentInfo dryEquipmentInfo)
|
||||
{
|
||||
return toAjax(dryEquipmentInfoService.updateDryEquipmentInfo(dryEquipmentInfo));
|
||||
|
||||
@ -86,10 +86,13 @@ public class DryEquipmentInfoServiceImpl implements IDryEquipmentInfoService {
|
||||
*/
|
||||
@Override
|
||||
public int updateDryEquipmentInfo(DryEquipmentInfo dryEquipmentInfo) {
|
||||
LambdaUpdateWrapper<DryParamThreshold> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(DryParamThreshold::getEquipmentCode, dryEquipmentInfo.getEquipmentCode())
|
||||
.eq(DryParamThreshold::getIsEnabled,"1");
|
||||
paramMapper.update(wrapper.set(DryParamThreshold::getIsEnabled, "0"));
|
||||
DryEquipmentInfo oldInfo = dryEquipmentInfoMapper.selectOne(new LambdaQueryWrapper<DryEquipmentInfo>().eq(DryEquipmentInfo::getEquipmentCode, dryEquipmentInfo.getEquipmentCode()));
|
||||
if (oldInfo.getRuleCode() != null || oldInfo.getRuleCode() != " ") {
|
||||
LambdaUpdateWrapper<DryParamThreshold> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(DryParamThreshold::getEquipmentCode, dryEquipmentInfo.getEquipmentCode())
|
||||
.eq(DryParamThreshold::getIsEnabled,"1");
|
||||
paramMapper.update(wrapper.set(DryParamThreshold::getIsEnabled, "0"));
|
||||
}
|
||||
paramMapper.update(new LambdaUpdateWrapper<DryParamThreshold>().eq(DryParamThreshold::getRuleCode, dryEquipmentInfo.getRuleCode())
|
||||
.set(DryParamThreshold::getEquipmentCode, dryEquipmentInfo.getEquipmentCode())
|
||||
.set(DryParamThreshold::getIsEnabled,"1"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user