|
@@ -0,0 +1,66 @@
|
|
|
+package org.jeecg.modules.documents.orderData.controller;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
+import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
+import org.jeecg.modules.documents.orderData.entity.SySOAndOM;
|
|
|
+import org.jeecg.modules.documents.orderData.service.ISySOAndOMService;
|
|
|
+import org.jeecg.modules.documents.orderData.service.impl.SySOAndOMServiceImpl;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@Api(tags="订单数据同步接口")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/orderData/sySOAndOM")
|
|
|
+public class SySOAndOMController extends JeecgController<SySOAndOM, ISySOAndOMService> {
|
|
|
+ @Autowired
|
|
|
+ private SySOAndOMServiceImpl sySOAndOMService;
|
|
|
+
|
|
|
+ @AutoLog(value = "订单数据同步接口-分页列表查询销售订单")
|
|
|
+ @ApiOperation(value="订单数据同步接口-分页列表查询销售订单", notes="订单数据同步接口-分页列表查询销售订单")
|
|
|
+ @RequestMapping(value = "/querySOList")
|
|
|
+ public Result<?> querySOList(SySOAndOM sySOAndOM,
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
|
|
+ if(sySOAndOM==null){
|
|
|
+ return Result.error("请检查查询条件!!!");
|
|
|
+ }
|
|
|
+ if(sySOAndOM.getAccount().equals("901") || sySOAndOM.getAccount().equals("902") ||
|
|
|
+ sySOAndOM.getAccount().equals("903")){
|
|
|
+ return Result.error("请选择账套号!!!");
|
|
|
+ }
|
|
|
+ if(sySOAndOM.getOrderNumber()==null && sySOAndOM.getOrderNumber().equals("")){
|
|
|
+ return Result.error("请输入订单号!!!");
|
|
|
+ }
|
|
|
+ Page<SySOAndOM> page = new Page<SySOAndOM>(pageNo, pageSize);
|
|
|
+ IPage<SySOAndOM> pageList = sySOAndOMService.querySOList(sySOAndOM,page);
|
|
|
+ return Result.OK(pageList);
|
|
|
+ }
|
|
|
+
|
|
|
+ @AutoLog(value = "订单数据同步接口-分页列表查询委外订单")
|
|
|
+ @ApiOperation(value="订单数据同步接口-分页列表查询委外订单", notes="订单数据同步接口-分页列表查询委外订单")
|
|
|
+ @RequestMapping(value = "/queryOMList")
|
|
|
+ public Result<?> queryOMList(SySOAndOM sySOAndOM,
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
|
|
+ if(sySOAndOM==null){
|
|
|
+ return Result.error("请检查查询条件!!!");
|
|
|
+ }
|
|
|
+ if(sySOAndOM.getCCode()==null && sySOAndOM.getCCode().equals("")){
|
|
|
+ return Result.error("请输入订单号!!!");
|
|
|
+ }
|
|
|
+ Page<SySOAndOM> page = new Page<SySOAndOM>(pageNo, pageSize);
|
|
|
+ IPage<SySOAndOM> pageList = sySOAndOMService.queryOMList(sySOAndOM,page);
|
|
|
+ return Result.OK(pageList);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|