|
@@ -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);
|