|
|
@ -1,23 +1,17 @@
|
|
|
|
package com.glxp.api.controller.inv;
|
|
|
|
package com.glxp.api.controller.inv;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
import com.glxp.api.common.req.UpdateRequest;
|
|
|
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity;
|
|
|
|
import com.glxp.api.constant.Constant;
|
|
|
|
import com.glxp.api.entity.inv.DeviceInspectPlanEntity;
|
|
|
|
|
|
|
|
import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity;
|
|
|
|
import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity;
|
|
|
|
import com.glxp.api.entity.inv.DeviceInspectTaskEntity;
|
|
|
|
import com.glxp.api.entity.inv.DeviceInspectTaskEntity;
|
|
|
|
import com.glxp.api.req.inv.AddDeviceInspectPlanRequest;
|
|
|
|
|
|
|
|
import com.glxp.api.req.inv.FilterDeviceInspectPlanRequest;
|
|
|
|
|
|
|
|
import com.glxp.api.req.inv.FilterDeviceInspectTakeRequest;
|
|
|
|
import com.glxp.api.req.inv.FilterDeviceInspectTakeRequest;
|
|
|
|
import com.glxp.api.req.system.DeleteRequest;
|
|
|
|
|
|
|
|
import com.glxp.api.res.inv.DeviceInspectPlanResponse;
|
|
|
|
|
|
|
|
import com.glxp.api.res.inv.DeviceInspectTakeResponse;
|
|
|
|
import com.glxp.api.res.inv.DeviceInspectTakeResponse;
|
|
|
|
import com.glxp.api.service.inv.DeviceInspectPlanService;
|
|
|
|
|
|
|
|
import com.glxp.api.service.inv.DeviceInspectTaskDetailService;
|
|
|
|
import com.glxp.api.service.inv.DeviceInspectTaskDetailService;
|
|
|
|
import com.glxp.api.service.inv.DeviceInspectTaskService;
|
|
|
|
import com.glxp.api.service.inv.DeviceInspectTaskService;
|
|
|
|
|
|
|
|
import com.glxp.api.util.GennerOrderUtils;
|
|
|
|
|
|
|
|
import com.glxp.api.util.OrderNoTypeBean;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
@ -40,6 +34,8 @@ public class DeviceInspectTakeController {
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
DeviceInspectTaskDetailService deviceInspectTaskDetailService;
|
|
|
|
DeviceInspectTaskDetailService deviceInspectTaskDetailService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private GennerOrderUtils gennerOrderUtils;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询设设备巡检任务接口
|
|
|
|
* 查询设设备巡检任务接口
|
|
|
@ -68,6 +64,27 @@ public class DeviceInspectTakeController {
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/udiwms/inv/device/inspect/take/uploadDeviceTake")
|
|
|
|
|
|
|
|
public BaseResponse uploadDeviceTake(@RequestBody DeviceInspectTaskEntity deviceInspectTaskEntity) {
|
|
|
|
|
|
|
|
deviceInspectTaskEntity.setUpdateTime(new Date());
|
|
|
|
|
|
|
|
boolean falg=deviceInspectTaskService.updateById(deviceInspectTaskEntity);
|
|
|
|
|
|
|
|
if(!falg){
|
|
|
|
|
|
|
|
return ResultVOUtils.error(999,"更新失败");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/udiwms/inv/device/inspect/take/addDeviceInspecTake")
|
|
|
|
|
|
|
|
public BaseResponse addDeviceInspecTake(@RequestBody DeviceInspectTaskEntity deviceInspectTaskEntity) {
|
|
|
|
|
|
|
|
String orderId = gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.DEVICE_INSPECT_PLAN_ORDER, "yyyyMMdd"));
|
|
|
|
|
|
|
|
deviceInspectTaskEntity.setOrderId(orderId);
|
|
|
|
|
|
|
|
deviceInspectTaskEntity.setCreateTime(new Date());
|
|
|
|
|
|
|
|
deviceInspectTaskService.addDeviceInspectTask(deviceInspectTaskEntity);
|
|
|
|
|
|
|
|
return ResultVOUtils.success(deviceInspectTaskEntity);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|