Commit a39156d0 authored by 姬鋆屾's avatar 姬鋆屾
parents b7d775c5 5b17c343
......@@ -34,18 +34,6 @@
</template>
</fc-designer>
</div>
<!-- <div class="tool">
<el-row>
<el-button icon="el-icon-download" type="primary" size="small" @click="getFormJson()"
round>生成表单JSON</el-button>
<el-button icon="el-icon-download" type="success" size="small" @click="getFormOption()"
round>生成表单配置</el-button>
<el-button icon="el-icon-upload" type="primary" size="small" @click="showDrawer"
round>移动端预览</el-button>
</el-row>
</div> -->
<el-drawer :visible.sync="drawer" title="预览">
<div class="showPhone">
<div class="phone">
......@@ -59,14 +47,20 @@
<el-dialog title="问卷发布" :visible.sync="issueDialog" width="30%" top="25vh">
<el-form :model="issueForm" :rules="issueRules" ref="issueForm">
<!-- <el-form-item label="问卷封面:" label-width="125px">
<el-form-item label="问卷封面:" label-width="125px">
<div style="display: flex;align-items: center;">
<img style="width:80px; height: 50px; margin-right: 10px;cursor: pointer;"
v-for="(i, j) in issueForm.cover" :key="j" :src="i" alt=""
<img style="width:80px; height: 80px; margin-right: 10px;cursor: pointer;"
v-for="(i, j) in coverImg" :key="j" :src="ImgUrl + '/' + i.url" alt=""
:class="selImg == j ? 'selImg' : ''" @click="selImg = j">
<el-upload v-show="coverImg.length < 4" :action="ImgUrl + '/attendance/file/commonupload'"
accept="image/jpeg,image/png,image/jpg" list-type="picture-card" class="upload"
auto-upload="false" :show-file-list="false" :before-upload="beforeAvatarUploada"
:on-success="handleUploadSuccess" :on-error="handleUploadError">
<i class="el-icon-plus"></i>
</el-upload>
</div>
<el-input v-model="issueForm.cover" autocomplete="off"></el-input>
</el-form-item> -->
</el-form-item>
<el-form-item label="反馈期限:" label-width="125px" prop="time">
<el-date-picker v-model="issueForm.time" type="datetimerange" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss">
......@@ -74,7 +68,6 @@
</el-form-item>
<el-form-item label="邀请人员:" label-width="125px">
<el-button size="small" type="success" @click="treeDialog = 1">选择人员</el-button>
</el-form-item>
<div style="text-align: center;">
<el-button size="small" @click="issueDialog = false">取消</el-button>
......@@ -161,11 +154,6 @@ export default {
issueForm: {
id: '',
title: '',
cover: [
'http://sy.scsmile.cn/YX-JXgl/v1.0/HT/images/%E6%96%B0%E5%A2%9E%E5%8F%8D%E9%A6%88_%E7%AC%AC3%E6%AD%A5_/u26101.svg',
'http://sy.scsmile.cn/YX-JXgl/v1.0/HT/images/%E6%96%B0%E5%A2%9E%E5%8F%8D%E9%A6%88_%E7%AC%AC3%E6%AD%A5_/u26102.svg',
],
},
issueRules: {
time: [
......@@ -184,14 +172,17 @@ export default {
checkedUser: [],
checkAll: false,
checkAllArr: [],
editStyle: false,
loadingstate: false,
ImgUrl: process.env.VUE_APP_API_BASE_URL,
coverImg: []
}
},
mounted() {
console.log(process.env.VUE_APP_API_BASE_URL)
this.getDeptData()
let query = this.$route
console.log(query)
// console.log(query)
if (query.query.id) {
this.editStyle = true
this.feedbackId = query.query.id
......@@ -205,8 +196,74 @@ export default {
this.$refs.designer.setRule(this.Frule)
this.$refs.designer.setOption(this.Fopthion)
}
this.getFile()
},
methods: {
handleUploadSuccess(res) {
console.log(res)
this.coverImg.push(res)
console.log(this.coverImg)
this.$post('/feedback/file/save', {
feedbackFileName: res.fileName,
feedbackFilePath: res.url
}).then(res => {
console.log(res)
})
},
handleUploadError() {
this.$message({
type: "error",
message: "上传失败",
});
},
// 文件格式验证
beforeAvatarUploada(file) {
this.loadingstate = true;
let index = file.name.lastIndexOf(".");
let extension = file.name.substr(index + 1);
let extensionList = [
"png",
"PNG",
"jpg",
"JPG",
"jpeg",
"JPEG",
"bmp",
];
const isLt2M = file.size / 1024 / 1024 < 10;
if (!isLt2M) {
this.$message({
message: "封面不可超出10M",
type: "warning",
center: true,
});
return false;
} else if (extensionList.indexOf(extension) < 0) {
this.$message({
message: "当前文件格式不支持",
type: "error",
center: true,
});
return false;
} else {
console.log(file)
}
},
//获取问卷封面
getFile() {
this.$post('/feedback/file/list', { page: 1, size: 3 }).then(res => {
console.log(res)
res.data.data.forEach(i => {
i.url = i.feedbackFilePath
})
console.log(res.data.data)
this.coverImg = res.data.data
console.log(this.coverImg)
})
},
//提交选择的人员
subUser() {
console.log(this.checkedUser)
if (this.checkedUser.length > 0) {
......@@ -324,6 +381,7 @@ export default {
})
let sub = {
staffList: this.checkedUser,
id: this.feedbackId,
...this.titleForm,
......@@ -334,7 +392,8 @@ export default {
ruleContent: JSON.stringify(this.Fopthion),
feedbackQuestionList: [
...this.Frule
]
],
feedbackFilePath: this.coverImg[this.selImg].url
}
console.log(sub)
this.$post('/feedback/save', sub).then(res => {
......@@ -392,7 +451,7 @@ export default {
"children": [this.titleForm.remark],
"_fc_drag_tag": "span",
"hidden": false,
"display": true
"display": true,
}]
this.$refs.designer.setRule(rule)
}
......@@ -403,6 +462,29 @@ export default {
</script>
<style lang="less" scoped>
.upload {
width: 80px;
line-height: 80px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
// border: 1px dashed #CCCCCC;
// color: #CCCCCC;
cursor: pointer;
}
// .upload:hover{
// border: 1px dashed #1a7af8;
// color: #1a7af8;
// }
/deep/.el-upload--picture-card {
width: 80px;
height: 80px;
line-height: 80px;
}
.treeDialog {
// border: 1px solid;
......
......@@ -91,7 +91,7 @@
<div style="text-align: center; margin-right: 40px;" v-for="j in i.optionList">
<el-progress type="circle"
:percentage="(j.optionCount / i.allCount * 100).toFixed(2)" show-text
width="75"></el-progress>
width="75"></el-progress>
<div>{{ j.optionContent }}</div>
</div>
</div>
......
<template>
<div>
<!-- 弹出框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="50%">
<el-drawer :title="title" :visible.sync="open" :direction="direction" size="50%">
<div class="tips">此功能为快速添加员工入口,如需为员工办理完整的入职手续,请使用[员工关系-入职管理]功能</div>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
......@@ -18,19 +14,50 @@
<!-- <Field label="政治面貌 " prop="politicalstatus" v-model="form.politicalstatus" type="select" :enumData="dict.politicalstatus" placeholder="请选择政治面貌 "/> -->
<!-- <Field label="所属部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入所属部门名称"/> -->
<Field label="员工姓名" :maxLength="10" prop="name" v-model="form.name" placeholder="请输入员工姓名"/>
<Field
label="员工姓名"
:maxLength="10"
prop="name"
v-model="form.name"
placeholder="请输入员工姓名"
/>
<Field label="手机号码" :maxLength="11" prop="phoneNumber" v-model="form.phoneNumber" placeholder="请输入联系电话"/>
<Field
label="手机号码"
:maxLength="11"
prop="phoneNumber"
v-model="form.phoneNumber"
placeholder="请输入联系电话"
/>
<!-- <Field label="所属部门" :maxLength="10" prop="deptName" v-model="form.deptName" placeholder="请选择所属部门" @focus="ishowBumen = true"/>
<!-- <Field label="所属部门" :maxLength="10" prop="deptName" v-model="form.deptName" placeholder="请选择所属部门" @focus="ishowBumen = true"/>
-->
<Field label="所属部门" prop="deptId" v-model="form.deptId" :enumData="dict.deptId" type="select" placeholder="请选择所属部门" />
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
:enumData="dict.deptId"
type="select"
placeholder="请选择所属部门"
/>
<Field
label="职位"
prop="positionId"
v-model="form.positionId"
:enumData="dict.positionId"
type="select"
placeholder="请选择职位"
/>
<Field label="职位" prop="positionId" v-model="form.positionId" :enumData="dict.positionId" type="select" placeholder="请选择职位" />
<Field label="工号" :maxLength="15" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/>
<Field
label="工号"
:maxLength="15"
prop="workNum"
v-model="form.workNum"
placeholder="请输入工号"
/>
<!-- <Field label="是否在政务大厅" prop="positionId" v-model="form.positionId" placeholder="请选择" type="select"/> -->
<!-- <Field label="职位名称" prop="positionName" v-model="form.positionName" placeholder="请输入职位名称"/> -->
......@@ -43,7 +70,7 @@
<!-- <Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> -->
</el-row>
<form-buttons @submit='submitForm' noCancelBtn />
<form-buttons @submit="submitForm" noCancelBtn />
</el-form>
</el-drawer>
<!-- 部门选择 -->
......@@ -65,19 +92,21 @@
:expand-on-click-node="false"
:render-content="renderContent"
@node-click="handleNodeClick"
>
</el-tree>
></el-tree>
</el-scrollbar>
</el-col>
<el-col :span="12">
<div class="titles">已选部门</div>
<div class="el-tag flex flex-pack-justify mt10" v-if="deptnode.label" style="max-width:80%">
<div
class="el-tag flex flex-pack-justify mt10"
v-if="deptnode.label"
style="max-width:80%"
>
<div>{{deptnode.label}}</div>
<div @click="cancledept()">
<i class="el-icon-close"></i>
</div>
</div>
</el-col>
</el-row>
<div class="mt20">
......@@ -86,25 +115,39 @@
</div>
</el-dialog>
</div>
</template>
<script>
import form from "@/assets/mixins/formdialog";
export default {
import form from "@/assets/mixins/formdialog";
export default {
name: "StaffDetail",
mixins: [form],
props:{
bumentree:{
type:Array,
default:[]
props: {
bumentree: {
type: Array,
default: []
},
currentNode:{
type:Object,
default:{}
}
},
components: {
components: {},
watch: {
open(newval) {
if (newval) {
console.log(newval, this.currentNode, this.form.deptId,this.dict.deptId);
if(this.currentNode && this.currentNode.id){
this.form.deptId = JSON.stringify(this.currentNode.id)
this.form.deptName = this.currentNode.label
}
console.log(newval, this.currentNode, this.form.deptId);
}
}
},
created() {
this.changePath("staff")
this.changePath("staff");
},
data() {
return {
......@@ -114,61 +157,49 @@
title: "个人主页",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
"gender",
"politicalstatus",
"staffType",
"status",
],
toDate:[
"birthday",
"entryDate",
"regularDate",
"leaveDate",
],
direction: "rtl",
toString: ["gender", "politicalstatus", "staffType", "status"],
toDate: ["birthday", "entryDate", "regularDate", "leaveDate"],
// 表单校验
rules: {
name: [
{required: true,message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
{ required: true, message: "请输入员工姓名", trigger: "blur" },
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" }
],
phoneNumber: [
{required: true,message: "请输入员工手机号码", trigger: "blur" },
{max: 11,message: "最多只能录入11个字符",trigger: "blur",},
{ required: true, message: "请输入员工手机号码", trigger: "blur" },
{ max: 11, message: "最多只能录入11个字符", trigger: "blur" }
],
deptName: [
{required: true,message: "请选择所属部门", trigger: "change" },
{ required: true, message: "请选择所属部门", trigger: "change" }
],
positionId: [
{required: true,message: "请选择职位", trigger: "blur" }
],
workNum: [
{required: true,message: "请输入工号" },
{ required: true, message: "请选择职位", trigger: "blur" }
],
workNum: [{ required: true, message: "请输入工号" }]
},
treeProps: {
id: "id",
label: "label",
areaCode:"areaCode",
areaCode: "areaCode",
type: "type",
isLeaf: "isLeaf",
children: "children",
icon: "icon",
icon: "icon"
},
ishowBumen:false,
deptnode:{}
}
ishowBumen: false,
deptnode: {}
};
},
methods: {
renderContent: function (h, { node, data, store }) {
renderContent: function(h, { node, data, store }) {
return (
<span>
<i style="font-size:16px;color:#409EFF" class={data.icon}></i>
<span style="padding-left: 2px;font-size:14px">{node.label}</span>
</span>
)
);
},
async loadNode(node, resolve) {
if (node.level === 0) {
......@@ -178,37 +209,37 @@
},
// 点击
handleNodeClick(node) {
this.deptnode = node
this.deptnode = node;
},
comfirmbument(){
this.form.deptId = this.deptnode.id
this.form.deptName = this.deptnode.label
this.ishowBumen = false
comfirmbument() {
this.form.deptId = this.deptnode.id;
this.form.deptName = this.deptnode.label;
this.ishowBumen = false;
},
/** 编辑 */
edit(row) {
this.reset()
this.reset();
this.query = { id: row.id };
this.urls.currUrl ="staff/edit";
this.urls.currUrl = "staff/edit";
this.getData();
this.pageInfo.type="edit"
this.pageInfo.type = "edit";
this.title = "修改员工基本信息";
},
/** 新增 */
add(row) {
this.reset()
this.reset();
this.urls.currUrl = "staff/add";
this.getData();
this.pageInfo.type="add"
this.pageInfo.type = "add";
this.title = "新增员工基本信息";
},
/** 查看*/
view(row) {
this.reset()
this.reset();
this.query = { id: row.id };
this.urls.currUrl ="staff/view";
this.urls.currUrl = "staff/view";
this.getData();
this.pageInfo.type="view"
this.pageInfo.type = "view";
this.title = "员工基本信息详细";
},
/**取消按钮 */
......@@ -228,25 +259,25 @@
// 表单重置
reset() {
this.form = {
name : "",
gender : 1,
birthday : null,
photoPath : "",
phoneNumber : "",
idCard : "",
workNum : "",
politicalstatus : 1,
deptId : null,
deptName : "",
positionId : null,
positionName : "",
staffType : 1,
status : 1,
registerPath : "",
entryDate : null,
regularDate : null,
leaveDate : null,
remark : "",
name: "",
gender: 1,
birthday: null,
photoPath: "",
phoneNumber: "",
idCard: "",
workNum: "",
politicalstatus: 1,
deptId: null,
deptName: "",
positionId: null,
positionName: "",
staffType: 1,
status: 1,
registerPath: "",
entryDate: null,
regularDate: null,
leaveDate: null,
remark: ""
};
this.resetForm("form");
},
......@@ -255,30 +286,30 @@
this.$refs[refName].resetFields();
}
},
cancledept(){
this.deptnode = {}
}
cancledept() {
this.deptnode = {};
}
}
};
</script>
<style scoped>
.tips{
.tips {
margin-left: 120px;
margin-bottom: 20px;
color: #999;
font-size: 15px;
}
.titles{
color: #409EFF;
.titles {
color: #409eff;
font-size: 16px;
display: flex;
align-items: center;
}
.titles::before{
content: '';
width:6px;
.titles::before {
content: "";
width: 6px;
height: 16px;
background-color: #409EFF;
background-color: #409eff;
display: inline-block;
margin-right: 10px;
}
......
......@@ -182,7 +182,7 @@
</div>
</el-dialog>
<drawer-show ref="drawerform" @ok="getData" :bumentree="areaData" />
<drawer-show ref="drawerform" @ok="getData" :bumentree="areaData" :currentNode="currentNode"/>
</div>
</template>
......@@ -248,6 +248,7 @@ export default {
},
handleNodeClick(node) {
console.log(node,123123);
this.currentNode = node;
this.query = { deptId: node.id };
this.getData();
......
......@@ -27,4 +27,9 @@ public class EffectSaveReq extends BaseReq {
* 报警时间
*/
private Date alarmTime;
/**
* 窗口编号
*/
private String windowNum;
}
......@@ -28,6 +28,9 @@ public class ReviewSaveReq extends BaseReq {
*/
private String reviewDevice;
/**
* 窗口编号
*/
private String windowNum;
}
......@@ -219,7 +219,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity.setRuleName(rule.getName());
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setDeductPerson("admin");
recordEntity.setDeductPerson("系统管理员");
recordEntity.setDeductTime(new Date());
recordEntity.setCreateUserId(1L);
recordEntity.setCreateTime(new Date());
......@@ -254,11 +254,12 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity.setRuleName(rule.getName());
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setDeductPerson("admin");
recordEntity.setDeductPerson("系统管理员");
recordEntity.setDeductTime(new Date());
recordEntity.setCreateUserId(1L);
recordEntity.setCreateTime(new Date());
recordEntity.setWorkNum(staffEntity.getWorkNum());
recordEntity.setWindowNum(req.getWindowNum());
PerformRulesCategoryEntity categoryEntity = categoryService.get(rule.getCategoryId());
recordEntity.setCategoryName(categoryEntity == null ? "" : categoryEntity.getName());
PerformReviewRecordEntity save = reviewRecordService.save(recordEntity);
......@@ -285,7 +286,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity.setRuleName(rule.getName());
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setDeductPerson("admin");
recordEntity.setDeductPerson("系统管理员");
recordEntity.setDeductTime(new Date());
recordEntity.setWorkNum(staffEntity.getWorkNum());
......@@ -317,7 +318,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity.setRuleName(rule.getName());
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setDeductPerson("admin");
recordEntity.setDeductPerson("系统管理员");
recordEntity.setDeductTime(new Date());
recordEntity.setWorkNum(staffEntity.getWorkNum());
......@@ -350,10 +351,12 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity.setRuleName(rule.getName());
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setDeductPerson("admin");
recordEntity.setDeductPerson("系统管理员");
recordEntity.setDeductTime(new Date());
recordEntity.setWorkNum(staffEntity.getWorkNum());
recordEntity.setWindowNum(req.getWindowNum());
recordEntity.setCreateUserId(1L);
recordEntity.setCreateTime(new Date());
PerformRulesCategoryEntity categoryEntity = categoryService.get(rule.getCategoryId());
......@@ -384,7 +387,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setWorkNum(staffEntity.getWorkNum());
recordEntity.setDeductPerson("admin");
recordEntity.setDeductPerson("系统管理员");
recordEntity.setDeductTime(new Date());
recordEntity.setCreateUserId(1L);
......
......@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.busiz.h5.req.AppealReq;
......@@ -29,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
......@@ -131,6 +133,7 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
query.setCreateTimeStart(appealReq.getApperalStartDate());
query.setCreateTimeEnd(appealReq.getAppealEndDate());
query.setStaffId(context.getUser().getCustomerId());
query.setOrderColList(Arrays.asList(new OrderCol("createTime",OrderCol.DESCENDING)));
Result<PerformAttendAppealEntity> result = appealService.find(query, pageInfo, context);
model.put(KEY_RESULT_DATA, result.getList());
......
......@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.busiz.h5.req.FeedbackReq;
......@@ -93,6 +94,8 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
feedbackQuery.setIdList(feedbackIdList);
feedbackQuery.setCreateTimeStart(feedbackReq.getFeedBackStartDate());
feedbackQuery.setCreateTimeEnd(feedbackReq.getFeedBackEndDate());
feedbackQuery.setOrderColList(Arrays.asList(new OrderCol("createTime",OrderCol.DESCENDING)));
Result<FeedbackEntity> result = feedbackService.find(feedbackQuery, pageAllInfo, null);
model.put(PAGEINFO_KEY, result.getPageInfo());
model.put(KEY_RESULT_DATA, result.getList());
......@@ -113,6 +116,7 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
feedbackQuery.setCreateTimeStart(feedbackReq.getFeedBackStartDate());
feedbackQuery.setCreateTimeEnd(feedbackReq.getFeedBackEndDate());
feedbackQuery.setOrderColList(Arrays.asList(new OrderCol("createTime",OrderCol.DESCENDING)));
Result<FeedbackEntity> result = feedbackService.find(feedbackQuery, pageAllInfo, null);
......@@ -136,6 +140,7 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
feedbackQuery.setIdList(unfinFeedbackList);
feedbackQuery.setCreateTimeStart(feedbackReq.getFeedBackStartDate());
feedbackQuery.setCreateTimeEnd(feedbackReq.getFeedBackEndDate());
feedbackQuery.setOrderColList(Arrays.asList(new OrderCol("createTime",OrderCol.DESCENDING)));
Result<FeedbackEntity> result = feedbackService.find(feedbackQuery, pageAllInfo, null);
model.put(PAGEINFO_KEY, result.getPageInfo());
model.put(KEY_RESULT_DATA, result.getList());
......
......@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.busiz.h5.req.InspectSaveReq;
......@@ -164,6 +165,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
query.setCreateTimeEnd(performReq.getPerformEndDate());
query.setCreateUserId(context.getUser().getId());
query.setSubMethod(SubMethodEnum.大厅巡查.getValue());
query.setOrderColList(Arrays.asList(new OrderCol("createTime",OrderCol.DESCENDING)));
log.info("inspect query:{}",JSONObject.toJSONString(query));
......
......@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.busiz.h5.req.PerformReq;
......@@ -36,10 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import static com.mortals.framework.ap.SysConstains.*;
......@@ -182,6 +180,7 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
query.setCheckStatus(CheckStatusEnum.已处理.getValue());
query.setOrderColList(Arrays.asList(new OrderCol("createTime",OrderCol.DESCENDING)));
Result<CheckAllRecordVo> result = checkAllRecordService.getAllCheckRecord(query, pageInfo);
List<CheckAllRecordVo> allCheckRecord = result.getList();
......@@ -202,6 +201,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
query.setCheckStatus(CheckStatusEnum.已处理.getValue());
query.setOrderColList(Arrays.asList(new OrderCol("createTime",OrderCol.DESCENDING)));
Result<CheckAttendRecordEntity> result = checkAttendRecordService.find(query, pageInfo, context);
List<PerformInfo> collect = result.getList().stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
......@@ -222,6 +223,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
query.setCheckStatus(CheckStatusEnum.已处理.getValue());
query.setOrderColList(Arrays.asList(new OrderCol("createTime",OrderCol.DESCENDING)));
Result<CheckReviewRecordEntity> result = checkReviewRecordService.find(query, pageInfo, context);
List<PerformInfo> collect = result.getList().stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
......@@ -242,6 +245,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
query.setCheckStatus(CheckStatusEnum.已处理.getValue());
query.setOrderColList(Arrays.asList(new OrderCol("createTime",OrderCol.DESCENDING)));
Result<CheckComplainRecordEntity> result = checkComplainRecordService.find(query, pageInfo, context);
List<PerformInfo> collect = result.getList().stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
......@@ -262,6 +267,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
query.setCheckStatus(CheckStatusEnum.已处理.getValue());
query.setOrderColList(Arrays.asList(new OrderCol("createTime",OrderCol.DESCENDING)));
Result<CheckGoworkRecordEntity> result = checkGoworkRecordService.find(query, pageInfo, context);
List<PerformInfo> collect = result.getList().stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
......@@ -282,6 +289,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
query.setCheckStatus(CheckStatusEnum.已处理.getValue());
query.setOrderColList(Arrays.asList(new OrderCol("createTime",OrderCol.DESCENDING)));
Result<CheckEffectRecordEntity> result = checkEffectRecordService.find(query, pageInfo, context);
List<PerformInfo> collect = result.getList().stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
......
package com.mortals.xhx.module.check.model;
import com.mortals.framework.model.OrderCol;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class CheckAllRecordQuery {
/**
......@@ -34,5 +38,6 @@ public class CheckAllRecordQuery {
*/
private Integer subAddType;
private transient List<OrderCol> orderColList = new ArrayList();
}
......@@ -91,7 +91,7 @@ public class CheckAttendRecordController extends BaseCRUDJsonBodyMappingControll
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
super.doListBefore(query, model, context);
}
......
......@@ -84,7 +84,7 @@ public class CheckComplainRecordController extends BaseCRUDJsonBodyMappingContro
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
......
......@@ -95,7 +95,7 @@ public class CheckEffectRecordController extends BaseCRUDJsonBodyMappingControll
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
......
......@@ -82,7 +82,7 @@ public class CheckGoworkRecordController extends BaseCRUDJsonBodyMappingControll
}
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
......
......@@ -83,7 +83,7 @@ public class CheckOtherRecordController extends BaseCRUDJsonBodyMappingControlle
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
......
......@@ -96,7 +96,7 @@ public class CheckReviewRecordController extends BaseCRUDJsonBodyMappingControll
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
......
......@@ -120,7 +120,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config();
config.protocol = "https";
config.regionId = "central";
config.endpoint = domain;
config.endpoint = domain.replace("http://","");
return new com.aliyun.dingtalkworkflow_1_0.Client(config);
}
......@@ -130,9 +130,16 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
com.aliyun.dingtalkworkflow_1_0.Client client = createClient();
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders getProcessInstanceHeaders = new com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders();
getProcessInstanceHeaders.xAcsDingtalkAccessToken = getToken();
getProcessInstanceHeaders.getCommonHeaders().put("host","172.15.28.113");
getProcessInstanceHeaders.getCommonHeaders().put("port","8918");
getProcessInstanceHeaders.getCommonHeaders().put("protocol","http");
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceRequest getProcessInstanceRequest = new com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceRequest()
.setProcessInstanceId(processInstanceId);
GetProcessInstanceResponse rsp = client.getProcessInstanceWithOptions(getProcessInstanceRequest, getProcessInstanceHeaders, new com.aliyun.teautil.models.RuntimeOptions());
return Rest.ok("成功", rsp.getBody().getResult());
} catch (Exception e) {
......
......@@ -98,7 +98,7 @@ public class PerformAttendAppealController extends BaseCRUDJsonBodyMappingContro
}
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
......
......@@ -81,7 +81,7 @@ public class PerformAttendRecordController extends BaseCRUDJsonBodyMappingContro
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
}
\ No newline at end of file
......@@ -73,7 +73,7 @@ public class PerformComplainRecordController extends BaseCRUDJsonBodyMappingCont
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
......
......@@ -80,7 +80,7 @@ public class PerformEffectRecordController extends BaseCRUDJsonBodyMappingContro
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
}
\ No newline at end of file
......@@ -80,7 +80,7 @@ public class PerformGoworkRecordController extends BaseCRUDJsonBodyMappingContro
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
}
\ No newline at end of file
......@@ -81,7 +81,7 @@ public class PerformOtherRecordController extends BaseCRUDJsonBodyMappingControl
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
}
\ No newline at end of file
......@@ -84,7 +84,7 @@ public class PerformReviewRecordController extends BaseCRUDJsonBodyMappingContro
if(!ObjectUtils.isEmpty(query.getCreateTime())){
query.setCreateTimeStart(DateUtil.formatDate(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDateTime(query.getCreateTime()));
query.setCreateTimeEnd(DateUtil.formatDate(query.getCreateTime()));
}
}
}
\ No newline at end of file
......@@ -20,7 +20,7 @@
<plugin interceptor="com.mortals.framework.thirty.mybatis.LogInterceptor">
<property name="enableExecutorTime" value="true" />
<property name="showSql" value="false" />
<property name="showSql" value="true" />
</plugin>
</plugins>
</configuration>
\ No newline at end of file
......@@ -74,6 +74,15 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
) AS a
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
</select>
<select id="getListCount" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="int">
......
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