Browse Source

客服系统

trick9191 7 years ago
parent
commit
24cd3f202d

+ 6 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/common/account/LoginController.java

@ -49,12 +49,15 @@ public class LoginController extends BaseController {
    @ResponseBody
    public void userValidation(Model model, HttpServletRequest req, HttpServletResponse resp, String userName, String password) throws Exception {
        User curUser = userService.userValidation(userName, password);
        System.out.println("validation");
        ObjectMapper objectMapper = new ObjectMapper();
        if(curUser == null){
            System.out.println("curUser is null");
            req.setAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME, "登入失败");
            req.getSession().setAttribute("isLogin", "false");
            resp.sendRedirect(req.getContextPath()+"/login");
        }else{
            System.out.println("curUser is success");
            model.addAttribute("current_user", curUser);
            //获取用户角色信息
            List<ManageFeature> features = getUserFeatures(curUser.getCode());
@ -92,6 +95,9 @@ public class LoginController extends BaseController {
            if (curUser.getType() == 0) {
                curUser.setTypeName("其他");
            }
            System.out.println("curUser is success :userInfo"+curUser.toString());
            req.getSession().setAttribute("userInfo",curUser);
            req.getSession().setAttribute("mobile", curUser.getMobile());
            req.getSession().setAttribute("code",curUser.getCode());

+ 4 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java

@ -621,16 +621,16 @@ public class PrescriptionExpressageService extends BaseService {
        return rs;
    }
    public Map<String, Object> getPresEsPayList(String keyWord, String state, String type, String startDate, String endDate, String operator,String flag,Integer page, Integer pageSize) {
    public Map<String, Object> getPresEsPayList(String doctor,String keyWord, String state, String type, String startDate, String endDate, String operator,String flag,Integer page, Integer pageSize) {
        Map<String, Object> map = new HashedMap();
        Doctor d = doctorDao.findByCode(doctor);
        String totalSql = "SELECT count(1) AS total " +
                " FROM " +
                " wlyy_prescription p " +
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " WHERE" +
                " 1=1 ";
                " p.hospital = '"+d.getHospital()+"' ";
        totalSql = setSQL( totalSql,keyWord,state,type,startDate,endDate,operator,flag);
        totalSql +=  " AND p.`status`>=50 ";
        List<Map<String, Object>> totallist = jdbcTemplate.queryForList(totalSql);
@ -660,7 +660,7 @@ public class PrescriptionExpressageService extends BaseService {
                " wlyy_prescription p " +
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " WHERE" +
                " 1=1 ";
                " p.hospital = '"+d.getHospital()+"' ";
        sql = setSQL( sql,keyWord,state,type,startDate,endDate,operator,flag);
        sql +=  " AND p.`status`>=50 " +
                " ORDER BY py.create_time DESC " +

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionExpressageController.java

@ -136,7 +136,7 @@ public class PrescriptionExpressageController extends WeixinBaseController {
                                   @ApiParam(name = "page", value = "页面") @RequestParam(required = true)Integer page,
                                   @ApiParam(name = "pageSize", value = "页面大小") @RequestParam(required = true)Integer pageSize){
        try {
            return write(200, "获取成功", "data", expressageService.getPresEsPayList(keyWord,state,type,startDate,endDate,operator,flag,page,pageSize));
            return write(200, "获取成功", "data", expressageService.getPresEsPayList(getUID(),keyWord,state,type,startDate,endDate,operator,flag,page,pageSize));
        } catch (Exception e) {
            error(e);
            return error(-1, "获取失败");