Sfoglia il codice sorgente

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

trick9191 8 anni fa
parent
commit
e3edb6bc92

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

@ -821,10 +821,11 @@ public class FamilyContractService extends BaseService {
            throw new Exception("已签约了家庭医生!");
        }
        //判断是否有三师签约 并且判断全科医生一致
        SignFamily sssignFamily = signFamilyDao.findSSByIdcard(idcard);
        if (sssignFamily != null && !doctor.equals(sssignFamily.getDoctor())) {
            throw new Exception("全科医生不一致!");
        }
        //屏蔽三师签约判断
//        SignFamily sssignFamily = signFamilyDao.findSSByIdcard(idcard);
//        if (sssignFamily != null && !doctor.equals(sssignFamily.getDoctor())) {
//            throw new Exception("全科医生不一致!");
//        }
//        List<SystemDict> systemDicts = systemDictDao.findByDictName("SIGN_YEAR");
        Calendar cal = Calendar.getInstance();

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

@ -5,11 +5,13 @@ import java.util.*;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
import com.yihu.wlyy.entity.doctor.team.sign.DoctorTeamMember;
import com.yihu.wlyy.entity.message.Message;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.entity.patient.SignFamilyRenew;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.doctor.DoctorTeamMemberDao;
import com.yihu.wlyy.repository.message.MessageDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.repository.patient.SignFamilyRenewDao;
import com.yihu.wlyy.service.app.team.AdminTeamService;
@ -67,6 +69,8 @@ public class SignWebService extends BaseService {
    private SignFamilyRenewDao signFamilyRenewDao;
    @Autowired
    private DoctorDao doctorDao;
    @Autowired
    private MessageDao messageDao;
    /**
     * 根据医生代码及签约状态编码 获取该医生签约患者的信息列表
     *
@ -894,7 +898,7 @@ public class SignWebService extends BaseService {
     * @return
     * @throws Exception
     */
    public int agreeRenew(String access_token,String dotorCode,String patientCode,String state) throws Exception{
    public int agreeRenew(String access_token,String dotorCode,String patientCode,String state,Long mesId) throws Exception{
        List<SignFamilyRenew> renews =  signFamilyRenewDao.findByDoctorAndPatient(dotorCode,patientCode);
        if(renews==null||renews.size()==0){
@ -913,6 +917,14 @@ public class SignWebService extends BaseService {
                renew.setApplyDate(new Date());
                signFamilyRenewDao.save(renew);
                if(mesId!=null&&mesId>0){
                    Message mes = messageDao.findOne(mesId);
                    mes.setRead(0);//设置已读
                    mes.setOver("0");//设置消息操作结束
                    mes.setCzrq(new Date());
                    messageDao.save(mes);
                }
                //发送微信模板消息
                JSONObject data = new JSONObject();
                data.put("doctorName",renew.getDoctorName());

+ 0 - 5
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorFamilyContractController.java

@ -929,11 +929,6 @@ public class DoctorFamilyContractController extends WeixinBaseController {
                    json.put("applySurrDate", jtSign.getPatientApplyUnsignDate());
                    json.put("applyDate", jtSign.getPatientApplyDate());
                    json.put("jtSign", new JSONObject(jtSign));
                    if(StringUtils.isNotBlank(jtSign.getTeamCode())){
                        json.put("teamName",familyContractService.getTeamName(jtSign.getTeamCode()));
                    }else{
                        json.put("teamName","");
                    }
                } else {
                    throw new Exception("未找到患者待家庭签约的数据");
                }

+ 3 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorSignController.java

@ -444,9 +444,10 @@ public class DoctorSignController extends WeixinBaseController {
    @RequestMapping("/agreeRenew")
    @ApiOperation(value = "医生处理签约")
    public String agreeRenew(@RequestParam(required = true)String state,
                             @RequestParam(required = true)String patient){
                             @RequestParam(required = true)String patient,
                             @RequestParam(required = false) Long mesId ){
        try{
            int rs =signWebService.agreeRenew(getAccessToken(),getUID(),patient,state);
            int rs =signWebService.agreeRenew(getAccessToken(),getUID(),patient,state,mesId);
//            int rs =signWebService.agreeRenew(getAccessToken(),"test00000000005",patient,state);
            if(rs == 0){
                return error(-1, "操作失败");