admin/.env.development
@@ -1,8 +1,8 @@ # å¼åç¯å¢é ç½® NODE_ENV = 'development' #VUE_APP_API_URL = 'http://localhost:10010' VUE_APP_API_URL = 'http://localhost:10010' # VUE_APP_API_URL = 'http://192.168.0.113:10010' # VUE_APP_API_URL = 'http://192.168.0.173/gateway_interface' VUE_APP_API_URL = 'http://10.50.250.253:8088/gateway_interface' #VUE_APP_API_URL = 'http://10.50.250.253:8088/gateway_interface' admin/src/api/business/areas.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,43 @@ 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 } }) } admin/src/components/business/OperaAreasWindow.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,94 @@ <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> admin/src/views/business/areas.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,160 @@ <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> server/meeting/meeting_admin/src/main/resources/application.yml
@@ -34,7 +34,7 @@ cache: session: # ä¼è¯è¿ææ¶é¿(s) expire: 18000 expire: 1800 captcha: # éªè¯ç è¿ææ¶é¿(s) expire: 300 server/system_gateway/src/main/resources/application.yml
@@ -37,7 +37,7 @@ cache: session: # ä¼è¯è¿ææ¶é¿(s) expire: 18000 expire: 1800 captcha: # éªè¯ç è¿ææ¶é¿(s) expire: 300 server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -43,6 +43,9 @@ 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" ; @@ -470,6 +473,14 @@ 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); server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -442,7 +442,7 @@ * @return String * @throws Exception */ public static String getNowPlusTime() throws Exception { public static String getNowPlusTime() { String nowDate = ""; try { java.sql.Date date = null; @@ -3042,6 +3042,12 @@ 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(); server/system_timer/src/main/resources/application.yml
@@ -35,7 +35,7 @@ cache: session: # ä¼è¯è¿ææ¶é¿(s) expire: 18000 expire: 1800 captcha: # éªè¯ç è¿ææ¶é¿(s) expire: 300 server/visits/admin_timer/src/main/resources/application.yml
@@ -31,7 +31,7 @@ cache: session: # ä¼è¯è¿ææ¶é¿(s) expire: 18000 expire: 1800 captcha: # éªè¯ç è¿ææ¶é¿(s) expire: 300 server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunActController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,157 @@ 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<List<GeneralVO>> stockList() { List<GeneralVO> list = new ArrayList<>(); for (int i = 1; i < 10; 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); } } server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunController.java
@@ -98,9 +98,6 @@ } @LoginNoRequired @ApiOperation("彿¥è¿è¾ä»»å¡") @GetMapping("/platformJobList") server/visits/dmvisit_admin/src/main/resources/application.yml
@@ -34,7 +34,7 @@ cache: session: # ä¼è¯è¿ææ¶é¿(s) expire: 18000 expire: 1800 captcha: # éªè¯ç è¿ææ¶é¿(s) expire: 300 server/visits/dmvisit_screen/src/main/resources/application.yml
@@ -37,7 +37,7 @@ cache: session: # ä¼è¯è¿ææ¶é¿(s) expire: 18000 expire: 1800 captcha: # éªè¯ç è¿ææ¶é¿(s) expire: 300 server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/cars/BaseCarsPageResponse.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,18 @@ 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 æéç»å¯¹è±¡å表 } server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/cars/BaseCarsResponse.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,17 @@ 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; } server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/cars/request/CarsDeviceRequest.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,14 @@ 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 } server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/cars/request/CarsGpsRequest.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,18 @@ 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 } server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/cars/response/CarsDeviceChannelResponse.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ 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 é³é¢éé } server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/cars/response/CarsDeviceDetaisResponse.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,23 @@ 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 } server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/cars/response/CarsDeviceResponse.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,25 @@ 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 } server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/cars/response/CarsGpsResponse.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,25 @@ 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 } server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKCarOpenService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,236 @@ 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; } } server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/PlatformLogMapper.java
@@ -2,11 +2,12 @@ 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> { } server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/PlatformWmsJobMapper.java
@@ -2,11 +2,12 @@ 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> { } server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsDetail.java
@@ -77,7 +77,9 @@ @ApiModelProperty(value = "ä¾åºå") @ExcelColumn(name="ä¾åºå") private String inRepertotyCode; @ApiModelProperty(value = "æ¶è´§å°") @ExcelColumn(name="æ¶è´§å°") private String repertotyAddress; @ApiModelProperty(value = "è®¡åæ¶è´§æ°é", example = "1") @ExcelColumn(name="è®¡åæ¶è´§æ°é") private BigDecimal ioQty; @@ -98,7 +100,7 @@ @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; } server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsJob.java
@@ -75,7 +75,9 @@ @ApiModelProperty(value = "叿ºå§å") @ExcelColumn(name="叿ºå§å") private String driverName; @ApiModelProperty(value = "æ¶è´§å°") @ExcelColumn(name="æ¶è´§å°") private String repertotyAddress; @ApiModelProperty(value = "æ¿è¿å") @ExcelColumn(name="æ¿è¿å") private String carrierName; @@ -104,10 +106,6 @@ @ApiModelProperty(value = "车çå·") @ExcelColumn(name="车çå·") private String plateNumber; @ApiModelProperty(value = "æ¶è´§å°") @ExcelColumn(name="æ¶è´§å°") private String repertotyAddress; @ApiModelProperty(value = "ååå·`") @ExcelColumn(name="ååå·`") server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/reqeust/CarsJobAndContractDTO.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,19 @@ 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; } server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/AlarmEventDataVO.java
@@ -26,7 +26,7 @@ @ApiModelProperty(value = "æ¥è¦æºèµæºåç§°") private String resourceName; @ApiModelProperty(value = "æ¥è¦ç¶æ") private String handleStatus; private Integer handleStatus; @ApiModelProperty(value = "æ¥è¦ç±»ååç§°") private String alarmTypeName; server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/BoardCarsListVO.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,31 @@ 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.math.BigDecimal; 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; } server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/BoardJobCenterDataVO.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,28 @@ 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 BoardJobCenterDataVO { @ApiModelProperty(value = "å¨éæ°é") private int busyNum; @ApiModelProperty(value = "ç©ºé²æ°é") private int idleNum; @ApiModelProperty(value = "离线æ°é") private int offlineNum; } server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/CarsContractVO.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,30 @@ 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; } server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/CarsJobAndContractVO.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,36 @@ package com.doumee.dao.web.response.platformReport; import com.doumee.core.haikang.model.cars.response.CarsDeviceDetaisResponse; 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 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; } server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/PlatformJobRunBoardNewVO.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,93 @@ 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; } server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncInitConfigServiceImpl.java
@@ -3,6 +3,7 @@ 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; @@ -28,6 +29,9 @@ @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(); server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -6,11 +6,13 @@ 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.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; @@ -22,6 +24,7 @@ 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.CarsJobAndContractDTO; import com.doumee.dao.web.reqeust.SavePlatformWarnEventDTO; import com.doumee.dao.web.response.platformReport.*; import com.doumee.service.business.impl.PlatformJobServiceImpl; @@ -62,6 +65,8 @@ private PlatformJobMapper platformJobMapper; @Autowired private PlatformWmsDetailMapper platformWmsDetailMapper; @Autowired private PlatformWmsJobMapper platformWmsJobMapper; @Autowired private PlatformMapper platformMapper; @Autowired @@ -451,6 +456,8 @@ 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); @@ -464,7 +471,7 @@ data.add(t); } } return data; return data; } /** @@ -477,7 +484,7 @@ 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); @@ -514,8 +521,8 @@ @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)); @@ -523,6 +530,138 @@ } return alarmHandleDataVOList; } /** * ãååºç©æä¸å¿è°åº¦ãçæ¿-è¿è¾ä»»å¡åæ * * @return * */ @Override public List<TransportMeasureVO> transportMeasure(Integer queryType){ List<TransportMeasureVO> list = new ArrayList<>(); Random random = new Random(); List<String> dayList = DateUtil.getBeforDays(new Date(),7); if(Constants.equalsInteger(queryType,Constants.ONE)){ dayList = DateUtil.getBeforDays(new Date(),30); }else if(Constants.equalsInteger(queryType,Constants.TWO)){ dayList = DateUtil.getBeforMonth(new Date(),12); } for (String str:dayList) { TransportMeasureVO data = new TransportMeasureVO(); data.setPlanDate(str); data.setPlanTimes(random.nextInt(200)); data.setPlanTaskNum(new BigDecimal(random.nextInt(1000))); data.setFinishTaskNum(new BigDecimal(data.getPlanTaskNum().intValue())); 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; } /** * ãæ¶é²ç®¡æ§ãçæ¿-åè¦ä¿¡æ¯éå * @@ -534,6 +673,236 @@ 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",PlatformJob::getIoQty) .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",PlatformJob::getIoQty) .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",PlatformJob::getIoQty) .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",PlatformJob::getIoQty) .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",PlatformJob::getIoQty) .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",PlatformJob::getIoQty) .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){ @@ -615,12 +984,12 @@ 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; } server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java
@@ -462,6 +462,7 @@ 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()); server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java
@@ -12,6 +12,7 @@ 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; @@ -81,4 +82,12 @@ List<AlarmDataVO> fightingAlarmHandleData(); List<MonitorDataVO> monitorDataList(); BoardCarsListVO platformJobCarsList(); PlatformJobRunBoardNewVO platformJobCenterData(); CarsJobAndContractVO getCarsJobDetails(CarsJobAndContractDTO param); List<TransportMeasureVO> transportMeasure(Integer queryType); } server/visits/openapi/src/main/resources/application.yml
@@ -36,7 +36,7 @@ cache: session: # ä¼è¯è¿ææ¶é¿(s) expire: 18000 expire: 1800 captcha: # éªè¯ç è¿ææ¶é¿(s) expire: 300