diff --git a/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectTakeRequest.java b/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectTakeRequest.java index 4e0e3c3b..a2b09bc1 100644 --- a/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectTakeRequest.java +++ b/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectTakeRequest.java @@ -12,7 +12,7 @@ import java.util.List; @Data public class FilterDeviceInspectTakeRequest extends ListPageRequest { - private Integer id; + private Long id; /** * 单号 diff --git a/src/main/java/com/glxp/api/res/inv/DeviceInspectTakeResponse.java b/src/main/java/com/glxp/api/res/inv/DeviceInspectTakeResponse.java index 8f46ade5..d87fcdb4 100644 --- a/src/main/java/com/glxp/api/res/inv/DeviceInspectTakeResponse.java +++ b/src/main/java/com/glxp/api/res/inv/DeviceInspectTakeResponse.java @@ -10,7 +10,7 @@ import java.util.Date; @Data public class DeviceInspectTakeResponse { - private Integer id; + private Long id; /** * 单号 diff --git a/src/main/java/com/glxp/api/service/inv/impl/DeviceInspectPlanServiceImpl.java b/src/main/java/com/glxp/api/service/inv/impl/DeviceInspectPlanServiceImpl.java index 7623b5c4..72d3b3ba 100644 --- a/src/main/java/com/glxp/api/service/inv/impl/DeviceInspectPlanServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inv/impl/DeviceInspectPlanServiceImpl.java @@ -1,12 +1,15 @@ package com.glxp.api.service.inv.impl; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageHelper; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.constant.Constant; +import com.glxp.api.constant.DeviceStatus; +import com.glxp.api.constant.DeviceType; import com.glxp.api.dao.inv.DeviceInspectPlanDao; import com.glxp.api.dao.inv.DeviceInspectPlanDelectMapper; import com.glxp.api.dao.inv.DeviceInspectTaskDetailMapper; @@ -118,10 +121,10 @@ public class DeviceInspectPlanServiceImpl implements DeviceInspectPlanService { deviceInspectPlanEntity.setAuditUser(customerService.getUserIdStr()); // //审核通过,生成任务单 // deviceInspectOrderService.addByPlanOrderId(orderId); -// //生成计划主表 -// DeviceInspectTaskEntity deviceInspectTaskEntity = getDeviceInspectTaskEntity(orderId,expectedTime); -// //生成计划详情主表 -// getDeviceInspectTaskDetailEntity(orderId, deviceInspectTaskEntity.getOrderId()); + //生成计划主表 + DeviceInspectTaskEntity deviceInspectTaskEntity = getDeviceInspectTaskEntity(orderId,expectedTime); + //生成计划详情主表 + getDeviceInspectTaskDetailEntity(orderId, deviceInspectTaskEntity.getOrderId()); } deviceInspectPlanDao.updateById(deviceInspectPlanEntity); return ResultVOUtils.success(); @@ -151,7 +154,8 @@ public class DeviceInspectPlanServiceImpl implements DeviceInspectPlanService { deviceInspectTaskEntity.setDeptCode(deviceInspectPlanEntity.getDeptCode()); deviceInspectTaskEntity.setInvCode(deviceInspectPlanEntity.getInvCode()); deviceInspectTaskEntity.setCode(deviceInspectPlanEntity.getCode()); - deviceInspectTaskEntity.setStatus(0); + deviceInspectTaskEntity.setType(DeviceType.TYPE_INSPECTTION); + deviceInspectTaskEntity.setStatus(DeviceStatus.DEVICE_STATUS_TEMP_UNDISTRIBUTTED); deviceInspectTaskEntity.setInspectUser(deviceInspectPlanEntity.getInspectUser()); deviceInspectTaskEntity.setRemark(deviceInspectPlanEntity.getRemark()); deviceInspectTaskEntity.setCreateTime(new Date()); @@ -173,6 +177,7 @@ public class DeviceInspectPlanServiceImpl implements DeviceInspectPlanService { } for (DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity : deviceInspectPlanDelectEntityList) { DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity = new DeviceInspectTaskDetailEntity(); + deviceInspectTaskDetailEntity.setId(IdUtil.getSnowflakeNextId()); deviceInspectTaskDetailEntity.setProjectCode(deviceInspectPlanEntity.getCode()); deviceInspectTaskDetailEntity.setProjectContent(deviceInspectPlanDelectEntity.getContent()); deviceInspectTaskDetailEntity.setStatus(1);