Browse Source

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

yeshijie 7 years ago
parent
commit
03f01ad57c
25 changed files with 325 additions and 231 deletions
  1. 10 1
      common/common-entity/src/main/java/com/yihu/wlyy/entity/call/CallService.java
  2. 11 2
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/call/CallService.java
  3. 26 28
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java
  4. 1 1
      patient-co-manage/wlyy-manage/src/main/resources/application.yml
  5. 0 63
      patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/etl/convert/wlyy/PrescriptionAgeConvert.java
  6. 1 1
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/repository/charge/ChargeDao.java
  7. 1 1
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionPayDao.java
  8. 6 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java
  9. 14 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/family/FamilyMemberService.java
  10. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java
  11. 25 15
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java
  12. 19 36
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionFollowupContentService.java
  13. 3 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java
  14. 10 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java
  15. 112 30
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java
  16. 29 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/call/CustomerService.java
  17. 3 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java
  18. 30 28
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/weixin/wxpay/service/OnePayService.java
  19. 4 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/BaseController.java
  20. 5 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/WechatController.java
  21. 4 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/call/CallRecordController.java
  22. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultController.java
  23. 6 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/EsStatisticsController.java
  24. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/StatisticsController.java
  25. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/wx/OnePayController.java

+ 10 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/call/CallService.java

