Browse Source

长处方

trick9191 7 years ago
parent
commit
62656122f2

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

@ -28,6 +28,7 @@ import com.yihu.wlyy.service.app.label.SignPatientLabelInfoService;
import com.yihu.wlyy.service.app.message.MessageService;
import com.yihu.wlyy.service.app.scheduling.DoctorWorkTimeService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.service.third.jw.JwArchivesService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.task.SignUploadTask;
import com.yihu.wlyy.util.*;
@ -128,6 +129,8 @@ public class FamilyContractService extends BaseService {
    private SignFamilyRenewDao signFamilyRenewDao;
    @Autowired
    private SignFamilyMappingDao signFamilyMappingDao;
    @Autowired
    private JwArchivesService jwArchivesService;
    @Autowired
    private ImUtill ImUtill;
@ -4055,4 +4058,13 @@ public class FamilyContractService extends BaseService {
        Integer patients = jdbcTemplate.queryForObject(sb.toString(), params.toArray(), Integer.class);
        return patients;
    }
    public String getSickArchiveFlag(String patient)throws Exception{
        Patient p = patientDao.findByCode(patient);
        String rs = jwArchivesService.getSickArchiveFlag(p.getIdcard());
        return rs ;
    }
}

+ 6 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/FamilyContractController.java

@ -57,7 +57,6 @@ public class FamilyContractController extends BaseController {
    private DoctorPatientGroupInfoDao doctorPatientGroupInfoDao;
    @Autowired
    private SignWebService signWebService;
    /**
     * 得到患者的签约的医生的信息
     *
@ -395,6 +394,12 @@ public class FamilyContractController extends BaseController {
            if (StringUtils.isEmpty(doctor)) {
                return error(-1, "签约医生不能为空");
            }
            //===1.3.7 加入建档判断
            String flag = familyContractService.getSickArchiveFlag(patient);
            if("0".equals(flag)){
               return error(-2, "用户未建档");
            }
            //==1.3.7===end===
            int result = familyContractService.sign(doctor,patient,countryCode);