Browse Source

[医保代码]

wangzhinan 3 years ago
parent
commit
5a01d9598b

+ 3 - 1
business/base-service/src/main/java/com/yihu/jw/file_upload/FileUploadService.java

@ -673,7 +673,9 @@ public class FileUploadService {
    public boolean isFileFlag(String type){
        List img = new ArrayList(Arrays.asList("bmp", "jpg", "png", "tif", "gif", "pcx", "tga", "exif", "fpx", "svg", "psd", "cdr", "pcd", "dxf", "ufo", "eps", "ai", "raw", "WMF", "webp","xls","xlsx","text/plain"));
        type = type.toLowerCase();
        logger.info(type);
        List img = new ArrayList(Arrays.asList("bmp", "jpg", "png", "tif", "gif", "pcx", "tga", "exif", "fpx", "svg", "psd", "cdr", "pcd", "dxf", "ufo", "eps", "ai", "raw", "WMF", "webp","xls","xlsx","text/plain","mp4","m4v","avi","ogm","wmv","mpg","webm","ogv","mov","asx","mpeg"));
        if (!img.contains(type)) {
            return false;
        }

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -96,7 +96,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                    return  mixEnvelop;
                }
            }else if (list!=null&&list.size()>0&&basePatientDO==null){
                mixEnvelop.setStatus(408);
                mixEnvelop.setStatus(409);
                mixEnvelop.setMessage("您所添加的家属手机号已被他人占用");
                return  mixEnvelop;
            } else {
@ -213,13 +213,13 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                    System.out.println("眼科转换后的csny"+birth);
                }else {
                    mixEnvelop.setStatus(408);
                    mixEnvelop.setStatus(409);
                    mixEnvelop.setMessage("您所添加的家属无就诊记录无法添加");
                    return mixEnvelop;
                }
            }else {
                mixEnvelop.setStatus(408);
                mixEnvelop.setStatus(409);
                mixEnvelop.setMessage("您所添加的家属无就诊记录无法添加");
                return mixEnvelop;
            }

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/PrescriptionDao.java

@ -65,6 +65,9 @@ public interface PrescriptionDao extends PagingAndSortingRepository<WlyyPrescrip
    @Query("select a from WlyyPrescriptionDO a where a.createTime>?1 and  a.createTime <?2 and a.status <30 and a.status>=0")
    List<WlyyPrescriptionDO> findListByCheckStatus(Date startTime,Date endTime);
    @Query("select a from WlyyPrescriptionDO a where a.createTime>?1 and  a.createTime <?2 and a.status >=30 ")
    List<WlyyPrescriptionDO> findListBySuccessStatus(Date startTime,Date endTime);
    @Query("select a from WlyyPrescriptionDO a,WlyyDoorPrescriptionDO p where a.id=p.code and p.orderId = ?1 and p.isAfterDoor = ?2  order by a.createTime desc")
    List<WlyyPrescriptionDO> findByOrderIdAndIsAfterDoor(String id, Integer isAfterDoor);
}

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

@ -120,6 +120,7 @@ import com.ylzinfo.ehc.trans.TransRequest;
import com.ylzinfo.ehc.trans.TransResponse;
import com.zaxxer.hikari.HikariDataSource;
import com.zaxxer.hikari.HikariPoolMXBean;
import jxl.format.*;
import jxl.write.*;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@ -143,6 +144,7 @@ import org.springframework.util.CollectionUtils;
import javax.management.JMX;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import java.io.DataOutput;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.Boolean;
@ -3881,6 +3883,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    //添加单元格内容
    public void addCell(WritableSheet ws, int row, int column, String data) throws WriteException {
        Label label = new Label(column, row, data);
        WritableCellFormat cellFormat = new WritableCellFormat();
        cellFormat.setAlignment(jxl.format.Alignment.CENTRE);
        label.setCellFormat(cellFormat);
        ws.addCell(label);
    }
