Quellcode durchsuchen

管理端报表BUG修改

huangwenjie vor 7 Jahren
Ursprung
Commit
5a178c775a
18 geänderte Dateien mit 704 neuen und 26 gelöschten Zeilen
  1. 2 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/config/SpringSecurityConfig.java
  2. 21 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/DeviceStaticController.java
  3. 80 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/device/DeviceHealthIndexController.java
  4. 0 2
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/device/WlyyDeviceController.java
  5. 81 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/device/WlyyPatientDeviceController.java
  6. 98 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/device/entity/DeviceHealthIndexVO.java
  7. 98 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/device/entity/PatientDeviceVO.java
  8. 23 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/device/DeviceHealthIndexService.java
  9. 32 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/device/WlyyPatientDeviceService.java
  10. 1 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/user/UserService.java
  11. 0 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/wechat/WechatService.java
  12. 3 3
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/main.jsp
  13. 5 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_list.jsp
  14. 6 13
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_list_js.jsp
  15. 43 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/static_device.jsp
  16. 209 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/static_device_js.jsp
  17. 0 4
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/static_wechat_js.jsp
  18. 2 1
      patient-co-manage/wlyy-manage/src/main/webapp/static/js/menu.js

+ 2 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/config/SpringSecurityConfig.java

@ -36,6 +36,8 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
                "/admin/hos/importData",
                "/admin/hos/doctor/toExcel",
                "/admin/device/toExcel",
                "/admin/patientDevice/toExcel",
                "/admin/healthIndex/toExcel",
                "/admin/static/prescription/toExcel",
                "/admin/static/wechat/listToExcel",
                "/admin/static/wechat/hosipitaTotalToExcel",

+ 21 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/DeviceStaticController.java

@ -0,0 +1,21 @@
package com.yihu.wlyy.controller.manager.datastatic;
import com.yihu.wlyy.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
 * 设备统计报表导出
 * @author huangwenjie
 * @date 2017/12/12 10:26
 */
@Controller
@RequestMapping(value = "/admin/static/device/")
public class DeviceStaticController extends BaseController {
	
	//页面跳转(主页面)
	@RequestMapping(value = "initial")
	public String listInit() {
		return "static/static_device";
	}
}

+ 80 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/device/DeviceHealthIndexController.java

@ -2,7 +2,11 @@ package com.yihu.wlyy.controller.manager.device;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.device.entity.DeviceHealthIndex;
import com.yihu.wlyy.device.entity.DeviceHealthIndexVO;
import com.yihu.wlyy.device.entity.PatientDeviceVO;
import com.yihu.wlyy.service.manager.device.DeviceHealthIndexService;
import jxl.Workbook;
import jxl.write.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
@ -11,6 +15,11 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
/**
 * Created by Administrator on 2016/12/5.
 */
@ -40,6 +49,77 @@ public class DeviceHealthIndexController extends BaseController{
            return error(-1,"操作失败!");
        }
    }
    
    //导出报表
    @RequestMapping(value="toExcel",method = RequestMethod.POST,produces = "application/json;charset=UTF-8" )
    public void exportList(
            @RequestParam(value = "town",required = false)String town,
            @RequestParam(value = "hospital",required = false)String hospital,
            HttpServletResponse response){
        try {
            List<DeviceHealthIndexVO> wlyyDevices = healthIndexService.exportDeviceHealthIndexList(town,hospital);
            response.setContentType("octets/stream");
            response.setHeader("Content-Disposition", "attachment; filename="+ new String( "deviceHealthIndexDataList.xls"));
            OutputStream os = response.getOutputStream();
            this.write(os,wlyyDevices);
        }catch (Exception ex){
            error(ex);
        }
    }
    
    
    public void addHeader(WritableSheet ws) throws WriteException {
        
        String[] header = {"居民姓名","手机号","身份证","设备码","设备名称","签约医生", "地址"};
        int i = 0;
        for (String h : header) {
            addCell(ws, 0, i, h);//表名,行,列,header
            i++;
        }
    }
    
    public void write(WritableWorkbook wwb, List ls) throws Exception {
        try {
            WritableSheet ws;
            ws = wwb.createSheet("sheet",1);
            addHeader(ws);
            int i = 1;
            for (DeviceHealthIndexVO m : (List<DeviceHealthIndexVO>) ls) {
                addCell(ws, i, 0, m.getName(),"");
                addCell(ws, i, 1, m.getMobile(),"");
                addCell(ws, i, 2, m.getIdcard(),"");
                addCell(ws, i, 3, m.getDevice_sn(),"");
                addCell(ws, i, 4, m.getDevice_name(),"");
                addCell(ws, i, 5, m.getDoctor_name(),"");
                addCell(ws, i, 6, m.getAddress(),"");
                i++;
            }
            wwb.write();
            wwb.close();
        } catch (IOException e) {
            e.printStackTrace();
            if (wwb != null) wwb.close();
            throw e;
        }
    }
    public void write(OutputStream os, List ls) throws Exception{
        write(Workbook.createWorkbook(os), ls);
    }
    //添加单元格内容
    public void addCell(WritableSheet ws, int row, int column,  String data) throws WriteException {
        Label label = new Label(column ,row, data);
        ws.addCell(label);
    }
    //添加单元格内容
    public void addCell(WritableSheet ws, int row, int column, String data, String memo) throws WriteException {
        Label label = new Label(column ,row, data);
        if(!org.springframework.util.StringUtils.isEmpty(memo)){
            WritableCellFeatures cellFeatures = new WritableCellFeatures();
            cellFeatures.setComment(memo);
            label.setCellFeatures(cellFeatures);
        }
        ws.addCell(label);
    }