@ -31,7 +31,7 @@ public class CallService extends IdEntity {
    private Integer type; //服务类型:0.咨询,1.预约
    private Integer type; //服务类型:0.咨询,1.预约
    private Integer dealType; //处理方式:1.电话回复,2.客服回复
    private Integer dealType; //处理方式:1.电话回复,2.客服回复
    private Date dealTime; //处理时间
    private Date dealTime; //处理时间
    private Integer dealState; // 处理结果:1.完成,2.无法联系居民
    private Integer dealState; // 处理结果:1.完成,2.无法联系居民,3.预约失败
    private String dealContent; // 处理内容
    private String dealContent; // 处理内容
    private Integer dealReason; // 处理取消原因:0.没有号源、1.病人取消
    private Integer dealReason; // 处理取消原因:0.没有号源、1.病人取消
    private String orderHospital; //预约医院code
    private String orderHospital; //预约医院code
@ -41,6 +41,7 @@ public class CallService extends IdEntity {
    private String orderDoctor; //预约医生code
    private String orderDoctor; //预约医生code
    private String orderDoctorName; //预约医生名称
    private String orderDoctorName; //预约医生名称
    private String orderTime; //预约时间段
    private String orderTime; //预约时间段
    private Date registerTime; //挂号时间
    private String user; //创建人
    private String user; //创建人
    private String userName; //创建人
    private String userName; //创建人
    private Long adminTeamCode; //团队id
    private Long adminTeamCode; //团队id
@ -287,4 +288,12 @@ public class CallService extends IdEntity {
    public void setAdminTeamCode(Long adminTeamCode) {
    public void setAdminTeamCode(Long adminTeamCode) {
        this.adminTeamCode = adminTeamCode;
        this.adminTeamCode = adminTeamCode;
    }
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getRegisterTime() {
        return registerTime;
    }
    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }
}
}

+ 11 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/call/CallService.java

@ -14,7 +14,7 @@ import java.util.Date;
@Table(name = "manage_call_service")
@Table(name = "manage_call_service")
public class CallService extends IdEntity {
public class CallService extends IdEntity {
    private String code; //服务编号
    private String code; //服务编号.
    private String callCode; //关联通话记录
    private String callCode; //关联通话记录
    private String patient; //服务对象(患者code)
    private String patient; //服务对象(患者code)
    private String patientName; // 服务对象名称(患者名称)
    private String patientName; // 服务对象名称(患者名称)
@ -31,7 +31,7 @@ public class CallService extends IdEntity {
    private Integer type; //服务类型:0.咨询,1.预约
    private Integer type; //服务类型:0.咨询,1.预约
    private Integer dealType; //处理方式:1.电话回复,2.客服回复
    private Integer dealType; //处理方式:1.电话回复,2.客服回复
    private Date dealTime; //处理时间
    private Date dealTime; //处理时间
    private Integer dealState; // 处理结果:1.完成,2.无法联系居民
    private Integer dealState; // 处理结果:1.完成,2.无法联系居民,3.预约失败
    private String dealContent; // 处理内容
    private String dealContent; // 处理内容
    private Integer dealReason; // 处理取消原因:0.没有号源、1.病人取消
    private Integer dealReason; // 处理取消原因:0.没有号源、1.病人取消
    private String orderHospital; //预约医院code
    private String orderHospital; //预约医院code
@ -41,6 +41,7 @@ public class CallService extends IdEntity {
    private String orderDoctor; //预约医生code
    private String orderDoctor; //预约医生code
    private String orderDoctorName; //预约医生名称
    private String orderDoctorName; //预约医生名称
    private String orderTime; //预约时间段
    private String orderTime; //预约时间段
    private Date registerTime; //挂号时间
    private String user; //创建人
    private String user; //创建人
    private String userName; //创建人
    private String userName; //创建人
    private Long adminTeamCode; //团队id
    private Long adminTeamCode; //团队id
@ -287,4 +288,12 @@ public class CallService extends IdEntity {
    public void setAdminTeamCode(Long adminTeamCode) {
    public void setAdminTeamCode(Long adminTeamCode) {
        this.adminTeamCode = adminTeamCode;
        this.adminTeamCode = adminTeamCode;
    }
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getRegisterTime() {
        return registerTime;
    }
    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }
}
}

+ 26 - 28
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java

@ -3,6 +3,7 @@ package com.yihu.wlyy.service.manager.account;
import com.yihu.wlyy.entity.*;
import com.yihu.wlyy.entity.*;
import com.yihu.wlyy.entity.call.CallRecord;
import com.yihu.wlyy.entity.call.CallRecord;
import com.yihu.wlyy.entity.call.CallService;
import com.yihu.wlyy.entity.call.CallService;
import com.yihu.wlyy.repository.DoctorDao;
import com.yihu.wlyy.repository.MessageDao;
import com.yihu.wlyy.repository.MessageDao;
import com.yihu.wlyy.repository.PatientDao;
import com.yihu.wlyy.repository.PatientDao;
import com.yihu.wlyy.repository.UserDao;
import com.yihu.wlyy.repository.UserDao;
@ -56,6 +57,8 @@ public class CustomerService extends BaseService{
	private JdbcTemplate jdbcTemplate;
	private JdbcTemplate jdbcTemplate;
	@Autowired
	@Autowired
	private MessageDao messageDao;
	private MessageDao messageDao;
	@Autowired
	private DoctorDao doctorDao;
	@Value(("${doctorAssistant.api}")+"/wlyygc/doctor/message")
	@Value(("${doctorAssistant.api}")+"/wlyygc/doctor/message")
	private String messageApi;
	private String messageApi;
@ -408,31 +411,17 @@ public class CustomerService extends BaseService{
		callService.setUser(user);
		callService.setUser(user);
		User u = userDao.findByCode(user);
		User u = userDao.findByCode(user);
		callService.setUserName(u.getName());
		callService.setUserName(u.getName());
		//存储患者信息
		Patient p = patientDao.findByCode(callService.getCode());
		callService.setIdcard(p.getIdcard());
		callService.setSsc(p.getSsc());
		//存储医生
		SignFamily sf = familyService.findByPatientCode(callService.getPatient());
		callService.setAdminTeamCode(sf.getAdminTeamId());
		callService.setCreateTime(new Date());
		callServiceDao.save(callService);
		callServiceDao.save(callService);
		//待处理发送消息给医生
		//待处理发送消息给医生
		if(callService.getState()==1){
			Patient p = patientDao.findByCode(callService.getPatient());
			// 添加签约消息
			Message message = new Message();
			message.setCzrq(new Date());
			message.setCreateTime(new Date());
			message.setContent("您有一条新的协同服务消息!");
			message.setRead(1);//设置未读
			message.setReceiver(callService.getDoctor());//设置接受医生的code
			message.setSender(callService.getPatient());//设置发送的用户
			message.setSenderName(callService.getPatientName());
			message.setCode(getCode());
			message.setSenderPhoto(p.getPhoto());
			message.setTitle("协同服务消息");
			message.setType(12);//协同服务消息
			message.setReadonly(1);//是否只读消息
			message.setSex(p.getSex());
			message.setOver("1");//未处理
			messageDao.save(message);
		}
		sendCallServiceMes(callService,u);
		return "1";
		return "1";
	}
	}
@ -443,7 +432,12 @@ public class CustomerService extends BaseService{
		User u = userDao.findByCode(user);
		User u = userDao.findByCode(user);
		callService.setUserName(u.getName());
		callService.setUserName(u.getName());
		callServiceDao.save(callService);
		callServiceDao.save(callService);
		//待处理发送消息给医生
		sendCallServiceMes(callService,u);
		return "1";
	}
	public void sendCallServiceMes(CallService callService,User u){
		//待处理发送消息给医生
		//待处理发送消息给医生
		if(callService.getState()==1){
		if(callService.getState()==1){
			Patient p = patientDao.findByCode(callService.getPatient());
			Patient p = patientDao.findByCode(callService.getPatient());
@ -451,7 +445,12 @@ public class CustomerService extends BaseService{
			Message message = new Message();
			Message message = new Message();
			message.setCzrq(new Date());
			message.setCzrq(new Date());
			message.setCreateTime(new Date());
			message.setCreateTime(new Date());
			message.setContent("您有一条新的协同服务消息!");
			if("1".equals(callService.getType())){
				message.setContent(u.getName()+"需要预约挂号");
			}else{
				message.setContent(u.getName()+"发起咨询");
			}
			message.setRead(1);//设置未读
			message.setRead(1);//设置未读
			message.setReceiver(callService.getDoctor());//设置接受医生的code
			message.setReceiver(callService.getDoctor());//设置接受医生的code
			message.setSender(callService.getPatient());//设置发送的用户
			message.setSender(callService.getPatient());//设置发送的用户
@ -463,11 +462,10 @@ public class CustomerService extends BaseService{
			message.setReadonly(1);//是否只读消息
			message.setReadonly(1);//是否只读消息
			message.setSex(p.getSex());
			message.setSex(p.getSex());
			message.setOver("1");//未处理
			message.setOver("1");//未处理
			message.setDel("1");
			message.setRelationCode(callService.getCode());
			messageDao.save(message);
			messageDao.save(message);
		}
		}
		return "1";
	}
	}
	public Map<String,Object> getCallServices(String keyword, Integer serverType,Integer state,String patientName,String ssc,String idCard,String doctorName,String code,Integer adminTeamCode ,String startDate,String endDate,Integer page,Integer size){
	public Map<String,Object> getCallServices(String keyword, Integer serverType,Integer state,String patientName,String ssc,String idCard,String doctorName,String code,Integer adminTeamCode ,String startDate,String endDate,Integer page,Integer size){
@ -527,7 +525,7 @@ public class CustomerService extends BaseService{
			sql +=" AND (s.patient_name = '"+keyword+"' OR s.ssc ='"+keyword+"' OR s.Idcard ='"+keyword+"')";
			sql +=" AND (s.patient_name = '"+keyword+"' OR s.ssc ='"+keyword+"' OR s.Idcard ='"+keyword+"')";
		}
		}
		if(serverType!=null){
		if(serverType!=null){
			sql += " AND s.server_type ='"+serverType+"' " ;
			sql += " AND s.type ='"+serverType+"' " ;
		}
		}
		if(state != null){
		if(state != null){
			sql +=" AND s.state ='"+state+"'";
			sql +=" AND s.state ='"+state+"'";

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/resources/application.yml

@ -109,7 +109,7 @@ im-service:
yueren:
yueren:
  api: http://120.77.209.211:8080
  api: http://120.77.209.211:8080
doctorAssistant:
doctorAssistant:
  api: http://172.19.103.88:10090/wlyy
  api: http://172.19.103.88:443/assistant
wlyyService:
wlyyService:
  api: http://ehr.yihu.com/wlyy/
  api: http://ehr.yihu.com/wlyy/
image:
image:

+ 0 - 63
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/etl/convert/wlyy/PrescriptionAgeConvert.java

@ -1,63 +0,0 @@
package com.yihu.wlyy.statistics.etl.convert.wlyy;
import com.yihu.wlyy.entity.dimension.WlyyDimensionQuota;
import com.yihu.wlyy.statistics.etl.convert.Convert;
import com.yihu.wlyy.statistics.util.Contant;
import com.yihu.wlyy.statistics.util.IdCardUtil;
import com.yihu.wlyy.statistics.vo.DataModel;
import org.springframework.jdbc.core.JdbcTemplate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * Created by chenweida on 2017/6/5.
 */
public class PrescriptionAgeConvert implements Convert {
    /**
     * @param oneList    数据
     * @param slaveLevel 从1开始
     * @return
     */
    public List<DataModel> convert(JdbcTemplate jdbcTemplate, List<DataModel> oneList, String slaveLevel, WlyyDimensionQuota temp ) {
        Map<String,Object> tempMap = new HashMap<>();
        List<DataModel> result = new ArrayList<>();
        for(DataModel one:oneList) {
            try {
                Object value = one.getIdcard();
                Integer age= IdCardUtil.getAgeForIdcard(String.valueOf(value));
                String key = getAgeCode(age);
                if("63".equals(temp.getQuotaCode())){
                    if(tempMap.containsKey(String.valueOf(value))){
                        continue;
                    }
                }
                tempMap.put(String.valueOf(value),one);
                DataModel.class.getMethod("setSlaveKey" + slaveLevel, String.class).invoke(one, key);
//                result.add(one);
            } catch (Exception e) {
                e.printStackTrace();
            }
        };
        return oneList;
    }
    public String getAgeCode(Integer age) {
        if (age >= 0 && age <= 6) {
            return Contant.convert.level_age_1;
        } else if (age >= 7 && age <= 18) {
            return Contant.convert.level_age_2;
        } else if (age >= 19 && age <= 30) {
            return Contant.convert.level_age_3;
        } else if (age >= 31 && age <= 50) {
            return Contant.convert.level_age_4;
        } else if (age >= 51 && age <= 64) {
            return Contant.convert.level_age_5;
        } else {
            return Contant.convert.level_age_6;
        }
    }
}

+ 1 - 1
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/repository/charge/ChargeDao.java

@ -64,6 +64,6 @@ public interface ChargeDao extends PagingAndSortingRepository<WlyyCharge, Long>,
    List<WlyyCharge> findByTradeStatusAndMiRegisterNoAndUpdateTime(int tradestatus, Date enddate, Date startdate);
    List<WlyyCharge> findByTradeStatusAndMiRegisterNoAndUpdateTime(int tradestatus, Date enddate, Date startdate);
    //   查询当天支付,页面回调及异步回调均失败的支付 tradeStatus为空
    //   查询当天支付,页面回调及异步回调均失败的支付 tradeStatus为空
    @Query(value = "SELECT t.`code` FROM wlyy_charge t WHERE t.trade_status is null AND t.create_time >= date(now()) AND t.create_time < DATE_ADD(date(now()), INTERVAL 1 DAY)", nativeQuery = true)
    @Query(value = "SELECT t.`code` FROM wlyy_charge t WHERE t.trade_status != '0' AND t.create_time >= date(now()) AND t.create_time < DATE_ADD(date(now()), INTERVAL 1 DAY) ", nativeQuery = true)
    List<String> findTodayUnpay();
    List<String> findTodayUnpay();
}
}

+ 1 - 1
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionPayDao.java

@ -19,6 +19,6 @@ public interface PrescriptionPayDao extends PagingAndSortingRepository<Prescript
    PrescriptionPay findByCode(String code);
    PrescriptionPay findByCode(String code);
    //   查询当天支付,页面回调及异步回调均失败的支付 tradeStatus为空
    //   查询当天支付,页面回调及异步回调均失败的支付 tradeStatus为空
    @Query(value = "SELECT t.`code` FROM wlyy_prescription_pay t WHERE t.trade_status is null AND t.create_time >= date(now()) AND t.create_time < DATE_ADD(date(now()), INTERVAL 1 DAY)", nativeQuery = true)
    @Query(value = "SELECT t.`code` FROM wlyy_prescription_pay t WHERE t.trade_status != '1' AND t.create_time >= date(now()) AND t.create_time < DATE_ADD(date(now()), INTERVAL 1 DAY) ", nativeQuery = true)
    List<String> findTodayUnpay();
    List<String> findTodayUnpay();
}
}

+ 6 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -56,13 +56,13 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("update Message a set a.read = 0 where a.receiver = ?1 and a.sender=?2 and a.tzType=?3")
    @Query("update Message a set a.read = 0 where a.receiver = ?1 and a.sender=?2 and a.tzType=?3")
    int updateHealthIndexMessageByPatient(String doctor, String patient, String type);
    int updateHealthIndexMessageByPatient(String doctor, String patient, String type);
    @Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6,7) order by a.czrq desc")
    @Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6,7,12) order by a.czrq desc")
    List<Message> getSystemMessageUnread(String doctor);
    List<Message> getSystemMessageUnread(String doctor);
    @Query("select a from Message a where a.receiver = ?1 and a.prescriptionStatus=?2 and a.type in (6,7) order by a.createTime desc")
    @Query("select a from Message a where a.receiver = ?1 and a.prescriptionStatus=?2 and a.type in (6,7) order by a.createTime desc")
    List<Message> getSysTemMessageByPrescription(String doctor, String prescriptionStatus);
    List<Message> getSysTemMessageByPrescription(String doctor, String prescriptionStatus);
    @Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6,7)")
    @Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6,7,12)")
    List<Message> getSystemMessage(String doctor, Pageable pageRequest);
    List<Message> getSystemMessage(String doctor, Pageable pageRequest);
    @Query("select a from Message a where a.receiver = ?1 and a.type=?2 and a.prescriptionStatus='0' ")
    @Query("select a from Message a where a.receiver = ?1 and a.type=?2 and a.prescriptionStatus='0' ")
