|
@ -40,6 +40,7 @@ import com.yihu.wlyy.task.SignUploadTask;
|
|
import com.yihu.wlyy.util.*;
|
|
import com.yihu.wlyy.util.*;
|
|
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
|
|
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
|
|
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
|
|
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
|
|
|
|
import io.swagger.models.auth.In;
|
|
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.apache.http.NameValuePair;
|
|
import org.apache.http.NameValuePair;
|
|
@ -175,7 +176,8 @@ public class FamilyContractService extends BaseService {
|
|
private PatientCertificateDao patientCertificateDao;
|
|
private PatientCertificateDao patientCertificateDao;
|
|
@Autowired
|
|
@Autowired
|
|
private SignDictDao signDictDao;
|
|
private SignDictDao signDictDao;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private SignFamilyServerDao signFamilyServerDao;
|
|
|
|
|
|
public SignFamily findSignFamilyByCode(String code) {
|
|
public SignFamily findSignFamilyByCode(String code) {
|
|
return signFamilyDao.findByCode(code);
|
|
return signFamilyDao.findByCode(code);
|
|
@ -3992,8 +3994,8 @@ public class FamilyContractService extends BaseService {
|
|
|
|
|
|
if (jtSignFamily != null) {
|
|
if (jtSignFamily != null) {
|
|
//家庭签约只找全科医生
|
|
//家庭签约只找全科医生
|
|
Doctor doctor = doctorDao.findByCodeAndDel(jtSignFamily.getDoctor(),"1");
|
|
|
|
Doctor doctorHealth = doctorDao.findByCodeAndDel(jtSignFamily.getDoctorHealth(),"1");
|
|
|
|
|
|
Doctor doctor = doctorDao.findByCodeAndDel(jtSignFamily.getDoctor(),1);
|
|
|
|
Doctor doctorHealth = doctorDao.findByCodeAndDel(jtSignFamily.getDoctorHealth(),1);
|
|
if (doctor != null) {
|
|
if (doctor != null) {
|
|
JSONObject jo = new JSONObject();
|
|
JSONObject jo = new JSONObject();
|
|
jo.put("code", doctor.getCode());
|
|
jo.put("code", doctor.getCode());
|
|
@ -4538,7 +4540,15 @@ public class FamilyContractService extends BaseService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
public String saveCertificate(String patient,String imgPath,String sevId){
|
|
|
|
|
|
/**
|
|
|
|
* 新增更新证明接口
|
|
|
|
* @param patient
|
|
|
|
* @param imgPath
|
|
|
|
* @param sevId
|
|
|
|
* @param imgId
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public String saveCertificate(String patient,String imgPath,String sevId,String imgId){
|
|
try{
|
|
try{
|
|
if (StringUtils.isNotBlank(sevId)) {
|
|
if (StringUtils.isNotBlank(sevId)) {
|
|
String[] sevIds = sevId.split(",");
|
|
String[] sevIds = sevId.split(",");
|
|
@ -4563,9 +4573,19 @@ public class FamilyContractService extends BaseService {
|
|
patientCertificate.setCertificatePath(im);
|
|
patientCertificate.setCertificatePath(im);
|
|
patientCertificate.setDel("1");
|
|
patientCertificate.setDel("1");
|
|
patientCertificate.setCreateTime(new Date());
|
|
patientCertificate.setCreateTime(new Date());
|
|
|
|
//设置签约年度
|
|
|
|
patientCertificate.setSignYear(DateUtil.getSignYear()+"");
|
|
patientCertificateDao.save(patientCertificate);
|
|
patientCertificateDao.save(patientCertificate);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//删除修改图片
|
|
|
|
if(StringUtils.isNotBlank(imgId)){
|
|
|
|
String[] ids = imgId.split(",");
|
|
|
|
for(int i =0;i<ids.length;i++){
|
|
|
|
Long id = Long.parseLong(ids[i]);
|
|
|
|
patientCertificateDao.delete(id);
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
logger.info(e.getMessage()+"___:"+e.toString());
|
|
logger.info(e.getMessage()+"___:"+e.toString());
|
|
@ -4576,4 +4596,8 @@ public class FamilyContractService extends BaseService {
|
|
public List<SignDict> getSignDict(){
|
|
public List<SignDict> getSignDict(){
|
|
return signDictDao.findByYear(DateUtil.getSignYear()+"");
|
|
return signDictDao.findByYear(DateUtil.getSignYear()+"");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public List<SignFamilyServer> findPatientSignServerBySignCode(String signCode){
|
|
|
|
return signFamilyServerDao.findBySignCode(signCode);
|
|
|
|
}
|
|
}
|
|
}
|