Переглянути джерело

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

huangwenjie 7 роки тому
батько
коміт
8c1dd69e97

+ 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));
            }
        });
        //加收项目

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

@ -925,29 +925,6 @@
            var formData = new FormData()
			formData.append('file', file)
            console.log(formData)
            $.ajax({
                url: ctx + "/admin/specialist/serviceItem/updateServiceItem",
                method: "post",
                dataType: "json",
                async: true,
                data: {
                    formData:formData,
                    contentType: false,
                    cache: false,
                    processData: false
                },
                success:function (res) {
                    console.log(res)
                    if (res.status == 200){
                        layer.alert('操作成功!', {
                            icon: 1,
                        },function () {
                            layer.closeAll();
                            init();
                        })
                    }
                }
            })
        }
    </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);
}

+ 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);
    }
    /**
     * 获取转诊通知

+ 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);

+ 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, "查询失败!");
        }
    }
    /**
     * 转诊消息
     *