You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
3.5 KiB
Java
89 lines
3.5 KiB
Java
package com.glxp.api.controller.basic;
|
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
|
import com.glxp.api.annotation.Log;
|
|
import com.glxp.api.common.enums.ResultEnum;
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
import com.glxp.api.constant.BusinessType;
|
|
import com.glxp.api.entity.basic.BasicCorpEntity;
|
|
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
|
|
import com.glxp.api.entity.inout.IoOrderEntity;
|
|
import com.glxp.api.req.inout.FilterOrderDetailBizRequest;
|
|
import com.glxp.api.req.inout.FilterOrderRequest;
|
|
import com.glxp.api.req.inv.invInnerOrderprintReques;
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
|
|
import com.glxp.api.res.inout.IoOrderResponse;
|
|
import com.glxp.api.service.inout.IoOrderDetailBizService;
|
|
import com.glxp.api.service.inout.IoOrderService;
|
|
import com.glxp.api.service.inv.InvInnerOrderPrintService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.validation.BindingResult;
|
|
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 java.util.List;
|
|
|
|
@Slf4j
|
|
@RestController
|
|
public class BasicInCodeController {
|
|
|
|
@Resource
|
|
IoOrderService ioOrderService;
|
|
|
|
@Resource
|
|
IoOrderDetailBizService ioOrderDetailBizService;
|
|
|
|
@Resource
|
|
InvInnerOrderPrintService invInnerOrderPrintService;
|
|
|
|
@AuthRuleAnnotation("")
|
|
@GetMapping("/udiwms/stock/order/filter")
|
|
public BaseResponse filterOrder(FilterOrderRequest filterOrderRequest) {
|
|
|
|
|
|
List<IoOrderResponse> ioOrderEntityList = ioOrderService.filterList(filterOrderRequest);
|
|
|
|
PageInfo<IoOrderResponse> pageInfo = new PageInfo<>(ioOrderEntityList);
|
|
PageSimpleResponse<IoOrderResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
|
pageSimpleResponse.setList(ioOrderEntityList);
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
}
|
|
|
|
@AuthRuleAnnotation("")
|
|
@GetMapping("/udiwms/stock/order/detail/filter")
|
|
public BaseResponse filterStockOrderDetail(FilterOrderDetailBizRequest filterOrderDetailBizRequest) {
|
|
|
|
List<IoOrderDetailBizResponse> ioOrderDetailBizResponseList = ioOrderDetailBizService.filterList(filterOrderDetailBizRequest);
|
|
|
|
PageInfo<IoOrderDetailBizResponse> pageInfo = new PageInfo<>(ioOrderDetailBizResponseList);
|
|
PageSimpleResponse<IoOrderDetailBizResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
|
pageSimpleResponse.setList(ioOrderDetailBizResponseList);
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
}
|
|
|
|
@PostMapping("/udiwms/stock/order/addOrderPrint")
|
|
@Log(title = "单据管理", businessType = BusinessType.INSERT)
|
|
public BaseResponse addOrderPrint(@RequestBody invInnerOrderprintReques invInnerOrderprintReques) {
|
|
|
|
if (invInnerOrderprintReques.getOrderIdFk() != null) {
|
|
Boolean falg = invInnerOrderPrintService.addInCodeList(invInnerOrderprintReques.getOrderIdFk(), invInnerOrderprintReques.isChack());
|
|
if (!falg) {
|
|
return ResultVOUtils.error(999, "生成失败!");
|
|
}
|
|
} else {
|
|
return ResultVOUtils.error(999, "参数错误!");
|
|
}
|
|
return ResultVOUtils.success();
|
|
|
|
}
|
|
}
|