Jelajahi Sumber

Merge branch 'dev' of yeshijie/patient-co-management into dev

yeshijie 7 tahun lalu
induk
melakukan
cf71210161

File diff ditekan karena terlalu besar
+ 4 - 5
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java


+ 4 - 1
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java

@ -283,7 +283,10 @@ public class PrescriptionService extends ZysoftBaseService{
                message.put("state",1);
                message.put("prescription",prescription.getCode());
                message.put("mes","success");
                redisTemplate.convertAndSend(channelTopic,message.toString());
//                redisTemplate.convertAndSend(channelTopic,message.toString());
                redisTemplate.watch(channelTopic);
                redisTemplate.opsForList().leftPush(channelTopic,message.toString());
                redisTemplate.unwatch();
            }
        }catch (JSONException ex){

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -67,6 +67,7 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("select count(a) from Message a where a.read = 0 and a.over ='0'  and a.receiver=?1 and a.type=?2 ")
    int findMessageNum(String doctor, Integer type);
    @Modifying
    @Query("update Message a set a.prescriptionStatus=?2 where a.relationCode = ?1 and a.type=?3 ")
    int updatePreScriptionMessage(String relateCode,String prescriptionStatus,Integer type);

+ 11 - 15
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionDispensaryCodeService.java

@ -1,39 +1,26 @@
package com.yihu.wlyy.service.app.prescription;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionDispensaryCode;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.repository.message.MessageDao;
import com.yihu.wlyy.repository.prescription.PrescriptionDao;
import com.yihu.wlyy.repository.prescription.PrescriptionDispensaryCodeDao;
import com.yihu.wlyy.repository.prescription.PrescriptionInfoDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.common.QrcodeService;
import com.yihu.wlyy.util.HttpUtil;
import com.yihu.wlyy.util.QrcodeUtil;
import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.util.fastdfs.FastDFSUtil;
import org.apache.axis.encoding.*;
import org.apache.axis.encoding.Base64;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.io.InputStream;
import java.util.*;
/**
@ -55,6 +42,8 @@ public class PrescriptionDispensaryCodeService extends BaseService {
    private HttpUtil httpUtil;
    @Autowired
    private PrescriptionDao prescriptionDao;
    @Autowired
    private MessageDao messageDao;
    private static Object obj = new Object();
    private static Object obj2 = new Object();
@ -251,6 +240,13 @@ public class PrescriptionDispensaryCodeService extends BaseService {
            prescriptionDispensaryCode.setIsUse(1);
            prescriptionDispensaryCodeDao.save(prescriptionDispensaryCode);
            Prescription prescription = prescriptionDao.findByCode(prescriptionDispensaryCode.getPrescriptionCode());
            if(prescription.getDispensaryType()==3){
                //健管师配送
                //修改系统的续方消息的审核状态
                messageDao.updatePreScriptionMessage(prescription.getCode(), "1", 7);
            }
        }else{
            throw new Exception("二维码输入错误或者已过期!");
        }

+ 3 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -388,6 +388,9 @@ public class PrescriptionInfoService extends BaseService {
                //审核通过模板消息
                sendRMess(code, 1);
                //修改系统的续方消息的审核状态
                messageDao.updatePreScriptionMessage(p.getConsult(), "1", 6);
                //获取智业待结算接口,更新药品金额
                prescriptionService.getPerscriptionInfoCostFromPayInfo(p.getCode());
                return 1;