Browse Source

心脏修改

wangjun 3 years ago
parent
commit
af8f4a76d9

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

@ -951,7 +951,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        WlyyOutpatientDO outpatientDO = objectMapper.readValue(outpatientJson, WlyyOutpatientDO.class);
        BasePatientDO patientDO = basePatientDao.findById(outpatientDO.getPatient());
        BaseDoctorDO doctorDO = baseDoctorDao.findById(outpatientDO.getDoctor());
        outpatientDO.setIsAgree("1");
        outpatientDO.setMjz("mz");
        outpatientDO.setStatus("0");
        outpatientDO.setCreateTime(new Date());

+ 17 - 5
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java

@ -449,7 +449,9 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            head.put("clientSecret",clientSecret);
            msg.put("head",head);
            JSONObject body = new JSONObject();
            body.put("sysTag",sysTag);
            if (StringUtils.isNoneBlank(sysTag)){
                body.put("sysTag",sysTag);
            }
            body.put("openId",openId);
            msg.put("body",body);
            object.put("msg",msg);
@ -487,7 +489,9 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            head.put("clientSecret",clientSecret);
            msg.put("head",head);
            JSONObject body = new JSONObject();
            body.put("sysTag",sysTag);
            if (StringUtils.isNoneBlank(sysTag)){
                body.put("sysTag",sysTag);
            }
            body.put("openId",baseDoctorDO.getOpenid());
            msg.put("body",body);
            object.put("msg",msg);
@ -533,7 +537,9 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            head.put("clientSecret",clientSecret);
            msg.put("head",head);
            JSONObject body = new JSONObject();
            body.put("sysTag",sysTag);
            if (StringUtils.isNoneBlank(sysTag)){
                body.put("sysTag",sysTag);
            }
            body.put("openId",openId);
            msg.put("body",body);
            object.put("msg",msg);
@ -548,8 +554,9 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        return null;
    }
    public BaseDoctorDO checkDoctorNeedSign(String doctorId){
    public JSONObject checkDoctorNeedSign(String doctorId,String sysTag){
        BaseDoctorDO baseDoctorDO =baseDoctorDao.findById(doctorId);
        JSONObject jsonObject = new JSONObject();
        if (baseDoctorDO!=null){
            int defaultMinute=360;
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO=wlyyHospitalSysDictDao.findById("singTimeControl");
@ -560,9 +567,14 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            long lastSignTime = baseDoctorDO.getLastSignTime()==null?new Date().getTime():baseDoctorDO.getLastSignTime().getTime();
            if ((nowTime-lastSignTime)>defaultMinute*60*1000){
                baseDoctorDO.setIsSign("0");
                jsonObject = this.selfSignRequest(baseDoctorDO.getOpenid(),sysTag);
                jsonObject.put("isNeedSign","true");
            }else {
                jsonObject.put("status",200);
                jsonObject.put("isNeedSign","false");
            }
            baseDoctorDO = baseDoctorDao.save(baseDoctorDO);
        }
        return baseDoctorDO;
        return jsonObject;
    }
}

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

