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

Merge remote-tracking branch 'origin/master'

parents 2deadd67 0e7b74a2
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,11 +2,11 @@ import http from "../request/http"; ...@@ -2,11 +2,11 @@ import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.10.1. 查询应用服务列表 // 1.10.1. 查询应用服务列表
export function serviceList(params) { export function serviceList(params) {
return http.post(`${baseURL}/zwfw/system/service/list`, params); return http.post(`${baseURL}/zwfw/product/apps/list`, params);
} }
// 1.10.2. 查看应用服务 // 1.10.2. 查看应用服务
export function serviceInfo(params) { export function serviceInfo(params) {
return http.get(`${baseURL}/zwfw/system/service/info`, params); return http.get(`${baseURL}/zwfw/product/document/list`, params);
} }
// 1.10.3. 保存更新应用服务 // 1.10.3. 保存更新应用服务
export function serviceSave(params) { export function serviceSave(params) {
......
...@@ -194,3 +194,11 @@ export function getImpossibleInfo(params) { ...@@ -194,3 +194,11 @@ export function getImpossibleInfo(params) {
export function getKqalert(params) { export function getKqalert(params) {
return http.get(`${BASEURL}/admin/kqalert/list`, params); return http.get(`${BASEURL}/admin/kqalert/list`, params);
} }
/**
* 查询设备告警日志列表
*/
// 查询设备告警日志列表
export function getInfoList(params) {
return http.post(`${baseURL}/m/device/alarm/info/list`, params);
}
...@@ -414,6 +414,15 @@ const routes = [ ...@@ -414,6 +414,15 @@ const routes = [
), ),
meta: { title: "12345拨打记录报表" }, meta: { title: "12345拨打记录报表" },
}, },
{
path: "letterRecordForm",
name: "letterRecordForm",
component: () =>
import(
/* webpackChunkName: "letterRecordForm" */ "@/views/dataAdmin/components/networkGovernance/letterRecordForm.vue"
),
meta: { title: "12345写信记录报表" },
},
], ],
}, },
], ],
......
...@@ -2,19 +2,23 @@ ...@@ -2,19 +2,23 @@
<div class="PoliticsShow-Container"> <div class="PoliticsShow-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="primary" class="addclass" @click="exportTable"> <a-button type="primary" class="addclass" @click="handleExportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<span>告警次数:<i>256次</i></span> <!-- <span>告警次数:<i>256次</i></span>
<span>危险:<i>200次</i></span> <span>危险:<i>200次</i></span>
<span>次要:<i>65次</i></span> <span>次要:<i>65次</i></span>
<span>一般:<i>0次</i></span> <span>一般:<i>0次</i></span> -->
</div> </div>
<span> <span>
<a-input allowClear v-model="searchName" placeholder="请输入设备名称查询"> <a-input
allowClear
v-model="searchName"
placeholder="请输入设备名称查询"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-select default-value="001"> <a-select v-model="alarmType" style="margin: 0 10px">
<!-- <a-select-option <!-- <a-select-option
v-for="(item, index) of selectOptions" v-for="(item, index) of selectOptions"
:key="index" :key="index"
...@@ -23,10 +27,10 @@ ...@@ -23,10 +27,10 @@
{{ item.label }} {{ item.label }}
</a-select-option> --> </a-select-option> -->
<a-select-option value="001"> 内容001 </a-select-option> <a-select-option value=""> 全部 </a-select-option>
<a-select-option value="002"> 内容002 </a-select-option> <a-select-option value="0"> 离线 </a-select-option>
</a-select> </a-select>
<a-select default-value="001"> <a-select v-model="status">
<!-- <a-select-option <!-- <a-select-option
v-for="(item, index) of selectOptions" v-for="(item, index) of selectOptions"
:key="index" :key="index"
...@@ -35,31 +39,49 @@ ...@@ -35,31 +39,49 @@
{{ item.label }} {{ item.label }}
</a-select-option> --> </a-select-option> -->
<a-select-option value="001"> 状态001 </a-select-option> <a-select-option value="">全部状态</a-select-option>
<a-select-option value="002"> 状态002 </a-select-option> <a-select-option value="0"> 未清除 </a-select-option>
<a-select-option value="1"> 清除未确认 </a-select-option>
<a-select-option value="2"> 清除已确认 </a-select-option>
</a-select> </a-select>
<a-range-picker format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange" <a-range-picker
v-model="BegindAndEndTime"> format="YYYY-MM-DD"
class="range_picker_style"
@change="rangePickerChange"
style="margin: 0 10px"
>
</a-range-picker> </a-range-picker>
<a-button type="primary" class="addclass" >搜索</a-button> <a-button type="primary" class="addclass" @click="search"
>搜索</a-button
>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableSourceData"> :scroll="{ y: 490 }"
<template slot="告警级别" slot-scope="text, record, index"> :pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="alarmLevel" slot-scope="text, record, index">
<span class="levelState">{{ text }}</span> <span class="levelState">{{ text }}</span>
</template> </template>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="openDetails">查看详情{{ record.id }}</a-button> <a-button type="link" @click="openDetails(record)">查看详情</a-button>
</template> </template>
</a-table> </a-table>
<Details ref="Details" /> <Details ref="Details" :msg="detailInfo" />
</div> </div>
</div> </div>
</template> </template>
...@@ -67,11 +89,16 @@ ...@@ -67,11 +89,16 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import Details from "./components/Details.vue"; import Details from "./components/Details.vue";
import { getInfoList } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVuePoliticsShow", name: "PortalAdminVuePoliticsShow",
data() { data() {
return { return {
detailInfo: {},
status: "",
alarmType: "",
BegindAndEndTime: [], BegindAndEndTime: [],
tableHeaders: [ tableHeaders: [
{ {
...@@ -85,42 +112,60 @@ export default { ...@@ -85,42 +112,60 @@ export default {
{ {
title: "告警时间", title: "告警时间",
align: "center", align: "center",
dataIndex: "告警时间", customRender: (record) => {
return record.alarmTime
? this.timestampToTime(record.alarmTime)
: "--";
},
}, },
{ {
title: "设备名称", title: "设备名称",
align: "center", align: "center",
dataIndex: "设备名称", customRender: (record) => {
return record.deviceName ? record.deviceName : "--";
},
}, },
{ {
title: "告警内容", title: "告警内容",
align: "center", align: "center",
dataIndex: "告警内容", dataIndex: "alarmContent",
}, },
{ {
title: "告警级别", title: "告警级别",
align: "center", align: "center",
dataIndex: "告警级别", customRender: (record) => {
scopedSlots: { return record.alarmLevel == 0
customRender: "告警级别", ? "危险"
: record.alarmLevel == 1
? "次要"
: record.alarmLevel == 2
? "一般"
: "--";
}, },
}, },
{ {
title: "接收人员", title: "接收人员",
align: "center", align: "center",
dataIndex: "接收人员", dataIndex: "alarmReceivePersonnel",
}, },
{ {
title: "告警状态", title: "告警状态",
align: "center", align: "center",
dataIndex: "告警状态", customRender: (record) => {
return record.alarmStatus == 0
? "未清除"
: record.alarmStatus == 1
? "清除未确认"
: record.alarmStatus == 1
? "清除已确认"
: "--";
},
}, },
{ {
title: "操作", title: "操作",
align: "center", align: "center",
width: "110px", width: "110px",
dataIndex: "operation",
scopedSlots: { scopedSlots: {
customRender: "operation", customRender: "operation",
}, },
...@@ -133,22 +178,58 @@ export default { ...@@ -133,22 +178,58 @@ export default {
Details, Details,
}, },
mounted() { mounted() {
console.log(this.tablePagination);
this.setMoment(); this.setMoment();
for (let key = 0; key < 20; key++) { this.getData();
this.tableSourceData.push({
id: `00${key + 1}`,
告警时间: `2022-06-16 10:00:00${key + 1}`,
设备名称: `一楼排队机${key + 1}`,
告警内容: `离线${key + 1}`,
告警级别: `危险${key + 1}`,
接收人员: `刘德华${key + 1}`,
告警状态: `清楚已确认${key + 1}`,
});
}
}, },
methods: { methods: {
rangePickerChange(val) { // 时间戳转换为日期
console.log(val); timestampToTime(timestamp) {
var date = new Date(timestamp);
var Y = date.getFullYear() + "-";
var M =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";
var D =
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
var h = date.getHours() + ":";
var m = date.getMinutes() + ":";
var s = date.getSeconds();
return Y + M + D + h + m + s;
},
// 获取数据源
getData() {
let data = {
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
deviceName: this.searchName,
alarmTimeStart: this.BegindAndEndTime[0],
alarmTimeEnd: this.BegindAndEndTime[1],
alarmStatus: this.status ? Number(this.status) : "",
alarmType: this.alarmType ? Number(this.alarmType) : "",
};
getInfoList(data).then((res) => {
if (res.code == 1) {
this.tableSourceData = res.data.data;
this.tablePagination.total = res.data.total;
}
});
},
// 搜索
search() {
this.tablePagination.current = 1;
this.getData();
},
// 页面跳转
pagTableChange(pagination) {
this.tablePagination = pagination;
this.getData();
},
rangePickerChange(date, dateString) {
this.BegindAndEndTime = dateString;
}, },
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
...@@ -161,9 +242,32 @@ export default { ...@@ -161,9 +242,32 @@ export default {
return "type0"; return "type0";
} }
}, },
openDetails() { openDetails(val) {
this.$refs.Details.modalInfo.title = "告警详情"; this.$refs.Details.modalInfo.title = "告警详情";
this.$refs.Details.modalInfo.visible = true; this.$refs.Details.modalInfo.visible = true;
let obj = JSON.parse(JSON.stringify(val));
obj.alarmStatus =
obj.alarmStatus == 0
? "未清除"
: obj.alarmStatus == 1
? "清除未确认"
: obj.alarmStatus == 1
? "清除已确认"
: "--";
obj.alarmLevel =
obj.alarmLevel == 0
? "危险"
: obj.alarmLevel == 1
? "次要"
: obj.alarmLevel == 2
? "一般"
: "--";
obj.alarmTime = this.timestampToTime(obj.alarmTime);
obj.updateTime = obj.updateTime
? this.timestampToTime(obj.updateTime)
: "--";
obj.updateUserId = obj.updateUserId ? obj.updateUserId : "--";
this.detailInfo = obj;
}, },
// 导出 // 导出
async handleExportTable() { async handleExportTable() {
...@@ -174,25 +278,98 @@ export default { ...@@ -174,25 +278,98 @@ export default {
data = this.$_.cloneDeep(this.tableSelectedRows); data = this.$_.cloneDeep(this.tableSelectedRows);
} else { } else {
let datas = this.$_.cloneDeep( let datas = this.$_.cloneDeep(
await getImpossible({ await getInfoList({
...this.queryform, deviceName: this.searchName,
alarmTimeStart: this.BegindAndEndTime[0],
alarmTimeEnd: this.BegindAndEndTime[1],
alarmStatus: this.status ? Number(this.status) : "",
alarmType: this.alarmType ? Number(this.alarmType) : "",
page: 1, page: 1,
size: -1 size: -1,
}) })
); );
this.btnLoading = false this.btnLoading = false;
data = datas.data.data data = datas.data.data;
if (!data.length) return; if (!data.length) return;
} }
const tHeader = [] const tHeader = [];
const filterVal = [] const filterVal = [];
this.tableHeaders.forEach(v=>{ data.forEach((v, i) => {
if(v.dataIndex){ v.index = i + 1;
tHeader.push(v.title) v.alarmTime = this.timestampToTime(v.alarmTime);
filterVal.push(v.dataIndex) v.alarmStatus =
v.alarmStatus == 0
? "未清除"
: v.alarmStatus == 1
? "清除未确认"
: v.alarmStatus == 1
? "清除已确认"
: "--";
v.alarmLevel =
v.alarmLevel == 0
? "危险"
: v.alarmLevel == 1
? "次要"
: v.alarmLevel == 2
? "一般"
: "--";
});
let tableHeaders = [
{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "告警时间",
align: "center",
dataIndex: "alarmTime",
},
{
title: "设备名称",
align: "center",
dataIndex: "deviceName",
},
{
title: "告警内容",
align: "center",
dataIndex: "alarmContent",
},
{
title: "告警级别",
align: "center",
dataIndex: "alarmLevel",
},
{
title: "接收人员",
align: "center",
dataIndex: "alarmReceivePersonnel",
},
{
title: "告警状态",
align: "center",
dataIndex: "alarmStatus",
},
{
title: "操作",
align: "center",
width: "110px",
scopedSlots: {
customRender: "operation",
},
},
];
tableHeaders.forEach((v) => {
if (v.dataIndex) {
tHeader.push(v.title);
filterVal.push(v.dataIndex);
} }
}) });
export2Excel( export2Excel(
tHeader, tHeader,
filterVal, filterVal,
...@@ -216,15 +393,15 @@ export default { ...@@ -216,15 +393,15 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
&>span { & > span {
margin-left: 10px; margin-left: 10px;
&>i { & > i {
margin: 0 5px; margin: 0 5px;
font-style: normal; font-style: normal;
} }
...@@ -258,6 +435,3 @@ export default { ...@@ -258,6 +435,3 @@ export default {
} }
} }
</style> </style>
...@@ -8,43 +8,48 @@ ...@@ -8,43 +8,48 @@
> >
<a-form-model <a-form-model
ref="ruleForm" ref="ruleForm"
:model="detailsForm" :model="msg"
:rules="detailsRules" :rules="detailsRules"
:label-col="{ span: 4 }" :label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }" :wrapper-col="{ span: 20 }"
> >
<a-form-model-item label="告警设备" prop="告警设备"> <a-form-model-item label="告警设备" prop="告警设备">
<a-input v-model="detailsForm.告警设备" placeholder="请输入" disabled /> <a-input v-model="msg.deviceName" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="告警时间" prop="告警时间"> <a-form-model-item label="告警时间" prop="告警时间">
<a-input v-model="detailsForm.告警时间" placeholder="请输入" disabled /> <a-input v-model="msg.alarmTime" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="告警内容" prop="告警内容"> <a-form-model-item label="告警内容" prop="告警内容">
<a-input v-model="detailsForm.告警内容" placeholder="请输入" disabled /> <a-input v-model="msg.alarmContent" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="告警程度" prop="告警程度"> <a-form-model-item label="告警程度" prop="告警程度">
<a-input v-model="detailsForm.告警程度" placeholder="请输入" disabled /> <a-input v-model="msg.alarmLevel" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="告警状态" prop="告警状态"> <a-form-model-item label="告警状态" prop="告警状态">
<a-input v-model="detailsForm.告警状态" placeholder="请输入" disabled /> <a-input v-model="msg.alarmStatus" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="接收人员" prop="接收人员"> <a-form-model-item label="接收人员" prop="接收人员">
<a-input v-model="detailsForm.接收人员" placeholder="请输入" disabled /> <a-input
v-model="msg.alarmReceivePersonnel"
placeholder="请输入"
disabled
/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="告警详情" prop="告警详情"> <a-form-model-item label="告警详情" prop="告警详情">
<a-textarea <a-textarea
v-model="detailsForm.告警详情" v-model="msg.alarmContent"
placeholder="请输入" placeholder="请输入"
:rows="4" :rows="4"
disabled
/> />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="清楚时间" prop="清楚时间"> <!-- <a-form-model-item label="清楚时间" prop="清楚时间">
<a-input v-model="detailsForm.清楚时间" placeholder="请输入" disabled /> <a-input v-model="msg.updateTime" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="清楚人员" prop="清楚人员"> <a-form-model-item label="清楚人员" prop="清楚人员">
<a-input v-model="detailsForm.清楚人员" placeholder="请输入" disabled /> <a-input v-model="msg.updateUserId" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item> -->
</a-form-model> </a-form-model>
</a-drawer> </a-drawer>
</template> </template>
...@@ -54,7 +59,9 @@ import modal from "../mixins/modal"; ...@@ -54,7 +59,9 @@ import modal from "../mixins/modal";
export default { export default {
mixins: [modal], mixins: [modal],
name: "PortalAdminVuePicWorks", name: "PortalAdminVuePicWorks",
props: {
msg: Object,
},
data() { data() {
return { return {
detailsForm: { detailsForm: {
...@@ -84,5 +91,3 @@ export default { ...@@ -84,5 +91,3 @@ export default {
overflow-x: hidden !important; overflow-x: hidden !important;
} }
</style> </style>
...@@ -45,11 +45,13 @@ ...@@ -45,11 +45,13 @@
:columns="tableHeaders" :dataSource="tableSourceData"> :columns="tableHeaders" :dataSource="tableSourceData">
<template slot="评价人照片" slot-scope="text"> <template slot="评价人照片" slot-scope="text">
<a-avatar v-if="!text || !baseurl" shape="square" :size="40" icon="user" /> <a-avatar v-if="!text || !baseurl" shape="square" :size="40" icon="user" />
<img v-else :src="baseurl + '/' + text" style="max-width: 100px; max-height: 100px" @click="$viewerApi({images:[baseurl + '/' + text]})"/> <img v-else :src="baseurl + '/' + text" style="max-width: 100px; max-height: 100px"
@click="$viewerApi({ images: [baseurl + '/' + text] })" />
</template> </template>
<template slot="操作" slot-scope="text, record"> <template slot="操作" slot-scope="text, record">
<a-button type="link" style="color: #ff7370" @click="handleDel(record.id)">删除</a-button> <a-button type="link" style="color: #ff7370" @click="handleDel(record.id)">删除</a-button>
<a-button type="link" @click="openHandlingDetails(record)">详情</a-button> <a-button type="link" @click="openHandlingDetails(record)"
v-if="record.queueid == 0 && record.pjxt != 1">详情</a-button>
</template> </template>
</a-table> </a-table>
<HandlingDetails ref="HandlingDetails" /> <HandlingDetails ref="HandlingDetails" />
...@@ -324,6 +326,7 @@ export default { ...@@ -324,6 +326,7 @@ export default {
}, },
//详情模块 //详情模块
openHandlingDetails(record) { openHandlingDetails(record) {
console.log(record)
// 判断为窗口屏或者其他状况,调用不同接口 // 判断为窗口屏或者其他状况,调用不同接口
if (record.pjxt == 1) { if (record.pjxt == 1) {
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
......
<template>
<div class="callRecord-Container">
<div class="header_box">
<div>
<a-button
:loading="btnLoading"
type="primary"
class="addclass"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<b
>写信次数:<i>{{ total }}</i></b
>
</div>
<span>
<a-select v-model="status" style="margin: 0 10px">
<a-select-option value=""> 全部类型 </a-select-option>
<a-select-option value="0"> 离线 </a-select-option>
</a-select>
<a-select v-model="source">
<a-select-option value=""> 全部来源 </a-select-option>
<a-select-option value="0"> 离线 </a-select-option>
</a-select>
<a-range-picker
format="YYYY-MM-DD"
class="range_picker_style"
@change="rangePickerChange"
style="margin: 0 10px"
>
</a-range-picker>
<a-input
style="width: 250px"
v-model="searchName"
placeholder="请输入标题或姓名关键字搜索"
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-button
type="primary"
class="addclass"
style="margin: 0 0 0 10px"
@click="getList"
>搜索</a-button
>
</span>
</div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange,
}"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="showDrawer(record)">详情</a-button>
</template>
</a-table>
</div>
<FormDetails
ref="FormDetails"
@onClose="onClose"
@showDrawer="showDrawer"
:visible="visible"
/>
</div>
</template>
<script>
import table from "@/mixins/table";
import { getSys12345 } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
export default {
mixins: [table],
name: "callRecordForm",
data() {
return {
status: "",
source: "",
tableHeaders: [
{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "工单编号",
align: "center",
dataIndex: "nickname",
customRender: (text, record, index) => `${record.nickname || "--"}`,
},
{
title: "信件标题",
align: "center",
dataIndex: "phone",
customRender: (text, record, index) => `${record.phone || "--"}`,
},
{
title: "信件类别",
align: "center",
dataIndex: "address",
customRender: (text, record, index) => `${record.address || "--"}`,
},
{
title: "姓名",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
},
{
title: "性别",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
},
{
title: "联系电话",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
},
{
title: "信件来源",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
},
{
title: "提交时间",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
},
{
title: "办理状态",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
},
{
title: "办理时间",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
},
{
title: "办理部门",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
},
{
title: "操作",
align: "center",
width: "110px",
scopedSlots: {
customRender: "operation",
},
},
],
btnLoading: false,
tableSelectedKeys: [],
tableSelectedRows: [],
BegindAndEndTime: [],
searchName: undefined,
visible: false,
total: 0,
};
},
components: {},
mounted() {
this.getList();
},
methods: {
getList() {
getSys12345({
phone: this.searchName,
}).then((res) => {
this.tableSourceData = res.data.data;
this.total = res.data.total;
});
},
rangePickerChange(val) {
console.log(val);
},
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
default:
return "type0";
}
},
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
1: "本地打印",
2: "在线提交",
};
let data = [];
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
// 深度克隆避免影响页面表格展示
data = this.$_.cloneDeep(this.tableSelectedRows);
data.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.type == keys) {
item.type = obj[keys];
}
});
});
} else {
let datas = this.$_.cloneDeep(
await getSys12345({
page: 1,
size: -1,
})
);
data = datas.data.data;
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.type == key) {
item.type = obj[key];
}
});
}
}
export2Excel(
this.tHeader,
this.filterVal,
data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
showDrawer(val) {
this.visible = true;
},
onClose() {
this.visible = false;
},
},
};
</script>
<style lang="less" scoped>
/deep/.ant-spin-container {
display: block;
}
.header_box {
padding-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
& > div {
display: flex;
justify-content: flex-start;
align-items: center;
b {
font-style: normal;
font-weight: unset;
font-size: 16px;
margin-left: 20px;
i {
color: #0595fd;
font-style: normal;
}
}
sub {
font-size: 14px;
font-style: normal;
bottom: unset;
margin-left: 20px;
}
}
}
.tabFont {
font-size: 12px;
font-weight: 300;
}
/deep/.ant-drawer-content {
background-color: #f3f4f5;
}
</style>
...@@ -4,11 +4,7 @@ ...@@ -4,11 +4,7 @@
<div class="search"> <div class="search">
<h1>应用服务</h1> <h1>应用服务</h1>
<div class="search-box"> <div class="search-box">
<a-input <a-input placeholder="请输入API名称搜索" v-model="searchVal" @pressEnter="handleSearch" />
placeholder="请输入API名称搜索"
v-model="searchVal"
@pressEnter="handleSearch"
/>
<button class="search_btn btn" @click="handleSearch"> <button class="search_btn btn" @click="handleSearch">
<span>{{ isSearch ? "重置" : "搜索" }}</span> <span>{{ isSearch ? "重置" : "搜索" }}</span>
</button> </button>
...@@ -19,93 +15,101 @@ ...@@ -19,93 +15,101 @@
<div class="stepbox" :style="{ height: contentHigh + 'px' }"> <div class="stepbox" :style="{ height: contentHigh + 'px' }">
<div class="_left"> <div class="_left">
<a-steps progress-dot direction="vertical"> <a-steps progress-dot direction="vertical">
<a-step <a-step v-for="(item, index) in listArr" :status="active === index ? 'process' : 'wait'" :key="index">
v-for="(item, index) in stepsList" <span slot="title" @click="handleChange(item, index)">{{ item.productName }}</span>
:status="active === index ? 'process' : 'wait'"
:key="index"
>
<span slot="title" @click="handleChange(item, index)">{{
item.serviceName
}}</span>
</a-step> </a-step>
</a-steps> </a-steps>
</div> </div>
<div class="_right"> <div class="_right">
<div class="list_box step_sign"> <div class="list_box step_sign">
<div class="title-box"> <div class="title-box">
<span class="list_title">{{ curInfo.serviceName }}</span> <span class="list_title">{{ listArr[active] ? listArr[active].productName : '--' }}</span>
<span class="count primary">{{ curInfo.count }}</span> <span class="count primary">{{ listArr[active].curInfo.length }}</span>
</div> </div>
<div <div v-if="listArr[active].curInfo.length > 0">
class="list flex aic jcb" <div class="list flex aic jcb " v-for="(i, j) in listArr[active].curInfo">
v-for="itm of curInfo.serviceList" <div class="app-name">{{ i.appName }}</div>
:key="itm.id" <img v-if="i.deveLanguage == 1" src="@/assets/images/JAVA.png" alt />
> <img v-if="i.deveLanguage == 2" src="@/assets/images/php.png" alt />
<div class="app-name">{{ itm.packageName }}</div> <img v-if="i.deveLanguage == 3" src="@/assets/images/Android.png" alt />
<img src="../../../assets/images/php.png" alt /> <img v-if="i.deveLanguage == 4" src="@/assets/images/Cshape.png" alt />
<div>{{ itm.packageVersion }}</div> <img v-if="i.deveLanguage == 5" src="@/assets/images/Cjj.jpg" alt />
<div class="">{{ itm.packageRemark }}</div> <div>V{{ i.versionNumber }}</div>
<div v-if="itm.lapseTime"> <div>{{ i.versionInfo }}</div>
失效时间:{{ $moment(itm.lapseTime).format("YYYY-MM-DD") }} <div v-if="i.createTime">
{{ $moment(i.createTime).format("YYYY-MM-DD") }}
</div> </div>
<a-button <a-button type="primary" class="addclass" @click="handleDowload(api + i.appFileUrl, i.appName)">
type="primary" class="addclass"
@click="handleDowload(itm.packagePath, itm.systemServiceName)"
>
<a-icon type="download" />下载 <a-icon type="download" />下载
</a-button> </a-button>
</div> </div>
</div> </div>
<div v-else>
<div class="list flex aic jcb ">
<div class="app-name"> 暂无数据</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { serviceList } from "@/api/applService.js"; import { serviceList, } from "@/api/applService.js";
import { getProduct, } from "@/api/thePlatformIsSet.js";
import common from "@/mixins/common"; import common from "@/mixins/common";
export default { export default {
name: "PortalAdminVueApplService", name: "PortalAdminVueApplService",
mixins: [common], mixins: [common],
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", listArr: [],
api: process.env.VUE_APP_API_IMG_URL,
searchVal: "", searchVal: "",
stepsList: [], stepsList: [],
active: 0, active: 0,
curInfo: {}, // 当前选中设备信息 curInfo: {}, // 当前选中设备信息
isSearch: false, isSearch: false,
}; };
}, },
created() { created() {
this.getServiceList(); this.getList()
}, },
mounted() { mounted() {
this.setContentHigh(); // this.setContentHigh();
}, },
methods: { methods: {
getServiceList() { getServiceList() {
serviceList({ serviceList({
page: 1, page: 1,
size: -1, //每页条数 size: -1, //每页条数
packageName: `%${this.searchVal}%`, appName: `%${this.searchVal}%`,
}).then((res) => { }).then((res) => {
let { code, data } = res; let { code, data, dict } = res;
if (code == 1) { if (code == 1) {
if (data.data.length) { if (data.data.length) {
this.stepsList = data.data; this.listArr.forEach(i => {
this.curInfo = data.data[0]; let arr = []
} else { data.data.forEach(k => {
this.curInfo = {}; if (i.id == k.productId) {
arr.push(k)
}
})
i.curInfo = arr
this.$nextTick()
})
} }
} }
}); });
}, },
handleSearch() { handleSearch() {
this.isSearch = !this.isSearch; this.isSearch = !this.isSearch;
if (this.isSearch) { if (this.isSearch) {
this.active = -1;
this.getServiceList(); this.getServiceList();
} else { } else {
this.searchVal = ""; this.searchVal = "";
...@@ -116,27 +120,62 @@ export default { ...@@ -116,27 +120,62 @@ export default {
// 切换设备 // 切换设备
handleChange(row, index) { handleChange(row, index) {
this.active = index; this.active = index;
this.curInfo = row;
this.searchVal = ""; this.searchVal = "";
}, },
handleDowload(url, systemServiceName) { handleDowload(url, systemServiceName) {
console.log(systemServiceName)
const a = document.createElement("a"); const a = document.createElement("a");
a.href = url; a.href = url;
a.download = systemServiceName; a.download = systemServiceName;
a.click(); a.click();
}, },
//获取列表
getList() {
getProduct({ page: 1, size: -1 }).then(res => {
res.data.data.forEach(i => {
i.curInfo = []
})
this.listArr = [...res.data.data]
console.log(this.listArr)
this.getServiceList();
})
}
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
.application .stepbox ._right .list>div {
width: 15%;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.application .stepbox ._right .list .app-name {
width: 15%;
text-align: left;
}
/deep/.ant-steps-dot .ant-steps-item-content,
.ant-steps-dot.ant-steps-small .ant-steps-item-content {
width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.application { .application {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background: #f5f5f5; background: #f5f5f5;
.appl_search { .appl_search {
height: 300px; height: 300px;
text-align: center; text-align: center;
...@@ -145,16 +184,19 @@ export default { ...@@ -145,16 +184,19 @@ export default {
background-size: cover; background-size: cover;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
h1 { h1 {
font-size: 2.4rem; font-size: 2.4rem;
color: #fff; color: #fff;
font-weight: bold; font-weight: bold;
padding: 4rem 0 2rem; padding: 4rem 0 2rem;
} }
.search-box { .search-box {
display: flex; display: flex;
align-items: center; align-items: center;
} }
/deep/.ant-input { /deep/.ant-input {
width: 30rem !important; width: 30rem !important;
margin-right: 2rem; margin-right: 2rem;
...@@ -180,7 +222,8 @@ export default { ...@@ -180,7 +222,8 @@ export default {
line-height: 42px; line-height: 42px;
padding: 0; padding: 0;
border: none; border: none;
& > span {
&>span {
position: relative; position: relative;
display: block; display: block;
width: 100%; width: 100%;
...@@ -224,8 +267,8 @@ export default { ...@@ -224,8 +267,8 @@ export default {
width: 100%; width: 100%;
} }
& > span:before, &>span:before,
& > span:after { &>span:after {
position: absolute; position: absolute;
content: ""; content: "";
left: 0; left: 0;
...@@ -238,21 +281,21 @@ export default { ...@@ -238,21 +281,21 @@ export default {
transition: all 0.3s ease; transition: all 0.3s ease;
} }
& > span:before { &>span:before {
width: 2px; width: 2px;
height: 0%; height: 0%;
} }
& > span:after { &>span:after {
height: 2px; height: 2px;
width: 0%; width: 0%;
} }
& > span:hover:before { &>span:hover:before {
height: 100%; height: 100%;
} }
& > span:hover:after { &>span:hover:after {
width: 100%; width: 100%;
} }
} }
...@@ -263,15 +306,18 @@ export default { ...@@ -263,15 +306,18 @@ export default {
width: 90%; width: 90%;
margin-left: 5%; margin-left: 5%;
display: flex; display: flex;
/deep/.ant-steps-item-content { /deep/.ant-steps-item-content {
cursor: pointer; cursor: pointer;
} }
._left { ._left {
width: 300px; width: 300px;
height: 100%; height: 100%;
padding: 20px; padding: 20px;
margin-right: 20px; margin-right: 20px;
overflow: auto; overflow: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 3px; width: 3px;
height: 3px; height: 3px;
...@@ -294,6 +340,7 @@ export default { ...@@ -294,6 +340,7 @@ export default {
height: 100%; height: 100%;
padding: 20px; padding: 20px;
overflow-y: auto; overflow-y: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 3px; width: 3px;
height: 3px; height: 3px;
...@@ -309,16 +356,20 @@ export default { ...@@ -309,16 +356,20 @@ export default {
border-radius: 3px; border-radius: 3px;
background: #fff; background: #fff;
} }
.title-box { .title-box {
font-size: 24px; font-size: 24px;
.list_title { .list_title {
margin-right: 10px; margin-right: 10px;
font-weight: 600; font-weight: 600;
} }
.count { .count {
font-weight: 600; font-weight: 600;
} }
} }
.list { .list {
width: 100%; width: 100%;
height: 80px; height: 80px;
...@@ -326,13 +377,16 @@ export default { ...@@ -326,13 +377,16 @@ export default {
padding: 0px 20px; padding: 0px 20px;
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
.app-name { .app-name {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
.service-name { .service-name {
font-size: 14px; font-size: 14px;
} }
img { img {
width: 40px; width: 40px;
height: 40px; height: 40px;
...@@ -340,28 +394,23 @@ export default { ...@@ -340,28 +394,23 @@ export default {
} }
} }
} }
&::before { &::before {
content: ""; content: "";
display: block; display: block;
width: 100%; width: 100%;
height: @headerH; height: @headerH;
background: rgb(59, 135, 255); background: rgb(59, 135, 255);
background: -moz-linear-gradient( background: -moz-linear-gradient(174deg,
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85% rgba(108, 53, 247, 1) 85%);
); background: -webkit-linear-gradient(174deg,
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85% rgba(108, 53, 247, 1) 85%);
); background: linear-gradient(174deg,
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85% rgba(108, 53, 247, 1) 85%);
); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1);
} }
} }
</style> </style>
\ No newline at end of file
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
<a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination" <a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination"
@change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData"> @change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData">
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" v-if="record.appFileUrl" <a-button type="link" v-if="record.appFileUrl" @click="handleDowload(record.appFileUrl)">下载应用</a-button>
@click="handleDowload(record.appFileUrl)">下载应用</a-button>
<a-button type="link" @click="openDetails(record)">编辑</a-button> <a-button type="link" @click="openDetails(record)">编辑</a-button>
<a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)"> <a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)">
<a-button type="link" style="color: #ff4420">删除</a-button> <a-button type="link" style="color: #ff4420">删除</a-button>
...@@ -43,6 +42,9 @@ ...@@ -43,6 +42,9 @@
import { getApps, deleteApps } from "@/api/thePlatformIsSet.js"; import { getApps, deleteApps } from "@/api/thePlatformIsSet.js";
import table from "@/mixins/table"; import table from "@/mixins/table";
import Details from "./components/Details.vue"; import Details from "./components/Details.vue";
let obj = {
}
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVueAlerting", name: "PortalAdminVueAlerting",
...@@ -66,6 +68,7 @@ export default { ...@@ -66,6 +68,7 @@ export default {
title: "开发语言", title: "开发语言",
align: "center", align: "center",
dataIndex: "deveLanguage", dataIndex: "deveLanguage",
customRender: (text, record, index) => this.dict.deveLanguage[text],
}, },
{ {
title: "版本", title: "版本",
...@@ -164,11 +167,12 @@ export default { ...@@ -164,11 +167,12 @@ export default {
handleDowload(url) { handleDowload(url) {
let arr = url.split('/') let arr = url.split('/')
const a = document.createElement("a"); const a = document.createElement("a");
a.href = process.env.VUE_APP_API_BASE_URL+'/' + url; a.href = process.env.VUE_APP_API_BASE_URL + '/' + url;
a.download = arr[arr.length - 1]; a.download = arr[arr.length - 1];
a.click(); a.click();
}, },
openDetails(item) { openDetails(item) {
if (item) { if (item) {
this.$refs.Details.modalInfo.title = "编辑应用"; this.$refs.Details.modalInfo.title = "编辑应用";
this.$refs.Details.getInfo(item.id) this.$refs.Details.getInfo(item.id)
...@@ -176,6 +180,17 @@ export default { ...@@ -176,6 +180,17 @@ export default {
this.$refs.Details.modalInfo.title = "新增应用"; this.$refs.Details.modalInfo.title = "新增应用";
} }
this.$refs.Details.modalInfo.visible = true; this.$refs.Details.modalInfo.visible = true;
//重置数据
this.$refs.Details.appForm = {
appName: "",
deveLanguage: undefined,
versionNumber: "",
versionInfo: "",
appFileUrl: "",
isEnable: false,
}
this.$refs.Details.uploadInfo.fileList = []
// this.$refs.Details.appForm.resetFields()
this.$refs.Details.modalInfo.width = "30%"; this.$refs.Details.modalInfo.width = "30%";
}, },
......
...@@ -82,11 +82,13 @@ export default { ...@@ -82,11 +82,13 @@ export default {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
getInfo(id) { getInfo(id) {
getAppsInfo({ id: id }).then(res => { getAppsInfo({ id: id }).then(res => {
res.data.isEnable = res.data.isEnable == 1 res.data.isEnable = res.data.isEnable == 1
res.data.deveLanguage = this.deveLanguage[res.data.deveLanguage]
this.appForm = res.data this.appForm = res.data
if (res.data.appFileUrl) { if (res.data.appFileUrl) {
this.uploadInfo.fileList = [ this.uploadInfo.fileList = [
......
...@@ -1608,7 +1608,7 @@ ...@@ -1608,7 +1608,7 @@
"@vue/vue-loader-v15@npm:vue-loader@^15.9.7": "@vue/vue-loader-v15@npm:vue-loader@^15.9.7":
version "15.10.1" version "15.10.1"
resolved "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.10.1.tgz" resolved "https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.1.tgz"
integrity sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA== integrity sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==
dependencies: dependencies:
"@vue/component-compiler-utils" "^3.1.0" "@vue/component-compiler-utils" "^3.1.0"
...@@ -6175,7 +6175,7 @@ vue-highlightjs@^1.3.3: ...@@ -6175,7 +6175,7 @@ vue-highlightjs@^1.3.3:
vue-hot-reload-api@^2.3.0: vue-hot-reload-api@^2.3.0:
version "2.3.4" version "2.3.4"
resolved "https://registry.npmmirror.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz" resolved "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz"
integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog== integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==
vue-loader@^17.0.0: vue-loader@^17.0.0:
......
...@@ -84,3 +84,6 @@ CREATE TABLE `mortals_xhx_product_document` ( ...@@ -84,3 +84,6 @@ CREATE TABLE `mortals_xhx_product_document` (
`updateTime` datetime DEFAULT NULL COMMENT '更新时间', `updateTime` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品资料表'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品资料表';
ALTER TABLE `mortals_xhx_product_interface` ADD COLUMN `normalResponse` text DEFAULT NULL COMMENT '正常返回示例' AFTER `remark`,
ADD COLUMN `abnormalResponse` text DEFAULT NULL COMMENT '异常返回示例' AFTER `normalResponse`;
package com.mortals.xhx.module.product.model; package com.mortals.xhx.module.product.model;
import com.mortals.xhx.module.product.model.vo.ProductInterfaceVo; import com.mortals.xhx.module.product.model.vo.ProductInterfaceVo;
import lombok.Data;
/** /**
* 产品接口实体对象 * 产品接口实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-05-29
*/ */
@Data
public class ProductInterfaceEntity extends ProductInterfaceVo { public class ProductInterfaceEntity extends ProductInterfaceVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -83,266 +83,14 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -83,266 +83,14 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
* 接口描述 * 接口描述
*/ */
private String remark; private String remark;
public ProductInterfaceEntity(){}
/**
* 获取 产品id
* @return Long
*/
public Long getProductId(){
return productId;
}
/**
* 设置 产品id
* @param productId
*/
public void setProductId(Long productId){
this.productId = productId;
}
/**
* 获取 接口名称
* @return String
*/
public String getInterfaceName(){
return interfaceName;
}
/**
* 设置 接口名称
* @param interfaceName
*/
public void setInterfaceName(String interfaceName){
this.interfaceName = interfaceName;
}
/**
* 获取 版本号
* @return String
*/
public String getVersionNumber(){
return versionNumber;
}
/**
* 设置 版本号
* @param versionNumber
*/
public void setVersionNumber(String versionNumber){
this.versionNumber = versionNumber;
}
/** /**
* 获取 请求类型1:POST,2:GET * 正常返回示例
* @return Integer
*/ */
public Integer getRequestType(){ private String normalResponse;
return requestType;
}
/**
* 设置 请求类型1:POST,2:GET
* @param requestType
*/
public void setRequestType(Integer requestType){
this.requestType = requestType;
}
/**
* 获取 请求协议1:HTTP,2:HTTPS
* @return Integer
*/
public Integer getRequestProtocol(){
return requestProtocol;
}
/** /**
* 设置 请求协议1:HTTP,2:HTTPS * 异常返回示例
* @param requestProtocol
*/ */
public void setRequestProtocol(Integer requestProtocol){ private String abnormalResponse;
this.requestProtocol = requestProtocol;
}
/**
* 获取 请求路径
* @return String
*/
public String getRequestUrl(){
return requestUrl;
}
/**
* 设置 请求路径
* @param requestUrl
*/
public void setRequestUrl(String requestUrl){
this.requestUrl = requestUrl;
}
/**
* 获取 超时时间(秒)
* @return Long
*/
public Long getTimeoutValue(){
return timeoutValue;
}
/**
* 设置 超时时间(秒)
* @param timeoutValue
*/
public void setTimeoutValue(Long timeoutValue){
this.timeoutValue = timeoutValue;
}
/**
* 获取 限流策略1:分钟,2:小时
* @return Integer
*/
public Integer getLimitStrategy(){
return limitStrategy;
}
/**
* 设置 限流策略1:分钟,2:小时
* @param limitStrategy
*/
public void setLimitStrategy(Integer limitStrategy){
this.limitStrategy = limitStrategy;
}
/**
* 获取 访问网络1互联网2政务网
* @return String
*/
public String getNetwork(){
return network;
}
/**
* 设置 访问网络1互联网2政务网
* @param network
*/
public void setNetwork(String network){
this.network = network;
}
/**
* 获取 接口描述
* @return String
*/
public String getDescription(){
return description;
}
/**
* 设置 接口描述
* @param description
*/
public void setDescription(String description){
this.description = description;
}
/**
* 获取 内容类型
* @return String
*/
public String getContentType(){
return contentType;
}
/**
* 设置 内容类型
* @param contentType
*/
public void setContentType(String contentType){
this.contentType = contentType;
}
/**
* 获取 标签
* @return Integer
*/
public Integer getInterfaceTag(){
return interfaceTag;
}
/**
* 设置 标签
* @param interfaceTag
*/
public void setInterfaceTag(Integer interfaceTag){
this.interfaceTag = interfaceTag;
}
/**
* 获取 来源1自有2非自有
* @return Integer
*/
public Integer getInterfaceSource(){
return interfaceSource;
}
/**
* 设置 来源1自有2非自有
* @param interfaceSource
*/
public void setInterfaceSource(Integer interfaceSource){
this.interfaceSource = interfaceSource;
}
/**
* 获取 入参是否加密
* @return Integer
*/
public Integer getInEncrypt(){
return inEncrypt;
}
/**
* 设置 入参是否加密
* @param inEncrypt
*/
public void setInEncrypt(Integer inEncrypt){
this.inEncrypt = inEncrypt;
}
/**
* 获取 请求参数
* @return String
*/
public String getRequestParameters(){
return requestParameters;
}
/**
* 设置 请求参数
* @param requestParameters
*/
public void setRequestParameters(String requestParameters){
this.requestParameters = requestParameters;
}
/**
* 获取 出参是否加密
* @return Integer
*/
public Integer getOutEncrypt(){
return outEncrypt;
}
/**
* 设置 出参是否加密
* @param outEncrypt
*/
public void setOutEncrypt(Integer outEncrypt){
this.outEncrypt = outEncrypt;
}
/**
* 获取 响应数据
* @return String
*/
public String getResponseParameters(){
return responseParameters;
}
/**
* 设置 响应数据
* @param responseParameters
*/
public void setResponseParameters(String responseParameters){
this.responseParameters = responseParameters;
}
/**
* 获取 接口描述
* @return String
*/
public String getRemark(){
return remark;
}
/**
* 设置 接口描述
* @param remark
*/
public void setRemark(String remark){
this.remark = remark;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -359,32 +107,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -359,32 +107,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
return false; return false;
} }
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",productId:").append(getProductId());
sb.append(",interfaceName:").append(getInterfaceName());
sb.append(",versionNumber:").append(getVersionNumber());
sb.append(",requestType:").append(getRequestType());
sb.append(",requestProtocol:").append(getRequestProtocol());
sb.append(",requestUrl:").append(getRequestUrl());
sb.append(",timeoutValue:").append(getTimeoutValue());
sb.append(",limitStrategy:").append(getLimitStrategy());
sb.append(",network:").append(getNetwork());
sb.append(",description:").append(getDescription());
sb.append(",contentType:").append(getContentType());
sb.append(",interfaceTag:").append(getInterfaceTag());
sb.append(",interfaceSource:").append(getInterfaceSource());
sb.append(",inEncrypt:").append(getInEncrypt());
sb.append(",requestParameters:").append(getRequestParameters());
sb.append(",outEncrypt:").append(getOutEncrypt());
sb.append(",responseParameters:").append(getResponseParameters());
sb.append(",remark:").append(getRemark());
return sb.toString();
}
public void initAttrValue(){ public void initAttrValue(){
this.productId = null; this.productId = -1L;
this.interfaceName = ""; this.interfaceName = "";
...@@ -396,9 +121,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -396,9 +121,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.requestUrl = ""; this.requestUrl = "";
this.timeoutValue = null; this.timeoutValue = -1L;
this.limitStrategy = null; this.limitStrategy = -1;
this.network = ""; this.network = "";
...@@ -406,18 +131,22 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -406,18 +131,22 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.contentType = ""; this.contentType = "";
this.interfaceTag = null; this.interfaceTag = -1;
this.interfaceSource = 1; this.interfaceSource = 1;
this.inEncrypt = null; this.inEncrypt = -1;
this.requestParameters = ""; this.requestParameters = "";
this.outEncrypt = null; this.outEncrypt = -1;
this.responseParameters = ""; this.responseParameters = "";
this.remark = ""; this.remark = "";
this.normalResponse = "";
this.abnormalResponse = "";
} }
} }
\ No newline at end of file
...@@ -5,7 +5,7 @@ import java.util.List; ...@@ -5,7 +5,7 @@ import java.util.List;
* 产品接口查询对象 * 产品接口查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-05-29
*/ */
public class ProductInterfaceQuery extends ProductInterfaceEntity { public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -245,6 +245,16 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -245,6 +245,16 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 结束 更新时间 */ /** 结束 更新时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 正常返回示例 */
private List<String> normalResponseList;
/** 正常返回示例排除列表 */
private List <String> normalResponseNotList;
/** 异常返回示例 */
private List<String> abnormalResponseList;
/** 异常返回示例排除列表 */
private List <String> abnormalResponseNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<ProductInterfaceQuery> orConditionList; private List<ProductInterfaceQuery> orConditionList;
...@@ -1577,6 +1587,70 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -1577,6 +1587,70 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 正常返回示例
* @return normalResponseList
*/
public List<String> getNormalResponseList(){
return this.normalResponseList;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public void setNormalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
}
/**
* 获取 正常返回示例
* @return normalResponseNotList
*/
public List<String> getNormalResponseNotList(){
return this.normalResponseNotList;
}
/**
* 设置 正常返回示例
* @param normalResponseNotList
*/
public void setNormalResponseNotList(List<String> normalResponseNotList){
this.normalResponseNotList = normalResponseNotList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseList
*/
public List<String> getAbnormalResponseList(){
return this.abnormalResponseList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public void setAbnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseNotList
*/
public List<String> getAbnormalResponseNotList(){
return this.abnormalResponseNotList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseNotList
*/
public void setAbnormalResponseNotList(List<String> abnormalResponseNotList){
this.abnormalResponseNotList = abnormalResponseNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -2398,6 +2472,44 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -2398,6 +2472,44 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
} }
/**
* 设置 正常返回示例
* @param normalResponse
*/
public ProductInterfaceQuery normalResponse(String normalResponse){
setNormalResponse(normalResponse);
return this;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public ProductInterfaceQuery normalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponse
*/
public ProductInterfaceQuery abnormalResponse(String abnormalResponse){
setAbnormalResponse(abnormalResponse);
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public ProductInterfaceQuery abnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
package com.mortals.xhx.module.product.model.vo; package com.mortals.xhx.module.product.model.vo;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.ProductAppsEntity;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* 协议管理视图对象 * 协议管理视图对象
...@@ -10,5 +9,27 @@ import java.util.List; ...@@ -10,5 +9,27 @@ import java.util.List;
* @date 2023-02-22 * @date 2023-02-22
*/ */
public class ProductAppsVo extends BaseEntityLong { public class ProductAppsVo extends BaseEntityLong {
/**
* 产品名称
*/
private String productName;
/** 产品id列表 */
private List <Long> productIdList;
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public List<Long> getProductIdList() {
return productIdList;
}
public void setProductIdList(List<Long> productIdList) {
this.productIdList = productIdList;
}
} }
\ No newline at end of file
package com.mortals.xhx.module.product.service.impl; package com.mortals.xhx.module.product.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.product.dao.ProductAppsDao; import com.mortals.xhx.module.product.dao.ProductAppsDao;
import com.mortals.xhx.module.product.model.ProductAppsEntity; import com.mortals.xhx.module.product.model.ProductAppsEntity;
import com.mortals.xhx.module.product.model.ProductEntity;
import com.mortals.xhx.module.product.model.ProductQuery;
import com.mortals.xhx.module.product.service.ProductAppsService; import com.mortals.xhx.module.product.service.ProductAppsService;
import com.mortals.xhx.module.product.service.ProductService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/** /**
* ProductAppsService * ProductAppsService
* 产品应用 service实现 * 产品应用 service实现
...@@ -16,4 +26,31 @@ import com.mortals.xhx.module.product.service.ProductAppsService; ...@@ -16,4 +26,31 @@ import com.mortals.xhx.module.product.service.ProductAppsService;
@Service("productAppsService") @Service("productAppsService")
public class ProductAppsServiceImpl extends AbstractCRUDServiceImpl<ProductAppsDao, ProductAppsEntity, Long> implements ProductAppsService { public class ProductAppsServiceImpl extends AbstractCRUDServiceImpl<ProductAppsDao, ProductAppsEntity, Long> implements ProductAppsService {
@Autowired
private ProductService productService;
@Override
protected ProductAppsEntity findBefore(ProductAppsEntity params, PageInfo pageInfo, Context context) throws AppException {
if(params.getProductId()==null) {
List<ProductEntity> productList = productService.find(new ProductQuery());
List<Long> productIdList = new ArrayList<>();
for (ProductEntity item : productList) {
productIdList.add(item.getId());
}
params.setProductIdList(productIdList);
}
return params;
}
@Override
protected void findAfter(ProductAppsEntity params, PageInfo pageInfo, Context context, List<ProductAppsEntity> list) throws AppException {
if(CollectionUtils.isNotEmpty(list)){
for(ProductAppsEntity item:list){
ProductEntity productEntity = productService.get(item.getProductId());
if(productEntity!=null){
item.setProductName(productEntity.getProductName());
}
}
}
}
} }
\ No newline at end of file
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" /> <result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="normalResponse" column="normalResponse" />
<result property="abnormalResponse" column="abnormalResponse" />
</resultMap> </resultMap>
...@@ -104,23 +106,29 @@ ...@@ -104,23 +106,29 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime, a.updateTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('normalResponse') or colPickMode == 1 and data.containsKey('normalResponse')))">
a.normalResponse,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('abnormalResponse') or colPickMode == 1 and data.containsKey('abnormalResponse')))">
a.abnormalResponse,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="ProductInterfaceEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="ProductInterfaceEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_product_interface insert into mortals_xhx_product_interface
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime) (productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime,normalResponse,abnormalResponse)
VALUES VALUES
(#{productId},#{interfaceName},#{versionNumber},#{requestType},#{requestProtocol},#{requestUrl},#{timeoutValue},#{limitStrategy},#{network},#{description},#{contentType},#{interfaceTag},#{interfaceSource},#{inEncrypt},#{requestParameters},#{outEncrypt},#{responseParameters},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime}) (#{productId},#{interfaceName},#{versionNumber},#{requestType},#{requestProtocol},#{requestUrl},#{timeoutValue},#{limitStrategy},#{network},#{description},#{contentType},#{interfaceTag},#{interfaceSource},#{inEncrypt},#{requestParameters},#{outEncrypt},#{responseParameters},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{normalResponse},#{abnormalResponse})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_product_interface insert into mortals_xhx_product_interface
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime) (productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime,normalResponse,abnormalResponse)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.productId},#{item.interfaceName},#{item.versionNumber},#{item.requestType},#{item.requestProtocol},#{item.requestUrl},#{item.timeoutValue},#{item.limitStrategy},#{item.network},#{item.description},#{item.contentType},#{item.interfaceTag},#{item.interfaceSource},#{item.inEncrypt},#{item.requestParameters},#{item.outEncrypt},#{item.responseParameters},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime}) (#{item.productId},#{item.interfaceName},#{item.versionNumber},#{item.requestType},#{item.requestProtocol},#{item.requestUrl},#{item.timeoutValue},#{item.limitStrategy},#{item.network},#{item.description},#{item.contentType},#{item.interfaceTag},#{item.interfaceSource},#{item.inEncrypt},#{item.requestParameters},#{item.outEncrypt},#{item.responseParameters},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.normalResponse},#{item.abnormalResponse})
</foreach> </foreach>
</insert> </insert>
...@@ -229,6 +237,12 @@ ...@@ -229,6 +237,12 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('normalResponse')) or (colPickMode==1 and !data.containsKey('normalResponse'))">
a.normalResponse=#{data.normalResponse},
</if>
<if test="(colPickMode==0 and data.containsKey('abnormalResponse')) or (colPickMode==1 and !data.containsKey('abnormalResponse'))">
a.abnormalResponse=#{data.abnormalResponse},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -450,6 +464,20 @@ ...@@ -450,6 +464,20 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="normalResponse=(case" suffix="ELSE normalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('normalResponse')) or (colPickMode==1 and !item.containsKey('normalResponse'))">
when a.id=#{item.id} then #{item.normalResponse}
</if>
</foreach>
</trim>
<trim prefix="abnormalResponse=(case" suffix="ELSE abnormalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('abnormalResponse')) or (colPickMode==1 and !item.containsKey('abnormalResponse'))">
when a.id=#{item.id} then #{item.abnormalResponse}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -1109,6 +1137,48 @@ ...@@ -1109,6 +1137,48 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('normalResponse')">
<if test="conditionParamRef.normalResponse != null and conditionParamRef.normalResponse != ''">
${_conditionType_} a.normalResponse like #{${_conditionParam_}.normalResponse}
</if>
<if test="conditionParamRef.normalResponse == null">
${_conditionType_} a.normalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('normalResponseList') and conditionParamRef.normalResponseList.size() > 0">
${_conditionType_} a.normalResponse in
<foreach collection="conditionParamRef.normalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('normalResponseNotList') and conditionParamRef.normalResponseNotList.size() > 0">
${_conditionType_} a.normalResponse not in
<foreach collection="conditionParamRef.normalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponse')">
<if test="conditionParamRef.abnormalResponse != null and conditionParamRef.abnormalResponse != ''">
${_conditionType_} a.abnormalResponse like #{${_conditionParam_}.abnormalResponse}
</if>
<if test="conditionParamRef.abnormalResponse == null">
${_conditionType_} a.abnormalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseList') and conditionParamRef.abnormalResponseList.size() > 0">
${_conditionType_} a.abnormalResponse in
<foreach collection="conditionParamRef.abnormalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseNotList') and conditionParamRef.abnormalResponseNotList.size() > 0">
${_conditionType_} a.abnormalResponse not in
<foreach collection="conditionParamRef.abnormalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -1237,6 +1307,16 @@ ...@@ -1237,6 +1307,16 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('normalResponse')">
a.normalResponse
<if test='orderCol.normalResponse != null and "DESC".equalsIgnoreCase(orderCol.normalResponse)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('abnormalResponse')">
a.abnormalResponse
<if test='orderCol.abnormalResponse != null and "DESC".equalsIgnoreCase(orderCol.abnormalResponse)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
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