| @ -0,0 +1,44 @@ | |||||
| import request from '@/utils/request' | |||||
| // 查询清洁物品列表 | |||||
| export function listAppCleanItems(query) { | |||||
| return request({ | |||||
| url: '/model/AppCleanItems/list', | |||||
| method: 'get', | |||||
| params: query | |||||
| }) | |||||
| } | |||||
| // 查询清洁物品详细 | |||||
| export function getAppCleanItems(cleanItemsId) { | |||||
| return request({ | |||||
| url: '/model/AppCleanItems/' + cleanItemsId, | |||||
| method: 'get' | |||||
| }) | |||||
| } | |||||
| // 新增清洁物品 | |||||
| export function addAppCleanItems(data) { | |||||
| return request({ | |||||
| url: '/model/AppCleanItems', | |||||
| method: 'post', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 修改清洁物品 | |||||
| export function updateAppCleanItems(data) { | |||||
| return request({ | |||||
| url: '/model/AppCleanItems', | |||||
| method: 'put', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 删除清洁物品 | |||||
| export function delAppCleanItems(cleanItemsId) { | |||||
| return request({ | |||||
| url: '/model/AppCleanItems/' + cleanItemsId, | |||||
| method: 'delete' | |||||
| }) | |||||
| } | |||||
| @ -0,0 +1,44 @@ | |||||
| import request from '@/utils/request' | |||||
| // 查询清洁要求列表 | |||||
| export function listAppCleanRequest(query) { | |||||
| return request({ | |||||
| url: '/model/AppCleanRequest/list', | |||||
| method: 'get', | |||||
| params: query | |||||
| }) | |||||
| } | |||||
| // 查询清洁要求详细 | |||||
| export function getAppCleanRequest(cleanRequestId) { | |||||
| return request({ | |||||
| url: '/model/AppCleanRequest/' + cleanRequestId, | |||||
| method: 'get' | |||||
| }) | |||||
| } | |||||
| // 新增清洁要求 | |||||
| export function addAppCleanRequest(data) { | |||||
| return request({ | |||||
| url: '/model/AppCleanRequest', | |||||
| method: 'post', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 修改清洁要求 | |||||
| export function updateAppCleanRequest(data) { | |||||
| return request({ | |||||
| url: '/model/AppCleanRequest', | |||||
| method: 'put', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 删除清洁要求 | |||||
| export function delAppCleanRequest(cleanRequestId) { | |||||
| return request({ | |||||
| url: '/model/AppCleanRequest/' + cleanRequestId, | |||||
| method: 'delete' | |||||
| }) | |||||
| } | |||||
| @ -0,0 +1,277 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form"> | |||||
| <el-form-item label="清洁物品名称" prop="cleanItemsName"> | |||||
| <el-input | |||||
| v-model="queryParams.cleanItemsName" | |||||
| placeholder="请输入清洁物品名称" | |||||
| clearable | |||||
| size="small" | |||||
| @keyup.enter.native="handleQuery" | |||||
| /> | |||||
| </el-form-item> | |||||
| <el-form-item class="flex_one tr"> | |||||
| <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |||||
| <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |||||
| </el-form-item> | |||||
| </el-form> | |||||
| <el-row :gutter="10" class="mb8"> | |||||
| <el-col :span="1.5"> | |||||
| <el-button | |||||
| type="primary" | |||||
| plain | |||||
| icon="el-icon-plus" | |||||
| size="mini" | |||||
| @click="handleAdd" | |||||
| v-hasPermi="['model:AppCleanItems:add']" | |||||
| >新增</el-button> | |||||
| </el-col> | |||||
| <el-col :span="1.5"> | |||||
| <el-button | |||||
| type="success" | |||||
| plain | |||||
| icon="el-icon-edit" | |||||
| size="mini" | |||||
| :disabled="single" | |||||
| @click="handleUpdate" | |||||
| v-hasPermi="['model:AppCleanItems:edit']" | |||||
| >修改</el-button> | |||||
| </el-col> | |||||
| <el-col :span="1.5"> | |||||
| <el-button | |||||
| type="danger" | |||||
| plain | |||||
| icon="el-icon-delete" | |||||
| size="mini" | |||||
| :disabled="multiple" | |||||
| @click="handleDelete" | |||||
| v-hasPermi="['model:AppCleanItems:remove']" | |||||
| >删除</el-button> | |||||
| </el-col> | |||||
| <el-col :span="1.5"> | |||||
| <el-button | |||||
| type="warning" | |||||
| plain | |||||
| icon="el-icon-download" | |||||
| size="mini" | |||||
| :loading="exportLoading" | |||||
| @click="handleExport" | |||||
| v-hasPermi="['model:AppCleanItems:export']" | |||||
| >导出</el-button> | |||||
| </el-col> | |||||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||||
| </el-row> | |||||
| <el-table v-loading="loading" :data="AppCleanItemsList" @selection-change="handleSelectionChange"> | |||||
| <el-table-column type="selection" width="55" align="center" /> | |||||
| <el-table-column label="清洁物品编号" align="center" prop="cleanItemsId" /> | |||||
| <el-table-column label="清洁物品名称" align="center" prop="cleanItemsName" v-if="columns[0].visible"/> | |||||
| <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-edit" | |||||
| @click="handleUpdate(scope.row)" | |||||
| v-hasPermi="['model:AppCleanItems:edit']" | |||||
| >修改</el-button> | |||||
| <el-button | |||||
| size="mini" | |||||
| type="text" | |||||
| icon="el-icon-delete" | |||||
| @click="handleDelete(scope.row)" | |||||
| v-hasPermi="['model:AppCleanItems:remove']" | |||||
| >删除</el-button> | |||||
| </template> | |||||
| </el-table-column> | |||||
| </el-table> | |||||
| <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="50%" append-to-body> | |||||
| <el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> | |||||
| <el-form-item label="清洁物品名称" prop="cleanItemsName"> | |||||
| <el-input v-model="form.cleanItemsName" placeholder="请输入清洁物品名称" /> | |||||
| </el-form-item> | |||||
| <el-form-item label="删除标识" prop="delFlag"> | |||||
| <el-input v-model="form.delFlag" placeholder="请输入删除标识" /> | |||||
| </el-form-item> | |||||
| </el-form> | |||||
| <div slot="footer" class="dialog-footer"> | |||||
| <el-button type="primary" @click="submitForm">确 定</el-button> | |||||
| <el-button @click="cancel">取 消</el-button> | |||||
| </div> | |||||
| </el-dialog> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { listAppCleanItems, getAppCleanItems, delAppCleanItems, addAppCleanItems, updateAppCleanItems, exportAppCleanItems } from "@/api/model/AppCleanItems"; | |||||
| export default { | |||||
| name: "AppCleanItems", | |||||
| data() { | |||||
| return { | |||||
| // 遮罩层 | |||||
| loading: true, | |||||
| // 导出遮罩层 | |||||
| exportLoading: false, | |||||
| // 选中数组 | |||||
| ids: [], | |||||
| // 非单个禁用 | |||||
| single: true, | |||||
| // 非多个禁用 | |||||
| multiple: true, | |||||
| // 显示搜索条件 | |||||
| showSearch: true, | |||||
| // 总条数 | |||||
| total: 0, | |||||
| // 清洁物品表格数据 | |||||
| AppCleanItemsList: [], | |||||
| // 弹出层标题 | |||||
| title: "", | |||||
| // 是否显示弹出层 | |||||
| open: false, | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| pageNum: 1, | |||||
| pageSize: 10, | |||||
| cleanItemsName: null, | |||||
| }, | |||||
| // 表单参数 | |||||
| form: {}, | |||||
| // 表单校验 | |||||
| rules: { | |||||
| cleanItemsName: [ | |||||
| { required: true, message: "清洁物品名称不能为空", trigger: "blur" } | |||||
| ], | |||||
| }, | |||||
| columns: [ | |||||
| { key: 1, label: "清洁物品名称", visible: true }, | |||||
| ], | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| this.getList(); | |||||
| }, | |||||
| methods: { | |||||
| /** 查询清洁物品列表 */ | |||||
| getList() { | |||||
| this.loading = true; | |||||
| listAppCleanItems(this.queryParams).then(response => { | |||||
| this.AppCleanItemsList = response.rows; | |||||
| this.total = response.total; | |||||
| this.loading = false; | |||||
| }); | |||||
| }, | |||||
| // 取消按钮 | |||||
| cancel() { | |||||
| this.open = false; | |||||
| this.reset(); | |||||
| }, | |||||
| // 表单重置 | |||||
| reset() { | |||||
| this.form = { | |||||
| cleanItemsId: null, | |||||
| cleanItemsName: null, | |||||
| createBy: null, | |||||
| createTime: null, | |||||
| updateBy: null, | |||||
| updateTime: null, | |||||
| delFlag: null, | |||||
| }; | |||||
| this.resetForm("form"); | |||||
| }, | |||||
| /** 搜索按钮操作 */ | |||||
| handleQuery() { | |||||
| this.queryParams.pageNum = 1; | |||||
| this.getList(); | |||||
| }, | |||||
| /** 重置按钮操作 */ | |||||
| resetQuery() { | |||||
| this.resetForm("queryForm"); | |||||
| this.handleQuery(); | |||||
| }, | |||||
| // 多选框选中数据 | |||||
| handleSelectionChange(selection) { | |||||
| this.ids = selection.map(item => item.cleanItemsId) | |||||
| this.single = selection.length!==1 | |||||
| this.multiple = !selection.length | |||||
| }, | |||||
| /** 新增按钮操作 */ | |||||
| handleAdd() { | |||||
| this.reset(); | |||||
| this.open = true; | |||||
| this.title = "添加清洁物品"; | |||||
| }, | |||||
| /** 修改按钮操作 */ | |||||
| handleUpdate(row) { | |||||
| this.reset(); | |||||
| const cleanItemsId = row.cleanItemsId || this.ids | |||||
| getAppCleanItems(cleanItemsId).then(response => { | |||||
| this.form = response.data; | |||||
| this.open = true; | |||||
| this.title = "修改清洁物品"; | |||||
| }); | |||||
| }, | |||||
| /** 提交按钮 */ | |||||
| submitForm() { | |||||
| this.$refs["form"].validate(valid => { | |||||
| if (valid) { | |||||
| if (this.form.cleanItemsId != null) { | |||||
| updateAppCleanItems(this.form).then(response => { | |||||
| this.$modal.msgSuccess("修改成功"); | |||||
| this.open = false; | |||||
| this.getList(); | |||||
| }); | |||||
| } else { | |||||
| addAppCleanItems(this.form).then(response => { | |||||
| this.$modal.msgSuccess("新增成功"); | |||||
| this.open = false; | |||||
| this.getList(); | |||||
| }); | |||||
| } | |||||
| } | |||||
| }); | |||||
| }, | |||||
| /** 删除按钮操作 */ | |||||
| handleDelete(row) { | |||||
| const cleanItemsIds = row.cleanItemsId || this.ids; | |||||
| this.$modal.confirm('是否确认删除清洁物品编号为"' + cleanItemsIds + '"的数据项?').then(function() { | |||||
| return delAppCleanItems(cleanItemsIds); | |||||
| }).then(() => { | |||||
| this.getList(); | |||||
| this.$modal.msgSuccess("删除成功"); | |||||
| }).catch(() => {}); | |||||
| }, | |||||
| /** 导出按钮操作 */ | |||||
| handleExport() { | |||||
| const queryParams = this.queryParams; | |||||
| this.$modal.confirm('是否确认导出所有清洁物品数据项?').then(() => { | |||||
| this.exportLoading = true; | |||||
| return exportAppCleanItems(queryParams); | |||||
| }).then(response => { | |||||
| this.download(response.msg); | |||||
| this.exportLoading = false; | |||||
| }).catch(() => {}); | |||||
| } | |||||
| } | |||||
| }; | |||||
| </script> | |||||
| @ -0,0 +1,338 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form"> | |||||
| <el-form-item label="清洁物品编号" prop="cleanItemsId"> | |||||
| <el-input | |||||
| v-model="queryParams.cleanItemsId" | |||||
| placeholder="请输入清洁物品编号" | |||||
| clearable | |||||
| size="small" | |||||
| @keyup.enter.native="handleQuery" | |||||
| /> | |||||
| </el-form-item> | |||||
| <el-form-item label="服务档案编号" prop="serviceFileId"> | |||||
| <el-input | |||||
| v-model="queryParams.serviceFileId" | |||||
| placeholder="请输入服务档案编号" | |||||
| clearable | |||||
| size="small" | |||||
| @keyup.enter.native="handleQuery" | |||||
| /> | |||||
| </el-form-item> | |||||
| <el-form-item label="更换频率天" prop="cleanRequestFrequencyDay"> | |||||
| <el-input | |||||
| v-model="queryParams.cleanRequestFrequencyDay" | |||||
| placeholder="请输入更换频率天" | |||||
| clearable | |||||
| size="small" | |||||
| @keyup.enter.native="handleQuery" | |||||
| /> | |||||
| </el-form-item> | |||||
| <el-form-item label="更换频率次" prop="cleanRequestFrequencyTimes"> | |||||
| <el-input | |||||
| v-model="queryParams.cleanRequestFrequencyTimes" | |||||
| placeholder="请输入更换频率次" | |||||
| clearable | |||||
| size="small" | |||||
| @keyup.enter.native="handleQuery" | |||||
| /> | |||||
| </el-form-item> | |||||
| <el-form-item class="flex_one tr"> | |||||
| <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |||||
| <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |||||
| </el-form-item> | |||||
| </el-form> | |||||
| <el-row :gutter="10" class="mb8"> | |||||
| <el-col :span="1.5"> | |||||
| <el-button | |||||
| type="primary" | |||||
| plain | |||||
| icon="el-icon-plus" | |||||
| size="mini" | |||||
| @click="handleAdd" | |||||
| v-hasPermi="['model:AppCleanRequest:add']" | |||||
| >新增</el-button> | |||||
| </el-col> | |||||
| <el-col :span="1.5"> | |||||
| <el-button | |||||
| type="success" | |||||
| plain | |||||
| icon="el-icon-edit" | |||||
| size="mini" | |||||
| :disabled="single" | |||||
| @click="handleUpdate" | |||||
| v-hasPermi="['model:AppCleanRequest:edit']" | |||||
| >修改</el-button> | |||||
| </el-col> | |||||
| <el-col :span="1.5"> | |||||
| <el-button | |||||
| type="danger" | |||||
| plain | |||||
| icon="el-icon-delete" | |||||
| size="mini" | |||||
| :disabled="multiple" | |||||
| @click="handleDelete" | |||||
| v-hasPermi="['model:AppCleanRequest:remove']" | |||||
| >删除</el-button> | |||||
| </el-col> | |||||
| <el-col :span="1.5"> | |||||
| <el-button | |||||
| type="warning" | |||||
| plain | |||||
| icon="el-icon-download" | |||||
| size="mini" | |||||
| :loading="exportLoading" | |||||
| @click="handleExport" | |||||
| v-hasPermi="['model:AppCleanRequest:export']" | |||||
| >导出</el-button> | |||||
| </el-col> | |||||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||||
| </el-row> | |||||
| <el-table v-loading="loading" :data="AppCleanRequestList" @selection-change="handleSelectionChange"> | |||||
| <el-table-column type="selection" width="55" align="center" /> | |||||
| <el-table-column label="清洁要求编号" align="center" prop="cleanRequestId" /> | |||||
| <el-table-column label="清洁物品编号" align="center" prop="cleanItemsId" v-if="columns[0].visible"/> | |||||
| <el-table-column label="服务档案编号" align="center" prop="serviceFileId" v-if="columns[1].visible"/> | |||||
| <el-table-column label="清洁物品摆放位置" align="center" prop="cleanRequestImage" v-if="columns[2].visible"/> | |||||
| <el-table-column label="更换频率天" align="center" prop="cleanRequestFrequencyDay" v-if="columns[3].visible"/> | |||||
| <el-table-column label="更换频率次" align="center" prop="cleanRequestFrequencyTimes" v-if="columns[4].visible"/> | |||||
| <el-table-column label="备注" align="center" prop="remark" v-if="columns[5].visible"/> | |||||
| <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-edit" | |||||
| @click="handleUpdate(scope.row)" | |||||
| v-hasPermi="['model:AppCleanRequest:edit']" | |||||
| >修改</el-button> | |||||
| <el-button | |||||
| size="mini" | |||||
| type="text" | |||||
| icon="el-icon-delete" | |||||
| @click="handleDelete(scope.row)" | |||||
| v-hasPermi="['model:AppCleanRequest:remove']" | |||||
| >删除</el-button> | |||||
| </template> | |||||
| </el-table-column> | |||||
| </el-table> | |||||
| <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="50%" append-to-body> | |||||
| <el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> | |||||
| <el-form-item label="清洁物品编号" prop="cleanItemsId"> | |||||
| <el-input v-model="form.cleanItemsId" placeholder="请输入清洁物品编号" /> | |||||
| </el-form-item> | |||||
| <el-form-item label="服务档案编号" prop="serviceFileId"> | |||||
| <el-input v-model="form.serviceFileId" placeholder="请输入服务档案编号" /> | |||||
| </el-form-item> | |||||
| <el-form-item label="清洁物品摆放位置"> | |||||
| <imageUpload v-model="form.cleanRequestImage"/> | |||||
| </el-form-item> | |||||
| <el-form-item label="更换频率天" prop="cleanRequestFrequencyDay"> | |||||
| <el-input v-model="form.cleanRequestFrequencyDay" placeholder="请输入更换频率天" /> | |||||
| </el-form-item> | |||||
| <el-form-item label="更换频率次" prop="cleanRequestFrequencyTimes"> | |||||
| <el-input v-model="form.cleanRequestFrequencyTimes" placeholder="请输入更换频率次" /> | |||||
| </el-form-item> | |||||
| <el-form-item label="备注" prop="remark"> | |||||
| <el-input v-model="form.remark" placeholder="请输入备注" /> | |||||
| </el-form-item> | |||||
| </el-form> | |||||
| <div slot="footer" class="dialog-footer"> | |||||
| <el-button type="primary" @click="submitForm">确 定</el-button> | |||||
| <el-button @click="cancel">取 消</el-button> | |||||
| </div> | |||||
| </el-dialog> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { listAppCleanRequest, getAppCleanRequest, delAppCleanRequest, addAppCleanRequest, updateAppCleanRequest, exportAppCleanRequest } from "@/api/model/AppCleanRequest"; | |||||
| export default { | |||||
| name: "AppCleanRequest", | |||||
| data() { | |||||
| return { | |||||
| // 遮罩层 | |||||
| loading: true, | |||||
| // 导出遮罩层 | |||||
| exportLoading: false, | |||||
| // 选中数组 | |||||
| ids: [], | |||||
| // 非单个禁用 | |||||
| single: true, | |||||
| // 非多个禁用 | |||||
| multiple: true, | |||||
| // 显示搜索条件 | |||||
| showSearch: true, | |||||
| // 总条数 | |||||
| total: 0, | |||||
| // 清洁要求表格数据 | |||||
| AppCleanRequestList: [], | |||||
| // 弹出层标题 | |||||
| title: "", | |||||
| // 是否显示弹出层 | |||||
| open: false, | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| pageNum: 1, | |||||
| pageSize: 10, | |||||
| cleanItemsId: null, | |||||
| serviceFileId: null, | |||||
| cleanRequestImage: null, | |||||
| cleanRequestFrequencyDay: null, | |||||
| cleanRequestFrequencyTimes: null, | |||||
| }, | |||||
| // 表单参数 | |||||
| form: {}, | |||||
| // 表单校验 | |||||
| rules: { | |||||
| cleanItemsId: [ | |||||
| { required: true, message: "清洁物品编号不能为空", trigger: "blur" } | |||||
| ], | |||||
| serviceFileId: [ | |||||
| { required: true, message: "服务档案编号不能为空", trigger: "blur" } | |||||
| ], | |||||
| }, | |||||
| columns: [ | |||||
| { key: 1, label: "清洁物品编号", visible: true }, | |||||
| { key: 2, label: "服务档案编号", visible: true }, | |||||
| { key: 3, label: "清洁物品摆放位置", visible: false }, | |||||
| { key: 4, label: "更换频率天", visible: true }, | |||||
| { key: 5, label: "更换频率次", visible: true }, | |||||
| { key: 6, label: "备注", visible: true }, | |||||
| ], | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| this.getList(); | |||||
| }, | |||||
| methods: { | |||||
| /** 查询清洁要求列表 */ | |||||
| getList() { | |||||
| this.loading = true; | |||||
| listAppCleanRequest(this.queryParams).then(response => { | |||||
| this.AppCleanRequestList = response.rows; | |||||
| this.total = response.total; | |||||
| this.loading = false; | |||||
| }); | |||||
| }, | |||||
| // 取消按钮 | |||||
| cancel() { | |||||
| this.open = false; | |||||
| this.reset(); | |||||
| }, | |||||
| // 表单重置 | |||||
| reset() { | |||||
| this.form = { | |||||
| cleanRequestId: null, | |||||
| cleanItemsId: null, | |||||
| serviceFileId: null, | |||||
| cleanRequestImage: null, | |||||
| cleanRequestFrequencyDay: null, | |||||
| cleanRequestFrequencyTimes: null, | |||||
| remark: null, | |||||
| }; | |||||
| this.resetForm("form"); | |||||
| }, | |||||
| /** 搜索按钮操作 */ | |||||
| handleQuery() { | |||||
| this.queryParams.pageNum = 1; | |||||
| this.getList(); | |||||
| }, | |||||
| /** 重置按钮操作 */ | |||||
| resetQuery() { | |||||
| this.resetForm("queryForm"); | |||||
| this.handleQuery(); | |||||
| }, | |||||
| // 多选框选中数据 | |||||
| handleSelectionChange(selection) { | |||||
| this.ids = selection.map(item => item.cleanRequestId) | |||||
| this.single = selection.length!==1 | |||||
| this.multiple = !selection.length | |||||
| }, | |||||
| /** 新增按钮操作 */ | |||||
| handleAdd() { | |||||
| this.reset(); | |||||
| this.open = true; | |||||
| this.title = "添加清洁要求"; | |||||
| }, | |||||
| /** 修改按钮操作 */ | |||||
| handleUpdate(row) { | |||||
| this.reset(); | |||||
| const cleanRequestId = row.cleanRequestId || this.ids | |||||
| getAppCleanRequest(cleanRequestId).then(response => { | |||||
| this.form = response.data; | |||||
| this.open = true; | |||||
| this.title = "修改清洁要求"; | |||||
| }); | |||||
| }, | |||||
| /** 提交按钮 */ | |||||
| submitForm() { | |||||
| this.$refs["form"].validate(valid => { | |||||
| if (valid) { | |||||
| if (this.form.cleanRequestId != null) { | |||||
| updateAppCleanRequest(this.form).then(response => { | |||||
| this.$modal.msgSuccess("修改成功"); | |||||
| this.open = false; | |||||
| this.getList(); | |||||
| }); | |||||
| } else { | |||||
| addAppCleanRequest(this.form).then(response => { | |||||
| this.$modal.msgSuccess("新增成功"); | |||||
| this.open = false; | |||||
| this.getList(); | |||||
| }); | |||||
| } | |||||
| } | |||||
| }); | |||||
| }, | |||||
| /** 删除按钮操作 */ | |||||
| handleDelete(row) { | |||||
| const cleanRequestIds = row.cleanRequestId || this.ids; | |||||
| this.$modal.confirm('是否确认删除清洁要求编号为"' + cleanRequestIds + '"的数据项?').then(function() { | |||||
| return delAppCleanRequest(cleanRequestIds); | |||||
| }).then(() => { | |||||
| this.getList(); | |||||
| this.$modal.msgSuccess("删除成功"); | |||||
| }).catch(() => {}); | |||||
| }, | |||||
| /** 导出按钮操作 */ | |||||
| handleExport() { | |||||
| const queryParams = this.queryParams; | |||||
| this.$modal.confirm('是否确认导出所有清洁要求数据项?').then(() => { | |||||
| this.exportLoading = true; | |||||
| return exportAppCleanRequest(queryParams); | |||||
| }).then(response => { | |||||
| this.download(response.msg); | |||||
| this.exportLoading = false; | |||||
| }).catch(() => {}); | |||||
| } | |||||
| } | |||||
| }; | |||||
| </script> | |||||
| @ -0,0 +1,38 @@ | |||||
| package com.ruoyi.applet.contoller; | |||||
| import com.ruoyi.common.core.controller.BaseController; | |||||
| import com.ruoyi.common.core.page.TableDataInfo; | |||||
| import com.ruoyi.model.service.IAppCleanItemsService; | |||||
| import com.ruoyi.model.service.IAppCleanRequestService; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.GetMapping; | |||||
| import org.springframework.web.bind.annotation.RequestMapping; | |||||
| import org.springframework.web.bind.annotation.RestController; | |||||
| @Api(description = "清洁物品及其要求") | |||||
| @RestController | |||||
| @RequestMapping("/applet/cleanItem") | |||||
| public class AppletAppCleanItemsController extends BaseController { | |||||
| @Autowired | |||||
| private IAppCleanItemsService appCleanItemsService; | |||||
| @ApiOperation("查询所有清洁物品") | |||||
| @GetMapping("/getAppCleanItemsList") | |||||
| public TableDataInfo getAppCleanItemsList(){ | |||||
| return getDataTable(appCleanItemsService.getAppCleanItemsList()); | |||||
| } | |||||
| @Autowired | |||||
| private IAppCleanRequestService appCleanRequestService; | |||||
| @ApiOperation("查询所有清洁要求") | |||||
| @GetMapping("/getAppCleanRequestList") | |||||
| public TableDataInfo getAppCleanRequestList(){ | |||||
| return getDataTable(appCleanRequestService.getAppCleanRequestList()); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,104 @@ | |||||
| package com.ruoyi.model.controller; | |||||
| import java.io.IOException; | |||||
| import java.util.List; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| import org.springframework.security.access.prepost.PreAuthorize; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.GetMapping; | |||||
| import org.springframework.web.bind.annotation.PostMapping; | |||||
| import org.springframework.web.bind.annotation.PutMapping; | |||||
| import org.springframework.web.bind.annotation.DeleteMapping; | |||||
| import org.springframework.web.bind.annotation.PathVariable; | |||||
| import org.springframework.web.bind.annotation.RequestBody; | |||||
| import org.springframework.web.bind.annotation.RequestMapping; | |||||
| import org.springframework.web.bind.annotation.RestController; | |||||
| import com.ruoyi.common.annotation.Log; | |||||
| import com.ruoyi.common.core.controller.BaseController; | |||||
| import com.ruoyi.common.core.domain.AjaxResult; | |||||
| import com.ruoyi.common.enums.BusinessType; | |||||
| import com.ruoyi.model.domain.AppCleanItems; | |||||
| import com.ruoyi.model.service.IAppCleanItemsService; | |||||
| import com.ruoyi.common.utils.poi.ExcelUtil; | |||||
| import com.ruoyi.common.core.page.TableDataInfo; | |||||
| /** | |||||
| * 清洁物品Controller | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-10 | |||||
| */ | |||||
| @RestController | |||||
| @RequestMapping("/model/AppCleanItems") | |||||
| public class AppCleanItemsController extends BaseController | |||||
| { | |||||
| @Autowired | |||||
| private IAppCleanItemsService appCleanItemsService; | |||||
| /** | |||||
| * 查询清洁物品列表 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanItems:list')") | |||||
| @GetMapping("/list") | |||||
| public TableDataInfo list(AppCleanItems appCleanItems) | |||||
| { | |||||
| startPage(); | |||||
| List<AppCleanItems> list = appCleanItemsService.selectAppCleanItemsList(appCleanItems); | |||||
| return getDataTable(list); | |||||
| } | |||||
| /** | |||||
| * 导出清洁物品列表 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanItems:export')") | |||||
| @Log(title = "清洁物品", businessType = BusinessType.EXPORT) | |||||
| @PostMapping("/export") | |||||
| public void export(HttpServletResponse response, AppCleanItems appCleanItems) throws IOException { | |||||
| List<AppCleanItems> list = appCleanItemsService.selectAppCleanItemsList(appCleanItems); | |||||
| ExcelUtil<AppCleanItems> util = new ExcelUtil<AppCleanItems>(AppCleanItems.class); | |||||
| util.exportExcel(response, list, "清洁物品数据"); | |||||
| } | |||||
| /** | |||||
| * 获取清洁物品详细信息 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanItems:query')") | |||||
| @GetMapping(value = "/{cleanItemsId}") | |||||
| public AjaxResult getInfo(@PathVariable("cleanItemsId") Long cleanItemsId) | |||||
| { | |||||
| return success(appCleanItemsService.selectAppCleanItemsByCleanItemsId(cleanItemsId)); | |||||
| } | |||||
| /** | |||||
| * 新增清洁物品 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanItems:add')") | |||||
| @Log(title = "清洁物品", businessType = BusinessType.INSERT) | |||||
| @PostMapping | |||||
| public AjaxResult add(@RequestBody AppCleanItems appCleanItems) | |||||
| { | |||||
| return toAjax(appCleanItemsService.insertAppCleanItems(appCleanItems)); | |||||
| } | |||||
| /** | |||||
| * 修改清洁物品 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanItems:edit')") | |||||
| @Log(title = "清洁物品", businessType = BusinessType.UPDATE) | |||||
| @PutMapping | |||||
| public AjaxResult edit(@RequestBody AppCleanItems appCleanItems) | |||||
| { | |||||
| return toAjax(appCleanItemsService.updateAppCleanItems(appCleanItems)); | |||||
| } | |||||
| /** | |||||
| * 删除清洁物品 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanItems:remove')") | |||||
| @Log(title = "清洁物品", businessType = BusinessType.DELETE) | |||||
| @DeleteMapping("/{cleanItemsIds}") | |||||
| public AjaxResult remove(@PathVariable Long[] cleanItemsIds) | |||||
| { | |||||
| return toAjax(appCleanItemsService.deleteAppCleanItemsByCleanItemsIds(cleanItemsIds)); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,104 @@ | |||||
| package com.ruoyi.model.controller; | |||||
| import java.io.IOException; | |||||
| import java.util.List; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| import org.springframework.security.access.prepost.PreAuthorize; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.GetMapping; | |||||
| import org.springframework.web.bind.annotation.PostMapping; | |||||
| import org.springframework.web.bind.annotation.PutMapping; | |||||
| import org.springframework.web.bind.annotation.DeleteMapping; | |||||
| import org.springframework.web.bind.annotation.PathVariable; | |||||
| import org.springframework.web.bind.annotation.RequestBody; | |||||
| import org.springframework.web.bind.annotation.RequestMapping; | |||||
| import org.springframework.web.bind.annotation.RestController; | |||||
| import com.ruoyi.common.annotation.Log; | |||||
| import com.ruoyi.common.core.controller.BaseController; | |||||
| import com.ruoyi.common.core.domain.AjaxResult; | |||||
| import com.ruoyi.common.enums.BusinessType; | |||||
| import com.ruoyi.model.domain.AppCleanRequest; | |||||
| import com.ruoyi.model.service.IAppCleanRequestService; | |||||
| import com.ruoyi.common.utils.poi.ExcelUtil; | |||||
| import com.ruoyi.common.core.page.TableDataInfo; | |||||
| /** | |||||
| * 清洁要求Controller | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-10 | |||||
| */ | |||||
| @RestController | |||||
| @RequestMapping("/model/AppCleanRequest") | |||||
| public class AppCleanRequestController extends BaseController | |||||
| { | |||||
| @Autowired | |||||
| private IAppCleanRequestService appCleanRequestService; | |||||
| /** | |||||
| * 查询清洁要求列表 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanRequest:list')") | |||||
| @GetMapping("/list") | |||||
| public TableDataInfo list(AppCleanRequest appCleanRequest) | |||||
| { | |||||
| startPage(); | |||||
| List<AppCleanRequest> list = appCleanRequestService.selectAppCleanRequestList(appCleanRequest); | |||||
| return getDataTable(list); | |||||
| } | |||||
| /** | |||||
| * 导出清洁要求列表 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanRequest:export')") | |||||
| @Log(title = "清洁要求", businessType = BusinessType.EXPORT) | |||||
| @PostMapping("/export") | |||||
| public void export(HttpServletResponse response, AppCleanRequest appCleanRequest) throws IOException { | |||||
| List<AppCleanRequest> list = appCleanRequestService.selectAppCleanRequestList(appCleanRequest); | |||||
| ExcelUtil<AppCleanRequest> util = new ExcelUtil<AppCleanRequest>(AppCleanRequest.class); | |||||
| util.exportExcel(response, list, "清洁要求数据"); | |||||
| } | |||||
| /** | |||||
| * 获取清洁要求详细信息 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanRequest:query')") | |||||
| @GetMapping(value = "/{cleanRequestId}") | |||||
| public AjaxResult getInfo(@PathVariable("cleanRequestId") Long cleanRequestId) | |||||
| { | |||||
| return success(appCleanRequestService.selectAppCleanRequestByCleanRequestId(cleanRequestId)); | |||||
| } | |||||
| /** | |||||
| * 新增清洁要求 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanRequest:add')") | |||||
| @Log(title = "清洁要求", businessType = BusinessType.INSERT) | |||||
| @PostMapping | |||||
| public AjaxResult add(@RequestBody AppCleanRequest appCleanRequest) | |||||
| { | |||||
| return toAjax(appCleanRequestService.insertAppCleanRequest(appCleanRequest)); | |||||
| } | |||||
| /** | |||||
| * 修改清洁要求 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanRequest:edit')") | |||||
| @Log(title = "清洁要求", businessType = BusinessType.UPDATE) | |||||
| @PutMapping | |||||
| public AjaxResult edit(@RequestBody AppCleanRequest appCleanRequest) | |||||
| { | |||||
| return toAjax(appCleanRequestService.updateAppCleanRequest(appCleanRequest)); | |||||
| } | |||||
| /** | |||||
| * 删除清洁要求 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppCleanRequest:remove')") | |||||
| @Log(title = "清洁要求", businessType = BusinessType.DELETE) | |||||
| @DeleteMapping("/{cleanRequestIds}") | |||||
| public AjaxResult remove(@PathVariable Long[] cleanRequestIds) | |||||
| { | |||||
| return toAjax(appCleanRequestService.deleteAppCleanRequestByCleanRequestIds(cleanRequestIds)); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,68 @@ | |||||
| package com.ruoyi.model.domain; | |||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | |||||
| import org.apache.commons.lang3.builder.ToStringStyle; | |||||
| import com.ruoyi.common.annotation.Excel; | |||||
| import com.ruoyi.common.core.domain.BaseEntity; | |||||
| /** | |||||
| * 清洁物品对象 app_clean_items | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-10 | |||||
| */ | |||||
| public class AppCleanItems extends BaseEntity | |||||
| { | |||||
| private static final long serialVersionUID = 1L; | |||||
| /** 清洁物品编号 */ | |||||
| private Long cleanItemsId; | |||||
| /** 清洁物品名称 */ | |||||
| @Excel(name = "清洁物品名称") | |||||
| private Long cleanItemsName; | |||||
| /** 删除标识 */ | |||||
| private Integer delFlag; | |||||
| public void setCleanItemsId(Long cleanItemsId) | |||||
| { | |||||
| this.cleanItemsId = cleanItemsId; | |||||
| } | |||||
| public Long getCleanItemsId() | |||||
| { | |||||
| return cleanItemsId; | |||||
| } | |||||
| public void setCleanItemsName(Long cleanItemsName) | |||||
| { | |||||
| this.cleanItemsName = cleanItemsName; | |||||
| } | |||||
| public Long getCleanItemsName() | |||||
| { | |||||
| return cleanItemsName; | |||||
| } | |||||
| public void setDelFlag(Integer delFlag) | |||||
| { | |||||
| this.delFlag = delFlag; | |||||
| } | |||||
| public Integer getDelFlag() | |||||
| { | |||||
| return delFlag; | |||||
| } | |||||
| @Override | |||||
| public String toString() { | |||||
| return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |||||
| .append("cleanItemsId", getCleanItemsId()) | |||||
| .append("cleanItemsName", getCleanItemsName()) | |||||
| .append("createBy", getCreateBy()) | |||||
| .append("createTime", getCreateTime()) | |||||
| .append("updateBy", getUpdateBy()) | |||||
| .append("updateTime", getUpdateTime()) | |||||
| .append("delFlag", getDelFlag()) | |||||
| .toString(); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,108 @@ | |||||
| package com.ruoyi.model.domain; | |||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | |||||
| import org.apache.commons.lang3.builder.ToStringStyle; | |||||
| import com.ruoyi.common.annotation.Excel; | |||||
| import com.ruoyi.common.core.domain.BaseEntity; | |||||
| /** | |||||
| * 清洁要求对象 app_clean_request | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-10 | |||||
| */ | |||||
| public class AppCleanRequest extends BaseEntity | |||||
| { | |||||
| private static final long serialVersionUID = 1L; | |||||
| /** 清洁要求编号 */ | |||||
| private Long cleanRequestId; | |||||
| /** 清洁物品编号 */ | |||||
| @Excel(name = "清洁物品编号") | |||||
| private Long cleanItemsId; | |||||
| /** 服务档案编号 */ | |||||
| @Excel(name = "服务档案编号") | |||||
| private Long serviceFileId; | |||||
| /** 清洁物品摆放位置 */ | |||||
| @Excel(name = "清洁物品摆放位置") | |||||
| private String cleanRequestImage; | |||||
| /** 更换频率天 */ | |||||
| @Excel(name = "更换频率天") | |||||
| private Long cleanRequestFrequencyDay; | |||||
| /** 更换频率次 */ | |||||
| @Excel(name = "更换频率次") | |||||
| private Long cleanRequestFrequencyTimes; | |||||
| public void setCleanRequestId(Long cleanRequestId) | |||||
| { | |||||
| this.cleanRequestId = cleanRequestId; | |||||
| } | |||||
| public Long getCleanRequestId() | |||||
| { | |||||
| return cleanRequestId; | |||||
| } | |||||
| public void setCleanItemsId(Long cleanItemsId) | |||||
| { | |||||
| this.cleanItemsId = cleanItemsId; | |||||
| } | |||||
| public Long getCleanItemsId() | |||||
| { | |||||
| return cleanItemsId; | |||||
| } | |||||
| public void setServiceFileId(Long serviceFileId) | |||||
| { | |||||
| this.serviceFileId = serviceFileId; | |||||
| } | |||||
| public Long getServiceFileId() | |||||
| { | |||||
| return serviceFileId; | |||||
| } | |||||
| public void setCleanRequestImage(String cleanRequestImage) | |||||
| { | |||||
| this.cleanRequestImage = cleanRequestImage; | |||||
| } | |||||
| public String getCleanRequestImage() | |||||
| { | |||||
| return cleanRequestImage; | |||||
| } | |||||
| public void setCleanRequestFrequencyDay(Long cleanRequestFrequencyDay) | |||||
| { | |||||
| this.cleanRequestFrequencyDay = cleanRequestFrequencyDay; | |||||
| } | |||||
| public Long getCleanRequestFrequencyDay() | |||||
| { | |||||
| return cleanRequestFrequencyDay; | |||||
| } | |||||
| public void setCleanRequestFrequencyTimes(Long cleanRequestFrequencyTimes) | |||||
| { | |||||
| this.cleanRequestFrequencyTimes = cleanRequestFrequencyTimes; | |||||
| } | |||||
| public Long getCleanRequestFrequencyTimes() | |||||
| { | |||||
| return cleanRequestFrequencyTimes; | |||||
| } | |||||
| @Override | |||||
| public String toString() { | |||||
| return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |||||
| .append("cleanRequestId", getCleanRequestId()) | |||||
| .append("cleanItemsId", getCleanItemsId()) | |||||
| .append("serviceFileId", getServiceFileId()) | |||||
| .append("cleanRequestImage", getCleanRequestImage()) | |||||
| .append("cleanRequestFrequencyDay", getCleanRequestFrequencyDay()) | |||||
| .append("cleanRequestFrequencyTimes", getCleanRequestFrequencyTimes()) | |||||
| .append("remark", getRemark()) | |||||
| .toString(); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,68 @@ | |||||
| package com.ruoyi.model.mapper; | |||||
| import java.util.List; | |||||
| import com.ruoyi.model.domain.AppCleanItems; | |||||
| /** | |||||
| * 清洁物品Mapper接口 | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-10 | |||||
| */ | |||||
| public interface AppCleanItemsMapper | |||||
| { | |||||
| /** | |||||
| * 查询清洁物品 | |||||
| * | |||||
| * @param cleanItemsId 清洁物品主键 | |||||
| * @return 清洁物品 | |||||
| */ | |||||
| public AppCleanItems selectAppCleanItemsByCleanItemsId(Long cleanItemsId); | |||||
| /** | |||||
| * 查询清洁物品列表 | |||||
| * | |||||
| * @param appCleanItems 清洁物品 | |||||
| * @return 清洁物品集合 | |||||
| */ | |||||
| public List<AppCleanItems> selectAppCleanItemsList(AppCleanItems appCleanItems); | |||||
| /** | |||||
| * 新增清洁物品 | |||||
| * | |||||
| * @param appCleanItems 清洁物品 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int insertAppCleanItems(AppCleanItems appCleanItems); | |||||
| /** | |||||
| * 修改清洁物品 | |||||
| * | |||||
| * @param appCleanItems 清洁物品 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int updateAppCleanItems(AppCleanItems appCleanItems); | |||||
| /** | |||||
| * 删除清洁物品 | |||||
| * | |||||
| * @param cleanItemsId 清洁物品主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppCleanItemsByCleanItemsId(Long cleanItemsId); | |||||
| /** | |||||
| * 批量删除清洁物品 | |||||
| * | |||||
| * @param cleanItemsIds 需要删除的数据主键集合 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppCleanItemsByCleanItemsIds(Long[] cleanItemsIds); | |||||
| /** | |||||
| * 查询清洁物品列表 | |||||
| * | |||||
| * @return 清洁物品集合 | |||||
| */ | |||||
| public List<AppCleanItems> getAppCleanItemsList(); | |||||
| } | |||||
| @ -0,0 +1,68 @@ | |||||
| package com.ruoyi.model.mapper; | |||||
| import java.util.List; | |||||
| import com.ruoyi.model.domain.AppCleanRequest; | |||||
| /** | |||||
| * 清洁要求Mapper接口 | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-10 | |||||
| */ | |||||
| public interface AppCleanRequestMapper | |||||
| { | |||||
| /** | |||||
| * 查询清洁要求 | |||||
| * | |||||
| * @param cleanRequestId 清洁要求主键 | |||||
| * @return 清洁要求 | |||||
| */ | |||||
| public AppCleanRequest selectAppCleanRequestByCleanRequestId(Long cleanRequestId); | |||||
| /** | |||||
| * 查询清洁要求列表 | |||||
| * | |||||
| * @param appCleanRequest 清洁要求 | |||||
| * @return 清洁要求集合 | |||||
| */ | |||||
| public List<AppCleanRequest> selectAppCleanRequestList(AppCleanRequest appCleanRequest); | |||||
| /** | |||||
| * 新增清洁要求 | |||||
| * | |||||
| * @param appCleanRequest 清洁要求 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int insertAppCleanRequest(AppCleanRequest appCleanRequest); | |||||
| /** | |||||
| * 修改清洁要求 | |||||
| * | |||||
| * @param appCleanRequest 清洁要求 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int updateAppCleanRequest(AppCleanRequest appCleanRequest); | |||||
| /** | |||||
| * 删除清洁要求 | |||||
| * | |||||
| * @param cleanRequestId 清洁要求主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppCleanRequestByCleanRequestId(Long cleanRequestId); | |||||
| /** | |||||
| * 批量删除清洁要求 | |||||
| * | |||||
| * @param cleanRequestIds 需要删除的数据主键集合 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppCleanRequestByCleanRequestIds(Long[] cleanRequestIds); | |||||
| /** | |||||
| * 查询清洁要求列表 | |||||
| * | |||||
| * @return 清洁要求集合 | |||||
| */ | |||||
| public List<AppCleanRequest> getAppCleanRequestList(); | |||||
| } | |||||
| @ -0,0 +1,68 @@ | |||||
| package com.ruoyi.model.service; | |||||
| import java.util.List; | |||||
| import com.ruoyi.model.domain.AppCleanItems; | |||||
| /** | |||||
| * 清洁物品Service接口 | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-10 | |||||
| */ | |||||
| public interface IAppCleanItemsService | |||||
| { | |||||
| /** | |||||
| * 查询清洁物品 | |||||
| * | |||||
| * @param cleanItemsId 清洁物品主键 | |||||
| * @return 清洁物品 | |||||
| */ | |||||
| public AppCleanItems selectAppCleanItemsByCleanItemsId(Long cleanItemsId); | |||||
| /** | |||||
| * 查询清洁物品列表 | |||||
| * | |||||
| * @param appCleanItems 清洁物品 | |||||
| * @return 清洁物品集合 | |||||
| */ | |||||
| public List<AppCleanItems> selectAppCleanItemsList(AppCleanItems appCleanItems); | |||||
| /** | |||||
| * 新增清洁物品 | |||||
| * | |||||
| * @param appCleanItems 清洁物品 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int insertAppCleanItems(AppCleanItems appCleanItems); | |||||
| /** | |||||
| * 修改清洁物品 | |||||
| * | |||||
| * @param appCleanItems 清洁物品 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int updateAppCleanItems(AppCleanItems appCleanItems); | |||||
| /** | |||||
| * 批量删除清洁物品 | |||||
| * | |||||
| * @param cleanItemsIds 需要删除的清洁物品主键集合 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppCleanItemsByCleanItemsIds(Long[] cleanItemsIds); | |||||
| /** | |||||
| * 删除清洁物品信息 | |||||
| * | |||||
| * @param cleanItemsId 清洁物品主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppCleanItemsByCleanItemsId(Long cleanItemsId); | |||||
| /** | |||||
| * 查询清洁物品列表 | |||||
| * | |||||
| * @return 清洁物品集合 | |||||
| */ | |||||
| public List<AppCleanItems> getAppCleanItemsList(); | |||||
| } | |||||
| @ -0,0 +1,68 @@ | |||||
| package com.ruoyi.model.service; | |||||
| import java.util.List; | |||||
| import com.ruoyi.model.domain.AppCleanRequest; | |||||
| /** | |||||
| * 清洁要求Service接口 | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-10 | |||||
| */ | |||||
| public interface IAppCleanRequestService | |||||
| { | |||||
| /** | |||||
| * 查询清洁要求 | |||||
| * | |||||
| * @param cleanRequestId 清洁要求主键 | |||||
| * @return 清洁要求 | |||||
| */ | |||||
| public AppCleanRequest selectAppCleanRequestByCleanRequestId(Long cleanRequestId); | |||||
| /** | |||||
| * 查询清洁要求列表 | |||||
| * | |||||
| * @param appCleanRequest 清洁要求 | |||||
| * @return 清洁要求集合 | |||||
| */ | |||||
| public List<AppCleanRequest> selectAppCleanRequestList(AppCleanRequest appCleanRequest); | |||||
| /** | |||||
| * 新增清洁要求 | |||||
| * | |||||
| * @param appCleanRequest 清洁要求 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int insertAppCleanRequest(AppCleanRequest appCleanRequest); | |||||
| /** | |||||
| * 修改清洁要求 | |||||
| * | |||||
| * @param appCleanRequest 清洁要求 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int updateAppCleanRequest(AppCleanRequest appCleanRequest); | |||||
| /** | |||||
| * 批量删除清洁要求 | |||||
| * | |||||
| * @param cleanRequestIds 需要删除的清洁要求主键集合 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppCleanRequestByCleanRequestIds(Long[] cleanRequestIds); | |||||
| /** | |||||
| * 删除清洁要求信息 | |||||
| * | |||||
| * @param cleanRequestId 清洁要求主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppCleanRequestByCleanRequestId(Long cleanRequestId); | |||||
| /** | |||||
| * 查询清洁要求列表 | |||||
| * | |||||
| * @return 清洁要求集合 | |||||
| */ | |||||
| public List<AppCleanRequest> getAppCleanRequestList(); | |||||
| } | |||||
| @ -0,0 +1,106 @@ | |||||
| package com.ruoyi.model.service.impl; | |||||
| import java.util.List; | |||||
| import com.ruoyi.common.utils.DateUtils; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| import com.ruoyi.model.mapper.AppCleanItemsMapper; | |||||
| import com.ruoyi.model.domain.AppCleanItems; | |||||
| import com.ruoyi.model.service.IAppCleanItemsService; | |||||
| /** | |||||
| * 清洁物品Service业务层处理 | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-10 | |||||
| */ | |||||
| @Service | |||||
| public class AppCleanItemsServiceImpl implements IAppCleanItemsService | |||||
| { | |||||
| @Autowired | |||||
| private AppCleanItemsMapper appCleanItemsMapper; | |||||
| /** | |||||
| * 查询清洁物品 | |||||
| * | |||||
| * @param cleanItemsId 清洁物品主键 | |||||
| * @return 清洁物品 | |||||
| */ | |||||
| @Override | |||||
| public AppCleanItems selectAppCleanItemsByCleanItemsId(Long cleanItemsId) | |||||
| { | |||||
| return appCleanItemsMapper.selectAppCleanItemsByCleanItemsId(cleanItemsId); | |||||
| } | |||||
| /** | |||||
| * 查询清洁物品列表 | |||||
| * | |||||
| * @param appCleanItems 清洁物品 | |||||
| * @return 清洁物品 | |||||
| */ | |||||
| @Override | |||||
| public List<AppCleanItems> selectAppCleanItemsList(AppCleanItems appCleanItems) | |||||
| { | |||||
| return appCleanItemsMapper.selectAppCleanItemsList(appCleanItems); | |||||
| } | |||||
| /** | |||||
| * 新增清洁物品 | |||||
| * | |||||
| * @param appCleanItems 清洁物品 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int insertAppCleanItems(AppCleanItems appCleanItems) | |||||
| { | |||||
| appCleanItems.setCreateTime(DateUtils.getNowDate()); | |||||
| return appCleanItemsMapper.insertAppCleanItems(appCleanItems); | |||||
| } | |||||
| /** | |||||
| * 修改清洁物品 | |||||
| * | |||||
| * @param appCleanItems 清洁物品 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int updateAppCleanItems(AppCleanItems appCleanItems) | |||||
| { | |||||
| appCleanItems.setUpdateTime(DateUtils.getNowDate()); | |||||
| return appCleanItemsMapper.updateAppCleanItems(appCleanItems); | |||||
| } | |||||
| /** | |||||
| * 批量删除清洁物品 | |||||
| * | |||||
| * @param cleanItemsIds 需要删除的清洁物品主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int deleteAppCleanItemsByCleanItemsIds(Long[] cleanItemsIds) | |||||
| { | |||||
| return appCleanItemsMapper.deleteAppCleanItemsByCleanItemsIds(cleanItemsIds); | |||||
| } | |||||
| /** | |||||
| * 删除清洁物品信息 | |||||
| * | |||||
| * @param cleanItemsId 清洁物品主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int deleteAppCleanItemsByCleanItemsId(Long cleanItemsId) | |||||
| { | |||||
| return appCleanItemsMapper.deleteAppCleanItemsByCleanItemsId(cleanItemsId); | |||||
| } | |||||
| /** | |||||
| * 查询清洁物品列表 | |||||
| * | |||||
| * @return 清洁物品集合 | |||||
| */ | |||||
| @Override | |||||
| public List<AppCleanItems> getAppCleanItemsList(){ | |||||
| return appCleanItemsMapper.getAppCleanItemsList(); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,103 @@ | |||||
| package com.ruoyi.model.service.impl; | |||||
| import java.util.List; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| import com.ruoyi.model.mapper.AppCleanRequestMapper; | |||||
| import com.ruoyi.model.domain.AppCleanRequest; | |||||
| import com.ruoyi.model.service.IAppCleanRequestService; | |||||
| /** | |||||
| * 清洁要求Service业务层处理 | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-10 | |||||
| */ | |||||
| @Service | |||||
| public class AppCleanRequestServiceImpl implements IAppCleanRequestService | |||||
| { | |||||
| @Autowired | |||||
| private AppCleanRequestMapper appCleanRequestMapper; | |||||
| /** | |||||
| * 查询清洁要求 | |||||
| * | |||||
| * @param cleanRequestId 清洁要求主键 | |||||
| * @return 清洁要求 | |||||
| */ | |||||
| @Override | |||||
| public AppCleanRequest selectAppCleanRequestByCleanRequestId(Long cleanRequestId) | |||||
| { | |||||
| return appCleanRequestMapper.selectAppCleanRequestByCleanRequestId(cleanRequestId); | |||||
| } | |||||
| /** | |||||
| * 查询清洁要求列表 | |||||
| * | |||||
| * @param appCleanRequest 清洁要求 | |||||
| * @return 清洁要求 | |||||
| */ | |||||
| @Override | |||||
| public List<AppCleanRequest> selectAppCleanRequestList(AppCleanRequest appCleanRequest) | |||||
| { | |||||
| return appCleanRequestMapper.selectAppCleanRequestList(appCleanRequest); | |||||
| } | |||||
| /** | |||||
| * 新增清洁要求 | |||||
| * | |||||
| * @param appCleanRequest 清洁要求 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int insertAppCleanRequest(AppCleanRequest appCleanRequest) | |||||
| { | |||||
| return appCleanRequestMapper.insertAppCleanRequest(appCleanRequest); | |||||
| } | |||||
| /** | |||||
| * 修改清洁要求 | |||||
| * | |||||
| * @param appCleanRequest 清洁要求 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int updateAppCleanRequest(AppCleanRequest appCleanRequest) | |||||
| { | |||||
| return appCleanRequestMapper.updateAppCleanRequest(appCleanRequest); | |||||
| } | |||||
| /** | |||||
| * 批量删除清洁要求 | |||||
| * | |||||
| * @param cleanRequestIds 需要删除的清洁要求主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int deleteAppCleanRequestByCleanRequestIds(Long[] cleanRequestIds) | |||||
| { | |||||
| return appCleanRequestMapper.deleteAppCleanRequestByCleanRequestIds(cleanRequestIds); | |||||
| } | |||||
| /** | |||||
| * 删除清洁要求信息 | |||||
| * | |||||
| * @param cleanRequestId 清洁要求主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int deleteAppCleanRequestByCleanRequestId(Long cleanRequestId) | |||||
| { | |||||
| return appCleanRequestMapper.deleteAppCleanRequestByCleanRequestId(cleanRequestId); | |||||
| } | |||||
| /** | |||||
| * 查询清洁要求列表 | |||||
| * | |||||
| * @return 清洁要求集合 | |||||
| */ | |||||
| @Override | |||||
| public List<AppCleanRequest> getAppCleanRequestList(){ | |||||
| return appCleanRequestMapper.getAppCleanRequestList(); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,81 @@ | |||||
| <?xml version="1.0" encoding="UTF-8" ?> | |||||
| <!DOCTYPE mapper | |||||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
| <mapper namespace="com.ruoyi.model.mapper.AppCleanItemsMapper"> | |||||
| <resultMap type="AppCleanItems" id="AppCleanItemsResult"> | |||||
| <result property="cleanItemsId" column="clean_items_id" /> | |||||
| <result property="cleanItemsName" column="clean_items_name" /> | |||||
| <result property="createBy" column="create_by" /> | |||||
| <result property="createTime" column="create_time" /> | |||||
| <result property="updateBy" column="update_by" /> | |||||
| <result property="updateTime" column="update_time" /> | |||||
| <result property="delFlag" column="del_flag" /> | |||||
| </resultMap> | |||||
| <sql id="selectAppCleanItemsVo"> | |||||
| select clean_items_id, clean_items_name, create_by, create_time, update_by, update_time, del_flag from app_clean_items | |||||
| </sql> | |||||
| <select id="selectAppCleanItemsList" parameterType="AppCleanItems" resultMap="AppCleanItemsResult"> | |||||
| <include refid="selectAppCleanItemsVo"/> | |||||
| <where> | |||||
| <if test="cleanItemsName != null "> and clean_items_name like concat('%', #{cleanItemsName}, '%')</if> | |||||
| </where> | |||||
| </select> | |||||
| <select id="selectAppCleanItemsByCleanItemsId" parameterType="Long" resultMap="AppCleanItemsResult"> | |||||
| <include refid="selectAppCleanItemsVo"/> | |||||
| where clean_items_id = #{cleanItemsId} | |||||
| </select> | |||||
| <select id="getAppCleanItemsList" resultType="com.ruoyi.model.domain.AppCleanItems"> | |||||
| <include refid="selectAppCleanItemsVo"/> | |||||
| </select> | |||||
| <insert id="insertAppCleanItems" parameterType="AppCleanItems"> | |||||
| insert into app_clean_items | |||||
| <trim prefix="(" suffix=")" suffixOverrides=","> | |||||
| <if test="cleanItemsId != null">clean_items_id,</if> | |||||
| <if test="cleanItemsName != null">clean_items_name,</if> | |||||
| <if test="createBy != null">create_by,</if> | |||||
| <if test="createTime != null">create_time,</if> | |||||
| <if test="updateBy != null">update_by,</if> | |||||
| <if test="updateTime != null">update_time,</if> | |||||
| <if test="delFlag != null">del_flag,</if> | |||||
| </trim> | |||||
| <trim prefix="values (" suffix=")" suffixOverrides=","> | |||||
| <if test="cleanItemsId != null">#{cleanItemsId},</if> | |||||
| <if test="cleanItemsName != null">#{cleanItemsName},</if> | |||||
| <if test="createBy != null">#{createBy},</if> | |||||
| <if test="createTime != null">#{createTime},</if> | |||||
| <if test="updateBy != null">#{updateBy},</if> | |||||
| <if test="updateTime != null">#{updateTime},</if> | |||||
| <if test="delFlag != null">#{delFlag},</if> | |||||
| </trim> | |||||
| </insert> | |||||
| <update id="updateAppCleanItems" parameterType="AppCleanItems"> | |||||
| update app_clean_items | |||||
| <trim prefix="SET" suffixOverrides=","> | |||||
| <if test="cleanItemsName != null">clean_items_name = #{cleanItemsName},</if> | |||||
| <if test="createBy != null">create_by = #{createBy},</if> | |||||
| <if test="createTime != null">create_time = #{createTime},</if> | |||||
| <if test="updateBy != null">update_by = #{updateBy},</if> | |||||
| <if test="updateTime != null">update_time = #{updateTime},</if> | |||||
| <if test="delFlag != null">del_flag = #{delFlag},</if> | |||||
| </trim> | |||||
| where clean_items_id = #{cleanItemsId} | |||||
| </update> | |||||
| <delete id="deleteAppCleanItemsByCleanItemsId" parameterType="Long"> | |||||
| delete from app_clean_items where clean_items_id = #{cleanItemsId} | |||||
| </delete> | |||||
| <delete id="deleteAppCleanItemsByCleanItemsIds" parameterType="String"> | |||||
| delete from app_clean_items where clean_items_id in | |||||
| <foreach item="cleanItemsId" collection="array" open="(" separator="," close=")"> | |||||
| #{cleanItemsId} | |||||
| </foreach> | |||||
| </delete> | |||||
| </mapper> | |||||
| @ -0,0 +1,85 @@ | |||||
| <?xml version="1.0" encoding="UTF-8" ?> | |||||
| <!DOCTYPE mapper | |||||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
| <mapper namespace="com.ruoyi.model.mapper.AppCleanRequestMapper"> | |||||
| <resultMap type="AppCleanRequest" id="AppCleanRequestResult"> | |||||
| <result property="cleanRequestId" column="clean_request_id" /> | |||||
| <result property="cleanItemsId" column="clean_items_id" /> | |||||
| <result property="serviceFileId" column="service_file_id" /> | |||||
| <result property="cleanRequestImage" column="clean_request_image" /> | |||||
| <result property="cleanRequestFrequencyDay" column="clean_request_frequency_day" /> | |||||
| <result property="cleanRequestFrequencyTimes" column="clean_request_frequency_times" /> | |||||
| <result property="remark" column="remark" /> | |||||
| </resultMap> | |||||
| <sql id="selectAppCleanRequestVo"> | |||||
| select clean_request_id, clean_items_id, service_file_id, clean_request_image, clean_request_frequency_day, clean_request_frequency_times, remark from app_clean_request | |||||
| </sql> | |||||
| <select id="selectAppCleanRequestList" parameterType="AppCleanRequest" resultMap="AppCleanRequestResult"> | |||||
| <include refid="selectAppCleanRequestVo"/> | |||||
| <where> | |||||
| <if test="cleanItemsId != null "> and clean_items_id = #{cleanItemsId}</if> | |||||
| <if test="serviceFileId != null "> and service_file_id = #{serviceFileId}</if> | |||||
| <if test="cleanRequestImage != null and cleanRequestImage != ''"> and clean_request_image = #{cleanRequestImage}</if> | |||||
| <if test="cleanRequestFrequencyDay != null "> and clean_request_frequency_day = #{cleanRequestFrequencyDay}</if> | |||||
| <if test="cleanRequestFrequencyTimes != null "> and clean_request_frequency_times = #{cleanRequestFrequencyTimes}</if> | |||||
| </where> | |||||
| </select> | |||||
| <select id="selectAppCleanRequestByCleanRequestId" parameterType="Long" resultMap="AppCleanRequestResult"> | |||||
| <include refid="selectAppCleanRequestVo"/> | |||||
| where clean_request_id = #{cleanRequestId} | |||||
| </select> | |||||
| <select id="getAppCleanRequestList" resultType="com.ruoyi.model.domain.AppCleanRequest"> | |||||
| <include refid="selectAppCleanRequestVo"/> | |||||
| </select> | |||||
| <insert id="insertAppCleanRequest" parameterType="AppCleanRequest"> | |||||
| insert into app_clean_request | |||||
| <trim prefix="(" suffix=")" suffixOverrides=","> | |||||
| <if test="cleanRequestId != null">clean_request_id,</if> | |||||
| <if test="cleanItemsId != null">clean_items_id,</if> | |||||
| <if test="serviceFileId != null">service_file_id,</if> | |||||
| <if test="cleanRequestImage != null">clean_request_image,</if> | |||||
| <if test="cleanRequestFrequencyDay != null">clean_request_frequency_day,</if> | |||||
| <if test="cleanRequestFrequencyTimes != null">clean_request_frequency_times,</if> | |||||
| <if test="remark != null">remark,</if> | |||||
| </trim> | |||||
| <trim prefix="values (" suffix=")" suffixOverrides=","> | |||||
| <if test="cleanRequestId != null">#{cleanRequestId},</if> | |||||
| <if test="cleanItemsId != null">#{cleanItemsId},</if> | |||||
| <if test="serviceFileId != null">#{serviceFileId},</if> | |||||
| <if test="cleanRequestImage != null">#{cleanRequestImage},</if> | |||||
| <if test="cleanRequestFrequencyDay != null">#{cleanRequestFrequencyDay},</if> | |||||
| <if test="cleanRequestFrequencyTimes != null">#{cleanRequestFrequencyTimes},</if> | |||||
| <if test="remark != null">#{remark},</if> | |||||
| </trim> | |||||
| </insert> | |||||
| <update id="updateAppCleanRequest" parameterType="AppCleanRequest"> | |||||
| update app_clean_request | |||||
| <trim prefix="SET" suffixOverrides=","> | |||||
| <if test="cleanItemsId != null">clean_items_id = #{cleanItemsId},</if> | |||||
| <if test="serviceFileId != null">service_file_id = #{serviceFileId},</if> | |||||
| <if test="cleanRequestImage != null">clean_request_image = #{cleanRequestImage},</if> | |||||
| <if test="cleanRequestFrequencyDay != null">clean_request_frequency_day = #{cleanRequestFrequencyDay},</if> | |||||
| <if test="cleanRequestFrequencyTimes != null">clean_request_frequency_times = #{cleanRequestFrequencyTimes},</if> | |||||
| <if test="remark != null">remark = #{remark},</if> | |||||
| </trim> | |||||
| where clean_request_id = #{cleanRequestId} | |||||
| </update> | |||||
| <delete id="deleteAppCleanRequestByCleanRequestId" parameterType="Long"> | |||||
| delete from app_clean_request where clean_request_id = #{cleanRequestId} | |||||
| </delete> | |||||
| <delete id="deleteAppCleanRequestByCleanRequestIds" parameterType="String"> | |||||
| delete from app_clean_request where clean_request_id in | |||||
| <foreach item="cleanRequestId" collection="array" open="(" separator="," close=")"> | |||||
| #{cleanRequestId} | |||||
| </foreach> | |||||
| </delete> | |||||
| </mapper> | |||||