update code

dev_xds
haha 2024-04-08 23:34:32 +08:00
parent 963d86f209
commit 527aa28a0b
44 changed files with 4022 additions and 12 deletions

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询工委会列表列表
export function listCommittee(query) {
return request({
url: '/base/committee/list',
method: 'get',
params: query
})
}
// 查询工委会列表详细
export function getCommittee(id) {
return request({
url: '/base/committee/' + id,
method: 'get'
})
}
// 新增工委会列表
export function addCommittee(data) {
return request({
url: '/base/committee',
method: 'post',
data: data
})
}
// 修改工委会列表
export function updateCommittee(data) {
return request({
url: '/base/committee',
method: 'put',
data: data
})
}
// 删除工委会列表
export function delCommittee(id) {
return request({
url: '/base/committee/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询期刊列表列表
export function listMag(query) {
return request({
url: '/base/mag/list',
method: 'get',
params: query
})
}
// 查询期刊列表详细
export function getMag(id) {
return request({
url: '/base/mag/' + id,
method: 'get'
})
}
// 新增期刊列表
export function addMag(data) {
return request({
url: '/base/mag',
method: 'post',
data: data
})
}
// 修改期刊列表
export function updateMag(data) {
return request({
url: '/base/mag',
method: 'put',
data: data
})
}
// 删除期刊列表
export function delMag(id) {
return request({
url: '/base/mag/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询期刊详情列表
export function listMagDetail(query) {
return request({
url: '/base/magDetail/list',
method: 'get',
params: query
})
}
// 查询期刊详情详细
export function getMagDetail(id) {
return request({
url: '/base/magDetail/' + id,
method: 'get'
})
}
// 新增期刊详情
export function addMagDetail(data) {
return request({
url: '/base/magDetail',
method: 'post',
data: data
})
}
// 修改期刊详情
export function updateMagDetail(data) {
return request({
url: '/base/magDetail',
method: 'put',
data: data
})
}
// 删除期刊详情
export function delMagDetail(id) {
return request({
url: '/base/magDetail/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询工委会管理列表
export function listProjectCommittee(query) {
return request({
url: '/project/projectCommittee/list',
method: 'get',
params: query
})
}
// 查询工委会管理详细
export function getProjectCommittee(id) {
return request({
url: '/project/projectCommittee/' + id,
method: 'get'
})
}
// 新增工委会管理
export function addProjectCommittee(data) {
return request({
url: '/project/projectCommittee',
method: 'post',
data: data
})
}
// 修改工委会管理
export function updateProjectCommittee(data) {
return request({
url: '/project/projectCommittee',
method: 'put',
data: data
})
}
// 删除工委会管理
export function delProjectCommittee(id) {
return request({
url: '/project/projectCommittee/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,134 @@
<template>
<div class="committee_drawer">
<el-drawer v-if="isOpen" :visible.sync="isOpen" direction="rtl" size="40%" style="padding-left: 20px">
<template slot="title">
<div>工委会管理</div>
</template>
<div>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输名称" maxlength="500"/>
</el-form-item>
<el-form-item label="附件" prop="name">
<file-upload v-model="form.fileList" :limit="9" @input="fileInput" />
</el-form-item>
<el-form-item label="序号" prop="ord">
<el-input-number v-model="form.ord" controls-position="right" :min="0" />
</el-form-item>
</el-form>
<div class="dialog-footer" style="text-align: center;">
<el-button type="primary" @click="submitForm"></el-button>
<el-button @click="doCancel"> </el-button>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
import { listCommittee, getCommittee, delCommittee, addCommittee, updateCommittee } from "@/api/base/committee";
export default {
data() {
return {
dataList: [],
isOpen: false,
oldData: null,
form: {
name: "",
ord: 0,
fileList:[],
files:"",
},
rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
files: [{ required: true, message: "请上传附件", trigger: "blur" }],
}
};
},
mounted() {
},
methods: {
fileInput(files) {
this.form.files=this.form.fileList.length>0?JSON.stringify(this.form.fileList.map(f=>{
if(f.fileInfo){
return {
name:f.original,
url:f.url,
ext:f.fileInfo.ext
}
}else{
if(this.oldData && this.oldData.files){
let tmps=this.$tryToJson(this.oldData.files,[]).filter(it=>it.url==f.url);
return tmps.length>0?tmps[0]:null;
}
return null;
}
}).filter(f=>f)):"";
},
show(it, nextId) {
this.form.ord = nextId;
this.oldData = it;
this.isOpen = true;
if (it) {
this.form.name = it.name;
this.form.ord = it.ord;
this.form.files=it.files;
let tmps=it.files;
if(tmps && tmps.length>0){
tmps=this.$tryToJson(tmps,[]);
this.form.fileList=tmps.map(f=>{
return {
name:f.url,
url:f.url,
}
});
}
} else {
this.form.name = "";
}
},
doCancel() {
this.isOpen = false;
},
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.oldData != null && this.oldData.id) {
this.oldData.name = this.form.name;
this.oldData.ord=this.form.ord;
this.oldData.files=this.form.files;
updateCommittee(this.oldData).then(d=>{
this.$modal.msgSuccess("修改成功");
this.isOpen = false;
this.$emit("success");
});
} else {
addCommittee(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.isOpen = false;
this.$emit("success");
});
}
}
});
}
},
};
</script>
<style lang="scss" scoped>
.committee_drawer {
::v-deep .el-drawer__header {
margin-bottom: 0px;
}
::v-deep .el-drawer__body {
padding: 12px 24px;
}
::v-deep .el-drawer {
min-width: 800px;
}
}
</style>

View File

@ -0,0 +1,219 @@
<template>
<div class="app-container committee-index">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="顺序" prop="ord">
<el-input v-model="queryParams.ord" placeholder="请输入顺序" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<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="['base:committee: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="['base:committee: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="['base:committee:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['base:committee:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="committeeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="添加日期" align="center" prop="createTime" width="160"/>
<el-table-column label="文件" align="center" prop="files">
<template slot-scope="{row}">
<div v-for="it in row.fileList" :key="it.url" class="file-list">
<span>{{ it.name }} </span>
<i class="el-icon-download command blue" @click="doDownload(it)"></i>
</div>
</template>
</el-table-column>
<el-table-column label="顺序" align="center" prop="ord" width="100"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:committee:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:committee: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" />
<committeeDrawer ref="drawer" @success="getList"></committeeDrawer>
</div>
</template>
<script>
import { listCommittee, getCommittee, delCommittee, addCommittee, updateCommittee } from "@/api/base/committee";
import committeeDrawer from './committeeDrawer.vue'
export default {
name: "Committee",
components:{
committeeDrawer
},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
committeeList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
files: null,
ord: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询工委会列表列表 */
getList() {
this.loading = true;
listCommittee(this.queryParams).then(response => {
this.committeeList = (response.rows||[]).map(d=>{
let tmps=d.files;
d.fileList=this.$tryToJson(d.files,[]);
return d;
});
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
name: null,
files: null,
ord: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
doDownload(it){
this.$download.resource(it.url);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.$refs.drawer.show(null,this.total+1);
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$refs.drawer.show(row,this.total+1);
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateCommittee(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addCommittee(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除工委会列表编号为"' + ids + '"的数据项?').then(function () {
return delCommittee(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('base/committee/export', {
...this.queryParams
}, `committee_${new Date().getTime()}.xlsx`)
}
}
};
</script>
<style lang="scss">
.committee-index{
.file-list{
text-align: left;
display: block;
}
}
</style>

View File

@ -0,0 +1,98 @@
<template>
<div class="base_mag_drawer">
<el-drawer v-if="isOpen" :visible.sync="isOpen" direction="rtl" size="20%" style="padding-left: 20px">
<template slot="title">
<div>期刊管理</div>
</template>
<div>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="期刊名称" prop="name">
<el-input v-model="form.name" placeholder="请输入期刊名称" maxlength="500"/>
</el-form-item>
<el-form-item label="序号" prop="ord">
<el-input-number v-model="form.ord" controls-position="right" :min="0" />
</el-form-item>
</el-form>
<div class="dialog-footer" style="text-align: center;">
<el-button type="primary" @click="submitForm"></el-button>
<el-button @click="doCancel"> </el-button>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
import { listMag, getMag, delMag, addMag, updateMag } from "@/api/base/mag";
export default {
data() {
return {
dataList: [],
isOpen: false,
oldData: null,
form: {
name: "",
ord: 0,
},
rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
}
};
},
mounted() {
},
methods: {
show(it, nextId) {
this.form.ord = nextId;
this.oldData = it;
this.isOpen = true;
if (it) {
this.form.name = it.name;
this.form.ord = it.ord;
} else {
this.form.name = "";
}
},
doCancel() {
this.isOpen = false;
},
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.oldData != null && this.oldData.id) {
this.oldData.name = this.form.name;
this.oldData.ord = this.form.ord;
updateMag(this.oldData).then(response => {
this.$modal.msgSuccess("修改成功");
this.isOpen = false;
this.$emit("success");
});
} else {
addMag(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.isOpen = false;
this.$emit("success");
});
}
}
});
}
},
};
</script>
<style lang="scss" scoped>
.base_mag_drawer {
::v-deep .el-drawer__header {
margin-bottom: 0px;
}
::v-deep .el-drawer__body {
padding: 12px 24px;
}
::v-deep .el-drawer {
min-width: 400px;
}
}
</style>

View File

@ -0,0 +1,187 @@
<template>
<div class="app-container">
<el-row>
<el-col :span="20">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="期刊名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入期刊名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<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-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:mag:add']">新增</el-button>
</el-form-item>
</el-form>
</el-col>
<el-col :span="4">
<right-toolbar :search="false" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-col>
</el-row>
<el-table v-loading="loading" :data="magList" @selection-change="handleSelectionChange">
<el-table-column label="期刊名称" align="center" prop="name" />
<el-table-column label="排序" align="center" prop="ord" />
<el-table-column label="添加日期" align="center" prop="createTime" />
<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="['base:mag:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:mag: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" />
<baseMagDrawer ref="drawer" @success="getList"></baseMagDrawer>
</div>
</template>
<script>
import baseMagDrawer from './baseMagDrawer.vue'
import { listMag, getMag, delMag, addMag, updateMag } from "@/api/base/mag";
export default {
name: "Mag",
components: {
baseMagDrawer
},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
magList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
imgs: null,
ord: null,
isDel: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询期刊列表列表 */
getList() {
this.loading = true;
listMag(this.queryParams).then(response => {
this.magList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
name: null,
imgs: null,
ord: null,
remark: null,
isDel: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: 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.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
//this.reset();
//this.open = true;
//this.title = "";
this.$refs.drawer.show(null,this.total+1);
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$refs.drawer.show(row);
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateMag(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addMag(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除期刊列表编号为"' + ids + '"的数据项?').then(function () {
return delMag(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('base/mag/export', {
...this.queryParams
}, `mag_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,285 @@
<template>
<div class="app-container mag-detail-index">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="期刊" prop="magid">
<el-button type="text">管理</el-button>
</el-form-item>
<el-form-item label="栏目" prop="topic">
<el-select v-model="queryParams.type" placeholder="请选择栏目" clearable>
<el-option v-for="dict in dict.type.base_mag_topic" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
<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="['base:magDetail: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="['base:magDetail: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="['base:magDetail:remove']">删除</el-button>
</el-col>
<el-col :span="1.5" v-if="1==2">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['base:magDetail:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="magDetailList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="期刊" align="center" prop="name" />
<el-table-column label="栏目" align="center" prop="topicName" />
<el-table-column label="单位" align="center" prop="deptName" />
<el-table-column label="作者" align="center" prop="authorName" />
<el-table-column label="期刊主图" align="center" prop="imageUrl">
<template slot-scope="{row}">
<el-image v-if="row.imageUrl" class="row-image" :src="$basepath + row.imageUrl + '.min.jpg'" :preview-src-list="[$basepath + row.imageUrl]"></el-image>
</template>
</el-table-column>
<el-table-column label="标题" align="center" prop="title">
<template slot-scope="{row}">
<div class="div-txt-3">{{ row.title}}</div>
</template>
</el-table-column>
<el-table-column label="排序号" align="center" prop="ord" />
<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="['base:magDetail:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:magDetail: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="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="期刊id" prop="magid">
<el-input v-model="form.magid" placeholder="请输入期刊id" />
</el-form-item>
<el-form-item label="栏目字典mag_topic" prop="topic">
<el-input v-model="form.topic" placeholder="请输入栏目字典mag_topic" />
</el-form-item>
<el-form-item label="标题" prop="title">
<el-input v-model="form.title" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="总包编号" prop="deptid">
<el-input v-model="form.deptid" placeholder="请输入总包编号" />
</el-form-item>
<el-form-item label="作者" prop="authorName">
<el-input v-model="form.authorName" placeholder="请输入作者" />
</el-form-item>
<el-form-item label="作者电话" prop="authorPhone">
<el-input v-model="form.authorPhone" placeholder="请输入作者电话" />
</el-form-item>
<el-form-item label="排序号" prop="ord">
<el-input v-model="form.ord" placeholder="请输入排序号" />
</el-form-item>
<el-form-item label="图片" prop="images">
<el-input v-model="form.images" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="正文">
<editor v-model="form.content" :min-height="192" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="${comment}" prop="isDel">
<el-input v-model="form.isDel" placeholder="请输入${comment}" />
</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>
<magDetailDrawer ref="drawer" @success="getList"></magDetailDrawer>
</div>
</template>
<script>
import { listMagDetail, getMagDetail, delMagDetail, addMagDetail, updateMagDetail } from "@/api/base/magDetail";
import magDetailDrawer from './magDetailDrawer.vue'
export default {
dicts: ['base_mag_topic'],
name: "MagDetail",
components:{
magDetailDrawer,
},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
magDetailList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
magid: null,
topic: null,
title: null,
deptid: null,
authorName: null,
authorPhone: null,
ord: null,
images: null,
content: null,
isDel: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询期刊详情列表 */
getList() {
this.loading = true;
listMagDetail(this.queryParams).then(response => {
this.magDetailList = (response.rows||[]).map(it=>{
let tmps=it.images;
if(tmps && tmps.length>0){
tmps=this.$tryToJson(tmps,[]);
if(tmps.length>0){
it.imageUrl=tmps[0];
}
}
return it;
});
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
magid: null,
topic: null,
title: null,
deptid: null,
authorName: null,
authorPhone: null,
ord: null,
images: null,
content: null,
remark: null,
isDel: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: 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.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.$refs.drawer.show(null,this.total+1);
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$refs.drawer.show(row,this.total+1);
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateMagDetail(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addMagDetail(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除期刊详情编号为"' + ids + '"的数据项?').then(function () {
return delMagDetail(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('base/magDetail/export', {
...this.queryParams
}, `magDetail_${new Date().getTime()}.xlsx`)
}
}
};
</script>
<style lang="scss">
.mag-detail-index{
.row-image{
height:100px;
}
}
</style>

View File

@ -0,0 +1,265 @@
<template>
<div class="mag_detail_drawer">
<el-drawer v-if="isOpen" :visible.sync="isOpen" direction="rtl" size="60%" style="padding-left: 20px">
<template slot="title">
<div>期刊内容管理</div>
</template>
<div>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="8">
<el-form-item label="期刊名称" prop="magid">
<el-select v-model="form.magid" filterable placeholder="请选择期刊">
<el-option v-for="it in magList" :key="it.id" :label="it.name" :value="it.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="栏目" prop="topic">
<el-select v-model="form.topic" filterable placeholder="请选择栏目" clearable>
<el-option v-for="dict in dict.type.base_mag_topic" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="单位" prop="deptid">
<el-select v-model="form.deptid" filterable placeholder="请选择单位" style="width: 100%;"
@change="doDeptChange()">
<el-option v-for="it in deptList" :key="it.deptId" :label="it.deptName"
:value="it.deptId" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="作者" prop="authorPhone">
<el-select v-model="form.authorPhone" filterable placeholder="请选择作者">
<el-option v-for="it in userList" :key="it.phonenumber" :label="it.nickName"
:value="it.phonenumber" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="序号" prop="ord">
<el-input-number v-model="form.ord" controls-position="right" :min="0" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="标题" prop="title">
<el-input v-model="form.title" maxlength="500"/>
</el-form-item>
<el-form-item label="期刊主图" ref="fiImage" prop="imageUrl" class="fi-imgs"
:class="'form-img-' + (form.imageUrl ? form.imageUrl.length : 0)">
<el-image :src="$basepath + form.imageUrl[0].url"
:preview-src-list="[$basepath + form.imageUrl[0].url]"
v-if="form.imageUrl && form.imageUrl.length > 0"></el-image>
<FileUpload @input="doImageInput" v-model="form.imageUrl" :fileSize="5" :limit="1"
:fileType="['png', 'jpg', 'jpeg']" />
</el-form-item>
<el-form-item label="" prop="content">
<editor v-model="form.content" :min-height="192" />
</el-form-item>
</el-form>
<div class="dialog-footer" style="text-align: center;">
<el-button type="primary" @click="submitForm"></el-button>
<el-button @click="doCancel"> </el-button>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
import { listMagDetail, getMagDetail, delMagDetail, addMagDetail, updateMagDetail } from "@/api/base/magDetail";
import { listMag } from "@/api/base/mag";
export default {
name: 'RuoyiUiMagDetailDrawer',
dicts: ['base_mag_topic'],
data() {
return {
isOpen: false,
oldData: null,
magList: [],
deptList: [],
userList: [],
form: {
title: "",
ord: 0,
magid: 0,
topic: "1",
authorPhone: '',
authorName: '',
deptid: null,
imageUrl: [],
content: '',
images: ""
},
rules: {
magid: [{ required: true, message: "请选择期刊", trigger: "blur" }],
topic: [{ required: true, message: "请选择栏目", trigger: "blur" }],
deptid: [{ required: true, message: "请选择单位", trigger: "blur" }],
authorPhone: [{ required: true, message: "请选择作者", trigger: "blur" }],
title: [{ required: true, message: "请输入标题", trigger: "blur" }],
imageUrl: [{ required: true, trigger: "change", message: "请上传图片" }],
content: [{ required: true, message: "请输入正文", trigger: "blur" }],
}
};
},
mounted() {
},
methods: {
doImageInput() {
this.$refs.fiImage.clearValidate()
},
doDeptChange(init) {
let param = {
deptId: this.form.deptid
}
//
this.$api.publics.getUserList(param).then(d => {
this.userList = d.rows || [];
if (init) {
if (this.oldData && this.userList.length > 0) {
this.form.authorPhone = this.oldData.authorPhone;
this.form.authorName = this.oldData.authorName;
}
}
});
},
loadDepts(init) {
this.$api.publics.getMyDeptList().then(d => {
let tmps = d.data || [];
let finds = tmps.filter(it => it.deptName == "总包单位");
this.deptList = [];
if (finds.length > 0) {
let dept = finds[0];
this.deptList = tmps.filter(it => it.parentId == dept.deptId);
if (this.oldData) {
this.form.deptid = this.oldData.deptid;
this.doDeptChange(init);
}
}
});
},
loadMag() {
listMag({ pageNum: 1, pageSize: 1000 }).then(d => {
this.magList = d.rows || [];
if (this.magList.length > 0) {
if (this.oldData == null) {
this.form.magid = this.magList[0].id;
} else {
this.form.magid = this.oldData.magid;
}
}
});
},
show(row, ord) {
this.oldData = row;
this.form.ord = ord;
this.isOpen = true;
this.loadMag(true);
this.loadDepts(true);
if (row) {
this.form.title = row.title;
this.form.ord = row.ord;
this.form.topic = row.topic;
this.form.imageUrl = this.$tryToJson(row.images).map(d => {
return { name: d, url: d };
})
this.form.content = row.content;
}else{
this.form.title="";
this.form.magid=0;
this.form.topic="1";
this.form.authorPhone="";
this.form.authorName="";
this.form.deptId=null;
this.form.imageUrl=[];
this.form.content="";
this.form.images="";
}
},
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.doSubmit();
}
});
},
doSubmit() {
this.form.images = JSON.stringify(this.form.imageUrl.map(d => d.url));
let tmps = this.userList.filter(d => d.phonenumber == this.form.authorPhone);
this.form.authorName = tmps.length > 0 ? tmps[0].nickName : "";
if (this.oldData && this.oldData.id) {
this.oldData.magid = this.form.magid;
this.oldData.topic = this.form.topic;
this.oldData.deptid = this.form.deptid;
this.oldData.title = this.form.title;
this.oldData.authorPhone = this.form.authorPhone;
this.oldData.authorName = this.form.authorName;
this.oldData.content = this.form.content;
this.oldData.images = this.form.images;
this.oldData.ord = this.form.ord;
updateMagDetail(this.oldData).then(response => {
this.$modal.msgSuccess("修改成功");
this.isOpen = false;
this.$emit("success");
});
} else {
addMagDetail(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.isOpen = false;
this.$emit("success");
});
}
},
doCancel() {
this.isOpen = false;
}
},
};
</script>
<style lang="scss">
.mag_detail_drawer {
.el-drawer__header {
margin-bottom: 0px;
}
.el-drawer__body {
padding: 12px 24px;
}
.el-drawer {
min-width: 1200px;
}
.fi-imgs {
.el-image__inner {
width: 100px;
}
.upload-file {
.el-upload__tip {
margin-top: 0px;
}
.upload-file-uploader {
margin-bottom: 0px;
}
}
&.form-img-1 {
.upload-file-uploader {
display: none;
}
}
}
}
</style>

View File

@ -69,10 +69,20 @@
<template slot-scope="{row}">{{ row.workerGender==1?'女':'男' }}</template>
</el-table-column>
<el-table-column label="进场时间" align="center" prop="inTime">
<template slot-scope="{row}">{{ row.attendanceTime|formatTime }}</template>
<template slot-scope="{row}">
<span v-if="row.attendanceTime">
{{ row.attendanceTime|formatTime }}
</span>
<i v-else class="el-icon-close" style="color:red;"></i>
</template>
</el-table-column>
<el-table-column label="离场时间" align="center" prop="outTime">
<template slot-scope="{row}">{{ row.attendanceOutTime|formatTime }}</template>
<template slot-scope="{row}">
<span v-if="row.attendanceOutTime">
{{ row.attendanceOutTime|formatTime }}
</span>
<i v-else class="el-icon-close" style="color:red;"></i>
</template>
</el-table-column>
<el-table-column label="分包商名称" align="center" prop="companyName" />
<el-table-column label="所属班组" align="center" prop="groupName" />
@ -260,6 +270,18 @@ export default {
}
listAttendance(postData).then(response=>{
this.attendanceList = (response.rows||[]).map(it=>{
let dt1=it.attendanceTime;
let dt2=it.attendanceOutTime;
if((!dt1 || !dt2)||dt1==dt2){
let dt=dt1||dt2;
if(it.remark=="E"){
it.attendanceTime=dt;
it.attendanceOutTime="";
}else{
it.attendanceTime="";
it.attendanceOutTime=dt;
}
}
it.scanPhoto=it.scanPhoto && it.scanPhoto.indexOf("/profile")==0?"/jhapi"+it.scanPhoto:it.scanPhoto;
return it;
});

View File

@ -0,0 +1,229 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="项目ID" prop="projectId">
<el-input v-model="queryParams.projectId" placeholder="请输入项目ID" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="成本名称" prop="costName">
<el-input v-model="queryParams.costName" placeholder="请输入成本名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="金额(万元)" prop="money">
<el-input v-model="queryParams.money" placeholder="请输入金额(万元)" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<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="['project:projectCommittee: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="['project:projectCommittee: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="['project:projectCommittee:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['project:projectCommittee:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="projectCommitteeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="${comment}" align="center" prop="id" />
<el-table-column label="项目ID" align="center" prop="projectId" />
<el-table-column label="分类字典project_working_type" align="center" prop="workingType" />
<el-table-column label="成本名称" align="center" prop="costName" />
<el-table-column label="金额(万元)" align="center" prop="money" />
<el-table-column label="${comment}" align="center" prop="remark" />
<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="['project:projectCommittee:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['project:projectCommittee: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="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="项目ID" prop="projectId">
<el-input v-model="form.projectId" placeholder="请输入项目ID" />
</el-form-item>
<el-form-item label="成本名称" prop="costName">
<el-input v-model="form.costName" placeholder="请输入成本名称" />
</el-form-item>
<el-form-item label="金额(万元)" prop="money">
<el-input v-model="form.money" placeholder="请输入金额(万元)" />
</el-form-item>
<el-form-item label="${comment}" prop="remark">
<el-input v-model="form.remark" placeholder="请输入${comment}" />
</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 { listProjectCommittee, getProjectCommittee, delProjectCommittee, addProjectCommittee, updateProjectCommittee } from "@/api/project/projectCommittee";
export default {
name: "ProjectCommittee",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
projectCommitteeList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
projectId: null,
workingType: null,
costName: null,
money: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询工委会管理列表 */
getList() {
this.loading = true;
listProjectCommittee(this.queryParams).then(response => {
this.projectCommitteeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectId: null,
workingType: null,
costName: null,
money: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: 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.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加工委会管理";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getProjectCommittee(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改工委会管理";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateProjectCommittee(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addProjectCommittee(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除工委会管理编号为"' + ids + '"的数据项?').then(function () {
return delProjectCommittee(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('project/projectCommittee/export', {
...this.queryParams
}, `projectCommittee_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,148 @@
<template>
<div class="project-committee-drawer">
<el-drawer v-if="isOpen" :visible.sync="isOpen" direction="rtl" size="40%" style="padding-left: 20px">
<template slot="title">
<div>工委会管理</div>
</template>
<el-form ref="form" label-width="120px">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(dict, idx) in dict.type.project_working_type" :key="dict.value"
:label="dict.label" :name="'type' + dict.value">
<el-row v-for="(dataItem, index) in datas[idx]" :key="idx + '-' + index">
<el-col :span="4">
<el-form-item :label="dataItem.committeeName"></el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="成本名称">
<el-input v-model="dataItem.costName" placeholder="请输成本名称" maxlength="200" :class="checkRow(dataItem,1)"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="支付金额">
<el-input v-model="dataItem.money" placeholder="请输支付金额" :class="checkRow(dataItem,2)"
@blur="v => formatAmount(dataItem)" maxlength="200">
<template slot="append">万元</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
<div class="dialog-footer" style="text-align: center;">
<el-button type="primary" @click="submitForm"></el-button>
<el-button @click="doCancel"> </el-button>
</div>
</el-form>
</el-drawer>
</div>
</template>
<script>
import { listProjectCommittee, getProjectCommittee, delProjectCommittee, addProjectCommittee, updateProjectCommittee } from "@/api/project/projectCommittee";
import { listCommittee, getCommittee, delCommittee, addCommittee, updateCommittee } from "@/api/base/committee";
import axios from 'axios'
export default {
dicts: ['project_working_type'],
data() {
return {
isOpen: false,
projectId: 0,
prjInfo: null,
activeName: 'type1',
datas: [],
}
},
methods: {
checkRow(datas,type){
let costName=(datas.costName||"").trim();
let money=((datas.money||"")+"").trim();
let tmp=costName+money;
return (tmp.length>0 && (costName.length==0 || money.length==0) && (type==1?costName.length==0:money.length==0)) ?"is-error":"";
},
submitForm(){
},
doCancel(){
this.isOpen=false;
},
formatAmount(it) {
let value=it.money;
// 使
it.money = value.replace(/[^\d.]/g, '') //
.replace(/\.{2,}/g, '.') //
.replace(/^(\d+)\./g, '$1.') //
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
.replace(/^(\d+)$/, '$1.00') //
.replace(/^0+([1-9])/, '$1') //
.replace(/^(\d+\.\d{2})./, '$1'); //
},
handleClick(tab, event) {
},
show(row) {
this.prjInfo = row;
this.isOpen = true;
this.loadData();
},
loadData() {
let ajaxs = [
listProjectCommittee({ projectId: this.prjInfo.id, pageNum: 1, pageSize: 1000 }),
listCommittee({ pageNum: 1, pageSize: 1000 })
]
axios.all(ajaxs).then(res => {
this.makeData(res[0].rows || [], res[1].rows || []);
});
},
makeData(data, commits) {
let list = [];
this.dict.type.project_working_type.forEach(dic => {
let tmps = [];
commits.forEach(c => {
var find = data.filter(d => d.committeeId == c.id && d.workingType == dic.value);
if (find.length > 0) {
let f = find[0]
f.committeeName = c.name,
tmps.push(f);
} else {
tmps.push({
committeeId: c.id,
committeeName: c.name,
projectId: this.prjInfo.id,
workingType: dic.value,
costName: '',
money: null
})
}
});
list.push(tmps);
})
this.datas = list;
}
}
}
</script>
<style lang="scss">
.project-committee-drawer {
.el-drawer__header {
margin-bottom: 0px;
}
.el-drawer__body {
padding: 12px 24px;
.el-row{
.el-input.is-error{
border:solid 1px red;
border-radius: 4px;
}
}
}
.el-drawer {
min-width: 800px;
}
}
</style>

View File

@ -0,0 +1,104 @@
package com.yanzhu.jh.base.controller;
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.yanzhu.jh.base.domain.BaseMag;
import com.yanzhu.jh.base.service.IBaseMagService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2024-04-04
*/
@RestController
@RequestMapping("/base/mag")
public class BaseMagController extends BaseController
{
@Autowired
private IBaseMagService baseMagService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:mag:list')")
@GetMapping("/list")
public TableDataInfo list(BaseMag baseMag)
{
startPage();
List<BaseMag> list = baseMagService.selectBaseMagList(baseMag);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:mag:export')")
@Log(title = "期刊列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BaseMag baseMag)
{
List<BaseMag> list = baseMagService.selectBaseMagList(baseMag);
ExcelUtil<BaseMag> util = new ExcelUtil<BaseMag>(BaseMag.class);
util.exportExcel(response, list, "期刊列表数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:mag:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(baseMagService.selectBaseMagById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:mag:add')")
@Log(title = "期刊列表", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseMag baseMag)
{
return toAjax(baseMagService.insertBaseMag(baseMag));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:mag:edit')")
@Log(title = "期刊列表", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseMag baseMag)
{
return toAjax(baseMagService.updateBaseMag(baseMag));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:mag:remove')")
@Log(title = "期刊列表", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(baseMagService.deleteBaseMagByIds(ids));
}
}

View File

@ -0,0 +1,104 @@
package com.yanzhu.jh.base.controller;
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.yanzhu.jh.base.domain.BaseMagDetail;
import com.yanzhu.jh.base.service.IBaseMagDetailService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2024-04-04
*/
@RestController
@RequestMapping("/base/magDetail")
public class BaseMagDetailController extends BaseController
{
@Autowired
private IBaseMagDetailService baseMagDetailService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:magDetail:list')")
@GetMapping("/list")
public TableDataInfo list(BaseMagDetail baseMagDetail)
{
startPage();
List<BaseMagDetail> list = baseMagDetailService.selectBaseMagDetailList(baseMagDetail);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:magDetail:export')")
@Log(title = "期刊详情", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BaseMagDetail baseMagDetail)
{
List<BaseMagDetail> list = baseMagDetailService.selectBaseMagDetailList(baseMagDetail);
ExcelUtil<BaseMagDetail> util = new ExcelUtil<BaseMagDetail>(BaseMagDetail.class);
util.exportExcel(response, list, "期刊详情数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:magDetail:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(baseMagDetailService.selectBaseMagDetailById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:magDetail:add')")
@Log(title = "期刊详情", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseMagDetail baseMagDetail)
{
return toAjax(baseMagDetailService.insertBaseMagDetail(baseMagDetail));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:magDetail:edit')")
@Log(title = "期刊详情", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseMagDetail baseMagDetail)
{
return toAjax(baseMagDetailService.updateBaseMagDetail(baseMagDetail));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:magDetail:remove')")
@Log(title = "期刊详情", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(baseMagDetailService.deleteBaseMagDetailByIds(ids));
}
}

View File

@ -0,0 +1,104 @@
package com.yanzhu.jh.base.controller;
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.yanzhu.jh.base.domain.BaseWorkingCommittee;
import com.yanzhu.jh.base.service.IBaseWorkingCommitteeService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2024-04-04
*/
@RestController
@RequestMapping("/base/committee")
public class BaseWorkingCommitteeController extends BaseController
{
@Autowired
private IBaseWorkingCommitteeService baseWorkingCommitteeService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:committee:list')")
@GetMapping("/list")
public TableDataInfo list(BaseWorkingCommittee baseWorkingCommittee)
{
startPage();
List<BaseWorkingCommittee> list = baseWorkingCommitteeService.selectBaseWorkingCommitteeList(baseWorkingCommittee);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:committee:export')")
@Log(title = "工委会列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BaseWorkingCommittee baseWorkingCommittee)
{
List<BaseWorkingCommittee> list = baseWorkingCommitteeService.selectBaseWorkingCommitteeList(baseWorkingCommittee);
ExcelUtil<BaseWorkingCommittee> util = new ExcelUtil<BaseWorkingCommittee>(BaseWorkingCommittee.class);
util.exportExcel(response, list, "工委会列表数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:committee:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(baseWorkingCommitteeService.selectBaseWorkingCommitteeById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:committee:add')")
@Log(title = "工委会列表", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseWorkingCommittee baseWorkingCommittee)
{
return toAjax(baseWorkingCommitteeService.insertBaseWorkingCommittee(baseWorkingCommittee));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:committee:edit')")
@Log(title = "工委会列表", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseWorkingCommittee baseWorkingCommittee)
{
return toAjax(baseWorkingCommitteeService.updateBaseWorkingCommittee(baseWorkingCommittee));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:committee:remove')")
@Log(title = "工委会列表", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(baseWorkingCommitteeService.deleteBaseWorkingCommitteeByIds(ids));
}
}

View File

@ -0,0 +1,98 @@
package com.yanzhu.jh.base.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;
/**
* base_mag
*
* @author ruoyi
* @date 2024-04-04
*/
public class BaseMag extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 期刊名称 */
@Excel(name = "期刊名称")
private String name;
/** 图片 */
@Excel(name = "图片")
private String imgs;
/** 排序 */
@Excel(name = "排序")
private Long ord;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Long isDel;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setImgs(String imgs)
{
this.imgs = imgs;
}
public String getImgs()
{
return imgs;
}
public void setOrd(Long ord)
{
this.ord = ord;
}
public Long getOrd()
{
return ord;
}
public void setIsDel(Long isDel)
{
this.isDel = isDel;
}
public Long getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("imgs", getImgs())
.append("ord", getOrd())
.append("remark", getRemark())
.append("isDel", getIsDel())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -0,0 +1,213 @@
package com.yanzhu.jh.base.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;
/**
* base_mag_detail
*
* @author ruoyi
* @date 2024-04-04
*/
public class BaseMagDetail extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 期刊id */
@Excel(name = "期刊id")
private Long magid;
/** 栏目字典mag_topic */
@Excel(name = "栏目字典mag_topic")
private Long topic;
/** 标题 */
@Excel(name = "标题")
private String title;
/** 总包编号 */
@Excel(name = "总包编号")
private Long deptid;
/** 作者 */
@Excel(name = "作者")
private String authorName;
/** 作者电话 */
@Excel(name = "作者电话")
private String authorPhone;
/** 排序号 */
@Excel(name = "排序号")
private Long ord;
/** 图片 */
@Excel(name = "图片")
private String images;
/** 正文 */
@Excel(name = "正文")
private String content;
private String name;
private String deptName;
private String topicName;
public String getName() {
return name;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public void setName(String name) {
this.name = name;
}
public String getTopicName() {
return topicName;
}
public void setTopicName(String topicName) {
this.topicName = topicName;
}
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Long isDel;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setMagid(Long magid)
{
this.magid = magid;
}
public Long getMagid()
{
return magid;
}
public void setTopic(Long topic)
{
this.topic = topic;
}
public Long getTopic()
{
return topic;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setDeptid(Long deptid)
{
this.deptid = deptid;
}
public Long getDeptid()
{
return deptid;
}
public void setAuthorName(String authorName)
{
this.authorName = authorName;
}
public String getAuthorName()
{
return authorName;
}
public void setAuthorPhone(String authorPhone)
{
this.authorPhone = authorPhone;
}
public String getAuthorPhone()
{
return authorPhone;
}
public void setOrd(Long ord)
{
this.ord = ord;
}
public Long getOrd()
{
return ord;
}
public void setImages(String images)
{
this.images = images;
}
public String getImages()
{
return images;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setIsDel(Long isDel)
{
this.isDel = isDel;
}
public Long getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("magid", getMagid())
.append("topic", getTopic())
.append("title", getTitle())
.append("deptid", getDeptid())
.append("authorName", getAuthorName())
.append("authorPhone", getAuthorPhone())
.append("ord", getOrd())
.append("images", getImages())
.append("content", getContent())
.append("remark", getRemark())
.append("isDel", getIsDel())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -0,0 +1,84 @@
package com.yanzhu.jh.base.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;
/**
* base_working_committee
*
* @author ruoyi
* @date 2024-04-04
*/
public class BaseWorkingCommittee extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 名称 */
@Excel(name = "名称")
private String name;
/** 文件 */
@Excel(name = "文件")
private String files;
/** 顺序 */
@Excel(name = "顺序")
private Long ord;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setFiles(String files)
{
this.files = files;
}
public String getFiles()
{
return files;
}
public void setOrd(Long ord)
{
this.ord = ord;
}
public Long getOrd()
{
return ord;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("files", getFiles())
.append("ord", getOrd())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.yanzhu.jh.base.mapper;
import java.util.List;
import com.yanzhu.jh.base.domain.BaseMagDetail;
/**
* Mapper
*
* @author ruoyi
* @date 2024-04-04
*/
public interface BaseMagDetailMapper
{
/**
*
*
* @param id
* @return
*/
public BaseMagDetail selectBaseMagDetailById(Long id);
/**
*
*
* @param baseMagDetail
* @return
*/
public List<BaseMagDetail> selectBaseMagDetailList(BaseMagDetail baseMagDetail);
/**
*
*
* @param baseMagDetail
* @return
*/
public int insertBaseMagDetail(BaseMagDetail baseMagDetail);
/**
*
*
* @param baseMagDetail
* @return
*/
public int updateBaseMagDetail(BaseMagDetail baseMagDetail);
/**
*
*
* @param id
* @return
*/
public int deleteBaseMagDetailById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteBaseMagDetailByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.yanzhu.jh.base.mapper;
import java.util.List;
import com.yanzhu.jh.base.domain.BaseMag;
/**
* Mapper
*
* @author ruoyi
* @date 2024-04-04
*/
public interface BaseMagMapper
{
/**
*
*
* @param id
* @return
*/
public BaseMag selectBaseMagById(Long id);
/**
*
*
* @param baseMag
* @return
*/
public List<BaseMag> selectBaseMagList(BaseMag baseMag);
/**
*
*
* @param baseMag
* @return
*/
public int insertBaseMag(BaseMag baseMag);
/**
*
*
* @param baseMag
* @return
*/
public int updateBaseMag(BaseMag baseMag);
/**
*
*
* @param id
* @return
*/
public int deleteBaseMagById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteBaseMagByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.yanzhu.jh.base.mapper;
import java.util.List;
import com.yanzhu.jh.base.domain.BaseWorkingCommittee;
/**
* Mapper
*
* @author ruoyi
* @date 2024-04-04
*/
public interface BaseWorkingCommitteeMapper
{
/**
*
*
* @param id
* @return
*/
public BaseWorkingCommittee selectBaseWorkingCommitteeById(Long id);
/**
*
*
* @param baseWorkingCommittee
* @return
*/
public List<BaseWorkingCommittee> selectBaseWorkingCommitteeList(BaseWorkingCommittee baseWorkingCommittee);
/**
*
*
* @param baseWorkingCommittee
* @return
*/
public int insertBaseWorkingCommittee(BaseWorkingCommittee baseWorkingCommittee);
/**
*
*
* @param baseWorkingCommittee
* @return
*/
public int updateBaseWorkingCommittee(BaseWorkingCommittee baseWorkingCommittee);
/**
*
*
* @param id
* @return
*/
public int deleteBaseWorkingCommitteeById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteBaseWorkingCommitteeByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.yanzhu.jh.base.service;
import java.util.List;
import com.yanzhu.jh.base.domain.BaseMagDetail;
/**
* Service
*
* @author ruoyi
* @date 2024-04-04
*/
public interface IBaseMagDetailService
{
/**
*
*
* @param id
* @return
*/
public BaseMagDetail selectBaseMagDetailById(Long id);
/**
*
*
* @param baseMagDetail
* @return
*/
public List<BaseMagDetail> selectBaseMagDetailList(BaseMagDetail baseMagDetail);
/**
*
*
* @param baseMagDetail
* @return
*/
public int insertBaseMagDetail(BaseMagDetail baseMagDetail);
/**
*
*
* @param baseMagDetail
* @return
*/
public int updateBaseMagDetail(BaseMagDetail baseMagDetail);
/**
*
*
* @param ids
* @return
*/
public int deleteBaseMagDetailByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteBaseMagDetailById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.yanzhu.jh.base.service;
import java.util.List;
import com.yanzhu.jh.base.domain.BaseMag;
/**
* Service
*
* @author ruoyi
* @date 2024-04-04
*/
public interface IBaseMagService
{
/**
*
*
* @param id
* @return
*/
public BaseMag selectBaseMagById(Long id);
/**
*
*
* @param baseMag
* @return
*/
public List<BaseMag> selectBaseMagList(BaseMag baseMag);
/**
*
*
* @param baseMag
* @return
*/
public int insertBaseMag(BaseMag baseMag);
/**
*
*
* @param baseMag
* @return
*/
public int updateBaseMag(BaseMag baseMag);
/**
*
*
* @param ids
* @return
*/
public int deleteBaseMagByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteBaseMagById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.yanzhu.jh.base.service;
import java.util.List;
import com.yanzhu.jh.base.domain.BaseWorkingCommittee;
/**
* Service
*
* @author ruoyi
* @date 2024-04-04
*/
public interface IBaseWorkingCommitteeService
{
/**
*
*
* @param id
* @return
*/
public BaseWorkingCommittee selectBaseWorkingCommitteeById(Long id);
/**
*
*
* @param baseWorkingCommittee
* @return
*/
public List<BaseWorkingCommittee> selectBaseWorkingCommitteeList(BaseWorkingCommittee baseWorkingCommittee);
/**
*
*
* @param baseWorkingCommittee
* @return
*/
public int insertBaseWorkingCommittee(BaseWorkingCommittee baseWorkingCommittee);
/**
*
*
* @param baseWorkingCommittee
* @return
*/
public int updateBaseWorkingCommittee(BaseWorkingCommittee baseWorkingCommittee);
/**
*
*
* @param ids
* @return
*/
public int deleteBaseWorkingCommitteeByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteBaseWorkingCommitteeById(Long id);
}

View File

@ -0,0 +1,98 @@
package com.yanzhu.jh.base.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.yanzhu.jh.base.mapper.BaseMagDetailMapper;
import com.yanzhu.jh.base.domain.BaseMagDetail;
import com.yanzhu.jh.base.service.IBaseMagDetailService;
import com.ruoyi.common.utils.SecurityUtils;
/**
* Service
*
* @author ruoyi
* @date 2024-04-04
*/
@Service
public class BaseMagDetailServiceImpl implements IBaseMagDetailService
{
@Autowired
private BaseMagDetailMapper baseMagDetailMapper;
/**
*
*
* @param id
* @return
*/
@Override
public BaseMagDetail selectBaseMagDetailById(Long id)
{
return baseMagDetailMapper.selectBaseMagDetailById(id);
}
/**
*
*
* @param baseMagDetail
* @return
*/
@Override
public List<BaseMagDetail> selectBaseMagDetailList(BaseMagDetail baseMagDetail)
{
return baseMagDetailMapper.selectBaseMagDetailList(baseMagDetail);
}
/**
*
*
* @param baseMagDetail
* @return
*/
@Override
public int insertBaseMagDetail(BaseMagDetail baseMagDetail)
{
baseMagDetail.setCreateBy(SecurityUtils.getUsername());
baseMagDetail.setCreateTime(DateUtils.getNowDate());
return baseMagDetailMapper.insertBaseMagDetail(baseMagDetail);
}
/**
*
*
* @param baseMagDetail
* @return
*/
@Override
public int updateBaseMagDetail(BaseMagDetail baseMagDetail)
{
baseMagDetail.setUpdateBy(SecurityUtils.getUsername());
baseMagDetail.setUpdateTime(DateUtils.getNowDate());
return baseMagDetailMapper.updateBaseMagDetail(baseMagDetail);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteBaseMagDetailByIds(Long[] ids)
{
return baseMagDetailMapper.deleteBaseMagDetailByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteBaseMagDetailById(Long id)
{
return baseMagDetailMapper.deleteBaseMagDetailById(id);
}
}

View File

@ -0,0 +1,98 @@
package com.yanzhu.jh.base.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.yanzhu.jh.base.mapper.BaseMagMapper;
import com.yanzhu.jh.base.domain.BaseMag;
import com.yanzhu.jh.base.service.IBaseMagService;
import com.ruoyi.common.utils.SecurityUtils;
/**
* Service
*
* @author ruoyi
* @date 2024-04-04
*/
@Service
public class BaseMagServiceImpl implements IBaseMagService
{
@Autowired
private BaseMagMapper baseMagMapper;
/**
*
*
* @param id
* @return
*/
@Override
public BaseMag selectBaseMagById(Long id)
{
return baseMagMapper.selectBaseMagById(id);
}
/**
*
*
* @param baseMag
* @return
*/
@Override
public List<BaseMag> selectBaseMagList(BaseMag baseMag)
{
return baseMagMapper.selectBaseMagList(baseMag);
}
/**
*
*
* @param baseMag
* @return
*/
@Override
public int insertBaseMag(BaseMag baseMag)
{
baseMag.setCreateBy(SecurityUtils.getUsername());
baseMag.setCreateTime(DateUtils.getNowDate());
return baseMagMapper.insertBaseMag(baseMag);
}
/**
*
*
* @param baseMag
* @return
*/
@Override
public int updateBaseMag(BaseMag baseMag)
{
baseMag.setUpdateBy(SecurityUtils.getUsername());
baseMag.setUpdateTime(DateUtils.getNowDate());
return baseMagMapper.updateBaseMag(baseMag);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteBaseMagByIds(Long[] ids)
{
return baseMagMapper.deleteBaseMagByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteBaseMagById(Long id)
{
return baseMagMapper.deleteBaseMagById(id);
}
}

View File

@ -0,0 +1,98 @@
package com.yanzhu.jh.base.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.yanzhu.jh.base.mapper.BaseWorkingCommitteeMapper;
import com.yanzhu.jh.base.domain.BaseWorkingCommittee;
import com.yanzhu.jh.base.service.IBaseWorkingCommitteeService;
import com.ruoyi.common.utils.SecurityUtils;
/**
* Service
*
* @author ruoyi
* @date 2024-04-04
*/
@Service
public class BaseWorkingCommitteeServiceImpl implements IBaseWorkingCommitteeService
{
@Autowired
private BaseWorkingCommitteeMapper baseWorkingCommitteeMapper;
/**
*
*
* @param id
* @return
*/
@Override
public BaseWorkingCommittee selectBaseWorkingCommitteeById(Long id)
{
return baseWorkingCommitteeMapper.selectBaseWorkingCommitteeById(id);
}
/**
*
*
* @param baseWorkingCommittee
* @return
*/
@Override
public List<BaseWorkingCommittee> selectBaseWorkingCommitteeList(BaseWorkingCommittee baseWorkingCommittee)
{
return baseWorkingCommitteeMapper.selectBaseWorkingCommitteeList(baseWorkingCommittee);
}
/**
*
*
* @param baseWorkingCommittee
* @return
*/
@Override
public int insertBaseWorkingCommittee(BaseWorkingCommittee baseWorkingCommittee)
{
baseWorkingCommittee.setCreateBy(SecurityUtils.getUsername());
baseWorkingCommittee.setCreateTime(DateUtils.getNowDate());
return baseWorkingCommitteeMapper.insertBaseWorkingCommittee(baseWorkingCommittee);
}
/**
*
*
* @param baseWorkingCommittee
* @return
*/
@Override
public int updateBaseWorkingCommittee(BaseWorkingCommittee baseWorkingCommittee)
{
baseWorkingCommittee.setUpdateBy(SecurityUtils.getUsername());
baseWorkingCommittee.setUpdateTime(DateUtils.getNowDate());
return baseWorkingCommitteeMapper.updateBaseWorkingCommittee(baseWorkingCommittee);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteBaseWorkingCommitteeByIds(Long[] ids)
{
return baseWorkingCommitteeMapper.deleteBaseWorkingCommitteeByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteBaseWorkingCommitteeById(Long id)
{
return baseWorkingCommitteeMapper.deleteBaseWorkingCommitteeById(id);
}
}

View File

@ -0,0 +1,104 @@
package com.yanzhu.jh.project.controller;
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.yanzhu.jh.project.domain.SurProjectWorkingCommittee;
import com.yanzhu.jh.project.service.ISurProjectWorkingCommitteeService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2024-04-06
*/
@RestController
@RequestMapping("/project/projectCommittee")
public class SurProjectWorkingCommitteeController extends BaseController
{
@Autowired
private ISurProjectWorkingCommitteeService surProjectWorkingCommitteeService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('project:projectCommittee:list')")
@GetMapping("/list")
public TableDataInfo list(SurProjectWorkingCommittee surProjectWorkingCommittee)
{
startPage();
List<SurProjectWorkingCommittee> list = surProjectWorkingCommitteeService.selectSurProjectWorkingCommitteeList(surProjectWorkingCommittee);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('project:projectCommittee:export')")
@Log(title = "工委会管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SurProjectWorkingCommittee surProjectWorkingCommittee)
{
List<SurProjectWorkingCommittee> list = surProjectWorkingCommitteeService.selectSurProjectWorkingCommitteeList(surProjectWorkingCommittee);
ExcelUtil<SurProjectWorkingCommittee> util = new ExcelUtil<SurProjectWorkingCommittee>(SurProjectWorkingCommittee.class);
util.exportExcel(response, list, "工委会管理数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('project:projectCommittee:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(surProjectWorkingCommitteeService.selectSurProjectWorkingCommitteeById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('project:projectCommittee:add')")
@Log(title = "工委会管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SurProjectWorkingCommittee surProjectWorkingCommittee)
{
return toAjax(surProjectWorkingCommitteeService.insertSurProjectWorkingCommittee(surProjectWorkingCommittee));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('project:projectCommittee:edit')")
@Log(title = "工委会管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SurProjectWorkingCommittee surProjectWorkingCommittee)
{
return toAjax(surProjectWorkingCommitteeService.updateSurProjectWorkingCommittee(surProjectWorkingCommittee));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('project:projectCommittee:remove')")
@Log(title = "工委会管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(surProjectWorkingCommitteeService.deleteSurProjectWorkingCommitteeByIds(ids));
}
}

View File

@ -258,6 +258,11 @@ public class SurProjectAttendanceData extends BaseEntity
d.workerId=j.getString("labourWorkerId");
long recordTime=j.getLongValue("recordTime",0);
if(recordTime>0){
if(j.getIntValue("inOrOut",1)==1){
d.setRemark("E");
}else{
d.setRemark("L");
}
d.attendanceTime= DateUtil.format(DateUtil.date(recordTime),"yyyy-MM-dd HH:mm:ss");
}
d.identification=j.getString("idCardNo");
@ -273,8 +278,13 @@ public class SurProjectAttendanceData extends BaseEntity
d.vendorsCode="jgw";
d.serverid=j.getString("id");
d.workerId=j.getString("workerId");
if("2".equals(j.getString("machineType"))){
d.setRemark("L");
}else{
d.setRemark("E");
}
d.attendanceTime = j.getString("checkinTime");
d.identification="";
d.teamId=0l;
d.workTypeCode="";
d.companyId=j.getString("subcontractorId");
@ -319,6 +329,11 @@ public class SurProjectAttendanceData extends BaseEntity
public static SurProjectAttendanceData create(JSONObject json) {
SurProjectAttendanceData d=new SurProjectAttendanceData();
d.attendanceTime=json.getString("time");
if("E".equals(json.getString("type"))){
d.setRemark("E");
}else{
d.setRemark("L");
}
d.serverid=json.getString("id");
d.workerId=json.getString("workerId");
d.identification=json.getString("identification");

View File

@ -0,0 +1,112 @@
package com.yanzhu.jh.project.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;
/**
* sur_project_working_committee
*
* @author ruoyi
* @date 2024-04-06
*/
public class SurProjectWorkingCommittee extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 外建 */
@Excel(name = "外建")
private Long committeeId;
/** 项目ID */
@Excel(name = "项目ID")
private Long projectId;
/** 分类字典project_working_type */
@Excel(name = "分类字典project_working_type")
private Long workingType;
/** 成本名称 */
@Excel(name = "成本名称")
private String costName;
/** 金额(万元) */
@Excel(name = "金额(万元)")
private Long money;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setCommitteeId(Long committeeId)
{
this.committeeId = committeeId;
}
public Long getCommitteeId()
{
return committeeId;
}
public void setProjectId(Long projectId)
{
this.projectId = projectId;
}
public Long getProjectId()
{
return projectId;
}
public void setWorkingType(Long workingType)
{
this.workingType = workingType;
}
public Long getWorkingType()
{
return workingType;
}
public void setCostName(String costName)
{
this.costName = costName;
}
public String getCostName()
{
return costName;
}
public void setMoney(Long money)
{
this.money = money;
}
public Long getMoney()
{
return money;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("committeeId", getCommitteeId())
.append("projectId", getProjectId())
.append("workingType", getWorkingType())
.append("costName", getCostName())
.append("money", getMoney())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -92,7 +92,7 @@ public interface SurProjectAttendanceDataMapper
List<SurProjectAttendanceData> groupAllByComany(SurProjectAttendanceData where);
List<SurProjectAttendanceData> groupByComany(SurProjectAttendanceData where);
public Long getHuazhuPage(Long id);
public Long getHuazhuPage(SurProjectAttendanceData where);
public List<Map<String,Object>> initOtherData(Map<String,Object> data);

View File

@ -0,0 +1,61 @@
package com.yanzhu.jh.project.mapper;
import java.util.List;
import com.yanzhu.jh.project.domain.SurProjectWorkingCommittee;
/**
* Mapper
*
* @author ruoyi
* @date 2024-04-06
*/
public interface SurProjectWorkingCommitteeMapper
{
/**
*
*
* @param id
* @return
*/
public SurProjectWorkingCommittee selectSurProjectWorkingCommitteeById(Long id);
/**
*
*
* @param surProjectWorkingCommittee
* @return
*/
public List<SurProjectWorkingCommittee> selectSurProjectWorkingCommitteeList(SurProjectWorkingCommittee surProjectWorkingCommittee);
/**
*
*
* @param surProjectWorkingCommittee
* @return
*/
public int insertSurProjectWorkingCommittee(SurProjectWorkingCommittee surProjectWorkingCommittee);
/**
*
*
* @param surProjectWorkingCommittee
* @return
*/
public int updateSurProjectWorkingCommittee(SurProjectWorkingCommittee surProjectWorkingCommittee);
/**
*
*
* @param id
* @return
*/
public int deleteSurProjectWorkingCommitteeById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteSurProjectWorkingCommitteeByIds(Long[] ids);
}

View File

@ -94,7 +94,7 @@ public interface ISurProjectAttendanceDataService
public List<SurProjectAttendanceData> groupByComany(SurProjectAttendanceData where);
public Long getHuazhuPage(Long id);
public Long getHuazhuPage( SurProjectAttendanceData where);
public List<SurProjectAttendanceData> groupAllByComany(SurProjectAttendanceData where);

View File

@ -0,0 +1,61 @@
package com.yanzhu.jh.project.service;
import java.util.List;
import com.yanzhu.jh.project.domain.SurProjectWorkingCommittee;
/**
* Service
*
* @author ruoyi
* @date 2024-04-06
*/
public interface ISurProjectWorkingCommitteeService
{
/**
*
*
* @param id
* @return
*/
public SurProjectWorkingCommittee selectSurProjectWorkingCommitteeById(Long id);
/**
*
*
* @param surProjectWorkingCommittee
* @return
*/
public List<SurProjectWorkingCommittee> selectSurProjectWorkingCommitteeList(SurProjectWorkingCommittee surProjectWorkingCommittee);
/**
*
*
* @param surProjectWorkingCommittee
* @return
*/
public int insertSurProjectWorkingCommittee(SurProjectWorkingCommittee surProjectWorkingCommittee);
/**
*
*
* @param surProjectWorkingCommittee
* @return
*/
public int updateSurProjectWorkingCommittee(SurProjectWorkingCommittee surProjectWorkingCommittee);
/**
*
*
* @param ids
* @return
*/
public int deleteSurProjectWorkingCommitteeByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteSurProjectWorkingCommitteeById(Long id);
}

View File

@ -291,8 +291,8 @@ public class SurProjectAttendanceDataServiceImpl implements ISurProjectAttendanc
}
@Override
public Long getHuazhuPage(Long id) {
return surProjectAttendanceDataMapper.getHuazhuPage(id);
public Long getHuazhuPage( SurProjectAttendanceData attWhere) {
return surProjectAttendanceDataMapper.getHuazhuPage(attWhere);
}
@Override

View File

@ -0,0 +1,98 @@
package com.yanzhu.jh.project.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.yanzhu.jh.project.mapper.SurProjectWorkingCommitteeMapper;
import com.yanzhu.jh.project.domain.SurProjectWorkingCommittee;
import com.yanzhu.jh.project.service.ISurProjectWorkingCommitteeService;
import com.ruoyi.common.utils.SecurityUtils;
/**
* Service
*
* @author ruoyi
* @date 2024-04-06
*/
@Service
public class SurProjectWorkingCommitteeServiceImpl implements ISurProjectWorkingCommitteeService
{
@Autowired
private SurProjectWorkingCommitteeMapper surProjectWorkingCommitteeMapper;
/**
*
*
* @param id
* @return
*/
@Override
public SurProjectWorkingCommittee selectSurProjectWorkingCommitteeById(Long id)
{
return surProjectWorkingCommitteeMapper.selectSurProjectWorkingCommitteeById(id);
}
/**
*
*
* @param surProjectWorkingCommittee
* @return
*/
@Override
public List<SurProjectWorkingCommittee> selectSurProjectWorkingCommitteeList(SurProjectWorkingCommittee surProjectWorkingCommittee)
{
return surProjectWorkingCommitteeMapper.selectSurProjectWorkingCommitteeList(surProjectWorkingCommittee);
}
/**
*
*
* @param surProjectWorkingCommittee
* @return
*/
@Override
public int insertSurProjectWorkingCommittee(SurProjectWorkingCommittee surProjectWorkingCommittee)
{
surProjectWorkingCommittee.setCreateBy(SecurityUtils.getUsername());
surProjectWorkingCommittee.setCreateTime(DateUtils.getNowDate());
return surProjectWorkingCommitteeMapper.insertSurProjectWorkingCommittee(surProjectWorkingCommittee);
}
/**
*
*
* @param surProjectWorkingCommittee
* @return
*/
@Override
public int updateSurProjectWorkingCommittee(SurProjectWorkingCommittee surProjectWorkingCommittee)
{
surProjectWorkingCommittee.setUpdateBy(SecurityUtils.getUsername());
surProjectWorkingCommittee.setUpdateTime(DateUtils.getNowDate());
return surProjectWorkingCommitteeMapper.updateSurProjectWorkingCommittee(surProjectWorkingCommittee);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteSurProjectWorkingCommitteeByIds(Long[] ids)
{
return surProjectWorkingCommitteeMapper.deleteSurProjectWorkingCommitteeByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteSurProjectWorkingCommitteeById(Long id)
{
return surProjectWorkingCommitteeMapper.deleteSurProjectWorkingCommitteeById(id);
}
}

View File

@ -229,7 +229,9 @@ public class AttendanceHuazhuTask {
if(Strings.isNotEmpty(param)){
try{
JSONObject jo=JSON.parseObject(param);
Long page=attendanceDataService.getHuazhuPage(it.getId());
SurProjectAttendanceData attWhere=new SurProjectAttendanceData();
attWhere.setId(it.getId());
Long page=attendanceDataService.getHuazhuPage(attWhere);
if(null==page){
doSyncAttendanceData(jo,1,it,null);
}else{

View File

@ -152,9 +152,9 @@ public class AttendanceJgwTask {
//findWorkerByLeader(appid,token,leaderTeamId);
//findDirectlyUnderTeam(appid,token,prjId,subcontractorId,0);
//queryProject(appid,token,phone,0);;
findAddWorkerByProject(appid,token,prjId,0);
//findAddWorkerByProject(appid,token,prjId,0);
//findUpdateWorkerByProject(appid,token,prjId,0);
//findAttendanceByProject(appid,token,prjId);
findAttendanceByProject(appid,token,prjId);
//findTeamByProjectId(appid,token,prjId);
//findProContractorByProjectId(appid,token,prjId);
//getJobTypeData(appid,token,"0");
@ -323,6 +323,7 @@ public class AttendanceJgwTask {
for(int i=0;i<arr.size();i++) {
JSONObject json = arr.getJSONObject(i);
String photo=json.getString("signimg");
System.out.println(json.getString("machineType"));
String photoUrl=getPhoto(appId,token,photo);
SurProjectAttendanceData sdata = SurProjectAttendanceData.createFromJgw(json);
sdata.setScanPhoto(photoUrl);

View File

@ -0,0 +1,151 @@
<?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.yanzhu.jh.base.mapper.BaseMagDetailMapper">
<resultMap type="BaseMagDetail" id="BaseMagDetailResult">
<result property="id" column="id" />
<result property="magid" column="magid" />
<result property="topic" column="topic" />
<result property="title" column="title" />
<result property="deptid" column="deptid" />
<result property="authorName" column="authorName" />
<result property="authorPhone" column="authorPhone" />
<result property="ord" column="ord" />
<result property="images" column="images" />
<result property="content" column="content" />
<result property="remark" column="remark" />
<result property="isDel" column="is_del" />
<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="name" column="name"/>
<result property="deptName" column="deptName"/>
<result property="topicName" column="topicName"/>
</resultMap>
<sql id="selectBaseMagDetailVo">
select * from (select a.id,
a.magid,
a.topic,
a.title,
a.deptid,
a.authorName,
a.authorPhone,
a.ord,
a.images,
a.content,
a.remark,
a.is_del,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
b.name,
c.dept_name deptName,
d.dict_label topicName
FROM base_mag_detail a,
base_mag b,
sys_dept c,
sys_dict_data d
WHERE a.magid = b.id
AND a.deptid = c.dept_id
AND a.topic = d.dict_value
AND d.dict_type = 'base_mag_topic') base_mag_detail
</sql>
<select id="selectBaseMagDetailList" parameterType="BaseMagDetail" resultMap="BaseMagDetailResult">
<include refid="selectBaseMagDetailVo"/>
<where>
<if test="magid != null "> and magid = #{magid}</if>
<if test="topic != null "> and topic = #{topic}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="deptid != null "> and deptid = #{deptid}</if>
<if test="authorName != null and authorName != ''"> and authorName like concat('%', #{authorName}, '%')</if>
<if test="authorPhone != null and authorPhone != ''"> and authorPhone = #{authorPhone}</if>
<if test="ord != null "> and ord = #{ord}</if>
<if test="images != null and images != ''"> and images = #{images}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="isDel != null "> and is_del = #{isDel}</if>
</where>
order by ord desc,create_time desc
</select>
<select id="selectBaseMagDetailById" parameterType="Long" resultMap="BaseMagDetailResult">
<include refid="selectBaseMagDetailVo"/>
where id = #{id}
</select>
<insert id="insertBaseMagDetail" parameterType="BaseMagDetail" useGeneratedKeys="true" keyProperty="id">
insert into base_mag_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="magid != null">magid,</if>
<if test="topic != null">topic,</if>
<if test="title != null">title,</if>
<if test="deptid != null">deptid,</if>
<if test="authorName != null">authorName,</if>
<if test="authorPhone != null">authorPhone,</if>
<if test="ord != null">ord,</if>
<if test="images != null">images,</if>
<if test="content != null">content,</if>
<if test="remark != null">remark,</if>
<if test="isDel != null">is_del,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="magid != null">#{magid},</if>
<if test="topic != null">#{topic},</if>
<if test="title != null">#{title},</if>
<if test="deptid != null">#{deptid},</if>
<if test="authorName != null">#{authorName},</if>
<if test="authorPhone != null">#{authorPhone},</if>
<if test="ord != null">#{ord},</if>
<if test="images != null">#{images},</if>
<if test="content != null">#{content},</if>
<if test="remark != null">#{remark},</if>
<if test="isDel != null">#{isDel},</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>
</trim>
</insert>
<update id="updateBaseMagDetail" parameterType="BaseMagDetail">
update base_mag_detail
<trim prefix="SET" suffixOverrides=",">
<if test="magid != null">magid = #{magid},</if>
<if test="topic != null">topic = #{topic},</if>
<if test="title != null">title = #{title},</if>
<if test="deptid != null">deptid = #{deptid},</if>
<if test="authorName != null">authorName = #{authorName},</if>
<if test="authorPhone != null">authorPhone = #{authorPhone},</if>
<if test="ord != null">ord = #{ord},</if>
<if test="images != null">images = #{images},</if>
<if test="content != null">content = #{content},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isDel != null">is_del = #{isDel},</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>
</trim>
where id = #{id}
</update>
<delete id="deleteBaseMagDetailById" parameterType="Long">
delete from base_mag_detail where id = #{id}
</delete>
<delete id="deleteBaseMagDetailByIds" parameterType="String">
delete from base_mag_detail where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,92 @@
<?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.yanzhu.jh.base.mapper.BaseMagMapper">
<resultMap type="BaseMag" id="BaseMagResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="imgs" column="imgs" />
<result property="ord" column="ord" />
<result property="remark" column="remark" />
<result property="isDel" column="is_del" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectBaseMagVo">
select id, name, imgs, ord, remark, is_del, create_by, create_time, update_by, update_time from base_mag
</sql>
<select id="selectBaseMagList" parameterType="BaseMag" resultMap="BaseMagResult">
<include refid="selectBaseMagVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="imgs != null and imgs != ''"> and imgs = #{imgs}</if>
<if test="ord != null "> and ord = #{ord}</if>
<if test="isDel != null "> and is_del = #{isDel}</if>
</where>
order by ord desc,create_time desc
</select>
<select id="selectBaseMagById" parameterType="Long" resultMap="BaseMagResult">
<include refid="selectBaseMagVo"/>
where id = #{id}
</select>
<insert id="insertBaseMag" parameterType="BaseMag" useGeneratedKeys="true" keyProperty="id">
insert into base_mag
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="imgs != null">imgs,</if>
<if test="ord != null">ord,</if>
<if test="remark != null">remark,</if>
<if test="isDel != null">is_del,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="imgs != null">#{imgs},</if>
<if test="ord != null">#{ord},</if>
<if test="remark != null">#{remark},</if>
<if test="isDel != null">#{isDel},</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>
</trim>
</insert>
<update id="updateBaseMag" parameterType="BaseMag">
update base_mag
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="imgs != null">imgs = #{imgs},</if>
<if test="ord != null">ord = #{ord},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isDel != null">is_del = #{isDel},</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>
</trim>
where id = #{id}
</update>
<delete id="deleteBaseMagById" parameterType="Long">
delete from base_mag where id = #{id}
</delete>
<delete id="deleteBaseMagByIds" parameterType="String">
delete from base_mag where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,87 @@
<?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.yanzhu.jh.base.mapper.BaseWorkingCommitteeMapper">
<resultMap type="BaseWorkingCommittee" id="BaseWorkingCommitteeResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="files" column="files" />
<result property="ord" column="ord" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectBaseWorkingCommitteeVo">
select id, name, files, ord, remark, create_by, create_time, update_by, update_time from base_working_committee
</sql>
<select id="selectBaseWorkingCommitteeList" parameterType="BaseWorkingCommittee" resultMap="BaseWorkingCommitteeResult">
<include refid="selectBaseWorkingCommitteeVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="files != null and files != ''"> and files = #{files}</if>
<if test="ord != null "> and ord = #{ord}</if>
</where>
order by ord desc,create_by desc
</select>
<select id="selectBaseWorkingCommitteeById" parameterType="Long" resultMap="BaseWorkingCommitteeResult">
<include refid="selectBaseWorkingCommitteeVo"/>
where id = #{id}
</select>
<insert id="insertBaseWorkingCommittee" parameterType="BaseWorkingCommittee" useGeneratedKeys="true" keyProperty="id">
insert into base_working_committee
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="files != null">files,</if>
<if test="ord != null">ord,</if>
<if test="remark != null">remark,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="files != null">#{files},</if>
<if test="ord != null">#{ord},</if>
<if test="remark != null">#{remark},</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>
</trim>
</insert>
<update id="updateBaseWorkingCommittee" parameterType="BaseWorkingCommittee">
update base_working_committee
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="files != null">files = #{files},</if>
<if test="ord != null">ord = #{ord},</if>
<if test="remark != null">remark = #{remark},</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>
</trim>
where id = #{id}
</update>
<delete id="deleteBaseWorkingCommitteeById" parameterType="Long">
delete from base_working_committee where id = #{id}
</delete>
<delete id="deleteBaseWorkingCommitteeByIds" parameterType="String">
delete from base_working_committee where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
<if test="serverid != null "> and serverid = #{serverid}</if>
<if test="workerId != null "> and workerId = #{workerId}</if>
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) =date(#{attendanceTime})</if>
<if test="attendanceTime != null and attendanceTime != ''"> and ( date(attendance_time) =date(#{attendanceTime}) or date(attendance_out_time) =date(#{attendanceTime}))</if>
<if test="identification != null and identification != ''"> and identification = #{identification}</if>
<if test="teamId != null "> and teamId = #{teamId}</if>
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
@ -375,7 +375,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by g.companyTypeId
</select>
<select id="getHuazhuPage" parameterType="long" resultType="Long">
<select id="getHuazhuPage" parameterType="SurProjectAttendanceData" resultType="Long">
select max(vendorId) vendorId from sur_project_attendance_data_${year} WHERE cfgid=#{id}
</select>

View File

@ -0,0 +1,96 @@
<?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.yanzhu.jh.project.mapper.SurProjectWorkingCommitteeMapper">
<resultMap type="SurProjectWorkingCommittee" id="SurProjectWorkingCommitteeResult">
<result property="id" column="id" />
<result property="committeeId" column="committeeId" />
<result property="projectId" column="projectId" />
<result property="workingType" column="workingType" />
<result property="costName" column="costName" />
<result property="money" column="money" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectSurProjectWorkingCommitteeVo">
select id, committeeId, projectId, workingType, costName, money, remark, create_by, create_time, update_by, update_time from sur_project_working_committee
</sql>
<select id="selectSurProjectWorkingCommitteeList" parameterType="SurProjectWorkingCommittee" resultMap="SurProjectWorkingCommitteeResult">
<include refid="selectSurProjectWorkingCommitteeVo"/>
<where>
<if test="committeeId != null "> and committeeId = #{committeeId}</if>
<if test="projectId != null "> and projectId = #{projectId}</if>
<if test="workingType != null "> and workingType = #{workingType}</if>
<if test="costName != null and costName != ''"> and costName like concat('%', #{costName}, '%')</if>
<if test="money != null "> and money = #{money}</if>
</where>
</select>
<select id="selectSurProjectWorkingCommitteeById" parameterType="Long" resultMap="SurProjectWorkingCommitteeResult">
<include refid="selectSurProjectWorkingCommitteeVo"/>
where id = #{id}
</select>
<insert id="insertSurProjectWorkingCommittee" parameterType="SurProjectWorkingCommittee" useGeneratedKeys="true" keyProperty="id">
insert into sur_project_working_committee
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="committeeId != null">committeeId,</if>
<if test="projectId != null">projectId,</if>
<if test="workingType != null">workingType,</if>
<if test="costName != null">costName,</if>
<if test="money != null">money,</if>
<if test="remark != null">remark,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="committeeId != null">#{committeeId},</if>
<if test="projectId != null">#{projectId},</if>
<if test="workingType != null">#{workingType},</if>
<if test="costName != null">#{costName},</if>
<if test="money != null">#{money},</if>
<if test="remark != null">#{remark},</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>
</trim>
</insert>
<update id="updateSurProjectWorkingCommittee" parameterType="SurProjectWorkingCommittee">
update sur_project_working_committee
<trim prefix="SET" suffixOverrides=",">
<if test="committeeId != null">committeeId = #{committeeId},</if>
<if test="projectId != null">projectId = #{projectId},</if>
<if test="workingType != null">workingType = #{workingType},</if>
<if test="costName != null">costName = #{costName},</if>
<if test="money != null">money = #{money},</if>
<if test="remark != null">remark = #{remark},</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>
</trim>
where id = #{id}
</update>
<delete id="deleteSurProjectWorkingCommitteeById" parameterType="Long">
delete from sur_project_working_committee where id = #{id}
</delete>
<delete id="deleteSurProjectWorkingCommitteeByIds" parameterType="String">
delete from sur_project_working_committee where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>