Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

zd_123 7 years ago
parent
commit
d364cd16ab
18 changed files with 432 additions and 97 deletions
  1. 4 4
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/specialist/ServiceItemController.java
  2. 12 12
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/specialist/SpecialistServiceItemDO.java
  3. 4 4
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/specialist/ServiceItemService.java
  4. 193 31
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/desizenMan/service_project_management.jsp
  5. 89 22
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/specialty/index.jsp
  6. 6 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java
  7. 10 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java
  8. 18 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java
  9. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java
  10. 7 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistEvaluateSevice.java
  11. 20 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java
  12. 24 7
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/rehabilitation/RehabilitationManageService.java
  13. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/task/PushMsgTask.java
  14. 26 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/message/DoctorMessageController.java
  15. 11 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/SpecialistController.java
  16. 3 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/rehabilitation/DoctorRehabilitationManageController.java
  17. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/family/FamilyMemberController.java
  18. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/specialist/rehabilitation/PatientRehabilitationManageController.java

+ 4 - 4
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/specialist/ServiceItemController.java

@ -14,8 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
@ -142,15 +142,15 @@ public class ServiceItemController  extends BaseController {
    /**
     * 服务项目导数据
     *
     * @param request
     * @param formData
     * @return
     */
    @RequestMapping(value = "importData", produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String importData(HttpServletRequest request) {
    public String importData(@RequestParam(name = "formData") MultipartFile formData) {
        try {
            request.setCharacterEncoding("UTF-8");
            InputStream inputStream = request.getInputStream();
            InputStream inputStream = formData.getInputStream();
            Workbook workbook = Workbook.getWorkbook(inputStream);
            serviceItemService.importData(workbook);

+ 12 - 12
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/specialist/SpecialistServiceItemDO.java

@ -53,16 +53,16 @@ public class SpecialistServiceItemDO extends IdEntityWithOperation implements Se
    private Integer hospitalGrade; //医院等级
    @Column(name = "three_hospitals")
    private Integer threeHospitals; //三级医院收费标准
    private Double threeHospitals; //三级医院收费标准
    @Column(name = "two_hospitals")
    private Integer twoHospitals; //二级医院收费标准
    private Double twoHospitals; //二级医院收费标准
    @Column(name = "one_hospitals")
    private Integer oneHospitals;//一级医院以及一级以下的社区医院
    private Double oneHospitals;//一级医院以及一级以下的社区医院
    @Column(name = "unit")
    private Integer unit; //计价单位
    private String unit; //计价单位
    @Column(name = "add_item")
    private String addItem;//加收项目
@ -177,38 +177,38 @@ public class SpecialistServiceItemDO extends IdEntityWithOperation implements Se
    }
    @Column(name = "three_hospitals")
    public Integer getThreeHospitals() {
    public Double getThreeHospitals() {
        return threeHospitals;
    }
    public void setThreeHospitals(Integer threeHospitals) {
    public void setThreeHospitals(Double threeHospitals) {
        this.threeHospitals = threeHospitals;
    }
    @Column(name = "two_hospitals")
    public Integer getTwoHospitals() {
    public Double getTwoHospitals() {
        return twoHospitals;
    }
    public void setTwoHospitals(Integer twoHospitals) {
    public void setTwoHospitals(Double twoHospitals) {
        this.twoHospitals = twoHospitals;
    }
    @Column(name = "one_hospitals")
    public Integer getOneHospitals() {
    public Double getOneHospitals() {
        return oneHospitals;
    }
    public void setOneHospitals(Integer oneHospitals) {
    public void setOneHospitals(Double oneHospitals) {
        this.oneHospitals = oneHospitals;
    }
    @Column(name = "unit")
    public Integer getUnit() {
    public String getUnit() {
        return unit;
    }
    public void setUnit(Integer unit) {
    public void setUnit(String unit) {
        this.unit = unit;
    }

+ 4 - 4
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/specialist/ServiceItemService.java

@ -263,14 +263,14 @@ public class ServiceItemService extends BaseService {
        dataMap.put(6, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setThreeHospitals(Integer.parseInt(data));
                specialistServiceItemDO.setThreeHospitals(Double.parseDouble(data));
            }
        });
        //二级医院收费
        dataMap.put(7, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setTwoHospitals(Integer.parseInt(data));
                specialistServiceItemDO.setTwoHospitals(Double.parseDouble(data));
            }
        });
@ -278,14 +278,14 @@ public class ServiceItemService extends BaseService {
        dataMap.put(8, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setOneHospitals(Integer.parseInt(data));
                specialistServiceItemDO.setOneHospitals(Double.parseDouble(data));
            }
        });
        //计价单位
        dataMap.put(9, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setUnit(Integer.parseInt(data));
                specialistServiceItemDO.setUnit((data));
            }
        });
        //加收项目

+ 193 - 31
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/desizenMan/service_project_management.jsp

@ -6,6 +6,31 @@
		<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
		<link href="${ctx}/static/desizenMan/css/bootstrap-treeview.min.css" rel="stylesheet" />
		<style type="text/css">
			.flex{
				display:-webkit-box;
				display:-webkit-flex;
				display:flex;
			}
			.flex-sp-b{
				justify-content: space-between;
				-webkit-justify-content: space-between;
			}
			.flex-sp-a{
				justify-content: space-around;
				-webkit-justify-content: space-around;
			}
			.flex-sp-c{
				justify-content: center;
				-webkit-justify-content: center;
			}
			.flex-sp-end{
				justify-content: flex-end;
				-webkit-justify-content: flex-end;
			}
			.flex-cz-c{
				-webkit-align-items:center;
				align-items:center;
			}
			.icon{width: 20px;height: 20px;vertical-align: sub;background-size: 100% 100%;background-repeat: no-repeat;display: inline-block;}
			.icon15{width: 15px;height: 15px;}
			.icon30{width: 30px;height: 30px;}
@ -61,9 +86,96 @@
			.webuploader-pick{
				display: initial;background-color: transparent;
			}
            .lay-box-3 .lay{
            width: 420px!important;
            height: 260px;
        }
        .lay-box-3 .lay .title{
            width: 100%;
        }
        .lay-box-3 .lay .file{
            width: 370px;height: 30px;margin: 20px auto;position: relative;
        }
        .lay-box-3 .lay .file span{
            font-size: 12px;color: #333;
        }
        .lay-box-3 .lay .file input:nth-of-type(1){
            width: 200px;height: 30px;border: solid 1px #d0d0d0;background-color: #fff!important;
        }
        .lay-box-3 .lay .file input:nth-of-type(2){
            width: 90px;
            height: 30px;
            background-color: #2d9bd2;
            border-radius: 2px;
            font-size: 12px;
            color: #fff;
            opacity: 0;
            z-index: 99;
        }
        .lay-box-3 .lay .file button{
            width: 90px;
            height: 30px;
            background-color: #2d9bd2;
            border: none;
            border-radius: 2px;
            font-size: 12px;
            color: #fff;
            position: absolute;
            right: 0;
            z-index: 1;
        }
        .lay-box-3 .lay a{
            display: block;
            margin-left: 87px;
            font-size: 12px;color: #2d9bd2;
        }
        .lay-box-3 .lay p {
            font-size: 12px;color: #eb4b3c;text-align: center;
        }
        .lay-box-3 .lay .lay-button{
            text-align: center;margin-top: 40px;
        }
        .lay-box-3 .lay .lay-button button{
            width: 99px;
            height: 35px;
            background-color: #2d9bd2;
            border-radius: 2px;
            border: none;
            color:#fff;
            font-size: 14px;
        }
        .lay-box-3 .lay .lay-button button:nth-of-type(2){
            background-color: #b9c8d2;
        }
		.lay .title{
			 width: 680px;height: 40px;line-height: 40px;background-color: #fff;background-color: #2d9bd2;
			 font-size: 14px;color: #fff;padding-left: 20px;padding-right: 10px;
		 }
		</style>
	</head>
	<body>
        <div class="lay-box-3-1" style="display:none">
            <div class="lay-box-3">
                <div class="lay">
                    <div class="title flex flex-sp-b flex-cz-c">
                        <span>批量导入</span>
                        <img class="closePage" src="${ctx}/static/specialty/images/Close_btn.png" alt="">
                    </div>
                    <div class="file flex flex-sp-b flex-cz-c">
                        <span>导入文件:</span>
                        <input type="text" class="fileName" disabled>
                        <input id="uploadfile" type="file" value="选择" onchange="auploadFile(event)">
                        <button>选择</button>
                    </div>
                    <a href="">模板下载</a>
                    <p>请核对导入数据,若导入项目信息已存在,将会更新项目表中的数据。</p>
                    <div class="lay-button">
                        <button onclick="submitFile()">确认</button>
                        <button class="closePage">取消</button>
                    </div>
                </div>
            </div>
        </div>
		<div class="operation-box clearfix">
			<div class="pull-left">
				<div class="form-inline">
@ -645,7 +757,7 @@
                    shadeClose: true,
                    shade: 0.8,
                    area: ['1020px', '700px'],
                    content: '/admin/specialist/hospitalServiceItem/initial1' //iframe的url
                    content: ctx + '/admin/specialist/hospitalServiceItem/initial1' //iframe的url
				})
			})
//			获取检查费(项目机构)
@ -673,36 +785,86 @@
                    })
                }
            }
