zhangym %!s(int64=2) %!d(string=hai) anos
pai
achega
09fa584518

+ 65 - 1
src/main/java/com/steerinfo/dil/controller/AMScontroller.java

@@ -87,10 +87,40 @@ public class AMScontroller {
     })
     @PostMapping(value = "/purchaseRequirementAdd")
     @LogAround(foreignKeys = {"transRequirementId"}, foreignKeyTypes = {"采购需求"})
-    public Map<String, Object> purchaseRequirementAdd(@RequestBody(required = false) Map<String, Object> map) {
+    public Map<String, Object> purchaseRequirementAdd(@RequestBody(required = false) Map<String, Object> map) throws ParseException {
+
         return amsFeign.purchaseRequirementAdd(map);
     }
 
+    @ApiOperation(value = "生产需求新增接口", notes = "生产需求新增接口")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
+    })
+    @PostMapping(value = "/productionRequirementAdd")
+    @LogAround(foreignKeys = {"transRequirementId"}, foreignKeyTypes = {"采购需求"})
+    public Map<String, Object> productionRequirementAdd(@RequestBody(required = false) Map<String, Object> map) throws ParseException {
+        map.put("insertUsername", map.get("userName").toString());
+        if (map.containsKey("requirementStartTime")){
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH24:mi:ss");
+            Date requirementStartTime = simpleDateFormat.parse(map.get("requirementStartTime").toString());
+            map.put("requirementStartTime", requirementStartTime);
+        }
+
+        if (map.containsKey("requirementEndTime")){
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH24:mi:ss");
+            Date requirementEndTime = simpleDateFormat.parse(map.get("requirementEndTime").toString());
+            map.put("requirementEndTime", requirementEndTime);
+        }
+        if (map.containsKey("dueTime")){
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH24:mi:ss");
+            Date dueTime = simpleDateFormat.parse(map.get("dueTime").toString());
+            map.put("dueTime", dueTime);
+        }
+
+
+        return amsFeign.productionRequirementAdd(map);
+    }
+
     @ApiOperation(value = "采购需求修改接口", notes = "采购需求修改接口")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
@@ -110,7 +140,41 @@ public class AMScontroller {
     public Map<String, Object> purchaseRequirementChange(@RequestBody(required = false) Map<String, Object> map) {
         return amsFeign.purchaseRequirementChange(map);
     }
+    @ApiOperation(value = "生产需求修改接口", notes = "生产需求修改接口")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
+    })
+    @PostMapping(value = "/productionStatusUpdate")
+    @LogAround(foreignKeys = {"transRequirementId"}, foreignKeyTypes = {"生产需求"})
+    public Map<String, Object> productionStatusUpdate(@RequestBody(required = false) Map<String, Object> map) {
+        return amsFeign.productionStatusUpdate(map);
+    }
+    @ApiOperation(value = "生产需求状态修改接口", notes = "生产需求状态修改接口")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
+    })
+    @PostMapping(value = "/productionRequirementChange")
+    @LogAround(foreignKeys = {"transRequirementId"}, foreignKeyTypes = {"生产需求"})
+    public Map<String, Object> productionRequirementChange(@RequestBody(required = false) Map<String, Object> map) {
+        return amsFeign.productionRequirementChange(map);
+    }
 
+
+    @ApiOperation(value = "展示生产需求详情")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", 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(value = "/getproductionRequirementList")
+    Map<String, Object> getproductionRequirementList(@RequestBody(required = false) Map<String, Object> mapValue,
+                                                   Integer apiId,
+                                                   Integer pageNum,
+                                                   Integer pageSize
+    ) {
+        return amsFeign.getproductionRequirementList(mapValue == null ? new HashMap<>() : mapValue, apiId, pageNum, pageSize);
+    }
     @ApiOperation(value = "展示采购需求详情")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "参数", required = false, dataType = "map"),

