终端周期检测代码调整
This commit is contained in:
@@ -167,4 +167,13 @@ public class DeviceController extends BaseController {
|
||||
Console.log("string payload : {}", payload);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||
@PostMapping("/updateDevCheckTime")
|
||||
@ApiOperation("技术监督修改装置定检时间")
|
||||
public HttpResult<String> updateDevCheckTime(String devId, String thisTimeCheck, String nextTimeCheck) {
|
||||
String methodDescribe = getMethodDescribe("updateDevCheckTime");
|
||||
iDeviceService.updateDevCheckTime(devId,thisTimeCheck,nextTimeCheck);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, "success", methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -125,4 +125,12 @@ public interface IDeviceService extends IService<Device> {
|
||||
* @Date: 2023/8/17 9:24
|
||||
*/
|
||||
String restartDev(List<String> devList);
|
||||
|
||||
/**
|
||||
* @param devId 装置id
|
||||
* @param thisTimeCheck 本次定检时间
|
||||
* @param nextTimeCheck 下次定检时间
|
||||
* @Description: 技术监督修改装置定检时间
|
||||
*/
|
||||
void updateDevCheckTime(String devId, String thisTimeCheck, String nextTimeCheck);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.device.pq.mapper.DevVersionMapper;
|
||||
import com.njcn.device.pq.mapper.DeviceMapper;
|
||||
@@ -397,5 +398,14 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
return "命令发送成功";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDevCheckTime(String devId, String thisTimeCheck, String nextTimeCheck) {
|
||||
LambdaUpdateWrapper<Device> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(Device::getId, devId)
|
||||
.set(Device::getThisTimeCheck, thisTimeCheck)
|
||||
.set(Device::getNextTimeCheck, nextTimeCheck);
|
||||
this.update(updateWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user