Redeem 2 anos atrás
pai
commit
ffd92987c3

+ 35 - 0
src/main/java/com/steerinfo/dil/controller/RMScontroller.java

@@ -4,8 +4,10 @@ import com.steerinfo.dil.annotaion.LogAround;
 import com.steerinfo.dil.annotaion.RequestLimit;
 import com.steerinfo.dil.feign.RmsFeign;
 import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.PageListAdd;
 import com.steerinfo.framework.controller.BaseController;
 import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
@@ -1029,4 +1031,37 @@ public class RMScontroller extends BaseRESTfulController {
         return  rmsFeign.insertBusinessType(map);
     }
 
+
+
+    @ApiOperation(value = "燃料类型")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "map", value = "参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId()", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getFuelTypeList")
+    public Map<String, Object> getFuelTypeList(@RequestBody(required = false) Map<String,Object> map,
+                                        @RequestParam("apiId") Integer apiId,
+                                        @RequestParam("pageNum") Integer pageNum,
+                                        @RequestParam("pageSize") Integer pageSize) {
+        return rmsFeign.getFuelTypeList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
+    }
+
+    @ApiOperation(value="新增燃料类型")
+    @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
+    @LogAround(foreignKeys = {"fuelTypeId"},foreignKeyTypes = {"燃料类型"})
+    @PostMapping("/insertFuelType")
+    public Map<String, Object> insertFuelType(@RequestBody(required = false)Map<String, Object> map){
+        return rmsFeign.insertFuelType(map);
+    }
+
+    @ApiOperation(value="删除燃料类型")
+    @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
+    @LogAround(foreignKeys = {"fuelTypeId"},foreignKeyTypes = {"燃料类型"})
+    @PostMapping("/deleteFuelType")
+    public Map<String, Object> deleteFuelType(@RequestBody(required = false) Map<String, Object> map) {
+        return rmsFeign.deleteFuelType(map);
+    }
+
 }

+ 13 - 0
src/main/java/com/steerinfo/dil/feign/RmsFeign.java

@@ -644,6 +644,19 @@ public interface RmsFeign {
 
     @PostMapping("api/v1/rms/dilbusinesstypes/insertBusinessType")
     Map<String, Object> insertBusinessType(@RequestBody(required = false) Map<String, Object> map);
+
+    //燃料类型
+    @PostMapping(value = "api/v1/rms/rmsfueltypes/getFuelTypeList")
+    Map<String, Object> getFuelTypeList(@RequestBody(required = false) Map<String, Object> mapValue,
+                                        @RequestParam("apiId") Integer apiId,
+                                        @RequestParam("pageNum") Integer pageNum,
+                                        @RequestParam("pageSize") Integer pageSize);
+
+    @PostMapping(value = "api/v1/rms/rmsfueltypes/insertFuelType")
+    Map<String, Object> insertFuelType(@RequestBody(required = false) Map<String, Object> mapValue);
+
+    @PostMapping(value = "api/v1/rms/rmsfueltypes/deleteFuelType")
+    Map<String, Object> deleteFuelType(@RequestBody(required = false) Map<String, Object> mapValue);
 }
 
 

+ 5 - 5
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -346,7 +346,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-            <if test="id!=null and !(index!=null and index!='')">
+            <if test="id!=null and id.size>0 and !(index!=null and index!='')">
                 AND "id" in
                 <foreach collection="id" item="item"  open="(" close=")" separator="," >
                     #{item}
@@ -371,7 +371,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-            <if test="id!=null and !(index!=null and index!='')">
+            <if test="id!=null and id.size>0 and !(index!=null and index!='')">
                 AND "id" in
                 <foreach collection="id" item="item"  open="(" close=")" separator="," >
                     #{item}
@@ -415,7 +415,7 @@
             <if test="lineType!=null and lineType!=''">
                 AND REGEXP_LIKE("lineType" , #{lineType})
             </if>
-            <if test="id!=null and !(index!=null and index!='')">
+            <if test="id!=null and id.size>0 and !(index!=null and index!='')">
                 AND "id" in
                 <foreach collection="id" item="item"  open="(" close=")" separator="," >
                     #{item}
@@ -440,7 +440,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-            <if test="id!=null and !(index!=null and index!='')">
+            <if test="id!=null and id.size>0 and !(index!=null and index!='')">
                 AND "id" in
                 <foreach collection="id" item="item"  open="(" close=")" separator="," >
                     #{item}
@@ -497,7 +497,7 @@
             <if test="materialTypeName!=null and materialTypeName!=''">
                 AND REGEXP_LIKE("materialTypeName", #{materialTypeName})
             </if>
-            <if test="id!=null and !(index!=null and index!='')">
+            <if test="id!=null and id.size > 0 and !(index!=null and index!='')">
                 AND "id" in
                 <foreach collection="id" item="item"  open="(" close=")" separator="," >
                     #{item}