+ 0 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/device/WlyyDeviceController.java

@ -151,8 +151,6 @@ public class WlyyDeviceController extends BaseController {
            @RequestParam(value = "linkman",required = false) String linkman,
            HttpServletResponse response){
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            JavaType javaType = objectMapper.getTypeFactory().constructParametricType(ArrayList.class, WlyyDevice.class);
            List<WlyyDevice> wlyyDevices = deviceService.exporthDeviceList(deviceName,deviceCode,orgName,linkman);
            response.setContentType("octets/stream");
            response.setHeader("Content-Disposition", "attachment; filename="+ new String( "deviceDataList.xls"));

+ 81 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/device/WlyyPatientDeviceController.java

@ -1,8 +1,11 @@
package com.yihu.wlyy.controller.manager.device;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.device.entity.PatientDeviceVO;
import com.yihu.wlyy.entity.WlyyPatientDevice;
import com.yihu.wlyy.service.manager.device.WlyyPatientDeviceService;
import jxl.Workbook;
import jxl.write.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
@ -11,6 +14,11 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
/**
 * Created by yww on 2016/12/7.
 */
@ -60,4 +68,77 @@ public class WlyyPatientDeviceController extends BaseController {
        }
    }
    
    //导出报表
    @RequestMapping(value="toExcel",method = RequestMethod.POST,produces = "application/json;charset=UTF-8" )
    public void exportList(
            @RequestParam(value = "town",required = false)String town,
            @RequestParam(value = "hospital",required = false)String hospital,
            HttpServletResponse response){
        try {
            List<PatientDeviceVO> wlyyDevices = patientDeviceService.exportPatientDeviceList(town,hospital);
            response.setContentType("octets/stream");
            response.setHeader("Content-Disposition", "attachment; filename="+ new String( "patientDeviceDataList.xls"));
            OutputStream os = response.getOutputStream();
            this.write(os,wlyyDevices);
        }catch (Exception ex){
            error(ex);
        }
    }
    
    
    public void addHeader(WritableSheet ws) throws WriteException {
        
        String[] header = {"居民姓名","手机号","身份证","设备码", "设备类型","签约医生", "居民住址", "openid", "是否绑定微信号"};
        int i = 0;
        for (String h : header) {
            addCell(ws, 0, i, h);//表名,行,列,header
            i++;
        }
    }
    
    public void write(WritableWorkbook wwb, List ls) throws Exception {
        try {
            WritableSheet ws;
            ws = wwb.createSheet("sheet",1);
            addHeader(ws);
            int i = 1;
            for (PatientDeviceVO m : (List<PatientDeviceVO>) ls) {
                addCell(ws, i, 0, m.getName(),"");
                addCell(ws, i, 1, m.getMobile(),"");
                addCell(ws, i, 2, m.getIdcard(),"");
                addCell(ws, i, 3, m.getDevice_sn(),"");
                addCell(ws, i, 4, m.getDevice_name(),"");
                addCell(ws, i, 5, m.getDoctor_name(),"");
                addCell(ws, i, 6, m.getAddress(),"");
                addCell(ws, i, 7, m.getOpenid(),"");
                addCell(ws, i, 8, m.getIsopenid(),"");
                i++;
            }
            wwb.write();
            wwb.close();
        } catch (IOException e) {
            e.printStackTrace();
            if (wwb != null) wwb.close();
            throw e;
        }
    }
    public void write(OutputStream os, List ls) throws Exception{
        write(Workbook.createWorkbook(os), ls);
    }
    //添加单元格内容
    public void addCell(WritableSheet ws, int row, int column,  String data) throws WriteException {
        Label label = new Label(column ,row, data);
        ws.addCell(label);
    }
    //添加单元格内容
    public void addCell(WritableSheet ws, int row, int column, String data, String memo) throws WriteException {
        Label label = new Label(column ,row, data);
        if(!org.springframework.util.StringUtils.isEmpty(memo)){
            WritableCellFeatures cellFeatures = new WritableCellFeatures();
            cellFeatures.setComment(memo);
            label.setCellFeatures(cellFeatures);
        }
        ws.addCell(label);
    }
}

