Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | // return request.post('/visitsAdmin/cloudService/business/areas/treeList', data, { |
| | | // trim: true |
| | | // }) |
| | | return request.post('/visitsAdmin/cloudService/business/areas/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function listByParentId (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/areas/listByParentId', data) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/areas/create', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/areas/updateById', data) |
| | | } |
| | | |
| | | // æ å½¢ |
| | | export function treeList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/areas/listByParentId', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/areas/delete/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | | return request.get('/visitsAdmin/cloudService/business/areas/delete/batch', { |
| | | params: { |
| | | ids |
| | | } |
| | | }) |
| | | } |
| | |
| | | |
| | | // é¡¶é¨å¯¼èª |
| | | export function getAppHeaderNav (data) { |
| | | return request.get('/visitsAdmin/cloudService/business/hksync/getHkMenuLink?type='+ data) |
| | | return request.post('/visitsAdmin/cloudService/business/hksync/getHkMenuLink/'+data+'?time='+Math.random()) |
| | | } |
| | | // 䏻使°æ® |
| | | export function getWorkbenchBody (data) { |
| | |
| | | export function getWorkbenchTaskHead (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/staging/taskCenterHeadPC', data) |
| | | } |
| | | // åæ¥æµ·åº·ä»£åæ°æ® |
| | | export function syncHkNotice (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/hksync/notice/getList', data) |
| | | } |
| | | // pcå·¥ä½å° |
| | | export function getWorkbenchData (data) { |
| | | return request.get('/visitsAdmin/cloudService/business/staging/pCWorkPlatformData', { |
| | | params: {...data } |
| | | }) |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalAlertWindow |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form :model="form" ref="form" label-width="100px" label-suffix="ï¼" :rules="rules"> |
| | | <el-form-item :label="form.type==0?'å¸åç§°':'å¿åºåç§°'" prop="name"> |
| | | <el-input v-model="form.name" :placeholder="form.type==0?'è¾å
¥å¸åç§°':'è¾å
¥å¿åºåç§°'" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="æåºç " prop="sortnum"> |
| | | <el-input v-model="form.sortnum" placeholder="请è¾å
¥æåºç " v-trim/> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalAlertWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalAlertWindow from '@/components/common/GlobalAlertWindow' |
| | | export default { |
| | | name: 'OperaAreasWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalAlertWindow }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | parentId: null, |
| | | name: null, |
| | | sortnum: '0', |
| | | type: '', |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/areas', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | // 确认æ°å»º |
| | | __confirmCreate () { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | this.isWorking = true |
| | | this.api.create(this.form) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$message.success('æ°å»ºæå') |
| | | this.$emit('success', this.form.parentId) |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | }, |
| | | // ç¡®è®¤ä¿®æ¹ |
| | | __confirmEdit () { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | this.isWorking = true |
| | | this.api.updateById(this.form) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.$emit('success', this.form.parentId) |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:areas:query']"> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <el-table |
| | | ref="table" |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | lazy |
| | | :load="load" |
| | | :tree-props="{ children: 'childList', hasChildren: 'hasChildren' }" |
| | | row-key="id" |
| | | stripe |
| | | border |
| | | :header-row-class-name="'table-header'" |
| | | class="doumee-element-table" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column prop="name" label="å°åºåç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="å建æ¶é´" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column prop="sortnum" label="æåºç " align="center" min-width="140px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:areas:update', 'business:areas:create', 'business:areas:delete'])" |
| | | label="æä½" |
| | | align="center" |
| | | min-width="220" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | <el-button type="text" @click="edit(row)" v-permissions="['business:areas:update']">ç¼è¾</el-button> |
| | | <el-button v-if="row.type!=2" type="text" @click="createChild(row)" v-permissions="['business:areas:create']">æ°å»º{{ row.type==0 ? 'å¸' : 'åºå¿' }}</el-button> |
| | | <el-button type="text" @click="deleteById(row)" v-permissions="['business:areas:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaAreasWindow ref="operaAreasWindow" @success="update"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaAreasWindow from '@/components/business/OperaAreasWindow' |
| | | import { listByParentId } from '@/api/business/areas' |
| | | export default { |
| | | name: 'Areas', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaAreasWindow }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | type: 0, |
| | | parentId: '' |
| | | }, |
| | | treeMaps: new Map(), |
| | | parentId: null |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'çå¸åºä¿¡æ¯è¡¨', |
| | | api: '/business/areas', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | |
| | | // 页ç åæ´å¤ç |
| | | handlePageChange (pageIndex) { |
| | | |
| | | this.isWorking.search = true |
| | | listByParentId(this.searchForm) |
| | | .then(data => { |
| | | this.tableData.list = this.dataAddBool(data) |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search = false |
| | | }) |
| | | }, |
| | | dataAddBool(array) { |
| | | array.forEach(item => { |
| | | item.hasChildren = item.type != 2 |
| | | // item.childList = item.childList && this.dataAddBool(item.childList) |
| | | }) |
| | | return array |
| | | }, |
| | | load(tree, treeNode, resolve) { |
| | | this.treeMaps.set(tree.id, { tree, treeNode, resolve }) |
| | | listByParentId({ parentId: tree.id, type: tree.type + 1 }) |
| | | .then(data => { |
| | | resolve(this.dataAddBool(data||[])) |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search = false |
| | | }) |
| | | }, |
| | | refreshLoadTree(parentId) { |
| | | if (this.treeMaps.get(parentId)) { |
| | | const { tree, treeNode, resolve } = this.treeMaps.get(parentId) |
| | | this.$set(this.$refs.table.store.states.lazyTreeNodeMap, parentId, []) |
| | | if (tree) { // éæ°æ§è¡ç¶èç¹å è½½å级æä½ |
| | | this.load(tree, treeNode, resolve) |
| | | if (tree.parentId) { // è¥åå¨ç·ç·ç»ç¹ï¼åæ§è¡ç·ç·èç¹å è½½å级æä½ï¼é²æ¢æåä¸ä¸ªåèç¹è¢«å é¤åç¶èç¹ä¸æ¾ç¤ºå é¤æé® |
| | | const a = this.treeMaps.get(tree.parentId) |
| | | this.load(a.tree, a.treeNode, a.resolve) |
| | | } |
| | | } |
| | | } else { |
| | | this.handlePageChange() |
| | | } |
| | | }, |
| | | deleteById (row, childConfirm = true) { |
| | | // let message = `确认å é¤${this.module}ã${row[this.configData['field.main']]}ãå?` |
| | | let message = `确认å é¤è¯¥è®°å½å?` |
| | | if (childConfirm && row.childList != null && row.childList.length > 0) { |
| | | // message = `确认å é¤${this.module}ã${row[this.configData['field.main']]}ãåå
¶å${this.module}å?` |
| | | message = `确认å é¤è¯¥è®°å½åå
¶åæ°æ®å?` |
| | | } |
| | | this.$dialog.deleteConfirm(message) |
| | | .then(() => { |
| | | this.isWorking.delete = true |
| | | this.api.deleteById(row[this.configData['field.id']]) |
| | | .then(() => { |
| | | this.$message.success('å 餿å') |
| | | this.refreshLoadTree(row.parentId) |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.delete = false |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | edit(row) { |
| | | // this.parentId = row.type==0 ? null : row.type==1 ? 'ç¼è¾å¸' : 'ç¼è¾åºå¿' |
| | | this.$refs.operaAreasWindow.open(row.type==0 ? 'ç¼è¾ç' : row.type==1 ? 'ç¼è¾å¸' : 'ç¼è¾åºå¿', row) |
| | | }, |
| | | createChild(row) { |
| | | this.$refs.operaAreasWindow.open(row.type == 0 ? 'æ°å»ºå¸' : 'æ°å»ºå¿åº', { parentId: row.id, name: '', type: row.type + 1 }) |
| | | }, |
| | | update(parentId) { |
| | | this.refreshLoadTree(parentId) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <div class="task"> |
| | | <div class="header df_sb"> |
| | | <div class="home_title df"> |
| | | <span @click="handleTest">å¾
åäºé¡¹</span> |
| | | <span >å¾
åäºé¡¹</span> |
| | | <span class="num" v-if="taskTotal">{{ taskTotal }}</span> |
| | | </div> |
| | | <div class="df_ac more" @click="jumpPage('/task/index')"> |
| | |
| | | import { weeks } from '@/utils/config' |
| | | import { |
| | | getWorkbenchData, |
| | | getAppHeaderNav |
| | | getAppHeaderNav, syncHkNotice |
| | | } from '@/api' |
| | | import { level } from '@/api/business/visits' |
| | | import TaskDetail from '@/views/task/visSubDetail.vue' |
| | |
| | | OperaHiddenDangerWindow, |
| | | OperaVisitsDesWindow |
| | | }, |
| | | data() { |
| | | data () { |
| | | return { |
| | | colors, |
| | | nowDate: '', |
| | |
| | | isShowDetail: false, |
| | | isShowReport: false, |
| | | isShowDanger: false, |
| | | isShowDriver: false, |
| | | isShowDriver: false |
| | | } |
| | | }, |
| | | computed: { |
| | | userInfo() { |
| | | userInfo () { |
| | | return this.$store.state.userInfo |
| | | } |
| | | }, |
| | | created() { |
| | | created () { |
| | | this.updateDate() |
| | | setInterval(() => { |
| | | this.updateDate() |
| | | }, 1000 * 60 * 60) |
| | | |
| | | }, |
| | | mounted() { |
| | | mounted () { |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | handleTest() { |
| | | const myWindow = window.open('https://10.50.250.253/portal/ui/index?componentId=dfe&componentMenuId=process_apply') |
| | | setTimeout(() => { |
| | | const params = { |
| | | componentId: 'dfe', |
| | | componentMenuId: 'process_apply', |
| | | callback: { |
| | | method: 'dealTlncMsg', argument: { |
| | | "msgId": "98c256b9-aaff-11ef-8347-fa163ee2c57c", |
| | | "moduleId": "dfeFlowTodoModuleId", |
| | | "msgTitle": "è¯·åæ¶å¤ç13856591439åèµ·ç请åç³è¯·", |
| | | "msgStatus": "0", |
| | | "msgCreateTime": "ä»å¤© 15:33", |
| | | "msgCreateTimeIso": "2024-11-25T15:33:42.000+08:00", |
| | | "serverTime": 1732531014591, |
| | | "menuCode": "process_apply", |
| | | "msgStatusStr": "å¾
å¤ç", |
| | | "comId": "dfe", |
| | | "userId": "13856591439", |
| | | "extendNoShow": "{\"processInstanceId\":\"98a57fe0-aaff-11ef-8347-fa163ee2c57c\",\"processId\":\"process_dabcfdd39f1b6f46d36a9f4ff6ce1080\",\"param\":{\"sourceType\":\"todo\",\"modelCode\":\"tb_leave_dfe_for_dfe_runtime\",\"processNodeId\":\"UserTask_dde7d83377343a2d5fa1f60c23b023ef\",\"taskId\":\"98c256b9-aaff-11ef-8347-fa163ee2c57c\"},\"process.param.appId\":\"32ca8770-6f85-11ec-b5a3-991864da52a6\",\"appId\":\"32ca8770-6f85-11ec-b5a3-991864da52a6\",\"name\":\"请åç³è¯·\",\"taskId\":\"98c256b9-aaff-11ef-8347-fa163ee2c57c\",\"taskNodeId\":\"UserTask_dde7d83377343a2d5fa1f60c23b023ef\",\"url\":\"/dfe-form/process/tlnc/apply\"}", |
| | | "targetComId": "dfe", |
| | | "moduleName": "æµç¨å¾
å", |
| | | "tid": "99cad778-aaff-11ef-9dbf-ff08ba71965c", |
| | | "msgEndTime": null, |
| | | "msgEndTimeIso": "", |
| | | "picUrl": "", |
| | | "extendJson": "{\"key1\":\"è¯·åæ¶å¤çé鸿é£åèµ·ç请åç³è¯·\"}", |
| | | "extendParam": null, |
| | | "extendCascade": null, |
| | | "createUser": "13856591439", |
| | | "webCascadeUrl": null, |
| | | "h5CascadeUrl": null, |
| | | "cascadeTodoOpenType": null, |
| | | "cascadeSourceConfigId": null, |
| | | "h5Url": "/h5/pages/form-page/form-page?returnPath=-1&appId=32ca8770-6f85-11ec-b5a3-991864da52a6&taskId=98c256b9-aaff-11ef-8347-fa163ee2c57c&processNodeId=UserTask_dde7d83377343a2d5fa1f60c23b023ef&modelCode=tb_leave_dfe_for_dfe_runtime&type=flowHandle&component=form-apply&_sn=true", |
| | | "segmentId": "dfe-form", |
| | | "lastUsers": "é鸿é£", |
| | | "currentUsers": "é鸿é£", |
| | | "todoTypeCode": "dfe@@tlnc_placeholder_tlnc@@dfeFlowTodoModuleId", |
| | | "currentUserIds": "13856591439", |
| | | "lastUserIds": "13856591439", |
| | | "msgDesc": null, |
| | | "widgetUrl": null, |
| | | "detailType": null, |
| | | "widgetWidth": null, |
| | | "widgetHeight": null, |
| | | "userIdList": null, |
| | | "statusName": null, |
| | | "arriveTime": null, |
| | | "stayTime": null, |
| | | "todoType": null, |
| | | "cascadePort": null, |
| | | "openMode": null |
| | | } |
| | | }, |
| | | msgType: 'tlnc' |
| | | } |
| | | let argus = JSON.stringify(params) |
| | | myWindow.postMessage('{"method":"goToApp","argument":' + argus + '}', '*') |
| | | }, 3000) |
| | | getNoticeList(){ |
| | | syncHkNotice().then(res => { |
| | | |
| | | }) |
| | | }, |
| | | SubSuccess(str) { |
| | | handleTest (row) { |
| | | getAppHeaderNav(5).then(res => { |
| | | if (res == undefined || res == null) { |
| | | return |
| | | } |
| | | const myWindow = window.open(res) |
| | | setTimeout(() => { |
| | | const params = { |
| | | componentId: 'dfe', |
| | | componentMenuId: 'process_apply', |
| | | callback: { |
| | | method: 'dealTlncMsg', |
| | | argument: { |
| | | msgId: '98c256b9-aaff-11ef-8347-fa163ee2c57c', |
| | | moduleId: 'dfeFlowTodoModuleId', |
| | | msgTitle: 'è¯·åæ¶å¤ç13856591439åèµ·ç请åç³è¯·', |
| | | msgStatus: '0', |
| | | msgCreateTime: 'ä»å¤© 15:33', |
| | | msgCreateTimeIso: '2024-11-25T15:33:42.000+08:00', |
| | | serverTime: 1732531014591, |
| | | menuCode: 'process_apply', |
| | | msgStatusStr: 'å¾
å¤ç', |
| | | comId: 'dfe', |
| | | userId: '13856591439', |
| | | extendNoShow: '{"processInstanceId":"98a57fe0-aaff-11ef-8347-fa163ee2c57c","processId":"process_dabcfdd39f1b6f46d36a9f4ff6ce1080","param":{"sourceType":"todo","modelCode":"tb_leave_dfe_for_dfe_runtime","processNodeId":"UserTask_dde7d83377343a2d5fa1f60c23b023ef","taskId":"98c256b9-aaff-11ef-8347-fa163ee2c57c"},"process.param.appId":"32ca8770-6f85-11ec-b5a3-991864da52a6","appId":"32ca8770-6f85-11ec-b5a3-991864da52a6","name":"请åç³è¯·","taskId":"98c256b9-aaff-11ef-8347-fa163ee2c57c","taskNodeId":"UserTask_dde7d83377343a2d5fa1f60c23b023ef","url":"/dfe-form/process/tlnc/apply"}', |
| | | targetComId: 'dfe', |
| | | moduleName: 'æµç¨å¾
å', |
| | | tid: '99cad778-aaff-11ef-9dbf-ff08ba71965c', |
| | | msgEndTime: null, |
| | | msgEndTimeIso: '', |
| | | picUrl: '', |
| | | extendJson: '{"key1":"è¯·åæ¶å¤çé鸿é£åèµ·ç请åç³è¯·"}', |
| | | extendParam: null, |
| | | extendCascade: null, |
| | | createUser: '13856591439', |
| | | webCascadeUrl: null, |
| | | h5CascadeUrl: null, |
| | | cascadeTodoOpenType: null, |
| | | cascadeSourceConfigId: null, |
| | | h5Url: '/h5/pages/form-page/form-page?returnPath=-1&appId=32ca8770-6f85-11ec-b5a3-991864da52a6&taskId=98c256b9-aaff-11ef-8347-fa163ee2c57c&processNodeId=UserTask_dde7d83377343a2d5fa1f60c23b023ef&modelCode=tb_leave_dfe_for_dfe_runtime&type=flowHandle&component=form-apply&_sn=true', |
| | | segmentId: 'dfe-form', |
| | | lastUsers: 'é鸿é£', |
| | | currentUsers: 'é鸿é£', |
| | | todoTypeCode: 'dfe@@tlnc_placeholder_tlnc@@dfeFlowTodoModuleId', |
| | | currentUserIds: '13856591439', |
| | | lastUserIds: '13856591439', |
| | | msgDesc: null, |
| | | widgetUrl: null, |
| | | detailType: null, |
| | | widgetWidth: null, |
| | | widgetHeight: null, |
| | | userIdList: null, |
| | | statusName: null, |
| | | arriveTime: null, |
| | | stayTime: null, |
| | | todoType: null, |
| | | cascadePort: null, |
| | | openMode: null |
| | | } |
| | | }, |
| | | msgType: 'tlnc' |
| | | } |
| | | // const argus = JSON.stringify(params) |
| | | myWindow.postMessage('{"method":"goToApp","argument":' + row.param5 + '}', '*') |
| | | }, 3000) |
| | | }) |
| | | }, |
| | | SubSuccess (str) { |
| | | this[str] = false |
| | | this.getTaskList() |
| | | }, |
| | | funcClick(item) { |
| | | funcClick (item) { |
| | | if (item.name == 'èå¤å·¥ä½å°') { |
| | | getAppHeaderNav(4).then(res => { |
| | | window.open(res, "_blank") |
| | | return |
| | | window.open(res, '_blank') |
| | | }) |
| | | } |
| | | this.$router.push(item.path) |
| | | }, |
| | | updateDate() { |
| | | updateDate () { |
| | | this.nowDate = dayjs().format('YYYYå¹´MæDæ¥') |
| | | this.nowWeek = weeks[new Date().getDay()] |
| | | }, |
| | | initData() { |
| | | initData () { |
| | | this.getWorkHead() |
| | | this.getWorkBody() |
| | | this.getTaskList() |
| | | this.getWarningList() |
| | | }, |
| | | getWarningList() { |
| | | getWarningList () { |
| | | getWorkbenchData({ queryType: 4 }).then(res => { |
| | | this.warningList = res.timeOutVisitList || [] |
| | | this.warningTotal = res.timeOutVisitNum || 0 |
| | | }) |
| | | }, |
| | | getTaskList() { |
| | | getTaskList () { |
| | | getWorkbenchData({ queryType: 3 }).then(res => { |
| | | this.taskList = res.noticesList || [] |
| | | this.taskTotal = res.noticesNum || 0 |
| | | }) |
| | | }, |
| | | getWorkBody() { |
| | | getWorkBody () { |
| | | getWorkbenchData({ queryType: 2 }).then(res => { |
| | | this.staticData = res || {} |
| | | this.initEchart2() |
| | |
| | | this.initEchart4() |
| | | }) |
| | | }, |
| | | getWorkHead() { |
| | | getWorkHead () { |
| | | getWorkbenchData({ queryType: 1 }).then(res => { |
| | | this.headerData = res || {} |
| | | let arr = [] |
| | | const arr = [] |
| | | arr.push({ name: '访客', value: this.headerData.inParkVisitUserNum }) |
| | | arr.push({ name: 'å
é¨åå·¥', value: this.headerData.todayInParkUserNum - this.headerData.inParkLwUserNum - this.headerData.inParkVisitUserNum }) |
| | | arr.push({ name: 'é¿æç¸å
³æ¹', value: this.headerData.inParkLwUserNum }) |
| | |
| | | this.initEchart1() |
| | | }) |
| | | }, |
| | | jumpPage(page) { |
| | | jumpPage (page) { |
| | | this.$router.push(page) |
| | | }, |
| | | departure(id) { |
| | | departure (id) { |
| | | this.$confirm('ç¡®å®ç¦»åå, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | |
| | | |
| | | }) |
| | | }, |
| | | handleDetail(row) { |
| | | handleDetail (row) { |
| | | if (row.type === 7) { |
| | | this.handleTest(row); |
| | | return |
| | | } |
| | | if (row.objType === 2) { |
| | | this.$refs.OperaDetailsWindow.open('å
¬å¡è½¦ç³è¯·è¯¦æ
', { ...row, id: row.objId }) |
| | | return |
| | |
| | | }) |
| | | } |
| | | }, |
| | | initEchart1() { |
| | | initEchart1 () { |
| | | const myChart = echarts.init(document.getElementById('echart1')) |
| | | let that = this |
| | | const that = this |
| | | |
| | | const option = { |
| | | tooltip: { |
| | |
| | | myChart.resize() |
| | | }) |
| | | }, |
| | | initEchart2() { |
| | | initEchart2 () { |
| | | const myChart = echarts.init(document.getElementById('echart2')) |
| | | let that = this |
| | | const that = this |
| | | myChart.setOption({ |
| | | grid: { |
| | | top: '4%', |
| | |
| | | { offset: 0, color: '#56abf8' }, |
| | | { offset: 1, color: '#407ff0' } |
| | | ] |
| | | ), |
| | | ) |
| | | // barBorderRadius: [0, 10, 10, 0] |
| | | } |
| | | } |
| | |
| | | myChart.resize() |
| | | }) |
| | | }, |
| | | initEchart3() { |
| | | initEchart3 () { |
| | | const myChart = echarts.init(document.getElementById('echart3')) |
| | | let that = this |
| | | const that = this |
| | | myChart.setOption({ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | |
| | | myChart.resize() |
| | | }) |
| | | }, |
| | | initEchart4() { |
| | | initEchart4 () { |
| | | const myChart = echarts.init(document.getElementById('echart4')) |
| | | let that = this |
| | | const that = this |
| | | myChart.setOption({ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | |
| | | import OperaVisitsDesWindow from '@/components/business/OperaVisitsDesWindow' |
| | | import dayjs from 'dayjs' |
| | | import { |
| | | getAppHeaderNav, |
| | | taskCenterHeadPC, |
| | | taskCenterPage, |
| | | taskSignRead |
| | |
| | | this[str] = false |
| | | this.getTaskList() |
| | | }, |
| | | handleTest (row) { |
| | | getAppHeaderNav(5).then(res => { |
| | | if (res === undefined || res == null) { |
| | | return |
| | | } |
| | | const myWindow = window.open(res) |
| | | setTimeout(() => { |
| | | myWindow.postMessage('{"method":"goToApp","argument":' + row.param5 + '}', '*') |
| | | }, 3000) |
| | | }) |
| | | }, |
| | | handleDetail (row) { |
| | | if (row.type === 7) { |
| | | this.handleTest(row); |
| | | return |
| | | } |
| | | if (this.filters.queryType == 3) { |
| | | taskSignRead({ |
| | | noticesId: row.id, |
| | |
| | | |
| | | |
| | | 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 |
| | |
| | | cache: |
| | | session: |
| | | # ä¼è¯è¿ææ¶é¿(s) |
| | | expire: 18000 |
| | | expire: 1800 |
| | | captcha: |
| | | # éªè¯ç è¿ææ¶é¿(s) |
| | | expire: 300 |
| | |
| | | */ |
| | | public void bookingsStart(SystemUser systemUser, Bookings bookings, Rooms rooms){ |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | String accessToken = systemDictDataBiz.queryCodeById(106); |
| | | String accessToken = systemDictDataBiz.getWxAccessToken(); |
| | | |
| | | log.info("微信å°ç¨åº ä¼è®®å¼å§è®¢é
æ¶æ¯åéæ¥å¿ -> accessTokenï¼{}",accessToken); |
| | | //è¿éç®åèµ·è§æä»¬æ¯æ¬¡é½è·åææ°çaccess_tokenï¼æ¶é´å¼åä¸ï¼åºè¯¥å¨access_tokenå¿«è¿ææ¶åéæ°è·åï¼ |
| | | String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+accessToken; |
| | |
| | | log.info("微信å°ç¨åº-> åæ¶éç¥è®¢é
æ¶æ¯å鿥å¿ï¼{}",JSONObject.toJSONString(responseEntity)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¼è®®åæ¶éç¥ |
| | | * @param systemUser ç¨æ· |
| | |
| | | */ |
| | | public void bookingsCancel(SystemUser systemUser, Bookings bookings, Rooms rooms){ |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | String accessToken = systemDictDataBiz.queryCodeById(106); |
| | | String accessToken =systemDictDataBiz.getWxAccessToken() ; |
| | | log.info("微信å°ç¨åº ä¼è®®å¼å§è®¢é
æ¶æ¯åéæ¥å¿ -> accessTokenï¼{}",accessToken); |
| | | //è¿éç®åèµ·è§æä»¬æ¯æ¬¡é½è·åææ°çaccess_tokenï¼æ¶é´å¼åä¸ï¼åºè¯¥å¨access_tokenå¿«è¿ææ¶åéæ°è·åï¼ |
| | | String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+accessToken; |
| | |
| | | */ |
| | | public void bookingsReservation(SystemUser systemUser, Bookings bookings, Rooms rooms){ |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | String accessToken = systemDictDataBiz.queryCodeById(106); |
| | | String accessToken = systemDictDataBiz.getWxAccessToken() ; |
| | | log.info("微信å°ç¨åº ä¼è®®å¼å§è®¢é
æ¶æ¯åéæ¥å¿ -> accessTokenï¼{}",accessToken); |
| | | |
| | | //è¿éç®åèµ·è§æä»¬æ¯æ¬¡é½è·åææ°çaccess_tokenï¼æ¶é´å¼åä¸ï¼åºè¯¥å¨access_tokenå¿«è¿ææ¶åéæ°è·åï¼ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.wx; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.dao.business.model.Bookings; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 微信å
¬ä¼å·éç¥ |
| | | * |
| | | * @Author : Rk |
| | | * @create 2023/12/27 9:19 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class WxPlatNotice { |
| | | |
| | | public void testSendNotice(List<String> openIds,String token){ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | Map<String, Object> const9 = new HashMap<String,Object>(); |
| | | const9.put("value","ç³è¯·å¾
æ¨å®¡æ¹"); |
| | | Map<String, Object> thing1 = new HashMap<String,Object>(); |
| | | thing1.put("value", "æµè¯åç§°"); |
| | | Map<String, Object> car_number7 = new HashMap<String,Object>(); |
| | | car_number7.put("value","çAP12345"); |
| | | Map<String, Object> character_string6 = new HashMap<String,Object>(); |
| | | character_string6.put("value","1"); |
| | | Map<String, Object> thing4 = new HashMap<String,Object>(); |
| | | thing4.put("value","çç±"); |
| | | dataMap.put("const9",const9); |
| | | dataMap.put("thing1",thing1); |
| | | dataMap.put("car_number7",car_number7); |
| | | dataMap.put("character_string6",character_string6); |
| | | dataMap.put("thing4",thing4); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("template_id", "SPwvgtASkm1aMDBsYhX2wHKdL2JBEGPknDkgniSza2Y"); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | // log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", msgId != null ? "æå" : "失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¼è®®å®¤é¢çº¦éç¥ |
| | | * @param bookings |
| | | * @param tempId CuoDoxOl6SFwi4NhNgOQgKSJVjDD4VCIaPYlnbv_zdY |
| | | * @param token |
| | | * @param openIds |
| | | */ |
| | | public void sendMeetingBookTemplateNotice(Bookings bookings,String tempId, String token, Set<String> openIds){ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | //ä¼è®®åç§° |
| | | Map<String, Object> thing1 = new HashMap<String,Object>(); |
| | | thing1.put("value",bookings.getName()); |
| | | //ä¼è®®æ¶é´ |
| | | Map<String, Object> time2 = new HashMap<String,Object>(); |
| | | time2.put("value", DateUtil.getDate(bookings.getStartTime(),"yyyy-MM-dd HH:mm:ss") ); |
| | | //ä¼è®®å°ç¹ |
| | | Map<String, Object> thing3 = new HashMap<String,Object>(); |
| | | thing3.put("value",bookings.getRoomName()); |
| | | //å起人 |
| | | Map<String, Object> thing6 = new HashMap<String,Object>(); |
| | | thing6.put("value",bookings.getManagerInfo()); |
| | | |
| | | dataMap.put("thing1",thing1); |
| | | dataMap.put("time2",time2); |
| | | dataMap.put("thing3",thing3); |
| | | dataMap.put("thing6",thing6); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("template_id", tempId); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¼è®®å®¤åæ¶éç¥ |
| | | * @param bookings |
| | | * @param tempId CiB6vCT2InovAoQfudY-lvzLSV0-3lfz3a5GsSFCzd8 |
| | | * @param token |
| | | * @param openIds |
| | | */ |
| | | public void sendMeetingBookCancelTemplateNotice(Bookings bookings,String tempId, String token, Set<String> openIds){ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | //ä¼è®®åç§° |
| | | Map<String, Object> thing1 = new HashMap<String,Object>(); |
| | | thing1.put("value",bookings.getName()); |
| | | //ä¼è®®æ¶é´ |
| | | Map<String, Object> time6 = new HashMap<String,Object>(); |
| | | time6.put("value", DateUtil.getDate(bookings.getStartTime(),"yyyy-MM-dd HH:mm:ss") ); |
| | | //ä¼è®®å°ç¹ |
| | | Map<String, Object> thing2 = new HashMap<String,Object>(); |
| | | thing2.put("value",bookings.getRoomName()); |
| | | //é¢çº¦äººå |
| | | Map<String, Object> thing4 = new HashMap<String,Object>(); |
| | | thing4.put("value",bookings.getManagerInfo()); |
| | | |
| | | dataMap.put("thing1",thing1); |
| | | dataMap.put("time6",time6); |
| | | dataMap.put("thing2",thing2); |
| | | dataMap.put("thing4",thing4); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("template_id", tempId); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "åä¼äººåææºå·") |
| | | @TableField(exist = false) |
| | | private String userPhone; |
| | | @ApiModelProperty(value = "openid") |
| | | @TableField(exist = false) |
| | | private String openid; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | public String generate(@RequestParam Integer bookingsId, @RequestParam Integer userId) { |
| | | String accessToken = systemDictDataBiz.queryCodeById(106); |
| | | String accessToken = systemDictDataBiz.getWxAccessToken() ; |
| | | //çæå¾çä¸ä¼ OSS |
| | | Map<String,Object> body = new HashMap<>(); |
| | | // åºæ¯ç ï¼ä¸å端约å®ï¼æç»æ¯éè¦å端解æ |
| | |
| | | } |
| | | |
| | | public InputStream generateImgStream(Integer bookingsId, Integer userId) { |
| | | String accessToken = systemDictDataBiz.queryCodeById(106); |
| | | String accessToken = systemDictDataBiz.getWxAccessToken() ; |
| | | log.info("微信å°ç¨åº-> accessTokenï¼{}",accessToken); |
| | | //çæå¾çä¸ä¼ OSS |
| | | Map<String,Object> body = new HashMap<>(); |
| | |
| | | import com.doumee.core.utils.*; |
| | | import com.doumee.core.wx.MeetConstants; |
| | | import com.doumee.core.wx.SendWxMessage; |
| | | import com.doumee.core.wx.WxPlatNotice; |
| | | import com.doumee.dao.admin.request.BusinessOverDTO; |
| | | import com.doumee.dao.admin.request.QrOpenDoorDto; |
| | | import com.doumee.dao.admin.response.DevWgResponseParam; |
| | |
| | | if(Constants.equalsInteger(bookings.getJoinNotice(),Constants.ZERO)){ |
| | | this.sendNotice(bookings, MeetConstants.TWO); |
| | | } |
| | | //åé微信订é
éç¥ |
| | | // sendWxMessage.bookingsReservation(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getUserId()); |
| | | this.sendWxNotice(bookings,Objects.isNull(systemUser)||StringUtils.isBlank(systemUser.getOpenid())?null:systemUser.getOpenid(),Constants.ZERO); |
| | | |
| | | return bookings.getId(); |
| | | } |
| | |
| | | updateProjectRel(bookings, user); |
| | | handleFile(bookings, user); |
| | | //åéä¼è®®éç¥ |
| | | this.sendNotice(bookings, MeetConstants.TWO); |
| | | if(Constants.equalsInteger(bookings.getJoinNotice(),Constants.ZERO)){ |
| | | this.sendNotice(bookings, MeetConstants.TWO); |
| | | } |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getUserId()); |
| | | this.sendWxNotice(bookings,Objects.isNull(systemUser)||StringUtils.isBlank(systemUser.getOpenid())?null:systemUser.getOpenid(),Constants.ZERO); |
| | | } |
| | | |
| | | @Override |
| | |
| | | bookings.setEditor(user.getId()); |
| | | bookingsMapper.updateById(bookings); |
| | | //åæ¶ä¼è®® åéåæ¶éç¥ |
| | | this.sendNotice(bookings, 3); |
| | | //åé微信订é
éç¥ |
| | | sendWxMessage.bookingsCancel(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | if(Constants.equalsInteger(bookings.getJoinNotice(),Constants.ZERO)){ |
| | | this.sendNotice(bookings, 3); |
| | | } |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getUserId()); |
| | | this.sendWxNotice(bookings,Objects.isNull(systemUser)||StringUtils.isBlank(systemUser.getOpenid())?null:systemUser.getOpenid(),Constants.ONE); |
| | | |
| | | } |
| | | |
| | |
| | | String avatarPath = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | | userResponseList.forEach(i -> { |
| | | if(StringUtils.isNotBlank(i.getAvatar())){ |
| | | if(StringUtils.isNotBlank(i.getAvatar()) && !i.getAvatar().startsWith("HKIMG") ){ |
| | | i.setAvatar(avatarPath+i.getAvatar()); |
| | | }else{ |
| | | i.setAvatar(null); |
| | | } |
| | | }); |
| | | meetingDetailResponse.setUserResponseList(userResponseList); |
| | |
| | | bookings.setEditor(businessOverDTO.getUserId()); |
| | | bookingsMapper.updateById(bookings); |
| | | //åæ¶ä¼è®® åéåæ¶éç¥ |
| | | this.sendNotice(bookings, 3); |
| | | //åé微信订é
éç¥ |
| | | // sendWxMessage.bookingsCancel(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | if(Constants.equalsInteger(bookings.getJoinNotice(),Constants.ZERO)){ |
| | | this.sendNotice(bookings, 3); |
| | | } |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getUserId()); |
| | | this.sendWxNotice(bookings,Objects.isNull(systemUser)||StringUtils.isBlank(systemUser.getOpenid())?null:systemUser.getOpenid(),Constants.ONE); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | bookings.setEditDate(new Date()); |
| | | bookingsMapper.updateById(bookings); |
| | | this.sendNotice(bookings, MeetConstants.ONE); |
| | | |
| | | //åé微信éç¥ |
| | | // sendWxMessage.bookingsStart(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @Async |
| | | public void sendWxNotice(Bookings bookings,String openid, Integer sendType) { |
| | | try{ |
| | | List<UserRel> userRelList = userRelMapper.selectJoinList(UserRel.class,new MPJLambdaWrapper<UserRel>() |
| | | .selectAll(UserRel.class) |
| | | .selectAs(SystemUser::getRealname,UserRel::getRealName) |
| | | .selectAs(SystemUser::getMobile,UserRel::getUserPhone) |
| | | .selectAs(SystemUser::getOpenid,UserRel::getOpenid) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,UserRel::getUserId) |
| | | .eq(UserRel::getObjType, MeetConstants.ONE) |
| | | .eq(UserRel::getObjId, bookings.getId()) |
| | | .eq(UserRel::getIsdeleted, MeetConstants.ZERO) |
| | | .isNotNull(SystemUser::getOpenid) |
| | | ); |
| | | List<String> openIdList = userRelList.stream().map(i->i.getOpenid()).collect(Collectors.toList()); |
| | | if(StringUtils.isNotBlank(openid)){ |
| | | openIdList.add(openid); |
| | | } |
| | | Set<String> openIds = new HashSet<String>(openIdList); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(openIds)){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | if(Constants.equalsInteger(sendType,Constants.ZERO)){ |
| | | wxPlatNotice.sendMeetingBookTemplateNotice(bookings,"CuoDoxOl6SFwi4NhNgOQgKSJVjDD4VCIaPYlnbv_zdY", |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),openIds); |
| | | }else{ |
| | | |
| | | wxPlatNotice.sendMeetingBookCancelTemplateNotice(bookings,"CiB6vCT2InovAoQfudY-lvzLSV0-3lfz3a5GsSFCzd8", |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),openIds); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Bookings> getMyJoinBookingMeet(Integer userId, Integer roomId, LocalDateTime startTime, LocalDateTime endTime) { |
| | | DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | |
| | | }catch (Exception e){ |
| | | return ApiResponse.failed(ResponseStatus.SERVER_ERROR); |
| | | } |
| | | |
| | | } |
| | | /** |
| | | * å·æ°JWT令ç,ç¨æ§çä»¤çæ¢æ°ç令ç |
| | |
| | | cache: |
| | | session: |
| | | # ä¼è¯è¿ææ¶é¿(s) |
| | | expire: 18000 |
| | | expire: 1800 |
| | | captcha: |
| | | # éªè¯ç è¿ææ¶é¿(s) |
| | | expire: 300 |
| | |
| | | url: 1 |
| | | email: 1 |
| | | license: |
| | | |
| | | name: Apache 2.0 |
| | | url: https://www.apache.org/licenses/LICENSE-2.0.html |
| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: |
| | | application: |
| | | name: system_gateway |
| | | # å®å
¨é
ç½® |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8" ?> |
| | | <configuration> |
| | | <appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender"> |
| | | <layout class="ch.qos.logback.classic.PatternLayout"> |
| | | <pattern>%highlight(%date{yyyy-MM-dd HH:mm:ss}) | %highlight(%-5level) | %highlight(%thread) | %highlight(%logger) | %msg%n</pattern> |
| | | </layout> |
| | | </appender> |
| | | <property name="log.path" value="logs/system_gateway"></property> |
| | | <property name="log.fileSize" value="100MB"></property> |
| | | <property name="log.historyDays" value="7"></property> |
| | | |
| | | <appender name="fileInfoLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>ERROR</level> |
| | | <!--å¹é
å°±èå»--> |
| | | <onMatch>DENY</onMatch> |
| | | <onMismatch>ACCEPT</onMismatch> |
| | | </filter> |
| | | <encoder> |
| | | <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
| | | </encoder> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| | | <!--è·¯å¾--> |
| | | <fileNamePattern>${log.path}/info.%d.%i.log</fileNamePattern> |
| | | <maxFileSize>${log.fileSize}</maxFileSize> |
| | | <maxHistory>${log.historyDays}</maxHistory> |
| | | <totalSizeCap>1GB</totalSizeCap> |
| | | </rollingPolicy> |
| | | </appender> |
| | | |
| | | <appender name="fileErrorLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| | | <level>ERROR</level> |
| | | </filter> |
| | | <encoder> |
| | | <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
| | | </encoder> |
| | | <!--æ»å¨çç¥--> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| | | <!--è·¯å¾--> |
| | | <fileNamePattern>${log.path}/error.%d.%i.log</fileNamePattern> |
| | | <maxFileSize>${log.fileSize}</maxFileSize> |
| | | <maxHistory>${log.historyDays}</maxHistory> |
| | | <totalSizeCap>1GB</totalSizeCap> |
| | | </rollingPolicy> |
| | | </appender> |
| | | <!-- 弿¥åå
¥æ¥å¿ --> |
| | | <appender name ="ASYNC" class= "ch.qos.logback.classic.AsyncAppender"> |
| | | <!-- ä¸ä¸¢å¤±æ¥å¿.é»è®¤ç,妿éåç80%已满,åä¼ä¸¢å¼TRACTãDEBUGãINFO级å«çæ¥å¿ --> |
| | | <discardingThreshold >0</discardingThreshold> |
| | | <!-- æ´æ¹é»è®¤çéåçæ·±åº¦,该å¼ä¼å½±åæ§è½.é»è®¤å¼ä¸º256 --> |
| | | <queueSize>512</queueSize> |
| | | <!-- æ·»å éå çappender,æå¤åªè½æ·»å ä¸ä¸ª --> |
| | | <appender-ref ref ="fileInfoLog"/> |
| | | </appender> |
| | | <root level="info"> |
| | | <appender-ref ref="consoleLog"/> |
| | | <appender-ref ref="fileInfoLog"/> |
| | | <appender-ref ref="fileErrorLog"/> |
| | | </root> |
| | | </configuration> |
| | |
| | | systemDictData.setLoginUserInfo(this.getLoginUser(token)); |
| | | systemDictData.setUpdateUser(systemDictData.getLoginUserInfo().getId()); |
| | | systemDictDataBiz.updateById(systemDictData); |
| | | systemDictDataBiz.refreshCache(); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | String getPreFixPath(String resourceCode, String targetCode); |
| | | |
| | | |
| | | void refreshCache(); |
| | | |
| | | String getWxAccessToken(); |
| | | } |
| | |
| | | import com.doumee.service.system.SystemDictService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | @Service |
| | | public class SystemDictDataBizImpl implements SystemDictDataBiz { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void refreshCache() { |
| | | /* HKCarOpenService.ACCESS_KEY= queryByCode(Constants.HK_PARAM, Constants.HK_CARS_OPENAPI_ACCESS_KEY).getCode(); |
| | | HKCarOpenService.BASE_URL= queryByCode(Constants.HK_PARAM, Constants.HK_CARS_OPENAPI_URL).getCode(); |
| | | HKCarOpenService.ACCESS_SECRET= queryByCode(Constants.HK_PARAM, Constants.HK_CARS_OPENAPI_ACCESS_SECRET).getCode(); |
| | | ArtemisConfig.host = queryByCode(Constants.HK_PARAM, Constants.HK_HOST).getCode(); |
| | | ArtemisConfig.appKey = queryByCode(Constants.HK_PARAM, Constants.HK_APPKEY).getCode(); |
| | | ArtemisConfig.appSecret = queryByCode(Constants.HK_PARAM, Constants.HK_APPSECRET).getCode(); |
| | | HKConstants.https = queryByCode(Constants.HK_PARAM, Constants.HK_HTTPS).getCode();*/ |
| | | } |
| | | @Override |
| | | public String getWxAccessToken(){ |
| | | |
| | | return queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(); |
| | | } |
| | | |
| | | @Override |
| | | public String getPreFixPath(String resourceCode, String targetCode) { |
| | | |
| | | if (StringUtils.isBlank(resourceCode) || StringUtils.isBlank(targetCode)){ |
| | |
| | | public static final String HK_APPSECRET ="HK_APPSECRET" ; |
| | | public static final String HK_HTTPS ="HK_HTTPS" ; |
| | | public static final String HK_PUSH_URL = "HK_PUSH_URL"; |
| | | public static final String HK_CARS_OPENAPI_ACCESS_KEY = "HK_CARS_OPENAPI_ACCESS_KEY"; |
| | | public static final String HK_CARS_OPENAPI_ACCESS_SECRET = "HK_CARS_OPENAPI_ACCESS_SECRET"; |
| | | public static final String HK_CARS_OPENAPI_URL = "HK_CARS_OPENAPI_URL"; |
| | | public static final String HK_ROOTORG_CODE ="HK_ROOTORG_CODE" ; |
| | | public static final String HK_ROOTORG_NAME ="HK_ROOTORG_NAME" ; |
| | | public static final String PLATFORM ="PLATFORM" ; |
| | |
| | | public static final String MYSQL_BACKUP_DIR ="MYSQL_BACKUP_DIR" ; |
| | | public static final String EVENT_FILES_PRIVATE_DOMAIN ="EVENT_FILES_PRIVATE_DOMAIN" ; |
| | | public static final String EVENT_FILES_PUBLIC_DOMAIN ="EVENT_FILES_PUBLIC_DOMAIN" ; |
| | | public static final String HK_WXTOKEN_CONFIGID ="HK_WXTOKEN_CONFIGID" ; |
| | | public static final String HK_WXTOKEN_TAGID ="HK_WXTOKEN_TAGID" ; |
| | | public static final String WMS_TOTAL_STOCK_NUM ="WMS_TOTAL_STOCK_NUM" ; |
| | | public static boolean DEALING_HK_SYNCPRIVILEGE= false; |
| | | public static boolean DEALING_HK_SYNCDEVICE = false; |
| | | public static boolean DEALING_HK_SYNCPLATFORM = false; |
| | |
| | | public static boolean DEALING_HK_DEL_USER = false; |
| | | public static boolean DEALING_HK_VISIT = false; |
| | | public static boolean DEALING_HK_VISIT_EXPIRE = false; |
| | | public static boolean DEALING_HK_NOTICE_LIST = false; |
| | | public static boolean DEALING_FROM_HK_VISIT = false; |
| | | public static boolean DEALING_HK_EMPOWER = false; |
| | | public static boolean DEALING_HK_EMPOWER_DETAIL = false; |
| | |
| | | d = d.setScale(4, BigDecimal.ROUND_HALF_UP); |
| | | return d; |
| | | } |
| | | public static BigDecimal formatBigdecimal0Float(BigDecimal d) { |
| | | if (d == null) { |
| | | d = new BigDecimal(0.0); |
| | | } |
| | | //ä¿ç两ä½å°æ°ä¸åèäºå
¥ |
| | | d = d.setScale(0, BigDecimal.ROUND_HALF_UP); |
| | | return d; |
| | | } |
| | | public static BigDecimal formatBigdecimal2Float(BigDecimal d) { |
| | | if (d == null) { |
| | | d = new BigDecimal(0.0); |
| | |
| | | int logisticsCarUse = 4;//ç©æµè½¦å®¡æ¹ |
| | | int system = 5;//ç³»ç»æ¶æ¯ |
| | | int reason = 6;//å
¥ååå |
| | | int hknotice = 7;//海康èå¤ä»£å |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åXæä»½ä¹åçæä»½æ° |
| | | * @param currentDate |
| | |
| | | } |
| | | return list; |
| | | } |
| | | /** |
| | | * è·åXæä»½ä¹åçæä»½æ° |
| | | * @param currentDate |
| | | * @param month |
| | | * @return |
| | | */ |
| | | public static List<String> getDateListBeforMonth(Date currentDate , Integer month) { |
| | | SimpleDateFormat sdfYear = new SimpleDateFormat("yyyy"); |
| | | SimpleDateFormat sdfMonth = new SimpleDateFormat("MM"); |
| | | int currentYear = Integer.parseInt(sdfYear.format(currentDate)); |
| | | int currentMonth = Integer.parseInt(sdfMonth.format(currentDate)); |
| | | List<String> list = new ArrayList<>(); |
| | | |
| | | for (int i = 0; i < month; i++) { |
| | | int tempYear = currentYear; |
| | | int tempMonth = currentMonth - i; |
| | | |
| | | |
| | | if (tempMonth <= 0) { |
| | | tempYear--; |
| | | tempMonth += 12; |
| | | } |
| | | list.add(tempYear +"-" + StringUtils.leftPad(Integer.toString(tempMonth),2,"0")); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | public static List<String> getBeforDays(Date currentDate,Integer days){ |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | |
| | | startDate = calendar.getTime(); |
| | | list.add(DateUtil.dateToString(startDate,"yyyy-MM-dd")); |
| | | System.out.println(DateUtil.dateToString(startDate,"yyyy-MM-dd")); |
| | | } |
| | | return list; |
| | | } |
| | | public static List<Date> getDateListBeforDays(Date currentDate,Integer days){ |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(currentDate); |
| | | Date endDate = currentDate; // è·åå½åæ¥æ |
| | | calendar.add(Calendar.DAY_OF_YEAR, -days); // å¾åæ¨7天 |
| | | Date startDate = calendar.getTime(); // è·åæ¨ç®åçæ¥æ |
| | | List<Date> list = new ArrayList<>(); |
| | | while (startDate.before(endDate)) { |
| | | calendar.add(Calendar.DAY_OF_YEAR, 1); // è·åä¸ä¸å¤©æ¥æ |
| | | startDate = calendar.getTime(); |
| | | list.add(startDate); |
| | | } |
| | | return list; |
| | | } |
| | |
| | | * @return String |
| | | * @throws Exception |
| | | */ |
| | | public static String getNowPlusTime() throws Exception { |
| | | public static String getNowPlusTime() { |
| | | String nowDate = ""; |
| | | try { |
| | | java.sql.Date date = null; |
| | |
| | | return getNowShortDate().substring(0, 6) + "01"; |
| | | } catch (Exception e) { |
| | | return ""; |
| | | } |
| | | } |
| | | public static List<Date> getThisMonthDateList() { |
| | | List<Date> dateList = new ArrayList<>(); |
| | | try { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | int daysInMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); |
| | | calendar.set(Calendar.HOUR,0); |
| | | calendar.set(Calendar.MINUTE,0); |
| | | calendar.set(Calendar.SECOND,0); |
| | | calendar.set(Calendar.MILLISECOND,0); |
| | | for (int i = 0; i < daysInMonth; i++) { |
| | | calendar.set(Calendar.DAY_OF_MONTH,i+1); |
| | | dateList.add(calendar.getTime()); |
| | | } |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | return dateList; |
| | | } |
| | | public static List<Date> getThisYearMonthList() { |
| | | List<Date> dateList = new ArrayList<>(); |
| | | try { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.set(Calendar.DAY_OF_MONTH,1); |
| | | calendar.set(Calendar.HOUR,0); |
| | | calendar.set(Calendar.MINUTE,0); |
| | | calendar.set(Calendar.SECOND,0); |
| | | calendar.set(Calendar.MILLISECOND,0); |
| | | for (int i = 0; i < 12; i++) { |
| | | calendar.set(Calendar.MONTH,i); |
| | | dateList.add(calendar.getTime()); |
| | | } |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | return dateList; |
| | | } |
| | | public static Date getFirstThisYearDate() { |
| | | try { |
| | | return sdfShort.parse( getNowShortDate().substring(0, 4) + "0101"); |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | } |
| | | public static String getFirstDayCurrentMonth() { |
| | |
| | | // System.out.println(DateUtil.afterMinutesDate(-5)); |
| | | |
| | | |
| | | DateUtil.getBeforDays(new Date(),7); |
| | | List<Date> list =getThisMonthDateList(); |
| | | for(Date d :list){ |
| | | System.out.println(getPlusTime2(d)); |
| | | } |
| | | List<Date> list1 =getThisYearMonthList(); |
| | | for(Date d :list1){ |
| | | System.out.println(getPlusTime2(d)); |
| | | } |
| | | |
| | | // Date startTime = DateUtil.StringToDate("2024-05-01 08:00:00" ,"yyyy-MM-dd HH:mm:ss"); |
| | | // Date endTime = DateUtil.StringToDate("2024-05-01 17:00:00" ,"yyyy-MM-dd HH:mm:ss"); |
| | |
| | | calendar.add(Calendar.MONTH, month);// |
| | | return calendar.getTime(); |
| | | } |
| | | public static Date addYearToDate(Date date, int year) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.add(Calendar.YEAR, year);// |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | public static String afterDateToStr(Integer days){ |
| | | Date date = new Date(); |
| | |
| | | @ApiModelProperty(value = "ç¨æ·å") |
| | | private String username; |
| | | |
| | | @ApiModelProperty(value = "微信openId") |
| | | private String openid; |
| | | |
| | | @NotBlank(message = "å¯ç ä¸è½ä¸ºç©º") |
| | | @ApiModelProperty(value = "å¯ç ") |
| | | private String password; |
| | |
| | | @ExcelColumn(name="å
³è对象åç§°") |
| | | private String objName; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0è®¿å®¢å®¡æ¹ 1访客æ¥å¤ 2ç¨è½¦å®¡æ¹ 3鿣å¤ç 4ç©æµè½¦å®¡æ¹ 5ç³»ç»ç³»ç»") |
| | | @ExcelColumn(name="ç±»å 0è®¿å®¢å®¡æ¹ 1访客æ¥å¤ 2ç¨è½¦å®¡æ¹ 3鿣å¤ç 4ç©æµè½¦å®¡æ¹ 5ç³»ç»ç³»ç»") |
| | | @ApiModelProperty(value = "ç±»å 0è®¿å®¢å®¡æ¹ 1访客æ¥å¤ 2ç¨è½¦å®¡æ¹ 3鿣å¤ç 4ç©æµè½¦å®¡æ¹ 5ç³»ç»ç³»ç» 6å
¥ååå 7海康èå¤ä»£å") |
| | | @ExcelColumn(name="ç±»å 0è®¿å®¢å®¡æ¹ 1访客æ¥å¤ 2ç¨è½¦å®¡æ¹ 3鿣å¤ç 4ç©æµè½¦å®¡æ¹ 5ç³»ç»ç³»ç» 6å
¥ååå 7海康èå¤ä»£å") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "ç±»åæè¿°") |
| | |
| | | package com.doumee.service.system.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.config.jwt.JwtTokenUtil; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.SmsEmail; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.dto.LoginByOpenidDTO; |
| | | import com.doumee.dao.system.dto.LoginDTO; |
| | | import com.doumee.dao.system.dto.LoginPhoneDTO; |
| | |
| | | @Lazy |
| | | @Autowired |
| | | private SystemUserService systemUserService; |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | |
| | | @Autowired |
| | | private SmsEmailMapper smsEmailMapper; |
| | |
| | | loginLog.setLoginTime(new Date()); |
| | | loginLog.setSystemVersion(systemVersion); |
| | | loginLog.setIp(Utils.User_Client.getIP(request)); |
| | | loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | // loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | loginLog.setPlatform(Utils.User_Client.getPlatform(request)); |
| | | loginLog.setClientInfo(Utils.User_Client.getBrowser(request)); |
| | | loginLog.setOsInfo(Utils.User_Client.getOS(request)); |
| | |
| | | loginLog.setLoginUsername(dto.getUsername()); |
| | | loginLog.setLoginTime(new Date()); |
| | | loginLog.setSystemVersion(systemVersion); |
| | | loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | // loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | if(request!=null&&request.getHeaders()!=null && request.getHeaders().size()>0){ |
| | | loginLog.setIp(Utils.User_Client.getIP(request)); |
| | | loginLog.setPlatform(Utils.User_Client.getPlatform(request)); |
| | |
| | | loginLog.setOsInfo(Utils.User_Client.getOS(request)); |
| | | } |
| | | loginLog.setServerIp(Utils.Server.getIP()); |
| | | if(isDebug == null || !isDebug && dto.getCheckCode()){ |
| | | // if(isDebug == null || !isDebug && dto.getCheckCode()){ |
| | | // æ ¡éªéªè¯ç |
| | | try { |
| | | captchaService.check(dto.getUuid(), dto.getCode()); |
| | |
| | | systemLoginLogService.create(loginLog); |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT.getCode(),"对ä¸èµ·ï¼éªè¯ç 䏿£ç¡®ï¼"); |
| | | } |
| | | } |
| | | // } |
| | | // æ ¹æ®ç¨æ·åæ¥è¯¢ç¨æ·å¯¹è±¡ |
| | | SystemUser queryDto = new SystemUser(); |
| | | queryDto.setUsername(dto.getUsername()); |
| | |
| | | if( !StringUtils.equals(pwd, user.getPassword())){ |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); |
| | | } |
| | | dealOpenIdBiz(user,dto.getOpenid()); |
| | | Company company = new Company(); |
| | | if(Objects.nonNull(user.getCompanyId())){ |
| | | company = companyMapper.selectById(user.getCompanyId()); |
| | |
| | | return userInfo; |
| | | } |
| | | |
| | | |
| | | |
| | | private void dealOpenIdBiz(SystemUser user, String openid) { |
| | | if(StringUtils.isNotBlank(openid)){ |
| | | //妿openIdä¸ä¸ºç©º,ç»å®è¯¥ç¨æ·openid |
| | | systemUserMapper.update(null,new UpdateWrapper<SystemUser>().lambda() |
| | | .set(SystemUser::getOpenid,null) |
| | | .eq(SystemUser::getType,user.getType())); |
| | | systemUserMapper.update(null,new UpdateWrapper<SystemUser>().lambda() |
| | | .set(SystemUser::getOpenid,openid) |
| | | .eq(SystemUser::getId,user.getId())); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | |
| | | loginLog.setLoginUsername(dto.getPhone()); |
| | | loginLog.setLoginTime(new Date()); |
| | | loginLog.setSystemVersion(systemVersion); |
| | | loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | // loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | if(request!=null&&request.getHeaders()!=null && request.getHeaders().size()>0){ |
| | | loginLog.setIp(Utils.User_Client.getIP(request)); |
| | | loginLog.setPlatform(Utils.User_Client.getPlatform(request)); |
| | |
| | | SystemLoginLog loginLog = new SystemLoginLog(); |
| | | loginLog.setLoginUsername(dto.getUsername()); |
| | | loginLog.setLoginTime(new Date()); |
| | | loginLog.setReason("ãå
¬ä¼å·ã叿ºç«¯ç»éï¼openid="+dto.getOpenid()); |
| | | loginLog.setSystemVersion(systemVersion); |
| | | loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | // loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | if(request!=null&&request.getHeaders()!=null && request.getHeaders().size()>0){ |
| | | loginLog.setIp(Utils.User_Client.getIP(request)); |
| | | loginLog.setPlatform(Utils.User_Client.getPlatform(request)); |
| | |
| | | if( !StringUtils.equals(pwd, user.getPassword())){ |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); |
| | | } |
| | | dealOpenIdBiz(user,dto.getOpenid()); |
| | | Company company = new Company(); |
| | | if(Objects.nonNull(user.getCompanyId())){ |
| | | company = companyMapper.selectById(user.getCompanyId()); |
| | |
| | | SystemLoginLog loginLog = new SystemLoginLog(); |
| | | loginLog.setLoginTime(new Date()); |
| | | loginLog.setSystemVersion(systemVersion); |
| | | loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | // loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | loginLog.setServerIp(Utils.Server.getIP()); |
| | | |
| | | // æ ¹æ®ç¨æ·åæ¥è¯¢ç¨æ·å¯¹è±¡ |
| | |
| | | cache: |
| | | session: |
| | | # ä¼è¯è¿ææ¶é¿(s) |
| | | expire: 18000 |
| | | expire: 1800 |
| | | captcha: |
| | | # éªè¯ç è¿ææ¶é¿(s) |
| | | expire: 300 |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api; |
| | | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.service.business.VisitsService; |
| | | import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "海康代å宿¶æåæ¥å£") |
| | | @RestController |
| | | @RequestMapping("/timer/hkNotice") |
| | | public class HkNoticeTimerController extends BaseController { |
| | | @Autowired |
| | | private HkSyncVisitServiceImpl hkSyncVisitService; |
| | | @Autowired |
| | | private HkSyncVisitFromHKServiceImpl hkSyncVisitFromHKService; |
| | | @Autowired |
| | | private VisitsService visitsService; |
| | | |
| | | @ApiOperation("å¼å¯å®æ¶æ¥è¯¢ææ°äººå代忰æ®ç¶æ") |
| | | @GetMapping("/getNoticeList") |
| | | public ApiResponse getNoticeList() { |
| | | hkSyncVisitService.syncVisitData(); |
| | | return ApiResponse.success("å¼å¯å®æ¶ä¸å访客é¢çº¦ç³è¯·æå"); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.core.wx.WXConstant; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl; |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.mgt.DefaultSecurityManager; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @ApiOperation("å¼å¯å®æ¶æ´æ°å¾®ä¿¡å
¬ä¼å·accesstoken") |
| | | @GetMapping("/updateWxAccessToken") |
| | | public ApiResponse updateWxAccessToken() { |
| | | DefaultSecurityManager securityManager = new DefaultSecurityManager(); |
| | | DefaultSecurityManager securityManager = new DefaultSecurityManager(); |
| | | SecurityUtils.setSecurityManager(securityManager); |
| | | String token =null; |
| | | BaseResponse<String> result = HKService.wxAccessToken(systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_WXTOKEN_CONFIGID).getCode(),systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_WXTOKEN_TAGID).getCode()); |
| | | if(StringUtils.equals(result.getCode(), HKConstants.RESPONSE_SUCCEE) ){ |
| | | token= result.getData(); |
| | | SystemDictData systemDictData = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN); |
| | | if(!Objects.isNull(systemDictData)){ |
| | | systemDictData.setCode(token); |
| | | systemDictData.setUpdateTime(new Date()); |
| | | systemDictDataService.updateById(systemDictData); |
| | | } |
| | | }else{ |
| | | return ApiResponse.success("å¼å¯å®æ¶æ´æ°å¾®ä¿¡å
¬ä¼å·accesstoken失败"); |
| | | } |
| | | return ApiResponse.success("å¼å¯å®æ¶æ´æ°å¾®ä¿¡å
¬ä¼å·accesstokenæå"); |
| | | } |
| | | @ApiOperation("å¼å¯å®æ¶æ´æ°å¾®ä¿¡å
¬ä¼å·accesstoken") |
| | | @GetMapping("/updateWxAccessTokenOrigin") |
| | | public ApiResponse updateWxAccessTokenOrigin() { |
| | | DefaultSecurityManager securityManager = new DefaultSecurityManager(); |
| | | SecurityUtils.setSecurityManager(securityManager); |
| | | |
| | | String appId = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_APPID).getCode(); |
| | |
| | | cache: |
| | | session: |
| | | # ä¼è¯è¿ææ¶é¿(s) |
| | | expire: 18000 |
| | | expire: 1800 |
| | | captcha: |
| | | # éªè¯ç è¿ææ¶é¿(s) |
| | | expire: 300 |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.Cacheable; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | private HkSyncPrivilegeServiceImpl hkSyncPrivilegeService; |
| | | @Autowired |
| | | private HkSyncPushServiceImpl hkSyncPushService; |
| | | @Autowired |
| | | private HkSyncNoticeServiceImpl hkSyncNoticeService; |
| | | @Autowired |
| | | private HkSyncLoginAuthServiceImpl hkSyncLoginAuthService; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è·åå®é²å¹³å°ç³»ç»å
å¯èåè°æ´å°å" ) |
| | | @GetMapping("/getHkMenuLink") |
| | | @PostMapping("/getHkMenuLink/{type}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type",example = "0",value = "èåç±»å", required = true), |
| | | }) |
| | | public ApiResponse<String> getHkMenuLink(Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | public ApiResponse<String> getHkMenuLink(@PathVariable Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | LoginUserInfo loginUserInfo = this.getLoginUser(token); |
| | | String hkToken = DESUtil.generateTokenToHk(loginUserInfo.getUsername(),Integer.valueOf( |
| | | systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_TOKEN_VALIDITY).getCode() |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("ãæµ·åº·ãä»£åæ¶æ¯æ°æ®éå对æ¥å¤çæ¥å£") |
| | | @PostMapping("/notice/getList") |
| | | public ApiResponse getNoticeList( HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token ){ |
| | | String result = hkSyncNoticeService.syncHkNotices(this.getLoginUser(token).getUsername()); |
| | | return ApiResponse.success(result); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | import com.doumee.dao.web.reqeust.JobDetailDTO; |
| | | import com.doumee.dao.web.reqeust.SignInDTO; |
| | | import com.doumee.service.business.PlatformJobService; |
| | | import com.doumee.service.business.third.WmsService; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Autowired |
| | | private PlatformJobService platformJobService; |
| | | @Autowired |
| | | private WmsService wmsService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | |
| | | platformJobService.deleteByIdInBatch(this.getIdList(ids)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("æ¹éæ´æ°wmsååæ»è¿è¾é") |
| | | @GetMapping("/updateTotalNum") |
| | | @CloudRequiredPermission("business:platformjob:update") |
| | | public ApiResponse updateTotalNum(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | wmsService.computjobTotalNum(this.getIdList(ids)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | |
| | | import com.doumee.service.business.ApproveService; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.doumee.service.business.VisitsService; |
| | | import com.doumee.service.business.impl.hksync.HkSyncNoticeServiceImpl; |
| | | import com.doumee.service.system.NoticesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | @Autowired |
| | | private VisitsService visitsService; |
| | | |
| | | @Autowired |
| | | private HkSyncNoticeServiceImpl hkSyncNoticeService; |
| | | @Autowired |
| | | private NoticesService noticesService; |
| | | |
| | |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "isDetail", value = " æ¯å¦æ¥è¯¢è¯¦ç» 1æ¯ï¼0å¦", required = true), |
| | | }) |
| | | public ApiResponse<InternalHomeVO> taskCenterHead(@RequestParam Integer isDetail,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo loginUserInfo = getLoginUser(token); |
| | | hkSyncNoticeService.syncHkNotices(loginUserInfo.getUsername()); |
| | | return ApiResponse.success("æ¥è¯¢æå",approveService.getHomeDataH5(getLoginUser(token).getMemberId(),isDetail)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/taskCenterHeadPC") |
| | | public ApiResponse<InternalHomeVO> taskCenterHeadPC(@RequestBody NoticesDTO noticesDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo loginUserInfo = getLoginUser(token); |
| | | hkSyncNoticeService.syncHkNotices(loginUserInfo.getUsername()); |
| | | noticesDTO.setMemberId(loginUserInfo.getMemberId()); |
| | | noticesDTO.setUserId(loginUserInfo.getId()); |
| | | return ApiResponse.success("æ¥è¯¢æå",approveService.getHomeDataPC(noticesDTO)); |
| | |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "queryType", value = "æ¥è¯¢ç±»åï¼1=å¨å人æ°ï¼2=æ¥è¡¨æ°æ®ï¼3=å¾
åäºé¡¹ï¼4=è¶
æ¶é¢è¦", required = true), |
| | | }) |
| | | public ApiResponse<PCWorkPlatformDataVO> pCWorkPlatformData (@RequestParam Integer queryType, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | if(queryType==Constants.THREE){ |
| | | //åæ¥æµ·åº·ä»£åæ°æ® |
| | | hkSyncNoticeService.syncHkNotices(this.getLoginUser(token).getUsername()); |
| | | } |
| | | PCWorkPlatformDataVO pcWorkPlatformDataVO = visitsService.getPcWorkPlatformData(queryType,getLoginUser(token)); |
| | | return ApiResponse.success("æ¥è¯¢æå",pcWorkPlatformDataVO); |
| | | } |
| | |
| | | WmsBaseResponse result =null; |
| | | try { |
| | | result = wmsService.inboundNotice(param); |
| | | wmsService.computjobTotalNum(param.getJobIdList()); |
| | | }catch (BusinessException e){ |
| | | log.error("ãWMSãæ¨éå
¥åºåéç¥ä»»å¡===失败ï¼"+e.getMessage()); |
| | | success = Constants.ONE; |
| | |
| | | WmsBaseResponse result =null; |
| | | try { |
| | | result = wmsService.outboundNotice(param); |
| | | wmsService.computjobTotalNum(param.getJobIdList()); |
| | | }catch (BusinessException e){ |
| | | log.error("ãWMSãæ¨éåºåºåéç¥ä»»å¡===失败ï¼"+e.getMessage()); |
| | | success = Constants.ONE; |
| | |
| | | import com.doumee.service.business.third.BoardService; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | package com.doumee.cloud.board; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.FireDevStatusTotalRequest; |
| | | import com.doumee.core.haikang.model.param.respose.FireDevStatusListResponse; |
| | | import com.doumee.core.haikang.model.param.respose.MonthDataByMeterTypeResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.PlatformLogMapper; |
| | | import com.doumee.dao.business.model.PlatformLog; |
| | | import com.doumee.dao.web.response.platformReport.*; |
| | | import com.doumee.service.business.third.BoardService; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.board; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.join.PlatformJobJoinMapper; |
| | | import com.doumee.dao.business.model.Platform; |
| | | import com.doumee.dao.business.model.PlatformBooks; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.business.model.PlatformWmsJob; |
| | | import com.doumee.dao.web.reqeust.CarsJobAndContractDTO; |
| | | import com.doumee.dao.web.response.platformReport.*; |
| | | import com.doumee.service.business.third.BoardService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/28 13:42 |
| | | */ |
| | | |
| | | @Api(tags = "ãçæ¿å¤§å±ãååºç©æµè¿è¡è°åº¦çæ¿çå®") |
| | | @RestController |
| | | @Slf4j |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/platformJobRunAct") |
| | | public class PlatformJobRunActController extends BaseController { |
| | | |
| | | @Autowired |
| | | private PlatformJobJoinMapper platformJobJoinMapper; |
| | | @Autowired |
| | | private BoardService boardService; |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("æ¥è¯¢æ¬æãæ¬å¹´ç累计åºåºé,åºå
¥åºä»»å¡éãåºå
¥åºä½ä¸æçç»è®¡æ°æ®") |
| | | @GetMapping("/centerData") |
| | | public ApiResponse<PlatformJobRunBoardNewVO> centerData() { |
| | | PlatformJobRunBoardNewVO data = boardService.platformJobCenterData(); |
| | | return ApiResponse.success(data); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("è¿è¾ä»»å¡åæ") |
| | | @GetMapping("/transportMeasure") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "queryType", value = "æ¥è¯¢ç±»åï¼0=å¨ï¼1=æï¼2=å¹´ï¼", required = true), |
| | | }) |
| | | public ApiResponse<List<TransportMeasureVO>> transportMeasure(@RequestParam Integer queryType) { |
| | | List<TransportMeasureVO> list = boardService.transportMeasure(queryType); |
| | | return ApiResponse.success(list); |
| | | } |
| | | @LoginNoRequired |
| | | @ApiOperation("æ±½è½¦ç¶æãç»çº¬åº¦éåæ°æ®") |
| | | @GetMapping("/carsList") |
| | | public ApiResponse<BoardCarsListVO> carsList() { |
| | | BoardCarsListVO data = boardService.platformJobCarsList(); |
| | | return ApiResponse.success(data); |
| | | } |
| | | @LoginNoRequired |
| | | @ApiOperation("æ ¹æ®è½¦çå·æ¥è¯¢ä½ä¸ä¿¡æ¯åååä¿¡æ¯éå") |
| | | @PostMapping("/getCarsJobDetails") |
| | | public ApiResponse<CarsJobAndContractVO> getCarsJobDetails(@RequestBody CarsJobAndContractDTO param) { |
| | | CarsJobAndContractVO data = boardService.getCarsJobDetails(param); |
| | | return ApiResponse.success(data); |
| | | } |
| | | @LoginNoRequired |
| | | @ApiOperation("彿¥è¿è¾ä»»å¡") |
| | | @GetMapping("/platformJobList") |
| | | public ApiResponse<List<PlatformJob>> platformJobList() { |
| | | List<PlatformJob> list = platformJobJoinMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll(PlatformJob.class) |
| | | .selectAs(PlatformBooks::getId,PlatformJob::getBookId) |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | | .selectAs(Platform::getWorkRate,PlatformJob::getWorkRate) |
| | | .selectAs(PlatformWmsJob::getCarrierName,PlatformJob::getCarrierName) |
| | | .selectAs(PlatformWmsJob::getRepertotyAddress,PlatformJob::getRepertotyAddress) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .leftJoin(PlatformWmsJob.class,PlatformWmsJob::getCarryBillCode,PlatformJob::getBillCode) |
| | | .leftJoin(PlatformBooks.class,PlatformBooks::getJobId,PlatformJob::getId) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getStatus |
| | | ,Constants.PlatformJobStatus.WAIT_CALL.getKey() |
| | | ,Constants.PlatformJobStatus.CALLED.getKey() |
| | | ,Constants.PlatformJobStatus.IN_WAIT.getKey() |
| | | ,Constants.PlatformJobStatus.WORKING.getKey() |
| | | ,Constants.PlatformJobStatus.TRANSFERING.getKey() |
| | | ,Constants.PlatformJobStatus.EXCEPTION.getKey() |
| | | ,Constants.PlatformJobStatus.DONE.getKey() |
| | | ) |
| | | .orderByDesc(PlatformJob::getSignNum) |
| | | .last(" limit 20 ") |
| | | ); |
| | | return ApiResponse.success(list); |
| | | } |
| | | @LoginNoRequired |
| | | @ApiOperation("åºå
¥åºä»»å¡é") |
| | | @GetMapping("/jobData") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "queryType", value = "æ¥è¯¢ç±»åï¼0=åºåºï¼1=å
¥åºï¼", required = true), |
| | | }) |
| | | public ApiResponse<JobDataVO> jobData(@RequestParam Integer queryType) { |
| | | Random random = new Random(); |
| | | JobDataVO jobDataVO = new JobDataVO(); |
| | | jobDataVO.setPlanTaskNum(BigDecimal.valueOf(random.nextInt(1000))); |
| | | jobDataVO.setFinishTaskNum(BigDecimal.valueOf(jobDataVO.getPlanTaskNum().intValue())); |
| | | return ApiResponse.success(jobDataVO); |
| | | } |
| | | @LoginNoRequired |
| | | @ApiOperation("仿¥å
¥åºéç»è®¡") |
| | | @GetMapping("/totalInList") |
| | | public ApiResponse<List<GeneralVO>> totalInList() { |
| | | List<GeneralVO> list = new ArrayList<>(); |
| | | for (int i = 1; i < 4; i++) { |
| | | Random random = new Random(); |
| | | GeneralVO data = new GeneralVO(); |
| | | data.setName("ååºåç§°_"+i); |
| | | data.setNum(BigDecimal.valueOf(random.nextInt(1000))); |
| | | list.add(data); |
| | | } |
| | | return ApiResponse.success(list); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("åºåæ
åµ") |
| | | @GetMapping("/stockList") |
| | | public ApiResponse< BoardStockListVO > stockList() { |
| | | BoardStockListVO list = boardService.stockList(); |
| | | return ApiResponse.success(list); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | for (String str:dayList) { |
| | | TransportMeasureVO data = new TransportMeasureVO(); |
| | | data.setPlanDate(str); |
| | | data.setPlanDateStr(str); |
| | | data.setPlanTimes(random.nextInt(200)); |
| | | data.setPlanTaskNum(new BigDecimal(random.nextInt(1000))); |
| | | data.setFinishTaskNum(new BigDecimal(data.getPlanTaskNum().intValue())); |
| | |
| | | } |
| | | return ApiResponse.success(list); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @LoginNoRequired |
| | |
| | | package com.doumee.cloud.board; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.RuleEventSearchResponse; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.admin.response.PCWorkPlatformDataVO; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.dao.web.response.platformReport.*; |
| | | import com.doumee.service.business.VisitsService; |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.model.VisitReason; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.dao.web.reqeust.CheckVisitedDTO; |
| | |
| | | import org.springframework.web.server.ServerWebExchange; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation(value = "testSendNotice", notes = "testSendNotice") |
| | | @GetMapping("/testSendNotice") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "openid", value = "openid", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "token", value = "token", required = true), |
| | | }) |
| | | public ApiResponse wxAuthorize(@RequestParam String openid,String token) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | List<String> idList = Arrays.asList(openid.split(",")); |
| | | wxPlatNotice.testSendNotice(idList,token); |
| | | return ApiResponse.success("æ¥è¯¢æå"); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢è¢«è®¿é®äººä¿¡æ¯", notes = "æ¥è¯¢è¢«è®¿é®äººä¿¡æ¯") |
| | | @PostMapping("/getVisitedMember") |
| | | public ApiResponse<List<MemberVO>> getVisitedMember(@Valid @RequestBody CheckVisitedDTO checkVisitedDTO) { |
| | |
| | | cache: |
| | | session: |
| | | # ä¼è¯è¿ææ¶é¿(s) |
| | | expire: 18000 |
| | | expire: 1800 |
| | | captcha: |
| | | # éªè¯ç è¿ææ¶é¿(s) |
| | | expire: 300 |
| | |
| | | cache: |
| | | session: |
| | | # ä¼è¯è¿ææ¶é¿(s) |
| | | expire: 18000 |
| | | expire: 1800 |
| | | captcha: |
| | | # éªè¯ç è¿ææ¶é¿(s) |
| | | expire: 300 |
| | |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.dao.business.InterfaceLogMapper; |
| | | import com.doumee.dao.business.model.InterfaceLog; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.service.business.InterfaceLogService; |
| | | import com.github.pagehelper.PageInfo; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.ibatis.session.SqlSession; |
| | | import org.apache.ibatis.session.SqlSessionFactory; |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å类信æ¯è¡¨ |
| | |
| | | * 3ãè½ç®¡ä¸å¿ï¼ngzx |
| | | */ |
| | | public interface MenuPageId{ |
| | | String[] componentIds = new String[]{"Infovision iPark Platform","dfe"}; |
| | | String afzx = "afzx";//å®é²ä¸å¿ |
| | | String xkzx = "xkzx";//æ¶æ§ä¸å¿ |
| | | String ngzx = "ngzx";//è½ç®¡ä¸å¿ |
| | | String jsc = "jsc";//ç©ä¸åå¤ |
| | | String kqgzt = "attendance_workstand";//èå¤ç®¡ç |
| | | String kqdbcl = "process_apply";//èå¤ä»£åå¤ç |
| | | } |
| | | |
| | | /** |
| | |
| | | String[] iccmAppointmentRecords= new String[]{"/api/iccm/v2/appointment/records","iccmæ¥è¯¢å·²é¢çº¦ç»è®°"};//iccmæ¥è¯¢å·²é¢çº¦ç»è®° |
| | | String[] wxAccessToken= new String[]{"/api/wx/v1/oa/get/accessToken","æ ¹æ®å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯è·åAccessToken"};//1.9.1æ ¹æ®å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯è·åAccessToken |
| | | String[] getWxConfig= new String[]{"/api/wx/v1/oa/get/config","æ ¹æ®é
置微信å
¬ä¼å·ç¼å·æ¥è¯¢å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯"};//æ ¹æ®é
置微信å
¬ä¼å·ç¼å·æ¥è¯¢å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯ |
| | | String[] goMenuUrl= new String[]{"/xauthplus-plugin/thirdLogin?type=third&componentId=Infovision iPark Platform&componentMenuId=${menuId}&token=${token}","å·¥ä½å°èå跳转å°å"}; |
| | | String[] goMenuUrl= new String[]{"/xauthplus-plugin/thirdLogin?type=third&componentId=${componentId}&componentMenuId=${menuId}&token=${token}","å·¥ä½å°èå跳转å°å"}; |
| | | // String[] goNoticeMenuUrl= new String[]{"/xauthplus-plugin/thirdLogin?type=third&componentId=dfe&componentMenuId={menuId}&token=${token}","å·¥ä½å°èå¤ä»£åå¤ç跳转å°å"}; |
| | | String[] nhEventPageList= new String[]{"/api/ecm/warning/event/v1/pageList","å页è·ååè¦äºä»¶"};//å页è·ååè¦äºä»¶ |
| | | String[] nhRegionDataRanking= new String[]{"/api/ecm/v1/energy/regionDataRanking","æ ¹æ®æ¶é´ç»´åº¦è·ååºåç¨éæå"};//1.8.5æ ¹æ®æ¶é´ç»´åº¦è·ååºåç¨éæå |
| | | String[] nhEnergyDistribution= new String[]{"/api/ecm/v1/energy/energyDistribution","æ ¹æ®æ¶é´ç»´åº¦è·åè½èåå¸"};// æ ¹æ®æ¶é´ç»´åº¦è·åè½èåå¸ |
| | |
| | | saveInterfaceLog(JSONObject.toJSONString(body),result,path,pathStr[1]); |
| | | return result; |
| | | } |
| | | public static String startDoGetStringArtemisJson(String[] pathStr,Map<String,String> body ){ |
| | | Map<String, String> path = getPath(pathStr[0]); |
| | | Map<String, String> header = new HashMap<>(); |
| | | String result = ArtemisHttpUtil.doGetArtemis(path, body, null, "application/json", header); |
| | | saveInterfaceLog(JSONObject.toJSONString(body),result,path,pathStr[1]); |
| | | return result; |
| | | } |
| | | public static String startDoPostStringArtemis(String[] pathStr,String param,String body ){ |
| | | Map<String, String> path = getPath(pathStr[0]+StringUtils.defaultString(param,"")); |
| | | Map<String, String> header = new HashMap<>(); |
| | |
| | | * æ ¹æ®å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯è·åAccessToken |
| | | * @return |
| | | */ |
| | | public static String wxAccessToken(String configId,String tagId) { |
| | | String[] wxAccessToken= HKConstants.InterfacePath.wxAccessToken; |
| | | wxAccessToken[0] = HKConstants.InterfacePath.wxAccessToken+"?tagId="+tagId+"&configId"+configId; |
| | | return startDoPostStringArtemis(wxAccessToken,""); |
| | | public static String wxAccessToken(HashMap<String,String> params ) { |
| | | // String[] wxAccessToken= new String[2]; |
| | | // String url = HKConstants.InterfacePath.wxAccessToken[0]+"?tagId="+tagId+"&configId="+configId; |
| | | // String t = HKConstants.InterfacePath.wxAccessToken[1]; |
| | | // wxAccessToken[0] = url; |
| | | // wxAccessToken[1] = t; |
| | | return startDoGetStringArtemisJson(HKConstants.InterfacePath.wxAccessToken,params); |
| | | } |
| | | /** |
| | | * æ ¹æ®é
置微信å
¬ä¼å·ç¼å·æ¥è¯¢å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯ |
| | |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.applyST,body); |
| | | } |
| | | |
| | | public static String getMenuUrl(String menuId, String token) { |
| | | public static String getMenuUrl(String componentId,String menuId, String token) { |
| | | String url = HKConstants.InterfacePath.goMenuUrl[0]; |
| | | url = url.replace("${menuId}", menuId).replace("${token}",token); |
| | | url = url.replace("${componentId}",componentId).replace("${menuId}", menuId).replace("${token}",token); |
| | | return url; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.cars; |
| | | |
| | | import com.alibaba.fastjson.annotation.JSONField; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class BaseCarsPageResponse<T> { |
| | | |
| | | private int total;// number False æ¥è¯¢æ°æ®è®°å½æ»æ° |
| | | private int totalPages;// æ»é¡µæ° Integer |
| | | private int currentPage ;//å½å页 Integer |
| | | private int totalRecords;// æ»è®°å½æ¡æ° Long |
| | | private int startIndex ;//è®°å½å¼å§åºå· Long |
| | | @JSONField(name="results",alternateNames = {"rows","list"}) |
| | | private List<T> results ;// object[] False æéç»å¯¹è±¡å表 |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.cars; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class BaseCarsResponse<T> { |
| | | |
| | | private T data; |
| | | /** |
| | | *éè¯¯ä¿¡æ¯æè¿°ï¼ä»
statusä¸ä¸º0æ¶æå¼ |
| | | */ |
| | | private String msg; |
| | | /** |
| | | * 请æ±ç»æç¶æå¼ï¼ æå为0ï¼å
¶ä»å¼è¯·æ¥çéå½è¿åç ç¶æè¡¨ã |
| | | */ |
| | | private Integer status; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.cars.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 设å¤å表请æ±ä¿¡æ¯ |
| | | */ |
| | | @Data |
| | | public class CarsDeviceRequest { |
| | | |
| | | private String productKey ;//设å¤åå·ç§é¥ String æ å¦ |
| | | private Integer pageSize;// 页é¢å¤§å° Integer 1000 å¦ |
| | | private Integer pageNo ;//å½å页 Integer 1 |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.cars.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * GPSå表请æ±ä¿¡æ¯ |
| | | */ |
| | | @Data |
| | | public class CarsGpsRequest { |
| | | |
| | | private String deviceCode ;//设å¤ç»ç«¯ææºå· String æ æ¯ |
| | | private String startTime ;//å¼å§æ¶é´yyyy-MM-dd HH:mm:ss String æ æ¯ |
| | | private String endTime ;//ç»ææ¶é´yyyy-MM-dd HH:mm:ss String æ æ¯ |
| | | private Boolean filterInvalidGps ;//æ¯å¦è¿æ»¤æ æçGPS boolean true å¦ |
| | | private Boolean filterSupplementGps ;//æ¯å¦è¿æ»¤è¡¥æ¥çGPS boolean true å¦ |
| | | private Integer pageSize;// 页é¢å¤§å° Integer 1000 å¦ |
| | | private Integer pageNo ;//å½å页 Integer 1 |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.cars.response; |
| | | |
| | | import lombok.Data; |
| | | |
| | | |
| | | /** |
| | | * 设å¤ééä¿¡æ¯ |
| | | * @param <T> |
| | | */ |
| | | @Data |
| | | public class CarsDeviceChannelResponse<T> { |
| | | private String terminalID;// ç»ç«¯ææºå· String |
| | | private String channelName;// ééå·åç§° String |
| | | private Integer channelNum;// ééç¼å· |
| | | private Integer channelType;// ééå·ç±»åï¼0 è§é¢ééï¼1 é³é¢éé |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.cars.response; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * GPSå表åå
ä¿¡æ¯ |
| | | */ |
| | | @Data |
| | | public class CarsDeviceDetaisResponse { |
| | | private Integer gpsValid ;//å®ä½ç¶æï¼0 æ æï¼ 1 ææ |
| | | private Double longitude ;//ç»åº¦ Double |
| | | private Double latitude;// 纬度 |
| | | private Double altitude ;//æµ·æé«åº¦ |
| | | private Float speed;// é度 |
| | | private Integer direction;// æ¹åè§ Integer |
| | | private String collectTime ;//GPS䏿¥æ¶é´yyyy-MM-dd HH:mm:ss String |
| | | private String accStatus;// accç¶æ 0ï¼å
³é 1ï¼å¼å¯ String |
| | | private Integer supplementSign;// è¡¥æ¥æ è¯ï¼1ï¼è¡¥æ¥ï¼0ï¼æ£å¸¸ä¸æ¥ï¼ Integer |
| | | private String createTime;// ç³»ç»æ¶å°GPSæ¶é´yyyy-MM-dd HH:mm:ss String |
| | | private Integer status;//设å¤ç¶æ 0ï¼ç¦»çº¿ï¼1ï¼å¨çº¿ï¼2ï¼ä¼ç |
| | | private String plateNum;//车çå· |
| | | private String terminalID;// ç»ç«¯ææºå· String |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.cars.response; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设å¤å表åå
ä¿¡æ¯ |
| | | * @param <T> |
| | | */ |
| | | @Data |
| | | public class CarsDeviceResponse<T> { |
| | | |
| | | private String terminalID;// ç»ç«¯ææºå· String |
| | | private String productKey ;//è®¾å¤æå±åå·ç产åå¯é¥ String |
| | | private String createTime;// æ·»å æ¶é´ String |
| | | private String deviceStatus;// 设å¤ç¶æ 0ï¼ç¦»çº¿ï¼1ï¼å¨çº¿ï¼2ï¼ä¼ç Integer |
| | | private String language ;//åºä»¶è¯è¨ï¼CN/EN String |
| | | private String organizeName;// ç»ç»åç§° Sring |
| | | private String organizeId ;//ç»ç»id Integer |
| | | private String version ;//è½¯ä»¶çæ¬ String |
| | | private String plateNum ;//车çå· String |
| | | private List<CarsDeviceChannelResponse> deviceChannelList;// 设å¤ééå表ï¼è¯¦ç»åæ°è§*表2 |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.cars.response; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * GPSå表åå
ä¿¡æ¯ |
| | | * @param <T> |
| | | */ |
| | | @Data |
| | | public class CarsGpsResponse<T> { |
| | | |
| | | private Integer gpsValid ;//å®ä½ç¶æï¼0 æ æï¼ 1 ææ |
| | | private Double longitude ;//ç»åº¦ Double |
| | | private Double latitude;// 纬度 |
| | | private Double altitude ;//æµ·æé«åº¦ |
| | | private Float speed;// é度 |
| | | private Integer direction;// æ¹åè§ Integer |
| | | private String collectTime ;//GPS䏿¥æ¶é´yyyy-MM-dd HH:mm:ss String |
| | | private String accStatus;// accç¶æ 0ï¼å
³é 1ï¼å¼å¯ String |
| | | private Integer supplementSign;// è¡¥æ¥æ è¯ï¼1ï¼è¡¥æ¥ï¼0ï¼æ£å¸¸ä¸æ¥ï¼ Integer |
| | | private String createTime;// ç³»ç»æ¶å°GPSæ¶é´yyyy-MM-dd HH:mm:ss String |
| | | } |
| | |
| | | public class GetTodoListRequest { |
| | | |
| | | private String comId;// Query String false ç»ä»¶id |
| | | private int pageSize ;// Query Number false å页大å°ï¼1~999ï¼ |
| | | private int cascade ;// Query Number false çº§èæ°æ®æ¥æº0:ä¸çº§å¹³å°æ¥æºï¼1:éä¸çº§å¹³å°æ¥æºï¼ä¸ºç©ºé»è®¤æ¥è¯¢æææ°æ®æ¥æº |
| | | private Integer pageSize ;// Query Number false å页大å°ï¼1~999ï¼ |
| | | private Integer cascade ;// Query Number false çº§èæ°æ®æ¥æº0:ä¸çº§å¹³å°æ¥æºï¼1:éä¸çº§å¹³å°æ¥æºï¼ä¸ºç©ºé»è®¤æ¥è¯¢æææ°æ®æ¥æº |
| | | private String messageId;// Query String false messageId |
| | | private int pageNo;// Query Number false å½å页ç (1~100000) |
| | | private Integer pageNo;// Query Number false å½å页ç (1~100000) |
| | | private String localeType;// Query String false è¯è¨ç±»åzh_CN:䏿en_US:è±æ |
| | | private int status;// Query Number false ä¸å¡ç¶æç±»å,1-å¾
å¤çï¼2-审æ¹ä¸ï¼3-已宿ï¼4-æéæï¼5-æå®¡æ¹,é»è®¤å¾
å¤ç |
| | | private Integer status;// Query Number false ä¸å¡ç¶æç±»å,1-å¾
å¤çï¼2-审æ¹ä¸ï¼3-已宿ï¼4-æéæï¼5-æå®¡æ¹,é»è®¤å¾
å¤ç |
| | | private String userId;// Query String false ç¨æ·id |
| | | private String clientType;// Query String false è°ç¨æ¹ç±»å0:å
¶ä»ï¼1ï¼APPï¼ä¸ºç©ºæ¶é»è®¤ä¸º1ï¼2ï¼é¨æ· |
| | | |
| | |
| | | private String comId;// String false ç»ä»¶æ è¯ |
| | | private String moduleId;// String false æ¨¡åæ è¯ |
| | | private String msgTitle;// String false ä¿¡æ¯æ é¢ |
| | | private String msgStatus ;//String false ä¿¡æ¯ç¶æ |
| | | private String msgStatus ;//String false ä¿¡æ¯ç¶æ ä¸å¡ç¶æç±»å,1-å¾
å¤çï¼2-审æ¹ä¸ï¼3-已宿ï¼4-æéæï¼5-æå®¡æ¹,é»è®¤å¾
å¤ç |
| | | private String msgStatusStr;// String false ä¿¡æ¯ç¶æåç§° |
| | | private String msgCreateTime;// String false æ¶æ¯å建æ¶é´,ä¼å
使ç¨msgCreateTimeIso |
| | | private String msgCreateTimeIso;// String false æ¶æ¯å建æ¶é´,ISOæ¶é´ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.doumee.core.haikang.model.cars.BaseCarsPageResponse; |
| | | import com.doumee.core.haikang.model.cars.BaseCarsResponse; |
| | | import com.doumee.core.haikang.model.cars.request.CarsDeviceRequest; |
| | | import com.doumee.core.haikang.model.cars.request.CarsGpsRequest; |
| | | import com.doumee.core.haikang.model.cars.response.CarsDeviceDetaisResponse; |
| | | import com.doumee.core.haikang.model.cars.response.CarsDeviceResponse; |
| | | import com.doumee.core.haikang.model.cars.response.CarsGpsResponse; |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.respose.FindHomeAlarmInfoPageResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.google.common.collect.Maps; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.http.client.methods.CloseableHttpResponse; |
| | | import org.apache.http.client.methods.HttpGet; |
| | | import org.apache.http.impl.client.CloseableHttpClient; |
| | | import org.apache.http.impl.client.HttpClientBuilder; |
| | | import org.apache.http.util.EntityUtils; |
| | | import org.springframework.http.HttpMethod; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.*; |
| | | |
| | | public class HKCarOpenService { |
| | | |
| | | public static String ACCESS_KEY = "D_SUB_gfJkiUxt_1723101405213"; |
| | | public static String ACCESS_SECRET = "0vB3VLU21SC6eG8T"; |
| | | private static final String SIGNATURE_METHOD = "HMAC-SHA1"; |
| | | private static final String DEFAULT_CHARSET = "UTF-8"; |
| | | private static final String REGION_ID = "cn-hangzhou"; |
| | | private static final String VERSION = "2.1.0"; |
| | | public static String BASE_URL = "https://open.hikvisionauto.com:14021/v2/"; |
| | | private static TreeMap<String, String> getBaseParams() { |
| | | Map<String, String> params = Maps.newHashMap(); |
| | | params.put("SignatureMethod", SIGNATURE_METHOD); |
| | | params.put("SignatureNonce", UUID.randomUUID().toString()); |
| | | params.put("AccessKey", ACCESS_KEY); |
| | | params.put("Timestamp", String.valueOf(System.currentTimeMillis())); |
| | | params.put("Version", VERSION); |
| | | params.put("RegionId", REGION_ID); |
| | | TreeMap<String, String> sortParas = Maps.newTreeMap(); |
| | | sortParas.putAll(params); |
| | | return sortParas; |
| | | } |
| | | |
| | | public static String sign(String accessSecret, TreeMap<String, String> params, HttpMethod method) throws Exception { |
| | | String stringToSign = getStringToSign(params, method); |
| | | System.out.println("StringToSign = [" + stringToSign + "]"); |
| | | javax.crypto.Mac mac = javax.crypto.Mac.getInstance("HmacSHA1"); |
| | | mac.init(new javax.crypto.spec.SecretKeySpec(accessSecret.getBytes(DEFAULT_CHARSET), "HmacSHA1")); |
| | | byte[] signData = mac.doFinal(stringToSign.getBytes(DEFAULT_CHARSET)); |
| | | return new sun.misc.BASE64Encoder().encode(signData); |
| | | } |
| | | |
| | | private static String getStringToSign(TreeMap<String, String> params, HttpMethod method) throws Exception { |
| | | StringBuilder sortQueryStringTmp = new StringBuilder(); |
| | | for(Map.Entry<String, String> entry : params.entrySet()){ |
| | | sortQueryStringTmp.append("&").append(specialUrlEncode(entry.getKey())).append("=").append(specialUrlEncode(entry.getValue())); |
| | | } |
| | | StringBuilder stringToSign = new StringBuilder(); |
| | | stringToSign.append(method.toString()).append("&").append(specialUrlEncode("/")).append("&").append(specialUrlEncode(sortQueryStringTmp.substring(1))); |
| | | return stringToSign.toString(); |
| | | } |
| | | |
| | | public static String specialUrlEncode(String value) throws Exception { |
| | | return java.net.URLEncoder.encode(value, "UTF-8").replace("+", "%20").replace("*", "%2A").replace("%7E", "~"); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | getAllCarsDetais(); |
| | | } |
| | | |
| | | public static List<CarsDeviceDetaisResponse> getAllCarsDetais() { |
| | | List<CarsDeviceDetaisResponse> list = new ArrayList<>(); |
| | | BaseCarsPageResponse<CarsDeviceResponse> data = getDeviceList(new CarsDeviceRequest()); |
| | | if(data!=null &&data.getResults()!=null){ |
| | | List<String> cars = new ArrayList<>(); |
| | | List<String> codes = new ArrayList<>(); |
| | | for(CarsDeviceResponse model :data.getResults()){ |
| | | // System.out.println("=================车çå·ï¼"+model.getPlateNum()); |
| | | cars.add(model.getPlateNum()); |
| | | codes.add(model.getTerminalID()); |
| | | CarsDeviceDetaisResponse t = new CarsDeviceDetaisResponse(); |
| | | t.setPlateNum(model.getPlateNum()); |
| | | t.setTerminalID(model.getTerminalID()); |
| | | /*CarsGpsRequest gp = new CarsGpsRequest(); |
| | | gp.setDeviceCode(t.getTerminalID()); |
| | | gp.setFilterSupplementGps(false); |
| | | gp.setFilterSupplementGps(false); |
| | | gp.setStartTime(DateUtil.getYesterday()+" 00:00:00"); |
| | | gp.setEndTime(DateUtil.getNowPlusTime()); |
| | | gp.setPageNo(1); |
| | | gp.setPageSize(10);*/ |
| | | CarsGpsResponse tg = getLatestGpsInfo(t.getTerminalID()); |
| | | if(tg!=null ){ |
| | | t.setSpeed(tg.getSpeed()); |
| | | t.setLatitude(tg.getLatitude()); |
| | | t.setLongitude(tg.getLongitude()); |
| | | t.setCollectTime(tg.getCollectTime()); |
| | | t.setAccStatus(tg.getAccStatus()); |
| | | t.setGpsValid(tg.getGpsValid()); |
| | | } |
| | | list.add(t); |
| | | } |
| | | System.out.println("=================è½¦çæ»æ°ï¼"+codes.size()); |
| | | Map<String,Integer> statusList = getDeviceStatusList(codes); |
| | | if(statusList!=null &&statusList.size()>0){ |
| | | for(Map.Entry<String, Integer> entry : statusList.entrySet()){ |
| | | CarsDeviceDetaisResponse t = getFromListById(entry.getKey(),list); |
| | | if(t!=null) { |
| | | t.setStatus(entry.getValue()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | for(CarsDeviceDetaisResponse m : list){ |
| | | |
| | | System.out.println("=================车çå·ï¼"+m.getPlateNum()+" ç¶æï¼ã"+m.getStatus()+"ã"+" ä½ç½®ï¼ã"+m.getLongitude()+","+m.getLatitude()+"ã"); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | private static CarsDeviceDetaisResponse getFromListById(String key, List<CarsDeviceDetaisResponse> list) { |
| | | for(CarsDeviceDetaisResponse dd :list){ |
| | | if(dd.getTerminalID()!=null && key !=null && dd.getTerminalID().equals(key)){ |
| | | return dd; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static String sendRequest(String url,TreeMap<String, String> map){ |
| | | try { |
| | | StringBuilder sortQueryStringTmp = new StringBuilder(); |
| | | for(Map.Entry<String, String> entry : map.entrySet()){ |
| | | sortQueryStringTmp |
| | | .append("&") |
| | | .append(specialUrlEncode(entry.getKey())) |
| | | .append("=") |
| | | .append(specialUrlEncode(entry.getValue())); |
| | | } |
| | | //ä¸ä¸æ¹çHttpGet对åºï¼éç¨çæ¯HttpMethod.GET |
| | | String sign = sign(ACCESS_SECRET + "&", map, HttpMethod.GET); |
| | | url += "?Signature=" + specialUrlEncode(sign) + sortQueryStringTmp.toString(); |
| | | CloseableHttpClient httpClient = HttpClientBuilder.create().build(); |
| | | //ä¸ä¸æ¹çHttpMethod.GET对åºï¼ä½¿ç¨HttpGet |
| | | HttpGet httpDelete = new HttpGet(url); |
| | | CloseableHttpResponse response = httpClient.execute(httpDelete); |
| | | return EntityUtils.toString(response.getEntity()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | public static BaseCarsPageResponse<CarsGpsResponse> getGpsList(CarsGpsRequest param) { |
| | | String url = BASE_URL + "gps/list/"; |
| | | TreeMap<String, String> BASE_PARAMS = getBaseParams(); |
| | | if(StringUtils.isNotBlank(param.getEndTime())) { |
| | | BASE_PARAMS.put("endTime", param.getEndTime()); |
| | | } |
| | | if(StringUtils.isNotBlank(param.getStartTime())){ |
| | | BASE_PARAMS.put("startTime",param.getStartTime()); |
| | | } |
| | | if( param.getFilterInvalidGps() !=null && !param.getFilterInvalidGps()){ |
| | | BASE_PARAMS.put("filterInvalidGps", "false"); |
| | | } |
| | | if( param.getFilterSupplementGps() !=null && !param.getFilterSupplementGps()){ |
| | | BASE_PARAMS.put("filterSupplementGps", "false"); |
| | | } |
| | | if(StringUtils.isNotBlank(param.getDeviceCode())){ |
| | | BASE_PARAMS.put("deviceCode", param.getDeviceCode().toString());//设å¤åå·ç§é¥ |
| | | } |
| | | BASE_PARAMS.put("pageSize",Constants.equalsInteger(param.getPageSize(),0)? "100":param.getPageSize().toString());//页é¢å¤§å° |
| | | BASE_PARAMS.put("pageNo", Constants.equalsInteger(param.getPageNo(),0)? "1":param.getPageNo().toString());//å½å页 |
| | | String str = sendRequest(url,BASE_PARAMS); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseCarsResponse<BaseCarsPageResponse<CarsGpsResponse>>>(){}; |
| | | BaseCarsResponse<BaseCarsPageResponse<CarsGpsResponse>> result = JSONObject.parseObject(str, typeReference.getType()); |
| | | if(result!=null && Constants.equalsInteger(result.getStatus(),0)){ |
| | | return result.getData(); |
| | | } |
| | | return null; |
| | | } |
| | | public static CarsGpsResponse getLatestGpsInfo(String deviceCode) { |
| | | String url = BASE_URL + "gps/latest/"; |
| | | TreeMap<String, String> BASE_PARAMS = getBaseParams(); |
| | | BASE_PARAMS.put("deviceCode", deviceCode);//设å¤åå·ç§é¥ |
| | | String str = sendRequest(url,BASE_PARAMS); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseCarsResponse<CarsGpsResponse>>(){}; |
| | | BaseCarsResponse<CarsGpsResponse> result = JSONObject.parseObject(str, typeReference.getType()); |
| | | if(result!=null && Constants.equalsInteger(result.getStatus(),0)){ |
| | | return result.getData(); |
| | | } |
| | | return null; |
| | | } |
| | | public static Map<String,Integer> getDeviceStatusList(List<String> code) { |
| | | String url = BASE_URL + "device/status/"; |
| | | TreeMap<String, String> BASE_PARAMS = getBaseParams(); |
| | | if(code ==null || code.size() ==0){ |
| | | return new HashMap<>(); |
| | | } |
| | | BASE_PARAMS.put("deviceCodeList", JSONObject.toJSONString(code));//ç»ç«¯ææºå·å表 |
| | | String str = sendRequest(url,BASE_PARAMS); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseCarsResponse<Map<String,Integer>>>(){}; |
| | | BaseCarsResponse<Map<String,Integer>> result = JSONObject.parseObject(str, typeReference.getType()); |
| | | if(result!=null && Constants.equalsInteger(result.getStatus(),0)){ |
| | | return result.getData(); |
| | | } |
| | | return null; |
| | | } |
| | | public static BaseCarsPageResponse<CarsDeviceResponse> getDeviceList(CarsDeviceRequest param) { |
| | | String url = BASE_URL + "device/list/"; |
| | | TreeMap<String, String> BASE_PARAMS = getBaseParams(); |
| | | if(StringUtils.isNotBlank(param.getProductKey())){ |
| | | BASE_PARAMS.put("productKey", "");//设å¤åå·ç§é¥ |
| | | } |
| | | BASE_PARAMS.put("pageSize",Constants.equalsInteger(param.getPageSize(),0)? "100":param.getPageSize().toString());//页é¢å¤§å° |
| | | BASE_PARAMS.put("pageNo", Constants.equalsInteger(param.getPageNo(),0)? "1":param.getPageNo().toString());//å½å页 |
| | | String str = sendRequest(url,BASE_PARAMS); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseCarsResponse<BaseCarsPageResponse<CarsDeviceResponse>>>(){}; |
| | | BaseCarsResponse<BaseCarsPageResponse<CarsDeviceResponse>> result = JSONObject.parseObject(str, typeReference.getType()); |
| | | if(result!=null && Constants.equalsInteger(result.getStatus(),0)){ |
| | | return result.getData(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | public static BaseResponse<String> wxAccessToken(String configId,String tagId){ |
| | | log.info("ãæµ·åº·æ ¹æ®å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯è·åAccessTokenã================å¼å§====configId:"+configId+" && tagId:"+tagId); |
| | | try { |
| | | String res = HKTools.wxAccessToken(configId,tagId); |
| | | HashMap<String,String> params = new HashMap<>(); |
| | | params.put("tagId",tagId); |
| | | params.put("configId",configId); |
| | | String res = HKTools.wxAccessToken(params); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse<String>>(){}; |
| | | BaseResponse<String> result = JSONObject.parseObject(res, typeReference.getType()); |
| | |
| | | * @return |
| | | */ |
| | | public static String getMenuUrl(Integer type,String token){ |
| | | String componentId = HKConstants.MenuPageId.componentIds[0]; |
| | | String menuId = HKConstants.MenuPageId.afzx; |
| | | if(Constants.equalsInteger(type,Constants.ONE)){ |
| | | menuId = HKConstants.MenuPageId.xkzx; |
| | |
| | | menuId = HKConstants.MenuPageId.jsc; |
| | | }else if(Constants.equalsInteger(type,Constants.FOUR)){ |
| | | menuId = HKConstants.MenuPageId.kqgzt; |
| | | }else if(Constants.equalsInteger(type,Constants.FIVE)){ |
| | | componentId = HKConstants.MenuPageId.componentIds[1]; |
| | | menuId = HKConstants.MenuPageId.kqdbcl; |
| | | } |
| | | log.info("ãæµ·åº·è·åå·¥ä½å°èåå
å¯ç»éè°æ´å°åã================å¼å§====menuId:"+menuId+"==token:"+token); |
| | | try { |
| | | String res = HKTools.getMenuUrl(menuId,token); |
| | | String res = HKTools.getMenuUrl(componentId,menuId,token); |
| | | return res; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·è·åå·¥ä½å°èåå
å¯ç»éè°æ´å°åã================失败====ï¼\n"+ e.getMessage()); |
| | |
| | | Class<?> clazz = obj.getClass(); |
| | | for (Field field : clazz.getDeclaredFields()) { |
| | | field.setAccessible(true); // 使å¾ç§æå段ä¹å¯ä»¥è®¿é® |
| | | map.put(field.getName(), (String) field.get(obj)); |
| | | if(field.get(obj)!=null){ |
| | | map.put(field.getName(), String.valueOf( field.get(obj))); |
| | | } |
| | | } |
| | | return map; |
| | | } |
| | |
| | | package com.doumee.core.wms.model.request; |
| | | |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | |
| | | @ApiModelProperty(value = "data" ) |
| | | private List<T> data; |
| | | |
| | | private List<Integer> jobIdList; |
| | | } |
| | |
| | | package com.doumee.core.wms.model.response; |
| | | |
| | | import com.doumee.core.haikang.model.param.BaseRequst; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private String item_code; |
| | | @ApiModelProperty(value = "æ¶æ¯æè¿°" ,example = "1") |
| | | private String item_name; |
| | | @ApiModelProperty(value = "å
容详æ
éå" ,example = "1") |
| | | @ApiModelProperty(value = "qty" ,example = "1") |
| | | private BigDecimal qty; |
| | | @ApiModelProperty(value = "å
容详æ
éå" ,example = "1") |
| | | @ApiModelProperty(value = "supplier_code" ,example = "1") |
| | | private String supplier_code; |
| | | @ApiModelProperty(value = "g" ,example = "1") |
| | | private String supplier_name; |
| | |
| | | * @Author : Rk |
| | | * @create 2023/12/27 9:30 |
| | | */ |
| | | @Configuration |
| | | //@Configuration |
| | | public class WxPlatConfig { |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Bean |
| | | // @Bean |
| | | public WxMpConfigStorage wxMpConfigStorage() { |
| | | WxMpDefaultConfigImpl configStorage = new WxMpDefaultConfigImpl(); |
| | | // å
¬ä¼å·appId |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | @Bean |
| | | // @Bean |
| | | public WxMpService wxMpService() { |
| | | WxMpService wxMpService = new WxMpServiceImpl(); |
| | | wxMpService.setWxMpConfigStorage(wxMpConfigStorage()); |
| | |
| | | // 审æ¹é©³åç»ç³è¯·äººï¼ç³è¯·å·²è¢«é©³å |
| | | String visitReportAuditFail = "visitReportAuditFail"; |
| | | // ç»å®¡æ¹äººï¼ç³è¯·å¾
æ¨å®¡æ¹ |
| | | String visitReportWaitAudit = "visitReportAuditSuccess"; |
| | | String visitReportWaitAudit = "visitReportWaitAudit"; |
| | | } |
| | | |
| | | |
| | |
| | | // 审æ¹éè¿ç»ç³è¯·äººï¼ç³è¯·å·²å®¡æ ¸éè¿ |
| | | String platformBookAuditSuccess = "platformBookAuditSuccess"; |
| | | // 审æ¹é©³åç»ç³è¯·äººï¼ç³è¯·å·²è¢«é©³å |
| | | String platformBookAuditFail = "platformBookWaitAudit"; |
| | | String platformBookAuditFail = "platformBookAuditFail"; |
| | | // ç»å®¡æ¹äººï¼ç³è¯·å¾
æ¨å®¡æ¹ |
| | | String platformBookWaitAudit = "platformBookWaitAudit"; |
| | | } |
| | |
| | | String platformJobStopErr = "platformJobStopErr"; |
| | | // è¿è¾ä»»å¡ä¸è¾¾ ï¼ç»å¸æºï¼ |
| | | String platformJobNewJob = "platformJobNewJob"; |
| | | // è¿è¾ä»»å¡åæ¶ ï¼ç»å¸æºï¼ |
| | | String platformJobCancel = "platformJobCancel"; |
| | | } |
| | | |
| | | |
| | |
| | | package com.doumee.core.wx.wxPlat; |
| | | |
| | | import cn.emay.sdk.util.json.gson.JsonObject; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Http; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.dao.business.VisitsMapper; |
| | | import com.doumee.dao.business.WxNoticeConfigMapper; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.dao.business.model.WxNoticeConfig; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | |
| | | import me.chanjar.weixin.mp.bean.template.WxMpTemplateData; |
| | | import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 微信å
¬ä¼å·éç¥ |
| | |
| | | @Component |
| | | public class WxPlatNotice { |
| | | |
| | | /** |
| | | * 微信å
¬ä¼å·APIçService |
| | | */ |
| | | private final WxMpService wxMpService; |
| | | |
| | | public WxPlatNotice(WxMpService wxMpService) { |
| | | this.wxMpService = wxMpService; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 访客ä¸å¡éç¥æ¥å£ |
| | | */ |
| | | public Boolean sendVisitAuditTemplateNotice(Visits visits,String prefix,String tempId){ |
| | | if(StringUtils.isBlank(visits.getOpenid())){ |
| | | return false; |
| | | } |
| | | WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder() |
| | | .toUser(visits.getOpenid()) |
| | | .templateId(tempId) |
| | | .url(prefix + visits.getId()) |
| | | .build(); |
| | | |
| | | |
| | | String thing1 = "å¾
审æ¹"; |
| | | if(visits.getStatus()==2){ |
| | | thing1 = "å®¡æ ¸éè¿"; |
| | | }else if(visits.getStatus()==3){ |
| | | thing1 = "å®¡æ ¸ä¸éè¿"; |
| | | }else if(visits.getStatus()==5){ |
| | | thing1 = "è®¾å¤æææå"; |
| | | }else if(visits.getStatus()==6){ |
| | | thing1 = "è®¾å¤æææªæå"; |
| | | } |
| | | // æ·»å æ¨¡æ¿æ°æ® |
| | | templateMessage.addData(new WxMpTemplateData("thing1", thing1)) |
| | | .addData(new WxMpTemplateData("thing2", visits.getName())) |
| | | .addData(new WxMpTemplateData("phone_number6", visits.getPhone())); |
| | | String msgId = null; |
| | | try { |
| | | // å鿍¡æ¿æ¶æ¯ |
| | | msgId = wxMpService.getTemplateMsgService().sendTemplateMsg(templateMessage); |
| | | } catch (WxErrorException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", msgId != null ? "æå" : "失败"); |
| | | return msgId != null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 访客ä¸å¡éç¥ |
| | | */ |
| | | public void sendVisitTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper,Visits visits,String objCode, String prefix, String tempId, List<String> openIds){ |
| | | public void testSendNotice(List<String> openIds,String token){ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | WxNoticeConfig wxNoticeConfig = wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.isNull(wxNoticeConfig)){ |
| | | return; |
| | | } |
| | | WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder() |
| | | .toUser(visits.getOpenid()) |
| | | .templateId(tempId) |
| | | .url(prefix + visits.getId()) |
| | | .build(); |
| | | |
| | | templateMessage.addData(new WxMpTemplateData("thing1", visits.getName())) |
| | | .addData(new WxMpTemplateData("car_number7", StringUtils.isBlank(visits.getCarNos())?visits.getCarNos():"-")) |
| | | .addData(new WxMpTemplateData("character_string6", Constants.equalsInteger(visits.getMemberNum(),Constants.ZERO)?Constants.ONE+"":visits.getMemberNum().toString())) |
| | | .addData(new WxMpTemplateData("const9", wxNoticeConfig.getTitile())) |
| | | .addData(new WxMpTemplateData("thing4", visits.getReason())) |
| | | ; |
| | | String msgId = null; |
| | | try { |
| | | for (String openId:openIds) { |
| | | templateMessage.setToUser(openId); |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | Map<String, Object> const9 = new HashMap<String,Object>(); |
| | | const9.put("value","ç³è¯·å¾
æ¨å®¡æ¹"); |
| | | Map<String, Object> thing1 = new HashMap<String,Object>(); |
| | | thing1.put("value", "æµè¯åç§°"); |
| | | Map<String, Object> car_number7 = new HashMap<String,Object>(); |
| | | car_number7.put("value","çAP12345"); |
| | | Map<String, Object> character_string6 = new HashMap<String,Object>(); |
| | | character_string6.put("value","1"); |
| | | Map<String, Object> thing4 = new HashMap<String,Object>(); |
| | | thing4.put("value","çç±"); |
| | | dataMap.put("const9",const9); |
| | | dataMap.put("thing1",thing1); |
| | | dataMap.put("car_number7",car_number7); |
| | | dataMap.put("character_string6",character_string6); |
| | | dataMap.put("thing4",thing4); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("template_id", "SPwvgtASkm1aMDBsYhX2wHKdL2JBEGPknDkgniSza2Y"); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | // å鿍¡æ¿æ¶æ¯ |
| | | msgId = wxMpService.getTemplateMsgService().sendTemplateMsg(templateMessage); |
| | | } catch (WxErrorException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", msgId != null ? "æå" : "失败"); |
| | | // log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", msgId != null ? "æå" : "失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 访客ç³è¯·/æ¥å¤ä¸å¡éç¥ |
| | | * @param wxNoticeConfigMapper |
| | | * @param visits |
| | | * @param objCode visitUpload,visitAuditSuccess,visitWaitAuditï¼visitWaitAudit,visitReportUploadï¼visitReportAuditSuccessï¼visitReportAuditFail, visitReportAuditSuccess |
| | | * @param openIds |
| | | */ |
| | | public void sendVisitTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, Visits visits, String objCode, String token, List<String> openIds){ |
| | | try{ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | WxNoticeConfig wxNoticeConfig = wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.isNull(wxNoticeConfig)){ |
| | | return; |
| | | } |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | Map<String, Object> const9 = new HashMap<String,Object>(); |
| | | const9.put("value",wxNoticeConfig.getTitile()); |
| | | Map<String, Object> thing1 = new HashMap<String,Object>(); |
| | | thing1.put("value", visits.getName()); |
| | | Map<String, Object> car_number7 = new HashMap<String,Object>(); |
| | | car_number7.put("value",StringUtils.isNotBlank(visits.getCarNos())?visits.getCarNos():"-"); |
| | | Map<String, Object> character_string6 = new HashMap<String,Object>(); |
| | | character_string6.put("value","1"); |
| | | Map<String, Object> thing4 = new HashMap<String,Object>(); |
| | | thing4.put("value",visits.getReason()); |
| | | dataMap.put("const9",const9); |
| | | dataMap.put("thing1",thing1); |
| | | dataMap.put("car_number7",car_number7); |
| | | dataMap.put("character_string6",character_string6); |
| | | dataMap.put("thing4",thing4); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("template_id", wxNoticeConfig.getTempId()); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | // log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", msgId != null ? "æå" : "失败"); |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 鿣䏿¥ |
| | | * @param wxNoticeConfigMapper |
| | | * @param hiddenDanger |
| | | * @param objCode hiddenDangerUpload |
| | | * @param openIds |
| | | */ |
| | | public void sendHiddenDangerUploadTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, HiddenDanger hiddenDanger, String objCode,String token, List<String> openIds){ |
| | | try{ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | WxNoticeConfig wxNoticeConfig = wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.isNull(wxNoticeConfig)){ |
| | | return; |
| | | } |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | //鿣åºå |
| | | Map<String, Object> thing9 = new HashMap<String,Object>(); |
| | | thing9.put("value",hiddenDanger.getAreaName()); |
| | | //鿣åç§° |
| | | Map<String, Object> thing1 = new HashMap<String,Object>(); |
| | | thing1.put("value", hiddenDanger.getCategoryName()); |
| | | //ææ¥äºº |
| | | Map<String, Object> thing12 = new HashMap<String,Object>(); |
| | | thing12.put("value",hiddenDanger.getMemberName()); |
| | | //ææ¥æ¶é´ |
| | | Map<String, Object> time11 = new HashMap<String,Object>(); |
| | | time11.put("value", DateUtil.getDate(hiddenDanger.getCreateDate(),"yyyyå¹´MMæddæ¥ HH:mm:ss") ); |
| | | dataMap.put("thing9",thing9); |
| | | dataMap.put("thing1",thing1); |
| | | dataMap.put("thing12",thing12); |
| | | dataMap.put("time11",time11); |
| | | paramMap.put("template_id", wxNoticeConfig.getTempId()); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * éæ£æ´æ¹ |
| | | * @param wxNoticeConfigMapper |
| | | * @param hiddenDanger |
| | | * @param objCode hiddenDangerDeal |
| | | * @param openIds |
| | | */ |
| | | public void sendHiddenDangerDealTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, HiddenDanger hiddenDanger, String objCode,String token, List<String> openIds){ |
| | | try{ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | WxNoticeConfig wxNoticeConfig = wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.isNull(wxNoticeConfig)){ |
| | | return; |
| | | } |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | //鿣åºå |
| | | Map<String, Object> thing17 = new HashMap<String,Object>(); |
| | | thing17.put("value",hiddenDanger.getAreaName()); |
| | | //鿣åç§° |
| | | Map<String, Object> thing3 = new HashMap<String,Object>(); |
| | | thing3.put("value", hiddenDanger.getCategoryName()); |
| | | //æ´æ¹æ¹å¼ |
| | | Map<String, Object> thing13 = new HashMap<String,Object>(); |
| | | thing13.put("value",Constants.equalsInteger(hiddenDanger.getStatus(),Constants.ONE)?"éæ£å·²æ´æ¹":"鿣已éå"); |
| | | //æäº¤äºº |
| | | Map<String, Object> thing10 = new HashMap<String,Object>(); |
| | | thing10.put("value",hiddenDanger.getCheckorName()); |
| | | //éç¥æ¶é´ |
| | | Map<String, Object> time16 = new HashMap<String,Object>(); |
| | | time16.put("value", DateUtil.getDate(hiddenDanger.getDealTime(),"yyyyå¹´MMæddæ¥ HH:mm:ss") ); |
| | | dataMap.put("thing17",thing17); |
| | | dataMap.put("thing3",thing3); |
| | | dataMap.put("thing13",thing13); |
| | | dataMap.put("thing10",thing10); |
| | | dataMap.put("time16",time16); |
| | | paramMap.put("template_id", wxNoticeConfig.getTempId()); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * ç¨è½¦ç³è¯· å®¡æ¹æ
åµ |
| | | * @param wxNoticeConfigMapper |
| | | * @param carUseBook |
| | | * @param objCode reservationSuccessï¼meetingCancel,meetingBeginAï¼meetingEndA |
| | | * @param openIds |
| | | * @param sendType 0=ç³è¯·äººï¼1=审æ¹äºº |
| | | */ |
| | | public void sendCarUseBookTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, CarUseBook carUseBook, String objCode,String token, |
| | | List<String> openIds,Integer sendType){ |
| | | try { |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | WxNoticeConfig wxNoticeConfig = wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.isNull(wxNoticeConfig)){ |
| | | return; |
| | | } |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | //审æ¹è¿åº¦ |
| | | Map<String, Object> thing3 = new HashMap<String,Object>(); |
| | | if(Constants.equalsInteger(sendType,Constants.ONE)){ |
| | | thing3.put("value","ç³è¯·å¾
æ¨å®¡æ¹"); |
| | | }else{ |
| | | if(Constants.equalsInteger(carUseBook.getStatus(),Constants.ZERO)){ |
| | | thing3.put("value","ç³è¯·æäº¤æåå¾
å®¡æ ¸"); |
| | | }else if(Constants.equalsInteger(carUseBook.getStatus(),Constants.TWO)){ |
| | | thing3.put("value","ç³è¯·å·²å®¡æ ¸éè¿"); |
| | | }else{ |
| | | thing3.put("value","ç³è¯·å·²è¢«é©³å"); |
| | | } |
| | | } |
| | | //ç³è¯·äºº |
| | | Map<String, Object> thing1 = new HashMap<String,Object>(); |
| | | thing1.put("value", carUseBook.getMemberName()); |
| | | //车çå· |
| | | Map<String, Object> car_number2 = new HashMap<String,Object>(); |
| | | car_number2.put("value",carUseBook.getCarCode()); |
| | | //ç®çå° |
| | | Map<String, Object> thing11 = new HashMap<String,Object>(); |
| | | thing11.put("value",carUseBook.getAddr()); |
| | | //ç¨è½¦æ¶é´ |
| | | Map<String, Object> time14 = new HashMap<String,Object>(); |
| | | time14.put("value", carUseBook.getPlanUseDate()); |
| | | dataMap.put("thing3",thing3); |
| | | dataMap.put("car_number2",car_number2); |
| | | dataMap.put("thing1",thing1); |
| | | dataMap.put("thing11",thing11); |
| | | dataMap.put("time14",time14); |
| | | paramMap.put("template_id", wxNoticeConfig.getTempId()); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 车è¾å
¥åç³è¯· ç©æµè½¦ |
| | | * @param wxNoticeConfigMapper |
| | | * @param platformBooks |
| | | * @param objCode platformBookUploadï¼platformBookAuditSuccess,platformBookAuditFailï¼platformBookWaitAudit |
| | | * @param token |
| | | * @param openIds |
| | | * @param sendType 0=ç³è¯·äººï¼1=审æ¹äºº |
| | | */ |
| | | public void sendPlatformBookTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, PlatformBooks platformBooks, String objCode,String token, |
| | | List<String> openIds,Integer sendType){ |
| | | try{ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | WxNoticeConfig wxNoticeConfig = wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.isNull(wxNoticeConfig)){ |
| | | return; |
| | | } |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | //å®¡æ ¸ç¶æ |
| | | Map<String, Object> const9 = new HashMap<String,Object>(); |
| | | if(Constants.equalsInteger(sendType,Constants.ONE)){ |
| | | const9.put("value","ç³è¯·å¾
æ¨å®¡æ¹"); |
| | | }else{ |
| | | if(Constants.equalsInteger(platformBooks.getStatus(),Constants.ZERO)){ |
| | | const9.put("value","ç³è¯·æäº¤æåå¾
å®¡æ ¸"); |
| | | }else if(Constants.equalsInteger(platformBooks.getStatus(),Constants.TWO)){ |
| | | const9.put("value","ç³è¯·å·²å®¡æ ¸éè¿"); |
| | | }else{ |
| | | const9.put("value","ç³è¯·å·²è¢«é©³å"); |
| | | } |
| | | } |
| | | //车çå· |
| | | Map<String, Object> car_number3 = new HashMap<String,Object>(); |
| | | car_number3.put("value", platformBooks.getCarCodeFront()); |
| | | //ä¸å¡ç±»å |
| | | Map<String, Object> phrase4 = new HashMap<String,Object>(); |
| | | phrase4.put("value", platformBooks.getInReason()); |
| | | //ç³è¯·äºº |
| | | Map<String, Object> thing8 = new HashMap<String,Object>(); |
| | | thing8.put("value", platformBooks.getDriverName()); |
| | | //æ¶é´ |
| | | Map<String, Object> time4 = new HashMap<String,Object>(); |
| | | time4.put("value", DateUtil.getDate(platformBooks.getArriveDate(),"yyyyå¹´MMæddæ¥ HH:mm:ss") ); |
| | | dataMap.put("const9",const9); |
| | | dataMap.put("car_number3",car_number3); |
| | | dataMap.put("phrase4",phrase4); |
| | | dataMap.put("thing8",thing8); |
| | | dataMap.put("time4",time4); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("template_id", wxNoticeConfig.getTempId()); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Wms ä»»å¡ä¸è¾¾éç¥ |
| | | * @param wxNoticeConfigMapper |
| | | * @param platformJob |
| | | * @param objCode platformJobNewJob |
| | | * @param openIds |
| | | */ |
| | | public void sendWmsTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, PlatformJob platformJob, String objCode,String token, |
| | | List<String> openIds){ |
| | | try{ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | WxNoticeConfig wxNoticeConfig = wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.isNull(wxNoticeConfig)){ |
| | | return; |
| | | } |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | //è¿åç¼å· |
| | | Map<String, Object> character_string1 = new HashMap<String,Object>(); |
| | | character_string1.put("value",platformJob.getBillCode()); |
| | | //叿º |
| | | Map<String, Object> thing3 = new HashMap<String,Object>(); |
| | | thing3.put("value", platformJob.getDriverName()); |
| | | //ä¸è¾¾æ¶é´ |
| | | Map<String, Object> time4 = new HashMap<String,Object>(); |
| | | time4.put("value", DateUtil.getDate(platformJob.getCreateDate(),"yyyyå¹´MMæddæ¥ HH:mm:ss") ); |
| | | dataMap.put("character_string1",character_string1); |
| | | dataMap.put("thing3",thing3); |
| | | dataMap.put("time4",time4); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("template_id", wxNoticeConfig.getTempId()); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * Wms ä»»å¡åæ¶éç¥ |
| | | * @param wxNoticeConfigMapper |
| | | * @param platformJob |
| | | * @param objCode platformJobNewJob |
| | | * @param openIds |
| | | */ |
| | | public void sendWmsCancelTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, PlatformJob platformJob, String objCode,String token, |
| | | List<String> openIds){ |
| | | try{ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | WxNoticeConfig wxNoticeConfig = wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.isNull(wxNoticeConfig)){ |
| | | return; |
| | | } |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | //ä»»å¡åå· |
| | | Map<String, Object> character_string1 = new HashMap<String,Object>(); |
| | | character_string1.put("value",platformJob.getBillCode()); |
| | | //åæ¶æ¶é´ |
| | | Map<String, Object> time6 = new HashMap<String,Object>(); |
| | | time6.put("value", DateUtil.getDate(new Date(),"yyyyå¹´MMæddæ¥ HH:mm:ss") ); |
| | | dataMap.put("character_string1",character_string1); |
| | | dataMap.put("time6",time6); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("template_id", wxNoticeConfig.getTempId()); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æå°ä½ä¸ |
| | | * @param wxNoticeConfigMapper |
| | | * @param platformJob |
| | | * @param objCode platformJobCallInï¼platformJobSingIn,platformJobOverNumï¼platformJobWorking,platformJobFinishï¼platformJobLevelPower,platformJobMoveï¼platformJobErrorï¼platformJobTimeOut,platformJobStopErr |
| | | * @param token |
| | | * @param openIds |
| | | */ |
| | | public void sendPlatformJobTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, PlatformJob platformJob, String objCode,String token, |
| | | List<String> openIds){ |
| | | try{ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | WxNoticeConfig wxNoticeConfig = wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.isNull(wxNoticeConfig)){ |
| | | return; |
| | | } |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | | //æ´ä½åæ°map |
| | | Map<String, Object> paramMap = new HashMap<String, Object>(); |
| | | //æ¶æ¯ä¸»é¢æ¾ç¤ºç¸å
³map |
| | | Map<String, Object> dataMap = new HashMap<String, Object>(); |
| | | //æå°éç¥ |
| | | Map<String, Object> const6 = new HashMap<String,Object>(); |
| | | const6.put("value",wxNoticeConfig.getTitile()); |
| | | //车çå· |
| | | Map<String, Object> character_string1 = new HashMap<String,Object>(); |
| | | character_string1.put("value",platformJob.getCarCodeFront()); |
| | | //æå°å· |
| | | Map<String, Object> thing3 = new HashMap<String,Object>(); |
| | | thing3.put("value", platformJob.getPlatformName()); |
| | | //æ¶é´ |
| | | Map<String, Object> time4 = new HashMap<String,Object>(); |
| | | time4.put("value", DateUtil.getDate(new Date(),"yyyyå¹´MMæddæ¥ HH:mm:ss") ); |
| | | dataMap.put("const6",const6); |
| | | dataMap.put("character_string1",character_string1); |
| | | dataMap.put("thing3",thing3); |
| | | dataMap.put("time4",time4); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("template_id", wxNoticeConfig.getTempId()); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.PlatformLog; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/06/28 10:03 |
| | | */ |
| | | public interface PlatformLogMapper extends BaseMapper<PlatformLog> { |
| | | public interface PlatformLogMapper extends MPJBaseMapper<PlatformLog> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.PlatformWmsJob; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/06/28 10:03 |
| | | */ |
| | | public interface PlatformWmsJobMapper extends BaseMapper<PlatformWmsJob> { |
| | | public interface PlatformWmsJobMapper extends MPJBaseMapper<PlatformWmsJob> { |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | private Integer isdeleted; |
| | | @ApiModelProperty(value = "ä½ä¸æ¥æºï¼0èªå»º 1wmsæ¨é", example = "1") |
| | | private Integer origin; |
| | | |
| | | @ApiModelProperty(value = "åç§°") |
| | | private String name; |
| | |
| | | @ApiModelProperty(value = "ä¾åºå") |
| | | @ExcelColumn(name="ä¾åºå") |
| | | private String inRepertotyCode; |
| | | |
| | | @ApiModelProperty(value = "æ¶è´§å°") |
| | | @ExcelColumn(name="æ¶è´§å°") |
| | | private String repertotyAddress; |
| | | @ApiModelProperty(value = "è®¡åæ¶è´§æ°é", example = "1") |
| | | @ExcelColumn(name="è®¡åæ¶è´§æ°é") |
| | | private BigDecimal ioQty; |
| | |
| | | @ApiModelProperty(value = "ä½ä¸å®ææ¶é´ï¼æç»æ¶é´ï¼") |
| | | @TableField(exist = false) |
| | | private Date doneDate; |
| | | @ApiModelProperty(value = "è®¡åæ¶è´§æ°é(éwms)", example = "1") |
| | | @ApiModelProperty(value = "æ¿è¿åå·", example = "1") |
| | | @TableField(exist = false) |
| | | private BigDecimal ortherIoQty; |
| | | private String carryBillCode; |
| | | } |
| | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | // @ApiModelProperty(value = "ä½ä¸æ¥æºï¼0èªå»º 1wmsæ¨é", example = "1") |
| | | // @ExcelColumn(name="ä½ä¸æ¥æºï¼0èªå»º 1wmsæ¨é") |
| | | // private Integer origin; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | |
| | | @ApiModelProperty(value = "叿ºå§å") |
| | | @ExcelColumn(name="叿ºå§å") |
| | | private String driverName; |
| | | |
| | | @ApiModelProperty(value = "æ¶è´§å°") |
| | | @ExcelColumn(name="æ¶è´§å°") |
| | | private String repertotyAddress; |
| | | @ApiModelProperty(value = "æ¿è¿å") |
| | | @ExcelColumn(name="æ¿è¿å") |
| | | private String carrierName; |
| | |
| | | @ApiModelProperty(value = "车çå·") |
| | | @ExcelColumn(name="车çå·") |
| | | private String plateNumber; |
| | | |
| | | @ApiModelProperty(value = "æ¶è´§å°") |
| | | @ExcelColumn(name="æ¶è´§å°") |
| | | private String repertotyAddress; |
| | | |
| | | @ApiModelProperty(value = "ååå·`") |
| | | @ExcelColumn(name="ååå·`") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.reqeust; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/1/4 16:17 |
| | | */ |
| | | @Data |
| | | public class CarsJobAndContractDTO { |
| | | |
| | | @ApiModelProperty(value = "车çå·") |
| | | private String carCode; |
| | | |
| | | |
| | | } |
| | |
| | | package com.doumee.dao.web.reqeust; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.haikang.model.param.BaseRequst; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | |
| | | @ApiModelProperty(value = "æ¥è¦æºèµæºåç§°") |
| | | private String resourceName; |
| | | @ApiModelProperty(value = "æ¥è¦ç¶æ") |
| | | private String handleStatus; |
| | | private Integer handleStatus; |
| | | @ApiModelProperty(value = "æ¥è¦ç±»ååç§°") |
| | | private String alarmTypeName; |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import com.doumee.core.haikang.model.cars.response.CarsDeviceDetaisResponse; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿è¾é |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/25 10:59 |
| | | */ |
| | | @Data |
| | | public class BoardCarsListVO { |
| | | |
| | | @ApiModelProperty(value = "车è¾åç»çº¬åº¦ä¿¡æ¯") |
| | | private List<CarsDeviceDetaisResponse> carsList; |
| | | |
| | | @ApiModelProperty(value = "å¨éæ°é") |
| | | private int busyNum; |
| | | @ApiModelProperty(value = "ç©ºé²æ°é") |
| | | private int idleNum; |
| | | |
| | | @ApiModelProperty(value = "离线æ°é") |
| | | private int offlineNum; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * è¿è¾é |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/25 10:59 |
| | | */ |
| | | @Data |
| | | public class BoardJobCenterDataVO { |
| | | |
| | | |
| | | @ApiModelProperty(value = "å¨éæ°é") |
| | | private int busyNum; |
| | | @ApiModelProperty(value = "ç©ºé²æ°é") |
| | | private int idleNum; |
| | | |
| | | @ApiModelProperty(value = "离线æ°é") |
| | | private int offlineNum; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * éç¨ |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/25 10:59 |
| | | */ |
| | | @Data |
| | | public class BoardStockListVO { |
| | | |
| | | @ApiModelProperty(value = "åºåæç»éå") |
| | | private List<GeneralVO> stockList; |
| | | @ApiModelProperty(value = "åºååºåæ±æ»éå") |
| | | private List<GeneralVO> areaTotalList; |
| | | |
| | | @ApiModelProperty(value = "åºåå·²å©ç¨") |
| | | private BigDecimal num; |
| | | @ApiModelProperty(value = "åºåå©ç¨ç") |
| | | private BigDecimal useRate; |
| | | @ApiModelProperty(value = "åºåæ»é") |
| | | private BigDecimal totalNum; |
| | | |
| | | } |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * çæ§ç¹éå |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import com.doumee.dao.business.model.PlatformLog; |
| | | import com.doumee.dao.business.model.PlatformWmsDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿è¾é |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/25 10:59 |
| | | */ |
| | | @Data |
| | | public class CarsContractVO { |
| | | |
| | | @ApiModelProperty(value = "ç©ææ¸
å") |
| | | private List<PlatformWmsDetail> detailList; |
| | | @ApiModelProperty(value = "ååå·") |
| | | private String ioCode; |
| | | @ApiModelProperty(value ="æ¶è´§å°") |
| | | private String address; |
| | | @ApiModelProperty(value = "è¿è¾æ»é") |
| | | private BigDecimal totalNum; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import com.doumee.dao.business.model.PlatformLog; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿è¾é |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/25 10:59 |
| | | */ |
| | | @Data |
| | | public class CarsJobAndContractVO { |
| | | |
| | | @ApiModelProperty(value = "ä½ä¸è®°å½éå") |
| | | private List<PlatformLog> logList; |
| | | |
| | | @ApiModelProperty(value = "ååå表") |
| | | private List<CarsContractVO> contractList; |
| | | @ApiModelProperty(value = "叿ºææºå·") |
| | | private String phone; |
| | | @ApiModelProperty(value = "叿ºå§å") |
| | | private String name; |
| | | @ApiModelProperty(value = "è¿è¾åå·") |
| | | private String billCode; |
| | | @ApiModelProperty(value = "è¿è¾æ»é") |
| | | private BigDecimal totalNum; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ååºç©æµè¿è¡è°åº¦çæ¿ |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/25 9:54 |
| | | */ |
| | | @Data |
| | | public class PlatformJobRunBoardNewVO { |
| | | |
| | | @ApiModelProperty(value = "累计åºåºé - æ¬æ") |
| | | private BigDecimal monthOutTotal; |
| | | |
| | | @ApiModelProperty(value = "累计åºåºéæåº¦ - 䏿") |
| | | private BigDecimal monthLastOutTotal; |
| | | |
| | | @ApiModelProperty(value = "累计åºåºé - æ¬å¹´") |
| | | private BigDecimal yearOutTotal; |
| | | |
| | | @ApiModelProperty(value = "累计åºåºé年度 - å»å¹´") |
| | | private BigDecimal yearLastOutTotal; |
| | | |
| | | @ApiModelProperty(value = "累计åºåºè½¦æ¬¡ - æ¬æ") |
| | | private Integer monthOutTimes; |
| | | |
| | | @ApiModelProperty(value = "累计åºåºè½¦æ¬¡ - æ¬å¹´") |
| | | private Integer yearOutTimes; |
| | | |
| | | |
| | | @ApiModelProperty(value = "åºåºä»»å¡ - å½åä»»å¡é") |
| | | private BigDecimal currentOutNum; |
| | | @ApiModelProperty(value = "åºåºä»»å¡ - å½å宿任å¡é") |
| | | private BigDecimal currentOutDoneNum; |
| | | @ApiModelProperty(value = "å
¥åºä»»å¡ - å½åä»»å¡é") |
| | | private BigDecimal currentInNum; |
| | | @ApiModelProperty(value = "å
¥åºä»»å¡ - å½å宿任å¡é") |
| | | private BigDecimal currentInDoneNum; |
| | | |
| | | @ApiModelProperty(value = "仿¥åºåºæç") |
| | | private BigDecimal todayOutRate; |
| | | |
| | | @ApiModelProperty(value = "æ¬æåºåºæç") |
| | | private BigDecimal monthOutRate; |
| | | |
| | | @ApiModelProperty(value = "仿¥å
¥åºæç") |
| | | private BigDecimal todayInRate; |
| | | |
| | | @ApiModelProperty(value = "æ¬æå
¥åºæç") |
| | | private BigDecimal monthInRate; |
| | | |
| | | @ApiModelProperty(value = "åºåæå¤§å¼") |
| | | private BigDecimal stockMax; |
| | | |
| | | @ApiModelProperty(value = "å½ååºå") |
| | | private BigDecimal stockTotal; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "è¿è¾ä»»å¡åæ - 7æ¥" , hidden = true) |
| | | private List<TransportMeasureVO> transportMeasureWeekList; |
| | | |
| | | @ApiModelProperty(value = "è¿è¾ä»»å¡åæ - æåº¦", hidden = true) |
| | | private List<TransportMeasureVO> transportMeasureMonthList; |
| | | |
| | | @ApiModelProperty(value = "è¿è¾ä»»å¡åæ - 年度", hidden = true) |
| | | private List<TransportMeasureVO> transportMeasureYearList; |
| | | |
| | | @ApiModelProperty(value = "彿¥è¿è¾ä»»å¡") |
| | | private List<PlatformJob> platformJobList; |
| | | |
| | | @ApiModelProperty(value = "åºåºä»»å¡") |
| | | private JobDataVO outJob; |
| | | |
| | | @ApiModelProperty(value = "å
¥åºä»»å¡") |
| | | private JobDataVO inJob; |
| | | |
| | | @ApiModelProperty(value = "仿¥å
¥åºéç»è®¡") |
| | | private List<GeneralVO> totalInList; |
| | | |
| | | @ApiModelProperty(value = "åºåæ
åµ") |
| | | private List<GeneralVO> stockList; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse; |
| | | import com.doumee.dao.business.model.Company; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * è¿è¾é |
| | |
| | | private Integer planTimes; |
| | | |
| | | @ApiModelProperty(value = "æ¥æ") |
| | | private String planDate; |
| | | private Date planDate; |
| | | @ApiModelProperty(value = "æ¥æStr") |
| | | private String planDateStr; |
| | | |
| | | } |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.core.haikang.model.param.request.AcsDeviceListRequest; |
| | | import com.doumee.core.haikang.model.param.request.TransparentChannelSingleRequest; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | |
| | | package com.doumee.service.business.ext; |
| | | |
| | | import com.doumee.core.erp.model.openapi.request.erp.*; |
| | | import com.doumee.core.erp.model.openapi.response.erp.ApproveInfoResponse; |
| | | import com.doumee.core.haikang.model.param.request.AcsDeviceListRequest; |
| | | import com.doumee.core.haikang.model.param.request.PrivilegeGroupRequest; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.erp.model.openapi.request.*; |
| | |
| | | * @return |
| | | */ |
| | | String syncHkDevices(Device param); |
| | | String syncHkNotices(String username); |
| | | |
| | | /** |
| | | * åæ¥æµ·åº·åè½¦åº |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.SmsConstants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wx.wxPlat.WxPlatConstants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.dao.SmsConfigMapper; |
| | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | |
| | | @Autowired |
| | | private ApproveTemplMapper approveTemplMapper; |
| | |
| | | approveList.add(createUserApprove); |
| | | |
| | | //æ¥è¯¢ææå¾
å¤ç人 |
| | | |
| | | String token = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(); |
| | | //审æ¹ä¸å¡æ°æ® |
| | | for (int i = 0; i < approveParamList.size(); i++) { |
| | | ApproveParam approveParam = approveParamList.get(i); |
| | |
| | | approve.setType(Constants.ZERO); |
| | | approveList.add(approve); |
| | | |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | if(Constants.equalsInteger(approve.getStatus(),Constants.ONE) && StringUtils.isNotBlank(member.getPhone())){ |
| | | //åéçä¿¡éç¥ |
| | | if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.reason)){ |
| | |
| | | SmsConstants.platformBookContent.platformBookWaitAudit, |
| | | null,Arrays.asList(member.getPhone().split(",")) |
| | | ); |
| | | //å
¬ä¼å·éç¥ |
| | | if(StringUtils.isNotBlank(member.getOpenid())){ |
| | | wxPlatNotice.sendPlatformBookTemplateNotice( |
| | | wxNoticeConfigMapper, |
| | | platformBooksMapper.selectById(businessId), |
| | | WxPlatConstants.platformBookContent.platformBookWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getOpenid().split(",")), |
| | | Constants.ONE); |
| | | } |
| | | }else if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit)){ |
| | | //访客ç³è¯· |
| | | //çä¿¡éç¥ |
| | | SmsEmailServiceImpl.sendVisitSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,visitsMapper,businessId, |
| | | SmsConstants.visitContent.visitNotice, |
| | | null,Arrays.asList(member.getPhone().split(",")) |
| | | ); |
| | | //å
¬ä¼å·éç¥ |
| | | if(StringUtils.isNotBlank(member.getOpenid())){ |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxNoticeConfigMapper,visitsMapper.selectById(businessId), WxPlatConstants.visitContent.visitWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | }else if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visitReporting)){ |
| | | //访客æ¥å¤ |
| | | SmsEmailServiceImpl.sendVisitReportSms(systemDictDataBiz, |
| | |
| | | SmsConstants.visitReportingContent.visitReportingNotice, |
| | | null,Arrays.asList(member.getPhone().split(",")) |
| | | ); |
| | | //å
¬ä¼å·éç¥ |
| | | if(StringUtils.isNotBlank(member.getOpenid())){ |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxNoticeConfigMapper,visitsMapper.selectById(businessId), WxPlatConstants.visitReportContent.visitReportWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | }else if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.useCar)){ |
| | | //ç¨è½¦ç³è¯· |
| | | SmsEmailServiceImpl.sendCarUseSms(systemDictDataBiz, |
| | |
| | | SmsConstants.carUseBookContent.carUseBookWaitAudit, |
| | | null,Arrays.asList(member.getPhone().split(",")) |
| | | ); |
| | | //å
¬ä¼å·éç¥ |
| | | if(StringUtils.isNotBlank(member.getOpenid())){ |
| | | wxPlatNotice.sendCarUseBookTemplateNotice( |
| | | wxNoticeConfigMapper, |
| | | carUseBookMapper.selectById(businessId), |
| | | WxPlatConstants.carUseBookContent.carUseBookWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getOpenid().split(",")), |
| | | Constants.ONE); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | public void dealBusinessData(ApproveDTO approveDTO,Approve approve){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.unConstructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.constructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)){ |
| | |
| | | } |
| | | } |
| | | //访客æ¥å¤ |
| | | String objCode = ""; |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)){ |
| | | //åéçä¿¡éç¥ |
| | | SmsEmailServiceImpl.sendVisitReportSms(systemDictDataBiz, |
| | |
| | | SmsConstants.visitReportingContent.visitReportingAuditFail, |
| | | approveDTO.getCheckInfo(),null |
| | | ); |
| | | objCode = Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? WxPlatConstants.visitReportContent.visitReportAuditSuccess:WxPlatConstants.visitReportContent.visitReportAuditFail; |
| | | |
| | | |
| | | }else{ //访客ç³è¯· |
| | | //åéçä¿¡éç¥ |
| | | SmsEmailServiceImpl.sendVisitSms(systemDictDataBiz, |
| | |
| | | SmsConstants.visitContent.visitAuditFail, |
| | | approveDTO.getCheckInfo(),null |
| | | ); |
| | | objCode = Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? WxPlatConstants.visitContent.visitAuditSuccess:WxPlatConstants.visitContent.visitAuditFail; |
| | | } |
| | | visitsMapper.updateById(visits); |
| | | //åé微信å
¬ä¼å· |
| | | if(StringUtils.isNotBlank(objCode)){ |
| | | Member member = memberMapper.selectById(visits.getCreateMemberId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxNoticeConfigMapper,visits, objCode, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | visitsMapper.updateById(visits); |
| | | }else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | Constants.approveObjectType.unCityUseCar)){ |
| | | this.updDriver(approveDTO,approve,true); |
| | | CarUseBook carUseBook = carUseBookJoinMapper.selectById(approveDTO.getObjId()); |
| | | if(Objects.nonNull(carUseBook)){ |
| | | Member member = memberMapper.selectById(carUseBook.getMemberId()); |
| | | //åééç¥çæ¯ |
| | | if(Objects.nonNull(member)&&StringUtils.isNotBlank(member.getPhone())){ |
| | | SmsEmailServiceImpl.sendCarUseSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,carUseBookMapper,approveDTO.getObjId(), |
| | |
| | | SmsConstants.carUseBookContent.carUseBookAuditFail, |
| | | approveDTO.getCheckInfo(),Arrays.asList(member.getPhone().split(",")) |
| | | ); |
| | | } |
| | | if(StringUtils.isNotBlank(member.getOpenid())){ |
| | | //åé微信å
¬ä¼å·éç¥ |
| | | wxPlatNotice.sendCarUseBookTemplateNotice( |
| | | wxNoticeConfigMapper,carUseBook, |
| | | Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?WxPlatConstants.carUseBookContent.carUseBookAuditSuccess: WxPlatConstants.carUseBookContent.carUseBookAuditFail, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")),0); |
| | | } |
| | | } |
| | | |
| | |
| | | approveDTO.getCheckInfo(),null |
| | | ); |
| | | |
| | | //TODO åé微信å
¬ä¼å·æ¶æ¯ |
| | | //åé微信å
¬ä¼å·æ¶æ¯ |
| | | Member member = memberMapper.selectById(platformBooks.getDriverId() ); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | //åé微信å
¬ä¼å·éç¥ |
| | | wxPlatNotice.sendPlatformBookTemplateNotice( |
| | | wxNoticeConfigMapper,platformBooks, |
| | | Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?WxPlatConstants.platformBookContent.platformBookAuditSuccess: WxPlatConstants.platformBookContent.platformBookAuditFail, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")),0); |
| | | } |
| | | |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.*; |
| | | import com.doumee.core.wx.wxPlat.WxPlatConstants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.SmsConfigMapper; |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | |
| | | import com.doumee.dao.business.vo.ApproveDataVO; |
| | | import com.doumee.dao.business.vo.DateIntervalVO; |
| | | |
| | | import com.doumee.dao.system.join.NoticesJoinMapper; |
| | | import com.doumee.dao.system.model.Notices; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.service.business.ApproveService; |
| | | import com.doumee.service.business.CarUseBookService; |
| | |
| | | private ApproveJoinMapper approveJoinMapper; |
| | | |
| | | @Autowired |
| | | private NoticesJoinMapper noticesJoinMapper; |
| | | |
| | | @Autowired |
| | | private ApproveService approveService; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | private EmayService emayService; |
| | | |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | |
| | | carUseBookMapper.insert(carUseBook); |
| | | //ç¨è½¦ç³è¯· 审æ¹è®°å½å建 |
| | | approveService.createApproveFlow(carUseBook.getType()==0?3:4,carUseBook.getId(),carUseBook.getMemberId()); |
| | | //åé微信å
¬ä¼å·éç¥ |
| | | //åé微信å
¬ä¼å·éç¥ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | Member member = memberMapper.selectById(carUseBook.getMemberId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | wxPlatNotice.sendCarUseBookTemplateNotice( |
| | | wxNoticeConfigMapper,carUseBook, |
| | | WxPlatConstants.carUseBookContent.carUseBookUpload, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")),0); |
| | | } |
| | | |
| | | return carUseBook.getId(); |
| | | } |
| | | |
| | |
| | | .in(Approve::getObjType,Constants.approveObjectType.cityUseCar,Constants.approveObjectType.unCityUseCar) |
| | | .eq(Approve::getObjId,id) |
| | | ); |
| | | |
| | | //å¤çå¾
åä¿¡æ¯ |
| | | noticesJoinMapper.update(null,new UpdateWrapper<Notices>().lambda() |
| | | .set(Notices::getStatus,Constants.ONE) |
| | | .eq(Notices::getType,Constants.TWO) |
| | | .eq(Notices::getObjId,carUseBook.getId()) |
| | | ); |
| | | |
| | | |
| | | Member member = memberMapper.selectById(carUseBook.getMemberId()); |
| | | if(Objects.nonNull(member)&&StringUtils.isNotBlank(member.getPhone())){ |
| | | //ç¨è½¦ç³è¯·åæ¶ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | | import com.doumee.core.haikang.model.param.request.TransparentChannelSingleRequest; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.service.business.impl.hksync.HkSyncPushServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.SmsConstants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wx.wxPlat.WxPlatConstants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.SmsConfigMapper; |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | |
| | | @Autowired |
| | | private EmayService emayService; |
| | | |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | |
| | | |
| | | @Override |
| | | public Integer create(HiddenDanger hiddenDanger) { |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | hiddenDanger.setMemberId(hiddenDanger.getLoginUserInfo().getMemberId()); |
| | | Member createMember = memberMapper.selectById(hiddenDanger.getMemberId()); |
| | | if(Objects.isNull(createMember)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å建人信æ¯"); |
| | | } |
| | | hiddenDanger.setIsdeleted(Constants.ZERO); |
| | | hiddenDanger.setCreateDate(new Date()); |
| | | hiddenDanger.setEditDate(new Date()); |
| | |
| | | noticesJoinMapper.insert(notices); |
| | | |
| | | |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getPhone())){ |
| | | //åéçä¿¡éç¥ |
| | | SmsEmailServiceImpl.sendHiddenDangerSms(systemDictDataBiz, |
| | |
| | | ); |
| | | } |
| | | |
| | | |
| | | //æäº¤äººç微信å
¬ä¼å·éç¥ |
| | | if(Objects.nonNull(createMember)&&StringUtils.isNotBlank(createMember.getOpenid())){ |
| | | wxPlatNotice.sendHiddenDangerUploadTemplateNotice( |
| | | wxNoticeConfigMapper,hiddenDanger, |
| | | WxPlatConstants.hiddenDangerContent.hiddenDangerUpload, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(createMember.getOpenid().split(","))); |
| | | } |
| | | //å¤ç人ç微信å
¬ä¼å·éç¥ |
| | | if(Objects.nonNull(member)&&StringUtils.isNotBlank(member.getOpenid())){ |
| | | wxPlatNotice.sendHiddenDangerUploadTemplateNotice( |
| | | wxNoticeConfigMapper,hiddenDanger, |
| | | WxPlatConstants.hiddenDangerContent.hiddenDangerUpload, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(","))); |
| | | } |
| | | |
| | | return hiddenDanger.getId(); |
| | | } |
| | |
| | | .leftJoin(Member.class,Member::getId,HiddenDanger::getCheckUserId) |
| | | .leftJoin(HiddenDangerParam.class,HiddenDangerParam::getId,HiddenDanger::getCateId) |
| | | .leftJoin("company t4 on t1.company_id=t4.id") |
| | | .leftJoin("company t5 on t3.company_id=t5.id"); |
| | | .leftJoin("company t5 on t2.company_id=t5.id"); |
| | | queryWrapper |
| | | .eq(HiddenDanger::getId, id).last("limit 1"); |
| | | |
| | |
| | | .leftJoin(Member.class,Member::getId,HiddenDanger::getCheckUserId) |
| | | .leftJoin(HiddenDangerParam.class,HiddenDangerParam::getId,HiddenDanger::getCateId) |
| | | .leftJoin("company t4 on t1.company_id=t4.id") |
| | | .leftJoin("company t5 on t3.company_id=t5.id"); |
| | | .leftJoin("company t5 on t2.company_id=t5.id"); |
| | | |
| | | //æ°æ®æéå¼å§--------------------start---------------- |
| | | LoginUserInfo userInfo =pageWrap.getModel().getLoginUserInfo(); |
| | |
| | | Arrays.asList(member.getPhone().split(",")) |
| | | ); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | Member createMember = memberMapper.selectById(hiddenDanger.getMemberId()); |
| | | //å¤ç人ç微信å
¬ä¼å·éç¥ |
| | | if(Objects.nonNull(createMember)&&StringUtils.isNotBlank(createMember.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendHiddenDangerDealTemplateNotice( |
| | | wxNoticeConfigMapper,hiddenDanger, |
| | | WxPlatConstants.hiddenDangerContent.hiddenDangerDeal, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(createMember.getOpenid().split(","))); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | Arrays.asList(member.getPhone().split(",")) |
| | | ); |
| | | } |
| | | |
| | | //å¤ç人ç微信å
¬ä¼å·éç¥ |
| | | if(Objects.nonNull(member)&&StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendHiddenDangerUploadTemplateNotice( |
| | | wxNoticeConfigMapper,hiddenDanger, |
| | | WxPlatConstants.hiddenDangerContent.hiddenDangerUpload, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(","))); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | import com.doumee.service.business.InterfaceLogService; |
| | | import com.doumee.service.business.impl.hksync.HkSyncBaseServiceImpl; |
| | | import com.hikvision.artemis.sdk.config.ArtemisConfig; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | /** |
| | | * å¾®ä¿¡æææ¥å£ |
| | | * @param code |
| | | * æ¥æº:0=叿ºï¼1=访客ï¼2=å
é¨åå·¥ |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | String appSecret = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_SECRET).getCode(); |
| | | String getTokenUrl = WXConstant.GET_USER_INFO_URL.replace("CODE", code) |
| | | .replace("APPID", appId).replace("SECRET", appSecret); |
| | | // JSONObject tokenJson = JSONObject.parseObject(HttpsUtil.get(getTokenUrl,true)); |
| | | String openId = code; |
| | | // if(!Objects.isNull(tokenJson.get("access_token"))){ |
| | | // openId = tokenJson.getString("openid"); |
| | | // } |
| | | // String openId = "12345"; |
| | | JSONObject tokenJson = JSONObject.parseObject(HttpsUtil.get(getTokenUrl,true)); |
| | | String openId = ""; |
| | | if(!Objects.isNull(tokenJson.get("access_token"))){ |
| | | openId = tokenJson.getString("openid"); |
| | | } |
| | | WxAuthorizeVO wxAuthorizeVO = new WxAuthorizeVO(); |
| | | wxAuthorizeVO.setOpenid(openId); |
| | | //æ ¹æ®openId æ¥è¯¢ç¨æ·ä¿¡æ¯ |
| | | Member member = memberJoinMapper.selectJoinOne(Member.class,new MPJLambdaWrapper<Member>() |
| | | .selectAll(Member.class) |
| | | .selectAs(Company::getName,Member::getCompanyName) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .eq(Member::getOpenid,openId) |
| | | .eq(Member::getType,source) |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .orderByDesc(Member::getCreateDate) |
| | | .last(" limit 1 ") |
| | | ); |
| | | //éè®¿å®¢ç¨æ· è¿è¡å¤ææ¯å¦åå¨ç¨æ· |
| | | if(!Objects.isNull(member)){ |
| | | if(member.getIsdeleted() == Constants.ONE){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·å·²å é¤,请è系管çå"); |
| | | } |
| | | if(member.getStatus() != Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·å·²ç¦ç¨,请è系管çå"); |
| | | } |
| | | if(StringUtils.isNotBlank(member.getIdcardNo())){ |
| | | member.setIdcardDecode(DESUtil.decrypt(Constants.EDS_PWD, member.getIdcardNo())); |
| | | } |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | | member.setPrefixUrl(prefixUrl); |
| | | wxAuthorizeVO.setMember(member); |
| | | //叿º ä¸ å
é¨äººå æä¾token |
| | | if(Constants.equalsInteger(source,Constants.ZERO)||Constants.equalsInteger(source,Constants.TWO)){ |
| | | SystemUser systemUser = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda().eq(SystemUser::getMemberId,member.getId()) |
| | | .eq(SystemUser::getStatus,Constants.ZERO).last(" limit 1 ")); |
| | | if(Objects.nonNull(systemUser)){ |
| | | String token = systemLoginService.loginByUserId(systemUser.getId()); |
| | | wxAuthorizeVO.setToken(token); |
| | | if(source==1){ |
| | | //æ ¹æ®openId æ¥è¯¢ç¨æ·ä¿¡æ¯ |
| | | Member member = memberJoinMapper.selectJoinOne(Member.class,new MPJLambdaWrapper<Member>() |
| | | .selectAll(Member.class) |
| | | .selectAs(Company::getName,Member::getCompanyName) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .eq(Member::getOpenid,openId) |
| | | .eq(Member::getType,source) |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .orderByDesc(Member::getCreateDate) |
| | | .last(" limit 1 ") |
| | | ); |
| | | //éè®¿å®¢ç¨æ· è¿è¡å¤ææ¯å¦åå¨ç¨æ· |
| | | if(!Objects.isNull(member)){ |
| | | if(member.getIsdeleted() == Constants.ONE){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·å·²å é¤,请è系管çå"); |
| | | } |
| | | if(member.getStatus() != Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·å·²ç¦ç¨,请è系管çå"); |
| | | } |
| | | if(StringUtils.isNotBlank(member.getIdcardNo())){ |
| | | member.setIdcardDecode(DESUtil.decrypt(Constants.EDS_PWD, member.getIdcardNo())); |
| | | } |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | | member.setPrefixUrl(prefixUrl); |
| | | wxAuthorizeVO.setMember(member); |
| | | //叿º ä¸ å
é¨äººå æä¾token |
| | | if(Constants.equalsInteger(source,Constants.ZERO)||Constants.equalsInteger(source,Constants.TWO)){ |
| | | SystemUser systemUser = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda().eq(SystemUser::getMemberId,member.getId()) |
| | | .eq(SystemUser::getStatus,Constants.ZERO).last(" limit 1 ")); |
| | | if(Objects.nonNull(systemUser)){ |
| | | String token = systemLoginService.loginByUserId(systemUser.getId()); |
| | | wxAuthorizeVO.setToken(token); |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | //妿æ¯å¸æºæè
å
é¨äººåï¼åä»system_useræ¥è¯¢ |
| | | SystemUser user = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda() |
| | | .eq(SystemUser::getOpenid,openId) |
| | | .eq(SystemUser::getType,source) |
| | | .eq(SystemUser::getDeleted,Boolean.FALSE) |
| | | .last(" limit 1 ")); |
| | | //éè®¿å®¢ç¨æ· è¿è¡å¤ææ¯å¦åå¨ç¨æ· |
| | | if(!Objects.isNull(user)){ |
| | | Member member = memberMapper.selectById(user.getId()); |
| | | if(member.getIsdeleted() == Constants.ONE){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·å·²å é¤,请è系管çå"); |
| | | } |
| | | if(member.getStatus() != Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·å·²ç¦ç¨,请è系管çå"); |
| | | } |
| | | if(StringUtils.isNotBlank(member.getIdcardNo())){ |
| | | member.setIdcardDecode(DESUtil.decrypt(Constants.EDS_PWD, member.getIdcardNo())); |
| | | } |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | | member.setPrefixUrl(prefixUrl); |
| | | wxAuthorizeVO.setMember(member); |
| | | //叿º ä¸ å
é¨äººå æä¾token |
| | | String token = systemLoginService.loginByUserId(user.getId()); |
| | | wxAuthorizeVO.setToken(token); |
| | | } |
| | | } |
| | | |
| | | |
| | | return wxAuthorizeVO; |
| | | } |
| | | |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.SmsConstants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wx.wxPlat.WxPlatConstants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.SmsConfigMapper; |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | private EmayService emayService; |
| | | |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | |
| | | @Override |
| | | public Integer create(PlatformBooks platformBooks) { |
| | |
| | | |
| | | //åå»ºå®¡æ¹æµä¿¡æ¯ |
| | | approveService.createApproveForPlatfrom(approveTempl.getId(),platformBooks.getId(),platformBooks.getDriverId()); |
| | | //åéå
¬ä¼å·éç¥ ç»æäº¤äºº |
| | | Member member = memberMapper.selectById(platformBooks.getDriverId()); |
| | | if(Objects.nonNull(member)&&StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformBookTemplateNotice( |
| | | wxNoticeConfigMapper,platformBooks, |
| | | WxPlatConstants.platformBookContent.platformBookUpload, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")),0); |
| | | } |
| | | |
| | | return platformBooks.getId(); |
| | | } |
| | | |
| | |
| | | import com.doumee.core.tms.model.response.TmsBaseResponse; |
| | | import com.doumee.core.tms.model.response.TmsLockStatusQueryResponse; |
| | | import com.doumee.core.utils.*; |
| | | import com.doumee.core.wx.wxPlat.WxPlatConstants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.SmsConfigMapper; |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | |
| | | private PlatformBroadcastLogMapper platformBroadcastLogMapper; |
| | | @Autowired |
| | | private PlatformWarnEventServiceImpl platformWarnEventService; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | |
| | | @Override |
| | | public Integer create(PlatformJob platformJob) { |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobCallIn,null,null |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobCallIn, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | return platformJob; |
| | | } |
| | |
| | | SmsConstants.platformJobContent.platformJobSingIn,platform.getName(),null |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())){ |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper,platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobSingIn, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | |
| | | //广æ ledéç¥ |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.CALLING.getInfo(), |
| | |
| | | SmsConstants.platformJobContent.platformJobMove,oldPlatform.getName(),platform.getName() |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobMove, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | platformJob.setPlatformName(oldPlatform.getName()); |
| | | platformJob.setPlatformId(oldPlatform.getId()); |
| | | this.broadcastAndLEed(platformJob, StringUtils.isBlank(oldPlatform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():oldPlatform.getLedContent(), |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobOverNum,null,null |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())){ |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper,platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobOverNum, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob, StringUtils.isBlank(platform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():platform.getLedContent(), |
| | | null |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobError,platform.getName(),null |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobError, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob, StringUtils.isBlank(platform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():platform.getLedContent(), |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobWorking,platform.getName(),null |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobWorking, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | //广æ ledéç¥ |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.WORKING.getInfo(), |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobFinish,platform.getName(),null |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobFinish, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | //广æ ledéç¥ |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.DONE.getInfo(), |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.*; |
| | | import com.doumee.core.wx.WXConstant; |
| | | import com.doumee.core.wx.wxPlat.WxPlatConstants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.admin.response.InterestedListVO; |
| | | import com.doumee.dao.admin.response.PCWorkPlatformDataVO; |
| | |
| | | |
| | | @Autowired |
| | | private SmsEmailMapper smsEmailMapper; |
| | | |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | |
| | | @Autowired |
| | | private EmayService emayService; |
| | |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼åèµ·æè®¿å®¡æ¹ç³è¯·å¤±è´¥ï¼"); |
| | | } |
| | | //åé微信å
¬ä¼å·éç¥ |
| | | wxPlatNotice.sendVisitAuditTemplateNotice(visits, |
| | | 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.waitCheck); |
| | | visitsMapper.updateById(visits); |
| | |
| | | } |
| | | initWithVisitInfo(visits); |
| | | updateProblemLog(visits,problemLog,member); |
| | | |
| | | //åé微信å
¬ä¼å·éç¥ - ç³è¯·æäº¤æåå¾
å®¡æ ¸ |
| | | if(StringUtils.isNotBlank(visits.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxNoticeConfigMapper,visits, |
| | | Constants.equalsInteger(visits.getType(),Constants.TWO)?WxPlatConstants.visitReportContent.visitReportUpload:WxPlatConstants.visitContent.visitUpload, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(visits.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | //å建审æ¹è®°å½ |
| | | createApprove(visits,visitMember); |
| | | |
| | |
| | | if(Constants.equalsInteger(visits.getStatus(),Constants.VisitStatus.xfSuccess)){ |
| | | //妿ä¸åæåï¼ |
| | | visitsMapper.updateById(visits); |
| | | if(Objects.isNull(visits.getParentId())){ |
| | | wxPlatNotice.sendVisitAuditTemplateNotice(visits, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_PREFIX).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_AUDIT_VISIT).getCode()); |
| | | } |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"éæ°ä¸åä¼å¤±è´¥ï¼"); |
| | | } |
| | |
| | | |
| | | pcWorkPlatformDataVO.setLwList(lwList ); |
| | | }else if(Constants.equalsInteger(queryType,Constants.THREE)) { |
| | | MPJLambdaWrapper<Notices> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(Notices.class); |
| | | if (Objects.isNull(loginUserInfo.getMemberId())) { |
| | | queryWrapper.eq("1", "2"); |
| | | pcWorkPlatformDataVO.setNoticesList(new ArrayList<>()); |
| | | pcWorkPlatformDataVO.setNoticesNum(0); |
| | | // queryWrapper.eq("1", "2"); |
| | | } else { |
| | | MPJLambdaWrapper<Notices> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(Notices.class); |
| | | queryWrapper.eq(Notices::getStatus, Constants.ZERO); |
| | | queryWrapper.eq(Notices::getSendacopy, Constants.ZERO); |
| | | queryWrapper.eq(Notices::getParam2, Constants.ZERO); |
| | | queryWrapper.eq(Notices::getUserId, loginUserInfo.getMemberId()); |
| | | } |
| | | queryWrapper.orderByDesc(Notices::getCreateDate); |
| | | List<Notices> noticesList = noticesJoinMapper.selectList(queryWrapper); |
| | | pcWorkPlatformDataVO.setNoticesList(noticesList); |
| | | pcWorkPlatformDataVO.setNoticesNum(noticesList.size()); |
| | | if(noticesList.size() > 5 ){ |
| | | pcWorkPlatformDataVO.setNoticesList(noticesList.subList(0,5)); |
| | | }else{ |
| | | queryWrapper.orderByDesc(Notices::getCreateDate); |
| | | List<Notices> noticesList = noticesJoinMapper.selectList(queryWrapper); |
| | | pcWorkPlatformDataVO.setNoticesList(noticesList); |
| | | pcWorkPlatformDataVO.setNoticesNum(noticesList.size()); |
| | | if(noticesList.size() > 5 ){ |
| | | pcWorkPlatformDataVO.setNoticesList(noticesList.subList(0,5)); |
| | | }else{ |
| | | pcWorkPlatformDataVO.setNoticesList(noticesList); |
| | | } |
| | | } |
| | | |
| | | }else{ |
| | | String code= systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.TIMEOUT_WARNING).getCode(); |
| | | MPJLambdaWrapper<Visits> queryWrapper = new MPJLambdaWrapper<>(); |
| | |
| | | i.setEndtime(param.getEndTime()); |
| | | i.setDoors(param.getDoors()); |
| | | visitsMapper.updateById(i); |
| | | if(Objects.isNull(i.getParentId())){ |
| | | wxPlatNotice.sendVisitAuditTemplateNotice(i, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_PREFIX).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_AUDIT_VISIT).getCode()); |
| | | } |
| | | }); |
| | | } |
| | | }catch (BusinessException e){ |
| | |
| | | return null; |
| | | } |
| | | @Override |
| | | public String syncHkNotices(String username){ |
| | | |
| | | return null; |
| | | } |
| | | @Override |
| | | public String syncHkLed(Device param){ |
| | | |
| | | return null; |
| | |
| | | List<Device> deleteList = new ArrayList<>(); |
| | | List<Device> addList = new ArrayList<>(); |
| | | List<Device> editList = new ArrayList<>(); |
| | | List<DoorsInfoResponse> allHkList = new ArrayList<>(); |
| | | Date date = new Date(); |
| | | //æ¥è¯¢å
¨é¨é¨ç¦è®¾å¤æ°æ® |
| | | List<Device> allList = deviceMapper.selectList(null); |
| | | List<DoorsInfoResponse> allHkList = new ArrayList<>(); |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.HKTools; |
| | | import com.doumee.core.haikang.service.HKCarOpenService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.service.business.InterfaceLogService; |
| | | import com.hikvision.artemis.sdk.config.ArtemisConfig; |
| | |
| | | |
| | | @PostConstruct |
| | | public int initHkConfig(){ |
| | | HKCarOpenService.ACCESS_KEY= systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_CARS_OPENAPI_ACCESS_KEY).getCode(); |
| | | HKCarOpenService.BASE_URL= systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_CARS_OPENAPI_URL).getCode(); |
| | | HKCarOpenService.ACCESS_SECRET= systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_CARS_OPENAPI_ACCESS_SECRET).getCode(); |
| | | ArtemisConfig.host = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HOST).getCode(); |
| | | ArtemisConfig.appKey = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPKEY).getCode(); |
| | | ArtemisConfig.appSecret = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPSECRET).getCode(); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl.hksync; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | | import com.doumee.core.haikang.model.param.respose.*; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.ImageBase64Util; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.DeviceRoleMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.RetentionMapper; |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.DeviceRole; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Retention; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.join.NoticesJoinMapper; |
| | | import com.doumee.dao.system.model.Notices; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.system.NoticesService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 海康访客ä¸å¡Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class HkSyncNoticeServiceImpl extends HkSyncBaseServiceImpl { |
| | | @Autowired |
| | | private NoticesJoinMapper noticesJoinMapper; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Override |
| | | public String syncHkNotices(String username){ |
| | | if(Constants.DEALING_HK_NOTICE_LIST){ |
| | | return null; |
| | | } |
| | | Constants.DEALING_HK_NOTICE_LIST =true; |
| | | try { |
| | | Date date = new Date(); |
| | | List<GetTodoListResponse> allHkList = new ArrayList<>(); |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | | while (hasNext){ |
| | | //å页éåå¾ªç¯æ¥è¯¢ææé¨ç¦è®¾å¤æ°æ® |
| | | GetTodoListRequest param = new GetTodoListRequest(); |
| | | param.setComId("dfe"); |
| | | param.setUserId(username); |
| | | param.setStatus(1);//åªæ¥å¾
å¤ççæ°æ® |
| | | param.setPageNo(curPage); |
| | | param.setLocaleType("zh_CN"); |
| | | param.setPageSize(100); |
| | | BaseResponse<BaseListPageResponse<GetTodoListResponse>> response = HKService.getTodoListPage(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | BaseListPageResponse<GetTodoListResponse> r = response.getData(); |
| | | curTotal += 100; |
| | | if(curTotal >= r.getTotal()){ |
| | | hasNext = false; |
| | | } |
| | | if(r.getList() == null || r.getList().size()==0){ |
| | | hasNext =false; |
| | | }else{ |
| | | allHkList.addAll(r.getList()); |
| | | } |
| | | curPage++; |
| | | } |
| | | if(allHkList!=null && allHkList.size()>0){ |
| | | List<Notices> list = new ArrayList<>(); |
| | | List<String> users = new ArrayList<>(); |
| | | for(GetTodoListResponse data :allHkList){ |
| | | users.add(data.getUserId()); |
| | | } |
| | | List<Integer> userIds = new ArrayList<>(); |
| | | List<Member > userList = memberMapper.selectList(new QueryWrapper<Member>().lambda() |
| | | .in(Member::getPhone,users) |
| | | .eq(Member::getIsdeleted,Constants.ZERO)); |
| | | for(GetTodoListResponse data :allHkList){ |
| | | Member u = getFromUserList(data.getUserId(),userList); |
| | | if(u==null){ |
| | | continue; |
| | | } |
| | | userIds.add(u.getId()); |
| | | JSONObject param = new JSONObject(); |
| | | |
| | | param.put("componentId","dfe"); |
| | | param.put("msgType","tlnc"); |
| | | param.put("componentMenuId", data.getMenuCode()); |
| | | JSONObject c = new JSONObject(); |
| | | c.put("method","dealTlncMsg"); |
| | | c.put("argument",JSONObject.toJSONString(data)); |
| | | param.put("callback",c); |
| | | Notices notices = new Notices(); |
| | | notices.setCreateDate(DateUtil.getISO8601DateByStr(data.getMsgCreateTimeIso())); |
| | | notices.setUserId(u.getId()); |
| | | notices.setStatus(Constants.ZERO); |
| | | notices.setSendacopy(Constants.ZERO); |
| | | //ä¸å¡ç¶æä¿¡æ¯ 0 =å¾
å¤ç;1=å·²åæ/å·²å¤ç;2=å·²æç»/å·²éå;3=已转交;4=å·²æ¤é |
| | | notices.setParam1(JSONObject.toJSONString(data)); |
| | | notices.setParam2(Constants.ZERO+""); |
| | | notices.setTitle(data.getMsgTitle()); |
| | | if(notices.getCreateDate() == null){ |
| | | notices.setCreateDate(date); |
| | | } |
| | | notices.setIsdeleted(Constants.ZERO); |
| | | notices.setParam4(data.getMsgCreateTimeIso()); |
| | | notices.setParam3(data.getMsgCreateTime()); |
| | | notices.setParam5(JSONObject.toJSONString(param)); |
| | | notices.setType(Constants.noticesObjectType.hknotice); |
| | | list.add(notices); |
| | | } |
| | | if(list.size()>0){ |
| | | //æ¸
空海康å
¨é¨çä»£åæ°æ® |
| | | noticesJoinMapper.delete(new UpdateWrapper<Notices>().lambda() |
| | | .eq(Notices::getType, Constants.noticesObjectType.hknotice) |
| | | .in(Notices::getUserId, userIds)); |
| | | noticesJoinMapper.insert(list);//æ¹éæå
¥è®°å½ |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | }finally { |
| | | Constants.DEALING_HK_NOTICE_LIST =false; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private Member getFromUserList(String userId, List<Member> userList) { |
| | | if(userList!=null ){ |
| | | for(Member u :userList){ |
| | | if(StringUtils.equals(u.getPhone(),userId)){ |
| | | return u; |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | // getUpdateModelByResponse(c,date,roleList,path); |
| | | getUpdateModelByResponseIccm(c,date,roleList,path); |
| | | visitsMapper.updateById(c); |
| | | if(Objects.isNull(c.getParentId())){ |
| | | wxPlatNotice.sendVisitAuditTemplateNotice(c, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_PREFIX).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_AUDIT_VISIT).getCode()); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | package com.doumee.service.business.impl.thrid; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.cars.response.CarsDeviceDetaisResponse; |
| | | import com.doumee.core.haikang.model.param.BaseListPageRequest; |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.BaseListPageRequest; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | | import com.doumee.core.haikang.model.param.respose.*; |
| | | import com.doumee.core.haikang.service.HKCarOpenService; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wms.model.response.WmsBaseResponse; |
| | | import com.doumee.core.wms.model.response.WmsInventoryDataResponse; |
| | | import com.doumee.core.wms.model.response.WmsInventoryJsonResponse; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.web.reqeust.SavePlatformWarnEventDTO; |
| | | import com.doumee.dao.web.reqeust.CarsJobAndContractDTO; |
| | | import com.doumee.dao.web.response.platformReport.*; |
| | | import com.doumee.service.business.impl.PlatformJobServiceImpl; |
| | | import com.doumee.service.business.impl.VisitsServiceImpl; |
| | | import com.doumee.service.business.third.BoardService; |
| | | import com.doumee.service.business.third.WmsService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Autowired |
| | | private PlatformLogMapper platformLogMapper; |
| | | @Autowired |
| | | private WmsService wmsService; |
| | | @Autowired |
| | | private HiddenDangerMapper hiddenDangerMapper; |
| | | @Autowired |
| | | private PlatformWaterGasMapper platformWaterGasMapper; |
| | |
| | | @Autowired |
| | | private PlatformWmsDetailMapper platformWmsDetailMapper; |
| | | @Autowired |
| | | private PlatformWmsJobMapper platformWmsJobMapper; |
| | | @Autowired |
| | | private PlatformMapper platformMapper; |
| | | @Autowired |
| | | private VisitsJoinMapper visitsJoinMapper; |
| | |
| | | private RetentionMapper retentionMapper; |
| | | @Autowired |
| | | private PlatformGroupMapper platformGroupMapper; |
| | | /** |
| | | * è·ååºåæ å½¢ç»ææ°æ® |
| | | * @return |
| | | */ |
| | | @Override |
| | | public BoardStockListVO stockList( ){ |
| | | BoardStockListVO data = new BoardStockListVO(); |
| | | double toatalNum = 1d; |
| | | BigDecimal num = new BigDecimal(0); |
| | | List<GeneralVO> list = new ArrayList<>(); |
| | | try { |
| | | toatalNum =Double.parseDouble(systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.WMS_TOTAL_STOCK_NUM).getCode()) ; |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | WmsBaseResponse<WmsInventoryDataResponse> response = wmsService.getInventoryList(); |
| | | if(response!=null && response.getData()!=null && response.getData().size()>=0){ |
| | | List<WmsInventoryJsonResponse> t= response.getData().get(0).getJson(); |
| | | if(t!=null &&t.size()>0){ |
| | | for(WmsInventoryJsonResponse j :t){ |
| | | num = num.add (Constants.formatBigdecimal( j.getQty())); |
| | | GeneralVO d = new GeneralVO(); |
| | | d.setNum(Constants.formatBigdecimal(j.getQty())); |
| | | d.setName(j.getItem_name()); |
| | | list.add(d); |
| | | } |
| | | } |
| | | } |
| | | data.setStockList(list); |
| | | data.setNum(num); |
| | | if(toatalNum<=0){ |
| | | toatalNum =1; |
| | | } |
| | | data.setTotalNum(new BigDecimal(toatalNum)); |
| | | data.setUseRate(data.getTotalNum().divide(data.getNum(),2,BigDecimal.ROUND_UP)); |
| | | return data; |
| | | |
| | | } |
| | | /** |
| | | * è·ååºåæ å½¢ç»ææ°æ® |
| | | * @return |
| | |
| | | FindHomeAlarmInfoPageRequest param = new FindHomeAlarmInfoPageRequest(); |
| | | param.setHour(24); |
| | | param.setPage(1); |
| | | param.setUserId("admin"); |
| | | // param.setRegionIndexCodes("root000000"); |
| | | param.setAlarmStartTime(DateUtil.getPlusTime2(DateUtil.addDaysToDate(new Date(),-1))); |
| | | param.setAlarmEndTime(DateUtil.getPlusTime2(new Date())); |
| | | param.setPageSize(20); |
| | |
| | | data.add(t); |
| | | } |
| | | } |
| | | return data; |
| | | return data; |
| | | |
| | | } |
| | | /** |
| | |
| | | List<MonitorDataVO> list = new ArrayList<>(); |
| | | MinitorDataSearchRequest param = new MinitorDataSearchRequest(); |
| | | param.setResourceTypeCodes(new String[]{}); |
| | | param.setRegionIndexCode("root0001"); |
| | | param.setRegionIndexCode("root000000"); |
| | | param.setIncludeDown("1"); |
| | | param.setUserId("admin"); |
| | | BaseResponse<BaseListPageResponse<MonitorDataSearchResponse>> response = HKService.minitorDataSearch(param); |
| | |
| | | @Override |
| | | public List<AlarmDataVO> fightingAlarmHandleData(){ |
| | | List<AlarmDataVO> alarmHandleDataVOList = new ArrayList<>(); |
| | | Date now = DateUtil.getStartOfDay(new Date()); |
| | | for (int i = 1; i < 12; i++) { |
| | | Date now =DateUtil.StringToDate(DateUtil.getFirstDayCurrentMonth(),"yyyy-MM") ; |
| | | for (int i = 1; i <= 12; i++) { |
| | | Date start = DateUtil.addMonthToDate(now,-12+i); |
| | | Date end = DateUtil.addMonthToDate(now,-11+i); |
| | | AlarmDataVO t = getAlertDataByStartEndTime(DateUtil.getPlusTime2(start),DateUtil.getPlusTime2(end)); |
| | |
| | | } |
| | | return alarmHandleDataVOList; |
| | | } |
| | | /** |
| | | * ãååºç©æä¸å¿è°åº¦ãçæ¿-è¿è¾ä»»å¡åæ |
| | | * |
| | | * @return |
| | | * |
| | | */ |
| | | @Override |
| | | public List<TransportMeasureVO> transportMeasure(Integer queryType){ |
| | | List<TransportMeasureVO> list = new ArrayList<>(); |
| | | Random random = new Random(); |
| | | List<Date> dayList = DateUtil.getDateListBeforDays(new Date(),7);//è¿7天 |
| | | if(Constants.equalsInteger(queryType,Constants.ONE)){ |
| | | dayList = DateUtil.getThisMonthDateList();//æ¬æå¤©æ° |
| | | }else if(Constants.equalsInteger(queryType,Constants.TWO)){ |
| | | dayList = DateUtil.getThisYearMonthList();//æ¬å¹´æä»½ |
| | | } |
| | | List<PlatformJob> dataList = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | | .selectAs(PlatformJob::getTotalNum,PlatformJob::getTotalNum) |
| | | // .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .apply(queryType==0,"to_days(create_date) >= to_days(now()) -7") |
| | | .apply(queryType==1,"year(create_date) = year(now()) and month(create_date) = month(now())") |
| | | .apply(queryType==2,"year(create_date) = year(now())")); |
| | | for (Date date : dayList) { |
| | | TransportMeasureVO data = new TransportMeasureVO(); |
| | | data.setPlanDate(date); |
| | | data.setPlanTimes(0); |
| | | data.setPlanTaskNum(new BigDecimal(random.nextInt(0))); |
| | | data.setFinishTaskNum(new BigDecimal(0)); |
| | | for(PlatformJob job :dataList){ |
| | | if(queryType == 2){ |
| | | if(DateUtil.formatDate(date,"yyyy-MM").equals(DateUtil.formatDate(job.getCreateDate(),"yyyy-MM"))){ |
| | | data.setPlanTimes( data.getPlanTimes() +1); |
| | | data.setPlanTaskNum( data.getPlanTaskNum().add(Constants.formatBigdecimal(job.getTotalNum()))); |
| | | if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.DONE.getKey()) |
| | | ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.LEAVED.getKey()) |
| | | ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())){ |
| | | //å®ææ° |
| | | data.setFinishTaskNum( data.getFinishTaskNum().add(Constants.formatBigdecimal(job.getTotalNum()))); |
| | | } |
| | | } |
| | | }else{ |
| | | if(DateUtil.formatDate(date,"yyyy-MM-dd").equals(DateUtil.formatDate(job.getCreateDate(),"yyyy-MM-dd"))){ |
| | | data.setPlanTimes( data.getPlanTimes() +1); |
| | | data.setPlanTaskNum( data.getPlanTaskNum().add(Constants.formatBigdecimal(job.getTotalNum()))); |
| | | if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.DONE.getKey()) |
| | | ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.LEAVED.getKey()) |
| | | ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())){ |
| | | //å®ææ° |
| | | data.setFinishTaskNum( data.getFinishTaskNum().add(Constants.formatBigdecimal(job.getTotalNum()))); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | list.add(data); |
| | | } |
| | | return list; |
| | | } |
| | | /** |
| | | * ãååºç©æä¸å¿è°åº¦ãçæ¿-æ ¹æ®è½¦çå·æ¥è¯¢ä½ä¸ä¿¡æ¯åååä¿¡æ¯éå |
| | | * |
| | | * @return |
| | | * |
| | | */ |
| | | @Override |
| | | public CarsJobAndContractVO getCarsJobDetails(CarsJobAndContractDTO param){ |
| | | CarsJobAndContractVO data = new CarsJobAndContractVO(); |
| | | if(StringUtils.isBlank(param.getCarCode())){ |
| | | return data; |
| | | } |
| | | PlatformJob job = platformJobMapper.selectJoinOne(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll(PlatformJob.class) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getCarCodeFront,param.getCarCode()) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey(),Constants.PlatformJobStatus.CALLED.getKey()) |
| | | .last("limit 1")); |
| | | if(job!=null){ |
| | | List<PlatformLog> logList = platformLogMapper.selectJoinList(PlatformLog.class, |
| | | new MPJLambdaWrapper<PlatformLog>() |
| | | .selectAll(PlatformLog.class) |
| | | .eq(PlatformLog::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformLog::getJobId,job.getId()) |
| | | .orderByDesc(PlatformLog::getCreateDate)); |
| | | data.setLogList(logList); |
| | | data.setName(job.getDriverName()); |
| | | data.setPhone(job.getDrivierPhone()); |
| | | data.setBillCode(job.getBillCode()); |
| | | data.setTotalNum(Constants.formatBigdecimal(job.getTotalNum())); |
| | | data.setContractList(new ArrayList<>()); |
| | | CarsContractVO tt = new CarsContractVO(); |
| | | tt.setIoCode(job.getContractNum()); |
| | | tt.setDetailList(new ArrayList<>()); |
| | | data.getContractList().add(tt); |
| | | |
| | | PlatformWmsJob wmsJob = platformWmsJobMapper.selectJoinOne(PlatformWmsJob.class, |
| | | new MPJLambdaWrapper<PlatformWmsJob>() |
| | | .selectAll(PlatformWmsJob.class) |
| | | .eq(PlatformWmsJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformWmsJob::getJobId,job.getId()) |
| | | .last("limit 1")); |
| | | if(wmsJob!=null){ |
| | | data.setName(wmsJob.getDriverName()); |
| | | data.setPhone(wmsJob.getDriverPhone()); |
| | | data.setBillCode(wmsJob.getCarryBillCode()); |
| | | data.setContractList(new ArrayList<>()); |
| | | |
| | | List<PlatformWmsDetail> detailList = platformWmsDetailMapper.selectJoinList(PlatformWmsDetail.class, |
| | | new MPJLambdaWrapper<PlatformWmsDetail>() |
| | | .selectAll(PlatformWmsDetail.class) |
| | | .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformWmsDetail::getWmsJobId,wmsJob.getId()) |
| | | .orderByDesc(PlatformLog::getCreateDate)); |
| | | if(detailList!=null){ |
| | | for(PlatformWmsDetail d : detailList){ |
| | | if(!isNotExistIocode(d.getIocode(),data.getContractList())){ |
| | | continue; |
| | | } |
| | | tt = new CarsContractVO(); |
| | | tt.setIoCode(d.getIocode()); |
| | | tt.setAddress(d.getRepertotyAddress()); |
| | | tt.setDetailList(getDetailListByCode(d.getIocode(),detailList,tt)); |
| | | data.getContractList().add(tt); |
| | | data.getTotalNum().add(Constants.formatBigdecimal(tt.getTotalNum()));//æ»è¿è¾é |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | return data; |
| | | |
| | | } |
| | | |
| | | private List<PlatformWmsDetail> getDetailListByCode(String iocode, List<PlatformWmsDetail> detailList,CarsContractVO tt) { |
| | | List<PlatformWmsDetail> list = new ArrayList<>(); |
| | | BigDecimal total = new BigDecimal(0); |
| | | if(detailList!=null){ |
| | | for(PlatformWmsDetail d :detailList){ |
| | | if(StringUtils.equals(d.getIocode(),iocode)){ |
| | | list.add(d); |
| | | total.add(Constants.formatBigdecimal(d.getIoQty())); |
| | | } |
| | | } |
| | | } |
| | | tt.setTotalNum(total); |
| | | return list; |
| | | } |
| | | |
| | | private boolean isNotExistIocode(String iocode, List<CarsContractVO> detailList) { |
| | | if(detailList!=null){ |
| | | for(CarsContractVO d :detailList){ |
| | | if(StringUtils.equals(d.getIoCode(),iocode)){ |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * ãæ¶é²ç®¡æ§ãçæ¿-åè¦ä¿¡æ¯éå |
| | | * |
| | |
| | | AlarmDataVO alarmDataVO = getAlertDataByStartEndTime(DateUtil.getPlusTime2(DateUtil.addDaysToDate(new Date(),-1)) |
| | | ,(DateUtil.getPlusTime2(new Date()))); |
| | | return alarmDataVO; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¬æ æ¬å¹´ç累计åºåºéç»è®¡æ°æ®,åºåºä»»å¡ãå
¥åºä»»å¡é |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PlatformJobRunBoardNewVO platformJobCenterData(){ |
| | | PlatformJobRunBoardNewVO data = new PlatformJobRunBoardNewVO(); |
| | | Random random = new Random(); |
| | | |
| | | data.setMonthOutTimes(random.nextInt(1000)); |
| | | data.setYearOutTimes(random.nextInt(1000) * 11); |
| | | |
| | | Date month = Utils.Date.getStart(new Date());//æ¬æ |
| | | Date lastMonth = DateUtil.addMonthToDate(month,-1);//䏿 |
| | | Date year = Utils.Date.getStart(new Date());//ä»å¹´ |
| | | Date lastYear = DateUtil.addYearToDate(year,-1);//å»å¹´ |
| | | |
| | | List<PlatformJob> monthNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | | .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum) |
| | | // .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | // .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(create_date) = year("+DateUtil.getPlusTime2(month)+") and month(create_date) = month("+DateUtil.getPlusTime2(month)+") and to_days(create_date)<= "+DateUtil.getPlusTime2(month))); |
| | | List<PlatformJob> monthLastNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | | // .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .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(create_date) = year("+DateUtil.getPlusTime2(lastMonth)+") and month(create_date) = month("+DateUtil.getPlusTime2(lastMonth)+") and to_days(create_date)<= "+DateUtil.getPlusTime2(lastMonth))); |
| | | List<PlatformJob> yearNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | | .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum) |
| | | .selectCount(PlatformJob::getPlatformId,PlatformJob::getCountum) |
| | | // .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .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(create_date) = year("+DateUtil.getPlusTime2(year)+") and to_days(create_date)<= "+DateUtil.getPlusTime2(year))); |
| | | List<PlatformJob> yearLastNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | | .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum) |
| | | // .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .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(create_date) = year("+DateUtil.getPlusTime2(lastYear)+") and to_days(create_date)<= "+DateUtil.getPlusTime2(lastYear))); |
| | | |
| | | data.setMonthOutTotal(getSumTotalByList(monthNum,0,null));//æ¬æåºåºé |
| | | data.setMonthLastOutTotal(getSumTotalByList(monthLastNum,null,null) );//䏿åºåºé |
| | | data.setYearOutTotal(getSumTotalByList(yearNum,null,null) );//æ¬å¹´åºåºé |
| | | data.setYearLastOutTotal(getSumTotalByList(yearLastNum,null,null) );//å»å¹´åºåºé |
| | | data.setMonthOutTimes(monthNum!=null?monthNum.size():0); |
| | | data.setYearOutTimes(yearNum!=null?yearNum.size():0); |
| | | |
| | | //==========ä»å¤©ä¹åæªå®æåºå
¥åºä»»å¡ |
| | | List<PlatformJob> beforeJobNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | | .selectAs(PlatformJob::getStatus,PlatformJob::getStatus) |
| | | .selectAs(PlatformJob::getType,PlatformJob::getType) |
| | | .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum) |
| | | // .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey(),Constants.PlatformJobStatus.CALLED.getKey()) |
| | | .apply(" and to_days(create_date) <to_days(now())")); |
| | | |
| | | //==========ä»å¤©åºå
¥åºä»»å¡ |
| | | List<PlatformJob> currentNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | | .selectAs(PlatformJob::getStatus,PlatformJob::getStatus) |
| | | .selectAs(PlatformJob::getType,PlatformJob::getType) |
| | | .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum) |
| | | // .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey()) |
| | | .apply("year(create_date) = year("+DateUtil.getPlusTime2(lastYear)+") and to_days(create_date)<= "+DateUtil.getPlusTime2(lastYear))); |
| | | |
| | | BigDecimal beforeOutNum = (getSumTotalByList(beforeJobNum,0,null));//ä»å¤©ä¹åæªå®æåºåºä»»å¡ |
| | | BigDecimal currentOutNum = (getSumTotalByList(currentNum,0,null));//ä»å¤©ä¸ååºåºä»»å¡ |
| | | BigDecimal beforeInNum = (getSumTotalByList(beforeJobNum,1,null));//ä»å¤©ä¹åæªå®æå
¥åºä»»å¡ |
| | | BigDecimal currentInNum = (getSumTotalByList(currentNum,1,null));//ä»å¤©ä¸åå
¥åºä»»å¡ |
| | | data.setCurrentInNum(beforeInNum.add(currentInNum));//å½åå
¥åºæ»ä»»å¡æé |
| | | data.setCurrentOutNum(beforeOutNum.add(currentOutNum));//å½ååºåºæ»ä»»å¡æé |
| | | data.setCurrentInDoneNum(getSumTotalByList(currentNum,0,1));//仿¥å®æé |
| | | data.setCurrentOutDoneNum(getSumTotalByList(currentNum,1,1));//仿¥å®æé |
| | | |
| | | //------------仿¥åºå
¥åºæç---------------- |
| | | BigDecimal outHours = getTotalDoneTimes(currentNum,0);// |
| | | BigDecimal inHours = getTotalDoneTimes(currentNum,1);// |
| | | if(outHours.compareTo(new BigDecimal(0))>0){ |
| | | data.setTodayOutRate(data.getCurrentOutDoneNum().divide(outHours,2));//å½åå
¥åºæ»ä»»å¡æé |
| | | } |
| | | if(inHours.compareTo(new BigDecimal(0))>0){ |
| | | data.setTodayInRate(data.getCurrentInDoneNum().divide(inHours,2));//å½åå
¥åºæ»ä»»å¡æé |
| | | } |
| | | //------------æ¬æåºå
¥åºæç---------------- |
| | | BigDecimal outMonthNum = getSumTotalByList(monthNum,0,null).add(data.getCurrentOutDoneNum()); |
| | | BigDecimal inMonthNum = getSumTotalByList(monthNum,1,null).add(data.getCurrentInDoneNum()); |
| | | BigDecimal outYearHours = getTotalDoneTimes(yearNum,0).add(outHours);// |
| | | BigDecimal inYearHours = getTotalDoneTimes(yearNum,1).add(inHours);// |
| | | if(outYearHours.compareTo(new BigDecimal(0))>0){ |
| | | data.setMonthOutRate(outMonthNum.divide(outYearHours,2));//æ¬æå
¥åºæç |
| | | } |
| | | if(inYearHours.compareTo(new BigDecimal(0))>0){ |
| | | data.setMonthInRate(inMonthNum.divide(inYearHours,2));//æ¬æå
¥åºæç |
| | | } |
| | | return data; |
| | | } |
| | | |
| | | |
| | | private BigDecimal getDoneHoursByData(String start ,String end) { |
| | | List<PlatformLog> platformLogList = platformLogMapper.selectList(new QueryWrapper<PlatformLog>().lambda() |
| | | .apply("create_date >= '"+start+"' and create_date <= '"+end+"'") |
| | | .isNotNull(PlatformLog::getParam3) |
| | | .ne(PlatformLog::getParam3,Constants.ZERO+"")); |
| | | if(platformLogList!=null && platformLogList.size()>0){ |
| | | return new BigDecimal((double)(platformLogList.stream().map(m->Long.valueOf(m.getParam3())).reduce(Long.valueOf(0),Long::sum))/(double)60); |
| | | } |
| | | |
| | | return new BigDecimal(0); |
| | | |
| | | } |
| | | private BigDecimal getTotalDoneTimes(List<PlatformJob> list, Integer type) { |
| | | BigDecimal r = new BigDecimal(0); |
| | | if(list==null || list.size() == 0){ |
| | | return r; |
| | | } |
| | | List<Integer> jobIds= new ArrayList<>(); |
| | | for(PlatformJob job : list){ |
| | | if( !(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.DONE.getKey()) |
| | | ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.LEAVED.getKey()) |
| | | ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()))){ |
| | | //åªæ¥è¯¢å®ææ°æ® |
| | | continue; |
| | | } |
| | | if(type !=null &&type ==0 && (Constants.equalsInteger(job.getType(),Constants.ONE) ||Constants.equalsInteger(job.getType(),Constants.THREE))){ |
| | | //åºåº |
| | | jobIds.add(job.getId()); |
| | | } |
| | | if(type !=null &&type ==1 && (Constants.equalsInteger(job.getType(),Constants.ZERO) ||Constants.equalsInteger(job.getType(),Constants.TWO)||Constants.equalsInteger(job.getType(),Constants.FOUR))){ |
| | | //å
¥åº |
| | | jobIds.add(job.getId()); |
| | | } |
| | | } |
| | | if(jobIds.size()>0){ |
| | | //å¤çä½ä¸æ¶é¿ |
| | | List<PlatformLog> platformLogList = platformLogMapper.selectList(new QueryWrapper<PlatformLog>().lambda() |
| | | .in(PlatformLog::getJobId,jobIds) |
| | | .isNotNull(PlatformLog::getParam3) |
| | | .ne(PlatformLog::getParam3,Constants.ZERO+"")); |
| | | if(platformLogList!=null && platformLogList.size()>0){ |
| | | return new BigDecimal((double)(platformLogList.stream().map(m->Long.valueOf(m.getParam3())).reduce(Long.valueOf(0),Long::sum))/(double)60); |
| | | } |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | private BigDecimal getSumTotalByList(List<PlatformJob> list,Integer type,Integer status) { |
| | | BigDecimal r = new BigDecimal(0); |
| | | if(list==null || list.size() == 0){ |
| | | return r; |
| | | } |
| | | for(PlatformJob job : list){ |
| | | |
| | | if(type !=null &&type ==0 && !(Constants.equalsInteger(job.getType(),Constants.ONE) ||Constants.equalsInteger(job.getType(),Constants.THREE))){ |
| | | continue; |
| | | } |
| | | if(type !=null &&type ==1 && !(Constants.equalsInteger(job.getType(),Constants.ZERO) ||Constants.equalsInteger(job.getType(),Constants.TWO)||Constants.equalsInteger(job.getType(),Constants.FOUR))){ |
| | | continue; |
| | | } |
| | | if(status !=null &&status ==1 && !(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.DONE.getKey()) |
| | | ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.LEAVED.getKey()) |
| | | ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()))){ |
| | | continue; |
| | | } |
| | | // if(Constants.formatBigdecimal(job.getIoQty()).compareTo(new BigDecimal(0)) >0){ |
| | | // r.add( job.getIoQty()); |
| | | // }else{ |
| | | r.add(Constants.formatBigdecimal(job.getTotalNum())); |
| | | // } |
| | | } |
| | | return Constants.formatBigdecimal0Float(r); |
| | | } |
| | | |
| | | @Override |
| | | public BoardCarsListVO platformJobCarsList(){ |
| | | BoardCarsListVO data = new BoardCarsListVO(); |
| | | List<CarsDeviceDetaisResponse> detaisResponses = HKCarOpenService.getAllCarsDetais(); |
| | | data.setCarsList(detaisResponses); |
| | | if(data.getCarsList()!=null && data.getCarsList().size()>0){ |
| | | List<String> codes = new ArrayList<>(); |
| | | //设å¤ç¶æ 0ï¼ç¦»çº¿ï¼1ï¼å¨çº¿ï¼2ï¼ä¼ç |
| | | int online = 0; |
| | | for(CarsDeviceDetaisResponse model:detaisResponses){ |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.ONE) ||Constants.equalsInteger(model.getStatus(),Constants.TWO)){ |
| | | //妿æ¯å¨çº¿æè
ä¼ç ï¼æ¥è¯¢å¨éè¿æ¯ç©ºé² |
| | | codes.add(model.getPlateNum()); |
| | | }else |
| | | data.setOfflineNum(data.getOfflineNum()+1); |
| | | } |
| | | if(codes.size()>0){ |
| | | //ç¶æ 0å¾
确认 1å¾
ç¾å° 2çå¾
å«å· 3å
¥åçå¾
4å·²å«å· 5ä½ä¸ä¸ 6ä½ä¸å®æ 7è½¬ç§»ä¸ 8å¼å¸¸æèµ· 9å·²ææç¦»å 10已离å 11 å·²è¿å· 12åæ¶ï¼WMSï¼ |
| | | long busyNum = platformJobMapper.selectCount(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getCarCodeFront,codes) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.WORKING.getKey() |
| | | ,Constants.PlatformJobStatus.WAIT_CALL.getKey() |
| | | ,Constants.PlatformJobStatus.CALLED.getKey() |
| | | ,Constants.PlatformJobStatus.IN_WAIT.getKey() |
| | | ,Constants.PlatformJobStatus.TRANSFERING.getKey() |
| | | ,Constants.PlatformJobStatus.WART_SIGN_IN.getKey() |
| | | ,Constants.PlatformJobStatus.WAIT_CONFIRM.getKey() |
| | | ,Constants.PlatformJobStatus.EXCEPTION.getKey()) |
| | | .groupBy(PlatformJob::getCarCodeFront)); |
| | | data.setBusyNum((int)busyNum);//å¨éæä»»å¡æ°é |
| | | data.setIdleNum(codes.size() -data.getBusyNum());//æ ä»»å¡ç©ºé²æ°é |
| | | } |
| | | } |
| | | |
| | | return data; |
| | | } |
| | | |
| | | public static AlarmDataVO getAlertDataByStartEndTime(String start,String end){ |
| | |
| | | data.setDeviceTypeList(list); |
| | | Long totalNum =hiddenDangerMapper.selectCount(new QueryWrapper<HiddenDanger>().lambda() |
| | | .eq(HiddenDanger::getIsdeleted,Constants.ZERO ) |
| | | .apply("to_day(create_data) = to_days(now())" ) ); |
| | | .apply("to_days(create_date) = to_days(now())" ) ); |
| | | data.setDangerTotalNum(totalNum !=null?totalNum.intValue():0);//仿¥éæ£æ°é |
| | | totalNum =hiddenDangerMapper.selectCount(new QueryWrapper<HiddenDanger>().lambda() |
| | | .eq(HiddenDanger::getIsdeleted,Constants.ZERO ) |
| | | .in(HiddenDanger::getStatus,Constants.ONE,Constants.TWO ) |
| | | .apply("to_day(check_date) = to_days(now())" ) ); |
| | | .apply("to_days(check_date) = to_days(now())" ) ); |
| | | data.setDangerDealedNum(totalNum !=null?totalNum.intValue():0);//仿¥å¤ç鿣æ°é |
| | | return data; |
| | | } |
| | |
| | | List<WorkEfficiencyVO> workEfficiencyVOList = new ArrayList<>(); |
| | | List<PlatformJob> jobList = platformJobMapper.selectJoinList(PlatformJob.class, new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll( PlatformJob.class) |
| | | .select("(select sum(ifnull(a.io_qty,0)) from platform_wms_detail a where a.isdeleted=0 and a.job_id =t.id )", PlatformJob::getIoQty) |
| | | // .select("(select sum(ifnull(a.io_qty,0)) from platform_wms_detail a where a.isdeleted=0 and a.job_id =t.id )", create_date) |
| | | .apply("to_days(t.create_date) = to_days(now())") |
| | | .eq(Platform::getIsdeleted, Constants.ZERO) |
| | | .in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey() |
| | |
| | | import com.doumee.core.wms.model.response.WmsBaseDataResponse; |
| | | import com.doumee.core.wms.model.response.WmsBaseResponse; |
| | | import com.doumee.core.wms.model.response.WmsInventoryDataResponse; |
| | | import com.doumee.core.wx.wxPlat.WxPlatConstants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.SmsConfigMapper; |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private EmayService emayService; |
| | | @Autowired |
| | | private RetentionMapper retentionMapper; |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | /** |
| | | * å
¥åºéç¥ä»»å¡ä¸å¡å¤ç |
| | | * @param job åæ° |
| | |
| | | job.setPlateNumber(param.getPlateNumber()); |
| | | job.setType(Constants.ZERO); |
| | | job.setIoCreatedate(param.getCreateDate()); |
| | | // job.setOrigin(Constants.ONE); |
| | | job.setJobId(model.getId()); |
| | | job.setDriverPhone(param.getDriverPhone()); |
| | | platformWmsJobMapper.insert(job); |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,job.getId(), |
| | | SmsConstants.platformJobContent.platformJobNewJob,null,null |
| | | ); |
| | | //æ¥è¯¢å¸æºä¿¡æ¯ åéå
¬ä¼å·éç¥ |
| | | if(Objects.nonNull(job.getDriverId())){ |
| | | Member member = memberMapper.selectOne(new QueryWrapper<Member>().lambda().eq(Member::getPhone,job.getDriverId())); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendWmsTemplateNotice( |
| | | wxNoticeConfigMapper,job, |
| | | WxPlatConstants.platformJobContent.platformJobNewJob, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | job.setCarCodeFront(param.getPlateNumber()); |
| | | job.setDrivierPhone(param.getDriverPhone()); |
| | | job.setDriverName(param.getDriverName()); |
| | | job.setOrigin(Constants.ONE); |
| | | //å¤çä½ä¸ç车è¾ã叿ºãæå°ç»å
³èå
³ç³»ï¼å¸è´§ |
| | | dealCarPlatformAndDriverInfo(job,0); |
| | | // platformJobMapper.insert(job); |
| | |
| | | job.setCarCodeFront(param.getPlateNumber()); |
| | | job.setDrivierPhone(param.getDriverPhone()); |
| | | job.setDriverName(param.getDriverName()); |
| | | job.setOrigin(Constants.ONE); |
| | | //å¤çä½ä¸ç车è¾ã叿ºãæå°ç»å
³èå
³ç³»ï¼è£
è´§ |
| | | dealCarPlatformAndDriverInfo(job,1); |
| | | return job; |
| | |
| | | return returnFailReuslt("请æ±åæ°ä¸æ£ç¡®ï¼åæ°ä¸è½ä¸ºç©º"); |
| | | } |
| | | List<PlatformJob> jobList = new ArrayList<>(); |
| | | List<Integer> jobIdList = new ArrayList<>(); |
| | | List<PlatformWmsDetail> details = new ArrayList<>(); |
| | | List<String> iocodeList = new ArrayList<>(); |
| | | for(WmsOutboundNoticeRequest param : list.getData()){ |
| | |
| | | job.setContractNum(param.getContractNum()); |
| | | job.setDriverPhone(param.getDriverPhone()); |
| | | job.setDriverName(param.getDriverName()); |
| | | // job.setOrigin(Constants.ONE); |
| | | platformWmsJobMapper.insert(job); |
| | | jobList.add(model); |
| | | } |
| | | jobIdList.add(job.getId()); |
| | | if(param.getDetails()!=null && param.getDetails().size()>0){ |
| | | for(WmsOutboundDetailRequest d :param.getDetails()){ |
| | | PlatformWmsDetail entity = new PlatformWmsDetail(); |
| | |
| | | entity.setJobId(job.getJobId()); |
| | | entity.setWmsJobId(job.getId()); |
| | | entity.setIoQty(d.getIoQty()); |
| | | entity.setRepertotyAddress(job.getRepertotyAddress()); |
| | | entity.setWmsJobId(job.getId()); |
| | | entity.setStatus(Constants.ZERO); |
| | | entity.setRate(d.getRate()); |
| | |
| | | .in(PlatformWmsDetail::getIocode,iocodeList) |
| | | ); |
| | | } |
| | | jobIdList.add(job.getId()); |
| | | } |
| | | } |
| | | if(details.size()>0){ |
| | | platformWmsDetailMapper.insert(details); |
| | | } |
| | | if(jobList.size()>0){ |
| | | list.setJobIdList(jobIdList); |
| | | startEndNoticeToDriver(jobList); |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | .set(PlatformJob::getStatus,Constants.PlatformJobStatus.CANCEL.getKey()) |
| | | .in(PlatformJob::getId,setJobIds) |
| | | ); |
| | | |
| | | for (Integer jobId:setJobIds |
| | | ) { |
| | | //çä¿¡éç¥ |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,jobId, |
| | | SmsConstants.platformJobContent.platformJobStopJob,null,null |
| | | ); |
| | | //å
¬ä¼å·éç¥å¸æº ä»»å¡åæ¶ |
| | | PlatformJob job = platformJobMapper.selectById(jobId); |
| | | if(Objects.nonNull(job)){ |
| | | Member member = memberMapper.selectById(job.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendWmsCancelTemplateNotice( |
| | | wxNoticeConfigMapper,job, |
| | | WxPlatConstants.platformJobContent.platformJobCancel, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,jobId, |
| | | SmsConstants.platformJobContent.platformJobStopJob,null,null |
| | | ); |
| | | |
| | | //å
¬ä¼å·éç¥å¸æº ä»»å¡åæ¶ |
| | | PlatformJob job = platformJobMapper.selectById(jobId); |
| | | if(Objects.nonNull(job)){ |
| | | Member member = memberMapper.selectById(job.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendWmsCancelTemplateNotice( |
| | | wxNoticeConfigMapper,job, |
| | | WxPlatConstants.platformJobContent.platformJobCancel, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | return returnSuccessReuslt(null); |
| | | } |
| | | /** |
| | | * å¤çä½ä¸è¡æ°æ®çè¿è¾æ»éä¿¡æ¯ |
| | | * @param jobList åæ° |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void computjobTotalNum(List<Integer> jobList) { |
| | | if(jobList==null || jobList.size()==0){ |
| | | return; |
| | | } |
| | | for(Integer jobId : jobList){ |
| | | BigDecimal num = new BigDecimal(0); |
| | | List<PlatformWmsDetail> details = platformWmsDetailMapper.selectList( new QueryWrapper<PlatformWmsDetail>().lambda() |
| | | .eq(PlatformWmsDetail::getJobId,jobId) |
| | | .eq(PlatformWmsDetail::getIsdeleted, Constants.ZERO)); |
| | | if(details!=null && details.size()>0){ |
| | | for(PlatformWmsDetail d :details){ |
| | | num.add(Constants.formatBigdecimal(d.getIoQty())); |
| | | } |
| | | platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda() |
| | | .set(PlatformJob::getTotalNum,num) |
| | | .eq(PlatformJob::getOrigin, Constants.ZERO) |
| | | .eq(PlatformJob::getId, jobId)); |
| | | } |
| | | |
| | | } |
| | | } |
| | | /** |
| | | * ä½ä¸å®æéç¥ä»»å¡ä¸å¡å¤ç |
| | | * @param list åæ° |
| | | * @return |
| | |
| | | import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.PageSensorStatusResponse; |
| | | import com.doumee.core.haikang.model.param.respose.RegionEnergyListResponse; |
| | | import com.doumee.core.tms.model.request.TmsLockStatusQueryRequest; |
| | | import com.doumee.core.tms.model.request.TmsOrderInfoRequest; |
| | | import com.doumee.core.tms.model.request.TmsOrderListRequest; |
| | | import com.doumee.core.tms.model.response.TmsBaseResponse; |
| | | import com.doumee.core.tms.model.response.TmsLockStatusQueryResponse; |
| | | import com.doumee.core.tms.model.response.TmsOrderInfoResponse; |
| | | import com.doumee.core.tms.model.response.TmsOrderListResponse; |
| | | import com.doumee.dao.business.model.PlatformWarnEvent; |
| | | import com.doumee.dao.web.reqeust.CarsJobAndContractDTO; |
| | | import com.doumee.dao.web.response.platformReport.*; |
| | | |
| | | import java.util.List; |
| | |
| | | List<AlarmDataVO> fightingAlarmHandleData(); |
| | | |
| | | List<MonitorDataVO> monitorDataList(); |
| | | |
| | | BoardCarsListVO platformJobCarsList(); |
| | | |
| | | PlatformJobRunBoardNewVO platformJobCenterData(); |
| | | |
| | | CarsJobAndContractVO getCarsJobDetails(CarsJobAndContractDTO param); |
| | | |
| | | List<TransportMeasureVO> transportMeasure(Integer queryType); |
| | | |
| | | BoardStockListVO stockList(); |
| | | } |
| | |
| | | import com.doumee.core.wms.model.request.WmsInboundNoticeRequest; |
| | | import com.doumee.core.wms.model.request.WmsOutboundNoticeRequest; |
| | | import com.doumee.core.wms.model.response.WmsBaseResponse; |
| | | import com.doumee.core.wms.model.response.WmsInventoryDataResponse; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return WmsBaseResponse |
| | | */ |
| | | WmsBaseResponse orderPlatformBind(PlatformJob job); |
| | | WmsBaseResponse getInventoryList(); |
| | | WmsBaseResponse<WmsInventoryDataResponse> getInventoryList(); |
| | | void saveInterfaceLog(String url,String name,String param,Integer success,String respone,int type); |
| | | /** |
| | | * å
¥åºåæ¹ééç¥ |
| | |
| | | WmsBaseResponse doneTask(WmsBaseRequest<WmsActionNoticeRequest> list); |
| | | |
| | | |
| | | void computjobTotalNum(List<Integer> jobList); |
| | | } |
| | |
| | | cache: |
| | | session: |
| | | # ä¼è¯è¿ææ¶é¿(s) |
| | | expire: 18000 |
| | | expire: 1800 |
| | | captcha: |
| | | # éªè¯ç è¿ææ¶é¿(s) |
| | | expire: 300 |