Selaa lähdekoodia

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

huangwenjie 7 vuotta sitten
vanhempi
commit
2bdc4c0403
14 muutettua tiedostoa jossa 364 lisäystä ja 191 poistoa
  1. 90 90
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/activemq/StartListener.java
  2. 70 70
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/config/ActiveMQConfig.java
  3. 41 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/UploadImagConfig.java
  4. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java
  5. 102 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java
  6. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java
  7. 13 7
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/RoleService.java
  8. 3 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java
  9. 8 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/pc/prescription/PrescriptionExpressagePCService.java
  10. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/FileUploadController.java
  11. 10 9
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java
  12. 2 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEdu/DoctorJMJkEduArticleController.java
  13. 19 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionExpressageController.java
  14. 3 3
      patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

+ 90 - 90
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/activemq/StartListener.java

@ -1,90 +1,90 @@
//package com.yihu.wlyy.activemq;
//
//import com.yihu.wlyy.util.SpringUtil;
//import org.apache.activemq.ActiveMQSession;
//import org.apache.activemq.command.ActiveMQQueue;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.jms.connection.CachingConnectionFactory;
//import org.springframework.jms.listener.DefaultMessageListenerContainer;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.PostConstruct;
//import javax.jms.MessageListener;
//import java.util.HashMap;
//import java.util.Map;
//
///**
// * Created by chenweida on 2017/9/9.
// */
//@Component
//public class StartListener {
//    private static Map<String, DefaultMessageListenerContainer> holder = new HashMap<String, DefaultMessageListenerContainer>();
//    private Logger logger = LoggerFactory.getLogger(StartListener.class);
//
//    @Value("${activemq.queue.healtHarticleQueue}")
//    private String healtHarticleQueue;
//    @Value("${activemq.consumers.count}")
//    private Integer count;
//    @Autowired
//    private HealthArtListener healthArtListener;
//    @Autowired
//    private CachingConnectionFactory cachingConnectionFactory;
//
//    @PostConstruct
//    public void startListener() {
//        startHealthArticQueueListener();
//    }
//
//    /**
//     * 启动健康教育消费
//     */
//    private void startHealthArticQueueListener() {
//        try {
//            //启动监听
//            startReceiverByQueueName(healthArtListener, healtHarticleQueue);
//            logger.info("start HealthArtListener success");
//        } catch (Exception e) {
//            logger.error("start HealthArtListener error");
//        }
//    }
//
//    /**
//     * 启动
//     *
//     * @param receiver
//     * @param queueName
//     */
//    private void startReceiverByQueueName(MessageListener receiver, String queueName) {
//        if (holder.get(queueName) != null) {
//            return;
//        }
//        ActiveMQQueue destination = new ActiveMQQueue(queueName);
//
//        DefaultMessageListenerContainer listenerContainer = new DefaultMessageListenerContainer();
//        // 监听容器属性的配置
//        listenerContainer.setConnectionFactory(cachingConnectionFactory);
//        // 设置目的地
//        listenerContainer.setDestination(destination);
//        // 设置监听器
//        listenerContainer.setMessageListener(receiver);
//        // 设置消费者集群数
//        int consumers = count;
//        listenerContainer.setConcurrentConsumers(2);
//        listenerContainer.setMaxConcurrentConsumers(consumers);
//        // 设置监听队列还是主题 默认是队列
//        listenerContainer.setPubSubNoLocal(false);
//        // listenerContainer.setAcceptMessagesWhileStopping(true);
//        // 设置应答模式 默认是4
//        listenerContainer.setSessionAcknowledgeMode(ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);
//        // 设置是否启动事物 默认不开启
//        listenerContainer.setSessionTransacted(false);
//        // 将监听容器保存在holder中
//        holder.put(queueName, listenerContainer);
//        listenerContainer.initialize();
//        // 启动监听
//        listenerContainer.start();
//    }
//}
package com.yihu.wlyy.activemq;
import com.yihu.wlyy.util.SpringUtil;
import org.apache.activemq.ActiveMQSession;
import org.apache.activemq.command.ActiveMQQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jms.connection.CachingConnectionFactory;
import org.springframework.jms.listener.DefaultMessageListenerContainer;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.jms.MessageListener;
import java.util.HashMap;
import java.util.Map;
/**
 * Created by chenweida on 2017/9/9.
 */
