Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
| | |
| | | ## dmvisit |
| | | 基础工程:Eva v2.0 |
| | | 官网:http://eva.adjustrd.com/ |
| | | 技术支持QQ群:877957236 |
| | | |
| | | 访客系统 |
| | | 1、安装nacos服务 |
| | | 2、按照mysql5.x |
| | | 3、jdk1.8安装 |
| | | 4、redis安装 |
| | | 5、ftp安装 |
| | | |
| | | |
| | | |
| | | nohup java -Xms512m -Xmx512m -Xmn512m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=10018 -jar /usr/local/jars/dmvisit/openapi.jar >/usr/local/jars/dmvisit/web.log 2>/usr/local/jars/dmvisit/err.log & |
| | | |
| | | |
| | | |
| | | 重要: |
| | | 1、关于外网访问限制 ,如果服务器重启了或者网卡重启,进行一下操作: |
| | | vim /etc/resolv.conf |
| | | nameserver 改成 nameserver 202.102.192.68 |
| | | |
| | | |
| | | #nohup不产生日志文件命令: |
| | | nohup java -jar /usr/local/jars/admin_interface.jar > /dev/null 2>&1 & |
| | | nohup java -jar /usr/local/jars/admin_timer.jar > /dev/null 2>&1 & |
| | | nohup java -jar /usr/local/jars/meeting_admin.jar > /dev/null 2>&1 & |
| | | nohup java -jar /usr/local/jars/system_gateway.jar > /dev/null 2>&1 & |
| | | nohup java -jar /usr/local/jars/system_timer.jar > /dev/null 2>&1 & |
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | export function updateTotalNum (data) { |
| | | return request.get('/visitsAdmin/cloudService/business/platformJob/updateTotalNum?ids='+data) |
| | | } |
| | | // 车辆排队情况 |
| | | export function platformLineUpPage (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/platform/platformLineUpPage', data, { |
| | |
| | | computeTableHeight () { |
| | | this.$nextTick(() => { |
| | | const height = window.innerHeight |
| | | console.log('main_app========================:'+height) |
| | | // console.log('main_app========================:'+height) |
| | | const height13 = this.getEleHeghtByClassName('common-header',0) |
| | | const height5 = document.getElementsByTagName('thead') && document.getElementsByTagName('thead')[0] ? document.getElementsByTagName('thead')[0].clientHeight : 0 |
| | | if (document.getElementsByClassName('main_app') && document.getElementsByClassName('main_app')[0]) { |
| | | console.log('main_app========================') |
| | | // console.log('main_app========================') |
| | | // alert(height) |
| | | const height3 = this.getEleHeghtByClassName('main-header',0) |
| | | const height4 = this.getEleHeghtByClassName('table-pagination',0) |
| | |
| | | const height11 = this.getEleHeghtByClassName('el-tabs-ele',0) |
| | | const height12 = this.getEleHeghtByClassName('platgroup_tabs',0) |
| | | this.$router.app.$store.commit('setTableHeightNew', height - height13- height3 - height5 - height6 - height2 - height7 - height4 - height9 - height10 - height11 - height12) |
| | | console.log('gableHeightNew', this.$router.app.$store.state.tableHeightNew) |
| | | // console.log('gableHeightNew', this.$router.app.$store.state.tableHeightNew) |
| | | } else { |
| | | console.log('tableLayout========================') |
| | | // console.log('tableLayout========================') |
| | | const height1 = this.getEleHeghtByClassName('table-search-form', 40,16) |
| | | const height3 = this.getEleHeghtByClassName('main-header', 0) |
| | | const height4 = this.getEleHeghtByClassName('table-pagination', 0) |
| | | const height2 = this.getEleHeghtByClassName('toolbar', 0) |
| | | console.log('defualtlength', document.getElementsByClassName('table-search-form').length) |
| | | // console.log('defualtlength', document.getElementsByClassName('table-search-form').length) |
| | | this.$router.app.$store.commit('setTableHeightNew', height - height4 - height3 - height2 - height1 - height5 - height13) |
| | | console.log('gableHeightNew', this.$router.app.$store.state.tableHeightNew) |
| | | // console.log('gableHeightNew', this.$router.app.$store.state.tableHeightNew) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if ((document.getElementsByClassName(name) && document.getElementsByClassName(name)[0])) { |
| | | let t = 0 |
| | | document.getElementsByClassName(name).forEach(e => { |
| | | console.log(name+'========================' + t + ':' + e.clientHeight) |
| | | // console.log(name+'========================' + t + ':' + e.clientHeight) |
| | | t++ |
| | | }) |
| | | return document.getElementsByClassName(name)[document.getElementsByClassName(name).length - 1].clientHeight+(margin||0) |
| | |
| | | class="upload-demo" |
| | | :accept="uploadData.fileTyp" |
| | | :action="uploadImgUrl" |
| | | :limit="1" |
| | | :limit="this.fileLength" |
| | | :on-exceed="handleExceed" |
| | | :on-success="handleFileSuccess" |
| | | :on-error="uploadError" |
| | | :before-upload="beforeFileUpload" |
| | | :file-list="fileList"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">只能上传{{ uploadData.fileType }}文件,且不超过5mb</div> |
| | | <div slot="tip" class="el-upload__tip" >只能上传{{ this.fileLength }}个文件,数量超过请删除已传附件重新上传</div> |
| | | </el-upload> |
| | | </div> |
| | | |
| | |
| | | type: String, |
| | | default: 'width: 190px; height: 190px;' |
| | | }, |
| | | fileLength:{ |
| | | type: Number, |
| | | default: () => 1 |
| | | }, |
| | | uploadData: Object |
| | | }, |
| | | data() { |
| | | return { |
| | | fileList:null, |
| | | fileList: [], |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/upload?folder='+this.uploadData.folder |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | // 上传图片 |
| | | handleExceed(){}, |
| | | handleExceed(){ |
| | | if(this.fileList && this.fileList.length >= this.fileLength){ |
| | | this.$message.error('只允许上传【'+this.fileLength+'个附件】') |
| | | } |
| | | }, |
| | | handleFileSuccess(res, file) { |
| | | if (res.code == 200) { |
| | | let { data } = res |
| | | // this.fileList = [{name: data.originname, url: data.url }] |
| | | this.fileList = [{name: data.originname, url: data.url }] |
| | | this.$message.success('上传成功') |
| | | this.$emit('uploadSuccess', { fileurl: data.imgaddr, fileurlFull: data.url, name: data.originname }) |
| | | } else { |
| | |
| | | this.$message.error('上传失败') |
| | | this.$emit('uploadEnd') |
| | | }, |
| | | // // 拦截 |
| | | // |
| | | beforeFileUpload(file) { |
| | | if(this.fileList && this.fileList.length >= this.fileLength){ |
| | | this.$message.error('只允许上传【'+this.fileLength+'w文件】') |
| | | return false; |
| | | } |
| | | this.$emit('uploadBegin') |
| | | return true |
| | | } |
| | |
| | | |
| | | <style lang="scss" scoped> |
| | | $image-width: 100px; |
| | | $image-height: 30px; |
| | | .avatar-uploader { |
| | | width: $image-width; |
| | | width: 100px; |
| | | height: $image-width; |
| | | } |
| | | ::v-deep .el-upload { |
| | |
| | | cursor: pointer; |
| | | position: relative; |
| | | width: $image-width; |
| | | height: $image-width; |
| | | height: $image-height; |
| | | overflow: hidden; |
| | | } |
| | | .avatar-uploader .el-upload:hover { |
| | |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: $image-width; |
| | | height: $image-width; |
| | | height: $image-height; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: $image-width; |
| | | height: $image-width; |
| | | height: $image-height; |
| | | display: block; |
| | | } |
| | | .tips-style { |
| | |
| | | width: 90px !important; |
| | | height: 90px !important; |
| | | } |
| | | ::v-deep .el-upload-list__item { |
| | | width: 80% !important; |
| | | height: 50px !important; |
| | | } |
| | | |
| | | .icon { |
| | | -webkit-transform: translate(-50%,-50%); |
| | | -ms-transform: translate(-50%,-50%); |
| | | transform: translate(0%, -85%); |
| | | } |
| | | |
| | | ::v-deep .el-upload-list__item { |
| | | width: 500px !important; |
| | | height: 30px !important; |
| | | } |
| | | </style> |
| | | |
| | |
| | | <el-input v-model="form.label" placeholder="请输入数据标签" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="是否富文本" prop="istext" > |
| | | <el-switch v-model="form.istext" :active-value="true" :inactive-value="false"/> |
| | | <span class="status-text">{{form.istext | disabledText1}}</span> |
| | | <el-radio-group v-model="form.istext"> |
| | | <el-radio :label="0" value="0">文本</el-radio> |
| | | <el-radio :label="1" value="1">图片|文件</el-radio> |
| | | <el-radio :label="2" value="2">富文本</el-radio> |
| | | </el-radio-group> |
| | | <!-- <el-switch v-model="form.istext" :active-value="true" :inactive-value="false"/> |
| | | <span class="status-text">{{form.istext | disabledText1}}</span>--> |
| | | </el-form-item> |
| | | <el-form-item label="数据值" prop="code" required> |
| | | <el-input v-if="!form.istext" v-model="form.code" placeholder="请输入数据值" v-trim/> |
| | | <RichEditor v-else :richData="form.code" :styleEditor="styleEditor" @getWangedditor="getWangedditor" :readonly="false"/> |
| | | <template v-if="form.istext == 1" > |
| | | <UploadFile :uploadData="{ folder: 'richeditor',fileType:'' }" :fileList="fileList" @uploadSuccess="fileUploaded" /> |
| | | <el-input readonly v-model="form.code" placeholder="完整数据值" v-trim/> |
| | | </template> |
| | | <RichEditor v-if="form.istext == 2" :richData="form.code" :styleEditor="styleEditor" @getWangedditor="getWangedditor" :readonly="false"/> |
| | | <el-input v-if="form.istext == 0" v-model="form.code" placeholder="请输入数据值" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="disabled" required class="form-item-status"> |
| | | <el-switch v-model="form.disabled" :active-value="false" :inactive-value="true"/> |
| | |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import RichEditor from '@/components/common/RichEditor' |
| | | import UploadFile from "@/components/common/UploadFile"; |
| | | export default { |
| | | name: 'OperaDictDataWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow,RichEditor }, |
| | | components: {UploadFile, GlobalWindow,RichEditor }, |
| | | data () { |
| | | return { |
| | | // 表单数据 |
| | |
| | | code: '', |
| | | label: '', |
| | | disabled: false, |
| | | istext: false, |
| | | istext: 0, |
| | | remark:'' |
| | | }, |
| | | fileList: [], |
| | | // 验证规则 |
| | | rules: { |
| | | label: [ |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | fileUploaded(data){ |
| | | this.form.code = data.fileurlFull |
| | | }, |
| | | getWangedditor(val){ |
| | | this.form.code =val |
| | | }, |
| | |
| | | open (title, dictId, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | |
| | | this.form.istext = 0 |
| | | // 新建 |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form.id = null |
| | | this.form.dictId = dictId |
| | | this.form.istext=false |
| | | this.form.istext=0 |
| | | }) |
| | | return |
| | | } |
| | |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | this.form.dictId = dictId |
| | | this.form.istext=false |
| | | this.form.istext = 0 |
| | | } |
| | | }) |
| | | } |
| | |
| | | const height11 = getEleHeghtByClassName('el-tabs-ele', 0) |
| | | const height12 = getEleHeghtByClassName('platgroup_tabs', 0,20) |
| | | router.app.$store.commit('setTableHeightNew', height -10 - height2 - height3 - height4 - height5 - height6 - height7 - height9 - height10 - height11 - height12 - height13) |
| | | console.log('gableHeightNew', router.app.$store.state.tableHeightNew) |
| | | // console.log('gableHeightNew', router.app.$store.state.tableHeightNew) |
| | | } else { |
| | | // console.log('tableLayout========================') |
| | | const height1 = getEleHeghtByClassName('table-search-form', 40, 16) |
| | |
| | | const height2 = getEleHeghtByClassName('toolbar', 0) |
| | | console.log('defualtlength', document.getElementsByClassName('table-search-form').length) |
| | | router.app.$store.commit('setTableHeightNew', height - height4 - height3 - height2 - height1 - height5 - height13) |
| | | console.log('gableHeightNew', router.app.$store.state.tableHeightNew) |
| | | // console.log('gableHeightNew', router.app.$store.state.tableHeightNew) |
| | | } |
| | | } |
| | | |
| | |
| | | <el-option label="人脸认证通过" value="196893"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="门禁点" prop="srcName"> |
| | | <el-input v-model="searchForm.srcName" placeholder="请输入门禁点" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="起止时间" prop="eventType"> |
| | | <!-- <el-date-picker @change="seleTime" v-model="time" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间"> |
| | |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:deviceevent:exportExcel']"> |
| | | <!-- |
| | | <li><el-button type="primary" :loading="isWorking.export" v-permissions="['business:deviceevent:exportExcel']" @click="exportExcel">导出</el-button></li> |
| | | --> |
| | | </ul> |
| | | <el-table :height="tableHeightNew" v-loading="isWorking.search" :data="tableData.list" stripe> |
| | | <!-- <el-table-column prop="userType" label="人员类型" min-width="100px"> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="抓拍照片" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-image v-if="row.extEventPictureURL" style="width: 80px; height: 80px" :src="row.extEventPictureURL" |
| | | :preview-src-list="[row.extEventPictureURL]"> |
| | | </el-image> |
| | | <el-image v-if="row.extEventPictureURL" style="width: 80px; height: 80px" :src="row.extEventPictureURL" :preview-src-list="[row.extEventPictureURL]"> </el-image> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | eventType: '', |
| | | startTime: '', |
| | | endTime: '', |
| | | radio: 0 |
| | | radio: 0, |
| | | srcName: '' |
| | | }, |
| | | time: [] |
| | | } |
| | |
| | | <span v-if="row.status === 9" style="color: gray">已失效</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="在园状态" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.status == 7 && row.retentionNum && row.retentionNum >0 ">是</span> |
| | | <span v-else >否</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="下发备注" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="创建时间" min-width="170px"></el-table-column> |
| | | <el-table-column label="操作" |
| | |
| | | <!-- {{ row.status==0 ? '正常' : '取消' }} --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="会议需求" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="创建时间" align="center" min-width="150px"></el-table-column> |
| | | <!-- <el-table-column prop="content" label="会议内容" min-width="100px"></el-table-column> --> |
| | | <el-table-column v-if=" |
| | | containPermissions([ |
| | | 'business:bookings:update', |
| | |
| | | <div class="item-title">会议内容</div> |
| | | <div class="item-value">{{ form.content || "无" }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="item-title">会议需求</div> |
| | | <div class="item-value">{{ form.remark || "无" }}</div> |
| | | </div> |
| | | <div v-if="form.projectList && form.projectList.length" class="item"> |
| | | <div class="">服务项</div> |
| | | <div class="item-value"> |
| | |
| | | <FileLink :links="form.fileList" linkName="fileFullUrl" /> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="会议备注" prop="remark"> |
| | | <el-input type="textarea" v-model="form.remark" placeholder="请输入会议备注" v-trim /> |
| | | <el-form-item label="会议需求" prop="remark"> |
| | | <el-input type="textarea" v-model="form.remark" placeholder="请输入会议需求" v-trim /> |
| | | </el-form-item> |
| | | <input type="file" @change="upFiles" ref="upFile" style="display: none;" /> |
| | | </el-form> |
| | |
| | | <el-button type="primary" @click="complete(ids)">完成作业</el-button> |
| | | <el-button :loading="exLoading" @click="handleEx" |
| | | v-permissions="['business:platformjob:exportExcel']">导出</el-button> |
| | | <el-button :loading="updateLoading" @click="updateTotalNum" |
| | | v-permissions="['business:platformjob:updateTotalNum']">重置总作业量</el-button> |
| | | </div> |
| | | <el-table :height="tableHeightNew" v-loading="loading" :data="list" @selection-change="handleSelectionChange" stripe> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="billCode" label="运单号" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="totalNum" label="总作业量(万只)" min-width="130" show-overflow-tooltip /> |
| | | <el-table-column prop="totalNum" label="总作业量(万支)" min-width="130" show-overflow-tooltip /> |
| | | <el-table-column prop="carCodeFront" label="车牌前照号" min-width="100" show-overflow-tooltip /> |
| | | <!-- <el-table-column prop="carCodeBack" label="车牌后照号" min-width="100" show-overflow-tooltip /> --> |
| | | <el-table-column prop="taskOrigin" label="任务来源" min-width="100" show-overflow-tooltip /> |
| | |
| | | <script> |
| | | import Pagination from '@/components/common/Pagination' |
| | | import QueryForm from '@/components/common/QueryForm' |
| | | import { platformJobPage, platformJobExport, platformJobDel, dealJobFinish } from '@/api' |
| | | import { platformJobPage, platformJobExport, platformJobDel, dealJobFinish ,updateTotalNum} from '@/api' |
| | | import { statusMap } from '../config' |
| | | import WaybillDetailRef from "../components/WaybillDetail.vue" |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | |
| | | statusMap, |
| | | isShowDetail: false, |
| | | exLoading: false, |
| | | updateLoading: false, |
| | | loading: false, |
| | | pagination: { |
| | | pageSize: 10, |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | updateTotalNum() { |
| | | this.$dialog.actionConfirm('确认进行该操作吗?','操作提示') |
| | | .then(() => { |
| | | this.updateLoading = true |
| | | updateTotalNum('') |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.updateLoading = false |
| | | }) |
| | | }) |
| | | }, |
| | | clear() { |
| | | this.pagination.page = 1 |
| | | this.filters = {} |
| | |
| | | <span>{{ scope.row.billCode || scope.row.contractNum }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="totalNum" label="总作业量(万只)" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="totalNum" label="总作业量(万支)" min-width="100" show-overflow-tooltip /> |
| | | </el-table> |
| | | <div class="mt20"> |
| | | <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> |
| | |
| | | </view>
|
| | | <view class="confirm_b_item">
|
| | | <view class="label">
|
| | | <text>备注</text>
|
| | | <text>会议需求</text>
|
| | | </view>
|
| | | <view class="input">
|
| | | <textarea
|
| | |
| | | <view class="value">{{ item.bookingUser }}</view>
|
| | | </view>
|
| | | <view class="line">
|
| | | <view class="label">备注:</view>
|
| | | <view class="label">会议需求:</view>
|
| | | <view class="value">{{ item.remark || item.meetingRemark }}</view>
|
| | | </view>
|
| | | </view>
|
| | |
| | | <view class="value">{{ item.bookingUser }}</view>
|
| | | </view>
|
| | | <view class="line">
|
| | | <view class="label">备注:</view>
|
| | | <view class="label">会议需求:</view>
|
| | | <view class="value">{{ item.remark || item.meetingRemark }}</view>
|
| | | </view>
|
| | | </view>
|
| | |
| | | </view>
|
| | | <view class="item">
|
| | | <view class="name">
|
| | | <text>备注</text>
|
| | | <text>会议需求</text>
|
| | | </view>
|
| | | <view class="line">
|
| | | <u-textarea border="none" autoHeight v-model="param.remark" :maxlength="-1" placeholder="请输入" placeholder-class="placeholder9"
|
| | |
| | | <div class="com_header"> |
| | | <div class="title"> |
| | | <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> |
| | | <div>累计出库量统计(万只)</div> |
| | | <div>累计出库量统计(万支)</div> |
| | | </div> |
| | | <div class="tabs"> |
| | | <div class="tab" :class="{ active: activeTab1 == 0 }" @click="tabClick1(0)">本月</div> |
| | |
| | | proxy: { |
| | | "/gateway_interface": { |
| | | // target: "http://192.168.0.104:10010", |
| | | target: "http://10.50.250.253:8088/gateway_interface", |
| | | // target: "https://atwl.ahzyssl.com/zhyq_interface", |
| | | // target: "http://10.50.250.253:8088/gateway_interface", |
| | | target: "https://atwl.ahzyssl.com/zhyq_interface", |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/gateway_interface/, ""), |
| | | }, |
| | |
| | | 基础工程:Eva v2.0 |
| | | 官网:http://eva.adjustrd.com/ |
| | | 技术支持QQ群:877957236 |
| | | |
| | | 1、安装nacos服务 |
| | | 2、按照mysql5.x |
| | | 3、jdk1.8安装 |
| | | 4、redis安装 |
| | | 5、ftp安装 |
| | | |
| | | |
| | | |
| | | nohup java -Xms512m -Xmx512m -Xmn512m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=10018 -jar /usr/local/jars/dmvisit/openapi.jar >/usr/local/jars/dmvisit/web.log 2>/usr/local/jars/dmvisit/err.log & |
| | | |
| | | |
| | | |
| | | 重要: |
| | | 1、关于外网访问限制 ,如果服务器重启了或者网卡重启,进行一下操作: |
| | | vim /etc/resolv.conf |
| | | nameserver 改成 nameserver 202.102.192.68 |
| | | |
| | | |
| | | #nohup不产生日志文件命令: |
| | | nohup java -jar /usr/local/jars/admin_interface.jar > /dev/null 2>&1 & |
| | | nohup java -jar /usr/local/jars/admin_timer.jar > /dev/null 2>&1 & |
| | | nohup java -jar /usr/local/jars/meeting_admin.jar > /dev/null 2>&1 & |
| | | nohup java -jar /usr/local/jars/system_gateway.jar > /dev/null 2>&1 & |
| | | nohup java -jar /usr/local/jars/system_timer.jar > /dev/null 2>&1 & |
| | |
| | | servlet: |
| | | session: |
| | | timeout: PT3H #表示12小时 |
| | | |
| | | auth: |
| | | jwt: |
| | | enabled: true #是否开启JWT登录认证功能 |
| | | secret: fjkfaf;afa # JWT私钥,用于校验JWT令牌的合法性 |
| | | expiration: 1800000 #JWT令牌的有效期,用于校验JWT令牌的合法性 |
| | | # expiration: 300000 #JWT令牌的有效期,用于校验JWT令牌的合法性 |
| | | header: JWTHeaderName #HTTP请求的Header名称,该Header作为参数传递JWT令牌 |
| | | userParamName: username #用户登录认证用户名参数名称 |
| | | pwdParamName: password #用户登录认证密码参数名称 |
| | | useDefaultController: true # 是否使用默认的JwtAuthController |
| | |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | @ExcelColumn(name="会议需求",index = 7,width = 10) |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "会议主题") |
| | |
| | | #!/bin/bash |
| | | /usr/local/mysql/bin/mysqldump -h127.0.0.1 -uroot -pAtwl@2024 antaiwuliu > /usr/local/jars/dbbackup/antaiwuliu_$(date +%Y%m%d).sql |
| | | |
| | | # 删除7天前的备份数据 |
| | | find /usr/local/jars/dbbackup -name "antaiwuliu_*.sql" -type f -mtime +7 -exec rm {} \; > /dev/null 2>&1 |
| | | |
| | |
| | | return ApiResponse.success(null); |
| | | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/logoutForH5") |
| | | @ApiOperation("退出登陆") |
| | | public ApiResponse<String> logoutForH5(@RequestHeader(Constants.HEADER_USER_TOKEN) String oldToken){ |
| | |
| | | return ApiResponse.failed(ResponseStatus.SERVER_ERROR); |
| | | } |
| | | return ApiResponse.success(null); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | package com.doumee.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.config.jwt.JwtTokenUtil; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.service.business.third.model.LoginUserInfo; |
| | |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.service.business.third.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.method.HandlerMethod; |
| | |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Slf4j |
| | | public class LoginHandlerInterceptor implements HandlerInterceptor { |
| | | |
| | | private RedisTemplate<String,Object> stringRedisTemplate; |
| | | private long expireTime; |
| | | |
| | | public long getExpireTime() { |
| | | return expireTime; |
| | | } |
| | | |
| | | public void setExpireTime(long expireTime) { |
| | | this.expireTime = expireTime; |
| | | } |
| | | |
| | | // 由于该类未交给spring管理,因此不能使用自动装配的方式获取RedisTemplate对象 |
| | | public LoginHandlerInterceptor(RedisTemplate<String,Object> stringRedisTemplate,long expireTime) { |
| | |
| | | if(user ==null ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"用户登陆已失效,请重新登陆!"); |
| | | } |
| | | stringRedisTemplate.expire(Constants.REDIS_TOKEN_KEY+token,this.expireTime, TimeUnit.MILLISECONDS); |
| | | log.error("=========开始刷新token有效期:"+token+"======time:"+this.getExpireTime()); |
| | | stringRedisTemplate.expire(Constants.REDIS_TOKEN_KEY+token,this.getExpireTime(), TimeUnit.MILLISECONDS); |
| | | //权限判断------------ |
| | | return user; |
| | | } |
| | |
| | | try { |
| | | String userInfo = (String) redisTemplate.opsForValue().get(Constants.REDIS_TOKEN_KEY+token); |
| | | claims = JSONObject.toJavaObject(JSONObject.parseObject(userInfo),LoginUserInfo.class); |
| | | refreshToken(token); |
| | | } catch (Exception e) { |
| | | claims = null; |
| | | } |
| | |
| | | * 向后延伸有效期保持会话继续 |
| | | * @param token |
| | | */ |
| | | |
| | | public void refreshTokenTime(String token ) { |
| | | log.error("===============开始刷新登录token"+token); |
| | | redisTemplate.expire(Constants.REDIS_TOKEN_KEY+token,jwtProperties.getExpiration(), TimeUnit.MILLISECONDS); |
| | | log.error("===============结束刷新登录token"+token); |
| | | // redisTemplate.opsForValue().set(Constants.REDIS_TOKEN_KEY+token,usrerInfo,jwtProperties.getExpiration(), TimeUnit.MILLISECONDS); |
| | | } |
| | | } |
| | |
| | | // 获取验证对象和方法 |
| | | PreventRepeatAdapter adapter = (PreventRepeatAdapter)applicationContext.getBean(prAnnotation.value()); |
| | | // 验证暴力请求 |
| | | if(prAnnotation.limit() > 0 && prAnnotation.lockTime() > 0 && adapter.massive(request, prAnnotation.limit(), prAnnotation.lockTime())) { |
| | | if(prAnnotation.limit() > 0 && prAnnotation.lockTime() > 0 |
| | | && adapter.massive(request, prAnnotation.limit(), prAnnotation.lockTime())) { |
| | | log.warn("Eva Intercept a massive request,url:{}", request.getRequestURI()); |
| | | response.setHeader("content-type", "application/json;charset=UTF-8"); |
| | | ApiResponse apiResponse = ApiResponse.failed(ResponseStatus.MASSIVE_REQUEST); |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | /** |
| | | * @author jiangping |
| | |
| | | public interface VisitServiceFegin { |
| | | |
| | | @ApiOperation("【访客系统】定时查询人员设备授权结果") |
| | | @GetMapping("/timer/empower/syncEmpowerDetailData") |
| | | @PostMapping("/timer/empower/syncEmpowerDetailData") |
| | | ApiResponse syncEmpowerDetailData(); |
| | | @ApiOperation("【访客系统】定时查询人员设备授权下载进度") |
| | | @GetMapping("/timer/empower/syncEmpowerResultData") |
| | | @PostMapping("/timer/empower/syncEmpowerResultData") |
| | | ApiResponse syncEmpowerResultData(); |
| | | @ApiOperation("【访客系统】定时重新下发失败的授权数据") |
| | | @GetMapping("/timeempowerr/syncEmpowerFailData") |
| | | @PostMapping("/timeempowerr/syncEmpowerFailData") |
| | | ApiResponse syncEmpowerFailData(); |
| | | @ApiOperation("【访客系统】定时刷新人员设备授权") |
| | | @GetMapping("/timer/empower/syncEmpowerData") |
| | | @PostMapping("/timer/empower/syncEmpowerData") |
| | | ApiResponse syncEmpowerData(); |
| | | @ApiOperation("【访客系统】定时查询设备状态") |
| | | @GetMapping("/timer/device/getAscDeviceStatus") |
| | | @PostMapping("/timer/device/getAscDeviceStatus") |
| | | ApiResponse getAscDeviceStatus() ; |
| | | @ApiOperation("【访客系统】设置全部LED屏显内容为默认内容") |
| | | @GetMapping("/timer/device/setAllLedDefualtContent") |
| | | ApiResponse setAllLedDefualtContent() ; |
| | | @PostMapping("/timer/device/allLedDefualtContent") |
| | | ApiResponse allLedDefualtContent(); |
| | | @ApiOperation("【访客系统】定时备份数据库") |
| | | @GetMapping("/timer/db/backupDatabase") |
| | | @PostMapping("/timer/db/backupDatabase") |
| | | ApiResponse backupDatabase() ; |
| | | @ApiOperation("【访客系统】定时查询月台状态") |
| | | @GetMapping("/timer/platform/getPlatformStatus") |
| | | @PostMapping("/timer/platform/getPlatformStatus") |
| | | ApiResponse getPlatformStatus() ; |
| | | @ApiOperation("【访客系统】定时下载海康系统图片数据") |
| | | @GetMapping("/timer/image/downHKImgs") |
| | | @PostMapping("/timer/image/downHKImgs") |
| | | ApiResponse downHKImgs(); |
| | | @ApiOperation("【访客系统】定时接口日志清理") |
| | | @GetMapping("/timer/log/clearThreeMonthLog") |
| | | @PostMapping("/timer/log/clearThreeMonthLog") |
| | | ApiResponse clearThreeMonthLog(); |
| | | @ApiOperation("【访客系统】定时车辆包期授权") |
| | | @GetMapping("/timer/park/syncParkBookData") |
| | | @PostMapping("/timer/park/syncParkBookData") |
| | | ApiResponse syncParkBookData(); |
| | | @ApiOperation("【访客系统】定时查询车辆查询") |
| | | @GetMapping("/timer/park/syncVehicleUpdateData") |
| | | @PostMapping("/timer/park/syncVehicleUpdateData") |
| | | ApiResponse syncVehicleUpdateData() ; |
| | | @ApiOperation("【访客系统】定时同步海康组织数据") |
| | | @GetMapping("/timer/orguser/syncOrgData") |
| | | @PostMapping("/timer/orguser/syncOrgData") |
| | | ApiResponse syncOrgData() ; |
| | | @ApiOperation("【访客系统】定时重新下发删除人员数据") |
| | | @GetMapping("/timer/orguser/syncMemberDelData") |
| | | @PostMapping("/timer/orguser/syncMemberDelData") |
| | | ApiResponse syncMemberDelData() ; |
| | | @ApiOperation("【访客系统】定时同步海康人员数据") |
| | | @GetMapping("/timer/orguser/syncUserData") |
| | | @PostMapping("/timer/orguser/syncUserData") |
| | | ApiResponse syncUserData(); |
| | | @ApiOperation("【访客系统】定时冻结人员") |
| | | @GetMapping("/timer/orguser/memberFreeze") |
| | | @PostMapping("/timer/orguser/memberFreeze") |
| | | ApiResponse memberFreeze(); |
| | | @ApiOperation("【访客系统】定时下发访客预约申请") |
| | | @GetMapping("/timer/visit/syncVisitData") |
| | | @PostMapping("/timer/visit/syncVisitData") |
| | | ApiResponse syncVisitData() ; |
| | | @ApiOperation("【访客系统】定时查询访客预约状态") |
| | | @GetMapping("/timer/visit/getOutTimeVisitRecord") |
| | | @PostMapping("/timer/visit/getOutTimeVisitRecord") |
| | | ApiResponse getOutTimeVisitRecord(); |
| | | @ApiOperation("【访客系统】定时今日的访客预约数据") |
| | | @GetMapping("/timer/visit/syncVistAppointData") |
| | | @PostMapping("/timer/visit/syncVistAppointData") |
| | | ApiResponse syncVistAppointData() ; |
| | | // @ApiOperation("【访客系统】定时更新微信公众号accesstoken") |
| | | // @GetMapping("/timer/wxtoken/updateWxAccessToken") |
| | | // @PostMapping("/timer/wxtoken/updateWxAccessToken") |
| | | // ApiResponse updateWxAccessToken(); |
| | | @ApiOperation("【访客系统】访客数据即将超时预警") |
| | | @GetMapping("/timer/visit/visitTimeOut") |
| | | @PostMapping("/timer/visit/visitTimeOut") |
| | | ApiResponse visitTimeOut() ; |
| | | @ApiOperation("【访客系统】访客申请待审批记录截止时间已过自动取消预约") |
| | | @GetMapping("/timer/visit/visitNoCheckCancel") |
| | | @PostMapping("/timer/visit/visitNoCheckCancel") |
| | | ApiResponse visitNoCheckCancel() ; |
| | | @ApiOperation("【数字化月台】月台停靠超时报警业务") |
| | | @GetMapping("/timer/platformJob/platformJobTimer") |
| | | @PostMapping("/timer/platformJob/platformJobTimer") |
| | | ApiResponse platformJobTimer(); |
| | | @ApiOperation("【数字化月台】月台检查电子锁上锁状态") |
| | | @GetMapping("/timer/platformJob/platformCheckWmsLockStatus") |
| | | @PostMapping("/timer/platformJob/platformCheckWmsLockStatus") |
| | | ApiResponse platformCheckWmsLockStatusTimer(); |
| | | @ApiOperation("【数字化月台】月台作业超时报警业务") |
| | | @GetMapping("/timer/platformJob/platformJobWorkTimeOut") |
| | | @PostMapping("/timer/platformJob/platformJobWorkTimeOut") |
| | | ApiResponse platformJobWorkTimeOut(); |
| | | @ApiOperation("【数字化月台】月台等待作业超时业务") |
| | | @GetMapping("/timer/platformJob/platformJobWaitTimeOut") |
| | | @PostMapping("/timer/platformJob/platformJobWaitTimeOut") |
| | | ApiResponse platformJobWaitTimeOut(); |
| | | @ApiOperation("【短信通知】定时发送等待短信任务") |
| | | @GetMapping("/timer/sms/sendWaitingSmsNotice") |
| | | @PostMapping("/timer/sms/sendWaitingSmsNotice") |
| | | ApiResponse sendWaitingSmsNotice(); |
| | | |
| | | @ApiOperation("【数字化月台】月台今日作业未完成通知定时") |
| | | @GetMapping("/timer/platformJob/sendUnFinishNotice") |
| | | @PostMapping("/timer/platformJob/sendUnFinishNotice") |
| | | ApiResponse sendUnFinishNotice(); |
| | | |
| | | |
| | |
| | | import com.doumee.dao.timer.entity.QuartzJob; |
| | | import com.doumee.dao.timer.mapper.QuartzJobMapper; |
| | | import com.doumee.dao.timer.scheduler.QuartzManage; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.quartz.CronTrigger; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | @Service |
| | | @Slf4j |
| | | public class TimerBizSevice { |
| | | @Resource |
| | | private QuartzJobMapper quartzJobMapper ; |
| | |
| | | */ |
| | | @PostConstruct |
| | | public void init () { |
| | | log.error("================执行"+System.currentTimeMillis()); |
| | | LambdaQueryWrapper<QuartzJob> queryWrapper = new LambdaQueryWrapper<>() ; |
| | | queryWrapper.in(QuartzJob::getState, JobState.JOB_RUN.getStatus(),JobState.JOB_STOP.getStatus()); |
| | | List<QuartzJob> jobList = quartzJobMapper.selectList(queryWrapper); |
| | | jobList.forEach(quartzJob -> { |
| | | try { |
| | | log.error("================执行"+quartzJob.getId()); |
| | | CronTrigger cronTrigger = quartzManage.getCronTrigger(quartzJob.getId()) ; |
| | | if (Objects.isNull(cronTrigger)){ |
| | | quartzManage.createJob(quartzJob); |
| | |
| | | quartzManage.updateJob(quartzJob); |
| | | } |
| | | }catch (Exception e){ |
| | | // log.error("================执行"+quartzJob.getId()); |
| | | e.printStackTrace(); |
| | | } |
| | | }); |
| | |
| | | spring: |
| | | # 数据源配置 |
| | | datasource: |
| | | url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: doumee |
| | | password: rtjgfEr@&0c0m |
| | | url: jdbc:mysql://112.26.66.25:3306/antaiwuliu?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: Doumee@168&QWERT |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | redis: |
| | |
| | | servlet: |
| | | session: |
| | | timeout: PT3H #表示12小时 |
| | | auth: |
| | | jwt: |
| | | enabled: true #是否开启JWT登录认证功能 |
| | | secret: fjkfaf;afa # JWT私钥,用于校验JWT令牌的合法性 |
| | | expiration: 1800000 #JWT令牌的有效期,用于校验JWT令牌的合法性 |
| | | # expiration: 300000 #JWT令牌的有效期,用于校验JWT令牌的合法性 |
| | | header: JWTHeaderName #HTTP请求的Header名称,该Header作为参数传递JWT令牌 |
| | | userParamName: username #用户登录认证用户名参数名称 |
| | | pwdParamName: password #用户登录认证密码参数名称 |
| | | useDefaultController: true # 是否使用默认的JwtAuthController |
| | |
| | | cloud: |
| | | loadbalancer: |
| | | enabled: true |
| | | retry: |
| | | enabled: false |
| | | nacos: |
| | | # 使用Nacos负载策略,开发环境可以利用就近访问机制定向访问,启动参数如下: |
| | | # -Dspring.cloud.nacos.discovery.cluster-name=自定义 |
| | |
| | | cloud: |
| | | loadbalancer: |
| | | enabled: true |
| | | retry: |
| | | enabled: false |
| | | nacos: |
| | | # 使用Nacos负载策略,开发环境可以利用就近访问机制定向访问,启动参数如下: |
| | | # -Dspring.cloud.nacos.discovery.cluster-name=自定义 |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | |
| | | |
| | | @ApiOperation("数据库备份,保留最近7个备份sql") |
| | | @GetMapping("/backupDatabase") |
| | | @PostMapping("/backupDatabase") |
| | | public ApiResponse backupDatabase() { |
| | | try { |
| | | String timestamp = DateUtil.getNowLongTime(); |
| | |
| | | package com.doumee.api; |
| | | |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.service.business.DeviceService; |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @Autowired |
| | | private DeviceService deviceService; |
| | | @ApiOperation("开启定时查询设备状态") |
| | | @GetMapping("/getAscDeviceStatus") |
| | | @PostMapping("/getAscDeviceStatus") |
| | | public ApiResponse getAscDeviceStatus() { |
| | | hkSyncDeviceService.getAscDeviceStatus(); |
| | | return ApiResponse.success("开启定时查询设备状态成功"); |
| | | } |
| | | @ApiOperation("更新全部LED屏显内容为默认内容") |
| | | @GetMapping("/setAllLedDefualtContent") |
| | | public ApiResponse setAllLedDefualtContent() { |
| | | deviceService.setAllLedDefualtContent(); |
| | | @PostMapping("/allLedDefualtContent") |
| | | public ApiResponse allLedDefualtContent() { |
| | | deviceService.allLedDefualtContent(); |
| | | return ApiResponse.success("更新全部LED屏显内容为默认内容"); |
| | | } |
| | | |
| | |
| | | |
| | | public static Integer endId2 = 0; |
| | | @ApiOperation("开启定时查询人员设备授权结果") |
| | | @GetMapping("/syncEmpowerDetailData") |
| | | @PostMapping("/syncEmpowerDetailData") |
| | | public ApiResponse syncEmpowerDetailData() { |
| | | if(endId2 ==null){ |
| | | endId2 =0; |
| | |
| | | return ApiResponse.success("开启定时查询人员设备授权结果成功"); |
| | | } |
| | | @ApiOperation("开启定时查询人员设备授权下载进度") |
| | | @GetMapping("/syncEmpowerResultData") |
| | | @PostMapping("/syncEmpowerResultData") |
| | | public ApiResponse syncEmpowerResultData() { |
| | | hkSyncEmpowerService.syncEmpowerResultData(0); |
| | | return ApiResponse.success("开启定时查询人员设备授权下载进度成功"); |
| | | } |
| | | |
| | | @ApiOperation("开启定时重新下发失败的授权数据") |
| | | @GetMapping("/syncEmpowerFailData") |
| | | @PostMapping("/syncEmpowerFailData") |
| | | public ApiResponse syncEmpowerFailData() { |
| | | hkSyncEmpowerService.syncEmpowerFailData(0); |
| | | return ApiResponse.success("开启定时重新下发失败的授权数据成功"); |
| | |
| | | @Autowired |
| | | private HkSyncVehicleFromHKServiceImpl hkSyncVehicleFromHKService; |
| | | @ApiOperation("开启定时刷新人员设备授权") |
| | | @GetMapping("/syncEmpowerData") |
| | | @PostMapping("/syncEmpowerData") |
| | | public ApiResponse syncEmpowerData() { |
| | | if(endId ==null){ |
| | | endId =0; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @Autowired |
| | | private HkSyncImgServiceImpl hkSyncImgService; |
| | | @ApiOperation("开启定时下载海康系统图片数据") |
| | | @GetMapping("/downHKImgs") |
| | | @PostMapping("/downHKImgs") |
| | | public ApiResponse downHKImgs() { |
| | | if(dataSyncConfig.getNeedDealImg()!=null && dataSyncConfig.getNeedDealImg()){ |
| | | hkSyncImgService.downHKImgs(0); |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | private VisitsService visitsService; |
| | | |
| | | @ApiOperation("开启定时查询最新人员代办数据状态") |
| | | @GetMapping("/getNoticeList") |
| | | @PostMapping("/getNoticeList") |
| | | public ApiResponse getNoticeList() { |
| | | hkSyncVisitService.syncVisitData(); |
| | | return ApiResponse.success("开启定时下发访客预约申请成功"); |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | private HkSyncParkServiceImpl hkSyncParkService; |
| | | |
| | | @ApiOperation("开启定时车辆包期授权") |
| | | @GetMapping("/syncParkBookData") |
| | | @PostMapping("/syncParkBookData") |
| | | public ApiResponse syncParkBookData() { |
| | | hkSyncParkService.syncParkBookData(); |
| | | return ApiResponse.success("开启定时车辆包期授权成功"); |
| | | } |
| | | @ApiOperation("开启定时查询车辆查询") |
| | | @GetMapping("/syncVehicleUpdateData") |
| | | @PostMapping("/syncVehicleUpdateData") |
| | | public ApiResponse syncVehicleUpdateData() { |
| | | hkSyncVehicleFromHKService.syncVehicleUpdateData(new Date(System.currentTimeMillis()-24*60*60*1000)); |
| | | return ApiResponse.success("开启定时查询车辆查询成功"); |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @Autowired |
| | | private HkSyncPlatformsServiceImpl hkSyncPlatformsService; |
| | | @ApiOperation("开启定时查询月台状态") |
| | | @GetMapping("/getPlatformStatus") |
| | | @PostMapping("/getPlatformStatus") |
| | | public ApiResponse getPlatformStatus() { |
| | | hkSyncPlatformsService.getPlatformStatus(new PlatformStatusRequest()); |
| | | return ApiResponse.success("开启定时查询月台状态成功"); |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @Autowired |
| | | private SmsEmailService smsEmailService; |
| | | @ApiOperation("开启定时短信发送定时任务") |
| | | @GetMapping("/sendWaitingSmsNotice") |
| | | @PostMapping("/sendWaitingSmsNotice") |
| | | public ApiResponse sendWaitingSmsNotice() { |
| | | smsEmailService.sendWaitingSmsNotice(); |
| | | return ApiResponse.success("开启定时短信发送定时任务成功"); |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | private DataSyncConfig dataSyncConfig; |
| | | |
| | | @ApiOperation("开启定时同步海康组织数据") |
| | | @GetMapping("/syncOrgData") |
| | | @PostMapping("/syncOrgData") |
| | | public ApiResponse syncOrgData() { |
| | | log.info("=========================开启定时同步海康组织数据===========start==========="); |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp |
| | |
| | | return ApiResponse.success("开启定时同步海康组织数据成功"); |
| | | } |
| | | @ApiOperation("开启定时重新下发删除人员数据") |
| | | @GetMapping("/syncMemberDelData") |
| | | @PostMapping("/syncMemberDelData") |
| | | public ApiResponse syncMemberDelData() { |
| | | log.info("=========================开启定时重新下发删除人员数据===========start==========="); |
| | | hkSyncOrgUserService.syncMemberDelData(); |
| | |
| | | return ApiResponse.success("开启定时重新下发删除人员数据成功"); |
| | | } |
| | | @ApiOperation("开启定时同步海康人员数据") |
| | | @GetMapping("/syncUserData") |
| | | @PostMapping("/syncUserData") |
| | | public ApiResponse syncUserData() { |
| | | log.info("=========================开启定时同步海康人员数据===========start==========="); |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp |
| | |
| | | return ApiResponse.success("开启定时同步海康人员数据成功"); |
| | | } |
| | | @ApiOperation("开启定时冻结人员") |
| | | @GetMapping("/memberFreeze") |
| | | @PostMapping("/memberFreeze") |
| | | public ApiResponse memberFreeze() { |
| | | memberService.memberFreeze(); |
| | | return ApiResponse.success("开启定时冻结人员成功"); |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | private VisitsService visitsService; |
| | | |
| | | @ApiOperation("开启定时下发访客预约申请") |
| | | @GetMapping("/syncVisitData") |
| | | @PostMapping("/syncVisitData") |
| | | public ApiResponse syncVisitData() { |
| | | hkSyncVisitService.syncVisitData(); |
| | | return ApiResponse.success("开启定时下发访客预约申请成功"); |
| | | } |
| | | @ApiOperation("开启定时查询访客预约状态") |
| | | @GetMapping("/getOutTimeVisitRecord") |
| | | @PostMapping("/getOutTimeVisitRecord") |
| | | public ApiResponse getOutTimeVisitRecord() { |
| | | hkSyncVisitService.getOutTimeVisitRecordIccm(); |
| | | return ApiResponse.success("开启定时查询访客预约状态成功"); |
| | | } |
| | | @ApiOperation("开启定时今日的访客预约数据") |
| | | @GetMapping("/syncVistAppointData") |
| | | @PostMapping("/syncVistAppointData") |
| | | public ApiResponse syncVistAppointData() { |
| | | if(!Constants.DEALING_FROM_HK_VISIT){ |
| | | try { |
| | |
| | | } |
| | | |
| | | @ApiOperation("访客即将超时预警") |
| | | @GetMapping("/visitTimeOut") |
| | | @PostMapping("/visitTimeOut") |
| | | public ApiResponse visitTimeOut() { |
| | | visitsService.syncTimeOutData(); |
| | | return ApiResponse.success("访客即将超时预警"); |
| | | } |
| | | @ApiOperation("待审批记录超时自动取消预约") |
| | | @GetMapping("/visitNoCheckCancel") |
| | | @PostMapping("/visitNoCheckCancel") |
| | | public ApiResponse visitNoCheckCancel() { |
| | | visitsService.visitNoCheckCancel(); |
| | | return ApiResponse.success("待审批记录超时自动取消预约"); |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @Autowired |
| | | private PlatformInterfaceLogService platformInterfaceLogService; |
| | | @ApiOperation("开启定时接口日志清理") |
| | | @GetMapping("/clearThreeMonthLog") |
| | | @PostMapping("/clearThreeMonthLog") |
| | | public ApiResponse clearThreeMonthLog() { |
| | | interfaceLogService.clearThreeMonthLog(); |
| | | wmsInterfaceLogService.clearThreeMonthLog(); |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | |
| | | |
| | | @ApiOperation("月台停靠超时报警业务") |
| | | @GetMapping("/platformJobTimer") |
| | | @PostMapping("/platformJobTimer") |
| | | public ApiResponse platformJobTimer() { |
| | | platformJobService.timeOutReport(); |
| | | return ApiResponse.success("月台停靠超时报警业务"); |
| | | } |
| | | @ApiOperation("月台作业检查电子锁上锁状态") |
| | | @GetMapping("/platformCheckWmsLockStatus") |
| | | @PostMapping("/platformCheckWmsLockStatus") |
| | | public ApiResponse checkWmsLockStatus() { |
| | | platformJobService.checkWmsLockStatus(); |
| | | return ApiResponse.success("月台停靠超时报警业务"); |
| | |
| | | |
| | | |
| | | @ApiOperation("月台作业超时报警业务") |
| | | @GetMapping("/platformJobWorkTimeOut") |
| | | @PostMapping("/platformJobWorkTimeOut") |
| | | public ApiResponse platformJobWorkTimeOut() { |
| | | platformJobService.timeOutWork(); |
| | | return ApiResponse.success("月台作业超时报警业务"); |
| | |
| | | |
| | | |
| | | @ApiOperation("月台等待作业超时业务") |
| | | @GetMapping("/platformJobWaitTimeOut") |
| | | @PostMapping("/platformJobWaitTimeOut") |
| | | public ApiResponse platformJobWaitTimeOut() { |
| | | platformJobService.timeOutCallIn(); |
| | | return ApiResponse.success("月台等待作业超时业务"); |
| | |
| | | |
| | | @PreventRepeat(interval = 2000) |
| | | @ApiOperation("月台今日作业未完成通知定时") |
| | | @GetMapping("/sendUnFinishNotice") |
| | | @PostMapping("/sendUnFinishNotice") |
| | | public synchronized ApiResponse sendUnFinishNotice() { |
| | | log.error("========月台今日作业未完成通知定时============开始"+System.currentTimeMillis()+""); |
| | | platformJobService.sendUnFinishNotice(); |
| | |
| | | import org.apache.shiro.mgt.DefaultSecurityManager; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @Value("${debug_model}") |
| | | private Boolean timing; |
| | | // @ApiOperation("开启定时更新微信公众号accesstoken") |
| | | // @GetMapping("/updateWxAccessToken") |
| | | // @PostMapping("/updateWxAccessToken") |
| | | // public ApiResponse updateWxAccessToken() { |
| | | // DefaultSecurityManager securityManager = new DefaultSecurityManager(); |
| | | // SecurityUtils.setSecurityManager(securityManager); |
| | |
| | | // return ApiResponse.success("开启定时更新微信公众号accesstoken成功"); |
| | | // } |
| | | @ApiOperation("开启定时更新微信公众号accesstoken") |
| | | @GetMapping("/updateWxAccessTokenOrigin") |
| | | @PostMapping("/updateWxAccessTokenOrigin") |
| | | public ApiResponse updateWxAccessTokenOrigin() { |
| | | DefaultSecurityManager securityManager = new DefaultSecurityManager(); |
| | | SecurityUtils.setSecurityManager(securityManager); |
| | |
| | | } |
| | | @ApiOperation("批量更新wms合同总运输量") |
| | | @GetMapping("/updateTotalNum") |
| | | @CloudRequiredPermission("business:platformjob:update") |
| | | @CloudRequiredPermission("business:platformjob:updateTotalNum") |
| | | public ApiResponse updateTotalNum(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | List<Integer> idList =this.getIdList(ids); |
| | | if(idList == null || idList.size()==0){ |
| | |
| | | @ApiOperation("手动完成作业") |
| | | @PostMapping("/dealJobFinish") |
| | | public ApiResponse dealJobFinish (@RequestBody List<Integer> list, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | platformJobService.dealJobFinish(list); |
| | | platformJobService.dealJobFinish(list,getLoginUser(token)); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | | } |
| | |
| | | public ApiResponse<PageData<Retention>> findPage (@RequestBody PageWrap<Retention> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(retentionService.findTrainTimePage(pageWrap)); |
| | | } |
| | | @ApiOperation("分页查询") |
| | | @ApiOperation("分页查询在场车辆") |
| | | @PostMapping("/pageCars") |
| | | @CloudRequiredPermission("business:retention:query") |
| | | public ApiResponse<PageData<RetentionCarsVO>> findPageForCars (@RequestBody PageWrap<RetentionCarsVO> pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.test.annotation.Repeat; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | |
| | | @ApiOperation(value = "PC端访客记录提交", notes = "访客提交") |
| | | @PostMapping("/createFk") |
| | | @PreventRepeat(interval = 2000) |
| | | public ApiResponse createFk(@RequestBody Visits visits) { |
| | | visits.setSourceType(Constants.ZERO); |
| | | return ApiResponse.success("查询成功", visitsService.createFk(visits,false,Constants.ONE)); |
| | |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/web/driverPlatform") |
| | | @Slf4j |
| | | @LoginNoRequired |
| | | //@LoginNoRequired |
| | | public class DriverPlatformController extends BaseController { |
| | | |
| | | @Autowired |
| | |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/web/member") |
| | | @Slf4j |
| | | @LoginNoRequired |
| | | //@LoginNoRequired |
| | | public class InternalWebController extends BaseController { |
| | | |
| | | @Autowired |
| | |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/web/pdaPlatform") |
| | | @Slf4j |
| | | @LoginNoRequired |
| | | //@LoginNoRequired |
| | | public class PdaPlatformController extends BaseController { |
| | | |
| | | |
| | |
| | | visits.setSourceType(Constants.ZERO); |
| | | return ApiResponse.success("查询成功", visitsService.createFk(visits,false,Constants.ZERO)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "来访事由", notes = "来访事由") |
| | | @PostMapping("/visitReason") |
| | | public ApiResponse<List<VisitReason>> visitReason() { |
| | |
| | | @ApiModelProperty(value = "计划收货数量" ,example = "1") |
| | | private BigDecimal ioQty; |
| | | @ApiModelProperty(value = "物料转换率" ,example = "1") |
| | | private String rate; |
| | | private BigDecimal rate; |
| | | } |
| | |
| | | @ApiModelProperty(value = "计划收货数量" ,example = "1") |
| | | private BigDecimal ioQty; |
| | | @ApiModelProperty(value = "物料转换率" ,example = "1") |
| | | private String rate; |
| | | private BigDecimal rate; |
| | | |
| | | } |
| | |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "状态 0待审批 1审批中 2审批通过 3审批不通过 4已取消", example = "1") |
| | | @ExcelColumn(name="审批状态",index = 9,width = 12,valueMapping = "0=待审批;1=审批中;2=审批通过;3=审批不通过;4=已取消;") |
| | | @ExcelColumn(name="审批状态",index = 10,width = 12,valueMapping = "0=待审批;1=审批中;2=审批通过;3=审批不通过;4=已取消;") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "合同号") |
| | |
| | | private String contractNum; |
| | | |
| | | @ApiModelProperty(value = "预计到场时间") |
| | | @ExcelColumn(name="预计到场时间",index = 8,width = 12,dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name="预计到场时间",index = 9,width = 12,dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date arriveDate; |
| | | |
| | | @ApiModelProperty(value = "入库类型 0整托盘 1件烟", example = "1") |
| | |
| | | private Date arriveDateEnd; |
| | | |
| | | @ApiModelProperty(value = "审批人名称") |
| | | @ExcelColumn(name="审批人名称",index = 10,width = 12) |
| | | @ExcelColumn(name="审批人名称",index = 11,width = 12) |
| | | @TableField(exist = false) |
| | | private String auditName; |
| | | |
| | | @ApiModelProperty(value = "审批时间") |
| | | @ExcelColumn(name="审批描述",index = 11,width = 12,valueMapping = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name="审批描述",index = 12,width = 12,dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(exist = false) |
| | | private String auditTime; |
| | | |
| | |
| | | private String info; |
| | | |
| | | @ApiModelProperty(value = "作业记录状态: 0待确认 1待签到 2等待叫号 3入园等待 4已叫号 5作业中 6作业完成 7转移中 8异常挂起 9已授权离园 10已离园 11 已过号 12取消(WMS)") |
| | | @ExcelColumn(name="作业状态",index = 8,width = 12,valueMapping = "0=待确认;1=待签到;2=等待叫号;3=入园等待;4=已叫号;5=作业中;6=作业完成;7=转移中;8=异常挂起;9=已授权离园;10=已离园;11=已过号;12=取消(WMS);") |
| | | @TableField(exist = false) |
| | | private Integer jobStatus; |
| | | |
| | | @ApiModelProperty(value = "最后操作人名称", example = "1") |
| | | @ExcelColumn(name="最后操作人名称",index = 13,width = 12) |
| | | @TableField(exist = false) |
| | | private String editUserName; |
| | | |
| | | @ApiModelProperty(value = "审批信息数据") |
| | | @TableField(exist = false) |
| | | private ApproveDataVO approveDateVO; |
| | |
| | | @TableField(exist = false) |
| | | private String outUserName; |
| | | |
| | | @ApiModelProperty(value = "最后操作人名称", example = "1") |
| | | @ExcelColumn(name="最后操作人名称",index = 15,width = 12) |
| | | @TableField(exist = false) |
| | | private String editUserName; |
| | | |
| | | @ApiModelProperty(value = "wms业务主键") |
| | | @TableField(exist = false) |
| | | private Integer wmsId ; |
| | |
| | | @ApiModelProperty(value = "通知描述") |
| | | @TableField(exist = false) |
| | | private String info; |
| | | @ApiModelProperty(value = "当前是否在园") |
| | | @TableField(exist = false) |
| | | private Integer retentionNum; |
| | | |
| | | @ApiModelProperty(value = "审批信息数据") |
| | | @TableField(exist = false) |
| | |
| | | long count(Device device); |
| | | |
| | | void setLedContent(TransparentChannelSingleRequest body); |
| | | void setAllLedDefualtContent(); |
| | | void allLedDefualtContent(); |
| | | } |
| | |
| | | */ |
| | | void sendUnFinishNotice(); |
| | | |
| | | void dealJobFinish(List<Integer> jobIdList); |
| | | |
| | | void dealJobFinish(List<Integer> jobIdList,LoginUserInfo loginUserInfo); |
| | | |
| | | /** |
| | | * 恢复作业 |
| | |
| | | Constants.equalsInteger(i.getUserId(),memberId) |
| | | &&Constants.equalsInteger(i.getStatus(),Constants.ZERO) |
| | | &&Constants.equalsInteger(i.getSendacopy(),Constants.ZERO) |
| | | &&StringUtils.equals(i.getParam2(),"0") |
| | | ).count() |
| | | ); |
| | | //已处理数据 |
| | |
| | | noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),noticesDTO.getMemberId()) |
| | | &&Constants.equalsInteger(i.getStatus(),Constants.ZERO) |
| | | &&Constants.equalsInteger(i.getSendacopy(),Constants.ZERO) |
| | | &&StringUtils.equals(i.getParam2(),"0") |
| | | ).count() |
| | | ); |
| | | internalHomeVO.setNoticeDealNum( |
| | |
| | | if(Objects.isNull(platformBooks)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未查询到业务数据信息"); |
| | | } |
| | | title = "[物流车入园预约]申请人-" + platformBooks.getDriverName(); |
| | | jsonMap.put("inType", "入库类型:"+(Constants.equalsInteger(platformBooks.getInType(),Constants.ZERO)?"整托盘":"件烟")); |
| | | title = ApproveServiceImpl.creatPlatformBookNotice(platformBooks,jsonMap); |
| | | // title = "[物流车入园预约]申请人-" + platformBooks.getDriverName(); |
| | | // jsonMap.put("inType", "入库类型:"+(Constants.equalsInteger(platformBooks.getInType(),Constants.ZERO)?"整托盘":"件烟")); |
| | | // jsonMap.put("totalNum", "总运输量:"+platformBooks.getTotalNum()+"万支"); |
| | | // jsonMap.put("arriveDate", "到场时间:" + DateUtil.DateToStr(platformBooks.getArriveDate() , "yyyy-MM-dd HH:mm")); |
| | | // jsonMap.put("carNum", "车牌照:"+platformBooks.getCarCodeFront()); |
| | | } |
| | | return title; |
| | | } |
| | | |
| | | public static String creatPlatformBookNotice(PlatformBooks platformBooks,Map<String,Object> jsonMap){ |
| | | jsonMap.put("inType", "作业类型:"+(Constants.equalsInteger(platformBooks.getInType(),Constants.ZERO)?"整托盘":"件烟")); |
| | | jsonMap.put("totalNum", "总运输量:"+platformBooks.getTotalNum()+"万支"); |
| | | jsonMap.put("arriveDate", "到场时间:" + DateUtil.DateToStr(platformBooks.getArriveDate() , "yyyy-MM-dd HH:mm")); |
| | | jsonMap.put("carNum", "车牌照:"+platformBooks.getCarCodeFront()); |
| | | } |
| | | return title; |
| | | return "[物流车入园预约]申请人-" + platformBooks.getDriverName() ; |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | Company::getType, Constants.ZERO) |
| | | .isNull( pageWrap.getModel().getQueryUserType()!=null&&Constants.equalsInteger(pageWrap.getModel().getQueryUserType(),Constants.ZERO), |
| | | Member::getId) |
| | | .eq( pageWrap.getModel().getQueryUserType()!=null&&Constants.equalsInteger(pageWrap.getModel().getQueryUserType(),Constants.TWO), |
| | | Company::getType, Constants.ONE) |
| | | .eq( pageWrap.getModel().getQueryUserType()!=null&&Constants.equalsInteger(pageWrap.getModel().getQueryUserType(),Constants.TWO),Company::getType, Constants.ONE) |
| | | // .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getEventType()), DeviceEvent::getEventType, pageWrap.getModel().getEventType()) |
| | | .like(Objects.nonNull(pageWrap.getModel().getCompanyName()),Company::getName, pageWrap.getModel().getCompanyName()) |
| | | .like(Objects.nonNull(pageWrap.getModel().getSrcName()),DeviceEvent::getSrcName, pageWrap.getModel().getSrcName()) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getStartTime()), DeviceEvent::getCreateDate, pageWrap.getModel().getStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getEndTime()), DeviceEvent::getCreateDate, pageWrap.getModel().getEndTime()) |
| | | .orderByDesc(DeviceEvent::getCreateDate); |
| | |
| | | } |
| | | } |
| | | @Override |
| | | public void setAllLedDefualtContent() { |
| | | public void allLedDefualtContent() { |
| | | log.error( "屏幕内容设置=======================开始========" ); |
| | | int speed = 13; |
| | | try { |
| | | speed = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.LED_CONTENT_SPEED).getCode()); |
| | |
| | | return; |
| | | } |
| | | for(PlatformDevice device :list){ |
| | | try { |
| | | String content = device.getLedContent(); |
| | | if(StringUtils.isBlank(content)){ |
| | | continue; |
| | | } |
| | | PlatformBroadcastLog log1 = HkSyncPushServiceImpl.dealLedContentBiz(device.getPlatformId(),device.getHkNo(),device.getName(),content,speed,1); |
| | | PlatformBroadcastLog log1 = HkSyncPushServiceImpl.dealLedContentBiz(0,device.getHkNo(),device.getName(),content,speed,1); |
| | | platformBroadcastLogMapper.insert(log1); |
| | | if(log1.getHkStatus() == null || !Constants.equalsInteger(log1.getHkStatus(), Constants.TWO)){ |
| | | log.error( "对不起,屏幕内容设置失败"+(log1!=null?log1.getHkInfo():"")); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error( "对不起,屏幕内容设置异常"+ device.getName()); |
| | | } |
| | | |
| | | } |
| | | log.error( "屏幕内容设置=======================结束========" ); |
| | | } |
| | | } |
| | |
| | | .set(SystemUser::getUpdateUser,member.getEditor()) |
| | | .set(SystemUser::getUpdateTime,member.getEditDate()) |
| | | ); |
| | | // cancelAllMemberEmpower(member,memberRoleMapper,empowerMapper); |
| | | saveUserActionBiz(member,loginUserInfo,Constants.UserActionType.DELETE,userActionJoinMapper,JSONObject.toJSONString(member)); |
| | | List<Cars> carsList = carsMapper.selectList(new QueryWrapper<Cars>().lambda() |
| | | .eq(Cars::getMemberId,member.getId()) |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 月台入园预约信息表Service实现 |
| | |
| | | queryWrapper |
| | | .selectAll(PlatformBooks.class) |
| | | .selectAs(PlatformJob::getStatus,PlatformBooks::getJobStatus) |
| | | .selectAs(SystemUser::getRealname,PlatformBooks::getEditUserName) |
| | | .leftJoin(PlatformJob.class,PlatformJob::getId,PlatformBooks::getJobId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,PlatformJob::getEditDate) |
| | | .eq(pageWrap.getModel().getId() != null, PlatformBooks::getId, pageWrap.getModel().getId()) |
| | | .eq(pageWrap.getModel().getCreator() != null, PlatformBooks::getCreator, pageWrap.getModel().getCreator()) |
| | | .ge(pageWrap.getModel().getCreateDate() != null, PlatformBooks::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())) |
| | |
| | | || Objects.isNull(platformBooksApplyDTO.getDriverId()) |
| | | || StringUtils.isBlank(platformBooksApplyDTO.getDriverPhone()) |
| | | || StringUtils.isBlank(platformBooksApplyDTO.getDriverName()) |
| | | || StringUtils.isBlank(platformBooksApplyDTO.getTransportImg()) |
| | | ){ |
| | | || StringUtils.isBlank(platformBooksApplyDTO.getTransportImg())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | //查询车辆是否为自有车 |
| | |
| | | platformBooks.setReasonId(null); |
| | | platformBooks.setInReason(null); |
| | | platformBooksMapper.updateById(platformBooks); |
| | | |
| | | |
| | | |
| | | Map<String,Object> jsonMap = new HashMap<>(); |
| | | String title = ApproveServiceImpl.creatPlatformBookNotice(platformBooks,jsonMap); |
| | | noticesJoinMapper.update(null,new UpdateWrapper<Notices>().lambda() |
| | | .set(Notices::getParam1,JSONObject.toJSONString(jsonMap)) |
| | | .set(Notices::getTitle,title) |
| | | .eq(Notices::getObjType,Constants.noticesObjectType.reason) |
| | | .eq(Notices::getTitle,title) |
| | | .eq(Notices::getObjId,platformBooks.getId()) |
| | | ); |
| | | |
| | | return platformBooks.getId(); |
| | | } |
| | | |
| | |
| | | .selectAs(PlatformWmsJob::getIoCreatedate,PlatformJob::getIoCreatedate) |
| | | .selectAs(SystemUser::getRealname,PlatformJob::getOutUserName) |
| | | .selectAs(PlatformBooks::getId,PlatformJob::getBookId) |
| | | .select("s.REALNAME",PlatformJob::getEditUserName) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .leftJoin(PlatformGroup.class,PlatformGroup::getId,Platform::getGroupId) |
| | | .leftJoin(PlatformWmsJob.class,PlatformWmsJob::getCarryBillCode,PlatformJob::getBillCode) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,PlatformJob::getOutUserId) |
| | | .leftJoin(PlatformBooks.class,PlatformBooks::getJobId,PlatformJob::getId) |
| | | .leftJoin(" system_user s on t.EDITOR = s.id ") |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(pageWrap.getModel().getId() != null, PlatformJob::getId, pageWrap.getModel().getId()) |
| | | .eq(pageWrap.getModel().getCreator() != null, PlatformJob::getCreator, pageWrap.getModel().getCreator()) |
| | |
| | | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformWmsDetailList)){ |
| | | platformJob.setTotalNum( |
| | | platformWmsDetailList.stream().map(m->m.getIoQty()).reduce(BigDecimal.ZERO,BigDecimal::add) |
| | | platformWmsDetailList.stream().filter(i->Objects.nonNull(i.getIoQty())).map(m->m.getIoQty()).reduce(BigDecimal.ZERO,BigDecimal::add) |
| | | ); |
| | | platformWmsJob.setPlatformWmsDetailList(platformWmsDetailList); |
| | | platformJob.setPlatformWmsJob(platformWmsJob); |
| | |
| | | TmsBaseResponse<List<TmsLockStatusQueryResponse>> lockResult = tmsService.lockStatusQuery(tmsLock); |
| | | if(lockResult!=null && lockResult.getCode()!=null && lockResult.getCode().equals("0")&& lockResult.getData()!=null ){ |
| | | for(TmsLockStatusQueryResponse s : lockResult.getData()){ |
| | | if(StringUtils.isBlank(s.getContractNumber())){ |
| | | if(StringUtils.isBlank(s.getOutDate())){ |
| | | continue; |
| | | } |
| | | platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda() |
| | |
| | | Date date = new Date(); |
| | | List<String> codeList =new ArrayList<>(); |
| | | for(PlatformWmsDetail d : details){ |
| | | if(StringUtils.isNotBlank(d.getContractNum())){ |
| | | if(StringUtils.isNotBlank(d.getContractNum())){ |
| | | codeList.add(d.getContractNum()); |
| | | } |
| | | } |
| | | } |
| | | List<Integer> jobIds = new ArrayList<>(); |
| | | if(codeList.size()>0){ |
| | | TmsLockStatusQueryRequest tmsLock = new TmsLockStatusQueryRequest(); |
| | | tmsLock.setContractNumbers(codeList); |
| | | List<Integer> jobIds = new ArrayList<>(); |
| | | TmsBaseResponse<List<TmsLockStatusQueryResponse>> lockResult = tmsService.lockStatusQuery(tmsLock); |
| | | if(lockResult!=null && lockResult.getCode()!=null && lockResult.getCode().equals("0")&& lockResult.getData()!=null ){ |
| | | for(TmsLockStatusQueryResponse s : lockResult.getData()){ |
| | | try { |
| | | if(StringUtils.isBlank(s.getOutDate())){ |
| | | continue; |
| | | } |
| | | //异常处理,能处理一个是一个 |
| | | platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda() |
| | | .eq(PlatformWmsDetail::getContractNum,s.getContractNumber()) |
| | |
| | | } |
| | | }catch (Exception e){ |
| | | logger.error("=============更新电子锁状态信息异常:"+e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | * @param jobIdList |
| | | */ |
| | | @Override |
| | | public void dealJobFinish(List<Integer> jobIdList){ |
| | | public void dealJobFinish(List<Integer> jobIdList,LoginUserInfo loginUserInfo){ |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(jobIdList)){ |
| | | List<PlatformJob> platformJobList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | |
| | | .in(PlatformJob::getId,jobIdList) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformJobList)){ |
| | | |
| | | platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda() |
| | | .set(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey()) |
| | | .set(PlatformJob::getDoneDate,new Date()) |
| | | .set(PlatformJob::getEditor,loginUserInfo.getId()) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CONFIRM.getKey(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey(),Constants.PlatformJobStatus.WAIT_CALL.getKey()) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getId,platformJobList.stream().map(i->i.getId()).collect(Collectors.toList()))); |
| | |
| | | .leftJoin(Member.class,Member::getId,Retention::getMemberId) |
| | | .leftJoin(Member.class,Member::getId,Retention::getMemberId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .leftJoin(Category.class,Category::getId,Retention::getCategoryId) |
| | | .selectAs(Company::getCompanyNamePath,Retention::getCompanyName) |
| | | .selectAs(Member::getName,Retention::getName) |
| | | .selectAs(Category::getName,Retention::getCategoryName) |
| | | .selectAs(Member::getPhone,Retention::getPhone) |
| | | .selectAs(Member::getVisitCompanyName,Retention::getVisitCompanyName) |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getKeyWords()),w->{ |
| | |
| | | |
| | | queryWrapper.selectAll(Visits.class); |
| | | queryWrapper.select(" ( select count(distinct(v.CAR_NOS)) from visits v where v.PARENT_ID = t.ID and v.CAR_NOS is not null and v.CAR_NOS != '' and v.CAR_NOS != t.CAR_NOS ) as carNum "); |
| | | queryWrapper.select(" ( select count(distinct(v.id)) from retention v where v.member_id = t.member_id and v.type=1 )",Visits::getRetentionNum); |
| | | queryWrapper.selectAs(Member::getName,Visits::getReceptMemberName); |
| | | queryWrapper.selectAs(Company::getName,Visits::getReceptMemberDepartment); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,Visits::getReceptMemberId); |
| | |
| | | if(Objects.isNull(visits)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!(Constants.equalsInteger(memberId,visits.getMemberId()))){ |
| | | /* if(!(Constants.equalsInteger(memberId,visits.getMemberId()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"无此操作权限"); |
| | | } |
| | | }*/ |
| | | if(!StringUtils.equals(openid,visits.getOpenid())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"无此操作权限"); |
| | | } |
| | |
| | | List<Empower> faceErrorList = new ArrayList<>(); |
| | | for(Empower c : list) { |
| | | //向任务添加人员、设备信息数据 |
| | | if((Constants.equalsInteger(c.getMemberDeleted(),Constants.ONE) && |
| | | if((Constants.equalsInteger(c.getIsdeleted(),Constants.ZERO) && |
| | | Constants.equalsInteger(c.getMemberDeleted(),Constants.ONE) && |
| | | Constants.equalsInteger(c.getMemberHkStatus(),Constants.ONE)) |
| | | || Constants.equalsInteger(c.getDeviceDeleted(),1)){ |
| | | //如果人員或者設備删除,取消下发 |
| | |
| | | continue; |
| | | } |
| | | if(Constants.equalsInteger(c.getMemberDeleted(),Constants.ONE) |
| | | && Constants.equalsInteger(c.getIsdeleted(),1)){ |
| | | && Constants.equalsInteger(c.getMemberHkStatus(),Constants.ONE) |
| | | && Constants.equalsInteger(c.getIsdeleted(),Constants.ZERO)){ |
| | | //如果人员已离职,新增授权无需下发,取消下发 |
| | | cacenList.add(c); |
| | | continue; |
| | |
| | | queryWrapper.selectAs(Device::getChannelNo,Empower::getDeviceChannelNo); |
| | | queryWrapper.selectAs(Member::getHkId,Empower::getMemberHkId); |
| | | queryWrapper.selectAs(Member::getFaceStatus,Empower::getMemberFaceStatus); |
| | | queryWrapper.selectAs(Member::getHkStatus,Empower::getMemberFaceStatus); |
| | | queryWrapper.selectAs(Device::getOnline,Empower::getMemberHkStatus); |
| | | queryWrapper.selectAs(Member::getHkStatus,Empower::getMemberHkStatus); |
| | | queryWrapper.selectAs(Device::getOnline,Empower::getDeviceOnline); |
| | | queryWrapper.selectAs(Device::getIsdeleted,Empower::getDeviceDeleted); |
| | | queryWrapper.selectAs(Member::getIsdeleted,Empower::getMemberDeleted); |
| | | queryWrapper.selectAs(Device::getHkId,Empower::getDeviceIndexCode); |
| | |
| | | updateVistis.setOutInfo("访客正常签离"); |
| | | } |
| | | delRetentionLis.add(visits.getMemberId()); |
| | | }else{ |
| | | //如果人员信息存在,切是访客通行,则删除之前的所有进场数据(无论此次推送是进厂还是出场推送事件) |
| | | }else if(!(request.getData().getParamValues()!=null |
| | | && StringUtils.isNotBlank(request.getData().getParamValues().getPlateNos()) |
| | | && StringUtils.isNotBlank(request.getData().getParamValues().getParkIndex()))){ |
| | | //只处理访客门禁通行通行, |
| | | //如果人员信息存在,则删除之前的所有进场数据(无论此次推送是进厂还是出场推送事件) |
| | | delRetentionLis.add(visits.getMemberId()); |
| | | InoutRecord record = new InoutRecord(); |
| | | record.setDeviceName((request.getData()!=null &&request.getData().getParamValues()!=null)? |
| | |
| | | } |
| | | } |
| | | } |
| | | inoutRecordList.add(record); |
| | | inoutRecordList.add(record);//进出记录 |
| | | } |
| | | updateVistis.setEditDate(new Date()); |
| | | //更新访客来访或者签离时间信息 |
| | |
| | | carrecord.setCategoryParentId(category.getParentId()); |
| | | } |
| | | } |
| | | if(Constants.formatIntegerNum(request.getEventType()) == HKConstants.EventTypes.PARK_PASS_IN.getKey()){ |
| | | //处理自有车自动签到业务 |
| | | dealSelTruckAutoSignBiz(request,event); |
| | | if(Constants.formatIntegerNum(request.getEventType()) == HKConstants.EventTypes.PARK_PASS_IN.getKey()){ |
| | | //如果是入厂放行 |
| | | delRetentionList.add(event.getPlateNos()); |
| | | Retention dm = new Retention(); |
| | |
| | | carrecord.setCategoryParentName(StringUtils.defaultString(category.getParentName(),"访客车辆")); |
| | | carrecord.setCategoryParentId(category.getParentId()); |
| | | for(Visits v :visitsList){ |
| | | if(v.getEndtime()!=null && v.getEndtime().getTime() < System.currentTimeMillis()){ |
| | | // if(v.getEndtime()!=null && v.getEndtime().getTime() < System.currentTimeMillis()){ |
| | | Retention dm = new Retention(); |
| | | dm.setMemberId(event.getMemberId()); |
| | | dm.setPhone(carrecord.getMemberPhone()); |
| | |
| | | inoutDayCount.setInVisitorNum(Constants.formatIntegerNum(inoutDayCount.getInVisitorNum())+1); |
| | | } |
| | | } |
| | | } |
| | | // } |
| | | } |
| | | } |
| | | if(isCarInOrOutEvent(request) && event.getCarType() !=null && !event.getCarType().equals(Constants.RetentionCarType.fkCar)){ |
| | |
| | | .in(PlatformJob::getStatus, |
| | | Constants.PlatformJobStatus.IN_WAIT.getKey(), |
| | | Constants.PlatformJobStatus.CALLED.getKey(), |
| | | Constants.PlatformJobStatus.WAIT_CALL.getKey(), |
| | | Constants.PlatformJobStatus.WORKING.getKey(), |
| | | Constants.PlatformJobStatus.TRANSFERING.getKey(), |
| | | Constants.PlatformJobStatus.OVER_NUMBER.getKey(), |
| | | Constants.PlatformJobStatus.EXCEPTION.getKey() |
| | | ) |
| | | )==Constants.ZERO){//如果没进行中任务 |
| | |
| | | */ |
| | | @Override |
| | | public void syncMemberDelData(){ |
| | | if(Constants.DEALING_HK_DEL_USER || Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) != DataSyncConfig.origin.erp){ |
| | | if(Constants.DEALING_HK_DEL_USER |
| | | || Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin())== DataSyncConfig.origin.hk){ |
| | | return ; |
| | | } |
| | | Constants.DEALING_HK_DEL_USER =true; |
| | |
| | | } |
| | | Date date = new Date(); |
| | | for(Member member : list){ |
| | | //一卡通授权下发状态 0待下发 1已下发 2下发成功 3已取消 4下发失败 5任务下载已结束 |
| | | if(member!=null && Constants.equalsInteger(member.getIsdeleted(),Constants.ONE) ){ |
| | | if(empowerMapper.selectCount(new QueryWrapper<Empower>().lambda() |
| | | .eq(Empower::getMemberId, member.getId()) |
| | | .eq(Empower::getIsdeleted,Constants.ONE) |
| | | .ne(Empower::getFailFlag,Constants.ONE) |
| | | .ne(Empower::getSendStatus,Constants.EmpowerStatus.pass)) ==0) { |
| | | //如果权限都已经删除成功,则删除海康人员和卡片数据 |
| | | |
| | | .notIn(Empower::getSendStatus |
| | | ,Constants.EmpowerStatus.pass |
| | | ,Constants.EmpowerStatus.cancel )) ==0) { |
| | | //如果权限都已经删除成功,则删除海康人员和卡片数 |
| | | HkSyncEmpowerServiceImpl.doHkDeleteUser(member.getId(),member.getHkId(),date,memberMapper1,memberCardMapper); |
| | | } |
| | | } |
| | |
| | | //脏数据不处理 |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | return r; |
| | |
| | | //如果没有卡 也没有人脸 |
| | | return; |
| | | } |
| | | |
| | | if(Constants.equalsInteger(member.getIsdeleted(),Constants.ZERO)){ |
| | | // && Constants.equalsInteger(member.getHkStatus(),Constants.ONE)){ |
| | | List<Integer> deviceIds =new ArrayList<>();//新设备编码集合 |
| | |
| | | cr.setCardType(m.getType()); |
| | | param.getCardList().add(cr); |
| | | } |
| | | |
| | | //处理新增数据 |
| | | BaseResponse<List<CardInfoResponse>> result = HKService.cardBingding(param); |
| | | if(result !=null && StringUtils.equals(result.getCode(),HKConstants.RESPONSE_SUCCEE) ){ |
| | |
| | | Date lastMonth = DateUtil.addMonthToDate(month,-1);//上月 |
| | | Date year = Utils.Date.getStart(new Date());//今年 |
| | | Date lastYear = DateUtil.addYearToDate(year,-1);//去年 |
| | | log.error("1、=====================>"+DateUtil.getCurrDateTime()); |
| | | List<PlatformJob> monthNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | |
| | | Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()) |
| | | .apply("year(done_date) = year('"+DateUtil.getPlusTime2(month)+"') and month(done_date) = month('"+DateUtil.getPlusTime2(month)+"') ")); |
| | | |
| | | log.error("2、=====================>"+DateUtil.getCurrDateTime()); |
| | | List<PlatformJob> yearNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | |
| | | .in(PlatformJob::getType,Constants.ONE,Constants.THREE) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()) |
| | | .apply("year(done_date) = year('"+DateUtil.getPlusTime2(year)+"') and done_date<= now() ")); |
| | | |
| | | log.error("3、=====================>"+DateUtil.getCurrDateTime()); |
| | | List<PlatformJob> monthLastNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | |
| | | .apply("year(done_date) = year('"+DateUtil.getPlusTime2(lastMonth)+"') and month(done_date) = month('"+DateUtil.getPlusTime2(lastMonth)+"') and done_date<= '" |
| | | +DateUtil.getPlusTime2(lastMonth)+"'")); |
| | | |
| | | log.error("4、=====================>"+DateUtil.getCurrDateTime()); |
| | | List<PlatformJob> yearLastNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | |
| | | data.setMonthOutTimes(monthNum!=null?monthNum.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)||Constants.equalsInteger(i.getType(),Constants.THREE)).collect(Collectors.toList()).size():0); |
| | | data.setYearOutTimes(yearNum!=null?yearNum.size():0); |
| | | |
| | | log.error("5、=====================>"+DateUtil.getCurrDateTime()); |
| | | //==========今天之前未完成出入库任务 |
| | | List<PlatformJob> beforeJobNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | |
| | | .apply(" to_days(create_date) < to_days(now()) ") |
| | | ); |
| | | |
| | | log.error("6、=====================>"+DateUtil.getCurrDateTime()); |
| | | //==========今天出入库完成量 |
| | | List<PlatformJob> currentDoneNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | |
| | | .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CANCEL.getKey()) |
| | | .apply(" to_days(done_date) = to_days(now())")); |
| | | |
| | | log.error("7、=====================>"+DateUtil.getCurrDateTime()); |
| | | //==========今天下发出入库任务 未完成的---- |
| | | List<PlatformJob> currentNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | |
| | | .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CANCEL.getKey()) |
| | | .apply(" to_days(create_date) = to_days(now()) and done_date is null ")); |
| | | |
| | | log.error("8、=====================>"+DateUtil.getCurrDateTime()); |
| | | BigDecimal beforeOutNum = (getSumTotalByList(beforeJobNum,0,null));//今天之前未完成出库任务 |
| | | log.error("9、=====================>"+DateUtil.getCurrDateTime()); |
| | | BigDecimal currentOutNum = (getSumTotalByList(currentNum,0,null));//今天下发出库任务 |
| | | log.error("10、=====================>"+DateUtil.getCurrDateTime()); |
| | | BigDecimal beforeInNum = (getSumTotalByList(beforeJobNum,1,null));//今天之前未完成入库任务 |
| | | log.error("11、=====================>"+DateUtil.getCurrDateTime()); |
| | | BigDecimal currentInNum = (getSumTotalByList(currentNum,1,null));//今天下发入库任务 |
| | | log.error("12、=====================>"+DateUtil.getCurrDateTime()); |
| | | data.setCurrentInDoneNum(getSumTotalByList(currentDoneNum,1,1));//今日完成量 |
| | | log.error("13、=====================>"+DateUtil.getCurrDateTime()); |
| | | data.setCurrentOutDoneNum(getSumTotalByList(currentDoneNum,0,1));//今日完成量 |
| | | log.error("14、=====================>"+DateUtil.getCurrDateTime()); |
| | | data.setCurrentInNum(beforeInNum.add(data.getCurrentInDoneNum()).add(currentInNum));//当前入库总任务成量 |
| | | log.error("15、=====================>"+DateUtil.getCurrDateTime()); |
| | | data.setCurrentOutNum(beforeOutNum.add(data.getCurrentOutDoneNum()).add(currentOutNum));//当前出库总任务成量 |
| | | log.error("16、=====================>"+DateUtil.getCurrDateTime()); |
| | | data.setTodayOutRate(getDayTotalRata(data.getCurrentOutDoneNum(),DateUtil.getToday()));//当日出库效率 |
| | | log.error("17、=====================>"+DateUtil.getCurrDateTime()); |
| | | data.setTodayInRate(getDayTotalRata(data.getCurrentInDoneNum(),DateUtil.getToday()));//当日入库效率 |
| | | data.setMonthOutRate(getMonthRata(monthNum,Constants.ZERO));//本月出库效率 |
| | | data.setMonthInRate(getMonthRata(monthNum,Constants.ONE));//本月入库效率 |
| | | log.error("18、=====================>"+DateUtil.getCurrDateTime()); |
| | | //查询本月全部日志 |
| | | List<PlatformLog> monthLogList = platformLogMapper.selectList(new QueryWrapper<PlatformLog>().lambda() |
| | | .eq(PlatformLog::getIsdeleted,Constants.ZERO) |
| | | .and(i->i.isNotNull(PlatformLog::getParam1).or().isNotNull(PlatformLog::getParam2)) |
| | | .apply("year(CREATE_DATE) = year('"+DateUtil.getPlusTime2(month)+"') and month(CREATE_DATE) = month('"+DateUtil.getPlusTime2(month)+"') ") |
| | | ); |
| | | |
| | | |
| | | data.setMonthOutRate(getMonthRata(monthLogList,monthNum,Constants.ZERO));//本月出库效率 |
| | | log.error("19、=====================>"+DateUtil.getCurrDateTime()); |
| | | data.setMonthInRate(getMonthRata(monthLogList,monthNum,Constants.ONE));//本月入库效率 |
| | | log.error("20、=====================>"+DateUtil.getCurrDateTime()); |
| | | //------------今日出入库效率---------------- |
| | | // BigDecimal outHours = getTotalDoneTimes(currentDoneNum,0);// |
| | | // BigDecimal inHours = getTotalDoneTimes(currentDoneNum,1);// |
| | |
| | | } |
| | | |
| | | |
| | | private BigDecimal getMonthRata(List<PlatformJob> list, Integer type) { |
| | | private BigDecimal getMonthRata(List<PlatformLog> monthLogList,List<PlatformJob> list, Integer type) { |
| | | BigDecimal r = new BigDecimal(0); |
| | | if(list==null || list.size() == 0){ |
| | | return r; |
| | |
| | | filter(i->jobDate.equals(DateUtil.formatDate(i.getDoneDate(),"yyyy-MM-dd"))).collect(Collectors.toList()); |
| | | if(CollectionUtils.isNotEmpty(platformJobList)){ |
| | | //获取今天的 |
| | | r = r.add(this.getDayTotalRata(getSumTotalByList(platformJobList,type,null),jobDate)); |
| | | r = r.add(this.getDayTotalForMonthRata(monthLogList,getSumTotalByList(platformJobList,type,null),jobDate)); |
| | | } |
| | | } |
| | | r = r.divide(new BigDecimal(Integer.toString(jobList.size())),2,BigDecimal.ROUND_HALF_UP); |
| | | } |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | private BigDecimal getDayTotalForMonthRata(List<PlatformLog> allList ,BigDecimal totalAmount,String today) { |
| | | BigDecimal r = new BigDecimal(0); |
| | | //查询今日最早/最晚的作业数据 |
| | | List<PlatformLog> platformLogList = allList.stream().filter(i->DateUtil.formatDate(i.getCreateDate(),"yyyy-MM-dd").equals(today)).collect(Collectors.toList()); |
| | | // platformLogMapper.selectList(new QueryWrapper<PlatformLog>() |
| | | // .lambda() |
| | | // .apply(" ( DATE_FORMAT( param1 ,'%Y-%m-%d' ) = '"+today+"' or DATE_FORMAT( param2 ,'%Y-%m-%d' ) = '"+today+"' ) ") |
| | | // ); |
| | | if(totalAmount.compareTo(BigDecimal.ZERO)==0||CollectionUtils.isEmpty(platformLogList)){ |
| | | return BigDecimal.ZERO; |
| | | } |
| | | if(platformLogList!=null && platformLogList.size()>0){ |
| | | return this.getWorkTime(totalAmount,platformLogList,today); |
| | | } |
| | | return r; |
| | | } |
| | |
| | | return BigDecimal.ZERO; |
| | | } |
| | | if(platformLogList!=null && platformLogList.size()>0){ |
| | | return this.getWorkTime(totalAmount,platformLogList); |
| | | return this.getWorkTime(totalAmount,platformLogList,today); |
| | | } |
| | | return r; |
| | | } |
| | |
| | | * @param platformLogList |
| | | * @return |
| | | */ |
| | | public BigDecimal getWorkTime(BigDecimal totalAmount,List<PlatformLog> platformLogList){ |
| | | public BigDecimal getWorkTime(BigDecimal totalAmount,List<PlatformLog> platformLogList,String today){ |
| | | if(CollectionUtils.isEmpty(platformLogList)){ |
| | | return BigDecimal.ZERO; |
| | | } |
| | | //获取开始时间 |
| | | List<Long> startTimeList = platformLogList.stream().filter(i->Objects.nonNull(i.getParam1())).map(i->DateUtil.fromStringToDate("yyyy-MM-dd HH:mm:ss",i.getParam1()).getTime()).collect(Collectors.toList()); |
| | | List<Long> startTimeList = platformLogList.stream().filter(i->Objects.nonNull(i.getParam1())) |
| | | .filter(i->Objects.nonNull(i.getParam1())&&i.getParam1().indexOf(today)>=0) |
| | | .map(i->DateUtil.fromStringToDate("yyyy-MM-dd HH:mm:ss",i.getParam1()).getTime()).collect(Collectors.toList()); |
| | | Long startTime = Collections.min(startTimeList); |
| | | //获取结束时间 |
| | | List<Long> endTimeList = platformLogList.stream().filter(i->Objects.nonNull(i.getParam2())).map(i->DateUtil.fromStringToDate("yyyy-MM-dd HH:mm:ss",i.getParam2()).getTime()).collect(Collectors.toList()); |
| | | List<Long> endTimeList = platformLogList.stream() |
| | | .filter(i->Objects.nonNull(i.getParam2())&&i.getParam2().indexOf(today)>=0) |
| | | .map(i->DateUtil.fromStringToDate("yyyy-MM-dd HH:mm:ss",i.getParam2()).getTime()).collect(Collectors.toList()); |
| | | Long endTime = Collections.max(endTimeList); |
| | | if(Objects.isNull(startTime) |
| | | || Objects.isNull(endTime) || (startTime>=endTime)){ |
| | |
| | | } |
| | | return totalAmount.divide(new BigDecimal(( endTime - startTime )+"").divide(new BigDecimal("3600000"),2,BigDecimal.ROUND_HALF_UP),2,BigDecimal.ROUND_HALF_UP) ; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | private BigDecimal getSumTotalByList(List<PlatformJob> list,Integer type,Integer status) { |
| | |
| | | entity.setJobId(job.getJobId()); |
| | | entity.setContractNum(param.getContractNum()); |
| | | entity.setWmsJobId(job.getId()); |
| | | entity.setIoQty(d.getIoQty()); |
| | | entity.setStatus(Constants.ZERO); |
| | | entity.setRate(d.getRate()); |
| | | entity.setIoQty(Constants.formatBigdecimal(d.getIoQty()).multiply(Constants.formatBigdecimal( d.getRate()))); |
| | | entity.setRate(Objects.nonNull(d.getRate())?Constants.formatBigdecimal(d.getRate()).doubleValue()+"":"1"); |
| | | entity.setMaterialName(d.getMaterialName()); |
| | | entity.setInRepertotyCode(d.getInRepertotyCode()); |
| | | iocodeList.add(d.getIoCode()); |
| | |
| | | Constants.PlatformJobStatus.IN_WAIT.getKey()+","+ |
| | | Constants.PlatformJobStatus.CALLED.getKey()+","+ |
| | | Constants.PlatformJobStatus.TRANSFERING.getKey()+","+ |
| | | Constants.PlatformJobStatus.OVER_NUMBER.getKey()+","+ |
| | | Constants.PlatformJobStatus.EXCEPTION.getKey()+","+ |
| | | Constants.PlatformJobStatus.WORKING.getKey()+")) as jobNum") |
| | | .lambda() |
| | |
| | | entity.setJobId(job.getJobId()); |
| | | entity.setWmsJobId(job.getId()); |
| | | entity.setContractNum(param.getContractNum()); |
| | | entity.setIoQty(d.getIoQty()); |
| | | entity.setRepertotyAddress(job.getRepertotyAddress()); |
| | | entity.setWmsJobId(job.getId()); |
| | | entity.setStatus(Constants.ZERO); |
| | | entity.setRate(d.getRate()); |
| | | entity.setIoQty(Constants.formatBigdecimal(d.getIoQty()).multiply(Constants.formatBigdecimal( d.getRate()))); |
| | | entity.setRate(Objects.nonNull(d.getRate())?Constants.formatBigdecimal(d.getRate()).doubleValue()+"":"1"); |
| | | // entity.setIoQty(d.getIoQty()); |
| | | // entity.setRate(d.getRate()); |
| | | entity.setMaterialName(d.getMaterialName()); |
| | | iocodeList.add(d.getIoCode()); |
| | | details.add(entity); |