ssm_hos_API

Jammm
2020-10-06 / 0 评论 / 44 阅读 / 正在检测是否收录...

主页:http://10.16.89.106:40001/

1、Department

Department.java

private int id;
private String departName;
private String description;
private int isDel;

1.1、接口

@RequestMapping(value = "/department")

1.2、查询

@RequestMapping("/getDepartment")
public String getDepartment(String departName,int isDel)

1.3、添加部门

@PostMapping("/addDepartment")
public String addDepartment(Department department)

1.4、修改部门

@PostMapping("/updateDepartment")
public String updateDepartment(Department department)

1.5、删除部门

@PostMapping("/delDepartment")
public String delDepartment(int id,int isDel)

2、Doctor

Doctor.java

private int id;
private String username;
private String password;
private String realName;
private String description;
private String email;
private String phone;
private int age;
private String sex;
private String department;
private String workTime;
private int role;
private int isDel;

2.1、接口

@RequestMapping(value = "/doctor")

2.2、医生登录

@PostMapping("/loginIn")
public String loginIn(String username, String password, HttpSession session)

2.3、动态查询医生

@RequestMapping("/getDoctors")
public String getDoctors(String username,String realName,String phone,String department,int isDel)

2.4、分页查询医生

@RequestMapping("/getDoctorsLimit")
public String getDoctorsLimit(String username,String realName,String phone,String department,int isDel,int startIndex,int pageSize)

2.5、根据ID查询医生

@RequestMapping("/getDoctorById")
public String getDoctorById(int id)

2.6、添加医生

@PostMapping("/addDoctor")
public String addDoctor(Doctor doctor)

2.7、修改医生信息

@PostMapping("/updateDoctor")
public String updateDoctor(Doctor doctor)

2.8、修改密码

@PostMapping("/updatePassword")
    public String updatePassword(int id, String password, String currentPwd,HttpServletRequest request){
        Doctor doctor = doctorService.getDoctorById(id);
        currentPwd = CreateNum.md5(currentPwd);

        Doctor sessionDoctor = (Doctor) request.getSession().getAttribute("doctor");

        if(sessionDoctor.getRole()==2){
            int i = doctorService.updatePassword(id,password);
            return ReturnJSON.toJsonMsg(i);
        }else {
            if(currentPwd.equals(doctor.getPassword())){
                int i = doctorService.updatePassword(id,password);
                return ReturnJSON.toJsonMsg(i);
            }else {
                return ReturnJSON.toJsonMsg("当前密码输入错误!");
            }
        }
    }

2.9、修改部门

@PostMapping("/updateDepartment")
public String updateDepartment(int id,String department)

2.10、修改工作时间

@PostMapping("/updateWorkTime")
public String updateWorkTime(int id,String workTime)

2.11、删除医生

@PostMapping("/delDoctor")
public String delDoctor(int id,int isDel)

2.12、退出登录

@RequestMapping("/loginOut")

3、Medicine

Medicine.java

private int id;
private String mediName;
private String instructions;
private String category;
private int times;
private double money;
private int isDel;

3.1、接口

@RequestMapping(value = "/medicine")

3.2、动态查询药品

@RequestMapping("/getMedicine")
public String getMedicine(String mediName,int isDel)

3.3、分页查询药品

@RequestMapping("/getMedicineLimit")
public String getMedicineLimit(String mediName,int isDel,int startIndex,int pageSize)

3.4、通过ID查询药品

@RequestMapping("/getMedicineById")
public String getMedicineById(int id)

3.5、添加药品

@PostMapping("/addMedicine")
public String addMedicine(Medicine medicine)

3.6、修改药品

@PostMapping("/updateMedicine")
public String updateMedicine(Medicine medicine)

3.7、删除药品

@PostMapping("/delMedicine")
public String delMedicine(int id,int isDel)

4、MoneyLog

MoneyLog.java

private int id;
private String orderId;
private String title;
private double money;
private int times;
private String logTime;
private int isDel;

4.1、接口

@RequestMapping(value = "/moneyLog")

4.2、动态查询记录

@RequestMapping("/getMoneyLog")
public String getMoneyLog(String title, String orderId, int isDel)

4.3、分页查询记录

@RequestMapping("/getMoneyLogLimit")
public String getMoneyLogLimit(String title, String orderId, int isDel, int startIndex, int pageSize)

4.4、添加记录

@PostMapping("/addMoneyLog")
public String addMoneyLog(MoneyLog moneyLog)

4.5、删除记录

@PostMapping("/delMoneyLog")
public String delMoneyLog(int id,int isDel)

5、Order

Order.java