@Component
public class StartListener {
    private static Map<String, DefaultMessageListenerContainer> holder = new HashMap<String, DefaultMessageListenerContainer>();
    private Logger logger = LoggerFactory.getLogger(StartListener.class);
    @Value("${activemq.queue.healtHarticleQueue}")
    private String healtHarticleQueue;
    @Value("${activemq.consumers.count}")
    private Integer count;
    @Autowired
    private HealthArtListener healthArtListener;
    @Autowired
    private CachingConnectionFactory cachingConnectionFactory;
    @PostConstruct
    public void startListener() {
        startHealthArticQueueListener();
    }
    /**
     * 启动健康教育消费
     */
    private void startHealthArticQueueListener() {
        try {
            //启动监听
            startReceiverByQueueName(healthArtListener, healtHarticleQueue);
            logger.info("start HealthArtListener success");
        } catch (Exception e) {
            logger.error("start HealthArtListener error");
        }
    }
    /**
     * 启动
     *
     * @param receiver
     * @param queueName
     */
    private void startReceiverByQueueName(MessageListener receiver, String queueName) {
        if (holder.get(queueName) != null) {
            return;
        }
        ActiveMQQueue destination = new ActiveMQQueue(queueName);
        DefaultMessageListenerContainer listenerContainer = new DefaultMessageListenerContainer();
        // 监听容器属性的配置
        listenerContainer.setConnectionFactory(cachingConnectionFactory);
        // 设置目的地
        listenerContainer.setDestination(destination);
        // 设置监听器
        listenerContainer.setMessageListener(receiver);
        // 设置消费者集群数
        int consumers = count;
        listenerContainer.setConcurrentConsumers(2);
        listenerContainer.setMaxConcurrentConsumers(consumers);
        // 设置监听队列还是主题 默认是队列
        listenerContainer.setPubSubNoLocal(false);
        // listenerContainer.setAcceptMessagesWhileStopping(true);
        // 设置应答模式 默认是4
        listenerContainer.setSessionAcknowledgeMode(ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);
        // 设置是否启动事物 默认不开启
        listenerContainer.setSessionTransacted(false);
        // 将监听容器保存在holder中
        holder.put(queueName, listenerContainer);
        listenerContainer.initialize();
        // 启动监听
        listenerContainer.start();
    }
}

+ 70 - 70
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/config/ActiveMQConfig.java

@ -1,70 +1,70 @@
//package com.yihu.wlyy.config;
//
//import com.yihu.wlyy.activemq.HealthArtListener;
//import com.yihu.wlyy.util.SpringUtil;
//import org.apache.activemq.ActiveMQConnectionFactory;
//import org.apache.activemq.ActiveMQSession;
//import org.apache.activemq.command.ActiveMQQueue;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Primary;
//import org.springframework.jms.annotation.EnableJms;
//import org.springframework.jms.connection.CachingConnectionFactory;
//import org.springframework.jms.core.JmsTemplate;
//import org.springframework.jms.listener.DefaultMessageListenerContainer;
//
//import javax.annotation.PostConstruct;
//import javax.jms.MessageListener;
//import java.util.HashMap;
//import java.util.Map;
//
///**
// * Created by chenweida on 2017/9/9.
// * 生产者配置
// */
//@EnableJms
//@Configuration
//public class ActiveMQConfig {
//   @Value("${activemq.username}")
//    private String username;
//    @Value("${activemq.password}")
//    private String password;
//    @Value("${activemq.url}")
//    private String url;
//
//    @Bean
//    public ActiveMQConnectionFactory activeMQConnectionFactory() {
//        ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory(username, password, url);
//        //设置异步发送
//        activeMQConnectionFactory.setUseAsyncSend(true);
//        return activeMQConnectionFactory;
//    }
//
//    /**
//     * 缓存session链接
//     *
//     * @return
//     */
//    @Bean
//    @Primary
//    public CachingConnectionFactory CachingConnectionFactory() {
//        CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory();
//        //目标ConnectionFactory对应真实的可以产生JMS Connection的ConnectionFactory
//        cachingConnectionFactory.setTargetConnectionFactory(activeMQConnectionFactory());
//        //Session缓存数量,这里属性也可以直接在这里配置
//        cachingConnectionFactory.setSessionCacheSize(100);
//        return cachingConnectionFactory;
//    }
//
//    @Bean
//    public JmsTemplate jmsTemplate() {
//        JmsTemplate jmsTemplate = new JmsTemplate();
//        jmsTemplate.setConnectionFactory(CachingConnectionFactory());
//
//        return jmsTemplate;
//    }
//
//}
package com.yihu.wlyy.config;
import com.yihu.wlyy.activemq.HealthArtListener;
import com.yihu.wlyy.util.SpringUtil;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.ActiveMQSession;
import org.apache.activemq.command.ActiveMQQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.jms.connection.CachingConnectionFactory;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.listener.DefaultMessageListenerContainer;
import javax.annotation.PostConstruct;
import javax.jms.MessageListener;
import java.util.HashMap;
import java.util.Map;
/**
 * Created by chenweida on 2017/9/9.
 * 生产者配置
 */
@EnableJms
@Configuration
public class ActiveMQConfig {
   @Value("${activemq.username}")
    private String username;
    @Value("${activemq.password}")
    private String password;
    @Value("${activemq.url}")
    private String url;
    @Bean
    public ActiveMQConnectionFactory activeMQConnectionFactory() {
        ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory(username, password, url);
        //设置异步发送
        activeMQConnectionFactory.setUseAsyncSend(true);
        return activeMQConnectionFactory;
    }
    /**
     * 缓存session链接
     *
     * @return
     */
    @Bean
    @Primary
    public CachingConnectionFactory CachingConnectionFactory() {
        CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory();
        //目标ConnectionFactory对应真实的可以产生JMS Connection的ConnectionFactory
        cachingConnectionFactory.setTargetConnectionFactory(activeMQConnectionFactory());
        //Session缓存数量,这里属性也可以直接在这里配置
        cachingConnectionFactory.setSessionCacheSize(100);
        return cachingConnectionFactory;
    }
    @Bean
    public JmsTemplate jmsTemplate() {
        JmsTemplate jmsTemplate = new JmsTemplate();
        jmsTemplate.setConnectionFactory(CachingConnectionFactory());
        return jmsTemplate;
    }
}

+ 41 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/UploadImagConfig.java

@ -0,0 +1,41 @@
package com.yihu.wlyy.config;
import com.yihu.wlyy.util.SystemConf;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.jms.connection.CachingConnectionFactory;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import java.io.File;
/**
 * Created by chenweida on 2017/9/9.
 * 生产者配置
 */
