ysh 2 vuotta sitten
vanhempi
commit
8c851f72af

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

@@ -6,8 +6,10 @@ 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.apache.commons.lang.StringUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.productionScheduleReport.entity.ProductionSchedule;
 import org.jeecg.modules.productionScheduleReport.service.ProductionScheduleService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -36,14 +38,48 @@ public class ProductionScheduleController {
     @AutoLog(value = "生产进度报表-分页列表查询")
     @ApiOperation(value="生产进度报表-分页列表查询", notes="生产进度报表-分页列表查询")
     @GetMapping(value = "/list")
-    public Result<IPage<ProductionSchedule>> queryPageList(ProductionSchedule ProductionSchedule,
+    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<>();
+//        QueryWrapper<ProductionSchedule> queryWrapper = QueryGenerator.initQueryWrapper(productionSchedule, req.getParameterMap());
 //        SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
         Page<ProductionSchedule> page = new Page<ProductionSchedule>(pageNo, pageSize);
+        // 汇总数据只取成衣订单,根据存货分类区分是否成衣还是面料
+        queryWrapper.eq("len(f.cInvCCode)",6);
+        if(productionSchedule != null){
+
+            if(StringUtils.isNotBlank(productionSchedule.getCSOCode())){//销售订单号
+                queryWrapper.eq("a.cSOCode",productionSchedule.getCSOCode());
+            }
+            if(StringUtils.isNotBlank(productionSchedule.getCDepName())){//部门
+                queryWrapper.eq("c.cDepName",productionSchedule.getCDepName());
+            }
+            if(StringUtils.isNotBlank(productionSchedule.getCInvName())){//物料名称
+                queryWrapper.eq("f.cInvName",productionSchedule.getCInvName());
+            }
+            if(StringUtils.isNotBlank(productionSchedule.getCDefine12())){//成衣加工厂
+                queryWrapper.eq("a.cDefine12",productionSchedule.getCDefine12());
+            }
+            if(StringUtils.isNotBlank(productionSchedule.getCPersonName())){//业务员
+                queryWrapper.eq("d.cPersonName",productionSchedule.getCPersonName());
+            }
+            if(StringUtils.isNotBlank(productionSchedule.getCSOCode())){//计划单号
+                queryWrapper.eq("a.cSOCode",productionSchedule.getCSOCode());
+            }
+            if(StringUtils.isNotBlank(productionSchedule.getDDate())){//订单日期
+                queryWrapper.eq("CONVERT(nvarchar(10),a.dDate,121)",productionSchedule.getDDate());
+            }
+            if(StringUtils.isNotBlank(productionSchedule.getColor())){//颜色
+                queryWrapper.eq("b.cFree1",productionSchedule.getColor());
+            }
+            if(StringUtils.isNotBlank(productionSchedule.getDPreDateBT())){//交期
+                queryWrapper.eq("CONVERT(nvarchar(10),a.dPreDateBT,121)",productionSchedule.getDPreDateBT());
+            }
+
+        }
 
         IPage<ProductionSchedule> pageList = productionScheduleService.selectByPage(page, queryWrapper);
         result.setSuccess(true);

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

@@ -30,6 +30,8 @@ public class ProductionSchedule {
     private String color;// 颜色
     @ApiModelProperty(value = "交期")
     private String dPreDateBT ;// 交期
+    @ApiModelProperty(value = "订单日期")
+    private String dDate ;// 订单日期
     @ApiModelProperty(value = "订单数量")
     private String iQuantity ;//订单数量
     @ApiModelProperty(value = "原币含税单价")

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

@@ -24,8 +24,9 @@
              ,b.icostsum -- 实际发票成本
              ,b.foutquantity --已出库数量
              ,b.iKPQuantity --累计开票数量
-             ,b.iKPMoney, -- 累计开票金额
-             ,f.pictureGUid pictureId
+             ,b.iKPMoney -- 累计开票金额
+             ,f.pictureGUid pictureId -- 图片id
+             ,a.dDate dDate -- 单据日期
         from SO_SOMain a
                  left join SO_SODetails b on a.id = b.id
                  left join Department c on c.cDepCode = a.cDepCode
@@ -33,7 +34,6 @@
                  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>