+ 98 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/device/entity/DeviceHealthIndexVO.java

@ -0,0 +1,98 @@
package com.yihu.wlyy.device.entity;
/**
 * @author huangwenjie
 * @date 2017/12/12 10:10
 */
public class DeviceHealthIndexVO {
	private String patient;
	private String name;
	private String mobile;
	private String idcard;
	private String device_sn;
	private String device_name;
	private String record_date;
	private String statusName;
	private String doctor_name;
	private String address;
	
	public String getPatient() {
		return patient;
	}
	
	public void setPatient(String patient) {
		this.patient = patient;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getMobile() {
		return mobile;
	}
	
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	public String getIdcard() {
		return idcard;
	}
	
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	
	public String getDevice_sn() {
		return device_sn;
	}
	
	public void setDevice_sn(String device_sn) {
		this.device_sn = device_sn;
	}
	
	public String getRecord_date() {
		return record_date;
	}
	
	public void setRecord_date(String record_date) {
		this.record_date = record_date;
	}
	
	public String getStatusName() {
		return statusName;
	}
	
	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}
	
	public String getDoctor_name() {
		return doctor_name;
	}
	
	public void setDoctor_name(String doctor_name) {
		this.doctor_name = doctor_name;
	}
	
	public String getAddress() {
		return address;
	}
	
	public void setAddress(String address) {
		this.address = address;
	}
	
	public String getDevice_name() {
		return device_name;
	}
	
	public void setDevice_name(String device_name) {
		this.device_name = device_name;
	}
}

+ 98 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/device/entity/PatientDeviceVO.java

@ -0,0 +1,98 @@
package com.yihu.wlyy.device.entity;
/**
 * @author huangwenjie
 * @date 2017/12/12 09:47
 */
public class PatientDeviceVO {
	private String patient;
	private String name;
	private String mobile;
	private String idcard;
	private String device_sn;
	private String device_name;
	private String address;
	private String openid;
	private String isopenid;
	private String doctor_name;
	
	public String getPatient() {
		return patient;
	}
	
