|
|
@@ -10,10 +10,8 @@ import cn.hnthyy.thmz.socket.PrescriptionPrintSocket;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
public class DispensingSocketServiceImpl implements DispensingSocketService {
|
|
|
@@ -55,20 +53,16 @@ public class DispensingSocketServiceImpl implements DispensingSocketService {
|
|
|
MzChargeDetail mzChargeDetail = new MzChargeDetail();
|
|
|
mzChargeDetail.setPatientId(patientId);
|
|
|
mzChargeDetail.setTimes(times);
|
|
|
+ mzChargeDetail.setGroupNo("71");
|
|
|
List<MzChargeDetail> chargeDetail = mzChargeDetailService.getMzChargeDetailList(mzChargeDetail);
|
|
|
- boolean flag = false;
|
|
|
- for (MzChargeDetail detail : chargeDetail) {
|
|
|
- if(detail.getGroupNo().equals("71")){
|
|
|
- flag = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if(flag){
|
|
|
+ if(chargeDetail.size() > 0){
|
|
|
+ Set<Integer> orderNos = chargeDetail.stream().map(MzChargeDetail::getOrderNo).collect(Collectors.toSet());
|
|
|
Map<String,Object> msgMap = new HashMap();
|
|
|
msgMap.put("patient_id",patientId);
|
|
|
MzPatientMi mzPatientMi = mzPatientMiService.queryByPatientId(patientId);
|
|
|
msgMap.put("name",mzPatientMi.getName());
|
|
|
msgMap.put("times",times);
|
|
|
+ msgMap.put("orderNos",orderNos);
|
|
|
msgMap.put("type",SocketSenderTypeEnum.PAY.code);
|
|
|
List<String> objTypes = new ArrayList<>();
|
|
|
objTypes.add(SocketSenderTypeEnum.CALL_NUMBER.code);
|