代码优化

This commit is contained in:
xy
2026-04-08 10:19:06 +08:00
parent 445f27143b
commit 45fd613e47
6 changed files with 7 additions and 42 deletions

View File

@@ -303,20 +303,6 @@ public class EquipmentDeliveryController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/updateLedger")
@ApiOperation("更新设备预设工程和项目id")
@ApiImplicitParams({
@ApiImplicitParam(name = "nDid", value = "网络设备码", required = true),
@ApiImplicitParam(name = "engineeringId", value = "工程id", required = true),
@ApiImplicitParam(name = "projectId", value = "项目id", required = true)
})
public HttpResult<String> updateLedger(@RequestParam("nDid") String nDid,@RequestParam("engineeringId") String engineeringId,@RequestParam("projectId") String projectId){
String methodDescribe = getMethodDescribe("updateLedger");
csEquipmentDeliveryService.updateLedger(nDid,engineeringId,projectId);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/rebootDevice")
@ApiOperation("重启设备")

View File

@@ -11,7 +11,6 @@ import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
import com.njcn.csdevice.pojo.vo.DeviceManagerVO;
import com.njcn.csdevice.pojo.vo.ProjectEquipmentVO;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
@@ -122,8 +121,6 @@ public interface CsEquipmentDeliveryService extends IService<CsEquipmentDelivery
*/
void updateModuleNumber(String nDid, Integer number);
void updateLedger(String nDid,String engineeringId,String projectId);
boolean rebootDevice(String nDid);
/**

View File

@@ -759,20 +759,6 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
}
}
@Override
public void updateLedger(String nDid,String engineeringId,String projectId) {
boolean result;
LambdaUpdateWrapper<CsEquipmentDeliveryPO> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
lambdaUpdateWrapper.eq(CsEquipmentDeliveryPO::getNdid,nDid)
.ne(CsEquipmentDeliveryPO::getRunStatus,0)
.set(CsEquipmentDeliveryPO::getAssociatedEngineering,engineeringId)
.set(CsEquipmentDeliveryPO::getAssociatedProject,projectId);
result = this.update(lambdaUpdateWrapper);
if (result) {
refreshDeviceDataCache();
}
}
@Override
public boolean rebootDevice(String nDid) {
boolean result = false;