出厂设备表新增字段-设备运行状态
This commit is contained in:
@@ -107,7 +107,7 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateStatusBynDid")
|
||||
@ApiOperation("根据网关id调整设备状态")
|
||||
@ApiOperation("根据网关id调整设备接入状态")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "nDId", value = "网关id", required = true),
|
||||
@ApiImplicitParam(name = "status", value = "状态", required = true)
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.njcn.csdevice.controller.equipment;
|
||||
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-06-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mqttUser")
|
||||
@AllArgsConstructor
|
||||
@Slf4j
|
||||
@Api(tags = "MqttUser录入")
|
||||
public class MqttUserController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
||||
|
||||
private final ICsLedgerService csLedgerService;
|
||||
|
||||
private final IMqttUserService mqttUserService;
|
||||
private final RoleEngineerDevService roleEngineerDevService;
|
||||
|
||||
@Override
|
||||
@@ -75,6 +74,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
||||
CsEquipmentDeliveryPO csEquipmentDeliveryPo = new CsEquipmentDeliveryPO();
|
||||
BeanUtils.copyProperties (csEquipmentDeliveryAddParm,csEquipmentDeliveryPo);
|
||||
csEquipmentDeliveryPo.setStatus ("1");
|
||||
csEquipmentDeliveryPo.setRunStatus(1);
|
||||
return this.save (csEquipmentDeliveryPo);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
||||
public Boolean AuditEquipmentDelivery(String id) {
|
||||
UpdateWrapper<CsEquipmentDeliveryPO> wrapper = new UpdateWrapper();
|
||||
wrapper.eq ("id", id);
|
||||
wrapper.set ("status", "0");
|
||||
wrapper.set ("run_status", "0");
|
||||
boolean update = this.update (wrapper);
|
||||
return update;
|
||||
}
|
||||
@@ -175,6 +175,11 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
||||
} else {
|
||||
queryWrapper.in("cs_equipment_delivery.status", Arrays.asList(1,2,3));
|
||||
}
|
||||
if (!Objects.isNull(queryParam.getRunStatus())){
|
||||
queryWrapper.eq("cs_equipment_delivery.run_status", queryParam.getRunStatus());
|
||||
} else {
|
||||
queryWrapper.in("cs_equipment_delivery.run_status", Arrays.asList(1,2));
|
||||
}
|
||||
return this.baseMapper.page(new Page<>(PageFactory.getPageNum(queryParam), PageFactory.getPageSize(queryParam)), queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user