	public void setPatient(String patient) {
		this.patient = patient;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getMobile() {
		return mobile;
	}
	
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	public String getIdcard() {
		return idcard;
	}
	
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	
	public String getDevice_sn() {
		return device_sn;
	}
	
	public void setDevice_sn(String device_sn) {
		this.device_sn = device_sn;
	}
	
	public String getDevice_name() {
		return device_name;
	}
	
	public void setDevice_name(String device_name) {
		this.device_name = device_name;
	}
	
	public String getAddress() {
		return address;
	}
	
	public void setAddress(String address) {
		this.address = address;
	}
	
	public String getOpenid() {
		return openid;
	}
	
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	
	public String getIsopenid() {
		return isopenid;
	}
	
	public void setIsopenid(String isopenid) {
		this.isopenid = isopenid;
	}
	
	public String getDoctor_name() {
		return doctor_name;
	}
	
	public void setDoctor_name(String doctor_name) {
		this.doctor_name = doctor_name;
	}
}

+ 23 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/device/DeviceHealthIndexService.java

@ -1,6 +1,8 @@
package com.yihu.wlyy.service.manager.device;
import com.yihu.wlyy.device.entity.DeviceHealthIndex;
import com.yihu.wlyy.device.entity.DeviceHealthIndexVO;
import com.yihu.wlyy.device.entity.PatientDeviceVO;
import com.yihu.wlyy.device.repository.DeviceHealthIndexDao;
import com.yihu.wlyy.entity.Patient;
import com.yihu.wlyy.repository.PatientDao;
@ -12,6 +14,8 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.*;
@ -25,6 +29,8 @@ public class DeviceHealthIndexService extends BaseDeviceJpaService<DeviceHealthI
    private DeviceHealthIndexDao healthIndexDao;
    @Autowired
    private PatientDao patientDao;
    @Autowired
    JdbcTemplate jdbcTemplate;
@ -83,5 +89,21 @@ public class DeviceHealthIndexService extends BaseDeviceJpaService<DeviceHealthI
        }
       return patientDao.findByCode(patientCode);
    }
	
	public List<DeviceHealthIndexVO> exportDeviceHealthIndexList(String town, String hospital) {
        List<DeviceHealthIndexVO> list = new ArrayList<>();
        String sql  = "SELECT " +
                "s.patient," +
                "s.`name`," +
                "s.mobile," +
                "CONCAT(LEFT (s.idcard,6),'**********',RIGHT (s.idcard,2)) idcard," +
                "d.device_sn," +
                "d.device_name," +
                "s.doctor_name," +
                "p.address FROM wlyy_sign_family s,wlyy_patient_device d,wlyy_patient p WHERE s.patient=d.`user` AND s.hospital='"+hospital+"' AND s.`status`> 0 AND s.patient=p.CODE AND s.patient NOT IN (" +
                "SELECT s.patient FROM wlyy_sign_family s,(" +
                "SELECT `user`,device_sn,type,max(record_date) record_date FROM device.wlyy_patient_health_index WHERE device_sn IS NOT NULL AND del=1 GROUP BY `user`,device_sn,type) d WHERE s.patient=d.`user` AND s.hospital='"+hospital+"' AND s.`status`> 0) ORDER BY patient";
        list =  jdbcTemplate.query(sql,new BeanPropertyRowMapper(DeviceHealthIndexVO.class));
        return list ;
	}
}

+ 32 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/device/WlyyPatientDeviceService.java

@ -1,18 +1,24 @@
package com.yihu.wlyy.service.manager.device;
import com.yihu.wlyy.device.entity.PatientDeviceVO;
import com.yihu.wlyy.entity.Patient;
import com.yihu.wlyy.entity.WlyyPatientDevice;
import com.yihu.wlyy.entity.wechat.WechatTotalVO;
import com.yihu.wlyy.repository.PatientDao;
import com.yihu.wlyy.repository.WlyyPatientDeviceDao;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -23,6 +29,8 @@ import java.util.List;
public class WlyyPatientDeviceService extends BaseJpaService<WlyyPatientDevice,WlyyPatientDeviceDao>  {
    @Autowired
    private PatientDao patientDao;
    @Autowired
    JdbcTemplate jdbcTemplate;
    public Page<WlyyPatientDevice> searchList(String deviceName,String categoryCode,String deviceSn,String userName,Integer page,Integer pageSize) throws Exception{
@ -70,4 +78,28 @@ public class WlyyPatientDeviceService extends BaseJpaService<WlyyPatientDevice,W
        }
        return patientDao.findByCode(patientCode);
    }
    
    /**
     * 根据社区查找居民设备绑定详情
     * @param town
     * @param hospital
     * @return
     */
	public List<PatientDeviceVO> exportPatientDeviceList(String town, String hospital) {
        List<PatientDeviceVO> list = new ArrayList<>();
        String sql  = "SELECT s.patient," +
                "s.`name`," +
                "s.mobile," +
                "CONCAT(LEFT (s.idcard,6),'**********',RIGHT (s.idcard,2)) idcard," +
                "d.device_sn," +
                "d.device_name," +
                "s.doctor_name," +
                "p.address," +
                "p.openid," +
                "CASE WHEN p.openid IS NULL THEN '未绑定' ELSE '已绑定' END isopenid " +
                "FROM wlyy_sign_family s,wlyy_patient_device d,wlyy_patient p " +
                "WHERE s.patient=d.`user` AND s.hospital='"+hospital+"' AND s.`status`> 0 AND s.patient=p.CODE ORDER BY patient";
        list =  jdbcTemplate.query(sql,new BeanPropertyRowMapper(PatientDeviceVO.class));
        return list ;
	}
}

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/user/UserService.java

