瀏覽代碼

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

trick9191 7 年之前
父節點
當前提交
12e137d2f2

+ 1 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/SignFamily.java

@ -346,6 +346,7 @@ public class SignFamily extends IdEntity {
        this.signType = signType;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name = "apply_date")
    public Date getApplyDate() {
        return applyDate;

+ 3 - 5
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/common/account/BookingController.java

@ -411,15 +411,13 @@ public class BookingController extends WeixinBaseController {
    @RequestMapping(value = "CancelOrder", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("取消挂号单")
    public String CancelOrder(@ApiParam(name = "orderId", value = "订单id")
                              @RequestParam(value = "orderId", required = true) Long orderId,
                              @ApiParam(name = "code", value = "订单code")
    public String CancelOrder(@ApiParam(name = "code", value = "订单code")
                              @RequestParam(value = "code", required = false) String code,
                              @ApiParam(name = "ssc", value = "社保卡号")
                              @RequestParam(value = "ssc", required = false) String ssc) {
        try {
            //获取订单信息
            PatientReservation obj = patientReservationService.findById(orderId);
            PatientReservation obj = patientReservationService.findByCode(code);
            boolean re = false;
            if(obj==null){
                re = jwSmjkService.CancelOrder(code,ssc);
@ -431,7 +429,7 @@ public class BookingController extends WeixinBaseController {
            if (re) {
                //更新状态
                if(obj!=null){
                    patientReservationService.userCancelOrder(orderId,getUID());//"6c0cfe5065e011e69f7c005056850d66"
                    patientReservationService.userCancelOrder(code,getUID());//"6c0cfe5065e011e69f7c005056850d66"
                }
                return write(200, "取消挂号单成功!");

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

+ 2 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/reservation/PatientReservationService.java

@ -114,8 +114,8 @@ public class PatientReservationService extends BaseService {
     * 客服取消预约
     */
    @Transactional
    public void userCancelOrder(Long id,String user) {
        PatientReservation obj = patientReservationDao.findOne(id);
    public void userCancelOrder(String code,String user) {
        PatientReservation obj = patientReservationDao.findByCode(code);
        if (obj.getStatus()!=0) {
            obj.setStatus(0);
            User u =userDao.findByCode(user);

+ 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, "获取失败");