ysh 2 năm trước cách đây
mục cha
commit
e193a41845

+ 6 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/SubcontractingOrderController.java

@@ -3,8 +3,10 @@ package org.jeecg.modules.openApi.controller;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
+import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.modules.openApi.entity.PurchaseWarehousing;
 import org.jeecg.modules.openApi.entity.ResHttpStatus;
@@ -39,6 +41,7 @@ public class SubcontractingOrderController extends JeecgController<Subcontractin
     /**
      * 根据订单号审核入库单(pda功能) 0000000003
      */
+    @AutoLog(value = "根据二维码审核入库单 (pda功能)")
     @RequestMapping(value = "/toExamine",method = RequestMethod.POST)
     @ResponseBody
     public ResponseEntity<ResHttpStatus> toExamine(@RequestBody JSONObject json) {
@@ -76,6 +79,7 @@ public class SubcontractingOrderController extends JeecgController<Subcontractin
     /**
      * 根据订单号获取入库单详情 (pda功能) 0000000003
      */
+    @AutoLog(value = "根据二维码获取入库单详情 (pda功能)")
     @RequestMapping(value = "/selectRdAllByBar",method = RequestMethod.POST)
     @ResponseBody
     public ResponseEntity<ResHttpStatus> selectRdAllByBar(@RequestBody JSONObject json) {
@@ -104,6 +108,7 @@ public class SubcontractingOrderController extends JeecgController<Subcontractin
     /**
      * 根据订单号获取委外订单详情
      */
+    @AutoLog(value = "根据订单号获取委外订单详情")
     @RequestMapping(value = "/getSubcontractingOrderByCode",method = RequestMethod.GET)
     @ResponseBody
     public ResponseEntity<ResHttpStatus> getSubcontractingOrderByCode(String code,String MoDetailsID, String key) {
@@ -141,6 +146,7 @@ public class SubcontractingOrderController extends JeecgController<Subcontractin
    /**
      * 合格入库单-验布机
      */
+    @AutoLog(value = "插入合格入库单-验布机")
     @RequestMapping(value = "/saveWarehousing",method = RequestMethod.POST)
     @ResponseBody
     public ResponseEntity<ResHttpStatus> saveWarehousing(@RequestBody JSONArray json) {

+ 45 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/productionScheduleReport/controller/ProductionScheduleController.java

@@ -1,12 +1,57 @@
 package org.jeecg.modules.productionScheduleReport.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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.modules.productionScheduleReport.entity.ProductionSchedule;
+import org.jeecg.modules.productionScheduleReport.service.ProductionScheduleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+
+import static org.jeecg.common.config.mqtoken.UserTokenContext.getToken;
+
 /**
  * 生产进度报表
  */
+@Slf4j
+@Api(tags="生产进度报表")
 @RestController
 @RequestMapping("/productionScheduleReport/productionSchedule")
 public class ProductionScheduleController {
+    @Autowired
+    private ProductionScheduleService productionScheduleService;
+
+    @AutoLog(value = "生产进度报表-分页列表查询")
+    @ApiOperation(value="生产进度报表-分页列表查询", notes="生产进度报表-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<ProductionSchedule>> queryPageList(ProductionSchedule ProductionSchedule,
+                                                            @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                                            @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+                                                            HttpServletRequest req) {
+        Result<IPage<ProductionSchedule>> result = new Result<IPage<ProductionSchedule>>();
+        QueryWrapper<ProductionSchedule> queryWrapper = new QueryWrapper<>();
+//        SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
+        Page<ProductionSchedule> page = new Page<ProductionSchedule>(pageNo, pageSize);
+
+        IPage<ProductionSchedule> pageList = productionScheduleService.selectByPage(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        result.setMessage("查询成功");
+        return result;
+    }
+
+    public static void main(String[] args) {
+        System.out.println(getToken());
+    }
 }

+ 18 - 11
jeecg-boot-module-system/src/main/java/org/jeecg/modules/productionScheduleReport/entity/ProductionSchedule.java

@@ -8,16 +8,23 @@ import lombok.Data;
 @Data
 public class ProductionSchedule {
 
-    private String moId; //编号
-    private String cvcName; //染厂
-    private String cCode; //委外订单号
-    private String cInvCode; //存货编码
-    private String cInvName; //存货名称
-    private String cEnglishName; //存货名称(英文名称)
-    private String itemNumber; //款号
-    private String color;//颜色
-    private String colorNumber;//色号
-    private String gram;//要求克重
-    private String doorWidth;//要求门幅
+    private String cDepName;// ;// 部门
+    private String cPersonName;// ;// 业务员
+    private String cSOCode;// ;// 销售订单号
+    private String cCusName ;// 客户
+    private String cInvCode ;// 存货编码
+    private String cInvName ;// 存货名称
+    private String itemNumber ;// 款号
+    private String color;// 颜色
+    private String dPreDateBT ;// 交期
+    private String iQuantity ;//订单数量
+    private String iTaxUnitPrice ;// 原币含税单价
+    private String totalSum ;// 总额(原币)
+    private String bbPrice ;// 单价(本币)
+    private String iNatSum ;// 总额(本币)
+    private String icostsum ;// 实际发票成本
+    private String foutquantity ;//已出库数量
+    private String iKPQuantity ;//累计开票数量
+    private String iKPMoney ;// 累计开票金额
 
 }

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/productionScheduleReport/mapper/ProductionScheduleMapper.java

@@ -1,6 +1,9 @@
 package org.jeecg.modules.productionScheduleReport.mapper;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
 import org.jeecg.modules.productionScheduleReport.entity.ProductionSchedule;
 
 
@@ -11,4 +14,6 @@ import org.jeecg.modules.productionScheduleReport.entity.ProductionSchedule;
  */
 public interface ProductionScheduleMapper extends BaseMapper<ProductionSchedule> {
 
+    IPage<ProductionSchedule> selectByPage(IPage<ProductionSchedule> page, @Param("ew") QueryWrapper<ProductionSchedule> queryWrapper);
+
 }

+ 32 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/productionScheduleReport/mapper/xml/ProductionScheduleMapper.xml

@@ -2,4 +2,36 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.productionScheduleReport.mapper.ProductionScheduleMapper">
 
+    <select id="selectByPage" resultType="org.jeecg.modules.productionScheduleReport.entity.ProductionSchedule">
+
+        select --top 100
+            c.cDepName -- 部门
+             ,d.cPersonName -- 业务员
+             ,a.cSOCode -- 销售订单号
+             ,e.cCusName -- 客户
+             ,b.cInvCode -- 存货编码
+             ,f.cInvName -- 存货名称
+             ,b.cDefine22 itemNumber -- 款号
+             ,b.cFree1 color-- 颜色
+             ,a.dPreDateBT -- 交期
+             ,b.iQuantity --订单数量
+             ,b.iTaxUnitPrice -- 原币含税单价
+             ,b.iSum total_sum -- 总额(原币)
+             ,b.iNatSum/b.iQuantity bb_price -- 单价(本币)
+             ,b.iNatSum -- 总额(本币)
+             ,b.icostsum -- 实际发票成本
+             ,b.foutquantity --已出库数量
+             ,b.iKPQuantity --累计开票数量
+             ,b.iKPMoney -- 累计开票金额
+
+        from SO_SOMain a
+                 left join SO_SODetails b on a.id = b.id
+                 left join Department c on c.cDepCode = a.cDepCode
+                 left join person d on d.cPersonCode = a.cPersonCode
+                 left join Customer e on e.cCusCode = a.cCusCode
+                 left join Inventory f on f.cInvCode = b.cInvCode
+        ${ew.customSqlSegment}
+        and len(cInvCCode) = 6
+
+    </select>
 </mapper>

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/productionScheduleReport/service/ProductionScheduleService.java

@@ -1,9 +1,14 @@
 package org.jeecg.modules.productionScheduleReport.service;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.productionScheduleReport.entity.ProductionSchedule;
 
 
 public interface ProductionScheduleService extends IService<ProductionSchedule> {
+    @DS("multi-three")
+    public IPage<ProductionSchedule> selectByPage(IPage<ProductionSchedule> page, QueryWrapper<ProductionSchedule> queryWrapper);
 
 }

+ 13 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/productionScheduleReport/service/impl/ProductionScheduleImpl.java

@@ -1,13 +1,26 @@
 package org.jeecg.modules.productionScheduleReport.service.impl;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.jeecg.modules.productionScheduleReport.entity.ProductionSchedule;
 import org.jeecg.modules.productionScheduleReport.mapper.ProductionScheduleMapper;
 import org.jeecg.modules.productionScheduleReport.service.ProductionScheduleService;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+
 @Service
 public class ProductionScheduleImpl extends ServiceImpl<ProductionScheduleMapper, ProductionSchedule> implements ProductionScheduleService {
 
+    @Resource
+    private ProductionScheduleMapper productionScheduleMapper;
+
+    @Override
+    @DS("multi-three")
+    public IPage<ProductionSchedule> selectByPage(IPage<ProductionSchedule> page, QueryWrapper<ProductionSchedule> queryWrapper) {
+        return productionScheduleMapper.selectByPage(page, queryWrapper);
+    }
 
 }