Browse Source

socket接口更新

WANGJIALIANG 4 years ago
parent
commit
a9e059779e

+ 7 - 9
src/main/java/cn/hnthyy/thmz/service/impl/thmz/DispensingSocketServiceImpl.java

@@ -48,19 +48,17 @@ public class DispensingSocketServiceImpl implements DispensingSocketService {
     }
     }
 
 
     @Override
     @Override
-    public int sendToMedicine(String patientId, int times, String type) {
-        if(type.equals(SocketSenderTypeEnum.PAY.code)){
-            //查询缴费药品的发药药房
-            MzChargeDetail mzChargeDetail = new MzChargeDetail();
-            mzChargeDetail.setPatientId(patientId);
-            mzChargeDetail.setTimes(times);
-            mzChargeDetailService.queryChargeDetail(mzChargeDetail);
-        }
+    public int sendToMedicine(String patientId, int times) {
+        //查询缴费药品的发药药房
+        MzChargeDetail mzChargeDetail = new MzChargeDetail();
+        mzChargeDetail.setPatientId(patientId);
+        mzChargeDetail.setTimes(times);
+        mzChargeDetailService.queryChargeDetail(mzChargeDetail);
         Map<String,Object> msgMap = new HashMap();
         Map<String,Object> msgMap = new HashMap();
         msgMap.put("patientId",patientId);
         msgMap.put("patientId",patientId);
         MzPatientMi mzPatientMi = mzPatientMiService.queryByPatientId(patientId);
         MzPatientMi mzPatientMi = mzPatientMiService.queryByPatientId(patientId);
         msgMap.put("name",mzPatientMi.getName());
         msgMap.put("name",mzPatientMi.getName());
-        msgMap.put("type",type);
+        msgMap.put("type",SocketSenderTypeEnum.PAY.code);
         JSONObject jsonObject = new JSONObject(msgMap);
         JSONObject jsonObject = new JSONObject(msgMap);
         return toMedicineSocket.sendMessage(jsonObject.toString());
         return toMedicineSocket.sendMessage(jsonObject.toString());
     }
     }

+ 2 - 3
src/main/java/cn/hnthyy/thmz/service/thmz/DispensingSocketService.java

@@ -25,12 +25,11 @@ public interface DispensingSocketService {
     int sendToMedicine(String patientId,String type);
     int sendToMedicine(String patientId,String type);
 
 
     /**
     /**
-     * 缴费通知发药提醒
+     * 通知发药提醒
      * @param patientId
      * @param patientId
-     * @param type socket发送方类型SocketSenderTypeEnum
      * @return
      * @return
      */
      */
-    int sendToMedicine(String patientId,int times,String type);
+    int sendToMedicine(String patientId,int times);
 
 
     /**
     /**
      * 通知发药处理
      * 通知发药处理