jk-GitHub-coder 4 年之前
父节点
当前提交
afd9f8e9b4

+ 1 - 0
YijiaRestful/src/main/java/com/platform/yijia/controller/ElectronicMembershipCardController.java

@@ -581,6 +581,7 @@ public class ElectronicMembershipCardController {
         if(stationDeviceManagerInfo !=null && stationDeviceManagerInfo.getPosFanoutExchange() !=null && stationDeviceManagerInfo.getPosQueue() !=null){
             params.put("posFanoutExchange", stationDeviceManagerInfo.getPosFanoutExchange());
             params.put("posQueue", stationDeviceManagerInfo.getPosQueue());
+            params.put("tusn", stationDeviceManagerInfo.getDeviceNo());
         }
         List<Map<String, Object>> list = new ArrayList<>();
         list.add(m);

+ 1 - 0
YijiaRestful/src/main/java/com/platform/yijia/controller/IntegralShoppingMallController.java

@@ -312,6 +312,7 @@ public class IntegralShoppingMallController {
         if(stationDeviceManagerInfo !=null && stationDeviceManagerInfo.getPosFanoutExchange() !=null && stationDeviceManagerInfo.getPosQueue() !=null){
             params.put("posFanoutExchange", stationDeviceManagerInfo.getPosFanoutExchange());
             params.put("posQueue", stationDeviceManagerInfo.getPosQueue());
+            params.put("tusn", stationDeviceManagerInfo.getDeviceNo());
         }
         List<Map<String, Object>> list = new ArrayList<>();
         list.add(map);

+ 1 - 0
YijiaRestful/src/main/java/com/platform/yijia/controller/PayController.java

@@ -840,6 +840,7 @@ public class PayController {
         if(stationDeviceManagerInfo !=null && stationDeviceManagerInfo.getPosFanoutExchange() !=null && stationDeviceManagerInfo.getPosQueue() !=null){
             params.put("posFanoutExchange", stationDeviceManagerInfo.getPosFanoutExchange());
             params.put("posQueue", stationDeviceManagerInfo.getPosQueue());
+            params.put("tusn", stationDeviceManagerInfo.getDeviceNo());
         }
         List<Map<String, Object>> list = new ArrayList<>();
         list.add(m);

+ 21 - 1
YijiaRestful/src/main/java/com/platform/yijia/controller/PosMachineController.java

@@ -95,7 +95,7 @@ public class PosMachineController {
         Gson gson =new Gson();
         //返回结果集
         ResultData resultData = null;
-        if(stationId !=null && StringUtils.isNotBlank(oilGun) && StringUtils.isNotBlank(deviceType)){
+        if(stationId !=null  && StringUtils.isNotBlank(deviceType)){
             StationDeviceManager stationDeviceManager = new StationDeviceManager();
             stationDeviceManager.setGunNo(oilGun);
             stationDeviceManager.setStationId(stationId);
@@ -109,6 +109,26 @@ public class PosMachineController {
         return gson.toJson(resultData);
     }
 
+    //根据POS机tusn获取该油站油枪绑定的POS机信息
+    @RequestMapping (value = "/getStationDeviceManagerBytusn", method = RequestMethod.GET)
+    @ResponseBody
+    public String getStationDeviceManagerBytusn(@RequestParam String tusn){
+        Gson gson =new Gson();
+        //返回结果集
+        ResultData resultData = null;
+        if(StringUtils.isNotBlank(tusn)){
+            StationDeviceManager stationDeviceManager = new StationDeviceManager();
+            stationDeviceManager.setDeviceNo(tusn);
+            //获取油枪绑定的打印设备信息
+            StationDeviceManager stationDeviceManagerList = stationService.getStationDeviceManager(stationDeviceManager);
+            resultData = ResultData.success(stationDeviceManagerList);
+        }else {
+            resultData = ResultData.error(CodeMsg.REQUEST_FAIL);
+        }
+        return gson.toJson(resultData);
+    }
+
+
 
     //查询POS机昨天和近七天数据
     @RequestMapping (value = "/selectPosYesterDayAndSevenData", method = RequestMethod.GET)

+ 3 - 0
YijiaRestful/src/main/resources/mapper/StationInfoMapper.xml

@@ -561,6 +561,9 @@
       <if test="stationId != null and stationId !=''">
         AND station_id = #{stationId}
       </if>
+      <if test="deviceNo != null and deviceNo !=''">
+        AND device_no = #{deviceNo}
+      </if>
       <if test="deviceType != null and deviceType !=''">
         AND device_type = #{deviceType}
       </if>