@ -56,6 +56,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.io.IOException;
import java.io.StringReader;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.*;
@ -3070,7 +3072,7 @@ public class XzzxEntranceService{
                object1.put("pack_size",jsonObject.getString("PACK_SPEC"));
                object1.put("retprice",jsonObject.getString("RETAIL_PRICE"));
                object1.put("specification",jsonObject.getString("PHYSIC_SPEC"));
                object1.put("pack_retprice",jsonObject.getString("RETAIL_PRICE"));
                object1.put("pack_retprice",jsonObject.getString(" "));
                object1.put("stock_amount",jsonObject.getString("QUANTITY"));
                object1.put("visible_flag",jsonObject.getString("VALID_FLAG"));
                object1.put("drug_flag",jsonObject.getString("OTC_FLAG"));
@ -3080,6 +3082,11 @@ public class XzzxEntranceService{
                object1.put("weigh_unit",jsonObject.getString("DOSE_UNIT"));
                object1.put("vol_unit","");
                object1.put("mini_unit_name",jsonObject.getString("PHYSIC_UNIT"));
                DecimalFormat df =new DecimalFormat("0.00");
                Double packSize=Double.parseDouble(jsonObject.get("PACK_SPEC")==null?"1":jsonObject.getString("PACK_SPEC"));
                Double retprice=Double.parseDouble(jsonObject.get("RETAIL_PRICE")==null?"0":jsonObject.getString("RETAIL_PRICE"));
                Double miniUnitPrice=retprice/packSize;
                object1.put("mini_unit_price",df.format(miniUnitPrice));
                object1.put("pack_unit_name",jsonObject.getString("PRICE_UNIT"));
                object1.put("weigh_unit_name",jsonObject.getString("DOSE_UNIT"));
                object1.put("vol_unit_name","");
@ -3095,14 +3102,12 @@ public class XzzxEntranceService{
                object1.put("bz_usage_name",jsonObject.getString("FREQUENCY"));
                object1.put("QUANTITY",jsonObject.getString("QUANTITY"));
                object1.put("DAY_COUNT",jsonObject.getString("DAY_COUNT"));
                jsonArray.add(object1);
            }
        }
        return jsonArray;
    }
    /**
     * 查询药品用药方法
     * @param spellCode 拼音码

+ 7 - 3
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/PostFilter.java

@ -1,6 +1,8 @@
package com.yihu.jw.gateway.filter;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.yihu.jw.entity.base.dict.BaseExceptionLogDO;
@ -24,6 +26,8 @@ import java.util.List;
import java.util.Map;
import java.util.zip.GZIPInputStream;
@Component
public class PostFilter extends ZuulFilter {
 
@ -46,7 +50,6 @@ public class PostFilter extends ZuulFilter {
        //是否执行该过滤器,true代表需要过滤
        return true;
    }
 
    @Override
    public Object run() {
        RequestContext ctx = RequestContext.getCurrentContext();
@ -80,7 +83,8 @@ public class PostFilter extends ZuulFilter {
                break;
            }
        }
        JSONObject jsonObject =JSONObject.parseObject(body);
        net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(body);
        String status =jsonObject.getString("status");
        if (!"200".equalsIgnoreCase(status)){
            jsonObject.put("status",serviceId+status);
@ -106,7 +110,7 @@ public class PostFilter extends ZuulFilter {
        }
        JSONObject object = new JSONObject();
        object.put("status","200");
        object.put("data", AesEncryptUtils.encrypt(jsonObject.toString()));
        object.put("data", AesEncryptUtils.encrypt(body));
        if (!(url.contains("/open/noLogin/notify")||
            url.contains("/open/noLogin/ylzReceiveNotify")||
            url.contains("/open/noLogin/receiveNotify")||

+ 4 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/Xzyy/XzyyController.java

@ -247,9 +247,11 @@ public class XzyyController extends EnvelopRestEndpoint {
    @ApiOperation(value = "判断是否需要授权", notes = "判断是否需要授权")
    public ObjEnvelop checkIsNeedSign(
                                   @ApiParam(name = "doctorId", value = "医生id", required = false)
                                   @RequestParam(value = "doctorId",required = false)String doctorId)throws Exception{
                                   @RequestParam(value = "doctorId",required = false)String doctorId,
                                   @ApiParam(name = "sysTag", value = "系统类型", required = false)
                                   @RequestParam(value = "sysTag",required = false)String sysTag)throws Exception{
        BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(doctorId);
        return ObjEnvelop.getSuccess("ok", xzyyPrescriptionService.checkDoctorNeedSign(doctorId));
        return ObjEnvelop.getSuccess("ok", xzyyPrescriptionService.checkDoctorNeedSign(doctorId,sysTag));
    }
}