|
|
|
@ -5,13 +5,16 @@ import cn.hutool.core.util.StrUtil;
|
|
|
|
|
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.dao.inv.DeviceInspectPlanDao;
|
|
|
|
|
import com.glxp.api.entity.inv.DeviceInspectPlanEntity;
|
|
|
|
|
import com.glxp.api.req.inv.AddDeviceInspectOrderRequest;
|
|
|
|
|
import com.glxp.api.req.inv.AddDeviceInspectPlanRequest;
|
|
|
|
|
import com.glxp.api.req.inv.FilterDeviceInspectPlanRequest;
|
|
|
|
|
import com.glxp.api.res.inv.DeviceInspectPlanResponse;
|
|
|
|
|
import com.glxp.api.service.auth.CustomerService;
|
|
|
|
|
import com.glxp.api.service.inv.DeviceInspectPlanService;
|
|
|
|
|
import com.glxp.api.util.GennerOrderUtils;
|
|
|
|
|
import com.glxp.api.util.OrderNoTypeBean;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
@ -30,6 +33,8 @@ public class DeviceInspectPlanServiceImpl implements DeviceInspectPlanService {
|
|
|
|
|
private DeviceInspectPlanDao deviceInspectPlanDao;
|
|
|
|
|
@Resource
|
|
|
|
|
private CustomerService customerService;
|
|
|
|
|
@Resource
|
|
|
|
|
private GennerOrderUtils gennerOrderUtils;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<DeviceInspectPlanResponse> filterList(FilterDeviceInspectPlanRequest filterDeviceInspectPlanRequest) {
|
|
|
|
@ -43,11 +48,14 @@ public class DeviceInspectPlanServiceImpl implements DeviceInspectPlanService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public BaseResponse addDeviceInspectPlan(AddDeviceInspectOrderRequest addDeviceInspectOrderRequest) {
|
|
|
|
|
public BaseResponse addDeviceInspectPlan(AddDeviceInspectPlanRequest deviceInspectPlanRequest) {
|
|
|
|
|
DeviceInspectPlanEntity deviceInspectPlanEntity = new DeviceInspectPlanEntity();
|
|
|
|
|
BeanUtil.copyProperties(addDeviceInspectOrderRequest, deviceInspectPlanEntity);
|
|
|
|
|
BeanUtil.copyProperties(deviceInspectPlanRequest, deviceInspectPlanEntity);
|
|
|
|
|
deviceInspectPlanEntity.setCreateUser(customerService.getUserIdStr());
|
|
|
|
|
Date date = new Date();
|
|
|
|
|
String orderId = gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.DEVICE_INSPECT_PLAN_ORDER, "yyyyMMdd"));
|
|
|
|
|
deviceInspectPlanEntity.setOrderId(orderId);
|
|
|
|
|
deviceInspectPlanEntity.setStatus(0);
|
|
|
|
|
deviceInspectPlanEntity.setCreateTime(date);
|
|
|
|
|
deviceInspectPlanEntity.setUpdateTime(date);
|
|
|
|
|
deviceInspectPlanDao.insert(deviceInspectPlanEntity);
|
|
|
|
|