huxy пре 2 година
родитељ
комит
c0198e36b0

+ 7 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/controller/DyeLossController.java

@@ -12,6 +12,7 @@ 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.common.util.oConvertUtils;
 import org.jeecg.modules.scas.dto.DyeLossDto;
 import org.jeecg.modules.scas.entity.DyeLoss;
 import org.jeecg.modules.scas.service.IDyeLossService;
@@ -48,23 +49,23 @@ public class DyeLossController extends JeecgController<DyeLoss, IDyeLossService>
                                          @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
                                          DyeLossDto dyeLossDto,
                                          HttpServletRequest req){
-        if(pageSize>10){//页面长度不能大于10
-            pageSize=10;
-        }
+//        if(pageSize>10){//页面长度不能大于10
+//            pageSize=10;
+//        }
         Result<IPage<DyeLoss>> result = new Result<IPage<DyeLoss>>();
         QueryWrapper<DyeLossDto> queryWrapper = new QueryWrapper<>();//初始化
         queryWrapper.eq("c.cVCCode","0105");//确定为染厂
         /*queryWrapper.eq("g.cRdBusType","委外发料");//选择为材料出库单*/
-        if(dyeLossDto.getCode()!=null&& !dyeLossDto.getCode().trim().equals("") && StringUtils.isNotEmpty(dyeLossDto.getCode())){
+        if(oConvertUtils.isNotEmpty(dyeLossDto.getCode())){
             queryWrapper.eq("a.cCode",dyeLossDto.getCode());//订单号
         }
-        if(dyeLossDto.getVenName()!=null && !dyeLossDto.getVenName().trim().equals("") && StringUtils.isNotEmpty(dyeLossDto.getVenName())){
+        if(oConvertUtils.isNotEmpty(dyeLossDto.getVenName())){
             queryWrapper.eq("c.cVenName",dyeLossDto.getVenName());//供应商名称
         }
         /*if(dyeLossDto.getOrderType()!=null && !dyeLossDto.getOrderType().trim().equals("") &&StringUtils.isNotBlank(dyeLossDto.getOrderType())){
             queryWrapper.eq("a.iOrderType",dyeLossDto.getOrderType());//订单类型
         }*/
-        if(dyeLossDto.getPlanLotNumber()!=null && !dyeLossDto.getPlanLotNumber().trim().equals("") &&StringUtils.isNotEmpty(dyeLossDto.getPlanLotNumber())){
+        if(oConvertUtils.isNotEmpty(dyeLossDto.getPlanLotNumber())){
             queryWrapper.eq("left(a.cCode,ISNULL(NULLIF(CHARINDEX('-',a.cCode)-1,-1),len(a.cCode)))",dyeLossDto.getPlanLotNumber());//计划单号
         }
         /*if(dyeLossDto.getCsocode()!=null && !dyeLossDto.getCsocode().trim().equals("") &&StringUtils.isNotBlank(dyeLossDto.getCsocode())){

+ 7 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/controller/SupplierCapacityController.java

@@ -13,6 +13,7 @@ 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.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.scas.dto.SupplierCapacityDto;
 import org.jeecg.modules.scas.entity.SupplierCapacity;
 import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo1;
@@ -72,13 +73,13 @@ public class SupplierCapacityController extends JeecgController<SupplierCapacity
       //System.out.println("结束年份"+new SimpleDateFormat("yyyy").format(supplierCapacityDto.getEndDate()));
       Result<IPage<SupplierCapacity>> result = new Result<IPage<SupplierCapacity>>();
       QueryWrapper<SupplierCapacityDto> queryWrapper = new QueryWrapper<>();//初始化
-      if(supplierCapacityDto.getCsrccode()!=null&& !supplierCapacityDto.getCsrccode().trim().equals("") &&StringUtils.isNotEmpty(supplierCapacityDto.getCsrccode())){
+      if(oConvertUtils.isNotEmpty(supplierCapacityDto.getCsrccode())){
          queryWrapper.eq("p.csrccode",supplierCapacityDto.getCsrccode());;//订单号
       }
-      if(supplierCapacityDto.getVenName()!=null&& !supplierCapacityDto.getVenName().trim().equals("") &&StringUtils.isNotEmpty(supplierCapacityDto.getVenName())){
+      if(oConvertUtils.isNotEmpty(supplierCapacityDto.getVenName())){
          queryWrapper.eq("p.cVenCode",supplierCapacityDto.getVenName());//供应商名称
       }
-      if(supplierCapacityDto.getPlanLotNumber()!=null&& !supplierCapacityDto.getPlanLotNumber().trim().equals("") &&StringUtils.isNotEmpty(supplierCapacityDto.getPlanLotNumber())){
+      if(oConvertUtils.isNotEmpty(supplierCapacityDto.getPlanLotNumber())){
          queryWrapper.eq("p.cPlanLotNumber",supplierCapacityDto.getPlanLotNumber());//计划单号
       }
      /*if(supplierCapacityDto.getStartDate()!=null&&StringUtils.isNotBlank(supplierCapacityDto.getStartDate().toString())){
@@ -91,13 +92,13 @@ public class SupplierCapacityController extends JeecgController<SupplierCapacity
          queryWrapper.le("month(p.dArriveDate)",supplierCapacityDto.getEndDate().getMonth()+1);
          queryWrapper.le("year(p.dArriveDate)",new SimpleDateFormat("yyyy").format(supplierCapacityDto.getEndDate()));
       }*/
-      if(supplierCapacityDto.getStartDate()!=null&&StringUtils.isNotEmpty(supplierCapacityDto.getStartDate().toString())){//起始日期
+      if(oConvertUtils.isNotEmpty(supplierCapacityDto.getStartDate().toString())){//起始日期
          queryWrapper.ge("p.dArriveDate",supplierCapacityDto.getStartDate());
       }
-      if(supplierCapacityDto.getEndDate()!=null&&StringUtils.isNotEmpty(supplierCapacityDto.getEndDate().toString())){//结束日期
+      if(oConvertUtils.isNotEmpty(supplierCapacityDto.getEndDate().toString())){//结束日期
          queryWrapper.le("p.dArriveDate",supplierCapacityDto.getEndDate());
       }
-      if(supplierCapacityDto.getOrderType()!=null&& !supplierCapacityDto.getOrderType().trim().equals("") && StringUtils.isNotEmpty(supplierCapacityDto.getOrderType())){//订单类型
+      if(oConvertUtils.isNotEmpty(supplierCapacityDto.getOrderType())){//订单类型
          queryWrapper.eq("p.iOrderType",supplierCapacityDto.getOrderType());//订单类型iOrderType
       }
       Page<SupplierCapacity> page = new Page<SupplierCapacity>(pageNo, pageSize);