@ -98,9 +98,12 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("from Message a where a.type = 8 and a.state=0 and a.del='1' and a.over='0' and relationCode = ?1  ")
    @Query("from Message a where a.type = 8 and a.state=0 and a.del='1' and a.over='0' and relationCode = ?1  ")
    Message findByRelationCode(String relationCode);
    Message findByRelationCode(String relationCode);
    @Query("from Message a where a.type = 12 and a.state=0 and a.del='1' and a.over='0' and receiver = ?1  ")
    @Query("from Message a where a.type = 12 and a.del='1' and a.over='1' and receiver = ?1  ")
    List<Message> findByReceiverCallService(String doctor);
    List<Message> findByReceiverCallService(String doctor);
    @Query("select a from Message a where a.receiver = ?1 and a.type=?2 ")
    @Query("select a from Message a where a.receiver = ?1 and a.type=?2 ")
    List<Message> getMessageByType(String doctor, Integer type, Pageable pageRequest);
    List<Message> getMessageByType(String doctor, Integer type, Pageable pageRequest);
    @Query("from Message a where a.type = 12 and a.del='1' and a.over='1' and relationCode = ?1  ")
    List<Message> findByCallServiceRelationCode(String relationCode);
}
}

+ 14 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/family/FamilyMemberService.java

@ -163,12 +163,17 @@ public class FamilyMemberService extends BaseService {
        memberDao.save(fm);
        memberDao.save(fm);
        memberDao.save(fmt);
        memberDao.save(fmt);
        //设置家人openid
        if(StringUtils.isBlank(m.getOpenid())){
        //设置家人openid 加入undefined 判断
        if(!"undefined".equals(m.getOpenid())&&StringUtils.isNotBlank(m.getOpenid())){
            m.setOpenid(p.getOpenid());
            m.setOpenid(p.getOpenid());
            m.setOpenidTime(new Date());
            m.setOpenidTime(new Date());
            patientDao.save(m);
            patientDao.save(m);
        }
        }
//        if(StringUtils.isBlank(m.getOpenid())){
//            m.setOpenid(p.getOpenid());
//            m.setOpenidTime(new Date());
//            patientDao.save(m);
//        }
        return 1;
        return 1;
    }
    }
@ -1130,12 +1135,18 @@ public class FamilyMemberService extends BaseService {
        memberDao.save(fmt);
        memberDao.save(fmt);
        //设置家人openid
        //设置家人openid
        if(StringUtils.isBlank(m.getOpenid())){
        if(!"undefined".equals(m.getOpenid())&&StringUtils.isNotBlank(m.getOpenid())){
            m.setOpenid(p.getOpenid());
            m.setOpenid(p.getOpenid());
            m.setOpenidTime(new Date());
            m.setOpenidTime(new Date());
            patientDao.save(m);
            patientDao.save(m);
        }
        }
//        if(StringUtils.isBlank(m.getOpenid())){
//            m.setOpenid(p.getOpenid());
//            m.setOpenidTime(new Date());
//            patientDao.save(m);
//        }
        return 1;
        return 1;
    }
    }

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java

@ -469,6 +469,7 @@ public class PatientHealthIndexService extends BaseService {
            message.setTitle("预警值信息");
            message.setTitle("预警值信息");
            message.setContent(content);
            message.setContent(content);
            message.setType(2);
            message.setType(2);
            message.setDel("1");
            message.setValue1(Double.valueOf(model.getValue1()));
            message.setValue1(Double.valueOf(model.getValue1()));
            message.setValue2(Double.valueOf(model.getValue2()));
            message.setValue2(Double.valueOf(model.getValue2()));
            message.setTzCode(String.valueOf(model.getId()));//消息关联的体征id
            message.setTzCode(String.valueOf(model.getId()));//消息关联的体征id

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

@ -10,8 +10,11 @@ import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.prescription.*;
import com.yihu.wlyy.repository.prescription.*;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.ElasticsearchUtil;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
@ -27,6 +30,8 @@ import java.util.*;
@Service
@Service
@Transactional
@Transactional
public class PrescriptionExpressageService extends BaseService {
public class PrescriptionExpressageService extends BaseService {
    private Logger logger = LoggerFactory.getLogger(ElasticsearchUtil.class);
    @Autowired
    @Autowired
    private PrescriptionExpressageDao prescriptionExpressageDao;
    private PrescriptionExpressageDao prescriptionExpressageDao;
    @Autowired
    @Autowired
@ -559,23 +564,28 @@ public class PrescriptionExpressageService extends BaseService {
            prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.finish.getValue());
            prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.finish.getValue());
            prescriptionLogDao.save(prescriptionLog);
            prescriptionLogDao.save(prescriptionLog);
            //更新二维码(isUse)
            PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeDao.finByCode(prescriptionCode);
            if(prescriptionDispensaryCode!=null){
                //修改取药码code为已经使用
                prescriptionDispensaryCode.setIsUse(1);
                prescriptionDispensaryCodeDao.save(prescriptionDispensaryCode);
            try {
                //更新二维码(isUse)
                PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeDao.finByCode(prescriptionCode);
                if(prescriptionDispensaryCode!=null){
                    //修改取药码code为已经使用
                    prescriptionDispensaryCode.setIsUse(1);
                    prescriptionDispensaryCodeDao.save(prescriptionDispensaryCode);
                    //更新配送信息
                    PrescriptionExpressage prescriptionExpressage = prescriptionExpressageDao.findByPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
                    if(prescriptionExpressage!=null){
                        prescriptionExpressage.setHospitalDoctor(doctor);
                        prescriptionExpressage.setHospitalDoctorCode(d.getCode());
                        prescriptionExpressage.setFetchingMedicineTime(new Date());
                        prescriptionExpressageDao.save(prescriptionExpressage);
                    }
                }
            }catch (Exception e){
                logger.info("更新二维码(isUse),更新配送信息 异常:"+e.getMessage());
            }
            }
            //更新配送信息
            PrescriptionExpressage prescriptionExpressage = prescriptionExpressageDao.findByPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
            if(prescriptionExpressage!=null){
                prescriptionExpressage.setHospitalDoctor(doctor);
                prescriptionExpressage.setHospitalDoctorCode(d.getCode());
                prescriptionExpressage.setFetchingMedicineTime(new Date());
                prescriptionExpressageDao.save(prescriptionExpressage);
            }
            return "1";
            return "1";
        }
        }
        return "0";
        return "0";

+ 19 - 36
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionFollowupContentService.java

