提交代码
parent
08bf19fc38
commit
5210d86ae1
|
@ -1,6 +1,6 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询项目部门在册人员列表
|
||||
// 查询在岗人员列表
|
||||
export function listProjectDeptWroks(query) {
|
||||
return request({
|
||||
url: '/project/projectDeptWroks/list',
|
||||
|
@ -25,7 +25,7 @@ export function unitList(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询项目部门在册人员详细
|
||||
// 查询在岗人员详细
|
||||
export function getProjectDeptWroks(id) {
|
||||
return request({
|
||||
url: '/project/projectDeptWroks/' + id,
|
||||
|
@ -33,7 +33,7 @@ export function getProjectDeptWroks(id) {
|
|||
})
|
||||
}
|
||||
|
||||
// 新增项目部门在册人员
|
||||
// 新增在岗人员
|
||||
export function addProjectDeptWroks(data) {
|
||||
return request({
|
||||
url: '/project/projectDeptWroks',
|
||||
|
@ -42,7 +42,7 @@ export function addProjectDeptWroks(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 修改项目部门在册人员
|
||||
// 修改在岗人员
|
||||
export function updateProjectDeptWroks(data) {
|
||||
return request({
|
||||
url: '/project/projectDeptWroks',
|
||||
|
@ -51,7 +51,7 @@ export function updateProjectDeptWroks(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 删除项目部门在册人员
|
||||
// 删除在岗人员
|
||||
export function delProjectDeptWroks(id) {
|
||||
return request({
|
||||
url: '/project/projectDeptWroks/' + id,
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input
|
||||
v-model="queryParams.projectId"
|
||||
|
@ -18,7 +25,9 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<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>
|
||||
|
@ -32,7 +41,8 @@
|
|||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:projectDeptWroks:add']"
|
||||
>新增</el-button>
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -43,7 +53,8 @@
|
|||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['project:projectDeptWroks:edit']"
|
||||
>修改</el-button>
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -54,7 +65,8 @@
|
|||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['project:projectDeptWroks:remove']"
|
||||
>删除</el-button>
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -64,12 +76,17 @@
|
|||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['project:projectDeptWroks:export']"
|
||||
>导出</el-button>
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="projectDeptWroksList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="projectDeptWroksList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="项目主键" align="center" prop="projectId" />
|
||||
|
@ -86,27 +103,29 @@
|
|||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['project:projectDeptWroks:edit']"
|
||||
>修改</el-button>
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:projectDeptWroks:remove']"
|
||||
>删除</el-button>
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
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="项目主键" prop="projectId">
|
||||
|
@ -137,7 +156,13 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listProjectDeptWroks, getProjectDeptWroks, delProjectDeptWroks, addProjectDeptWroks, updateProjectDeptWroks } from "@/api/project/projectDeptWroks";
|
||||
import {
|
||||
listProjectDeptWroks,
|
||||
getProjectDeptWroks,
|
||||
delProjectDeptWroks,
|
||||
addProjectDeptWroks,
|
||||
updateProjectDeptWroks,
|
||||
} from "@/api/project/projectDeptWroks";
|
||||
|
||||
export default {
|
||||
name: "ProjectDeptWroks",
|
||||
|
@ -155,7 +180,7 @@ export default {
|
|||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目部门在册人员表格数据
|
||||
// 在岗人员表格数据
|
||||
projectDeptWroksList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
|
@ -172,23 +197,19 @@ export default {
|
|||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
projectId: [
|
||||
{ required: true, message: "项目主键不能为空", trigger: "blur" }
|
||||
],
|
||||
deptId: [
|
||||
{ required: true, message: "部门主键不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
projectId: [{ required: true, message: "项目主键不能为空", trigger: "blur" }],
|
||||
deptId: [{ required: true, message: "部门主键不能为空", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目部门在册人员列表 */
|
||||
/** 查询在岗人员列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProjectDeptWroks(this.queryParams).then(response => {
|
||||
listProjectDeptWroks(this.queryParams).then((response) => {
|
||||
this.projectDeptWroksList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
@ -212,7 +233,7 @@ export default {
|
|||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
remark: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
@ -228,38 +249,38 @@ export default {
|
|||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
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.title = "添加在岗人员";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getProjectDeptWroks(id).then(response => {
|
||||
const id = row.id || this.ids;
|
||||
getProjectDeptWroks(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改项目部门在册人员";
|
||||
this.title = "修改在岗人员";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateProjectDeptWroks(this.form).then(response => {
|
||||
updateProjectDeptWroks(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProjectDeptWroks(this.form).then(response => {
|
||||
addProjectDeptWroks(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
@ -271,19 +292,27 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除项目部门在册人员编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delProjectDeptWroks(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
this.$modal
|
||||
.confirm('是否确认删除在岗人员编号为"' + ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delProjectDeptWroks(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('project/projectDeptWroks/export', {
|
||||
...this.queryParams
|
||||
}, `projectDeptWroks_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
this.download(
|
||||
"project/projectDeptWroks/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`projectDeptWroks_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -416,7 +416,7 @@
|
|||
command="handleProjectDeptWroks"
|
||||
icon="el-icon-s-custom"
|
||||
v-hasPermi="['project:projectDeptWroks:list']"
|
||||
>在册人员管理</el-dropdown-item
|
||||
>在岗人员管理</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item
|
||||
command="handleProjectAttendance"
|
||||
|
|
|
@ -202,6 +202,11 @@
|
|||
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="办理时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
@ -244,13 +249,15 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改项目保险对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="部门主键" prop="deptId">
|
||||
<el-input v-model="form.deptId" placeholder="请输入部门主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="保险类型" prop="insuranceType">
|
||||
<el-select v-model="form.insuranceType" placeholder="请选择保险类型">
|
||||
<el-select
|
||||
v-model="form.insuranceType"
|
||||
placeholder="请选择保险类型"
|
||||
:disabled="form.id != null"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sur_project_insurance_type"
|
||||
:key="dict.value"
|
||||
|
@ -259,41 +266,15 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="保险公司" prop="companyName">
|
||||
<el-input v-model="form.companyName" placeholder="请输入保险公司" />
|
||||
</el-form-item>
|
||||
<el-form-item label="保保单号" prop="insuranceNumber">
|
||||
<el-input v-model="form.insuranceNumber" placeholder="请输入保保单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="保险合同" prop="insuranceFile">
|
||||
<file-upload v-model="form.insuranceFile" />
|
||||
</el-form-item>
|
||||
<el-form-item label="保险状态" prop="insuranceState">
|
||||
<el-input v-model="form.insuranceState" placeholder="请输入保险状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="保险生效时间" prop="beginDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.beginDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择保险生效时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="保险截至时间" prop="endDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.endDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择保险截至时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="保险公司" prop="companyName">
|
||||
<el-input v-model="form.companyName" placeholder="请输入保险公司" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据状态" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入数据状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
|
@ -369,6 +350,7 @@ export default {
|
|||
insuranceNumber: [
|
||||
{ required: true, message: "请输入保险单编号", trigger: "blur" },
|
||||
],
|
||||
insuranceFile: [{ required: true, message: "请上传保险合同", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<el-table-column label="保险单号" align="center" prop="insuranceNumber" />
|
||||
<el-table-column label="办理时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.endDate, "{y}-{m}-{d} {H}:{i}") }}</span>
|
||||
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -120,6 +120,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="保险类型" prop="insuranceType">
|
||||
<el-select
|
||||
:disabled="form.id != null"
|
||||
v-model="form.insuranceType"
|
||||
placeholder="请选择保险类型"
|
||||
style="width: 100%"
|
||||
|
@ -187,6 +188,7 @@ export default {
|
|||
insuranceNumber: [
|
||||
{ required: true, message: "请输入保险单编号", trigger: "blur" },
|
||||
],
|
||||
insuranceFile: [{ required: true, message: "请上传保险合同", trigger: "blur" }],
|
||||
},
|
||||
surProjectInsuranceList: [],
|
||||
activeName: "",
|
||||
|
@ -320,15 +322,15 @@ export default {
|
|||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.form.projectName = this.project.projectName;
|
||||
this.nodes.forEach((item) => {
|
||||
if (item.unitId == this.activeName) {
|
||||
this.form.deptName = item.unitName;
|
||||
}
|
||||
});
|
||||
const id = row.id || this.ids;
|
||||
getSurProjectInsurance(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.form.projectName = this.project.projectName;
|
||||
this.nodes.forEach((item) => {
|
||||
if (item.unitId == this.activeName) {
|
||||
this.form.deptName = item.unitName;
|
||||
}
|
||||
});
|
||||
this.open = true;
|
||||
this.title = "修改项目保险";
|
||||
});
|
||||
|
@ -355,12 +357,16 @@ export default {
|
|||
});
|
||||
} else {
|
||||
addSurProjectInsurance(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
if (
|
||||
response.code == 200 &&
|
||||
response.data &&
|
||||
response.data.resultCode == "-1"
|
||||
) {
|
||||
this.$message.error("当前项目单位已办理该保险,请勿重复办理!!");
|
||||
} else {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error("当前项目单位已办理该保险,请勿重复办理!!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.yanzhu.jh.project.controller;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
@ -103,7 +105,14 @@ public class SurProjectInsuranceController extends BaseController
|
|||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SurProjectInsurance surProjectInsurance)
|
||||
{
|
||||
return toAjax(surProjectInsuranceService.insertSurProjectInsurance(surProjectInsurance));
|
||||
int res = surProjectInsuranceService.insertSurProjectInsurance(surProjectInsurance);
|
||||
if(res<0){
|
||||
Map<String,Object> data = new HashMap<>();
|
||||
data.put("resultCode",res);
|
||||
return success(data);
|
||||
}else{
|
||||
return toAjax(res);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -76,4 +76,12 @@ public interface SurProjectInsuranceMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectInsuranceByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询保险是否已办理
|
||||
*
|
||||
* @param surProjectInsurance 查询条件
|
||||
* @return 结果
|
||||
*/
|
||||
public int findInsuranceByParams(SurProjectInsurance surProjectInsurance);
|
||||
}
|
||||
|
|
|
@ -88,13 +88,8 @@ public class SurProjectInsuranceServiceImpl implements ISurProjectInsuranceServi
|
|||
surProjectInsurance.setIsDel(PublicStateEnum.OK.getCode());
|
||||
int res = -1;
|
||||
//效验保险是否已办理
|
||||
SurProjectInsurance _search = new SurProjectInsurance();
|
||||
_search.setIsDel(surProjectInsurance.getIsDel());
|
||||
_search.setInsuranceType(surProjectInsurance.getInsuranceType());
|
||||
_search.setProjectId(surProjectInsurance.getProjectId());
|
||||
_search.setDeptId(surProjectInsurance.getDeptId());
|
||||
List<SurProjectInsurance> list = surProjectInsuranceMapper.selectSurProjectInsuranceList(_search);
|
||||
if(list!=null && list.size()>0){
|
||||
int total = surProjectInsuranceMapper.findInsuranceByParams(surProjectInsurance);
|
||||
if(total>0){
|
||||
return res;
|
||||
}
|
||||
return surProjectInsuranceMapper.insertSurProjectInsurance(surProjectInsurance);
|
||||
|
|
|
@ -61,19 +61,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectBgscreenDeptWroksList" parameterType="SurProjectDeptWroks" resultMap="SurProjectDeptWroksResult">
|
||||
SELECT
|
||||
<if test="projectId != null ">spdw.project_id,</if>
|
||||
<if test="deptId != null and projectId == null ">spdw.dept_id,</if>
|
||||
<if test="deptId != null and projectId == null ">sp.deptId as dept_id,</if>
|
||||
SUM(spdw.service_personnel) AS service_personnel,
|
||||
SUM(spdw.supervisor_personnel) AS supervisor_personnel,
|
||||
SUM(spdw.contractor_personnel) AS contractor_personnel
|
||||
FROM
|
||||
sur_project_dept_wroks spdw
|
||||
left join sur_project sp on spdw.project_id=sp.id
|
||||
<where>
|
||||
and spdw.is_del=0
|
||||
<if test="projectId != null "> and spdw.project_id = #{projectId}</if>
|
||||
<if test="deptId != null "> and spdw.dept_id = #{deptId}</if>
|
||||
<if test="deptId != null "> and sp.deptId = #{deptId}</if>
|
||||
</where>
|
||||
<if test="projectId != null "> group by spdw.project_id</if>
|
||||
<if test="deptId != null and projectId == null"> group by spdw.dept_id</if>
|
||||
<if test="deptId != null and projectId == null"> group by sp.deptId</if>
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectDeptWroksById" parameterType="Long" resultMap="SurProjectDeptWroksResult">
|
||||
|
|
|
@ -225,4 +225,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="findInsuranceByParams" parameterType="SurProjectInsurance" resultType="int">
|
||||
select count(1) as total from sur_project_insurance where is_del=0 and project_id = #{projectId} and dept_id = #{deptId} and insurance_type = #{insuranceType}
|
||||
</select>
|
||||
</mapper>
|
|
@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="deptId != null "> and spwa.dept_id = #{deptId}</if>
|
||||
<if test="deptName != null and deptName != ''"> and d.dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="params.beginWorkDate != null and params.beginWorkDate != '' and params.endWorkDate != null and params.endWorkDate != ''"> and spwa.work_date between #{params.beginWorkDate} and #{params.endWorkDate}</if>
|
||||
<if test="workDate != null"> and DATE_FORMAT(spwa.work_date,'%Y-%m-%d')=DATE_FORMAT(#{workDate},'%Y-%m-%d')</if>
|
||||
<if test="workDate != null"> and date(spwa.work_date)=date(#{workDate})</if>
|
||||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<!--子部门数据-->
|
||||
|
|
|
@ -59,8 +59,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select DISTINCT spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
|
||||
<if test='nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
|
||||
<if test='activeName == "wgq"'> and date(spwp.credential_expiration_time) <![CDATA[ < ]]> date(NOW())</if>
|
||||
<if test='activeName == "ygq"'> and date(spwp.credential_expiration_time) <![CDATA[ >= ]]> date(NOW())</if>
|
||||
<if test='activeName == "wgq"'> and date(spwp.credential_expiration_time) <![CDATA[ > ]]> date(NOW())</if>
|
||||
<if test='activeName == "ygq"'> and date(spwp.credential_expiration_time) <![CDATA[ <= ]]> date(NOW())</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sur_project sp on sp.id = spwp.project_id
|
||||
<where>
|
||||
and spwp.is_del=0
|
||||
and date(spwp.credential_expiration_time) <![CDATA[ < ]]> date(NOW())
|
||||
and date(spwp.credential_expiration_time) <![CDATA[ <= ]]> date(NOW())
|
||||
<if test="projectId != null "> and spwp.project_id = #{projectId}</if>
|
||||
<if test="deptId != null "> and spwp.dept_id = #{deptId}</if>
|
||||
<if test="name != null and name != ''"> and spwp.name like concat('%', #{name}, '%')</if>
|
||||
|
@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sur_project sp on sp.id = spwp.project_id
|
||||
<where>
|
||||
and spwp.is_del=0
|
||||
and date(spwp.credential_expiration_time) <![CDATA[ >= ]]> date(NOW())
|
||||
and date(spwp.credential_expiration_time) <![CDATA[ > ]]> date(NOW())
|
||||
<if test="projectId != null "> and spwp.project_id = #{projectId}</if>
|
||||
<if test="deptId != null "> and spwp.dept_id = #{deptId}</if>
|
||||
<if test="name != null and name != ''"> and spwp.name like concat('%', #{name}, '%')</if>
|
||||
|
|
Loading…
Reference in New Issue