package com.aaa.controller;
import com.aaa.entity.*;
import com.aaa.service.DepartmentService;
import com.aaa.service.PrjectTypeService;
import com.aaa.service.UnitService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("prjectType")
public class PrjectTypeController {
@Autowired
private PrjectTypeService prjectTypeService;
/*
* 查询生产项目大类
* */
@RequestMapping("findAllProjecttype")
@ResponseBody
public Object ProjecttypeList(Projecttype projecttype, Integer page, Integer limit){
PageHelper.startPage(page, limit);
List<Projecttype> listAll = prjectTypeService.findAllProjecttype(projecttype);
PageInfo pageInfo = new PageInfo(listAll);
Map<String, Object> tableData = new HashMap<String, Object>();
//这是layui要求返回的json数据格式
tableData.put("code", 0);
tableData.put("msg", "");
//将全部数据的条数作为count传给前台(一共多少条)
tableData.put("count", pageInfo.getTotal());
//将分页后的数据返回(每页要显示的数据)
tableData.put("data", pageInfo.getList());
return tableData;
}
/*
* 添加生产项目大类
* */
@RequestMapping("addProjecttype")
@ResponseBody
public Object addProjecttype(Projecttype projecttype){
int i1 = prjectTypeService.count1(projecttype);
if(i1==0){
int i = prjectTypeService.addProjecttype(projecttype);
if(i==1){
return "添加成功";
}else{
return "添加失败";
}
}else{
return projecttype.getProjectName()+"已存在";
}
}
/*
* 删除生产项目大类
* */
@RequestMapping("deleteProjecttype")
@ResponseBody
public Object deleteProjecttype(Integer projectId){
int i = prjectTypeService.deleteProjecttype(projectId);
if(i==1){
return "删除成功";
}else{
return "删除失败";
}
}
/*------------------------------------------------------------*/
/*
* 查询收费类型
* */
@RequestMapping("findAllMoneytype")
@ResponseBody
public Object MoneytypeList(Moneytype moneytype, Integer page, Integer limit){
PageHelper.startPage(page, limit);
List<Moneytype> listAll = prjectTypeService.findAllMoneytype(moneytype);
PageInfo pageInfo = new PageInfo(listAll);
Map<String, Object> tableData = new HashMap<String, Object>();
//这是layui要求返回的json数据格式
tableData.put("code", 0);
tableData.put("msg", "");
//将全部数据的条数作为count传给前台(一共多少条)
tableData.put("count", pageInfo.getTotal());
//将分页后的数据返回(每页要显示的数据)
tableData.put("data", pageInfo.getList());
return tableData;
}
/*
* 添加收费类型
* */
@RequestMapping("addMoneytype")
@ResponseBody
public Object addMoneytype(Moneytype moneytype){
int i1 = prjectTypeService.count4(moneytype);
if(i1==0){
int i = prjectTypeService.addMoneytype(moneytype);
if(i==1){
return "添加成功";
}else{
return "添加失败";
}
}else{
return moneytype.getMoneytype()+"已存在";
}
}
/*
* 修改收费类型
* */
@RequestMapping("editMoneytype")
@ResponseBody
public Object editMoneytype(Moneytype moneytype){
int i = prjectTypeService.editMoneytype(moneytype);
if(i==1){
return "修改成功";
}else{
return "修改失败";
}
}
/*
* 删除收费类型
* */
@RequestMapping("deleteMoneytype")
@ResponseBody
public Object deleteMoneytype(Integer moneyId){
int i = prjectTypeService.deleteMoneytype(moneyId);
if(i==1){
return "删除成功";
}else{
return "删除失败";
}
}
/*--------------------------------------------------------------*/
/*
* 查询门诊收费项
* */
@RequestMapping("findAllOutpatienttype")
@ResponseBody
public Object OutpatienttypeList(Outpatienttype outpatienttype, Integer page, Integer limit){
PageHelper.startPage(page, limit);
List<Outpatienttype> listAll = prjectTypeService.findAllOutpatienttype(outpatienttype);
PageInfo pageInfo = new PageInfo(listAll);
Map<String, Object> tableData = new HashMap<String, Object>();
//这是layui要求返回的json数据格式
tableData.put("code", 0);
tableData.put("msg", "");
//将全部数据的条数作为count传给前台(一共多少条)
tableData.put("count", pageInfo.getTotal());
//将分页后的数据返回(每页要显示的数据)
tableData.put("data", pageInfo.getList());
return tableData;
}
@Autowired
private UnitService unitService;
/*
* 查询计量单位
* */
@RequestMapping("findAllUnit")
@ResponseBody
public Object UnitList(){
List<Unit> listAll = unitService.findAllUnit(null);
return listAll;
}
@RequestMapping("findAllProjecttype1")
@ResponseBody
public Object ProjecttypeList(){
List<Projecttype> listAll = prjectTypeService.findAllProjecttype(null);
return listAll;
}
/*
* 添加门诊收费项
* */
@RequestMapping("addOutpatienttype")
@ResponseBody
public Object addOutpatienttype(Outpatienttype outpatienttype,Integer projectId,Integer unitId){
outpatienttype.setBigprojectId(projectId);
outpatienttype.setUnit(unitId);
int i1 = prjectTypeService.count2(outpatienttype);
if(i1==0){
int i = prjectTypeService.addOutpatienttype(outpatienttype);
if(i==1){
return "添加成功";
}else{
return "添加失败";
}
}else {
return outpatienttype.getProjectName()+"已存在";
}
}
/*
* 修改门诊收费项
* */
@RequestMapping("editOutpatienttype")
@ResponseBody
public Object editOutpatienttype(Outpatienttype outpatienttype,Integer projectId,Integer unitId){
outpatienttype.setBigprojectId(projectId);
outpatienttype.setUnit(unitId);
int i = prjectTypeService.editOutpatienttype(outpatienttype);
if(i==1){
return "修改成功";
}else{
return "修改失败";
}
}
/*
* 删除门诊收费项
* */
@RequestMapping("deleteOutpatienttype")
@ResponseBody
public Object deleteOutpatienttype(Integer outpatientId){
int i = prjectTypeService.deleteOutpatienttype(outpatientId);
if(i==1){
return "删除成功";
}else{
return "删除失败";
}
}
/*------------------------------------------------------------------------*/
/*
* 查询住院收费项
* */
@RequestMapping("findAllInoutpatienttype")
@ResponseBody
public Object InoutpatienttypeList(Inoutpatienttype inoutpatienttype, Int
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
SpringBoot+Layui医院信息管理系统 (985个子文件)
PrjectTypeController.class 10KB
StoreController.class 9KB
CCashierController.class 8KB
MenuController.class 8KB
Register.class 7KB
LdrugController.class 6KB
LadminController.class 6KB
CreportController.class 5KB
UserController.class 5KB
Drugstore.class 5KB
OutinstoreController.class 5KB
COutController.class 5KB
ReportVo.class 5KB
PrjectTypeServiceImpl.class 5KB
Lpharmacy.class 5KB
Ypharmacy.class 5KB
SysController.class 4KB
UserServiceImpl.class 4KB
PharmacyController.class 4KB
FinanceController.class 4KB
StoreServiceImpl.class 4KB
RoleServiceImpl.class 4KB
LitemController.class 4KB
SdrugdictionaryController.class 4KB
DoctorController.class 4KB
PathstoreController.class 4KB
CXiangmuPayController.class 4KB
CCashierServiceImpl.class 4KB
CreportServiceImpl.class 3KB
CPharmacy.class 3KB
RoleController.class 3KB
TreeNode.class 3KB
CReport.class 3KB
RegisteredTypeController.class 3KB
ShiroConfig.class 3KB
LpayController.class 3KB
LleaveController.class 3KB
CTakeConter.class 3KB
DepartmentController.class 3KB
WarehuoseController.class 3KB
UpplierController.class 3KB
PaibanController.class 3KB
AreaController.class 3KB
UnitController.class 3KB
SkullController.class 3KB
User.class 3KB
TypeController.class 3KB
OutinstoreServiceImpl.class 3KB
Lrecord.class 3KB
Menu.class 3KB
CheckupController.class 3KB
Outpatienttype.class 2KB
LadminServiceImpl.class 2KB
CCashier.class 2KB
Litem.class 2KB
MainController.class 2KB
Paiban.class 2KB
Sdrugdictionary.class 2KB
Drugdictionary.class 2KB
Inoutpatienttype.class 2KB
RecordController.class 2KB
UserRealm.class 2KB
MenuServiceImpl.class 2KB
PrjectTypeMapper.class 2KB
Lcheckup.class 2KB
SdrugdictionaryServiceImpl.class 2KB
PrjectTypeService.class 2KB
CDoctor.class 2KB
Pay.class 2KB
StoreMapper.class 2KB
PharmacyServiceImpl.class 2KB
Record.class 2KB
COutServiceImpl.class 2KB
DoctorServiceImpl.class 2KB
Coutpatienttype.class 2KB
FinanceServiceImpl.class 2KB
LdrugServiceImpl.class 2KB
StoreService.class 2KB
Doctor.class 2KB
Caigou.class 2KB
Bed.class 2KB
MainServiceImpl.class 2KB
Huishou.class 2KB
CCashierMapper.class 2KB
RegisteredTypeServiceImpl.class 2KB
UserMapper.class 2KB
DepartmentServiceImpl.class 2KB
CXiangmuPayServiceImpl.class 1KB
CCashierService.class 1KB
PaibanServiceImpl.class 1KB
UserCredentialsMatcher.class 1KB
DataGridView.class 1KB
CreportMapper.class 1KB
LpayServiceImpl.class 1KB
PutinServiceImpl.class 1KB
CTakeServiceImpl.class 1KB
WarehuoseServiceImpl.class 1KB
CreportService.class 1KB
Role.class 1KB
UpplierServiceImpl.class 1KB
共 985 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
办公模板库素材蛙
- 粉丝: 1565
- 资源: 2293
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 实验二:IP协议分析.zip
- 驱动代码驱动代码驱动代码驱动代码
- SVID_20240523_141155_1.mp4
- Code for the complete guide to tkinter tutorial
- 关于百货中心供应链管理系统.zip
- SimpleFolderIcon-master 修改Unity的Project下的文件夹图标
- A python Tkinter widget to display tile based maps
- A pure Python library for adding tables to a Tkinter application
- Vector资源文件.zip
- MobaXterm-Installer
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功