소스 검색

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

huangwenjie 7 년 전
부모
커밋
43c76abe5d

+ 1 - 1
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/common/thread/LoadNewSignThread.java

@ -13,7 +13,7 @@ import java.util.Date;
 * */
public class LoadNewSignThread implements Runnable {
    int retryTime =  30000;
    int retryTime =  10000;
    //空闲时间
    Integer nightHours = 23;

+ 8 - 8
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/common/thread/LoadThread.java

@ -13,11 +13,11 @@ import java.util.Date;
 */
public class LoadThread implements Runnable {
    int retryTime =  30000;
    int retryTime =  10000;
    //空闲时间
    Integer nightHours = 22;
    Integer morningHours = 6;
    Integer nightHours = 23;
    Integer morningHours = 5;
    //默认线程间隔
    Integer sleepTime = 60;
@ -29,8 +29,8 @@ public class LoadThread implements Runnable {
                Date now = new Date();
                //判断非空闲时候
//                if(now.getHours()>=morningHours &&  now.getHours() < nightHours)
//                {
                if(now.getHours()>=morningHours &&  now.getHours() < nightHours)
                {
                    //签约更新
                    SignZYService signZYService = (SignZYService) SpringContextHolder.getSpringBean("SignZYService");
                    SystemDictService systemDictService = (SystemDictService) SpringContextHolder.getSpringBean("SystemDictService");
@ -58,9 +58,9 @@ public class LoadThread implements Runnable {
                        Thread.sleep(retryTime);
                        continue;
                    }
//                }
//
//                Thread.sleep(sleepTime*1000);
                }
                Thread.sleep(sleepTime*1000);
            } catch (Exception ex) {
                ex.printStackTrace();
                try {

+ 3 - 0
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/dao/SignFamilyRenewLogDao.java

@ -45,4 +45,7 @@ public interface SignFamilyRenewLogDao extends PagingAndSortingRepository<SignFa
    @Query("select a.proId from SignFamilyRenewLog a where a.signCode=?1")
    String getProId(String signCode);
    
    @Query("select a.renewProId from SignFamilyRenewLog a where a.signCode=?1")
    String getreProId(String signCode);
}

+ 45 - 38
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/service/ChargeZYService.java

@ -146,47 +146,54 @@ public class ChargeZYService {
    
                jsonObject.put("INSUR_PRO_ID",charge.getMiRegisterNo());//医保签约号
//                params.put("INSUR_PRO_ID", charge.getMiRegisterNo());  //医保签约号
                if("1".equals(sign.getRenewFlag())||"2".equals(sign.getRenewFlag())){
                    proId = signFamilyRenewLogDao.getProId(signCode);
                    if(StringUtils.isBlank(proId) || "0".equals(proId)){
                        
                        if("1".equals(sign.getSignSource())){
                            //如果是在基卫签约则需要更新同步
                            SignFamilyMapping signFamilyMapping = signFamilyMappingDao.findByCode(signCode);
                            signFamilyMapping.setNeedUpdate("1");
                            signFamilyMappingDao.save(signFamilyMapping);
                        }else{
                            //如果是网络签约则需要上传同步
                            SignFamilyRenewLog signFamilyRenewLog = signFamilyRenewLogDao.findBySignCode(signCode);
                            signFamilyRenewLog.setNeedUpload("1");
                            signFamilyRenewLogDao.save(signFamilyRenewLog);
                        }
    
                        //暂停30秒
                        Thread.sleep(30000);
                        return true;
                    }
                }else {
                    proId = signFamilyMappingDao.getProId(signCode);
                    if(StringUtils.isBlank(proId) || "0".equals(proId)){
    
                        SignFamilyMapping signFamilyMapping = signFamilyMappingDao.findByCode(signCode);
                        if("1".equals(sign.getSignSource())){
                            //如果是在基卫签约则需要更新同步
                            signFamilyMapping.setNeedUpdate("1");
                        }else{
                            //如果是网络签约则需要上传同步
                            signFamilyMapping.setNeedUpload("1");
                        }
                        signFamilyMappingDao.save(signFamilyMapping);
    
                        //暂停30秒
                        Thread.sleep(30000);
                        return true;
                proId = signFamilyMappingDao.getProId(signCode);
                if(StringUtils.isBlank(proId)){
                    proId = signFamilyRenewLogDao.getProId(signCode);
                    if(StringUtils.isBlank(proId)){
                        proId = signFamilyRenewLogDao.getreProId(signCode);
                    }
                }
//                if("1".equals(sign.getRenewFlag())||"2".equals(sign.getRenewFlag())){
//                    proId = signFamilyRenewLogDao.getProId(signCode);
//                    if(StringUtils.isBlank(proId) || "0".equals(proId)){
//
//                        if("1".equals(sign.getSignSource())){
//                            //如果是在基卫签约则需要更新同步
//                            SignFamilyMapping signFamilyMapping = signFamilyMappingDao.findByCode(signCode);
//                            signFamilyMapping.setNeedUpdate("1");
//                            signFamilyMappingDao.save(signFamilyMapping);
//                        }else{
//                            //如果是网络签约则需要上传同步
//                            SignFamilyRenewLog signFamilyRenewLog = signFamilyRenewLogDao.findBySignCode(signCode);
//                            signFamilyRenewLog.setNeedUpload("1");
//                            signFamilyRenewLogDao.save(signFamilyRenewLog);
//                        }
//
//                        //暂停30秒
//                        Thread.sleep(30000);
//                        return true;
//                    }
//                }else {
//                    proId = signFamilyMappingDao.getProId(signCode);
//                    if(StringUtils.isBlank(proId) || "0".equals(proId)){
//
//                        SignFamilyMapping signFamilyMapping = signFamilyMappingDao.findByCode(signCode);
//                        if("1".equals(sign.getSignSource())){
//                            //如果是在基卫签约则需要更新同步
//                            signFamilyMapping.setNeedUpdate("1");
//                        }else{
//                            //如果是网络签约则需要上传同步
//                            signFamilyMapping.setNeedUpload("1");
//                        }
//                        signFamilyMappingDao.save(signFamilyMapping);
//
//                        //暂停30秒
//                        Thread.sleep(30000);
//                        return true;
//                    }
//                }
    
                jsonObject.put("PRO_ID",proId);////标志(智业签约主键)
//                params.put("PRO_ID", proId);  //标志(智业签约主键)

+ 1 - 0
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/service/SignRenewZYService.java

@ -1793,6 +1793,7 @@ public class SignRenewZYService {
                }
                mapping.setRenewUploadTime(new Date());
                mapping.setRenewProId(proId);
                mapping.setProId(proId);
                signFamilyMappingDao.save(mapping);
            }

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/team/AdminTeamService.java

@ -649,6 +649,8 @@ public class AdminTeamService extends BaseService {
            JSONObject doctorInfo = new JSONObject();
            doctorInfo.put("name",d.getName());
            doctorInfo.put("code",d.getCode());
            doctorInfo.put("dept_name",d.getDeptName());
            doctorInfo.put("job_name",d.getJobName());
            doctors.add(doctorInfo);
        }
        result.put("members",doctors);

+ 9 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java

@ -23,6 +23,7 @@ import com.yihu.wlyy.repository.specialist.SpecialDiseaseDao;
import com.yihu.wlyy.repository.specialist.TeamDiseaseRelationDao;
import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.http.HttpResponse;
@ -81,6 +82,8 @@ public class SpecialistService extends BaseService {
    private PushMsgTask pushMsgTask;
    @Autowired
    private WechatTemplateConfigDao templateConfigDao;
    @Autowired
    private AdminTeamService memberService;
    public String setPatientLabelInfo(List<SignPatientLabelInfo> list) {
        if (list != null && list.size() > 0) {
@ -621,6 +624,12 @@ public class SpecialistService extends BaseService {
            JSONObject json = rs.getJSONObject("obj");
            List<PatientDiseaseServer> patientDiseaseServers =  patientDiseaseServerDao.findBySpecialistRelationCodeAndDel(code,"1");
            json.put("diseaseServer",patientDiseaseServers);
            
            //根据团队ID获取医生列表
            Long teamCode = json.getLong("teamCode");
            List<Doctor> members = memberService.getMembers(teamCode);
            json.put("doctors",members);
            
            return json;
        }
        return null;

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

@ -328,10 +328,10 @@ public class OnePayService {
            if (signFamily != null) {
//                //签约人Code
                String signDoctorCode = signFamily.getSignDoctorCode();
                String doctorCode = signFamily.getDoctor();
                String people = signFamily.getPatient();
                Doctor doctor = doctorDao.findByCode(signDoctorCode);
                Doctor doctor = doctorDao.findByCode(doctorCode);
                Patient user = patientDao.findByCode(people);
    
                JSONObject familyContent =  new JSONObject();
@ -342,17 +342,17 @@ public class OnePayService {
                familyContent.put("moRegTelephone", user.getMobile());//签约人联系电话
                familyContent.put("moRegOrgNo", sbCode); //签约机构 限长4
                familyContent.put("moRegDocNo", doctor.getIdcard());//签约医生编号 限长18 身份证号
                familyContent.put("moRegDocName", signFamily.getSignDoctorName()); //签约医生姓名
                familyContent.put("moRegDocName", signFamily.getDoctorName()); //签约医生姓名
//                familyContent.put("moRegTime", format.format(signFamily.getBegin())); //签约时间
                familyContent.put("moRegTime", format.format(new Date())); //签约时间 v1.4.0更改
                familyContent.put("moRegEndTime", format.format(signFamily.getEnd())); //签约截止时间
                familyContent.put("moRegTear", signFamily.getSignYear());//签约年度
                familyContent.put("moRegSource", signFamily.getSignSource()); //签约来源
                familyContent.put("moCollectOrgNo", sbCode); //扣费机构 签约机构
                familyContent.put("moCollectorNo", signFamily.getSignDoctorName());//扣费人 签约医生姓名
                familyContent.put("moCollectorNo", signFamily.getDoctorName());//扣费人 签约医生姓名
                familyContent.put("benefitType", signFamily.getExpensesType()); //补贴类型
                familyContent.put("moBookOrgNo", sbCode);//登记机构 签约机构
                familyContent.put("moBookerNo", signFamily.getSignDoctorName()); //登记人 签约医生姓名
                familyContent.put("moBookerNo", signFamily.getDoctorName()); //登记人 签约医生姓名
                familyContent.put("moBookTime", format.format(signFamily.getBegin())); //登记时间 签约时间
    
                JSONObject moServiceType = new JSONObject();//服务类型