@ -13712,4 +13717,470 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    /**
     * 收入日报
     */
    public List<Map<String, Object>> selectPriceTotal(String startTime,String endTime){
        List<Map<String, Object>> mapList = new ArrayList<>();
        Map<String, Object> params = new HashedMap();
        String sql =" SELECT ORDER_CATEGORY as \"orderCategory\",\"SUM\"(PAY_PRICE)/100 as \"payPrice\" FROM BASE_BUSINESS_ORDER_PAY WHERE ORDER_CATEGORY IN(1,2,3,4)  and STATUS=1 ";
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
            sql+=" and create_time <= to_date('" + endTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
        } else {
            sql+=" and create_time <='"+endTime+"' ";
        }
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
            sql+=" and create_time >= to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
        } else {
            sql+=" and create_time >='"+startTime+"' ";
        }
        sql+=" GROUP BY ORDER_CATEGORY ";
        logger.info("sql="+sql);
        mapList = hibenateUtils.createSQLQuery(sql, params);
        return mapList;
    }
    /**
     * 收入日报导出
     * @param os
     * @param ls
     * @param startTime
     * @param endTime
     * @throws Exception
     */
    public void pushListWritePriceTotal(OutputStream os, List<Map<String, Object>> ls,String startTime,String endTime) throws Exception {
        WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
        try {
            WritableSheet ws;
            ws = wwb.createSheet("sheet", 1);
            String[] header = {"互联网医院收入日报表","","","","",""};//
            int k = 0;
            for (String h : header) {
                addCell(ws, 0, k, h);//表名,行,列,header
                k++;
            }
            String[] header1 = {"汇总日期:"+startTime+"至"+endTime,"","","","",""};//
            int k1 = 0;
            for (String h : header1) {
                addCell(ws, 1, k1, h);//表名,行,列,header
                k1++;
            }
            String j1="";
            String j2="";
            String j3 ="";
            String j4="";
            String price1 = "";
            String price2 = "";
            String price3 = "";
            String price4 = "";
            for (Map<String, Object> m : ls) {
                if (m.get("orderCategory").toString().equalsIgnoreCase("1")){
                    j1 = m.get("orderCategory").toString();
                    price1=m.get("payPrice").toString();
                }else if (m.get("orderCategory").toString().equalsIgnoreCase("2")){
                    j2 = m.get("orderCategory").toString();
                    price2=m.get("payPrice").toString();
                }else if (m.get("orderCategory").toString().equalsIgnoreCase("3")){
                    j3 = m.get("orderCategory").toString();
                    price3=m.get("payPrice").toString();
                }else if (m.get("orderCategory").toString().equalsIgnoreCase("4")){
                    j4 = m.get("orderCategory").toString();
                    price4=m.get("payPrice").toString();
                }
            }
            Double price5 =Double.parseDouble(price2)+Double.parseDouble(price3);
            String[] header2 = {"咨询费",price1,"复诊费",price5+"","处方费",price4};//
            int k2 = 0;
            for (String h : header2) {
                addCell(ws, 2, k2, h);//表名,行,列,header
                k2++;
            }
            ws.mergeCells(0,0,5,0);
            ws.mergeCells(0,1,5,1);
            wwb.write();
            wwb.close();
        } catch (IOException e) {
            e.printStackTrace();
            if (wwb != null) wwb.close();
            throw e;
        }
    }
    /**
     * 预交金日报
     */
    public List<Map<String, Object>> selectCardPriceTotal(String startTime,String endTime){
        List<Map<String, Object>> mapList = new ArrayList<>();
        Map<String, Object> params = new HashedMap();
        String sql =" SELECT ORDER_CATEGORY as \"orderCategory\",\"SUM\"(PAY_PRICE) as \"payPrice\" FROM BASE_BUSINESS_ORDER_PAY WHERE ORDER_CATEGORY IN(5)  and STATUS=1 ";
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
            sql+=" and create_time <= to_date('" + endTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
        } else {
            sql+=" and create_time <='"+endTime+"' ";
        }
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
            sql+=" and create_time >= to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
        } else {
            sql+=" and create_time >='"+startTime+"' ";
        }
        sql+=" GROUP BY ORDER_CATEGORY ";
        logger.info("sql="+sql);
        mapList = hibenateUtils.createSQLQuery(sql, params);
        return mapList;
    }
    /**
     * 预交金日报
     * @param os
     * @param ls
     * @param startTime
     * @param endTime
     * @throws Exception
     */
    public void pushListCardPriceTotal(OutputStream os, List<Map<String, Object>> ls,String startTime,String endTime) throws Exception {
        WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
        try {
            WritableSheet ws;
            ws = wwb.createSheet("sheet", 1);
            String[] header = {"互联网医院预缴金日报表","","","",""};//
            int k = 0;
            for (String h : header) {
                addCell(ws, 0, k, h);//表名,行,列,header
                k++;
            }
            String[] header1 = {"汇总日期:"+startTime+"至"+endTime,"","","",""};//
            int k1 = 0;
            for (String h : header1) {
                addCell(ws, 1, k1, h);//表名,行,列,header
                k1++;
            }
            String[] header2 = {"上期结存","本期发生","充值HIS系统","合计","本期期末余额"};//
            int k2 = 0;
            for (String h : header2) {
                addCell(ws, 2, k2, h);//表名,行,列,header
                k2++;
            }
            String j1="";
            String price1 = "";
            for (Map<String, Object> m : ls) {
                if (m.get("orderCategory").toString().equalsIgnoreCase("5")){
                    j1 = m.get("orderCategory").toString();
                    price1=m.get("payPrice").toString();
                }
            }
            String[] header3 = {"","",price1,price1,""};//
            int k3 = 0;
            for (String h : header3) {
                addCell(ws, 3, k3, h);//表名,行,列,header
                k3++;
            }
            ws.mergeCells(0,0,4,0);
            ws.mergeCells(0,1,4,1);
            wwb.write();
            wwb.close();
        } catch (IOException e) {
            e.printStackTrace();
            if (wwb != null) wwb.close();
            throw e;
        }
    }
    /**
     * 资金分部报表
     *
     * @param startTime
     * @param endTime
     * @return
     */
    public List<Map<String, Object>> selectTotal(String startTime,String endTime){
        List<Map<String, Object>> mapList = new ArrayList<>();
        Map<String, Object> params = new HashedMap();
        String sql =" SELECT ORDER_CATEGORY as \"orderCategory\",\"SUM\"(PAY_PRICE)/100 as \"payPrice\" FROM BASE_BUSINESS_ORDER_PAY WHERE ORDER_CATEGORY IN(1,2,3,4,5)  and STATUS=1 ";
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
            sql+=" and create_time <= to_date('" + endTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
        } else {
            sql+=" and create_time <='"+endTime+"' ";
        }
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
            sql+=" and create_time >= to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
        } else {
            sql+=" and create_time >='"+startTime+"' ";
        }
        sql+=" GROUP BY ORDER_CATEGORY ";
        logger.info("sql="+sql);
        mapList = hibenateUtils.createSQLQuery(sql, params);
        for (Map<String, Object> map:mapList){
            if (map.get("orderCategory")!=null){
                if(map.get("orderCategory").toString().equalsIgnoreCase("5")){
                    map.put("payPrice",Double.parseDouble(map.get("orderCategory").toString())*100);
                }
            }
        }
        return mapList;
    }
    /**
     * 资金分部报表
     * @param os
     * @param ls
     * @param startTime
     * @param endTime
     * @throws Exception
     */
    public void pushListTotal(OutputStream os, List<Map<String, Object>> ls,String startTime,String endTime) throws Exception {
        WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
        try {
            WritableSheet ws;
            ws = wwb.createSheet("sheet", 1);
            String[] header = {"资金分布报表","","","",""};//
            int k = 0;
            for (String h : header) {
                addCell(ws, 0, k, h);//表名,行,列,header
                k++;
            }
            String[] header1 = {"汇总日期:"+startTime+"至"+endTime,"","","",""};//
            int k1 = 0;
            for (String h : header1) {
                addCell(ws, 1, k1, h);//表名,行,列,header
                k1++;
            }
            String[] header2 = {"本期发生","互联网医院","充值HIS系统","药店","问诊费"};//
            int k2 = 0;
            for (String h : header2) {
                addCell(ws, 2, k2, h);//表名,行,列,header
                k2++;
            }
            String j1="";
            String j2="";
            String j3 ="";
            String j4="";
            String j5="";
            String price1 = "";
            String price2 = "";
            String price3 = "";
            String price4 = "";
            String price5="";
            for (Map<String, Object> m : ls) {
                if (m.get("orderCategory").toString().equalsIgnoreCase("1")){
                    j1 = m.get("orderCategory").toString();
                    price1=m.get("payPrice").toString();
                }else if (m.get("orderCategory").toString().equalsIgnoreCase("2")){
                    j2 = m.get("orderCategory").toString();
                    price2=m.get("payPrice").toString();
                }else if (m.get("orderCategory").toString().equalsIgnoreCase("3")){
                    j3 = m.get("orderCategory").toString();
                    price3=m.get("payPrice").toString();
                }else if (m.get("orderCategory").toString().equalsIgnoreCase("4")){
                    j4 = m.get("orderCategory").toString();
                    price4=m.get("payPrice").toString();
                }else if (m.get("orderCategory").toString().equalsIgnoreCase("5")){
                    j5 = m.get("orderCategory").toString();
                    price5=m.get("payPrice").toString();
                }
            }
            Double price6 = Double.parseDouble(price1)+Double.parseDouble(price2)+Double.parseDouble(price3);//问诊费
            Double price7 = Double.parseDouble(price4);//处方费
            Double price8 = Double.parseDouble(price5);//就诊卡充值
            String[] header3 = {"",price6+price7+price8+"",price8+"",price7+"",price6+""};//
            int k3 = 0;
            for (String h : header3) {
                addCell(ws, 3, k3, h);//表名,行,列,header
                k3++;
            }
            ws.mergeCells(0,0,4,0);
            ws.mergeCells(0,1,4,1);
            wwb.write();
            wwb.close();
        } catch (IOException e) {
            e.printStackTrace();
            if (wwb != null) wwb.close();
            throw e;
        }
    }
    /**
     * 药品汇总表
     *
     * @param startTime
     * @param endTime
     * @return
     */
    public List<Map<String, Object>> selectDoctorTotal(String startTime,String endTime){
        List<Map<String, Object>> mapList = new ArrayList<>();
        Map<String, Object> params = new HashedMap();
        String sql =" SELECT DOCTOR as \"doctor\",DOCTOR_NAME as \"doctorName\",SUM(DRUG_FEE) as \"fee\" FROM WLYY_PRESCRIPTION WHERE STATUS>=30 ";
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
            sql+=" and create_time <= to_date('" + endTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
        } else {
            sql+=" and create_time <='"+endTime+"' ";
        }
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
            sql+=" and create_time >= to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
        } else {
            sql+=" and create_time >='"+startTime+"' ";
        }
        sql+=" GROUP BY DOCTOR,DOCTOR_NAME  ";
        logger.info("sql="+sql);
        mapList = hibenateUtils.createSQLQuery(sql, params);
        return mapList;
    }
    /**
     * 药品汇总表导出
     * @param os
     * @param ls
     * @param startTime
     * @param endTime
     * @throws Exception
     */
    public void pushListDoctorTotal(OutputStream os, List<Map<String, Object>> ls,String startTime,String endTime) throws Exception {
        WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
        try {
            WritableSheet ws;
            ws = wwb.createSheet("sheet", 1);
            String[] header = {"互联网医院药品汇总表","",""};//
            int k = 0;
            for (String h : header) {
                addCell(ws, 0, k, h);//表名,行,列,header
                k++;
            }
            String[] header1 = {"汇总日期:"+startTime+"至"+endTime,"",""};//
            int k1 = 0;
            for (String h : header1) {
                addCell(ws, 1, k1, h);//表名,行,列,header
                k1++;
            }
            String[] header2 = {"诊疗小组","进货金额","零售金额"};//
            int k2 = 0;
            for (String h : header2) {
                addCell(ws, 2, k2, h);//表名,行,列,header
                k2++;
            }
            int i = 3;
            String n = " ";
            for (Map<String, Object> m : ls) {
                addCell(ws, i, 0,m.get("doctorName")!=null?m.get("doctorName").toString():n);
                addCell(ws, i, 1, "");
                addCell(ws, i, 2, m.get("fee")!=null?m.get("fee").toString():n);
                i++;
            }
            ws.mergeCells(0,0,2,0);
            ws.mergeCells(0,1,2,1);
            wwb.write();
            wwb.close();
        } catch (IOException e) {
            e.printStackTrace();
            if (wwb != null) wwb.close();
            throw e;
        }
    }
    /**
     * 药品明细表
     *
     * @param startTime
     * @param endTime
     * @return
     */
    public List<Map<String, Object>> selectDrugTotal(String startTime,String endTime){
        List<Map<String, Object>> mapList = new ArrayList<>();
        Date stateDate = DateUtil.strToDateLong(startTime);
        Date endDate = DateUtil.strToDateLong(endTime);
        List<WlyyPrescriptionDO> prescriptionDOList = prescriptionDao.findListBySuccessStatus(stateDate,endDate);
        for (WlyyPrescriptionDO prescriptionDO:prescriptionDOList){
            com.alibaba.fastjson.JSONObject objectString = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(prescriptionDO);
            List<WlyyPrescriptionInfoDO> infoDOList = prescriptionInfoDao.findByPrescriptionId(prescriptionDO.getId(),1);
            objectString.put("info",infoDOList);
            Map<String,Object> map = new HashedMap();
            map.put("prescription",objectString);
            mapList.add(map);
        }
        return mapList;
    }
    /**
     * 药品明细表导出
     * @param os
     * @param ls
     * @param startTime
     * @param endTime
     * @throws Exception
     */
    public void pushListDrugTotal(OutputStream os, List<Map<String, Object>> ls,String startTime,String endTime) throws Exception {
        WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
        try {
            WritableSheet ws;
            ws = wwb.createSheet("sheet", 1);
            String[] header = {"互联网医院药品明细表","","","","","","","",""};//
            int k = 0;
            for (String h : header) {
                addCell(ws, 0, k, h);//表名,行,列,header
                k++;
            }
            String[] header1 = {"汇总日期:"+startTime+"至"+endTime,"","","","","","","",""};//
            int k1 = 0;
            for (String h : header1) {
                addCell(ws, 1, k1, h);//表名,行,列,header
                k1++;
            }
            String[] header2 = {"患者名称","订单药品","规格","总量","进价","零售价","进货金额","零售金额","发药时间"};//
            int k2 = 0;
            for (String h : header2) {
                addCell(ws, 2, k2, h);//表名,行,列,header
                k2++;
            }
            int i = 3;
            String n = " ";
            for (Map<String, Object> m : ls) {
                com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(m.get("prescription").toString());
                com.alibaba.fastjson.JSONArray array = jsonObject.getJSONArray("info");
                addCell(ws, i, 0,jsonObject.get("patientName")!=null?jsonObject.get("patientName").toString():n);
                for (int z=0;z<array.size();z++){
                    com.alibaba.fastjson.JSONObject object = array.getJSONObject(z);
                    addCell(ws, i, 1, object.get("drugName")!=null?object.get("drugName").toString():n);
                    addCell(ws, i, 2, object.get("specification")!=null?object.get("specification").toString():n);
                    addCell(ws, i, 3, object.get("quantity")!=null?object.get("quantity").toString():n);
                    addCell(ws, i, 4, "");
                    addCell(ws, i, 5, object.get("packRetprice")!=null?object.get("packRetprice").toString():n);
                    addCell(ws, i, 6, "");
                    if (object.get("quantity")!=null){
                        Double quantity = Double.parseDouble(object.get("quantity").toString());
                        Double packRetprice = Double.parseDouble(object.get("packRetprice").toString());
                        addCell(ws, i, 7,packRetprice*quantity+"");
                    }else {
                        addCell(ws, i, 7,"");
                    }
                    addCell(ws, i, 8,jsonObject.get("createTime")!=null?DateUtil.stampToString(jsonObject.get("createTime").toString()):n);
                    i++;
                }
            }
            ws.mergeCells(0,0,8,0);
            ws.mergeCells(0,1,8,1);
            wwb.write();
            wwb.close();
        } catch (IOException e) {
            e.printStackTrace();
            if (wwb != null) wwb.close();
            throw e;
        }
    }
}