@ -196,7 +196,7 @@ public class UserService extends BaseJpaService<User,UserDao> {
            String[] codes = code.split(",");
            List<ManageDictEntry> manageDictEntries = manageDictEntryDao.findByDictIdAndCodes(dictId, codes);
            if (null != manageDictEntries && manageDictEntries.size() > 0) {
                return "http://localhost:8180/admin/main";
                return manageDictEntries.get(0).getValue();
            }
        }
        return null;

+ 0 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/wechat/WechatService.java

@ -1,6 +1,5 @@
package com.yihu.wlyy.service.wechat;
import com.yihu.wlyy.entity.prescription.PrescriptionVO;
import com.yihu.wlyy.entity.wechat.WechatSignVO;
import com.yihu.wlyy.entity.wechat.WechatTotalVO;
import com.yihu.wlyy.service.BaseService;

+ 3 - 3
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/main.jsp

@ -132,9 +132,9 @@
							<sec:authorize url="/admin/static/wechat/initial">
								<li><a href="javascript:locationMenu('staticWechat');">微信统计报表</a></li>
							</sec:authorize>
							<sec:authorize url="/admin/static/sign/initial">
								<li><a href="javascript:locationMenu('staticSign');">签约统计报表</a></li>
							</sec:authorize>
							<%--<sec:authorize url="/admin/static/sign/initial">--%>
								<%--<li><a href="javascript:locationMenu('staticSign');">签约统计报表</a></li>--%>
							<%--</sec:authorize>--%>
							<sec:authorize url="/admin/static/device/initial">
								<li><a href="javascript:locationMenu('staticDevice');">设备统计报表</a></li>
							</sec:authorize>

+ 5 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_list.jsp

@ -36,6 +36,11 @@
                <div class="m-form-control f-ml15">
                    <input type="text" id="inp_end_date" placeholder="结束日期" class="f-ml10" data-attr-scan="endDate"/>
                </div>
            </div>
        </div>
        <div class="m-form-group f-mt10">
            <div class="m-form-group f-mt10">
                <div class="m-form-control f-ml15">
                    <input type="text" id="inp_disease" placeholder="请选择病种" class="f-ml10" data-attr-scan="disease"/>
                </div>

+ 6 - 13
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_list_js.jsp

@ -224,19 +224,12 @@
                            {display: '配送方式', name: 'pay', align: "center"},
                            {display: '时间', name: 'create_time', width: '12%', align: "center"},
                            {
                                display: '操作', name: 'operator', width: '10%', align: "center", isSort: false,
                                <%--render: function (row) {--%>
                                <%--var html = '';--%>
                                <%--html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "sign:info:view", row.id) + '">明细</a>';--%>
                                <%--//html += '<a  style="margin-left:10px;"href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "patient:info:edit", row.id) + '">编辑</a>';--%>
                                <%--//html += '<a  style="margin-left:10px;" title="删除" href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}','{2}'])", "patient:info:del", row.id,row.code) + '">删除</a>';--%>
                                <%--if (row.adminTeamId) {--%>
                                <%--<sec:authorize url="/admin/sign/memberList">--%>
                                <%--html += '<a style="margin-left:10px;" href="' + ctx + '/admin/team/signTeamInfo/' + row.adminTeamId + '" target="centerFrame">行政团队</a>';--%>
                                <%--</sec:authorize>--%>
                                <%--}--%>
                                <%--return html;--%>
                                <%--}--%>
                                display: '操作', name: 'operator', width: '15%', align: "center", isSort: false,
                                render: function (row) {
                                    var html = '';
                                    html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "patient:info:view", row.id) + '">查看</a>';
                                    return html;
                                }
                            }
                        ],
                    }));

+ 43 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/static_device.jsp

@ -0,0 +1,43 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <%@ include file="../head/page_head.jsp"%>
    <title>机构管理</title>
