liyg 2 éve
szülő
commit
3d2ca7741d

+ 10 - 0
src/main/java/com/steerinfo/dil/controller/AMScontroller.java

@@ -120,6 +120,16 @@ public class AMScontroller{
         return amsFeign.getPurchaseRequirementList(mapValue == null ? new HashMap<>() : mapValue,apiId,pageNum,pageSize);
     }
 
+    @ApiOperation(value = "采购计划新增接口", notes = "采购计划新增接口")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
+    })
+    @PostMapping(value = "/purchasePlanAdd")
+    @LogAround(foreignKeys = {"transPlanId"},foreignKeyTypes = {"采购计划"})
+    public Map<String, Object> purchasePlanAdd(@RequestBody(required = false) Map<String ,Object> map) {
+        return amsFeign.purchasePlanAdd(map);
+    }
+
     @ApiOperation(value="同步销售订单")
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @PostMapping(value = "/saleOrderSync")

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

@@ -52,17 +52,21 @@ public class UniversalController extends BaseRESTfulController {
 
     @ApiModelProperty(value = "边输边查物资类型")
     @GetMapping("/getMaterialTypeByLike")
-    public RESTfulResult getMaterialTypeByLike(String index) {
-        List<Map<String, Object>> list = universalMapper.getMaterialTypeByLike(index == null ? "" : index);
+    public RESTfulResult getMaterialTypeByLike(String index,String id) {
+        Map<String,Object> map = new HashMap<>();
+        map.put("index",index);
+        map.put("id",id);
+        List<Map<String, Object>> list = universalMapper.getMaterialTypeByLike(map);
         return success(list);
     }
 
     @ApiModelProperty(value = "边输边查公司单位")
     @GetMapping("/getCompanyMesByLike")
-    public RESTfulResult getCompanyMesByLike(String index,String companyType) {
+    public RESTfulResult getCompanyMesByLike(String index,String companyType,String id) {
         Map<String,Object> map = new HashMap<>();
         map.put("index",index);
         map.put("companyType",companyType);
+        map.put("id",id);
         List<Map<String, Object>> list = universalMapper.getCompanyMesByLike(map);
         return success(list);
     }
@@ -70,26 +74,31 @@ public class UniversalController extends BaseRESTfulController {
 
     @ApiModelProperty(value = "边输边查环保标准")
     @GetMapping("/getEmissionStandardByLike")
-    public RESTfulResult getEmissionStandardByLike(String index) {
-        List<Map<String, Object>> list = universalMapper.getEmissionStandardByLike(index == null ? "" : index);
+    public RESTfulResult getEmissionStandardByLike(String index,String id) {
+        Map<String,Object> map = new HashMap<>();
+        map.put("index",index);
+        map.put("id",id);
+        List<Map<String, Object>> list = universalMapper.getEmissionStandardByLike(map);
         return success(list);
     }
 
     @ApiModelProperty(value = "边输边查作业点")
     @GetMapping("/getOperationPointByLike")
-    public RESTfulResult getOperationPointByLike(String index,String operationPointType) {
+    public RESTfulResult getOperationPointByLike(String index,String operationPointType,String id) {
         Map<String,Object> map = new HashMap<>();
         map.put("index",index);
         map.put("operationPointType",operationPointType);
+        map.put("id",id);
         List<Map<String, Object>> list = universalMapper.getOperationPointByLike(map);
         return success(list);
     }
 
     @ApiModelProperty(value = "边输边查人员")
     @GetMapping("/getPersonnelByLike")
-    public RESTfulResult getPersonnelByLike(String index) {
+    public RESTfulResult getPersonnelByLike(String index,String id) {
         Map<String,Object> map = new HashMap<>();
         map.put("index",index);
+        map.put("id",id);
         List<Map<String, Object>> list = universalMapper.getPersonnelByLike(map);
         return success(list);
     }

+ 3 - 0
src/main/java/com/steerinfo/dil/feign/AmsFeign.java

@@ -49,6 +49,9 @@ public interface AmsFeign {
                                                    @RequestParam  Integer pageNum,
                                                    @RequestParam  Integer pageSize);
 
+    @PostMapping(value = "api/v1/ams/amstransplans/purchasePlanAdd")
+    Map<String, Object> purchasePlanAdd(Map<String, Object> map);
+
     @PostMapping("api/v1/ams/amsorders/saleOrderSync")
     Map<String, Object> saleOrderSync(@RequestBody(required = false) Map<String, Object> map);
 }

+ 2 - 2
src/main/java/com/steerinfo/dil/mapper/UniversalMapper.java

@@ -18,9 +18,9 @@ public interface UniversalMapper {
 
     List<Map<String, Object>> getCompanyMesByLike(Map<String, Object> map);
 
-    List<Map<String, Object>> getMaterialTypeByLike(String index);
+    List<Map<String, Object>> getMaterialTypeByLike(Map<String, Object> map);
 
-    List<Map<String, Object>> getEmissionStandardByLike(String index);
+    List<Map<String, Object>> getEmissionStandardByLike(Map<String, Object> map);
 
     List<Map<String, Object>> getOperationPointByLike(Map<String, Object> map);
 

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

@@ -106,7 +106,8 @@
 
     <!--  边输边查公司  -->
     <select id="getCompanyMesByLike" resultType="java.util.Map">
-        select
+        select * from(
+            select
             RC.COMPANY_ID "companyId",
             RC.COMPANY_NAME "companyName",
             RC.SSO_ID "ssoId",
@@ -114,17 +115,24 @@
             RC.COMPANY_ID "id",
             RC.COMPANY_ID "value",
             RC.COMPANY_NAME "label"
-        from RMS_COMPANY RC
-        where DELETED = 0
-        <if test="companyType!=null and companyType!=''">
-         AND   RC.COMPANY_TYPE = #{companyType}
-        </if>
-        <if test="index!=null and index!=''">
-        AND   REGEXP_LIKE(RC.COMPANY_NAME, #{index})
-        </if>
+            from RMS_COMPANY RC
+            where DELETED = 0
+        )
+        <where>
+            <if test="companyType!=null and companyType!=''">
+                AND   "companyType" = #{companyType}
+            </if>
+            <if test="index!=null and index!=''">
+                AND   REGEXP_LIKE("label", #{index})
+            </if>
+            <if test="id!=null">
+                OR   "id" = #{id}
+            </if>
+        </where>
         FETCH NEXT 100 ROWS ONLY
     </select>
     <select id="getMaterialTypeByLike" resultType="java.util.Map">
+        select * from(
         select
         MATERIAL_TYPE_ID "materialTypeId",
         MATERIAL_TYPE_NAME "materialTypeName",
@@ -133,43 +141,65 @@
         MATERIAL_TYPE_NAME "label"
         from RMS_MATERIAL_TYPE
         where DELETED = 0
-        <if test="index!=null and index!=''">
-            AND   REGEXP_LIKE(MATERIAL_TYPE_NAME, #{index})
-        </if>
+        )
+        <where>
+            <if test="index!=null and index!=''">
+                AND   REGEXP_LIKE("label", #{index})
+            </if>
+            <if test="id!=null">
+                OR   "id" = #{id}
+            </if>
+        </where>
         FETCH NEXT 100 ROWS ONLY
     </select>
     <select id="getEmissionStandardByLike" resultType="java.util.Map">
+        select * from (
         select
-            EMISSION_STANDARD_ID "emissionStandardId",
-            EMISSION_STANDARD_NAME "emissionStandardName",
-            EMISSION_STANDARD_ID "id",
-            EMISSION_STANDARD_ID "value",
-            EMISSION_STANDARD_NAME "label"
+        EMISSION_STANDARD_ID "emissionStandardId",
+        EMISSION_STANDARD_NAME "emissionStandardName",
+        EMISSION_STANDARD_ID "id",
+        EMISSION_STANDARD_ID "value",
+        EMISSION_STANDARD_NAME "label"
         from RMS_EMISSION_STANDARD
         where DELETED = 0
-        <if test="index!=null and index!=''">
-            AND   REGEXP_LIKE(EMISSION_STANDARD_NAME, #{index})
-        </if>
+        )
+        <where>
+            <if test="index!=null and index!=''">
+                AND   REGEXP_LIKE("label", #{index})
+            </if>
+            <if test="id!=null">
+                OR   "id" = #{id}
+            </if>
+        </where>
         FETCH NEXT 100 ROWS ONLY
     </select>
     <select id="getOperationPointByLike" resultType="java.util.Map">
+        select * from (
         select
         OPERATION_POINT_ID "operationPointId",
         OPERATION_POINT_NAME "operationPointName",
+        OPERATION_POINT_TYPE "operationPointType",
         OPERATION_POINT_ID "id",
         OPERATION_POINT_ID "value",
         OPERATION_POINT_NAME "label"
         from RMS_OPERATION_POINT
         where DELETED = 0
-        <if test="index!=null and index!=''">
-            AND   REGEXP_LIKE(OPERATION_POINT_NAME, #{index})
-        </if>
-        <if test="operationPointType!=null and operationPointType!=''">
-            AND   REGEXP_LIKE(OPERATION_POINT_TYPE, #{operationPointType})
-        </if>
+        )
+        <where>
+            <if test="operationPointType!=null and operationPointType!=''">
+                AND   REGEXP_LIKE("operationPointType", #{operationPointType})
+            </if>
+            <if test="index!=null and index!=''">
+                AND   REGEXP_LIKE("label", #{index})
+            </if>
+            <if test="id!=null">
+                OR   "id" = #{id}
+            </if>
+        </where>
         FETCH NEXT 100 ROWS ONLY
     </select>
     <select id="getPersonnelByLike" resultType="java.util.Map">
+        select * from (
         select
         PERSONNEL_ID "personnelId",
         PERSONNEL_NAME "personnelName",
@@ -178,9 +208,15 @@
         PERSONNEL_NAME "label"
         from RMS_PERSONNEL
         where DELETED = 0
-        <if test="index!=null and index!=''">
-            AND   REGEXP_LIKE(PERSONNEL_NAME, #{index})
-        </if>
+        )
+        <where>
+            <if test="index!=null and index!=''">
+                AND   REGEXP_LIKE("label", #{index})
+            </if>
+              <if test="id!=null">
+                OR   "id" = #{id}
+            </if>
+        </where>
         FETCH NEXT 100 ROWS ONLY
     </select>
 </mapper>