+ 42 - 1
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -50,7 +50,7 @@ public class UniversalController extends BaseRESTfulController {
     @Autowired
     private ImageFileUtils imageFileUtils;
 
-    @ApiModelProperty(value = "边输边查物资类")
+    @ApiModelProperty(value = "边输边查物资类")
     @GetMapping("/getMaterialTypeByLike")
     public RESTfulResult getMaterialTypeByLike(String index,@RequestParam(required = false) List<String> id) {
         Map<String,Object> map = new HashMap<>();
@@ -60,6 +60,26 @@ public class UniversalController extends BaseRESTfulController {
         return success(list);
     }
 
+    @ApiModelProperty(value = "边输边查物资")
+    @GetMapping("/getMaterialByLike")
+    public RESTfulResult getMaterialByLike(String index,@RequestParam(required = false) List<String> id) {
+        Map<String,Object> map = new HashMap<>();
+        map.put("index",index);
+        map.put("id",id);
+        List<Map<String, Object>> list = universalMapper.getMaterialByLike(map);
+        return success(list);
+    }
+
+    @ApiModelProperty(value = "边输边查运力类型")
+    @GetMapping("/getCapacityTypeByLike")
+    public RESTfulResult getCapacityTypeByLike(String index,@RequestParam(required = false) List<String> id) {
+        Map<String,Object> map = new HashMap<>();
+        map.put("index",index);
+        map.put("id",id);
+        List<Map<String, Object>> list = universalMapper.getCapacityTypeByLike(map);
+        return success(list);
+    }
+
     @ApiModelProperty(value = "边输边查公司单位")
     @GetMapping("/getCompanyMesByLike")
     public RESTfulResult getCompanyMesByLike(String index,String companyType,@RequestParam(required = false) List<String> id) {
@@ -103,6 +123,17 @@ public class UniversalController extends BaseRESTfulController {
         return success(list);
     }
 
+    @ApiModelProperty(value = "边输边查快捷需求code")
+    @GetMapping("/getCategoryCodeByLike")
+    public RESTfulResult getCategoryCodeByLike(String index,@RequestParam(required = false) List<String> id) {
+        Map<String,Object> map = new HashMap<>();
+        map.put("index",index);
+        map.put("id",id);
+        List<Map<String, Object>> list = universalMapper.getCategoryCodeByLike(map);
+        return success(list);
+    }
+
+
     @ApiModelProperty(value = "边输岗位信息")
     @GetMapping("/getJobInfosByLike")
     public RESTfulResult getrmsrmsjobinfosBylike(String index,@RequestParam(required = false) List<String> id) {
@@ -123,6 +154,16 @@ public class UniversalController extends BaseRESTfulController {
         List<Map<String, Object>> list = universalMapper.getTransRangeByLike(map);
         return success(list);
     }
+
+    @ApiModelProperty(value = "边输边查作业路径")
+    @GetMapping("/getLineByLike")
+    public RESTfulResult getLineByLike(String index,@RequestParam(required = false) List<String> id) {
+        Map<String,Object> map = new HashMap<>();
+        map.put("index",index);
+        map.put("id",id);
+        List<Map<String, Object>> list = universalMapper.getLineByLike(map);
+        return success(list);
+    }
     @ApiOperation("上传文件通用方法,返回成功后的url")
     @PostMapping("/uploadFile")
     public RESTfulResult uploadFile(MultipartRequest request) throws Exception {

+ 16 - 1
src/main/java/com/steerinfo/dil/feign/AmsFeign.java

@@ -35,10 +35,25 @@ public interface AmsFeign {
                                      @RequestParam  Integer pageNum,
                                      @RequestParam  Integer pageSize
     );
-
+//===================>需求
     @PostMapping(value = "api/v1/ams/amstransrequirements/purchaseRequirementAdd")
     Map<String, Object> purchaseRequirementAdd(Map<String, Object> map);
 
+    @PostMapping(value = "api/v1/ams/amstransrequirements/productionRequirementAdd")
+    Map<String, Object> productionRequirementAdd(Map<String, Object> map);
+
+
+    @PostMapping(value = "api/v1/ams/amstransrequirements/getproductionRequirementList")
+    Map<String, Object> getproductionRequirementList(@RequestBody(required=false) Map<String,Object> mapValue,
+                                                   @RequestParam  Integer apiId,
+                                                   @RequestParam  Integer pageNum,
+                                                   @RequestParam  Integer pageSize);
+    @PostMapping(value = "api/v1/ams/amstransrequirements/productionStatusUpdate")
+    Map<String, Object> productionStatusUpdate(Map<String, Object> map);
+    @PostMapping(value = "api/v1/ams/amstransrequirements/productionRequirementChange")
+    Map<String, Object> productionRequirementChange(Map<String, Object> map);
+
+
     @PostMapping(value = "api/v1/ams/amstransrequirements/purchaseRequirementUpdate")
     Map<String, Object> purchaseRequirementUpdate(Map<String, Object> map);
 

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

@@ -19,15 +19,22 @@ public interface UniversalMapper {
     List<Map<String, Object>> getCompanyMesByLike(Map<String, Object> map);
 
     List<Map<String, Object>> getMaterialTypeByLike(Map<String, Object> map);
+    List<Map<String, Object>> getMaterialByLike(Map<String, Object> map);
+
+    List<Map<String, Object>> getCapacityTypeByLike(Map<String, Object> map);
+
 
     List<Map<String, Object>> getEmissionStandardByLike(Map<String, Object> map);
 
     List<Map<String, Object>> getOperationPointByLike(Map<String, Object> map);
 
+    List<Map<String, Object>> getCategoryCodeByLike(Map<String, Object> map);
+
+
     List<Map<String, Object>> getPersonnelByLike(Map<String, Object> map);
 
     List<Map<String, Object>> getTransRangeByLike(Map<String, Object> map);
-
+    List<Map<String, Object>> getLineByLike(Map<String, Object> map);
     List<Map<String, Object>> getrmsrmsjobinfosBylike(Map<String, Object> map);
 
 

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

@@ -130,7 +130,7 @@
         select * from(
         select
         MATERIAL_TYPE_ID "materialTypeId",
-        MATERIAL_TYPE_NAME "materialTypeName",
+            MATERIAL_TYPE_NAME "materialTypeName",
         MATERIAL_TYPE_ID "id",
         MATERIAL_TYPE_ID "value",
         MATERIAL_TYPE_NAME "label"
@@ -254,7 +254,7 @@
         select * from(
         select
         RC.TRANS_RANGE_ID "transrangeId",
-        RC.TRANS_RANGE_NAME "transrangeName",
+            RC.TRANS_RANGE_NAME "transrangeName",
         RC.TRANS_RANGE_ID "id",
         RC.TRANS_RANGE_ID "value",
         RC.TRANS_RANGE_NAME "label"
@@ -274,5 +274,103 @@
         </where>
         FETCH NEXT 100 ROWS ONLY
     </select>
+    <select id="getCategoryCodeByLike" resultType="java.util.Map">
+        select * from(
+        select
+        RC.RULES_ID "rulesId",
+        RC.RULES_CODE "rulesCode",
+        RC.RULES_ID "id",
+        RC.RULES_ID "value",
+        RC.RULES_CODE "label"
+        from RMS_DEMAND_RULES RC
+        where DELETED = 0
+        )
+        <where>
+            <if test="index!=null and index!=''">
+                AND REGEXP_LIKE("label", #{index})
+            </if>
+            <if test="id!=null and !(index!=null and index!='')">
+                AND "id" in
+                <foreach collection="id" item="item"  open="(" close=")" separator="," >
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+        FETCH NEXT 100 ROWS ONLY
+    </select>
+    <select id="getCapacityTypeByLike" resultType="java.util.Map">
+        select * from(
+        select
+        RC.CAPACITY_TYPE_ID "capacityTypeId",
+        RC.CAPACITY_TYPE_NAME "capacityTypeName",
+        RC.CAPACITY_TYPE_ID "id",
+        RC.CAPACITY_TYPE_ID "value",
+        RC.CAPACITY_TYPE_NAME "label"
+        from RMS_CAPACITY_TYPE RC
+        where DELETED = 0
+        )
+        <where>
+            <if test="index!=null and index!=''">
+                AND REGEXP_LIKE("label", #{index})
+            </if>
+            <if test="id!=null and !(index!=null and index!='')">
+                AND "id" in
+                <foreach collection="id" item="item"  open="(" close=")" separator="," >
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+        FETCH NEXT 100 ROWS ONLY
+
+    </select>
+    <select id="getLineByLike" resultType="java.util.Map">
+        select * from(
+        select
+        RC.LINE_ID "lineId",
+        RC.LINE_NAME "lineName",
+        RC.LINE_ID "id",
+        RC.LINE_ID "value",
+        RC.LINE_NAME "label"
+        from RMS_LINE RC
+        where DELETED = 0
+        )
+        <where>
+            <if test="index!=null and index!=''">
+                AND REGEXP_LIKE("label", #{index})
+            </if>
+            <if test="id!=null and !(index!=null and index!='')">
+                AND "id" in
+                <foreach collection="id" item="item"  open="(" close=")" separator="," >
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+        FETCH NEXT 100 ROWS ONLY
+    </select>
+    <select id="getMaterialByLike" resultType="java.util.Map">
+        select * from(
+        select
+        RC.MATERIAL_ID "materialId",
+        RC.MATERIAL_NAME "materialName",
+        RC.MATERIAL_ID "id",
+        RC.MATERIAL_ID "value",
+        RC.MATERIAL_NAME "label"
+        from RMS_MATERIAL RC
+        where DELETED = 0
+        )
+        <where>
+            <if test="index!=null and index!=''">
+                AND REGEXP_LIKE("label", #{index})
+            </if>
+            <if test="id!=null and !(index!=null and index!='')">
+                AND "id" in
+                <foreach collection="id" item="item"  open="(" close=")" separator="," >
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+        FETCH NEXT 100 ROWS ONLY
+
+    </select>
 
 </mapper>