Commit b3bb0953 authored by 赵啸非's avatar 赵啸非

添加根据区域编码查询基础事项

parent ffb8e2f1
...@@ -14,29 +14,29 @@ ...@@ -14,29 +14,29 @@
> >
</div> </div>
<div slot="right" class="flex"> <div slot="right" class="flex">
<!-- <el-select <el-select
v-model="department" v-model="department"
size="small" size="small"
class="autoWidth" class="autoWidth"
placeholder="选择部门" placeholder="选择部门"
> >
<template slot="prefix"> <template slot="prefix">
{{ (deptList.find((v) => v.id === department) || {}).name }} {{ (deptList.find((v) => v.deptNumber === department) || {}).name }}
</template> </template>
<el-option <el-option
v-for="item in deptList" v-for="item in deptList"
:key="item.id" :key="item.deptNumber"
:label="item.name" :label="item.name"
:value="item.id" :value="item.deptNumber"
> >
</el-option> </el-option>
</el-select>--> </el-select>
<el-input <el-input
size="small" size="small"
v-model="searchVal" v-model="searchVal"
style="width: 200px" style="width: 200px"
class="ml10 mr10" class="ml10 mr10"
placeholder="请输入事项名称搜索" placeholder="请输入材料名称搜索"
></el-input> ></el-input>
<el-button size="small" type="primary" @click="handleSearch" <el-button size="small" type="primary" @click="handleSearch"
>搜索</el-button >搜索</el-button
...@@ -70,9 +70,9 @@ ...@@ -70,9 +70,9 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
label="部门编号" label="部门名称"
align="center" align="center"
prop="deptCode" prop="deptName"
width="160" width="160"
> >
</el-table-column> </el-table-column>
...@@ -136,6 +136,7 @@ ...@@ -136,6 +136,7 @@
import TableHeader from "@/components/TableHeader.vue"; import TableHeader from "@/components/TableHeader.vue";
import PreviewMaterals from "./modal/PreviewMaterals.vue"; import PreviewMaterals from "./modal/PreviewMaterals.vue";
import { getPubdatumList,delPubdatum } from "@/api/libray"; import { getPubdatumList,delPubdatum } from "@/api/libray";
import { mapGetters } from "vuex";
export default { export default {
components: { components: {
TableHeader, TableHeader,
...@@ -161,9 +162,9 @@ export default { ...@@ -161,9 +162,9 @@ export default {
created() { created() {
this.getPbuList(); this.getPbuList();
}, },
// computed: { computed: {
// ...mapGetters(["deptList"]), ...mapGetters(["deptList"]),
// }, },
methods: { methods: {
// 系统事项列表 // 系统事项列表
async getPbuList() { async getPbuList() {
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
class="autoWidth" class="autoWidth"
> >
<template slot="prefix"> <template slot="prefix">
{{ (deptList.find((v) => v.id === departmentLeft) || {}).name }} {{ (deptList.find((v) => v.deptNumber === departmentLeft) || {}).name }}
</template> </template>
<el-option <el-option
v-for="item in deptList" v-for="item in deptList"
:key="item.id" :key="item.deptNumber"
:label="item.name" :label="item.name"
:value="item.id" :value="item.deptNumber"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -68,9 +68,9 @@ ...@@ -68,9 +68,9 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
label="部门编号" label="部门名称"
align="center" align="center"
prop="deptCode" prop="deptName"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -189,9 +189,9 @@ ...@@ -189,9 +189,9 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
label="部门编码" label="部门名称"
align="center" align="center"
prop="deptCode" prop="deptName"
> >
</el-table-column> </el-table-column>
<el-table-column prop="name" show-overflow-tooltip label="材料名称"> <el-table-column prop="name" show-overflow-tooltip label="材料名称">
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
class="autoWidth" class="autoWidth"
> >
<template slot="prefix"> <template slot="prefix">
{{ (deptList.find((v) => v.deptCode === departmentLeft) || {}).name }} {{ (deptList.find((v) => v.deptNumber === departmentLeft) || {}).name }}
</template> </template>
<el-option <el-option
v-for="item in deptList" v-for="item in deptList"
...@@ -72,9 +72,9 @@ ...@@ -72,9 +72,9 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
label="部门编号" label="部门名称"
align="center" align="center"
prop="deptCode" prop="deptName"
> >
</el-table-column> </el-table-column>
<el-table-column prop="matterName" show-overflow-tooltip label="事项名称"> <el-table-column prop="matterName" show-overflow-tooltip label="事项名称">
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
> >
<template slot="prefix"> <template slot="prefix">
{{ {{
(deptList.find((v) => v.deptCode === departmentRight) || {}).name (deptList.find((v) => v.deptNumber === departmentRight) || {}).name
}} }}
</template> </template>
<el-option <el-option
...@@ -223,9 +223,9 @@ ...@@ -223,9 +223,9 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
label="部门编号" label="部门名称"
align="center" align="center"
prop="deptCode" prop="deptName"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
......
...@@ -124,7 +124,8 @@ CREATE TABLE mortals_xhx_matter_datum( ...@@ -124,7 +124,8 @@ CREATE TABLE mortals_xhx_matter_datum(
`matterId` bigint(20) COMMENT '事项matter id', `matterId` bigint(20) COMMENT '事项matter id',
`siteId` bigint(20) COMMENT '站点ID', `siteId` bigint(20) COMMENT '站点ID',
`deptId` bigint(20) COMMENT '部门ID', `deptId` bigint(20) COMMENT '部门ID',
`deptCode` varchar(64) COMMENT '部门编号', `deptCode` varchar(256) COMMENT '部门编号',
`deptName` varchar(256) COMMENT '部门名称',
`materialName` varchar(1024) NOT NULL COMMENT '材料名', `materialName` varchar(1024) NOT NULL COMMENT '材料名',
`materiaFullName` varchar(1024) NOT NULL COMMENT '材料全名', `materiaFullName` varchar(1024) NOT NULL COMMENT '材料全名',
`source` tinyint(2) COMMENT '事项来源(0.政务网,1.自定义)', `source` tinyint(2) COMMENT '事项来源(0.政务网,1.自定义)',
...@@ -142,16 +143,18 @@ CREATE TABLE mortals_xhx_matter_datum( ...@@ -142,16 +143,18 @@ CREATE TABLE mortals_xhx_matter_datum(
-- ---------------------------- -- ----------------------------
-- 事项材料公共库表 -- 事项材料公共库表
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_pubdatum`; DROP TABLE IF EXISTS `mortals_xhx_pubdatum`;
CREATE TABLE mortals_xhx_pubdatum CREATE TABLE mortals_xhx_pubdatum(
(
`id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`matterId` bigint(20) COMMENT '事项matter id', `matterId` bigint(20) COMMENT '事项matter id',
`deptId` bigint(20) COMMENT '部门ID', `deptId` bigint(20) COMMENT '部门ID',
`deptCode` varchar(64) COMMENT '部门编号', `deptCode` varchar(256) COMMENT '部门编号',
`deptName` varchar(256) COMMENT '部门名称',
`materialName` varchar(1024) NOT NULL COMMENT '材料名', `materialName` varchar(1024) NOT NULL COMMENT '材料名',
`materiaFullName` varchar(1024) NOT NULL COMMENT '材料全名', `materiaFullName` varchar(1024) NOT NULL COMMENT '材料全名',
`total` int(8) COMMENT '填单次数', `total` int(8) COMMENT '填单次数',
...@@ -171,3 +174,5 @@ CREATE TABLE mortals_xhx_pubdatum ...@@ -171,3 +174,5 @@ CREATE TABLE mortals_xhx_pubdatum
...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterDatumVo; ...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterDatumVo;
* 事项申请材料业务实体对象 * 事项申请材料业务实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-11-11 * @date 2022-11-17
*/ */
public class MatterDatumEntity extends MatterDatumVo { public class MatterDatumEntity extends MatterDatumVo {
...@@ -32,6 +32,10 @@ public class MatterDatumEntity extends MatterDatumVo { ...@@ -32,6 +32,10 @@ public class MatterDatumEntity extends MatterDatumVo {
* 部门编号 * 部门编号
*/ */
private String deptCode; private String deptCode;
/**
* 部门名称
*/
private String deptName;
/** /**
* 材料名 * 材料名
*/ */
...@@ -128,6 +132,20 @@ public class MatterDatumEntity extends MatterDatumVo { ...@@ -128,6 +132,20 @@ public class MatterDatumEntity extends MatterDatumVo {
public void setDeptCode(String deptCode){ public void setDeptCode(String deptCode){
this.deptCode = deptCode; this.deptCode = deptCode;
} }
/**
* 获取 部门名称
* @return String
*/
public String getDeptName(){
return deptName;
}
/**
* 设置 部门名称
* @param deptName
*/
public void setDeptName(String deptName){
this.deptName = deptName;
}
/** /**
* 获取 材料名 * 获取 材料名
* @return String * @return String
...@@ -280,6 +298,7 @@ public class MatterDatumEntity extends MatterDatumVo { ...@@ -280,6 +298,7 @@ public class MatterDatumEntity extends MatterDatumVo {
sb.append(",siteId:").append(getSiteId()); sb.append(",siteId:").append(getSiteId());
sb.append(",deptId:").append(getDeptId()); sb.append(",deptId:").append(getDeptId());
sb.append(",deptCode:").append(getDeptCode()); sb.append(",deptCode:").append(getDeptCode());
sb.append(",deptName:").append(getDeptName());
sb.append(",materialName:").append(getMaterialName()); sb.append(",materialName:").append(getMaterialName());
sb.append(",materiaFullName:").append(getMateriaFullName()); sb.append(",materiaFullName:").append(getMateriaFullName());
sb.append(",source:").append(getSource()); sb.append(",source:").append(getSource());
...@@ -302,6 +321,8 @@ public class MatterDatumEntity extends MatterDatumVo { ...@@ -302,6 +321,8 @@ public class MatterDatumEntity extends MatterDatumVo {
this.deptCode = ""; this.deptCode = "";
this.deptName = "";
this.materialName = ""; this.materialName = "";
this.materiaFullName = ""; this.materiaFullName = "";
......
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumEntity;
* 事项申请材料业务查询对象 * 事项申请材料业务查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-11-11 * @date 2022-11-17
*/ */
public class MatterDatumQuery extends MatterDatumEntity { public class MatterDatumQuery extends MatterDatumEntity {
/** 开始 主键,自增长 */ /** 开始 主键,自增长 */
...@@ -60,6 +60,9 @@ public class MatterDatumQuery extends MatterDatumEntity { ...@@ -60,6 +60,9 @@ public class MatterDatumQuery extends MatterDatumEntity {
/** 部门编号 */ /** 部门编号 */
private List<String> deptCodeList; private List<String> deptCodeList;
/** 部门名称 */
private List<String> deptNameList;
/** 材料名 */ /** 材料名 */
private List<String> materialNameList; private List<String> materialNameList;
...@@ -426,6 +429,21 @@ public class MatterDatumQuery extends MatterDatumEntity { ...@@ -426,6 +429,21 @@ public class MatterDatumQuery extends MatterDatumEntity {
public void setDeptCodeList(List<String> deptCodeList){ public void setDeptCodeList(List<String> deptCodeList){
this.deptCodeList = deptCodeList; this.deptCodeList = deptCodeList;
} }
/**
* 获取 部门名称
* @return deptNameList
*/
public List<String> getDeptNameList(){
return this.deptNameList;
}
/**
* 设置 部门名称
* @param deptNameList
*/
public void setDeptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
}
/** /**
* 获取 材料名 * 获取 材料名
* @return materialNameList * @return materialNameList
...@@ -1085,6 +1103,25 @@ public class MatterDatumQuery extends MatterDatumEntity { ...@@ -1085,6 +1103,25 @@ public class MatterDatumQuery extends MatterDatumEntity {
} }
/**
* 设置 部门名称
* @param deptName
*/
public MatterDatumQuery deptName(String deptName){
setDeptName(deptName);
return this;
}
/**
* 设置 部门名称
* @param deptNameList
*/
public MatterDatumQuery deptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
return this;
}
/** /**
* 设置 材料名 * 设置 材料名
* @param materialName * @param materialName
......
...@@ -96,6 +96,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -96,6 +96,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
matterEntity.initAttrValue(); matterEntity.initAttrValue();
matterEntity.setSiteId(siteId); matterEntity.setSiteId(siteId);
matterEntity.setDeptCode(sheetMatterEntity.getDeptCode()); matterEntity.setDeptCode(sheetMatterEntity.getDeptCode());
matterEntity.setDeptName(sheetMatterEntity.getDeptName());
matterEntity.setTid(sheetMatterEntity.getTid()); matterEntity.setTid(sheetMatterEntity.getTid());
matterEntity.setTcode(sheetMatterEntity.getTcode()); matterEntity.setTcode(sheetMatterEntity.getTcode());
matterEntity.setTname(sheetMatterEntity.getTname()); matterEntity.setTname(sheetMatterEntity.getTname());
......
...@@ -7,11 +7,11 @@ import com.mortals.framework.annotation.Excel; ...@@ -7,11 +7,11 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.pubdatum.model.vo.PubdatumVo; import com.mortals.xhx.module.pubdatum.model.vo.PubdatumVo;
/** /**
* 事项材料公共库实体对象 * 事项材料公共库实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-11-10 * @date 2022-11-17
*/ */
public class PubdatumEntity extends PubdatumVo { public class PubdatumEntity extends PubdatumVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -28,6 +28,10 @@ public class PubdatumEntity extends PubdatumVo { ...@@ -28,6 +28,10 @@ public class PubdatumEntity extends PubdatumVo {
* 部门编号 * 部门编号
*/ */
private String deptCode; private String deptCode;
/**
* 部门名称
*/
private String deptName;
/** /**
* 材料名 * 材料名
*/ */
...@@ -102,6 +106,20 @@ public class PubdatumEntity extends PubdatumVo { ...@@ -102,6 +106,20 @@ public class PubdatumEntity extends PubdatumVo {
public void setDeptCode(String deptCode){ public void setDeptCode(String deptCode){
this.deptCode = deptCode; this.deptCode = deptCode;
} }
/**
* 获取 部门名称
* @return String
*/
public String getDeptName(){
return deptName;
}
/**
* 设置 部门名称
* @param deptName
*/
public void setDeptName(String deptName){
this.deptName = deptName;
}
/** /**
* 获取 材料名 * 获取 材料名
* @return String * @return String
...@@ -225,6 +243,7 @@ public class PubdatumEntity extends PubdatumVo { ...@@ -225,6 +243,7 @@ public class PubdatumEntity extends PubdatumVo {
sb.append(",matterId:").append(getMatterId()); sb.append(",matterId:").append(getMatterId());
sb.append(",deptId:").append(getDeptId()); sb.append(",deptId:").append(getDeptId());
sb.append(",deptCode:").append(getDeptCode()); sb.append(",deptCode:").append(getDeptCode());
sb.append(",deptName:").append(getDeptName());
sb.append(",materialName:").append(getMaterialName()); sb.append(",materialName:").append(getMaterialName());
sb.append(",materiaFullName:").append(getMateriaFullName()); sb.append(",materiaFullName:").append(getMateriaFullName());
sb.append(",total:").append(getTotal()); sb.append(",total:").append(getTotal());
...@@ -243,6 +262,8 @@ public class PubdatumEntity extends PubdatumVo { ...@@ -243,6 +262,8 @@ public class PubdatumEntity extends PubdatumVo {
this.deptCode = ""; this.deptCode = "";
this.deptName = "";
this.materialName = ""; this.materialName = "";
this.materiaFullName = ""; this.materiaFullName = "";
......
...@@ -3,11 +3,11 @@ package com.mortals.xhx.module.pubdatum.model; ...@@ -3,11 +3,11 @@ package com.mortals.xhx.module.pubdatum.model;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.pubdatum.model.PubdatumEntity; import com.mortals.xhx.module.pubdatum.model.PubdatumEntity;
/** /**
* 事项材料公共库查询对象 * 事项材料公共库查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-11-10 * @date 2022-11-17
*/ */
public class PubdatumQuery extends PubdatumEntity { public class PubdatumQuery extends PubdatumEntity {
/** 开始 主键,自增长 */ /** 开始 主键,自增长 */
private Long idStart; private Long idStart;
...@@ -48,6 +48,9 @@ public class PubdatumQuery extends PubdatumEntity { ...@@ -48,6 +48,9 @@ public class PubdatumQuery extends PubdatumEntity {
/** 部门编号 */ /** 部门编号 */
private List<String> deptCodeList; private List<String> deptCodeList;
/** 部门名称 */
private List<String> deptNameList;
/** 材料名 */ /** 材料名 */
private List<String> materialNameList; private List<String> materialNameList;
...@@ -326,6 +329,21 @@ public class PubdatumQuery extends PubdatumEntity { ...@@ -326,6 +329,21 @@ public class PubdatumQuery extends PubdatumEntity {
public void setDeptCodeList(List<String> deptCodeList){ public void setDeptCodeList(List<String> deptCodeList){
this.deptCodeList = deptCodeList; this.deptCodeList = deptCodeList;
} }
/**
* 获取 部门名称
* @return deptNameList
*/
public List<String> getDeptNameList(){
return this.deptNameList;
}
/**
* 设置 部门名称
* @param deptNameList
*/
public void setDeptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
}
/** /**
* 获取 材料名 * 获取 材料名
* @return materialNameList * @return materialNameList
...@@ -812,6 +830,25 @@ public class PubdatumQuery extends PubdatumEntity { ...@@ -812,6 +830,25 @@ public class PubdatumQuery extends PubdatumEntity {
} }
/**
* 设置 部门名称
* @param deptName
*/
public PubdatumQuery deptName(String deptName){
setDeptName(deptName);
return this;
}
/**
* 设置 部门名称
* @param deptNameList
*/
public PubdatumQuery deptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
return this;
}
/** /**
* 设置 材料名 * 设置 材料名
* @param materialName * @param materialName
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<result property="siteId" column="siteId" /> <result property="siteId" column="siteId" />
<result property="deptId" column="deptId" /> <result property="deptId" column="deptId" />
<result property="deptCode" column="deptCode" /> <result property="deptCode" column="deptCode" />
<result property="deptName" column="deptName" />
<result property="materialName" column="materialName" /> <result property="materialName" column="materialName" />
<result property="materiaFullName" column="materiaFullName" /> <result property="materiaFullName" column="materiaFullName" />
<result property="source" column="source" /> <result property="source" column="source" />
...@@ -44,6 +45,9 @@ ...@@ -44,6 +45,9 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptCode') or colPickMode == 1 and data.containsKey('deptCode')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptCode') or colPickMode == 1 and data.containsKey('deptCode')))">
a.deptCode, a.deptCode,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
a.deptName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialName') or colPickMode == 1 and data.containsKey('materialName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialName') or colPickMode == 1 and data.containsKey('materialName')))">
a.materialName, a.materialName,
</if> </if>
...@@ -85,18 +89,18 @@ ...@@ -85,18 +89,18 @@
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterDatumEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterDatumEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_matter_datum insert into mortals_xhx_matter_datum
(matterId,siteId,deptId,deptCode,materialName,materiaFullName,source,isRecommend,total,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime) (matterId,siteId,deptId,deptCode,deptName,materialName,materiaFullName,source,isRecommend,total,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime)
VALUES VALUES
(#{matterId},#{siteId},#{deptId},#{deptCode},#{materialName},#{materiaFullName},#{source},#{isRecommend},#{total},#{sort},#{sampleName},#{samplePath},#{preViewPath},#{createTime},#{createUserId},#{updateTime}) (#{matterId},#{siteId},#{deptId},#{deptCode},#{deptName},#{materialName},#{materiaFullName},#{source},#{isRecommend},#{total},#{sort},#{sampleName},#{samplePath},#{preViewPath},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_matter_datum insert into mortals_xhx_matter_datum
(matterId,siteId,deptId,deptCode,materialName,materiaFullName,source,isRecommend,total,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime) (matterId,siteId,deptId,deptCode,deptName,materialName,materiaFullName,source,isRecommend,total,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.siteId},#{item.deptId},#{item.deptCode},#{item.materialName},#{item.materiaFullName},#{item.source},#{item.isRecommend},#{item.total},#{item.sort},#{item.sampleName},#{item.samplePath},#{item.preViewPath},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.matterId},#{item.siteId},#{item.deptId},#{item.deptCode},#{item.deptName},#{item.materialName},#{item.materiaFullName},#{item.source},#{item.isRecommend},#{item.total},#{item.sort},#{item.sampleName},#{item.samplePath},#{item.preViewPath},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -127,6 +131,9 @@ ...@@ -127,6 +131,9 @@
<if test="(colPickMode==0 and data.containsKey('deptCode')) or (colPickMode==1 and !data.containsKey('deptCode'))"> <if test="(colPickMode==0 and data.containsKey('deptCode')) or (colPickMode==1 and !data.containsKey('deptCode'))">
a.deptCode=#{data.deptCode}, a.deptCode=#{data.deptCode},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
a.deptName=#{data.deptName},
</if>
<if test="(colPickMode==0 and data.containsKey('materialName')) or (colPickMode==1 and !data.containsKey('materialName'))"> <if test="(colPickMode==0 and data.containsKey('materialName')) or (colPickMode==1 and !data.containsKey('materialName'))">
a.materialName=#{data.materialName}, a.materialName=#{data.materialName},
</if> </if>
...@@ -233,6 +240,13 @@ ...@@ -233,6 +240,13 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="deptName=(case" suffix="ELSE deptName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))">
when a.id=#{item.id} then #{item.deptName}
</if>
</foreach>
</trim>
<trim prefix="materialName=(case" suffix="ELSE materialName end),"> <trim prefix="materialName=(case" suffix="ELSE materialName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('materialName')) or (colPickMode==1 and !item.containsKey('materialName'))"> <if test="(colPickMode==0 and item.containsKey('materialName')) or (colPickMode==1 and !item.containsKey('materialName'))">
...@@ -543,6 +557,21 @@ ...@@ -543,6 +557,21 @@
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('deptName')">
<if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''">
${_conditionType_} a.deptName like #{${_conditionParam_}.deptName}
</if>
<if test="conditionParamRef.deptName == null">
${_conditionType_} a.deptName is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptNameList')">
${_conditionType_} a.deptName in
<foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('materialName')"> <if test="conditionParamRef.containsKey('materialName')">
<if test="conditionParamRef.materialName != null and conditionParamRef.materialName != ''"> <if test="conditionParamRef.materialName != null and conditionParamRef.materialName != ''">
${_conditionType_} a.materialName like #{${_conditionParam_}.materialName} ${_conditionType_} a.materialName like #{${_conditionParam_}.materialName}
...@@ -790,6 +819,11 @@ ...@@ -790,6 +819,11 @@
<if test='orderCol.deptCode != null and "DESC".equalsIgnoreCase(orderCol.deptCode)'>DESC</if> <if test='orderCol.deptCode != null and "DESC".equalsIgnoreCase(orderCol.deptCode)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('deptName')">
a.deptName
<if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('materialName')"> <if test="orderCol.containsKey('materialName')">
a.materialName a.materialName
<if test='orderCol.materialName != null and "DESC".equalsIgnoreCase(orderCol.materialName)'>DESC</if> <if test='orderCol.materialName != null and "DESC".equalsIgnoreCase(orderCol.materialName)'>DESC</if>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.pubdatum.dao.ibatis.PubdatumDaoImpl"> <mapper namespace="com.mortals.xhx.module.pubdatum.dao.ibatis.PubdatumDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<result property="matterId" column="matterId" /> <result property="matterId" column="matterId" />
<result property="deptId" column="deptId" /> <result property="deptId" column="deptId" />
<result property="deptCode" column="deptCode" /> <result property="deptCode" column="deptCode" />
<result property="deptName" column="deptName" />
<result property="materialName" column="materialName" /> <result property="materialName" column="materialName" />
<result property="materiaFullName" column="materiaFullName" /> <result property="materiaFullName" column="materiaFullName" />
<result property="total" column="total" /> <result property="total" column="total" />
...@@ -38,6 +39,9 @@ ...@@ -38,6 +39,9 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptCode') or colPickMode == 1 and data.containsKey('deptCode')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptCode') or colPickMode == 1 and data.containsKey('deptCode')))">
a.deptCode, a.deptCode,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
a.deptName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialName') or colPickMode == 1 and data.containsKey('materialName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialName') or colPickMode == 1 and data.containsKey('materialName')))">
a.materialName, a.materialName,
</if> </if>
...@@ -73,18 +77,18 @@ ...@@ -73,18 +77,18 @@
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="PubdatumEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="PubdatumEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_pubdatum insert into mortals_xhx_pubdatum
(matterId,deptId,deptCode,materialName,materiaFullName,total,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime) (matterId,deptId,deptCode,deptName,materialName,materiaFullName,total,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime)
VALUES VALUES
(#{matterId},#{deptId},#{deptCode},#{materialName},#{materiaFullName},#{total},#{sort},#{sampleName},#{samplePath},#{preViewPath},#{createTime},#{createUserId},#{updateTime}) (#{matterId},#{deptId},#{deptCode},#{deptName},#{materialName},#{materiaFullName},#{total},#{sort},#{sampleName},#{samplePath},#{preViewPath},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_pubdatum insert into mortals_xhx_pubdatum
(matterId,deptId,deptCode,materialName,materiaFullName,total,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime) (matterId,deptId,deptCode,deptName,materialName,materiaFullName,total,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.deptId},#{item.deptCode},#{item.materialName},#{item.materiaFullName},#{item.total},#{item.sort},#{item.sampleName},#{item.samplePath},#{item.preViewPath},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.matterId},#{item.deptId},#{item.deptCode},#{item.deptName},#{item.materialName},#{item.materiaFullName},#{item.total},#{item.sort},#{item.sampleName},#{item.samplePath},#{item.preViewPath},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -109,6 +113,9 @@ ...@@ -109,6 +113,9 @@
<if test="(colPickMode==0 and data.containsKey('deptCode')) or (colPickMode==1 and !data.containsKey('deptCode'))"> <if test="(colPickMode==0 and data.containsKey('deptCode')) or (colPickMode==1 and !data.containsKey('deptCode'))">
a.deptCode=#{data.deptCode}, a.deptCode=#{data.deptCode},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
a.deptName=#{data.deptName},
</if>
<if test="(colPickMode==0 and data.containsKey('materialName')) or (colPickMode==1 and !data.containsKey('materialName'))"> <if test="(colPickMode==0 and data.containsKey('materialName')) or (colPickMode==1 and !data.containsKey('materialName'))">
a.materialName=#{data.materialName}, a.materialName=#{data.materialName},
</if> </if>
...@@ -191,6 +198,13 @@ ...@@ -191,6 +198,13 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="deptName=(case" suffix="ELSE deptName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))">
when a.id=#{item.id} then #{item.deptName}
</if>
</foreach>
</trim>
<trim prefix="materialName=(case" suffix="ELSE materialName end),"> <trim prefix="materialName=(case" suffix="ELSE materialName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('materialName')) or (colPickMode==1 and !item.containsKey('materialName'))"> <if test="(colPickMode==0 and item.containsKey('materialName')) or (colPickMode==1 and !item.containsKey('materialName'))">
...@@ -456,6 +470,21 @@ ...@@ -456,6 +470,21 @@
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('deptName')">
<if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''">
${_conditionType_} a.deptName like #{${_conditionParam_}.deptName}
</if>
<if test="conditionParamRef.deptName == null">
${_conditionType_} a.deptName is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptNameList')">
${_conditionType_} a.deptName in
<foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('materialName')"> <if test="conditionParamRef.containsKey('materialName')">
<if test="conditionParamRef.materialName != null and conditionParamRef.materialName != ''"> <if test="conditionParamRef.materialName != null and conditionParamRef.materialName != ''">
${_conditionType_} a.materialName like #{${_conditionParam_}.materialName} ${_conditionType_} a.materialName like #{${_conditionParam_}.materialName}
...@@ -656,6 +685,11 @@ ...@@ -656,6 +685,11 @@
<if test='orderCol.deptCode != null and "DESC".equalsIgnoreCase(orderCol.deptCode)'>DESC</if> <if test='orderCol.deptCode != null and "DESC".equalsIgnoreCase(orderCol.deptCode)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('deptName')">
a.deptName
<if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('materialName')"> <if test="orderCol.containsKey('materialName')">
a.materialName a.materialName
<if test='orderCol.materialName != null and "DESC".equalsIgnoreCase(orderCol.materialName)'>DESC</if> <if test='orderCol.materialName != null and "DESC".equalsIgnoreCase(orderCol.materialName)'>DESC</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment