Forráskód Böngészése

Merge branch 'dev' of wangjun/wlyy2.0 into dev

wangzhinan 4 éve
szülő
commit
de94995013

+ 1 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -261,8 +261,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private PrescriptionDiagnosisDao  prescriptionDiagnosisDao;
    @Autowired
    private XzyyPrescriptionService xzyyPrescriptionService;
    @Autowired
    private GenerateUserSig generateUserSig;
@ -6596,7 +6594,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        WlyyOutpatientDO outpatientDO = objectMapper.readValue(outpatientJson, WlyyOutpatientDO.class);
        WlyyOutpatientDO one = outpatientDao.findOne(outpatientDO.getId());
        if (StringUtils.isNotBlank(one.getDoctor())) {
        if (StringUtils.isNotBlank(one.getDoctor())&&(one.getStatus().equalsIgnoreCase("1")||one.getStatus().equalsIgnoreCase("2"))) {
            throw new RuntimeException("已有医生接诊");
        }
        one.setDoctor(outpatientDO.getDoctor());

+ 25 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -4023,7 +4023,31 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
        }
        return jsonObject;
    }
    /**
     * 发送短信验证码
     * @return
     * @throws Exception
     */
    public Integer SendSmsToEntrance(String json) throws Exception {
        int result = 0;
        String response="";
        String url = entranceUrl+"SendSms";
        Map<String,String> map = new HashedMap();
        map.put("json",json);
        response = httpClientUtil.httpPost(url,map);
        logger.info("返回参数:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if(object.getInteger("status")==200){
            JSONArray jsonArray= JSONArray.parseArray(object.getString("obj"));
            if (jsonArray!=null&&jsonArray.size()!=0){
                JSONObject jsonObject = jsonArray.getJSONObject(0);
                if (jsonObject.getString("code").equalsIgnoreCase("10000")){
                    result=0;
                }
            }
        }
        return result;
    }

+ 26 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/hospital/WlyyFamilyMemberController.java

@ -18,6 +18,7 @@ import com.yihu.jw.sms.service.YkyySMSService;
import com.yihu.jw.sms.service.ZhongShanSMSService;
import com.yihu.jw.sms.util.ykyy.vo.ResultMsg;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -32,6 +33,7 @@ import org.springframework.web.bind.annotation.*;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@ -175,7 +177,7 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
                mixEnvelop.setMessage("您所添加的家属无就诊记录,无法发送验证码");
            }
        }else {
        }else if("xm_zsyy_wx".equalsIgnoreCase(wxId)){
            System.out.println("发送中山验证码开始");
            int result = 1;
            if (null!=jsonArray&&jsonArray.size() > 0) {
@ -193,6 +195,29 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
                mixEnvelop.setMessage("验证码发送失败");
                mixEnvelop.setStatus(500);
            }
        }else {
            //发送短信获取验证码
            JSONObject object = new JSONObject();
            object.put("operatetel","18788888888");
            object.put("interfaceid","jcpt");
            object.put("interfacepwd","jcpt");
            object.put("operator","xxgwxgzh");
            object.put("operateid","xxgwxgzh");
            com.alibaba.fastjson.JSONArray array = new com.alibaba.fastjson.JSONArray();
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("content","您好,你的手机登录短信验证码是:"+captcha+",5分钟内有效。");
            jsonObject.put("sendtel",phoneNum);
            jsonObject.put("sendtime", DateUtil.dateToStrLong(new Date()));
            array.add(jsonObject);
            object.put("messageinfo",array);
            int result =  xzzxEntranceService.SendSmsToEntrance(object.toJSONString());
            if (0 == result) {
                this.store(client_id, phoneNum, captcha, 120);
                mixEnvelop.setMessage("验证码发送成功");
            } else {
                mixEnvelop.setMessage("验证码发送失败");
                mixEnvelop.setStatus(500);
            }
        }
        return mixEnvelop;