</head>
<body>
<div >
    <div style="font-family:微软雅黑;font-size:Small;display:block;clear:left;padding:0;margin:0;margin-left: 5px">
        <div style="position:relative;display:inline;left:10px;top:8px;white-space:nowrap;text-align:center;background-color:#ffffff;font-weight:bold">微信关注量详情</div>
        <div style="height:auto;width:auto;border:#dde7f1 1px solid;">
            <div class="m-form-group f-mt10" id="we_export_div">
                <div class="m-form-control f-ml15" style="display: none">
                    <input type="text" id="inp_device_name" placeholder="请选择城市" class="f-ml10"/></div>
                <br>
            </div>
            <div class="m-form-control f-ml15">
                <input type="text" id="inp_categoryCode" placeholder="请选择市区" class="f-ml10"/>
            </div>
            <br>
            <div class="m-form-control f-ml15">
                <input type="text" id="inp_hos" placeholder="请选择机构" class="f-ml10"/>
            </div>
            <br>
            <div id="export_patient_device_list" class="l-button u-btn u-btn-primary u-btn-small f-ib f-vam  f-ml10" >
                <span>导出居民设备绑定明细</span>
                <br>
            </div>
            <div id="export_patient_healthindex_list" class="l-button u-btn u-btn-primary u-btn-small f-ib f-vam  f-ml10" >
                <span>导出居民设备体征上传明细</span>
                <br>
            </div>
            <br>
        </div>
    </div>
</div>
</body>
<%@ include file="../head/page_foot.jsp"%>
<%@ include file="static_device_js.jsp" %>
</html>

+ 209 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/static_device_js.jsp

