wwh 1 年間 前
コミット
bf97127f33

+ 5 - 0
huimv-receive/src/main/java/com/huimv/receive/controller/BaseWashoutPointController.java

@@ -53,4 +53,9 @@ public class BaseWashoutPointController {
     public Result listDest(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
        return washoutPointService.listDest(paramsMap);
     }
+
+    @RequestMapping("/listWash")
+    public Result listWash(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
+        return washoutPointService.listWash(paramsMap);
+    }
 }

+ 2 - 0
huimv-receive/src/main/java/com/huimv/receive/mapper/BaseWashoutPointMapper.java

@@ -16,4 +16,6 @@ import java.util.List;
 public interface BaseWashoutPointMapper extends BaseMapper<BaseWashoutPoint> {
 
     List<BaseWashoutPoint> listDest(String farmId, String vistitType);
+
+    List<BaseWashoutPoint> listWash(String farmId, String vistitType);
 }

+ 2 - 0
huimv-receive/src/main/java/com/huimv/receive/service/IBaseWashoutPointService.java

@@ -25,4 +25,6 @@ public interface IBaseWashoutPointService extends IService<BaseWashoutPoint> {
     Result delete(HttpServletRequest httpServletRequest,Map<String,String> paramsMap);
 
     Result listDest(Map<String, String> paramsMap);
+
+    Result listWash(Map<String, String> paramsMap);
 }

+ 15 - 0
huimv-receive/src/main/java/com/huimv/receive/service/impl/BaseWashoutPointServiceImpl.java

@@ -134,4 +134,19 @@ public class BaseWashoutPointServiceImpl extends ServiceImpl<BaseWashoutPointMap
         return new Result(ResultCode.SUCCESS,destVoList);
     }
 
+    @Override
+    public Result listWash(Map<String, String> paramsMap) {
+        String farmId = paramsMap.get("farmId");
+        String vistitType = paramsMap.get("vistitType");
+        List<BaseWashoutPoint> points = washoutPointMapper.listWash(farmId, vistitType);
+        List<DestVo> destVoList = new ArrayList<>();
+        for (BaseWashoutPoint baseWashoutPoint : points) {
+            DestVo destVo = new DestVo();
+            destVo.setId(baseWashoutPoint.getLocationId());
+            destVo.setLocationName(baseWashoutPoint.getLocationName());
+            destVoList.add(destVo);
+        }
+        return new Result(ResultCode.SUCCESS,destVoList);
+    }
+
 }

+ 7 - 0
huimv-receive/src/main/resources/mapper/BaseWashoutPointMapper.xml

@@ -23,4 +23,11 @@
 
     </select>
 
+
+    <select id="listWash" resultType="com.huimv.receive.entity.BaseWashoutPoint">
+        SELECT w.location_id,l.location_name  FROM `base_washout_point` w
+        inner JOIN `base_location` l ON l.id = w.location_id
+        WHERE w.farm_ids LIKE concat('%',#{farmId},'%') AND w.visiting_type = #{vistitType}
+
+    </select>
 </mapper>