dengpan 1 年之前
父節點
當前提交
fd88747df8

+ 7 - 2
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -227,8 +227,13 @@ public class UniversalController extends BaseRESTfulController {
 
     @ApiOperation("根据物料编码获取物料信息")
     @PostMapping("/getMaterial")
-    public RESTfulResult getMaterial(@RequestBody Map<String,Object> map) {
+    public RESTfulResult getMaterial(@RequestBody Map<String,Object>
+                                                 map, Integer apiId,
+                                     Integer pageNum,
+                                     Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
         List<Map<String, Object>> material = universalMapper.getMaterial(map);
-        return success(material);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, material);
+        return success(pageList);
     }
 }

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

@@ -939,9 +939,6 @@
             <if test="prodCode != null and prodCode != ''">
                 and t.prod_code = #{prodCode}
             </if>
-            <if test="materialId != null and materialId != ''">
-                and b.material_id = #{materialId}
-            </if>
         </where>
         union all
         select '' as "prodCodePk",
@@ -961,7 +958,7 @@
         from rms_material b
         <where>
             <if test="prodCode != null and prodCode != ''">
-                and t.prod_code = #{prodCode}
+                and b.material_code = #{prodCode}
             </if>
             <if test="materialId != null and materialId != ''">
                 and b.material_id = #{materialId}