package com.yihu.wlyy.statistics.data;

import com.yihu.wlyy.statistics.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by Administrator on 2016.10.08.
 * 修改历史数据处理控制器
 */
@Controller
@RequestMapping(value = "/dataHandling", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class DataHandlingController extends BaseController {

    @Autowired
    private DataHandingService dataHandingService;
    /**
     * 生成医生和患者表中有身份的用户的密码
     * @return
     */
    @RequestMapping(value = "/producePatientAndDoctorPassword")
    @ResponseBody
    public String producePatientAndDoctorPasswor() {
        try {
            return write(200, dataHandingService.producePatientAndDoctorPassword());
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
}