private String id;
private int userId;
private String userRealName;
private int docId;
private String docRealName;
private String problem;
private String problemDesc;
private String suggestion;
private int state;
private String appointmentTime;
private String orderTime;
private String finishTime;
private double money;
private int isDel;

5.1、接口

@RequestMapping(value = "/order")

5.2、动态查询订单

@RequestMapping("/getOrders")
public String getOrders(String userRealName,String docRealName,String id,int isDel)

5.3、分页查询订单

@RequestMapping("/getOrdersLimit")
public String getOrdersLimit(String userRealName,String docRealName,String id,int isDel,int startIndex,int pageSize)

5.4、添加订单

@PostMapping("/addOrder")
public String addOrder(Order order)

5.5、修改订单

@PostMapping("/updateOrder")
public String updateOrder(Order order)
<!--修改订单-->
<update id="updateOrder" parameterType="Order">
    update t_order
    <trim prefix="set" suffixOverrides=",">
        <if test="userRealName!=null">userRealName = #{userRealName},</if>
        <if test="docRealName!=null">docRealName = #{docRealName},</if>
        <if test="problem!=null">problem = #{problem},</if>
        <if test="problemDesc!=null">problemDesc =# {problemDesc},</if>
        <if test="suggestion!=null">suggestion = #{suggestion},</if>
        <if test="appointmentTime!=null">appointmentTime = #{appointmentTime},</if>
        <if test="finishTime!=null">finishTime = #{finishTime},</if>
    </trim>
    where id = #{id}
</update>

5.6、删除订单

@PostMapping("/delOrder")
public String delOrder(String id,int isDel)

5.7、修改订单状态

@PostMapping("/updateOrderState")
public String updateOrderState(String id,int state)

6、Settings

Settings.java

private double regFee;

6.1、接口

@RequestMapping(value = "/settings")

6.2、查询设置

@RequestMapping("/getSettings")
public String getSettings()

6.3、修改设置

@PostMapping("/updateSettings")
public String updateSettings(Settings settings)

7、User

User.java

private int id;
private String username;
private String password;
private String realName;
private String email;
private String phone;
private int age;
private String sex;
private double account;
private int isDel;

7.1、接口

@RequestMapping(value = "/user")

7.2、用户登录

@PostMapping("/loginIn")
public String loginIn(String username, String password, HttpSession session)

7.3、动态查询用户

@RequestMapping("/getUsers")
public String getUsers(String  username,String realName,String phone,int isDel)

7.4、分页查询用户

@RequestMapping("/getUsersLimit")
public String getUsersLimit(String  username,String realName,String phone,int isDel,int startIndex,int pageSize)

7.5、根据ID查询用户

@RequestMapping("/getUserById")
public String getUserById(int id)

7.6、添加用户

@PostMapping("/addUser")
public String addUser(User user)

7.7、修改用户

@PostMapping("/updateUser")
public String updateUser(User user)
<!--修改用户-->
<update id="updateUser" parameterType="User">
    update t_user
    <trim prefix="set" suffixOverrides=",">
        <if test="username!=null">username = #{username},</if>
        <if test="realName!=null">realName = #{realName},</if>
        <if test="email!=null">email = #{email},</if>
        <if test="phone!=null">phone = #{phone},</if>
        <if test="sex!=null">sex =# {sex},</if>
    </trim>
    where id = #{id}
</update>

7.8、修改密码

@PostMapping("/updatePassword")
public String updatePassword(int id, String password, String currentPwd, HttpServletRequest request)

7.9、删除用户

@PostMapping("/delUser")
public String delUser(int id,int isDel)

7.10、修改金额

@PostMapping("/updateAccount")
public String updateAccount(int id,double account)

7.11、退出登录

@RequestMapping("/loginOut")
public String loginOut(HttpServletRequest request)

8、图片

private int id;//图片ID
private int uid;//人员id
private String imgPath;//图片路径
private int userGroup; //0表示患者,1表示医护人员

8.1、接口

xxx/upload/headImgs

@RequestMapping("/imgs")

8.2、查询所有图片

@RequestMapping("/getAllImages")
public String getImgs()

8.3、根据组查询图片

@RequestMapping("/getAllImagesByUserGroup")
public String getAllImagesByUserGroup(int userGroup)

8.4、关键字查询

@RequestMapping("/getAllImagesByKeyword")
public String getAllImagesByKeyword(int uid, int userGroup)

8.5、上传

@PostMapping("/upload")
public String upload(MultipartFile file, Images images, ModelMap map)
本文共 276 个字数,平均阅读时长 ≈ 1分钟
0

打赏

海报

正在生成.....

评论 (0)

取消