@ -328,45 +328,28 @@ public class PrescriptionFollowupContentService extends BaseService {
			
			
			//餐前
			//餐前
			if(StringUtils.isNotBlank(obj.getString("value1"))){
			if(StringUtils.isNotBlank(obj.getString("value1"))){
				followupProjectData = "{'BS_FPG':'"+obj.getString("value1")+"'}";
				
				
				Integer valueType = obj.getInteger("value2");
				
				//餐前
				if(1 == valueType || 3 == valueType || 5 == valueType){
					followupProjectData = "{'BS_FPG':'"+obj.getString("value1")+"'}";
				}
				
				//参后
				if(2 == valueType || 4 == valueType || 6 == valueType){
					followupProjectData = "{'NO_BS_FPG':'"+obj.getString("value1")+"'}";
				}
				
				//睡前-随机血糖
				if(7 == valueType ){
					followupProjectData = "{'RANDOM_BLOOD_SUGAR':'"+obj.getString("value1")+"'}";
				}
				
				imBloodSugarValue = obj.getString("value1");
				imBloodSugarValue = obj.getString("value1");
			}
			}
			
			
			if(StringUtils.isNotBlank(obj.getString("value3"))){
				followupProjectData = "{'BS_FPG':'"+obj.getString("value3")+"'}";
				imBloodSugarValue = obj.getString("value3");
			}
			
			if(StringUtils.isNotBlank(obj.getString("value5"))){
				followupProjectData = "{'BS_FPG':'"+obj.getString("value5")+"'}";
				imBloodSugarValue = obj.getString("value5");
			}
			//餐后
			if(StringUtils.isNotBlank(obj.getString("value2"))){
				followupProjectData = "{'NO_BS_FPG':'"+obj.getString("value2")+"'}";
				imBloodSugarValue = obj.getString("value2");
			}
			
			
			if(StringUtils.isNotBlank(obj.getString("value4"))){
				followupProjectData = "{'NO_BS_FPG':'"+obj.getString("value4")+"'}";
				imBloodSugarValue = obj.getString("value4");
			}
			
			if(StringUtils.isNotBlank(obj.getString("value6"))){
				followupProjectData = "{'NO_BS_FPG':'"+obj.getString("value6")+"'}";
				imBloodSugarValue = obj.getString("value6");
			}
			
			//随机血糖
			if(StringUtils.isNotBlank(obj.getString("value7"))){
				followupProjectData = "{'RANDOM_BLOOD_SUGAR':'"+obj.getString("value7")+"'}";
				imBloodSugarValue = obj.getString("value7");
			}
			
			
			
			
			FollowupContentESDO followupContentESDO = followUpService.esGetFollowupProjectData(followup_id,"3");
			FollowupContentESDO followupContentESDO = followUpService.esGetFollowupProjectData(followup_id,"3");
			
			
			if(followupContentESDO == null){
			if(followupContentESDO == null){

+ 3 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -557,7 +557,9 @@ public class FamilyContractService extends BaseService {
            p.setTown(town);
            p.setTown(town);
            p.setTownName(townName);
            p.setTownName(townName);
            p.setAddress(address);
            p.setAddress(address);
            p.setOpenid(openid);
            if(!"undefined".equals(openid)&&StringUtils.isNotBlank(openid)){
                p.setOpenid(openid);
            }
            p.setOpenidTime(new Date());
            p.setOpenidTime(new Date());
            p.setIdcard(idcard);
            p.setIdcard(idcard);
            p.setMobile(mobile);
            p.setMobile(mobile);

+ 10 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -2609,6 +2609,7 @@ public class StatisticsService extends BaseService {
                    " AND c.patient = s.id " +
                    " AND c.patient = s.id " +
                    " AND t. STATUS <> 10 " +
                    " AND t. STATUS <> 10 " +
                    " AND t.`reply` = 0 " +
                    " AND t.`reply` = 0 " +
                    " AND c.type = 2 "+
                    " AND p.session_id = t.session_id " +
                    " AND p.session_id = t.session_id " +
                    " AND d.id ='" + doctor + "'" +
                    " AND d.id ='" + doctor + "'" +
                    " AND c.admin_team_code = " + teamCode +
                    " AND c.admin_team_code = " + teamCode +
@ -2631,6 +2632,7 @@ public class StatisticsService extends BaseService {
                    " AND p.session_id = t.session_id " +
                    " AND p.session_id = t.session_id " +
                    " AND d.id ='" + doctor + "'" +
                    " AND d.id ='" + doctor + "'" +
                    " AND c.admin_team_code = " + teamCode +
                    " AND c.admin_team_code = " + teamCode +
                    " AND c.type = 2 "+
                    " AND t.create_time >= '" + startDate + "' " +
                    " AND t.create_time >= '" + startDate + "' " +
                    " AND t.create_time <= '" + endDate + "' " +
                    " AND t.create_time <= '" + endDate + "' " +
                    " GROUP BY dateNo";
                    " GROUP BY dateNo";
@ -2654,6 +2656,7 @@ public class StatisticsService extends BaseService {
                    "  AND d.id ='" + doctor + "'" +
                    "  AND d.id ='" + doctor + "'" +
                    "  AND t. STATUS <> 10  " +
                    "  AND t. STATUS <> 10  " +
                    "  AND t.`reply` = 0  " +
                    "  AND t.`reply` = 0  " +
                    "  AND c.type = 2 "+
                    "  AND t.create_time >= '" + startDate + "' " +
                    "  AND t.create_time >= '" + startDate + "' " +
                    "  AND t.create_time <= '" + endDate + "' " +
                    "  AND t.create_time <= '" + endDate + "' " +
                    "  GROUP BY weekOfMonth";
                    "  GROUP BY weekOfMonth";
@ -2673,6 +2676,7 @@ public class StatisticsService extends BaseService {
                    "  AND p.session_id = t.session_id " +
                    "  AND p.session_id = t.session_id " +
                    "  AND d.id ='" + doctor + "'" +
                    "  AND d.id ='" + doctor + "'" +
                    "  AND c.admin_team_code = " + teamCode +
                    "  AND c.admin_team_code = " + teamCode +
                    "  AND c.type = 2 "+
                    "  AND t.create_time >= '" + startDate + "' " +
                    "  AND t.create_time >= '" + startDate + "' " +
                    "  AND t.create_time <= '" + endDate + "' " +
                    "  AND t.create_time <= '" + endDate + "' " +
                    "  GROUP BY weekOfMonth";
                    "  GROUP BY weekOfMonth";
@ -2928,6 +2932,7 @@ public class StatisticsService extends BaseService {
                " AND c.patient = s.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND p.session_id = t.session_id " +
                " AND c.type <> 8"+
                " AND c.type <> 8"+
                " AND c.type = 2"+
                " AND c.admin_team_code =" + teamCode +
                " AND c.admin_team_code =" + teamCode +
                " AND d.id='" + doctor + "'" +
                " AND d.id='" + doctor + "'" +
                " AND t.create_time <= '" + endDate + "'";
                " AND t.create_time <= '" + endDate + "'";
@ -2946,6 +2951,7 @@ public class StatisticsService extends BaseService {
                " AND c.patient = s.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND p.session_id = t.session_id " +
                " AND c.type <> 8"+
                " AND c.type <> 8"+
                " AND c.type = 2"+
                " AND t.`reply`=1 " +
                " AND t.`reply`=1 " +
                " AND c.admin_team_code =" + teamCode +
                " AND c.admin_team_code =" + teamCode +
                " AND d.id='" + doctor + "'" +
                " AND d.id='" + doctor + "'" +
@ -2966,6 +2972,7 @@ public class StatisticsService extends BaseService {
                " AND c.patient = s.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND p.session_id = t.session_id " +
                " AND c.type <> 8"+
                " AND c.type <> 8"+
                " AND c.type = 2"+
                " AND c.admin_team_code =" + teamCode +
                " AND c.admin_team_code =" + teamCode +
                " AND d.id='" + doctor + "'" +
                " AND d.id='" + doctor + "'" +
                " AND t.create_time >= '" + startDate + "' " +
                " AND t.create_time >= '" + startDate + "' " +
@ -2985,6 +2992,7 @@ public class StatisticsService extends BaseService {
                " AND c.patient = s.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND p.session_id = t.session_id " +
                " AND c.type <> 8"+
                " AND c.type <> 8"+
                " AND c.type = 2"+
                " AND t. STATUS <> 10  " +
                " AND t. STATUS <> 10  " +
                " AND t.`reply` = 0  " +
                " AND t.`reply` = 0  " +
                " AND c.admin_team_code =" + teamCode +
                " AND c.admin_team_code =" + teamCode +
@ -4093,7 +4101,8 @@ public class StatisticsService extends BaseService {
                " w.admin_team_code =" + teamCode +
                " w.admin_team_code =" + teamCode +
                " AND w.doctor ='" + doctor + "'" +
                " AND w.doctor ='" + doctor + "'" +
                " AND w.czrq <= '" + endDate + "' " +
                " AND w.czrq <= '" + endDate + "' " +
                " AND w.czrq >= '" + startDate + "'";
                " AND w.czrq >= '" + startDate + "'"+
                " GROUP BY w.batch_no";
        List<Map<String, Object>> totalList = jdbcTemplate.queryForList(totalSql);
        List<Map<String, Object>> totalList = jdbcTemplate.queryForList(totalSql);
        List<Map<String, Object>> addList = jdbcTemplate.queryForList(addSql);
        List<Map<String, Object>> addList = jdbcTemplate.queryForList(addSql);
        JSONObject rs = new JSONObject();
        JSONObject rs = new JSONObject();

+ 112 - 30
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java

@ -449,8 +449,13 @@ public class StatisticsESService {
        //已缴费
        //已缴费
        SaveModel paidSaveModel = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, area, level, "1", "2");
        SaveModel paidSaveModel = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, area, level, "1", "2");
        //未交费
        //未交费
        SaveModel noPaySaveModel = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, area, level, "14", "2");
        SaveModel noPaySaveModel =null;
        //因为14的指标 16年度是分为 已缴费 未交费 已退费  17年度过后就只有未交费  所以16年度用1级指标 17年度用0级指标
        if("2017-06-30".equals(endDate)){
             noPaySaveModel = elasticsearchUtil.findOneDateQuotaLevel1(endDate, endDate, area, level, "14", "2","0");
        }else{
            noPaySaveModel = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, area, level, "14", "2");
        }
        List<Map<String, Object>> resultList = new ArrayList<>();
        List<Map<String, Object>> resultList = new ArrayList<>();
        DecimalFormat df = new DecimalFormat("0.0000");
        DecimalFormat df = new DecimalFormat("0.0000");
        long paidTotal = paidSaveModel.getResult2().longValue();
        long paidTotal = paidSaveModel.getResult2().longValue();
@ -1205,7 +1210,7 @@ public class StatisticsESService {
        if (date.compareTo(dateFormat.format(new Date())) >= 0) {
        if (date.compareTo(dateFormat.format(new Date())) >= 0) {
            date = elasticsearchUtil.getQuotaTime();
            date = elasticsearchUtil.getQuotaTime();
        }
        }
        List<SaveModel> esModelList = (List<SaveModel>) elasticsearchUtil.findListDateQuotaLevel1(date, area, level, index, SaveModel.timeLevel_DDL, low_level, low_level);
        List<SaveModel> esModelList = elasticsearchUtil.findListDateQuotaLevel1(date, area, level, index, SaveModel.timeLevel_DDL,lowLevel, lowCode);
        //esModelList=elasticsearchUtil.findDateQuotaLevel1(date,date,area,level,index,SaveModel.timeLevel_DDL,1,lowCode,"",low_level);
        //esModelList=elasticsearchUtil.findDateQuotaLevel1(date,date,area,level,index,SaveModel.timeLevel_DDL,1,lowCode,"",low_level);
        if (esModelList != null && esModelList.size() > 0) {
        if (esModelList != null && esModelList.size() > 0) {
            for (SaveModel one : esModelList) {
            for (SaveModel one : esModelList) {
@ -2276,6 +2281,66 @@ public class StatisticsESService {
        return resultMaps;
        return resultMaps;
    }
    }
    /**
     * 团队报告团队详情中健康教育折线图
     * @param teamCode
     * @param startDate
     * @param endDate
     * @param type
     * @return
     */
    public JSONArray getTeamEduLine(String teamCode, String startDate, String endDate, String type)throws Exception {
        startDate = startDate + " 00:00:00";
        endDate = endDate + " 23:59:59";
        List<Map<String,Object>> dateList = DateUtil.findDates(dateFormat.parse(startDate),dateFormat.parse(endDate));
        Integer interval = Integer.parseInt(type) + 1;
        List<SaveModel> articleCountList = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate,endDate,teamCode,Integer.valueOf(SaveModel.teamLevel),"59",SaveModel.timeLevel_ZL,String.valueOf(interval));
        List<SaveModel> batchNoCountList = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate,endDate,teamCode,Integer.valueOf(SaveModel.teamLevel),"71",SaveModel.timeLevel_ZL,String.valueOf(interval));
        List<Map<String, Object>> list = new ArrayList<>();
        if(articleCountList!=null){
            //循环人数集合
            for (SaveModel one1:articleCountList){
                String date = "";
                if(one1.getQuotaDate()!=null){
                    date=dateFormat.format(one1.getQuotaDate());
                }
                if (one1.getResult2().intValue()!=0){
                    Map<String,Object> map = new HashedMap();
                    map.put("articleCount",one1.getResult2().intValue());
                    //查看批次集合里是否有同时间的数据
                    for (SaveModel one2:batchNoCountList) {
                        if (one2.getQuotaDate()!=null && dateFormat.format(one2.getQuotaDate()).equals(date)){
                            map.put("batchCount",one2.getResult2().intValue());
                        }
                    }
                    if ("0".equals(type)) {
                        map.put("dateNo",date);
                    } else {
                        map.put("weekOfMonth", DateUtil.getWeekOfMonth(date));
                    }
                    list.add(map);
                }else{
                    //循环批次
                    for (SaveModel one2:batchNoCountList) {
                        if (one2.getResult2().intValue()!=0 && one2.getQuotaDate()!=null && dateFormat.format(one2.getQuotaDate()).equals(date)){
                            Map<String,Object> map = new HashedMap();
                            map.put("articleCount",0);
                            map.put("batchCount",one2.getResult2().intValue());
                            if ("0".equals(type)) {
                                map.put("dateNo",dateFormat.format(date));
                            } else {
                                map.put("weekOfMonth", DateUtil.getWeekOfMonth(date));
                            }
                            list.add(map);
                        }
                    }
                }
            }
        }
        return new JSONArray(list);
    }
    public JSONObject getRenewPercentAndChangePercent(String index, Integer level, String area, String year, String lowCode) {
    public JSONObject getRenewPercentAndChangePercent(String index, Integer level, String area, String year, String lowCode) {
        JSONObject jo = new JSONObject();
        JSONObject jo = new JSONObject();
        String switchIndex = "";//转签index
        String switchIndex = "";//转签index
@ -2569,8 +2634,7 @@ public class StatisticsESService {
            renewSaveModels = elasticsearchUtil.findDateQuotaLevel0(timeKey, timeKey, area, level, index, "2", "", low_level);
            renewSaveModels = elasticsearchUtil.findDateQuotaLevel0(timeKey, timeKey, area, level, index, "2", "", low_level);
        } else {
        } else {
            //续签量
            //续签量
            renewSaveModels = elasticsearchUtil.findDateQuotaLevel1(DateUtil.getNextDay(new Date(), -1), DateUtil.getNextDay(new Date(), -1), area, level, index, "2", lowCode, "", low_level);
            //renewSaveModels = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index, "2",1,lowCode,"",low_level);
            renewSaveModels = elasticsearchUtil.findDateQuotaLevel1(timeKey,timeKey, area, level, index, "2", lowCode, "", low_level);
        }
        }
@ -2946,7 +3010,7 @@ public class StatisticsESService {
                if ("0".equals(type)) {
                if ("0".equals(type)) {
                    map.put("dateNo",dateFormat.format(one.getQuotaDate()));
                    map.put("dateNo",dateFormat.format(one.getQuotaDate()));
                } else {
                } else {
                    map.put("dateNo", dateFormat.format(one.getQuotaDate()));
                    map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                }
                }
                map.put("noRely", one.getResult2().longValue());
                map.put("noRely", one.getResult2().longValue());
                noReyList.add(map);
                noReyList.add(map);
@ -2973,7 +3037,7 @@ public class StatisticsESService {
    }
    }
    /**
    /**
     * 获取团队随访量折线统计图(弃用)
     * 获取团队随访量折线统计图
     *
     *
     * @param type
     * @param type
     * @param teamCode
     * @param teamCode
@ -2983,11 +3047,12 @@ public class StatisticsESService {
     */
     */
    public JSONObject getTeamFollowupLine(String teamCode, String startDate, String endDate, String type) throws Exception {
    public JSONObject getTeamFollowupLine(String teamCode, String startDate, String endDate, String type) throws Exception {
        Integer interval = Integer.parseInt(type) + 2;
        List<SaveModel> list = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, teamCode, Integer.parseInt(SaveModel.teamLevel), "4", "2", interval + "");
        Integer interval = Integer.parseInt(type) + 1;
        List<SaveModel> list1 = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, teamCode, Integer.parseInt(SaveModel.teamLevel), "69", SaveModel.timeLevel_ZL, interval + "");
        List<SaveModel> list2 = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, teamCode, Integer.parseInt(SaveModel.teamLevel), "70", SaveModel.timeLevel_ZL, interval + "");
        Map<String, Object> map = null;
        Map<String, Object> map = null;
        List<Map<String, Object>> totalList = new ArrayList<>();
        List<Map<String, Object>> totalList = new ArrayList<>();
        for (SaveModel one : list) {
        for (SaveModel one : list1) {
            map = new HashMap<>();
            map = new HashMap<>();
            if ("0".equals(type)) {
            if ("0".equals(type)) {
                map.put("dateNo", dateFormat.format(one.getQuotaDate()));
                map.put("dateNo", dateFormat.format(one.getQuotaDate()));
@ -2997,8 +3062,21 @@ public class StatisticsESService {
            map.put("followupCount", one.getResult2().longValue());
            map.put("followupCount", one.getResult2().longValue());
            totalList.add(map);
            totalList.add(map);
        }
        }
        return null;
        List<Map<String, Object>> planList = new ArrayList<>();
        for (SaveModel one : list2) {
            map = new HashMap<>();
            if ("0".equals(type)) {
                map.put("dateNo", dateFormat.format(one.getQuotaDate()));
            } else {
                map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
            }
            map.put("planCount", one.getResult2().longValue());
            planList.add(map);
        }
        JSONObject result = new JSONObject();
        result.put("planList", planList);
        result.put("totalList", totalList);
        return result;
    }
    }
    /**
    /**
@ -3014,19 +3092,21 @@ public class StatisticsESService {
        startDate = elasticsearchUtil.changeTime(startDate + " 00:00:00");
        startDate = elasticsearchUtil.changeTime(startDate + " 00:00:00");
        endDate = elasticsearchUtil.changeTime(endDate + " 23:59:59");
        endDate = elasticsearchUtil.changeTime(endDate + " 23:59:59");
        Integer interval = Integer.parseInt(type) + 2;
        List<SaveModel> list = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, teamCode, Integer.parseInt(SaveModel.teamLevel), "27", "2", interval + "");
        Integer interval = Integer.parseInt(type) + 1;
        List<SaveModel> list = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, teamCode, Integer.parseInt(SaveModel.teamLevel), "27", SaveModel.timeLevel_ZL, interval + "");
        Map<String, Object> map = null;
        Map<String, Object> map = null;
        List<Map<String, Object>> totalList = new ArrayList<>();
        List<Map<String, Object>> totalList = new ArrayList<>();
        for (SaveModel one : list) {
        for (SaveModel one : list) {
            map = new HashMap<>();
            if ("0".equals(type)) {
                map.put("dateNo", dateFormat.format(one.getQuotaDate()));
            } else {
                map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
            if (one.getResult2().intValue()!=0){
                map = new HashMap<>();
                if ("0".equals(type)) {
                    map.put("dateNo", dateFormat.format(one.getQuotaDate()));
                } else {
                    map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                }
                map.put("reservationCount", one.getResult2().longValue());
                totalList.add(map);
            }
            }
            map.put("reservationCount", one.getResult2().longValue());
            totalList.add(map);
        }
        }
        return new JSONArray(totalList);
        return new JSONArray(totalList);
    }
    }
@ -3192,19 +3272,21 @@ public class StatisticsESService {
        startDate = elasticsearchUtil.changeTime(startDate + " 00:00:00");
        startDate = elasticsearchUtil.changeTime(startDate + " 00:00:00");
        endDate = elasticsearchUtil.changeTime(endDate + " 23:59:59");
        endDate = elasticsearchUtil.changeTime(endDate + " 23:59:59");
        Integer interval = Integer.parseInt(type) + 2;
        List<SaveModel> list = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, teamCode, Integer.parseInt(SaveModel.teamLevel), "5", "2", interval + "");
        Integer interval = Integer.parseInt(type) + 1;
        List<SaveModel> list = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, teamCode, Integer.parseInt(SaveModel.teamLevel), "5", SaveModel.timeLevel_ZL, interval + "");
        Map<String, Object> map = null;
        Map<String, Object> map = null;
        List<Map<String, Object>> totalList = new ArrayList<>();
        List<Map<String, Object>> totalList = new ArrayList<>();
        for (SaveModel one : list) {
        for (SaveModel one : list) {
            map = new HashMap<>();
            if ("0".equals(type)) {
                map.put("dateNo", dateFormat.format(one.getQuotaDate()));
            } else {
                map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
            if (one.getResult2().intValue()!=0){
                map = new HashMap<>();
                if ("0".equals(type)) {
                    map.put("dateNo", dateFormat.format(one.getQuotaDate()));
                } else {
                    map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                }
                map.put("guidanceCount", one.getResult2().longValue());
                totalList.add(map);
            }
            }
            map.put("guidanceCount", one.getResult2().longValue());
            totalList.add(map);
        }
        }
        return new JSONArray(totalList);
        return new JSONArray(totalList);
    }
    }

+ 29 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/call/CustomerService.java

@ -1,5 +1,6 @@
package com.yihu.wlyy.service.call;
package com.yihu.wlyy.service.call;
import com.alibaba.fastjson.JSONArray;
import com.yihu.wlyy.entity.call.CallRecord;
import com.yihu.wlyy.entity.call.CallRecord;
import com.yihu.wlyy.entity.call.CallService;
import com.yihu.wlyy.entity.call.CallService;
import com.yihu.wlyy.entity.message.Message;
import com.yihu.wlyy.entity.message.Message;
@ -46,13 +47,12 @@ public class CustomerService extends BaseService{
				" s.create_time AS createTime, " +
				" s.create_time AS createTime, " +
				" s.user, " +
				" s.user, " +
				" s.user_name AS userName ," +
				" s.user_name AS userName ," +
				" s.create_Time AS createTime ," +
				" p.sex," +
				" p.sex," +
				" p.photo," +
				" p.photo," +
				" TIMESTAMPDIFF(YEAR,p.birthday,SYSDATE()) age" +
				" TIMESTAMPDIFF(YEAR,p.birthday,SYSDATE()) age" +
				" FROM " +
				" FROM " +
				" manage_call_service s " +
				" manage_call_service s " +
				" LEFT JOIN wlyy_patient p ON s.code = s.patient" +
				" LEFT JOIN wlyy_patient p ON p.code = s.patient" +
				" WHERE " +
				" WHERE " +
				" s.state >0 ";
				" s.state >0 ";
		if(StringUtils.isNotBlank(keyword)){
		if(StringUtils.isNotBlank(keyword)){
@ -116,6 +116,13 @@ public class CustomerService extends BaseService{
		CallService callService = callServiceDao.findByCode(code);
		CallService callService = callServiceDao.findByCode(code);
		CallRecord callRecord = callRecordDao.findByCode(callService.getCallCode());
		CallRecord callRecord = callRecordDao.findByCode(callService.getCallCode());
		Map<String,Object> rs = new HashedMap();
		Map<String,Object> rs = new HashedMap();
		String id = callRecord.getIdcard();
		if(StringUtils.isNotBlank(id)){
			String idCard = id.substring(0,id.length()-10)+"*******"+id.substring(id.length()-2,id.length());
			callRecord.setIdcard(idCard);
			callService.setIdcard(idCard);
		}
		rs.put("callService",callService);
		rs.put("callService",callService);
		rs.put("callRecord",callRecord);
		rs.put("callRecord",callRecord);
		return rs;
		return rs;
@ -129,6 +136,15 @@ public class CustomerService extends BaseService{
		 callService.setDealTime(new Date());
		 callService.setDealTime(new Date());
		 callService.setState(2);
		 callService.setState(2);
		 callServiceDao.save(callService);
		 callServiceDao.save(callService);
		List<Message> mes = messageDao.findByCallServiceRelationCode(code);
		if(mes!=null&&mes.size()>0){
			for(Message m :mes){
				m.setOver("0");
				m.setRead(0);
				messageDao.save(m);
			}
		}
		return "1";
		return "1";
	}
	}
@ -145,7 +161,7 @@ public class CustomerService extends BaseService{
	 * @param orderHospital
	 * @param orderHospital
     * @return
     * @return
     */
     */
	public String dealAppointCallService(String type ,String code,Integer dealReason,String dealContent, String orderHospital,String orderHospitalName,String orderDept,String orderDeptName,String orderDoctor,String orderDoctorName,String orderTime){
	public String dealAppointCallService(String type ,String code,Integer dealReason,String dealContent, String orderHospital,String orderHospitalName,String orderDept,String orderDeptName,String orderDoctor,String orderDoctorName,String orderTime,String registerTime){
		CallService cs = callServiceDao.findByCode(code);
		CallService cs = callServiceDao.findByCode(code);
		//预约成功
		//预约成功
		if("1".equals(type)){
		if("1".equals(type)){
@ -158,6 +174,7 @@ public class CustomerService extends BaseService{
			cs.setOrderHospitalName(orderHospitalName);
			cs.setOrderHospitalName(orderHospitalName);
			cs.setOrderTime(orderTime);
			cs.setOrderTime(orderTime);
			cs.setDealTime(new Date());
			cs.setDealTime(new Date());
			cs.setRegisterTime(new Date());
			cs.setDealState(1);
			cs.setDealState(1);
		//预约失败
		//预约失败
		}else{
		}else{
@ -168,6 +185,15 @@ public class CustomerService extends BaseService{
			cs.setDealContent(dealContent);
			cs.setDealContent(dealContent);
		}
		}
		callServiceDao.save(cs);
		callServiceDao.save(cs);
		List<Message> mes = messageDao.findByCallServiceRelationCode(code);
		if(mes!=null&&mes.size()>0){
			for(Message m :mes){
				m.setOver("0");
				m.setRead(0);
				messageDao.save(m);
			}
		}
		return "1";
		return "1";
	}
	}
}
}

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

@ -142,7 +142,9 @@ public class PatientService extends TokenService {
            patient.setOpenidTime(new Date());
            patient.setOpenidTime(new Date());
        }
        }
        //System.out.println("========openid=======");
        //System.out.println("========openid=======");
        patient.setOpenid(openid);
        if(!"undefined".equals(openid)&&StringUtils.isNotBlank(openid)){
            patient.setOpenid(openid);
        }
        Patient ps = patientDao.save(patient);
        Patient ps = patientDao.save(patient);
        System.out.print(new JSONObject(ps));
        System.out.print(new JSONObject(ps));
        if (StringUtils.isNotEmpty(patient.getOpenid())) {
        if (StringUtils.isNotEmpty(patient.getOpenid())) {

+ 30 - 28
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/weixin/wxpay/service/OnePayService.java

@ -82,33 +82,33 @@ public class OnePayService {
    /**
    /**
     * 查询绑卡信息(本人)
     * 查询绑卡信息(本人)
     */
     */
    public BindCard bindCard(String patient, String openid) throws Exception {
        BindCard card = ownerCard(openid);
        //更新患者信息
        if (card != null) {
            Patient p = patientDao.findByCode(patient);
            p.setOpenid(openid);
            p.setSsc(card.getAttachCardNo());
//            增加绑定电子社保卡信息
            p.setSicardStatus(1);
            if (p.getSicardTime() == null) {
                p.setSicardTime(new Date());
            }
            ;
            if (card.getAttachIdType() == "01")      //身份证
            {
                p.setIdcard(card.getAttachIdNo());
            }
            if (!card.getAttachName().equals(p.getName())) {
                System.out.print("姓名不一致,姓名:" + p.getName() + "  社保姓名:" + card.getAttachName());
            }
            patientDao.save(p);
        }
        return card;
    }
//    public BindCard bindCard(String patient, String openid) throws Exception {
//        BindCard card = ownerCard(openid);
//
//        //更新患者信息
//        if (card != null) {
//            Patient p = patientDao.findByCode(patient);
//            p.setOpenid(openid);
//            p.setSsc(card.getAttachCardNo());
////            增加绑定电子社保卡信息
//            p.setSicardStatus(1);
//            if (p.getSicardTime() == null) {
//                p.setSicardTime(new Date());
//            }
//            ;
//            if (card.getAttachIdType() == "01")      //身份证
//            {
//                p.setIdcard(card.getAttachIdNo());
//            }
//            if (!card.getAttachName().equals(p.getName())) {
//                System.out.print("姓名不一致,姓名:" + p.getName() + "  社保姓名:" + card.getAttachName());
//            }
//
//            patientDao.save(p);
//        }
//
//        return card;
//    }
    /**
    /**
     * 查询绑卡信息(本人)
     * 查询绑卡信息(本人)
@ -694,7 +694,9 @@ public class OnePayService {
                //保存到患者表
                //保存到患者表
                Patient p = patientDao.findByCode(patient);
                Patient p = patientDao.findByCode(patient);
                p.setOpenid(openid);
                if(!"undefined".equals(openid)&&StringUtils.isNotBlank(openid)){
                    p.setOpenid(openid);
                }
//            增加绑定电子社保卡信息
//            增加绑定电子社保卡信息
                if (!"1".equals(p.getSicardStatus())){
                if (!"1".equals(p.getSicardStatus())){
                    p.setSicardTime(new Date());
                    p.setSicardTime(new Date());

+ 4 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/BaseController.java

@ -16,6 +16,7 @@ import org.springframework.util.ReflectionUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Field;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.*;
@ApiResponses(value = {
@ApiResponses(value = {
@ -255,10 +256,12 @@ public class BaseController {
        try {
        try {
            Map<Object, Object> map = new HashMap<Object, Object>();
            Map<Object, Object> map = new HashMap<Object, Object>();
            ObjectMapper mapper = new ObjectMapper();
            ObjectMapper mapper = new ObjectMapper();
            mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
            map.put("status", code);
            map.put("status", code);
            map.put("msg", msg);
            map.put("msg", msg);
            map.put(key, list);
            map.put(key, list);
            return mapper.writeValueAsString(map);
            String s = mapper.writeValueAsString(map);
            return s;
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            error(e);
            return error(-1, "服务器异常,请稍候再试!");
            return error(-1, "服务器异常,请稍候再试!");

+ 5 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/WechatController.java

@ -278,10 +278,14 @@ public class WechatController extends WeixinBaseController {
            password = StringUtils.reverse(password);
            password = StringUtils.reverse(password);
            patient.setPassword(MD5.GetMD5Code(password + salt));
            patient.setPassword(MD5.GetMD5Code(password + salt));
            patient.setSsc(ssc);
            patient.setSsc(ssc);
            if (!org.springframework.util.StringUtils.isEmpty(openid)) {
            if(!"undefined".equals(openid)&&StringUtils.isNotBlank(openid)){
                patient.setOpenid(openid);
                patient.setOpenid(openid);
                patient.setOpenidTime(new Date());
                patient.setOpenidTime(new Date());
            }
            }
//            if (!org.springframework.util.StringUtils.isEmpty(openid)) {
//                patient.setOpenid(openid);
//                patient.setOpenidTime(new Date());
//            }
            JSONObject json = patientService.register(idcard, ssc, name, mobile, MD5.GetMD5Code(password + salt)
            JSONObject json = patientService.register(idcard, ssc, name, mobile, MD5.GetMD5Code(password + salt)
                    ,salt,openid,3);
                    ,salt,openid,3);
            if (json != null) {
            if (json != null) {

+ 4 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/call/CallRecordController.java

@ -40,6 +40,7 @@ public class CallRecordController extends BaseController {
                                  @ApiParam(name="page",value="第几页,从1开始")@RequestParam(required = true)Integer page,
                                  @ApiParam(name="page",value="第几页,从1开始")@RequestParam(required = true)Integer page,
                                  @ApiParam(name="size",value="每页大小")@RequestParam(required = true)Integer size){
                                  @ApiParam(name="size",value="每页大小")@RequestParam(required = true)Integer size){
        try {
        try {
            return write(200,"保存成功","data",customerService.getCallServices(keyword, serverType,state,patientName,ssc,idCard,doctorName, code,adminTeamCode,startDate, endDate, page, size));
            return write(200,"保存成功","data",customerService.getCallServices(keyword, serverType,state,patientName,ssc,idCard,doctorName, code,adminTeamCode,startDate, endDate, page, size));
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            error(e);
@ -96,9 +97,10 @@ public class CallRecordController extends BaseController {
                                         @ApiParam(name="orderDeptName",value="科室")@RequestParam(required = false)String orderDeptName,
                                         @ApiParam(name="orderDeptName",value="科室")@RequestParam(required = false)String orderDeptName,
                                         @ApiParam(name="orderDoctor",value="预约医生编码")@RequestParam(required = false)String orderDoctor,
                                         @ApiParam(name="orderDoctor",value="预约医生编码")@RequestParam(required = false)String orderDoctor,
                                         @ApiParam(name="orderDoctorName",value="预约医生")@RequestParam(required = false)String orderDoctorName,
                                         @ApiParam(name="orderDoctorName",value="预约医生")@RequestParam(required = false)String orderDoctorName,
                                         @ApiParam(name="orderTime",value="预约时间,按需求格式拼接字符串")@RequestParam(required = false)String orderTime){
                                         @ApiParam(name="orderTime",value="预约时间,按需求格式拼接字符串")@RequestParam(required = false)String orderTime,
                                         @ApiParam(name="registerTime",value="挂号时间")@RequestParam(required = false)String registerTime){
        try {
        try {
            return write(200,"保存成功","data",customerService.dealAppointCallService( type , code, dealReason, dealContent,  orderHospital, orderHospitalName, orderDept, orderDeptName, orderDoctor, orderDoctorName, orderTime));
            return write(200,"保存成功","data",customerService.dealAppointCallService( type , code, dealReason, dealContent,  orderHospital, orderHospitalName, orderDept, orderDeptName, orderDoctor, orderDoctorName, orderTime,registerTime));
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            error(e);
            return error(-1,"保存失败");
            return error(-1,"保存失败");

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultController.java

@ -805,7 +805,7 @@ public class ConsultController extends WeixinBaseController {
                    failed.add(String.valueOf(resObj.get("data")));
                    failed.add(String.valueOf(resObj.get("data")));
                    try {
                    try {
                        //            新增发送医生助手模板消息 v1.4.0 by wujunjie
                        //            新增发送医生助手模板消息 v1.4.0 by wujunjie
                        Doctor doctor = doctorDao.findByCode(log.getDoctor());
                        Doctor doctor = doctorDao.findByCode(consultModel.getDoctor());
                        String doctorOpenID = doctor.getOpenid();
                        String doctorOpenID = doctor.getOpenid();
                        if (StringUtils.isNotEmpty(doctorOpenID)) {
                        if (StringUtils.isNotEmpty(doctorOpenID)) {
                                String title = "";
                                String title = "";
@ -825,7 +825,7 @@ public class ConsultController extends WeixinBaseController {
                                    params.add(new BasicNameValuePair("url", targetUrl));
                                    params.add(new BasicNameValuePair("url", targetUrl));
                                    params.add(new BasicNameValuePair("first",  first));
                                    params.add(new BasicNameValuePair("first",  first));
                                    params.add(new BasicNameValuePair("remark", "请进入手机APP查看"));
                                    params.add(new BasicNameValuePair("remark", "请进入手机APP查看"));
                                    String keywords = title + "," + content +","+ log.getDoctorName();
                                    String keywords = title + "," + content +","+ doctor.getName();
                                    params.add(new BasicNameValuePair("keywords", keywords));
                                    params.add(new BasicNameValuePair("keywords", keywords));
                                    httpClientUtil.post(url, params, "UTF-8");
                                    httpClientUtil.post(url, params, "UTF-8");

+ 6 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/EsStatisticsController.java

@ -29,10 +29,10 @@ import java.util.Map;
import java.util.TreeMap;
import java.util.TreeMap;
/**
/**
 * Created by chenweida on 2017/10/13.
 * Created by chenweida on 2017/10/13
 */
 */
@Controller
@Controller
@RequestMapping(value = "/statistics", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/esstatistics", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, method = {RequestMethod.GET, RequestMethod.POST})
@Api(description = "ES统计查询")
@Api(description = "ES统计查询")
public class EsStatisticsController extends BaseController {
public class EsStatisticsController extends BaseController {
@ -356,6 +356,7 @@ public class EsStatisticsController extends BaseController {
                if(!"16".equals(idx)){
                if(!"16".equals(idx)){
                    result.put("index_" + idx, statisticsESService.getIndexLevelTwototal(endDate, area, level, idx));
                    result.put("index_" + idx, statisticsESService.getIndexLevelTwototal(endDate, area, level, idx));
                }else{
                }else{
                    //16的指标删除 改成 1和14
                    result.put("index_"+idx,statisticsESService.getPayPremiums(endDate,area,level));
                    result.put("index_"+idx,statisticsESService.getPayPremiums(endDate,area,level));
                }
                }
            }
            }
@ -1049,7 +1050,7 @@ public class EsStatisticsController extends BaseController {
    }
    }
    /**
    /**
     * 获取团队随访量折线统计图(弃用)
     * 获取团队随访量折线统计图
     *
     *
     * @param type
     * @param type
     * @param teamCode
     * @param teamCode
@ -1064,7 +1065,7 @@ public class EsStatisticsController extends BaseController {
                                      @RequestParam(required = true) String startDate,
                                      @RequestParam(required = true) String startDate,
                                      @RequestParam(required = true) String endDate) {
                                      @RequestParam(required = true) String endDate) {
        try {
        try {
            return write(200, "查询成功", "data", statisticsService.getTeamFollowupLine(teamCode, startDate, endDate, type));
            return write(200, "查询成功", "data", statisticsESService.getTeamFollowupLine(teamCode, startDate, endDate, type));
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
@ -1342,7 +1343,7 @@ public class EsStatisticsController extends BaseController {
                                 @RequestParam(required = true) String endDate,
                                 @RequestParam(required = true) String endDate,
                                 @RequestParam(required = true) String type) {
                                 @RequestParam(required = true) String type) {
        try {
        try {
            return write(200, "查询成功", "data", statisticsService.getTeamEduLine(teamCode, startDate, endDate, type));
            return write(200, "查询成功", "data", statisticsESService.getTeamEduLine(teamCode, startDate, endDate, type));
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/StatisticsController.java

@ -29,7 +29,7 @@ import java.util.*;
 * Created by lyr on 2016/08/16.
 * Created by lyr on 2016/08/16.
 */
 */
@Controller
@Controller
@RequestMapping(value = "/oldstatistics", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
@RequestMapping(value = "/statistics", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
@Api(description = "统计")
@Api(description = "统计")
public class StatisticsController extends BaseController {
public class StatisticsController extends BaseController {

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/wx/OnePayController.java

@ -771,7 +771,7 @@ public class OnePayController extends WeixinBaseController {
                String outChargeNo = code.get("code").toString();
                String outChargeNo = code.get("code").toString();
                pay.chargeQuery(outChargeNo,getAccessToken());
                pay.chargeQuery(outChargeNo,getAccessToken());
            }*/
            }*/
            String url = doctorAssistant + "/wllyy/feldsher/sendDoctorTemplates";
            String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
            List<NameValuePair> params = new ArrayList<>();
            List<NameValuePair> params = new ArrayList<>();
            params.add(new BasicNameValuePair("type", "5"));
            params.add(new BasicNameValuePair("type", "5"));
            params.add(new BasicNameValuePair("openId", "orrOgwATDaljVunlAq_Tdx3imhYg"));
            params.add(new BasicNameValuePair("openId", "orrOgwATDaljVunlAq_Tdx3imhYg"));