@EnableJms
@Configuration
@Profile({"dev", "devtest", "prod", "test"})
public class UploadImagConfig extends WebMvcConfigurerAdapter {
//    @Value("${activemq.username}")
//    private String username;
//    @Value("${activemq.password}")
//    private String password;
//    @Value("${activemq.url}")
//    private String url;
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        String tempPath = SystemConf.getInstance().getTempPath() + File.separator;
        registry.addResourceHandler(tempPath+"**").addResourceLocations("F:/"+tempPath);
        super.addResourceHandlers(registry);
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -879,7 +879,7 @@ public class ConsultTeamService extends ConsultService {
                    if (users.isNull(sf.getDoctor())) {
                        //全科需要判断是否开启健管师邀请后在接收消息
                        int isGetMessage = 1;
                        if(messageService.getMessageNoticeSettingByMessageType(sf.getDoctor(),"1", MessageNoticeSetting.MessageTypeEnum.healthSignSwitch.getValue())){
                        if(!messageService.getMessageNoticeSettingByMessageType(sf.getDoctor(),"1", MessageNoticeSetting.MessageTypeEnum.familyTopicSwitch.getValue())){
                            isGetMessage = 0;
                        }
                        users.put(sf.getDoctor(), isGetMessage);

+ 102 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java

@ -576,8 +576,8 @@ public class PrescriptionExpressageService extends BaseService {
                    PrescriptionExpressage prescriptionExpressage = prescriptionExpressageDao.findByPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
                    if(prescriptionExpressage!=null){
                        prescriptionExpressage.setHospitalDoctor(doctor);
                        prescriptionExpressage.setHospitalDoctorCode(d.getCode());
                        prescriptionExpressage.setHospitalDoctor(d.getName());
                        prescriptionExpressage.setHospitalDoctorCode(doctor);
                        prescriptionExpressage.setFetchingMedicineTime(new Date());
                        prescriptionExpressageDao.save(prescriptionExpressage);
                    }
@ -629,6 +629,7 @@ public class PrescriptionExpressageService extends BaseService {
                " FROM " +
                " wlyy_prescription p " +
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
        totalSql = setSQL( totalSql,keyWord,state,type,startDate,endDate,operator,flag);
@ -651,14 +652,15 @@ public class PrescriptionExpressageService extends BaseService {
                "  p.patient AS patientCode, " +
                "  py.charge_time AS chargeTime, " +
                "  p.dispensary_type AS dispensaryType, " +
                "  p.drug_delivery_operator_name AS operatorName," +
                "  e.hospital_doctor AS operatorName," +
                "  p.drug_delivery_flag AS drugDeliveryFlag, " +
                "  p.drug_delivery_time AS drugDeliveryTime," +
                "  e.fetching_medicine_time AS drugDeliveryTime," +
                "  p.code AS prescriptionCode," +
                "  p.`status` " +
                " FROM " +
                " wlyy_prescription p " +
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
        sql = setSQL( sql,keyWord,state,type,startDate,endDate,operator,flag);
@ -731,4 +733,100 @@ public class PrescriptionExpressageService extends BaseService {
        List<Map<String,Object>> rs = jdbcTemplate.queryForList(sql);
        return rs;
    }
    public Map<String, Object> getPresEsList(String doctor,String keyWord, String state, String type, String startDate, String endDate, String operator,String flag,Integer page, Integer pageSize) {
        Map<String, Object> map = new HashedMap();
        Doctor d = doctorDao.findByCode(doctor);
        String totalSql = "SELECT count(1) AS total " +
                " FROM " +
                " wlyy_prescription p " +
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
        totalSql = setDrugSQL( totalSql,keyWord,state,type,startDate,endDate,operator,flag);
        totalSql +=  " AND p.`status`>=50 ";
        List<Map<String, Object>> totallist = jdbcTemplate.queryForList(totalSql);
        Long total = (Long)totallist.get(0).get("total");
        if(total==0){
            map.put("list",null);
            map.put("page",page);
            map.put("total",0);
            map.put("records",0);
            return map;
        }
        int start = (page - 1) * pageSize;
        String sql = "SELECT " +
                "  py.charge_no AS chargeNo, " +
                "  p.patient_name AS patientName, " +
                "  p.patient AS patientCode, " +
                "  py.charge_time AS chargeTime, " +
                "  p.dispensary_type AS dispensaryType, " +
                "  e.hospital_doctor AS operatorName," +
                "  p.drug_delivery_flag AS drugDeliveryFlag, " +
                "  e.fetching_medicine_time AS drugDeliveryTime," +
                "  p.code AS prescriptionCode," +
                "  p.`status` " +
                " FROM " +
                " wlyy_prescription p " +
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
        sql = setDrugSQL( sql,keyWord,state,type,startDate,endDate,operator,flag);
        sql +=  " AND p.`status`>=50 " +
                " ORDER BY e.fetching_medicine_time DESC " +
                " LIMIT " + start + "," + pageSize;
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        map.put("page",page);
        map.put("records",total);
        map.put("list",list);
        double t = (double)total;
        map.put("total",Math.ceil(t/pageSize));
        return map;
    }
    public String setDrugSQL(String sql,String keyWord, String state, String type, String startDate, String endDate,String operator,String flag){
        //关键字搜索
        if(StringUtils.isNotBlank(keyWord)){
            Patient p = patientDao.findByIdcard(keyWord);
            if(p!=null){
                sql += " AND p.patient = '"+p.getCode()+"' ";
            }else{
                p = patientDao.findBySsc(keyWord);
                if(p!=null){
                    sql += " AND p.patient = '"+p.getCode()+"' ";
                }else{
                    sql += " AND ( py.charge_no = '"+keyWord+"' OR p.patient_name ='"+keyWord+"' )";
                }
            }
        }
        if(StringUtils.isNotBlank(state)){
            sql += " AND p.status = "+state ;
        }
        if(StringUtils.isNotBlank(type)){
            sql +=" AND p.dispensary_type =" +type;
        }
        if(StringUtils.isNotBlank(startDate)){
            startDate +=" 00:00:00";
            sql += " AND e.fetching_medicine_time >='"+startDate+"' ";
        }
        if(StringUtils.isNotBlank(endDate)){
            endDate +=" 23:59:59";
            sql += " AND e.fetching_medicine_time <='"+endDate+"' ";
        }
        if(StringUtils.isNotBlank(operator)){
            sql += " AND p.drug_delivery_operator ='"+operator+"' ";
        }
        if(StringUtils.isNotBlank(flag)){
            sql += " AND p.drug_delivery_flag ="+flag+" ";
        }
        return sql;
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java

@ -1091,7 +1091,7 @@ public class PatientService extends TokenService {
        if(list!=null&&list.size()>0){
            Map<String,Object> map = list.get(0);
            Long count = (Long)map.get("total");
            if(count>10){
            if(count>=10){
                return false;
            }else{
                return true;

+ 13 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/RoleService.java

@ -11,9 +11,11 @@ import com.yihu.wlyy.entity.doctor.profile.DoctorRoleRealm;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.doctor.DoctorRoleRealmDao;
import com.yihu.wlyy.repository.doctor.DoctorRoleDao;
import com.yihu.wlyy.service.app.account.DoctorInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import org.springside.modules.utils.Clock;
import java.util.ArrayList;
@ -39,6 +41,8 @@ public class RoleService extends TokenService {
    @Autowired
    private DoctorDao doctorDao;
    @Autowired
    private DoctorInfoService doctorInfoService;
    /**
     * 获取用户角色列表
@ -148,13 +152,15 @@ public class RoleService extends TokenService {
                }
                map.put("areas", areaString);
                map.put("level",roleConverse(role.getCode())+"");
                if(resultLevel==roleConverse(role.getCode())){
                    map.put("isManage", "1");
                }else{
                    map.put("isManage", "0");
                }
                List<RoleWithAuthorityCheck> list = doctorDao.findEduAuthority(user,role.getCode());
                if(list.size()>0){
                map.put("isManage", "1");
//                if(resultLevel==roleConverse(role.getCode())){
//                    map.put("isManage", "1");
//                }else{
//                    map.put("isManage", "0");
//                }
                List<Map<String, Object>> list = doctorInfoService.getDoctorManagerRole(user,"Manage_Article_Authentication");
                if(list.size()>0&&!StringUtils.isEmpty(list.get(0).get("code"))){
                    map.put("authOperate", "1");
                }else{
                    map.put("authOperate", "0");

+ 3 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -972,8 +972,8 @@ public class JMJkEduArticleService extends BaseService {
        }
        Integer isAuthentication = 0;
        //当管理员具有审核权限时,添加文章不需认证,添加后自动认证,
        Doctor doctor = doctorDao.findByCode(userCode);
        if(doctor.getLevel()==10){
//        Doctor doctor = doctorDao.findByCode(userCode);
        if(roleType==2){
//            List<RoleWithAuthorityCheck> list = doctorDao.findEduAuthority(userCode,operatorRoleCode);
            List<Map<String, Object>> list = doctorInfoService.getDoctorManagerRole(userCode,"Manage_Article_Authentication");
            if(list.size()>0&&!StringUtils.isEmpty(list.get(0).get("code"))){
@ -1084,6 +1084,7 @@ public class JMJkEduArticleService extends BaseService {
    @Transient
    public void authenticationArticle(String articleId,String isAuthentication,String firstLevelCategoryId,String firstLevelCategoryName,String secondLevelCategoryId,String secondLevelCategoryName) throws Exception{
        String[] str = articleId.split(",");
        for(String one: str){
            thirdJkEduArticleService.authenticationArticle(one,isAuthentication,firstLevelCategoryId,firstLevelCategoryName,secondLevelCategoryId,secondLevelCategoryName);

+ 8 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/pc/prescription/PrescriptionExpressagePCService.java

@ -61,7 +61,7 @@ public class PrescriptionExpressagePCService extends BaseService {
    public JSONObject getMedicine(String code,String userCode) throws Exception{
        JSONObject jsonObject = new JSONObject();
        String sql = "select c.drug_delivery_flag AS drugDeliveryFlag,c.drug_delivery_operator_name AS drugDeliveryOperatorName,c.drug_delivery_time AS drugDeliveryTime,a.type,a.prescription_code as prescriptionCode ,c.status,b.hospital_code as hospitalCode, b.hospital_doctor as hospitalDoctor,\n" +
        String sql = "select c.ssc,c.drug_delivery_flag AS drugDeliveryFlag,c.drug_delivery_operator_name AS drugDeliveryOperatorName,c.drug_delivery_time AS drugDeliveryTime,a.type,a.prescription_code as prescriptionCode ,c.status,b.hospital_code as hospitalCode, b.hospital_doctor as hospitalDoctor,\n" +
                "b.code as orderCode, b.hospital_name as hospitalName,c.dispensary_type as dispensaryType,b.fetching_medicine_time as fetchingMedicineTime ,\n" +
                "b.expressage_code as expressageCode,c.patient \n" +
                "from wlyy_prescription_dispensary_code a \n" +
@ -91,6 +91,7 @@ public class PrescriptionExpressagePCService extends BaseService {
                            jsonObject.put("flag",1);
                            jsonObject.put("prescriptionInfoList",list);
                            jsonObject.put("idcard",patient.getIdcard());
                            jsonObject.put("ssc",patient.getSsc());
                            jsonObject.put("orderCode",result.get("orderCode"));
                            jsonObject.put("hospitalCode",result.get("hospitalCode"));
                            jsonObject.put("hospitalName",result.get("hospitalName"));
@ -111,6 +112,7 @@ public class PrescriptionExpressagePCService extends BaseService {
                            jsonObject.put("flag",-6);//”订单已取药,出药人:张三,出药时间:XXXX-XX-XX,无法重新出药
                            jsonObject.put("prescriptionInfoList",list);
                            jsonObject.put("idcard",patient.getIdcard());
                            jsonObject.put("ssc",patient.getSsc());
                            jsonObject.put("orderCode",result.get("orderCode"));
                            jsonObject.put("hospitalCode",result.get("hospitalCode"));
                            jsonObject.put("hospitalName",result.get("hospitalName"));
@ -129,7 +131,7 @@ public class PrescriptionExpressagePCService extends BaseService {
                    }
                    //健管师取药码
                    case 2:{
                        Patient patient = patientDao.findByCode(result.get("patient")+"");
                        //判断出药机构是否与健管师所属机构一致,不一致弹窗提示:“出药机构与您所在机构不一致,无法出药,请重新确认”。一致则进入下一步。
                        Doctor jgsDoctor = doctorService.findDoctorByCode(userCode);
                        Doctor doctor = doctorService.findDoctorByCode(result.get("expressageCode")+"");
@ -143,7 +145,8 @@ public class PrescriptionExpressagePCService extends BaseService {
                                List<PrescriptionInfo> list = prescriptionInfoDao.findByPrescriptionCode(result.get("prescriptionCode").toString());
                                jsonObject.put("prescriptionInfoList",list);
                                jsonObject.put("orderCode",result.get("orderCode"));
                                jsonObject.put("idcard",doctor.getIdcard());
                                jsonObject.put("idcard",patient.getIdcard());
                                jsonObject.put("ssc",result.get("ssc"));
                                jsonObject.put("hospitalCode",result.get("hospitalCode"));
                                jsonObject.put("hospitalName",result.get("hospitalName"));
                                jsonObject.put("status",result.get("status"));
@ -162,7 +165,8 @@ public class PrescriptionExpressagePCService extends BaseService {
                                List<PrescriptionInfo> list = prescriptionInfoDao.findByPrescriptionCode(result.get("prescriptionCode").toString());
                                jsonObject.put("prescriptionInfoList",list);
                                jsonObject.put("orderCode",result.get("orderCode"));
                                jsonObject.put("idcard",doctor.getIdcard());
                                jsonObject.put("idcard",patient.getIdcard());
                                jsonObject.put("ssc",result.get("ssc"));
                                jsonObject.put("hospitalCode",result.get("hospitalCode"));
                                jsonObject.put("hospitalName",result.get("hospitalName"));
                                jsonObject.put("status",result.get("status"));

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/FileUploadController.java

@ -162,6 +162,7 @@ public class FileUploadController extends BaseController {
                json.put("msg", "上传成功");
                // 图片标识对象的HTTP链接
                json.put("urls", urls);
                json.put("tempPath", tempPath);
                logger.info("图片上传:" + json.toString());
                return json.toString();
            } catch (Exception e) {

+ 10 - 9
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java

@ -279,16 +279,17 @@ public class LoginController extends BaseController {
                                continue;
                            }
                        }
                    }else{
                        Map<String, String> one = new HashMap<>();
                         one.put("isManage","0");
                         one.put("code", doctor.getHospital());
                         one.put("name", doctor.getHospitalName());
                         one.put("areas", "");
                         one.put("level","4");
                         one.put("authOperate", "0");
                         map.put("currentUserRole", one);
                    }
//                    else{
//                        Map<String, String> one = new HashMap<>();
//                         one.put("isManage","0");
//                         one.put("code", doctor.getHospital());
//                         one.put("name", doctor.getHospitalName());
//                         one.put("areas", "");
//                         one.put("level","4");
//                         one.put("authOperate", "0");
//                         map.put("currentUserRole", one);
//                    }
                    if ("10" .equals(doctor.getLevel()) && roleMap.size() == 0) {
                        errorMessage = "改用户没有管理员权限";
                        loginLog.setErrorMessage(errorMessage);

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEdu/DoctorJMJkEduArticleController.java

@ -147,6 +147,8 @@ public class DoctorJMJkEduArticleController extends BaseController {
            jmJkEduArticleService.initPatient(patientSet,labelUnitType,labelSexType,labelServeType,labelDiseaseType,labelHealthType,getUID(),currentRoleCode,currentRoleLevel);
//            patientSet.add(patientService.findByCode("wjw00000001000e6badcfa163e424525"));
            //获取保存发送记录
            patientSet = new HashSet<>();
            patientSet.add("915cc456-5b1d-11e6-8344-fa163e8aee56");
            HealthEduArticlePatient healthEduArticlePatient = jmJkEduArticleService.savePCPushArticle(patientSet, getUID(), 2,"", 0L, articleId,leaveWords,currentRoleCode,currentRoleLevel);
            //推送微信模板消息和发送im消息
            new Thread(() -> {

+ 19 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionExpressageController.java

@ -143,6 +143,25 @@ public class PrescriptionExpressageController extends WeixinBaseController {
        }
    }
    @RequestMapping(value = "/getPresEsList", method = RequestMethod.GET)
    @ApiOperation(value = "获取出药记录列表")
    public String getPresEsList(@ApiParam(name = "keyWord", value = "订单号,接收人,医保号或身份证") @RequestParam(required = false)String keyWord,
                                   @ApiParam(name = "state", value = "续方状态") @RequestParam(required = false)String state,
                                   @ApiParam(name = "type", value = "1 自取 2快递配送 3健管师配送") @RequestParam(required = false)String type,
                                   @ApiParam(name = "startDate", value = "开始时间yyyy-MM--dd") @RequestParam(required = false)String startDate,
                                   @ApiParam(name = "endDate", value = "结束时间yyyy-MM-dd") @RequestParam(required = false)String endDate,
                                   @ApiParam(name = "operator", value = "操作人") @RequestParam(required = false)String operator,
                                   @ApiParam(name = "flag", value = "1为异常出药,0为正常") @RequestParam(required = false)String flag,
                                   @ApiParam(name = "page", value = "页面") @RequestParam(required = true)Integer page,
                                   @ApiParam(name = "pageSize", value = "页面大小") @RequestParam(required = true)Integer pageSize){
        try {
            return write(200, "获取成功", "data", expressageService.getPresEsList(getUID(),keyWord,state,type,startDate,endDate,operator,flag,page,pageSize));
        } catch (Exception e) {
            error(e);
            return error(-1, "获取失败");
        }
    }
    @RequestMapping(value = "/getHospitalOperator", method = RequestMethod.GET)
    @ApiOperation(value = "获取操作人员下拉列表")
    public String getHospitalOperator(){

+ 3 - 3
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -101,11 +101,11 @@ pushMes:
  redis_prescription_title: redisMessage
es:
  index:
    HealthEduArticlePatient: health_edu_article_patient_test4
    HealthEduArticlePatient: health_edu_article_patient_test3
    FollowUp: wlyy_followup
    Statistics: wlyy_quota_test
  type:
    HealthEduArticlePatient: health_edu_article_patient_test4
    HealthEduArticlePatient: health_edu_article_patient_test3
    FollowUpContent: wlyy_followup_content
    Statistics: wlyy_quota_test
  host:  http://172.19.103.68:9200
@ -125,7 +125,7 @@ activemq:
  password: admin
  url: tcp://172.19.103.87:61616
  queue:
    healtHarticleQueue: healthArticleChannel_dev  #健康文章推送
    healtHarticleQueue: healthArticleChannel_devtest  #健康文章推送
##如果是外网项目就是flase 内网是true
neiwang: