From 084ca7506e8dec25434a582acd700f9f97a132c0 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 26 九月 2024 09:14:12 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java | 10 ++-
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java | 24 ++++---
admin/src/views/vehicle/visitPark.vue | 55 +----------------
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java | 5 +
admin/src/api/business/visitPark.js | 39 +++++++++++++
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformGroup.java | 4
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/BaseRequst.java | 1
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java | 5 +
8 files changed, 72 insertions(+), 71 deletions(-)
diff --git a/admin/src/api/business/visitPark.js b/admin/src/api/business/visitPark.js
new file mode 100644
index 0000000..c01b2f5
--- /dev/null
+++ b/admin/src/api/business/visitPark.js
@@ -0,0 +1,39 @@
+import request from '../../utils/request'
+
+// 鏌ヨ
+export function fetchList (data) {
+ return request.post('/visitsAdmin/cloudService/business/visitPark/page', data, {
+ trim: true
+ })
+}
+
+// 鍒涘缓
+export function create (data) {
+ return request.post('/visitsAdmin/cloudService/business/visitPark/create', data)
+}
+export function batchAuth (data) {
+ return request.post('/visitsAdmin/cloudService/business/visitPark/batchAuth', data)
+}
+
+// 淇敼
+export function updateById (data) {
+ return request.post('/visitsAdmin/cloudService/business/visitPark/updateById', data)
+}
+// 淇敼
+export function reUpdate (data) {
+ return request.post('/visitsAdmin/cloudService/business/visitPark/reUpdate', data)
+}
+
+// 鍒犻櫎
+export function deleteById (id) {
+ return request.get(`/visitsAdmin/cloudService/business/visitPark/delete/${id}`)
+}
+
+// 鎵归噺鍒犻櫎
+export function deleteByIdInBatch (ids) {
+ return request.get('/visitsAdmin/cloudService/business/visitPark/delete/batch', {
+ params: {
+ ids
+ }
+ })
+}
diff --git a/admin/src/views/vehicle/visitPark.vue b/admin/src/views/vehicle/visitPark.vue
index a9104e7..680b58c 100644
--- a/admin/src/views/vehicle/visitPark.vue
+++ b/admin/src/views/vehicle/visitPark.vue
@@ -1,18 +1,9 @@
<template>
- <TableLayout :permissions="['business:member:query']">
+ <TableLayout :permissions="['business:visitpark:query']">
<!-- 鎼滅储琛ㄥ崟 -->
<el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
<el-form-item title="杞︾墝鍙�" prop="carCode">
<el-input v-model="searchForm.carCode" placeholder="杞︾墝鍙�" @keypress.enter.native="search"></el-input>
- </el-form-item>
- <el-form-item title="杞︿富濮撳悕/鎵嬫満鍙�" prop="memberName">
- <el-input v-model="searchForm.memberName" placeholder="鍛樺伐濮撳悕/鎵嬫満鍙�" @keypress.enter.native="search"></el-input>
- </el-form-item>
- <el-form-item title="杞︿富缁勭粐" prop="companyName">
- <el-input v-model="searchForm.companyName" placeholder="杞︿富缁勭粐鍚嶇О" @keypress.enter.native="search"></el-input>
- </el-form-item>
- <el-form-item title="鍋滆溅搴撳悕绉�" prop="parksName">
- <el-input v-model="searchForm.parksName" placeholder="鍋滆溅搴撳悕绉�" @keypress.enter.native="search"></el-input>
</el-form-item>
<section>
<el-button type="primary" @click="search">鎼滅储</el-button>
@@ -21,10 +12,7 @@
</el-form>
<!-- 琛ㄦ牸鍜屽垎椤� -->
<template v-slot:table-wrap>
- <ul class="toolbar" v-permissions="['business:member:create', 'business:member:delete']">
-<!--
- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:cars:delete']">鍒犻櫎</el-button></li>
--->
+ <ul class="toolbar" v-permissions="['business:visitpark:create', 'business:visitpark:delete']">
</ul>
<el-table
v-loading="isWorking.search"
@@ -49,41 +37,18 @@
<div v-if="row.isdeleted==1" style="color: red">宸插垹闄�</div>
<div v-else style="color: green">
<span v-if="row.hkStatus==0" style="color: #435EBE">寰呬笅鍙�</span>
- <span v-if="row.hkStatus==1" style="color: green">涓嬪彂鎴愬姛</span>
- <span v-if="row.hkStatus==2" style="color: red">涓嬪彂澶辫触</span>
+ <span v-if="row.hkStatus==1" style="color: green">棰勭害鎴愬姛</span>
+ <span v-if="row.hkStatus==2" style="color: red">棰勭害澶辫触</span>
+ <span v-if="row.hkStatus==2" style="color: red">宸插彇娑�</span>
</div>
</template>
</el-table-column>
- <el-table-column label="鐢ㄦ埛绫诲瀷" min-width="100px">
- <template slot-scope="{row}">
- <span v-if="row.memberType === 0">鍔冲姟璁垮</span>
- <span v-if="row.memberType === 1">鏅�氳瀹�</span>
- <span v-if="row.memberType === 2">鍐呴儴浜哄憳</span>
- </template>
- </el-table-column>
- <el-table-column prop="memberName" label="濮撳悕" min-width="100px"></el-table-column>
- <el-table-column prop="memberPhone" label="鎵嬫満鍙�" min-width="100px"></el-table-column>
- <el-table-column prop="companyName" label="缁勭粐" min-width="100px"></el-table-column>
<el-table-column prop="remark" label="澶囨敞" min-width="100px">
<template slot-scope="{row}">
<span v-if="row.isdeleted !=2">{{row.remark}}</span>
</template>
</el-table-column>
<el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="140px"></el-table-column>
-<!-- <el-table-column-->
-<!-- v-if="containPermissions(['business:member:update', 'business:member:delete'])"-->
-<!-- label="鎿嶄綔"-->
-<!-- min-width="120"-->
-<!-- fixed="right"-->
-<!-- >-->
-<!-- <template slot-scope="{row}">-->
-<!--<!– <el-button type="text" @click="$refs.operaCarsWindow.open('缂栬緫杞﹁締淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:member:update']">缂栬緫</el-button>–>-->
-<!-- <el-button type="text" @click="deleteById(row)" v-if="row.isdeleted !=1" icon="el-icon-delete" v-permissions="['business:parkbook:delete']">鍒犻櫎</el-button>-->
-<!--<!–-->
-<!-- <el-button type="text" @click="reUpdate(row)" v-if="row.isdeleted !=1 && row.hkStatus ==0" icon="el-icon-edit" v-permissions="['business:parkbook:update']">绔嬪埢涓嬪彂</el-button>-->
-<!--–>-->
-<!-- </template>-->
-<!-- </el-table-column>-->
</el-table>
<pagination
@size-change="handleSizeChange"
@@ -103,9 +68,6 @@
import Pagination from '@/components/common/Pagination'
import OperaCarsWindow from '@/components/business/OperaCarsWindow'
import { validity } from '@/utils/util'
-import { sync } from '@/api/business/cars'
-import { batchLoss } from '@/api/business/memberCard'
-import {reUpdate} from "@/api/business/parkBook";
export default {
name: 'parkBook',
extends: BaseTable,
@@ -133,13 +95,6 @@
methods: {
validity (startTime, endTime) {
return validity(startTime, endTime)
- },
- reUpdate (row) {
- reUpdate({ id: row.id })
- .then(res => {
- this.$message.success('鎿嶄綔鎴愬姛')
- this.search()
- })
}
}
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/BaseRequst.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/BaseRequst.java
index 5a0877b..8b44f92 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/BaseRequst.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/BaseRequst.java
@@ -2,7 +2,6 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
-import org.springframework.beans.factory.annotation.Autowired;
@Data
public class BaseRequst<T> {
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformGroup.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformGroup.java
index a82275a..1eea899 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformGroup.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformGroup.java
@@ -49,8 +49,8 @@
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
@ExcelColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
private Integer isdeleted;
- @ApiModelProperty(value = "绫诲瀷 0瀹夋嘲鐗╂祦瑁呰揣 1瀹夋嘲鐗╂祦鍗歌揣 2甯傚叕鍙稿嵏璐�", example = "1")
- @ExcelColumn(name="绫诲瀷 0瀹夋嘲鐗╂祦瑁呰揣 1瀹夋嘲鐗╂祦鍗歌揣 2甯傚叕鍙稿嵏璐�")
+ @ApiModelProperty(value = "绫诲瀷 1瀹夋嘲鐗╂祦瑁呰揣 0瀹夋嘲鐗╂祦鍗歌揣 2甯傚叕鍙稿嵏璐�", example = "1")
+ @ExcelColumn(name="绫诲瀷 1瀹夋嘲鐗╂祦瑁呰揣 0瀹夋嘲鐗╂祦鍗歌揣 2甯傚叕鍙稿嵏璐�")
private Integer type;
@ApiModelProperty(value = "宸ヤ綔寮�濮嬫椂闂�")
@ExcelColumn(name="宸ヤ綔寮�濮嬫椂闂�")
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java
index 7f9fd75..a5be1ec 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java
@@ -263,13 +263,12 @@
Constants.PlatformJobStatus.EXCEPTION.getKey(),
Constants.PlatformJobStatus.OVER_NUMBER.getKey(),
Constants.PlatformJobStatus.TRANSFERING.getKey()
-
)
// .like(PlatformJob::getArriveDate,DateUtil.getCurrDate())
.orderByDesc(PlatformJob::getCreateDate)
);
for (Platform platform:allPlatformList) {
- PlatformWorkVO platformWorkVO = PlatformGroupServiceImpl.getPlatformWorkVO(platform.getId(),platformJobList);
+ PlatformWorkVO platformWorkVO = PlatformGroupServiceImpl.getPlatformWorkVO(platform,platformJobList);
platform.setPlatformWorkVO(platformWorkVO);
}
}
@@ -280,12 +279,12 @@
}
- public static PlatformWorkVO getPlatformWorkVO(Integer platformId,List<PlatformJob> platformJobList){
+ public static PlatformWorkVO getPlatformWorkVO(Platform platform,List<PlatformJob> platformJobList){
PlatformWorkVO platformWorkVO = new PlatformWorkVO();
if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformJobList)){
//鑾峰彇鏈堝彴涓嬬殑鎵�鏈変綔涓氭暟鎹�
- List<PlatformJob> platformJobs = platformJobList.stream().filter(i->Constants.equalsInteger(i.getPlatformId(),platformId)
- && !Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())).collect(Collectors.toList());
+ List<PlatformJob> platformJobs = platformJobList.stream().filter(i->Constants.equalsInteger(i.getPlatformId(),platform.getId()) || Constants.equalsInteger(i.getPlatformGroupId(),platform.getGroupId())
+ ).collect(Collectors.toList());
if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformJobs)){
platformWorkVO.setWorkNum(
platformJobs.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())).collect(Collectors.toList()).size()
@@ -294,16 +293,22 @@
platformJobs.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())).collect(Collectors.toList()).size()
);
platformWorkVO.setWaitNum(
- platformJobs.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.TRANSFERING.getKey())
+ platformJobs.stream().filter(i->
+ Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.TRANSFERING.getKey())
+ || Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())
).collect(Collectors.toList()).size()
+
- platformJobList.stream().filter(i->Constants.equalsInteger(platformId,i.getPlatformId())
- && Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.IN_WAIT.getKey())).collect(Collectors.toList()).size()
+ platformJobList.stream().filter(i->Constants.equalsInteger(platform.getId(),i.getPlatformId())
+ && (Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.IN_WAIT.getKey())
+ )
+ ).collect(Collectors.toList()).size()
);
platformWorkVO.setExceptionNum(
platformJobs.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.EXCEPTION.getKey())).collect(Collectors.toList()).size()
);
- platformWorkVO.setPlatformJobList(platformJobs);
+ platformWorkVO.setPlatformJobList(platformJobs.stream().filter(
+ i->Constants.equalsInteger(platform.getId(),i.getPlatformId()) && !Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())
+ ).collect(Collectors.toList()));
}
}
return platformWorkVO;
@@ -326,7 +331,6 @@
Constants.PlatformJobStatus.WAIT_CALL.getKey(),
Constants.PlatformJobStatus.IN_WAIT.getKey(),
Constants.PlatformJobStatus.CALLED.getKey()
-
)
)
);
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
index 771f5c1..7dcc323 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -257,8 +257,8 @@
.ge(pageWrap.getModel().getBeginWorkDateStart() != null, PlatformJob::getStartDate, Utils.Date.getStart(pageWrap.getModel().getBeginWorkDateStart()))
.le(pageWrap.getModel().getBeginWorkDateEnd() != null, PlatformJob::getStartDate, Utils.Date.getEnd(pageWrap.getModel().getBeginWorkDateEnd()))
- .ge(pageWrap.getModel().getCreateDateStart() != null, PlatformJob::getStartDate, Utils.Date.getStart(pageWrap.getModel().getCreateDateStart()))
- .le(pageWrap.getModel().getCreateDateEnd() != null, PlatformJob::getStartDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDateEnd()))
+ .ge(pageWrap.getModel().getCreateDateStart() != null, PlatformWmsJob::getIoCreatedate, Utils.Date.getStart(pageWrap.getModel().getCreateDateStart()))
+ .le(pageWrap.getModel().getCreateDateEnd() != null, PlatformWmsJob::getIoCreatedate, Utils.Date.getEnd(pageWrap.getModel().getCreateDateEnd()))
.eq(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ONE,pageWrap.getModel().getJobType()), PlatformJob::getType, Constants.platformJobType.sgscxh)
.ne(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ZERO,pageWrap.getModel().getJobType()), PlatformJob::getType, Constants.platformJobType.sgscxh)
;
@@ -677,7 +677,7 @@
.leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.eq(PlatformJob::getPlatformGroupId,platformGroup.getId())
- .ge(Objects.nonNull(platformJob),PlatformJob::getSignDate,DateUtil.dateTypeToString(platformJob.getSignDate(),"yyyy-MM-dd HH:mm:ss"))
+ .le(Objects.nonNull(platformJob),PlatformJob::getSignDate,DateUtil.dateTypeToString(platformJob.getSignDate(),"yyyy-MM-dd HH:mm:ss"))
.in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CALL.getKey(),
Constants.PlatformJobStatus.IN_WAIT.getKey(),
Constants.PlatformJobStatus.CALLED.getKey())
@@ -1400,7 +1400,9 @@
.selectAll(PlatformJob.class)
.selectAs(Platform::getName,PlatformJob::getPlatformName)
.selectAs(Platform::getWorkRate,PlatformJob::getWorkRate)
+ .selectAs(PlatformWmsJob::getCarrierName,PlatformJob::getCarrierName)
.leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
+ .leftJoin(PlatformWmsJob.class,PlatformWmsJob::getJobId,PlatformJob::getId)
.eq(PlatformJob::getPlatformId,platformId)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.in(PlatformJob::getStatus,
@@ -1420,7 +1422,7 @@
//鏌ヨ鍓嶆柟鎺掗槦鏁伴噺
this.queryWaitNum(platformJob);
}
- PlatformWorkVO platformWorkVO = PlatformGroupServiceImpl.getPlatformWorkVO(platformId,platformJobList);
+ PlatformWorkVO platformWorkVO = PlatformGroupServiceImpl.getPlatformWorkVO(platformJoinMapper.selectById(platformId),platformJobList);
return platformWorkVO;
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java
index b06acf9..f16a52d 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java
@@ -4,6 +4,7 @@
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.PlatformWmsDetailMapper;
import com.doumee.dao.business.PlatformWmsJobMapper;
@@ -86,12 +87,12 @@
@Override
public PlatformWmsJob findByDetailId(Integer id) {
- PlatformWmsJob platformWmsJob = platformWmsJobMapper.selectOne(new QueryWrapper<PlatformWmsJob>().lambda().eq(PlatformWmsJob::getJobId,id).last(" limit 1 "));
+ PlatformWmsJob platformWmsJob = platformWmsJobMapper.selectOne(new QueryWrapper<PlatformWmsJob>().lambda().eq(PlatformWmsJob::getIsdeleted, Constants.ZERO).eq(PlatformWmsJob::getJobId,id).last(" limit 1 "));
if(Objects.isNull(platformWmsJob)){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鏈煡璇㈠埌杩愬崟淇℃伅");
}
List<PlatformWmsDetail> platformWmsDetailList = platformWmsDetailMapper.selectList(new QueryWrapper<PlatformWmsDetail>()
- .lambda().eq(PlatformWmsDetail::getJobId,id));
+ .lambda().eq(PlatformWmsDetail::getJobId,id).eq(PlatformWmsDetail::getIsdeleted, Constants.ZERO));
if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformWmsDetailList)){
platformWmsJob.setIoQty(
platformWmsDetailList.stream().map(m->m.getIoQty()).reduce(BigDecimal.ZERO,BigDecimal::add)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java
index 4e15f11..fb0e58e 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java
@@ -317,7 +317,7 @@
}
PlatformGroup group = platformGroupMapper.selectOne(new QueryWrapper<PlatformGroup>().lambda()
.eq(PlatformGroup::getIsdeleted,Constants.ZERO)
- .eq(PlatformGroup::getType,type==0?Constants.ONE:Constants.ZERO)
+ .eq(PlatformGroup::getType,type==0?Constants.ZERO:Constants.ONE)
.last("limit 1") );//鏌ヨ鍗歌揣鏈堝彴缁勭紪鐮�
job.setPlatformGroupId(group!=null?group.getId():null);
Member driver = memberMapper.selectJoinOne(Member.class,new MPJLambdaWrapper<Member>()
@@ -332,7 +332,6 @@
job.setCompanyId(driver.getCompanyId());
job.setCompanyNamePath(driver.getCompanyNamePath());
}
-
platformJobMapper.insert(job);
}
@@ -390,12 +389,14 @@
job.setIocode(param.getIoCode());
job.setCarrierName(param.getCarrierName());
job.setPlateNumber(param.getPlateNumber());
+ job.setDriverName(param.getDriverName());
job.setType(Constants.ONE);
job.setIoCreatedate(param.getCreateDate());
job.setJobId(model.getId());
job.setRepertotyAddress(param.getRepertotyAddress());
job.setContractNum(param.getContractNum());
job.setDriverPhone(param.getDriverPhone());
+ job.setDriverName(param.getDriverName());
platformWmsJobMapper.insert(job);
jobList.add(model);
}
--
Gitblit v1.9.3