Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
| | |
| | | export function transferHiddenDanger (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/hiddenDanger/transferHiddenDanger', data) |
| | | } |
| | | export function dealHiddenDanger (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/hiddenDanger/dealHiddenDanger', data) |
| | | } |
| | | |
| | | // 修改 |
| | | export function updateById (data) { |
| | |
| | | </div> |
| | | <!-- --> |
| | | <template v-slot:footer> |
| | | <el-button @click="dealDo" type="primary" v-if="model.status==0&& model.checkUserId == userInfo.memberId" class="status-red">处理</el-button> |
| | | <el-button @click="isShowProblem = true" type="primary" v-if="model.status==0&& model.checkUserId == userInfo.memberId" class="status-red">处理</el-button> |
| | | <el-button type="primary" plain v-if="model.status==0 && model.checkUserId == userInfo.memberId" @click="handleTransfer">转交</el-button> |
| | | <el-button @click="backDo" v-if="model.status==0&& model.checkUserId == userInfo.memberId" type="danger" >退回</el-button> |
| | | <el-button @click="visible=false">返回</el-button> |
| | | </template> |
| | | <!-- 同意/拒绝 --> |
| | | <el-dialog |
| | | append-to-body |
| | | :title="apprTitle" |
| | | :visible.sync="isShowAppr" |
| | | width="480px" |
| | | > |
| | | <el-input |
| | | type="textarea" |
| | | :placeholder="apprTitle + '说明,非必填'" |
| | | :rows="4" |
| | | v-model="param.explain" |
| | | /> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="isShowAppr = false">取消</el-button> |
| | | <el-button type="primary" @click="isShowAppr = false">确定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | append-to-body |
| | | title="转交" |
| | | style="text-align: center" |
| | | class="dialogCl" |
| | | :visible.sync="isShowTransfer" |
| | | width="480px" |
| | | > |
| | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="isShowTransfer = false">取消</el-button> |
| | | <el-button type="primary" @click="transferSubmit">确定</el-button> |
| | | <el-button type="primary" :loading="transfering" @click="transferSubmit">确定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 隐患 --> |
| | | <el-dialog |
| | | append-to-body |
| | | title="隐患" |
| | | title="隐患处理" |
| | | class="dialogCl" |
| | | :visible.sync="isShowProblem" |
| | | width="480px" |
| | | width="600px" |
| | | > |
| | | <el-form :model="param" :rules="rules" ref="ruleForm" label-width="100px"> |
| | | <el-form-item label="退回时间"> |
| | | <el-form :model="dealForm" :rules="rulesDeal" ref="dealForm" label-width="100px"> |
| | | <el-form-item label="整改时间" prop="checkDate"> |
| | | <el-date-picker |
| | | class="w300" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | v-model="param.date" |
| | | v-model="dealForm.checkDate" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="整改前"> |
| | | <el-form-item label="整改前" prop="dealBeforeFileList"> |
| | | <div class="df_ac"> |
| | | <img src="@/assets/avatar/man.png" /> |
| | | <el-upload |
| | | class="avatar-uploader" |
| | | action="https://jsonplaceholder.typicode.com/posts/" |
| | | :show-file-list="false" |
| | | :on-success="handleAvatarSuccess" |
| | | :before-upload="beforeAvatarUpload" |
| | | > |
| | | <img v-if="param.url" :src="param.url" class="avatar" /> |
| | | <div v-else class="upload_box"> |
| | | <el-icon class="el-icon-plus icon" /> |
| | | <div class="text">图片/视频</div> |
| | | </div> |
| | | </el-upload> |
| | | <upload width="80px" height="80px" :list="dealForm.dealBeforeFileList" :tips="'图片/视频'" accept=".png,.jpg,.jpeg,.mp4" folder="hiddendanger" @loading="uploading = true" @dele="dele($event,0)" @success="uploadFileList($event, 0)" /> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="整改后" prop="dealAfterFileList"> |
| | | <div class="df_ac"> |
| | | <upload width="80px" height="80px" :list="dealForm.dealAfterFileList" :tips="'图片/视频'" accept=".png,.jpg,.jpeg,.mp4" folder="hiddendanger" @loading="uploading = true" @dele="dele($event,1)" @success="uploadFileList($event, 1)" /> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="处理说明"> |
| | | <el-input |
| | | type="textarea" |
| | | placeholder="请填写说明" |
| | | :rows="4" |
| | | v-model="dealForm.checkInfo" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="isShowProblem = false">取消</el-button> |
| | | <el-button type="primary" :loading="dealing" @click="dealDo" |
| | | >确定</el-button |
| | | > |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | append-to-body |
| | | title="隐患退回" |
| | | class="dialogCl" |
| | | :visible.sync="isBackProblem" |
| | | width="480px" |
| | | > |
| | | <el-form :model="backForm" :rules="rulesBack" ref="backForm" label-width="100px"> |
| | | <el-form-item label="退回时间" prop="checkDate"> |
| | | <el-date-picker |
| | | class="w300" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | v-model="backForm.checkDate" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="整改前" prop="dealBeforeFileList"> |
| | | <div class="df_ac"> |
| | | <upload width="80px" height="80px" :list="backForm.dealBeforeFileList" :tips="'图片/视频'" accept=".png,.jpg,.jpeg,.mp4" folder="hiddendanger" @loading="uploading = true" @dele="dele($event,2)" @success="uploadFileList($event, 2)" /> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="退回说明"> |
| | |
| | | type="textarea" |
| | | placeholder="请填写说明" |
| | | :rows="4" |
| | | v-model="param.explain" |
| | | v-model="backForm.checkInfo" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="isShowProblem = false">取消</el-button> |
| | | <el-button type="primary" :loading="transfering" @click="isShowProblem = false" |
| | | <el-button @click="isBackProblem= false">取消</el-button> |
| | | <el-button type="primary" :loading="transfering" @click="backDo" |
| | | >确定</el-button |
| | | > |
| | | </span> |
| | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import upload from '@/components/common/upload' |
| | | import { memberList } from '@/api/business/hiddenDangerParam' |
| | | import {mapMutations} from "vuex"; |
| | | import { mapState } from 'vuex' |
| | | import { dealHiddenDanger } from '@/api/business/hiddenDanger' |
| | | export default { |
| | | components: { GlobalWindow }, |
| | | components: { GlobalWindow, upload }, |
| | | extends: BaseOpera, |
| | | data () { |
| | | return { |
| | |
| | | isShowAppr: false, |
| | | apprTitle: '同意', |
| | | param: {}, |
| | | uploading: false, |
| | | dealing: false, |
| | | isShowProblem: false, |
| | | isBackProblem: false, |
| | | isShowTransfer: false, |
| | | rules: {}, |
| | | rulesTrans: { |
| | |
| | | { required: true, message: '请选择' } |
| | | ] |
| | | }, |
| | | rulesDeal: { |
| | | checkDate: [ |
| | | { required: true, message: '请选择整改时间' } |
| | | ], |
| | | dealBeforeFileList: [ |
| | | { required: true, message: '请上传整改前情况' } |
| | | ], |
| | | dealAfterFileList: [ |
| | | { required: true, message: '请上传整改后情况' } |
| | | ] |
| | | }, |
| | | rulesBack: { |
| | | checkDate: [ |
| | | { required: true, message: '请选择退回时间' } |
| | | ], |
| | | dealBeforeFileList: [ |
| | | { required: true, message: '请上传整改前情况' } |
| | | ] |
| | | }, |
| | | memberList: [], |
| | | transForm: { |
| | | memberId: null |
| | | }, |
| | | dealForm: { |
| | | checkDate: null, |
| | | checkInfo: null, |
| | | dealBeforeFileList: [], |
| | | dealAfterFileList: [] |
| | | }, |
| | | backForm: { |
| | | checkDate: null, |
| | | checkInfo: null, |
| | | dealBeforeFileList: [] |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState(['userInfo']) |
| | | }, |
| | | created () { |
| | | this.config({ |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['userInfo']), |
| | | dealDo () { this.isShowProblem = true }, |
| | | backDo () { this.isShowProblem = true }, |
| | | dele (index, type) { |
| | | if (type == 0) { |
| | | if (this.dealForm.dealBeforeFileList != null && this.dealForm.dealBeforeFileList.length > index) { |
| | | this.dealForm.dealBeforeFileList.splice(index, 1) |
| | | } |
| | | } else if (type == 1) { |
| | | if (this.dealForm.dealAfterFileList != null && this.dealForm.dealAfterFileList.length > index) { |
| | | this.dealForm.dealAfterFileList.splice(index, 1) |
| | | } |
| | | } else if (type == 2) { |
| | | if (this.backForm.dealAfterFileList != null && this.backForm.dealAfterFileList.length > index) { |
| | | this.backForm.dealAfterFileList.splice(index, 1) |
| | | } |
| | | } |
| | | }, |
| | | uploadFileList (e, objType) { |
| | | if (objType === 0) { |
| | | if (this.dealForm.dealBeforeFileList == null) { |
| | | this.dealForm.dealBeforeFileList = [] |
| | | } |
| | | this.dealForm.dealBeforeFileList.push({ |
| | | id: this.model.id, |
| | | url: e.url, |
| | | fileUrl: e.imgaddr, |
| | | fileName: e.originname, |
| | | fileType: e.type |
| | | }) |
| | | } else if (objType === 1) { |
| | | if (this.dealForm.dealAfterFileList == null) { |
| | | this.dealForm.dealAfterFileList = [] |
| | | } |
| | | this.dealForm.dealAfterFileList.push({ |
| | | id: this.model.id, |
| | | fileUrl: e.imgaddr, |
| | | url: e.url, |
| | | fileName: e.originname, |
| | | fileType: e.type |
| | | }) |
| | | } else if (objType === 2) { |
| | | if (this.backForm.dealAfterFileList == null) { |
| | | this.backForm.dealAfterFileList = [] |
| | | } |
| | | this.backForm.dealAfterFileList.push({ |
| | | id: this.model.id, |
| | | fileUrl: e.imgaddr, |
| | | url: e.url, |
| | | fileName: e.originname, |
| | | fileType: e.type |
| | | }) |
| | | } |
| | | }, |
| | | dealDo () { |
| | | this.$refs.dealForm.validate((valid) => { |
| | | // debugger |
| | | if (!valid) { |
| | | return |
| | | } |
| | | this.$dialog.actionConfirm('操作确认', '您确认提交该隐患处理情况吗?') |
| | | .then(() => { |
| | | this.transfering = true |
| | | this.api.dealHiddenDanger({ |
| | | id: this.dataId, |
| | | status: 1, |
| | | checkDate: this.dealForm.checkDate, |
| | | checkInfo: this.dealForm.checkInfo, |
| | | dealBeforeFileList: this.dealForm.dealBeforeFileList, |
| | | dealAfterFileList: this.dealForm.dealBeforeFileList |
| | | }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess('转交成功') |
| | | this.getDetail() |
| | | this.getLogList() |
| | | this.isShowTransfer = false |
| | | }) |
| | | .catch(e => { |
| | | }) |
| | | .finally(() => { |
| | | this.dealing = false |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | backDo () { |
| | | this.$refs.backForm.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | this.$dialog.actionConfirm('操作确认', '您确认退回该隐患处理情况吗?') |
| | | .then(() => { |
| | | this.transfering = true |
| | | this.api.dealHiddenDanger({ |
| | | id: this.dataId, |
| | | status: 0, |
| | | checkDate: this.backForm.checkDate, |
| | | checkInfo: this.backForm.checkInfo, |
| | | dealBeforeFileList: this.backForm.dealBeforeFileList |
| | | }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess('转交成功') |
| | | this.getDetail() |
| | | this.getLogList() |
| | | this.isShowTransfer = false |
| | | }) |
| | | .catch(e => { |
| | | }) |
| | | .finally(() => { |
| | | this.dealing = false |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.model = {} |
| | | this.dataId = target.id |
| | | this.getDetail() |
| | | this.getLogList() |
| | | this.$nextTick(() => { |
| | | this.memberList = [] |
| | | this.transForm = { |
| | | memberId: null |
| | | }, |
| | | this.dealForm = { |
| | | checkDate: null, |
| | | checkInfo: null, |
| | | dealBeforeFileList: [], |
| | | dealAfterFileList: [] |
| | | }, |
| | | this.backForm = { |
| | | checkDate: null, |
| | | checkInfo: null, |
| | | dealBeforeFileList: [] |
| | | } |
| | | this.getDetail() |
| | | this.getLogList() |
| | | }) |
| | | }, |
| | | transferSubmit () { |
| | | this.$refs.transForm.validate((valid) => { |
| | |
| | | this.$tip.apiSuccess('转交成功') |
| | | this.getDetail() |
| | | this.getLogList() |
| | | this.isShowTransfer = false |
| | | }) |
| | | .catch(e => { |
| | | }) |
| | |
| | | this.transfering = false |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }) |
| | | }, |
| | | getLogList () { |
| | |
| | | <img :src="item.url" v-if="fileType(item.url) === 'img'" /> |
| | | <video controls autoplay :src="item.url" v-else></video> |
| | | </div> |
| | | <div class="file_list_item" :style="{width: width, height: height, cursor: 'pointer'}" @click="$refs.file.click()"> |
| | | <i class="el-icon-plus"></i> |
| | | </div> |
| | | <div class="file_list_item" :style="{width: width, height: height, cursor: 'pointer'}" @click="$refs.file.click()"> |
| | | <i class="el-icon-plus" style="font-size: 18px;color: #8c939d;text-align: center;margin-top: 10px"></i> |
| | | <i style="font-size: 12px;color: #8c939d;font-style: normal;text-align: center">{{tips}}</i> |
| | | </div> |
| | | <input type="file" ref="file" :accept="accept" @change="getFile" /> |
| | | </div> |
| | | <input type="file" ref="file" :accept="accept" @change="getFile" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import axios from 'axios'; |
| | | export default { |
| | | props: { |
| | | width: { |
| | | type: String, |
| | | default: '90px' |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '90px' |
| | | }, |
| | | list: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | accept: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | folder: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/upload' |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | fileType(url) { |
| | | if (url.indexOf('.mp4') !== -1) { |
| | | return 'video' |
| | | } else { |
| | | return 'img' |
| | | } |
| | | }, |
| | | getFile(e) { |
| | | if (e.target && e.target.files.length > 0) { |
| | | this.$emit('loading') |
| | | const formdate = new FormData() |
| | | formdate.append('file', e.target.files[0]) |
| | | formdate.append('folder', this.folder) |
| | | axios.post(this.uploadImgUrl, formdate) |
| | | .then(res => { |
| | | this.$emit('success', res.data.data) |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error(e) |
| | | }) |
| | | .finally(() => { |
| | | this.$refs.file.value = null |
| | | }) |
| | | } |
| | | }, |
| | | deleItem(index) { |
| | | this.$emit('dele', index) |
| | | } |
| | | } |
| | | import axios from 'axios' |
| | | export default { |
| | | props: { |
| | | width: { |
| | | type: String, |
| | | default: '90px' |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '90px' |
| | | }, |
| | | list: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | tips: { |
| | | type: String, |
| | | default: '0' |
| | | }, |
| | | accept: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | folder: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/upload' |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | fileType (url) { |
| | | if (url.indexOf('.mp4') !== -1) { |
| | | return 'video' |
| | | } else { |
| | | return 'img' |
| | | } |
| | | }, |
| | | getFile (e) { |
| | | if (e.target && e.target.files.length > 0) { |
| | | this.$emit('loading') |
| | | const formdate = new FormData() |
| | | formdate.append('file', e.target.files[0]) |
| | | formdate.append('folder', this.folder) |
| | | axios.post(this.uploadImgUrl, formdate) |
| | | .then(res => { |
| | | this.$emit('success', res.data.data) |
| | | console.log(res.data.data) |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error(e) |
| | | }) |
| | | .finally(() => { |
| | | this.$refs.file.value = null |
| | | }) |
| | | } |
| | | }, |
| | | deleItem (index) { |
| | | this.$emit('dele', index) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | overflow: hidden; |
| | | border-radius: 5px; |
| | | border: 1px solid #d5d5d5; |
| | | margin-left: 15px; |
| | | margin: 5px; |
| | | position: relative; |
| | | &:first-child { |
| | | margin: 0 !important; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 10000; |
| | | cursor: pointer; |
| | | .el-icon-close { |
| | | color: #ffffff; |
| | | font-size: 19px; |
| | | font-size: 14px; |
| | | } |
| | | } |
| | | .el-icon-plus { |
| | |
| | | } |
| | | } |
| | | </style> |
| | | |
| | |
| | | MultipartFile file = multipartRequest.getFile(it.next()); |
| | | String originname = file.getOriginalFilename(); |
| | | is = file.getInputStream(); |
| | | String endType = originname.substring(originname.lastIndexOf("."),originname.length()); |
| | | String date = DateUtil.getNowShortDate(); |
| | | String fName = date+"/"+ UUID.randomUUID()+".jpg"; |
| | | String fName = date+"/"+ UUID.randomUUID()+endType; |
| | | String fileName = folder+"/"+fName; |
| | | boolean r = ftp.uploadInputstream(is,fileName); |
| | | if(r){ |
| | |
| | | @ApiModelProperty(value = "访客二维码") |
| | | private String qrcode; |
| | | |
| | | @ApiModelProperty(value = "类型 0非施工人员访客申请 1施工人员访客申请 2访客报备", example = "1") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "施工事由") |
| | | private String constructionReason; |
| | | |
| | | @ApiModelProperty(value = "审批信息数据") |
| | | @TableField(exist = false) |
| | | private ApproveDataVO approveDateVO; |
| | | |
| | | |
| | |
| | | if (!model.getCheckUserId().equals(hiddenDanger.getEditor())) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"处理人非当前人员!"); |
| | | } |
| | | //整改前文件 |
| | | if(hiddenDanger.getStatus().equals(Constants.ONE)){ |
| | | List<Multifile> beforList = hiddenDanger.getDealBeforeFileList(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(beforList)){ |
| | | for (int i = 0; i < beforList.size(); i++) { |
| | | Multifile multifile = beforList.get(i); |
| | | multifile.setCreateDate(new Date()); |
| | | multifile.setCreator(hiddenDanger.getEditor()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjId(hiddenDanger.getId()); |
| | | multifile.setObjType(Constants.multifileObjType.one); |
| | | multifile.setSortnum(i+1); |
| | | multifileMapper.insert(multifile); |
| | | } |
| | | } |
| | | if(!(hiddenDanger.getStatus().equals(Constants.ONE)||hiddenDanger.getStatus().equals(Constants.TWO))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"数据状态错误!"); |
| | | } |
| | | List<Multifile> afterList = hiddenDanger.getDealAfterFileList(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(afterList)){ |
| | | for (int i = 0; i < afterList.size(); i++) { |
| | | Multifile multifile = afterList.get(i); |
| | | //整改前文件 |
| | | List<Multifile> beforList = hiddenDanger.getDealBeforeFileList(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(beforList)){ |
| | | for (int i = 0; i < beforList.size(); i++) { |
| | | Multifile multifile = beforList.get(i); |
| | | multifile.setCreateDate(new Date()); |
| | | multifile.setCreator(hiddenDanger.getEditor()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjId(hiddenDanger.getId()); |
| | | multifile.setObjType(Constants.multifileObjType.two); |
| | | multifile.setObjType(Constants.multifileObjType.one); |
| | | multifile.setSortnum(i+1); |
| | | multifileMapper.insert(multifile); |
| | | } |
| | | } |
| | | if(hiddenDanger.getStatus().equals(Constants.ONE)){ |
| | | List<Multifile> afterList = hiddenDanger.getDealAfterFileList(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(afterList)){ |
| | | for (int i = 0; i < afterList.size(); i++) { |
| | | Multifile multifile = afterList.get(i); |
| | | multifile.setCreateDate(new Date()); |
| | | multifile.setCreator(hiddenDanger.getEditor()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjId(hiddenDanger.getId()); |
| | | multifile.setObjType(Constants.multifileObjType.two); |
| | | multifile.setSortnum(i+1); |
| | | multifileMapper.insert(multifile); |
| | | } |
| | | } |
| | | } |
| | | hiddenDanger.setEditor(hiddenDanger.getLoginUserInfo().getId()); |
| | |
| | | hiddenDangerLog.setCreateDate(new Date()); |
| | | hiddenDangerLog.setCreator(hiddenDanger.getCreator()); |
| | | hiddenDangerLog.setHiddenDangerId(hiddenDanger.getId()); |
| | | hiddenDangerLog.setTitle(hiddenDanger.getStatus().equals(Constants.ONE)?"隐患处理":"隐患转交"); |
| | | hiddenDangerLog.setTitle(hiddenDanger.getStatus().equals(Constants.ONE)?"隐患处理":"隐患退回"); |
| | | hiddenDangerLog.setObjType(hiddenDanger.getStatus().equals(Constants.ONE)?Constants.FOUR:Constants.TWO); |
| | | hiddenDangerLogMapper.insert(hiddenDangerLog); |
| | | } |
| | |
| | | if (!Constants.equalsInteger(model.getStatus(),Constants.ZERO)) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"数据状态已流转!"); |
| | | } |
| | | if (!Constants.equalsInteger(model.getCheckUserId(),hiddenDanger.getEditor())) { |
| | | if (!Constants.equalsInteger(model.getCheckUserId(),hiddenDanger.getLoginUserInfo().getMemberId())) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"处理人非当前人员!"); |
| | | } |
| | | if(Constants.equalsInteger(model.getCheckUserId(),hiddenDanger.getCheckUserId())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"无法转交给自己"); |
| | | } |
| | | Member member = memberMapper.selectById(hiddenDanger.getCheckUserId()); |
| | | if(member == null || !Constants.equalsInteger(member.getType(), Constants.TWO) || Constants.equalsInteger(Constants.ZERO,member.getIsdeleted())){ |
| | | if(member == null || !Constants.equalsInteger(member.getType(), Constants.TWO) || Constants.equalsInteger(Constants.ONE,member.getIsdeleted())){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,转交人信息不存在,请刷新页面重试!"); |
| | | } |
| | | hiddenDanger.setEditor(hiddenDanger.getLoginUserInfo().getId()); |
| | |
| | | hiddenDangerLog.setCreator(hiddenDanger.getEditor()); |
| | | hiddenDangerLog.setEditDate(hiddenDangerLog.getCreateDate()); |
| | | hiddenDangerLog.setEditor(hiddenDanger.getCreator()); |
| | | hiddenDangerLog.setTitle("由"+StringUtils.defaultString(hiddenDanger.getCheckorName())+"转交给"+StringUtils.defaultString(member.getName())); |
| | | hiddenDangerLog.setTitle("转交给"+StringUtils.defaultString(member.getName())); |
| | | hiddenDangerLog.setHiddenDangerId(hiddenDanger.getId()); |
| | | hiddenDangerLog.setObjType(Constants.ONE); |
| | | hiddenDangerLogMapper.insert(hiddenDangerLog); |
| | |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_PREFIX).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_AUDIT_VISIT).getCode()); |
| | | }else if(dataSyncConfig.getVisitorDataOrigin().equals(Constants.ZERO)){ |
| | | visits.setStatus(Constants.VisitStatus.pass); |
| | | visits.setStatus(Constants.VisitStatus.waitCheck); |
| | | visitsMapper.updateById(visits); |
| | | approveService.createApproveFlow(visits.getType(),visits.getId(),visits.getReceptMemberId()); |
| | | }else{ |
| | |
| | | |
| | | @Override |
| | | public PageData<Visits> findPage(PageWrap<Visits> pageWrap) { |
| | | IPage<Visits> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | IPage<Visits> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<Visits> queryWrapper = new MPJLambdaWrapper<>(); |
| | | |
| | | queryWrapper.selectAll(Visits.class); |
| | |
| | | queryWrapper.eq(Visits::getIsdeleted,Constants.ZERO); |
| | | queryWrapper.eq(pageWrap.getModel().getType()!=null,Visits::getType,pageWrap.getModel().getType()); |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getType()),Visits::getType,pageWrap.getModel().getType()); |
| | | queryWrapper.eq(StringUtils.isNotBlank(pageWrap.getModel().getOpenid()),Visits::getOpenid,pageWrap.getModel().getOpenid()); |
| | | queryWrapper.eq(StringUtils.isBlank(pageWrap.getModel().getOpenid()),"1","2"); |
| | | queryWrapper.and(StringUtils.isNotBlank(pageWrap.getModel().getName()),ms->ms.like(Visits::getName,pageWrap.getModel().getName()) |
| | | .or().like(Visits::getPhone,pageWrap.getModel().getName())) |
| | | .eq(StringUtils.isNotBlank(pageWrap.getModel().getIdcardNo()),Visits::getIdcardNo,DESUtil.encrypt(Constants.EDS_PWD, pageWrap.getModel().getIdcardNo())) |
| | |
| | | visitDetailVO.setName(visits.getName()); |
| | | visitDetailVO.setCompanyName(visits.getCompanyName()); |
| | | visitDetailVO.setFaceImg(visits.getFaceImg()); |
| | | visitDetailVO.setType(visits.getType()); |
| | | visitDetailVO.setConstructionReason(visits.getConstructionReason()); |
| | | visitDetailVO.setImgUrl(visits.getImgurl()); |
| | | visitDetailVO.setIdCardDecode(visits.getIdcardDecode()); |
| | | visitDetailVO.setPrefix(systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() + |