+ 2 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java

@ -880,6 +880,8 @@ public class BaseRequestMapping {
        public static final String queryHealthIdCard  = "/queryHealthIdCard";
    }
    /**
     * 药店管理接口
     */

+ 10 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -225,6 +225,16 @@ public class BaseHospitalRequestMapping {
         */
        public static final String pushListWrite="/pushListWrite";
        /**
         * 财务报表导出
         */
        public static final String pushListDrug="/pushListDrug";
        /**
         * 财务报表导出
         */
        public static final String selectListDrug="/selectListDrug";
        /**
         *咨询导出
         */

+ 1 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java

@ -108,6 +108,7 @@ public class BasicZuulFilter extends ZuulFilter {
                url.contains("/excelControl")||
                url.contains("/open/gc")||
                url.contains("/prescription/pushListWrite")||
                url.contains("/prescription/pushListDrug")||
                url.contains("/open/noLogin/pushYkCardCharge")||
                url.contains("/prescription/searchRecordWrite"))){
            logger.info("入参"+ctx.getRequestQueryParams());

+ 2 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/PostFilter.java

@ -61,6 +61,7 @@ public class PostFilter extends ZuulFilter {
        HttpServletRequest request = ctx.getRequest();
        String url = request.getRequestURI();
        if (url.contains("/excelControl")||url.contains("/prescription/pushListWrite")||
                url.contains("/prescription/pushListDrug")||
                url.contains("/open/noLogin/pushYkCardCharge")||
                url.contains("/prescription/searchRecordWrite")){
            return true;
@ -136,6 +137,7 @@ public class PostFilter extends ZuulFilter {
                url.contains("/weixin")||url.contains("/oauth/getSsoPublicKey")||
                url.contains("/open/gc")||
                url.contains("/prescription/pushListWrite")||
                url.contains("/prescription/pushListDrug")||
                url.contains("/open/noLogin/pushYkCardCharge")||
                url.contains("/prescription/searchRecordWrite"))){
            RequestContext.getCurrentContext().setResponseBody(object.toJSONString());

+ 4 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/file_upload/FileUploadEndpoint.java

@ -170,7 +170,10 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
        files.setChunk(chunk);
        files.setChunkTotal(chunkTotal);
        files.setFile(file);
        if (!fileUploadService.isFileFlag(objectType+"")){
        String originalFilename1 = file.getOriginalFilename();
        String[] fs1 = originalFilename1.split("\\.");
        String type1 = fs1[1];
        if (!fileUploadService.isFileFlag(type1)){
            throw new FileWrongFormatException("不符合文件上传格式");
        }
        files.setObjectType(objectType);

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

@ -20,6 +20,7 @@ import com.yihu.jw.sms.service.ZBSmsService;
import com.yihu.jw.sms.service.ZhongShanSMSService;
import com.yihu.jw.sms.util.ykyy.vo.ResultMsg;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.utils.StringUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -359,11 +360,26 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
                        if(mixEnvelop.getStatus() == 200) {
                            JSONObject jdObject = ykyyEntranceService.patientJDKH(idCard,familyName,username,medicare,clinicId);
                            if (jdObject.getInteger("status")!=200){
                                mixEnvelop.setStatus(408);
                                mixEnvelop.setStatus(410);
                                mixEnvelop.setMessage(jdObject.getString("message"));
                                return mixEnvelop;
                            }
                        }else {
                            if (mixEnvelop.getStatus()==409){
                                if (medicare==null||medicare==""){
                                    mixEnvelop.setStatus(408);
                                    mixEnvelop.setMessage("社保卡号为空无法建档!请核对社保卡号!");
                                    return mixEnvelop;
                                }
                                JSONObject jdObject = ykyyEntranceService.patientJDKH(idCard,familyName,username,medicare,clinicId);
                                if (jdObject.getInteger("status")!=200){
                                    mixEnvelop.setStatus(410);
                                    mixEnvelop.setMessage(jdObject.getString("message"));
                                    return mixEnvelop;
                                }else {
                                    mixEnvelop = wlyyFamilyMemberService.addFamily(id, patientId, familyName, dictId, cardType, idCard, username, false, medicareType, medicare, clinicId);
                                }
                            }
                            return mixEnvelop;
                        }
                    }

+ 111 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -837,6 +837,117 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.pushListDrug)
    @ApiOperation(value = "财务报表导出", notes = "财务报表导出")
    public Envelop pushListDrug(@ApiParam(name = "type", value = "1收入日报2预缴金报表3资金分部报表4药品汇总表5药品明细表")
                                 @RequestParam(value = "type", required = true) String type,
                                 @ApiParam(name = "startTime", value = "开始时间,yyyy-MM-dd")
                                 @RequestParam(value = "startTime", required = false) String startTime,
                                 @ApiParam(name = "endTime", value = "结束时间,yyyy-MM-dd")
                                 @RequestParam(value = "endTime", required = false) String endTime,
                                @ApiParam(name = "businessType", value = "1查询2导出")
                                    @RequestParam(value = "businessType", required = false) String businessType,
                                 HttpServletResponse response) throws Exception {
        try{
            List<Map<String, Object>> list = new ArrayList<>();
            if (type.equalsIgnoreCase("1")){
                //收入日报
                list = prescriptionService.selectPriceTotal(startTime,endTime);
            }else if (type.equalsIgnoreCase("2")){
                //预缴金报表
                list = prescriptionService.selectCardPriceTotal(startTime,endTime);
            }else if (type.equalsIgnoreCase("3")){
                //资金分部报表
                list = prescriptionService.selectTotal(startTime,endTime);
            }else if (type.equalsIgnoreCase("4")){
                //药品汇总表
                list = prescriptionService.selectDoctorTotal(startTime,endTime);
            }else if (type.equalsIgnoreCase("5")){
                //药品明细表
                list = prescriptionService.selectDrugTotal(startTime,endTime);
            }
            if (businessType.equalsIgnoreCase("2")){
                if (type.equalsIgnoreCase("1")){
                    response.setContentType("octets/stream");
                    response.setHeader("Content-Disposition", "attachment; filename=" + new String("pushDataListPriceTotal.xls"));
                    OutputStream os = response.getOutputStream();
                    prescriptionService.pushListWritePriceTotal(os, list,startTime,endTime);
                }else if (type.equalsIgnoreCase("2")){
                    response.setContentType("octets/stream");
                    response.setHeader("Content-Disposition", "attachment; filename=" + new String("pushListCardPriceTotal.xls"));
                    OutputStream os = response.getOutputStream();
                    prescriptionService.pushListCardPriceTotal(os, list,startTime,endTime);
                }else if (type.equalsIgnoreCase("3")){
                    response.setContentType("octets/stream");
                    response.setHeader("Content-Disposition", "attachment; filename=" + new String("pushListTotal.xls"));
                    OutputStream os = response.getOutputStream();
                    prescriptionService.pushListTotal(os, list,startTime,endTime);
                }else if (type.equalsIgnoreCase("4")){
                    response.setContentType("octets/stream");
                    response.setHeader("Content-Disposition", "attachment; filename=" + new String("pushListDoctorTotal.xls"));
                    OutputStream os = response.getOutputStream();
                    prescriptionService.pushListDoctorTotal(os, list,startTime,endTime);
                }else if (type.equalsIgnoreCase("5")){
                    response.setContentType("octets/stream");
                    response.setHeader("Content-Disposition", "attachment; filename=" + new String("pushListDrugTotal.xls"));
                    OutputStream os = response.getOutputStream();
                    prescriptionService.pushListDrugTotal(os, list,startTime,endTime);
                }
            }
            return success(list);
        }catch (Exception e) {
            return failedMixEnvelopException(e);
        }
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.selectListDrug)
    @ApiOperation(value = "财务报表导出", notes = "财务报表导出")
    public Envelop selectListDrug(@ApiParam(name = "type", value = "1收入日报2预缴金报表3资金分部报表4药品汇总表5药品明细表")
                                @RequestParam(value = "type", required = true) String type,
                                @ApiParam(name = "startTime", value = "开始时间,yyyy-MM-dd")
                                @RequestParam(value = "startTime", required = false) String startTime,
                                @ApiParam(name = "endTime", value = "结束时间,yyyy-MM-dd")
                                @RequestParam(value = "endTime", required = false) String endTime,
                                @ApiParam(name = "businessType", value = "1查询2导出")
                                @RequestParam(value = "businessType", required = false) String businessType,
                                HttpServletResponse response) throws Exception {
        try{
            List<Map<String, Object>> list = new ArrayList<>();
            if (type.equalsIgnoreCase("1")){
                //收入日报
                list = prescriptionService.selectPriceTotal(startTime,endTime);
            }else if (type.equalsIgnoreCase("2")){
                //预缴金报表
                list = prescriptionService.selectCardPriceTotal(startTime,endTime);
            }else if (type.equalsIgnoreCase("3")){
                //预缴金报表
                list = prescriptionService.selectTotal(startTime,endTime);
            }else if (type.equalsIgnoreCase("4")){
                //药品汇总表
                list = prescriptionService.selectDoctorTotal(startTime,endTime);
            }else if (type.equalsIgnoreCase("5")){
                //药品汇总表
                list = prescriptionService.selectDrugTotal(startTime,endTime);
            }
            if (businessType.equalsIgnoreCase("2")){
                if (type.equalsIgnoreCase("1")){
                    response.setContentType("octets/stream");
                    response.setHeader("Content-Disposition", "attachment; filename=" + new String("pushDataListPriceTotal.xls"));
                    OutputStream os = response.getOutputStream();
                    prescriptionService.pushListWritePriceTotal(os, list,startTime,endTime);
                }
            }
            return success(list);
        }catch (Exception e) {
            return failedMixEnvelopException(e);
        }
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.searchRecordWrite)
    @ApiOperation(value = "咨询记录导出", notes = "咨询记录导出")
    public Envelop searchRecordWrite(@ApiParam(name = "doctor", value = "医生id")