@ -0,0 +1,209 @@
<%--
  Created by IntelliJ IDEA.
  User: Mewtwo
  Date: 2017/12/8
  Time: 11:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<script>
    (function ( $, win) {
        $(function () {
            /* ************************** 变量定义 ******************************** */
            // 通用工具类库
            var retrieve = null;
            var inpStarDate = null,inpEndDate = null;
            retrieve = {
                url: {
                    //接口链接
                    /*
                    * 省,市,区
                    * */
                    district: '/common/district',
                    /*
                    *获取医院列表
                    * */
                    hospitalsByType: '/admin/hos/hospitalsByType',
                },
                $inpDeviceName: $('#inp_device_name'),//城市
                $inpCategoryCode: $('#inp_categoryCode'),//区
                $inpHos: $('#inp_hos'),//机构
                dnc: null,
                ccc: null,
                hc: null,
                $btnDeviceList: $('#export_patient_device_list'),
                $btnHealthindexList: $('#export_patient_healthindex_list'),
                init: function () {
                    this.initComboBox();
                    this.bindEvents();
                },
                //初始化市区下拉框
                initComboBox: function () {
                    this.dnc = this.$inpDeviceName.ligerComboBox({
                        width: 150,
                        data: [
                            {text: '厦门市', statusId: '350200'}
                        ],
                        initIsTriggerEvent: false,
                        valueField: 'statusId',
                    });
                    this.dnc.selectValue('350200');//默认选中厦门市
                    this.setCityFun(this);
                    this.initInpCat( [], this);
                    this.initHc( [], this);
                },
                //区
                initInpCat: function ( d, me) {
                    me.ccc = me.$inpCategoryCode.ligerComboBox({
                        width: 250,
                        data: d,
                        initIsTriggerEvent: false,
                        valueField: 'statusId',
                    });
                },
                //机构
                initHc: function ( d, me) {
                    me.hc = me.$inpHos.ligerComboBox({
                        width: 250,
                        data: d,
                        initIsTriggerEvent: false,
                        valueField: 'statusId',
                    });
                },
                setCityFun: function (me) {
                    var v = me.dnc.getValue();
                    if (v != '') {
                        me.rAjax( me.url.district, {
                            type: 3,
                            code: v
                        }, function (data) {
                            var d = [];
                            for (var i = 0; i < data.list.length; i++) {
                                d.push({
                                    text: data.list[i].name,
                                    statusId: data.list[i].code
                                });
                            }
                            //区
                            me.initInpCat( d, me);
                        })
                    } else {
                        me.initInpCat( [], me);
                        me.initHc( [], me);
                    }
                },
                setAreaFun: function (me) {
                    var v = me.ccc.getValue();
                    if (v != '') {
                        me.rAjax( me.url.hospitalsByType, {
                            type: 2,
                            code: v
                        }, function (data) {
                            var d = [];
                            for (var i = 0; i < data.list.length; i++) {
                                d.push({
                                    text: data.list[i].name,
                                    statusId: data.list[i].code
                                });
                            }
                            //机构
                            me.initHc( d, me);
                        })
                    } else {
                        me.initHc( [], me);
                    }
                },
                bindEvents: function () {
                    var me = this;
                    //城市下拉
                    me.$inpDeviceName.on( 'change', function () {
                        me.setCityFun(me);
                    });
                    //区下拉
                    me.$inpCategoryCode.on( 'change', function () {
                        me.setAreaFun(me);
                        me.hc.setValue('');
                    });
                    //机构
                    me.$inpHos.on( 'change', function () {
                    });
                    //居民设备绑定详情导出
                    me.$btnDeviceList.on('click',function () {
                        //定义一个form表单
                        var myform = $("<form></form>");
                        myform.attr('method','post')
                        myform.attr('action',ctx + '/admin/patientDevice/toExcel');
                        //区
                        var town = $("<input type='hidden' name='town' />")
                        town.attr('value',$("#inp_categoryCode").val());
                        //社区医院
                        var hospital = $("<input type='hidden' name='hospital' />")
                        hospital.attr('value',$("#inp_hos_val").val());
                        //关注状态
                        var attention = $("<input type='hidden' name='attention' />")
                        attention.attr('value',$("#inp_att_val").val());
                        myform.append(town);
                        myform.append(hospital);
                        myform.append(attention);
                        myform.appendTo('body').submit(); //must add this line for higher html spec
                    });
                    //居民提振数据详情导出
                    me.$btnHealthindexList.on('click',function () {
                        //定义一个form表单
                        var myform = $("<form></form>");
                        myform.attr('method','post')
                        myform.attr('action',ctx + '/admin/healthIndex/toExcel');
                        //区
                        var town = $("<input type='hidden' name='town' />")
                        town.attr('value',$("#inp_categoryCode").val());
                        //社区医院
                        var hospital = $("<input type='hidden' name='hospital' />")
                        hospital.attr('value',$("#inp_hos_val").val());
                        //关注状态
                        var attention = $("<input type='hidden' name='attention' />")
                        attention.attr('value',$("#inp_att_val").val());
                        myform.append(town);
                        myform.append(hospital);
                        myform.append(attention);
                        myform.appendTo('body').submit(); //must add this line for higher html spec
                    });
                },
                rAjax: function ( url, d, cb) {
                    $.ajax({
                        url: ctx + url,
                        data: d,
                        type: 'POST',
                        dataType: 'json',
                        success: function (data) {
                            if (data.status == 200) {
                                cb && cb.call( this, data);
                            } else {
                                $.Notice.error(data.msg);
                            }
                        }
                    });
                }
            };
            retrieve.init();
        });
    })( jQuery, window);
</script>

+ 0 - 4
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/static_wechat_js.jsp

@ -129,7 +129,6 @@
                    } else {
                        me.initInpCat( [], me);
                        me.initHc( [], me);
                        me.initTc( [], me);
                    }
                },
@ -152,7 +151,6 @@
                        })
                    } else {
                        me.initHc( [], me);
                        me.initTc( [], me);
                    }
                },
                bindEvents: function () {
@ -165,11 +163,9 @@
                    me.$inpCategoryCode.on( 'change', function () {
                        me.setAreaFun(me);
                        me.hc.setValue('');
                        me.tc.setValue('');
                    });
                    //机构
                    me.$inpHos.on( 'change', function () {
                        me.tc.setValue('');
                    });
                    //关注量详情导出
                    me.$btnExportList.on('click',function () {

+ 2 - 1
patient-co-manage/wlyy-manage/src/main/webapp/static/js/menu.js

@ -24,7 +24,8 @@ var menu = {
    //数据统计
    "static": "/admin/static/center",//数据统计
    "staticPrescription": "/admin/static/prescription/initial",//长处方数据统计
    "staticWechat": "/admin/static/wechat/initial",//问题管理界面
    "staticWechat": "/admin/static/wechat/initial",//微信统计报表
    "staticDevice": "/admin/static/device/initial",//设备统计报表
    //安全管理
    "user": "/admin/user/initial",//人员管理界面