|
|
|
@ -11,27 +11,24 @@ import com.glxp.udi.admin.constant.ConstantStatus;
|
|
|
|
|
import com.glxp.udi.admin.entity.auth.AuthAdmin;
|
|
|
|
|
import com.glxp.udi.admin.entity.inout.*;
|
|
|
|
|
import com.glxp.udi.admin.entity.udid.UdiEntity;
|
|
|
|
|
import com.glxp.udi.admin.service.inout.OrderService;
|
|
|
|
|
import com.glxp.udi.admin.service.inout.WarehouseService;
|
|
|
|
|
import com.glxp.udi.admin.service.inout.WarehouseTempService;
|
|
|
|
|
import com.glxp.udi.admin.req.inout.*;
|
|
|
|
|
import com.glxp.udi.admin.req.inventory.FilterInvLinkDataRequest;
|
|
|
|
|
import com.glxp.udi.admin.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.udi.admin.res.basic.BussinessTypResponse;
|
|
|
|
|
import com.glxp.udi.admin.service.auth.AuthAdminService;
|
|
|
|
|
import com.glxp.udi.admin.service.inout.UdiInfoService;
|
|
|
|
|
import com.glxp.udi.admin.service.inout.WarehouseBussinessTypeService;
|
|
|
|
|
import com.glxp.udi.admin.service.inout.WarehouseUserService;
|
|
|
|
|
import com.glxp.udi.admin.service.inout.*;
|
|
|
|
|
import com.glxp.udi.admin.thread.TransInoutService;
|
|
|
|
|
import com.glxp.udi.admin.util.FilterUdiUtils;
|
|
|
|
|
import com.glxp.udi.common.enums.ResultEnum;
|
|
|
|
|
import com.glxp.udi.common.util.ResultVOUtils;
|
|
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
@ -86,25 +83,7 @@ public class WareHouseController {
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@GetMapping("warehouse/inout/deleteCodesTempById")
|
|
|
|
|
public BaseResponse deleteCodesTempById(String id) {
|
|
|
|
|
WarehousetempEntity warehousetemp = warehouseTempService.findTempById(id);
|
|
|
|
|
if (null == warehousetemp) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (warehousetemp.getCount() != null && warehousetemp.getCount() > 1) {
|
|
|
|
|
warehousetemp.setCount(warehousetemp.getCount() - 1);
|
|
|
|
|
warehouseTempService.updateById(warehousetemp);
|
|
|
|
|
} else {
|
|
|
|
|
warehouseTempService.deleteTempWarehouses(Collections.singletonList(warehousetemp.getId()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<WarehousetempEntity> tempByOrderId = warehouseTempService.findTempByOrderId(warehousetemp.getOrderId());
|
|
|
|
|
if (tempByOrderId.size() == 0) {
|
|
|
|
|
DeleteRequest deleteRequest = new DeleteRequest();
|
|
|
|
|
deleteRequest.setOrderId(warehousetemp.getOrderId());
|
|
|
|
|
warehouseTempService.deleteCode(deleteRequest);
|
|
|
|
|
}
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
return warehouseTempService.deleteCodesTempById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|