//            上传文件
            var uploader = $("#btn_import").webupload({
                server: ctx + "/admin/specialist/hospitalServiceItem/importData",
                pick: {id: '#div_file_picker'},
                accept: {
                    title: 'Excel',
                    extensions: 'xls',
                    mimeTypes: '.xls'
                },
                auto: true
            });
            uploader.on('beforeSend', function (file, data, headers) {
                console.log(file, data, headers)
            });
            uploader.on('uploadProgress', function (file, percentage) {
                console.log('正在保存中,请稍候...')
                $.ligerDialog.waitting('正在保存中,请稍候...');
            });
            uploader.on('uploadError', function (file) {
                console.log(file);
                $.ligerDialog.closeWaitting();
                $.Notice.error("上传失败!");
            });
            uploader.on('uploadSuccess', function (file, resp) {
                console.log(file, resp)
                $.ligerDialog.closeWaitting();
                $.Notice.success("上传成功。");
            });
            // 选择上传文件
            function auploadFile(e){
                console.log(e);
                var file = ''
                var arr =e.target && e.target.files;
                file= arr[0].name
                console.log(file)
                $('.fileName').val(file)
            }
            // 上传文件
            function submitFile(){
                var file = document.getElementById("uploadfile").files[0];
                var _formData = new FormData()
                _formData.append('file', file)
                var index = layer.load(2);
                console.log(_formData)
                $.ajax({
                    url: ctx + "/admin/specialist/hospitalServiceItem/importData",
                    method: "POST",
                    dataType: "json",
                    async: true,
                    contentType: false,
                    cache: false,
                    processData: false,
                    data: _formData,
                    success:function (res) {
                        console.log(res)
                        layer.close(index);
                        if (res.status == 200){
                            layer.confirm('上传成功!', {
                                title: '提示',
                                skin: 'layui-layer-blue', //样式类名
                                anim:4,
                                btn: ['确定'] //按钮
                            },function () {
                                layer.closeAll();
                                init();
                            });
//                        layer.alert('操作成功!', {
//                            icon: 1,
//                        },function () {
//                            layer.closeAll();
//                            init();
//                        })
                        }
                    },
                    error:function (res) {
                        layer.close(index);
                        layer.confirm('上传失败!', {
                            title: '提示',
                            skin: 'layui-layer-blue', //样式类名
                            anim:4,
                            btn: ['确定'] //按钮
                        },function () {
                            layer.closeAll();
                            init();
                        });
//                    layer.alert('上传失败!', {
//                        icon: 1,
//                    },function () {
//                        layer.closeAll();
//                        init();
//                    })
                    }
                })
            }
            $('#div_file_picker').on('click',function(){
                layer.open({
                    offset: '240px',
                    type:1,
                    title:'',
                    closeBtn:false,
                    content: $('.lay-box-3-1').html(),
                    area: ['420px', '260px']
                })
            })
            //        关闭弹窗
            $(document).on('click','.closePage',function () {
                layer.closeAll()
            })
		</script>
	</body>
