Merge remote-tracking branch 'origin/master'

This commit is contained in:
28353131@qq.com 2020-12-05 09:50:09 +08:00
commit 720951dcdb
15 changed files with 231 additions and 86 deletions

View File

@ -17,13 +17,6 @@
<dependencies>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!-- swagger2-->
<dependency>
<groupId>io.springfox</groupId>

View File

@ -21,13 +21,13 @@ import java.util.List;
/**
* 病人报餐Controller
*
*
* @author ft
* @date 2020-12-03
*/
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/fantang/foodDemand" )
@RequestMapping("/fantang/foodDemand")
public class FtFoodDemandDaoController extends BaseController {
private final IFtFoodDemandDaoService iFtFoodDemandDaoService;
@ -37,12 +37,11 @@ public class FtFoodDemandDaoController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:list')")
@GetMapping("/list")
public TableDataInfo list(FtFoodDemandDao ftFoodDemandDao)
{
public TableDataInfo list(FtFoodDemandDao ftFoodDemandDao) {
startPage();
LambdaQueryWrapper<FtFoodDemandDao> lqw = Wrappers.lambdaQuery(ftFoodDemandDao);
if (ftFoodDemandDao.getFlag() != null){
lqw.eq(FtFoodDemandDao::getFlag ,ftFoodDemandDao.getFlag());
if (ftFoodDemandDao.getFlag() != null) {
lqw.eq(FtFoodDemandDao::getFlag, ftFoodDemandDao.getFlag());
}
List<FtFoodDemandDao> list = iFtFoodDemandDaoService.list(lqw);
return getDataTable(list);
@ -51,40 +50,41 @@ public class FtFoodDemandDaoController extends BaseController {
/**
* 导出病人报餐列表
*/
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:export')" )
@Log(title = "病人报餐" , businessType = BusinessType.EXPORT)
@GetMapping("/export" )
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:export')")
@Log(title = "病人报餐", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(FtFoodDemandDao ftFoodDemandDao) {
LambdaQueryWrapper<FtFoodDemandDao> lqw = new LambdaQueryWrapper<FtFoodDemandDao>(ftFoodDemandDao);
List<FtFoodDemandDao> list = iFtFoodDemandDaoService.list(lqw);
ExcelUtil<FtFoodDemandDao> util = new ExcelUtil<FtFoodDemandDao>(FtFoodDemandDao. class);
return util.exportExcel(list, "foodDemand" );
ExcelUtil<FtFoodDemandDao> util = new ExcelUtil<FtFoodDemandDao>(FtFoodDemandDao.class);
return util.exportExcel(list, "foodDemand");
}
/**
* 获取病人报餐详细信息
*/
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:query')" )
@GetMapping(value = "/{id}" )
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(iFtFoodDemandDaoService.getById(id));
}
/**
* 新增病人报餐
*/
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:add')" )
@Log(title = "病人报餐" , businessType = BusinessType.INSERT)
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:add')")
@Log(title = "病人报餐", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FtFoodDemandDao ftFoodDemandDao) {
ftFoodDemandDao.setFlag(true);
return toAjax(iFtFoodDemandDaoService.save(ftFoodDemandDao) ? 1 : 0);
}
/**
* 修改病人报餐
*/
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:edit')" )
@Log(title = "病人报餐" , businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:edit')")
@Log(title = "病人报餐", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FtFoodDemandDao ftFoodDemandDao) {
ftFoodDemandDao.setUpdateAt(new Date());
@ -94,9 +94,9 @@ public class FtFoodDemandDaoController extends BaseController {
/**
* 删除病人报餐
*/
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:remove')" )
@Log(title = "病人报餐" , businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}" )
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:remove')")
@Log(title = "病人报餐", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(iFtFoodDemandDaoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
}

View File

@ -57,6 +57,11 @@ public class FtStaffInfoDaoController extends BaseController {
return getDataTable(list);
}
@GetMapping("/staffListWithDepart")
public AjaxResult staffListWithDepart() {
return AjaxResult.success(iFtStaffInfoDaoService.selectStaffInfoWithDepart());
}
/**
* 查询护工管理列表
*/

View File

@ -74,7 +74,7 @@ public class FtFoodDemandDao implements Serializable {
* 加菜
*/
@Excel(name = "加菜")
private Integer vegetables;
private Boolean vegetables;
/**
* 更新操作人 id
@ -85,7 +85,7 @@ public class FtFoodDemandDao implements Serializable {
* 加肉
*/
@Excel(name = "加肉")
private Integer meat;
private Boolean meat;
/**
* 更新来源
@ -96,7 +96,7 @@ public class FtFoodDemandDao implements Serializable {
* 加饭
*/
@Excel(name = "加饭")
private Integer rice;
private Boolean rice;
/**
* 加蛋

View File

@ -1,16 +1,16 @@
package com.ruoyi.system.fantang.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.system.fantang.vo.FtStaffInfoVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.util.Date;
@ -22,11 +22,11 @@ import java.util.Date;
*/
@Data
@ToString
@EqualsAndHashCode
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@Accessors(chain = true)
@TableName("ft_staff_info")
public class FtStaffInfoDao {
public class FtStaffInfoDao extends FtStaffInfoVo {
private static final long serialVersionUID = 1L;

View File

@ -2,6 +2,9 @@ package com.ruoyi.system.fantang.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 员工管理Mapper接口
@ -11,4 +14,6 @@ import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
*/
public interface FtStaffInfoDaoMapper extends BaseMapper<FtStaffInfoDao> {
@Select("SELECT a.*, b.depart_name from ft_staff_info a LEFT JOIN ft_depart b on a.depart_id = b.depart_id where staff_type = 1")
List<FtStaffInfoDao> selectStaffInfoWithDepart();
}

View File

@ -3,6 +3,8 @@ package com.ruoyi.system.fantang.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
import java.util.List;
/**
* 员工管理Service接口
*
@ -11,4 +13,6 @@ import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
*/
public interface IFtStaffInfoDaoService extends IService<FtStaffInfoDao> {
List<FtStaffInfoDao> selectStaffInfoWithDepart();
}

View File

@ -6,6 +6,8 @@ import com.ruoyi.system.fantang.mapper.FtStaffInfoDaoMapper;
import com.ruoyi.system.fantang.service.IFtStaffInfoDaoService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 员工管理Service业务层处理
*
@ -15,4 +17,9 @@ import org.springframework.stereotype.Service;
@Service
public class FtStaffInfoDaoServiceImpl extends ServiceImpl<FtStaffInfoDaoMapper, FtStaffInfoDao> implements IFtStaffInfoDaoService {
@Override
public List<FtStaffInfoDao> selectStaffInfoWithDepart() {
return this.baseMapper.selectStaffInfoWithDepart();
}
}

View File

@ -0,0 +1,13 @@
package com.ruoyi.system.fantang.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FtStaffInfoVo {
private String departName;
private Boolean giveOutFlag;
}

View File

@ -9,6 +9,13 @@ export function listStaffInfo(query) {
})
}
export function staffListWithDepart() {
return request({
url: '/fantang/staffInfo/staffListWithDepart',
method: 'get',
})
}
// 查询护工管理列表
export function careStaffList(query) {
return request({

View File

@ -84,23 +84,23 @@
<el-table v-loading="loading" :data="foodDemandList" @selection-change="handleSelectionChange" border>
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column label="id" align="center" prop="id" v-if="false"/>
<!-- <el-table-column label="住院号" align="center" prop="hospitalId"/>-->
<!-- <el-table-column label="住院号" align="center" prop="hospitalId"/>-->
<el-table-column label="姓名" align="center" prop="name" width="100px"/>
<!-- <el-table-column label="科室" align="center" prop="departName"/>-->
<!-- <el-table-column label="科室" align="center" prop="departName"/>-->
<el-table-column label="床号" align="center" prop="bedId" width="100px"/>
<el-table-column label="正餐" align="center" prop="type" :formatter="typeFormat" width="100px"/>
<el-table-column label="正餐清单" align="center" prop="foods" :formatter="formatFoods"/>
<el-table-column label="加菜" align="center" prop="vegetables" width="80px" :formatter="formatVegetables"/>
<el-table-column label="加肉" align="center" prop="meat" width="80px" :formatter="formatMeat"/>
<el-table-column label="加肉" align="center" prop="meat" width="80px" :formatter="formatMeat"/>
<el-table-column label="加饭" align="center" prop="rice" width="80px" :formatter="formatRice"/>
<el-table-column label="加蛋" align="center" prop="egg" width="80px" :formatter="formatEgg"/>
<el-table-column label="营养配餐" align="center" prop="nutritionFood" width="120px"/>
<!-- <el-table-column label="更新日期" align="center" prop="updateAt" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.updateAt, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="启用状态" align="center" prop="flag" width="80px"/>
<el-table-column label="加蛋" align="center" prop="egg" width="80px" />
<el-table-column label="营养配餐" align="center" prop="nutritionFood" width="120px"/>
<!-- <el-table-column label="更新日期" align="center" prop="updateAt" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.updateAt, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="启用状态" align="center" prop="flag" width="80px"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -126,8 +126,52 @@
<!-- 添加或修改病人报餐对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="姓名">
<el-input label="姓名"></el-input>
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" :disabled="true"/>
</el-form-item>
<el-form-item label="床号" prop="bedId">
<el-input v-model="form.bedId" :disabled="true"/>
</el-form-item>
<el-form-item label="正餐" prop="type">
<el-input v-model="form.type" :disabled="true"/>
</el-form-item>
<el-form-item label="正餐清单" prop="foods">
<el-select v-model="form.foods"
multiple style="width: 380px">
<el-option
v-for="item in foodList"
:key="item.foodId"
:label="item.name"
:value="item.foodId">
<span style="float: left; width:40px">{{ item.name }}</span>
<el-divider direction="vertical"></el-divider>
<span style="color: #8492a6; font-size: 13px">{{ item.price }} </span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="加菜" prop="vegetables">
<el-switch
v-model="form.vegetables"
active-text="是"
inactive-text="否">
</el-switch>
</el-form-item>
<el-form-item label="加肉" prop="meat">
<el-switch
v-model="form.meat"
active-text="是"
inactive-text="否">
</el-switch>
</el-form-item>
<el-form-item label="加饭" prop="rice">
<el-switch
v-model="form.rice"
active-text="是"
inactive-text="否">
</el-switch>
</el-form-item>
<el-form-item label="加蛋" prop="egg">
<el-input-number v-model="form.egg" :min="0" :max="5"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -141,13 +185,12 @@
<script>
import {
addFoodDemand,
delFoodDemand,
exportFoodDemand,
getFoodDemand,
listFoodDemand,
updateFoodDemand
} from "@/api/fantang/foodDemand";
import {listFood} from "../../../api/fantang/food";
import {listFood} from "@/api/fantang/food";
export default {
name: "FoodDemand",
@ -158,7 +201,7 @@ export default {
value: 1,
label: '启用'
}, {
value: 2,
value: 0,
label: '禁用'
}],
//
@ -221,29 +264,38 @@ export default {
formatFoods(row) {
const _this = this;
let arr = row.foods.split(",").map(Number);
let ret = arr.map(item =>{
let ret = arr.map(item => {
let obj = _this.foodList.find((value => {
return value.foodId === item;
}));
return obj.name;
});
return ret.toString();
let str = ret.toString();
if (row.vegetables > 0)
str += ",加菜";
if (row.rice > 0)
str += ",加饭"
if (row.meat > 0)
str += ",加肉"
if (row.egg > 0)
str += ",加蛋" + row.egg;
return str;
},
formatVegetables(row){
if (row.vegetables === null || row.vegetables === 0)
return "否";
return "是";
formatVegetables(row) {
if (row.vegetables)
return "";
return "";
},
formatMeat(row) {
if (row.meat === null || row.meat === 0)
return "否";
return "";
if (row.meat)
return "";
return "";
},
formatRice(row) {
if (row.rice === null || row.rice === 0)
return "";
return "";
if (row.rice)
return "";
return "";
},
formatEgg(row) {
if (row.egg === null || row.egg === 0)
@ -256,6 +308,7 @@ export default {
listFoodDemand(this.queryParams).then(response => {
this.foodDemandList = response.rows;
this.total = response.total;
this.loading = false;
});
},
@ -321,6 +374,8 @@ export default {
const id = row.id || this.ids
getFoodDemand(id).then(response => {
this.form = response.data;
this.form.foods = this.form.foods.split(",").map(Number);
this.open = true;
this.title = "修改病人报餐";
});
@ -330,6 +385,7 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
this.form.foods = this.form.foods.toString();
updateFoodDemand(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;

View File

@ -259,10 +259,9 @@
<script>
import {addSettle, delSettle, exportSettle, getSettle, listSettle, updateSettle} from "@/api/fantang/settle";
import {listAll, listNoPay, listPayoff} from "@/api/fantang/meals";
import {getUserProfile} from "../../../api/system/user";
import {getPrepaymentByPatientId} from "../../../api/fantang/prepayment";
import {getLastSettlementDate} from "../../../api/fantang/meals";
import { dateFormat } from 'vux'
import {getUserProfile} from "@/api/system/user";
import {getPrepaymentByPatientId} from "@/api/fantang/prepayment";
import {getLastSettlementDate} from "@/api/fantang/meals";
export default {
name: "Settle",
@ -410,11 +409,11 @@ export default {
methods: {
//
changeBillingDate(value) {
var dateSpan, iDays;
var dateSpan, iDays;
let sDate1 = Date.parse(this.formAddNewSettlement.lastBillingDate);
let sDate2 = Date.parse(value);
dateSpan = sDate2 - sDate1;
if(dateSpan <=0){
if (dateSpan <= 0) {
this.msgError("你现在的结算日期小于上一次结算日期!!");
} else {
dateSpan = Math.abs(dateSpan);
@ -433,7 +432,7 @@ export default {
//
clickAddNewSettlement(row) {
getLastSettlementDate(row.patientId).then(response =>{
getLastSettlementDate(row.patientId).then(response => {
console.log("getLastBillingDateByPatientId-->", response);
this.formAddNewSettlement.lastBillingDate = response.data.settlementAt;
this.formAddNewSettlement.settlementDays = response.data.days;

View File

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" v-if="false">
<el-form-item label="补贴类型" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择补贴类型" clearable size="small">
<el-option
@ -54,7 +54,7 @@
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-col :span="1.5" v-if="false">
<el-button
type="success"
icon="el-icon-edit"
@ -65,7 +65,7 @@
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-col :span="1.5" v-if="false">
<el-button
type="danger"
icon="el-icon-delete"
@ -76,7 +76,7 @@
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-col :span="1.5" v-if="false">
<el-button
type="warning"
icon="el-icon-download"
@ -86,11 +86,11 @@
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" v-if="false"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="subsidyList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table v-loading="loading" :data="subsidyList" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" align="center" v-if="false"/>
<el-table-column label="补贴 id" align="center" prop="subsidyId" v-if="false"/>
<el-table-column label="补贴类型" align="center" prop="type" :formatter="typeFormat"/>
<el-table-column label="金额" align="center" prop="price"/>
@ -102,6 +102,14 @@
<el-table-column label="启用标志" align="center" prop="flag" :formatter="formatFlag"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-money"
@click="clickSubsidyGiveOut(scope.row)"
v-hasPermi="['fantang:subsidy:edit']"
>发放
</el-button>
<el-button
size="mini"
type="text"
@ -130,6 +138,34 @@
@pagination="getList"
/>
<!-- 补贴发放弹出层-->
<el-dialog title="选择发放员工" :visible.sync="showPopupSubsidyGiveOut" width="1000px" align="center">
<el-table :data="staffData">
<el-table-column prop="departName" label="科室" width="200" align="center"
:filters="[{ text: '家', value: '家' }, { text: '公司', value: '公司' }]"
:filter-method="filterDepart">
<template slot-scope="scope">
</template>
</el-table-column>
<el-table-column prop="name" label="姓名" width="150" align="center"></el-table-column>
<el-table-column prop="giveOutFlag" label="是否发放补贴" width="300" align="center">
<template slot-scope="scope">
<el-switch
v-model="scope.row.giveOutFlag"
active-color="#13ce66"
inactive-color="#ff4949"
active-text="是"
inactive-text="否">
</el-switch>
</template>
</el-table-column>
</el-table>
<br>
<el-button type="primary">发放补贴</el-button>
</el-dialog>
<!-- 添加或修改补贴管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
@ -166,12 +202,16 @@
<script>
import {addSubsidy, delSubsidy, exportSubsidy, getSubsidy, listSubsidy, updateSubsidy} from "@/api/fantang/subsidy";
import {staffListWithDepart} from "@/api/fantang/staffInfo";
export default {
name: "Subsidy",
components: {},
data() {
return {
staffData: [],
//
showPopupSubsidyGiveOut: false,
//
loading: true,
//
@ -224,6 +264,15 @@ export default {
});
},
methods: {
filterDepart() {
return row.tag === value;
},
//
clickSubsidyGiveOut(row) {
this.showPopupSubsidyGiveOut = true;
},
//
formatFlag(row) {
if (row.flag)
@ -240,6 +289,13 @@ export default {
this.total = response.total;
this.loading = false;
});
staffListWithDepart().then(response => {
this.staffData = response.data;
for (let i = 0; i < this.staffData.length; i++) {
this.staffData[i].giveOutFlag = true;
}
console.log(this.staffData);
})
},
//
typeFormat(row, column) {

View File

@ -78,13 +78,13 @@
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="queryParams.pageNum"-->
<!-- :limit.sync="queryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
<!-- 添加或修改每周菜单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
@ -214,7 +214,7 @@
//
queryParams: {
pageNum: 1,
pageSize: 9,
pageSize: 50,
dinnerType: '',
weekday: '',
flag: null

View File

@ -8,7 +8,7 @@ function resolve(dir) {
const name = defaultSettings.title || '食堂管理系统' // 标题
const port = process.env.port || process.env.npm_config_port || 80 // 端口
const port = process.env.port || process.env.npm_config_port || 9001 // 端口
// vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions