ソースを参照

维保产线下拉框展示全部,默认全部查询

yejian016332 3 年 前
コミット
ac8924274d

+ 1 - 1
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionResourceCenter/RepairController.java

@@ -50,7 +50,7 @@ public class RepairController extends SuperController<RepairService,Long, Repair
         LbqWrapper<Repair> wrapper = wrap.lambda();
         wrap.like(StringUtils.isNotEmpty(data.getCode()),"code",data.getCode());
         wrap.like(StringUtils.isNotEmpty(data.getProductionresourceName()),"productionresourceName",data.getProductionresourceName());
-        wrap.eq(null != data.getProductionLineId(),"productionLineId",data.getProductionLineId());
+        wrap.eq(null != data.getProductionLineId() && data.getProductionLineId() > 0,"productionLineId",data.getProductionLineId());
         Repair repair = BeanUtil.toBean(data, Repair.class);
         //Wraps.lbQ(station); 这种写法值 不能和  ${ew.customSqlSegment} 一起使用
         // ${ew.customSqlSegment} 语法一定要手动eq like 等

+ 15 - 0
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionResourceCenter/ZZoneController.java

@@ -10,6 +10,7 @@ import com.github.zuihou.business.productionResourceCenter.dto.ZZoneUpdateDTO;
 import com.github.zuihou.business.productionResourceCenter.dto.ZZonePageDTO;
 import com.github.zuihou.business.productionResourceCenter.service.ZZoneService;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -20,6 +21,7 @@ import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
 import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
 import com.github.zuihou.log.annotation.SysLog;
 import com.github.zuihou.tenant.entity.Productionresource;
+import com.qiniu.common.Zone;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -63,6 +65,19 @@ public class ZZoneController extends SuperController<ZZoneService, Long, ZZone,
         return success(baseService.list());
     }
 
+    @ApiOperation(value = "查询区域管理", notes = "查询区域管理")
+    @GetMapping("/allSelect")
+    public R<List<ZZone>> allSelect() {
+        List<ZZone> zZones = new ArrayList<>();
+        ZZone zone = new ZZone();
+        zone.setId(new Long(0));
+        zone.setName("全部");
+        zZones.add(zone);
+        List<ZZone> zones = baseService.list();
+        zZones.addAll(zones);
+        return success(zZones);
+    }
+
     @Override
     public R<ZZone> handlerSave(ZZoneSaveDTO model) {
         ZZone zZone = baseService.save(model);