</html>

+ 89 - 22
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/specialty/index.jsp

@ -9,6 +9,10 @@
    <link rel="stylesheet" href="${ctx}/static/specialty/layui/css/layui.css">
    <link rel="stylesheet" href="${ctx}/static/specialty/css/index.css">
    <style>
        .layui-layer-blue .layui-layer-title{background-color: #2d9bd2;color: #fff;}
        .layui-layer-blue .layui-layer-close1{background-color: #fff;border-radius: 100%;background-image: none;position: relative;width: 20px;height: 20px;margin-top: -4px;}
        .layui-layer-blue .layui-layer-close1:after{content: '×';position: absolute;font-size: 20px;top: 0;color: #2d9bd2;width: 20px;left: 4px;}
        .layui-layer-blue .layui-layer-content{padding: 30px 50px 50px!important;}
        .lay-box-3 .lay{
            width: 420px!important;
            height: 260px;
@ -215,26 +219,29 @@
            </div>
        </div>
    </div>
    <div class="lay-box-3" style="display:none">
        <div class="lay">
            <div class="title flex flex-sp-b flex-cz-c">
                <span>批量导入</span>
                <img class="closePage" src="${ctx}/static/specialty/images/Close_btn.png" alt="">
            </div>
            <div class="file flex flex-sp-b flex-cz-c">
                <span>导入文件:</span>
                <input type="text" class="fileName" disabled>
                <input id="uploadfile" type="file" value="选择" onchange="auploadFile(event)">
                <button>选择</button>
            </div>
            <a href="">模板下载</a>
            <p>请核对导入数据,若导入项目信息已存在,将会更新项目表中的数据。</p>
            <div class="lay-button">
                <button onclick="submitFile()">确认</button>
                <button>取消</button>
    <div class="lay-box-3-1" style="display:none">
        <div class="lay-box-3">
            <div class="lay">
                <div class="title flex flex-sp-b flex-cz-c">
                    <span>批量导入</span>
                    <img class="closePage" src="${ctx}/static/specialty/images/Close_btn.png" alt="">
                </div>
                <div class="file flex flex-sp-b flex-cz-c">
                    <span>导入文件:</span>
                    <input type="text" class="fileName" disabled>
                    <input id="uploadfile" type="file" value="选择" onchange="auploadFile(event)">
                    <button>选择</button>
                </div>
                <a href="">模板下载</a>
                <p>请核对导入数据,若导入项目信息已存在,将会更新项目表中的数据。</p>
                <div class="lay-button">
                    <button onclick="submitFile()">确认</button>
                    <button class="closePage">取消</button>
                </div>
            </div>
        </div>
    </div>
    
    <div class="content">
        <!-- 请选择项目类型 -->
        <div class="btn-group">
@ -305,7 +312,7 @@
            <div class="operation-group clearfix" role="group" aria-label="...">
                <button id="delete" type="button" class="btn btn-danger delete">
                    <i class="icon icon15 icon-delete"></i>&emsp;删除</button>
                <button type="button" class="btn btn-warning">批量导入</button>
                <button type="button" class="btn btn-warning" id="daoru">批量导入</button>
                <button id="add" type="button" class="btn btn-primary">新增项目</button>
            </div>
        </div>
@ -920,12 +927,72 @@
        }
        // 上传文件
        function submitFile(){
            debugger
            var file = document.getElementById("uploadfile").files[0];
            var formData = new FormData()
			formData.append('file', file)
            console.log(formData)
            var _formData = new FormData()
			_formData.append('file', file)
            console.log(_formData);
            var index = layer.load(2);
            $.ajax({
                url: ctx + "/admin/specialist/serviceItem/importData",
                method: "POST",
                dataType: "json",
                async: true,
                contentType: false,
                cache: false,
                processData: false,
                data: _formData,
                success:function (res) {
                    console.log(res)
                    layer.close(index);
                    if (res.status == 200){
                        layer.confirm('上传成功!', {
                            title: '提示',
                            skin: 'layui-layer-blue', //样式类名
                            anim:4,
                            btn: ['确定'] //按钮
                        },function () {
                            layer.closeAll();
                            init();
                        });
//                        layer.alert('操作成功!', {
//                            icon: 1,
//                        },function () {
//                            layer.closeAll();
//                            init();
//                        })
                    }
                },
                error:function (res) {
                    layer.close(index);
                    layer.confirm('上传失败!', {
                        title: '提示',
                        skin: 'layui-layer-blue', //样式类名
                        anim:4,
                        btn: ['确定'] //按钮
                    },function () {
                        layer.closeAll();
                        init();
                    });
//                    layer.alert('上传失败!', {
//                        icon: 1,
//                    },function () {
//                        layer.closeAll();
//                        init();
//                    })
                }
            })
        }
        // 导入按钮
        $('#daoru').on('click',function(){
            layer.open({
                offset: '240px',
                type:1,
                title:'',
                closeBtn:false,
                content: $('.lay-box-3-1').html(),
                area: ['420px', '260px']
            })
        })
    </script>
</body>

+ 6 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -126,7 +126,7 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query(" select a from Message a where a.type=?2 and a.del='1' and a.read=1 and a.receiver=?1 and a.over='1' order by a.createTime desc ")
    List<Message> findUnReadByReceiverAndType(String receiver,Integer type);
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type = 16 order by a.czrq desc")
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type in (16,20,22,23) order by a.czrq desc")
    List<Message> getSpecialistApply(String receiver,Integer read,String over);
    @Query("select a from Message a where a.receiver = ?1 and a.state = 1 and a.type = 17 order by a.czrq desc")
@ -141,15 +141,18 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type = 17 order by a.czrq desc")
    List<Message> getFamilyTransferReadAndOver(String receiver,Integer read,String over);
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type in (16,19,20,21,22) order by a.czrq desc")
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type in (16,20,22,23) order by a.czrq desc")
    List<Message> getSpecialistUntreated(String receiver,Integer read,String over,Pageable pageable);
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type in (16,19,20,21,22,23) order by a.czrq desc")
    List<Message> getSpecialistMessages(String receiver,Integer read,String over,Pageable pageable);
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type in (17) order by a.czrq desc")
    List<Message> getTransferMessage(String receiver,Integer read,String over,Pageable pageable);
    @Query("select a from Message a where a.code = ?1")
    Message findByCode(String code);
    @Query("select a from Message a where a.read = 1 and a.receiver = ?1 and a.state = 1 and a.type in (19,20,21,22) order by a.czrq desc")
    @Query("select a from Message a where a.read = 1 and a.over = 0 and a.receiver = ?1 and a.state = 1 and a.type in (19,20,21,22,23) order by a.czrq desc")
    List<Message> getSpecialistUnRead(String receiver);
}

+ 10 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -21,6 +21,7 @@ import com.yihu.wlyy.service.app.account.PatientInfoService;
import com.yihu.wlyy.service.app.health.PatientHealthIndexService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.service.specialist.SpecialistService;
import com.yihu.wlyy.service.specialist.rehabilitation.RehabilitationManageService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdCardUtil;
import org.apache.commons.collections.map.HashedMap;
@ -84,6 +85,8 @@ public class SignPatientLabelInfoService extends BaseService {
    PatientHealthIndexService patientHealthIndexService;
    @Autowired
    SpecialistService specialistService;
    @Autowired
    RehabilitationManageService rehabilitationManageService;
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
@ -273,7 +276,13 @@ public class SignPatientLabelInfoService extends BaseService {
        }else{
            json.put("isSpecialist",0);
        }
        //1.5.0 是否有康复计划
        JSONArray planList = rehabilitationManageService.planListByPatient(patient);
        if(planList!=null&&planList.length()>0){
            json.put("havePlan",1);
        }else{
            json.put("havePlan",0);
        }
        return json;
    }

+ 18 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java

@ -940,6 +940,24 @@ public class MessageService extends BaseService {
        return messageDao.getSpecialistUntreated(message.getReceiver(),message.getRead(),message.getOver(),pageRequest);
    }
    /**
     * 获取待处理的接口
     *
     * @param message {}
     * @param page 页码
     * @param size 分页大小
     * @return
     * @throws Exception
     */
    public List<Message> getSpecialistMessages(Message message, Integer page, Integer size) throws Exception{
        // 排序
        Sort sort = new Sort(Sort.Direction.DESC, "read","over","createTime");
        // 分页信息
        Pageable pageRequest = new PageRequest(page - 1, size, sort);
        return messageDao.getSpecialistMessages(message.getReceiver(),message.getRead(),message.getOver(),pageRequest);
    }
    /**
     * 获取转诊通知

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java

@ -5821,7 +5821,7 @@ public class StatisticsESService {
            creditsSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_93, SaveModel.timeLevel_DDL,slaveKey1);//活动获取积分人次总量
            resultMap = applyList(index_1,index_89,area,level, sort,lowLevel,slaveKey1,resultMap);//列表
        }else{
            activitySaveModel = elasticsearchUtil.findOneDateQuotaLevel0(timeKey, area, level, index_89, SaveModel.timeLevel_DDL);//活动报名人次总量
            activitySaveModel = elasticsearchUtil.findOneDateQuotaLevel0(timeKey, area, level, index_91, SaveModel.timeLevel_DDL);//活动报名人次总量
            participantSaveModel = elasticsearchUtil.findOneDateQuotaLevel0(timeKey, area, level, index_92, SaveModel.timeLevel_DDL);//活动参与人次总量
            creditsSaveModel = elasticsearchUtil.findOneDateQuotaLevel0(timeKey, area, level, index_93, SaveModel.timeLevel_DDL);//活动获取积分人次总量
            resultMap = applyList(index_1,index_91,area,level, sort,lowLevel,slaveKey1,resultMap);//列表

+ 7 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistEvaluateSevice.java

@ -125,22 +125,27 @@ public class SpecialistEvaluateSevice extends BaseService {
//            Doctor sendDoctor = doctorDao.findByCode(message.getSender());
            Doctor receiverDoctor = doctorDao.findByCode(message.getReceiver());
            if (message.getType() == 19 ){
                message.setOver("0");//未处理
                message.setType(19);
                message.setTitle("康复计划-受理提醒");
                message.setContent("您的"+patient.getName()+"签约居民,刚刚出院,"+(hospital!=null?hospital.getName():"")+"已完成康复计划的制定,请查看");
            }else if (message.getType() == 20){
                message.setOver("1");//未处理
                message.setType(20);
                message.setTitle("康复计划-待办工作提醒");
                message.setContent("您的"+patient.getName()+"签约居民"+num+"天后计划到"+(hospital!=null?hospital.getName():"")+"复诊,请查看");
            }else if (message.getType() == 21){
                message.setOver("0");//未处理
                message.setType(21);
                message.setTitle("康复计划-服务进展提醒");
                message.setContent("您的"+patient.getName()+"签约居民已完成康复计划今日项目,请查看");
            }else if (message.getType() == 22){
                message.setOver("1");//未处理
                message.setType(22);
                message.setTitle("康复计划-服务进展提醒");
                message.setContent("您的"+patient.getName()+"签约居民未完成康复计划今天项目,请尽快处理");
            }else if (message.getType() == 23){
                message.setOver("1");//未处理
                message.setType(23);
                message.setTitle("康复计划-服务进展提醒");
                message.setContent("您的"+patient.getName()+"签约居民今日有"+num+"个康复计划项目待完成,请尽快处理");
@ -150,9 +155,10 @@ public class SpecialistEvaluateSevice extends BaseService {
//            message.setSenderPhoto(sendDoctor.getPhoto());
//            message.setSex(sendDoctor.getSex());
            message.setReadonly(1);//是否只读消息
            message.setOver("1");//未处理
            message.setDel("1");
            message.setState(1);
            message.setRead(1);
            message.setCzrq(new Date());
            message.setReceiverName(receiverDoctor.getName());
            message.setData(patientCode);

+ 20 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java

@ -41,10 +41,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
 * Created by Trick on 2018/5/31.
@ -862,5 +859,24 @@ public class SpecialistService extends BaseService {
        }
        throw new Exception("请求获取居民信息失败!");
    }
    public List<Map<String,Object>> findPatientSignFamily(String patient) throws Exception {
        SignFamily signFamily = signFamilyDao.findSignFamilyByPatient(patient);
        List<Map<String,Object>> resultList = new ArrayList<>();
        if(signFamily!=null){
            Map<String,Object> map = new HashMap<>();
            map.put("doctorName",signFamily.getDoctorHealthName());
            map.put("doctorCode",signFamily.getDoctorHealth());
            map.put("doctorType","健管师");
            resultList.add(map);
            map = new HashMap<>();
            map.put("doctorName",signFamily.getDoctorName());
            map.put("doctorCode",signFamily.getDoctor());
            map.put("doctorType","全科医生");
            resultList.add(map);
        }
        return resultList;
    }
}

+ 24 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/rehabilitation/RehabilitationManageService.java

@ -79,6 +79,7 @@ public class RehabilitationManageService extends BaseService {
    private String updateNoteAndImageRehabilitationOperate ="/svr-specialist/updateNoteAndImageRehabilitationOperate";//康复计划完成时更新服务完成笔记和图片接口;
    private String updatePlanDetailStatusById = "/svr-specialist/updatePlanDetailStatusById";//康复管理-更新康复计划服务项目状态
    private String planSchedule = "/svr-specialist/planSchedule";//康复管理-计划总进度
    private String planListByPatient = "/svr-specialist/planListByPatient";//康复管理-根据居民获取康复计划
    /************************************************************* end ************************************************************************/
    /**
@ -139,17 +140,19 @@ public class RehabilitationManageService extends BaseService {
     * @return
     * @throws Exception
     */
    public JSONObject findRehabilitationPlanDetailList(String doctorCode,String patientCode) throws Exception{
    public JSONArray findRehabilitationPlanDetailList(String doctorCode,String patientCode) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("doctorCode", doctorCode);
        param.put("patientCode", patientCode);
        HttpResponse response = HttpUtils.doGet(specialistUrl + findRehabilitationPlanDetailList, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            JSONObject jsonObject = result.getJSONObject("obj");
            Patient p = patientDao.findByCode(patientCode);
            jsonObject.put("patientPhoto",p.getPhoto());
            return jsonObject;
            JSONArray jsonArray = result.getJSONArray("obj");
            for(int i=0;i<jsonArray.length();i++){
                Patient p = patientDao.findByCode(patientCode);
                jsonArray.getJSONObject(i).put("patientPhoto",p.getPhoto());
            }
            return jsonArray;
        }
        throw new Exception("请求微服务失败!");
    }
@ -352,8 +355,9 @@ public class RehabilitationManageService extends BaseService {
            json.put("sex",sex);
            json.put("healthyCondition","康复期");
            json.put("signHospitalName",signHospitalName);
            json.put("photo",patientDao.findByCode(patientCode).getPhoto());
            Patient patient = patientDao.findByCode(patientCode);
            json.put("photo",patient.getPhoto());
            json.put("mobile",patient.getMobile());
            JSONArray jsonArray = result.getJSONObject("obj").getJSONArray("serviceDoctorList");
            String doctorCode ="";
            Doctor doctor = null;
@ -632,4 +636,17 @@ public class RehabilitationManageService extends BaseService {
        }
        throw new Exception("请求微服务失败!");
    }
    public JSONArray planListByPatient(String patient) throws Exception {
        Map<String, Object> param = new HashedMap();
        param.put("patient", patient);
        HttpResponse response = HttpUtils.doGet(specialistUrl + planListByPatient, param);
        if(StringUtils.isNotBlank(response.getContent())) {
            JSONObject result = new JSONObject(response.getContent());
            if(result.getInt("status")==200){
                return result.getJSONArray("obj");
            }
        }
        throw new Exception("请求微服务失败!");
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/task/PushMsgTask.java

@ -851,7 +851,7 @@ public class PushMsgTask {
                keyword2.setValue(json.getString("keyword2"));
                m.put("keyword2", keyword2);
            }else if (type==25){
                temp.setUrl(url + "yszx/html/manyidu.html?openid=" + openid + "&serviceItemId=" + json.getString("serviceItemId") + "&toUser=" + json.getString("toUser") + "&toName=" + name + "&represented=" + json.getString("represented")+"&doctor="+json.getString("doctor"));
                temp.setUrl(url + "qygl/html/service_score.html?openid=" + openid + "&serviceItemId=" + json.getString("serviceItemId") + "&toUser=" + json.getString("toUser") + "&toName=" + name + "&represented=" + json.getString("represented")+"&doctor="+json.getString("doctor"));
                temp.setTemplate_id(template_doctor_survey);
                WechatTemplateData keyword1 = new WechatTemplateData();
                keyword1.setColor("#000000");

+ 26 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/message/DoctorMessageController.java

@ -589,6 +589,32 @@ public class DoctorMessageController extends BaseController {
    }
    @RequestMapping(value = "getSpecialistMessages",method = RequestMethod.GET)
    @ApiOperation("专科医生待处理列表")
    @ResponseBody
    public String getSpecialistMessage(@ApiParam(name = "message",value = "消息对象")@RequestParam(value = "message")String message,
                                @ApiParam(name="page",value="第几页",defaultValue = "1") @RequestParam(value="page",required = true) String page,
                                @ApiParam(name="pageSize",value="",defaultValue = "10") @RequestParam(value="pageSize",required = true) String pageSize){
        if (StringUtils.isBlank(pageSize)) {
            pageSize = "10";
        }
        if (page.equals("0")) {
            page = "1";
        }
        Message message1 = new Message();
        com.alibaba.fastjson.JSONObject object = JSON.parseObject(message);
        message1.setOver(object.getString("over"));
        message1.setRead(object.getInteger("read"));
        message1.setReceiver(getUID());
        try {
            return write(200,"查询成功!","data",messageService.getSpecialistMessages(message1,Integer.valueOf(page),Integer.valueOf(pageSize)));
        }catch (Exception e){
            error(e);
            return error( -1, "查询失败!");
        }
    }
    /**
     * 转诊消息
     *

+ 11 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/SpecialistController.java

@ -392,4 +392,15 @@ public class SpecialistController extends WeixinBaseController {
        }
    }
    @RequestMapping(value = "/findPatientSignFamily", method = RequestMethod.GET)
    @ApiOperation(value = "获取居民所有专科医生签约信息")
    public String findPatientSignFamily(@ApiParam(name = "patient", value = "居民code") @RequestParam(required = true)String patient) throws Exception {
        try {
            return write(200, "获取成功", "data", specialistService.findPatientSignFamily(patient));
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
}

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/rehabilitation/DoctorRehabilitationManageController.java

@ -76,7 +76,7 @@ public class DoctorRehabilitationManageController extends BaseController {
            if(!StringUtils.isNotEmpty(doctorCode)){
                doctorCode = getRepUID();
            }
            JSONObject result = rehabilitationManageService.findRehabilitationPlanDetailList(doctorCode,patientCode);
            JSONArray result = rehabilitationManageService.findRehabilitationPlanDetailList(doctorCode,patientCode);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
@ -93,7 +93,7 @@ public class DoctorRehabilitationManageController extends BaseController {
                                     @RequestParam(value = "executeEndTime", required = true)String executeEndTime,
                                     @ApiParam(name = "planId", value = "计划id", required = true)
                                     @RequestParam(value = "planId", required = true)String planId,
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、随访,3、复诊,4、健康教育)", required = false)
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、健康教育,3、复诊,4、随访)", required = false)
                                     @RequestParam(value = "searchTask", required = false)Integer searchTask,
                                     @ApiParam(name = "doctorCode", value = "医生code(专科医生、家庭医生)", required = false)
                                     @RequestParam(value = "doctorCode", required = false)String doctorCode,
@ -120,7 +120,7 @@ public class DoctorRehabilitationManageController extends BaseController {
                                     @RequestParam(value = "executeEndTime", required = true)String executeEndTime,
                                     @ApiParam(name = "planId", value = "计划id", required = true)
                                     @RequestParam(value = "planId", required = true)String planId,
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、随访,3、复诊,4、健康教育)", required = false)
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、健康教育,3、复诊,4、随访)", required = false)
                                     @RequestParam(value = "searchTask", required = false)Integer searchTask,
                                     @ApiParam(name = "doctorCode", value = "医生code(专科医生、家庭医生)", required = false)
                                     @RequestParam(value = "doctorCode", required = false)String doctorCode,

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/family/FamilyMemberController.java

@ -235,7 +235,7 @@ public class FamilyMemberController extends WeixinBaseController {
    @ApiOperation(value = "家庭成员(有授权)查询")
    public String getAuthorizeFamilyMembers(){
        try {
            JSONArray result = familyMemberService.getAuthorizeMembers(getLastUid());
            JSONArray result = familyMemberService.getAuthorizeMembers(getUID());
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/specialist/rehabilitation/PatientRehabilitationManageController.java

@ -58,7 +58,7 @@ public class PatientRehabilitationManageController extends BaseController {
                                     @RequestParam(value = "executeEndTime", required = true)String executeEndTime,
                                     @ApiParam(name = "planId", value = "计划id", required = true)
                                     @RequestParam(value = "planId", required = true)String planId,
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、随访,3、复诊,4、健康教育)", required = false)
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、健康教育,3、复诊,4、随访)", required = false)
                                     @RequestParam(value = "searchTask", required = false)Integer searchTask,
                                     @ApiParam(name = "status", value = "任务状态(0未完成,1已完成,2已预约)", required = false)
                                     @RequestParam(value = "status", required = false)Integer status){
@ -93,7 +93,7 @@ public class PatientRehabilitationManageController extends BaseController {
                                         @RequestParam(value = "executeEndTime", required = true)String executeEndTime,
                                         @ApiParam(name = "planId", value = "计划id", required = true)
                                         @RequestParam(value = "planId", required = true)String planId,
                                         @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、随访,3、复诊,4、健康教育)", required = false)
                                         @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、健康教育,3、复诊,4、随访)", required = false)
                                         @RequestParam(value = "searchTask", required = false)Integer searchTask,
                                         @ApiParam(name = "status", value = "任务状态(0未完成,1已完成,2已预约)", required = false)
                                         @RequestParam(value = "status", required = false)Integer status){