From d3830805113d4303dcc5aaad671b5167e9b2e188 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期日, 01 十二月 2024 22:26:44 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/funingyunwei
---
server/system_service/src/main/java/com/doumee/core/utils/Constants.java | 1
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwPatrolTaskRecordController.java | 15
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTaskRecord.java | 21
h5/pages/polling/detail.vue | 211 ++++++--
h5/pages/workOrder/edit.vue | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskRecordServiceImpl.java | 114 ++++
server/visits/dmvisit_admin/src/main/resources/bootstrap.yml | 2
h5/pages/operation/device.vue | 74 ++
h5/pages/polling/task.vue | 81 ++
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTask.java | 7
server/visits/admin_timer/src/main/resources/bootstrap-test.yml | 2
h5/api/yw.js | 50 ++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolPointServiceImpl.java | 5
h5/pages/workOrder/detail.vue | 2
h5/pages/polling/point.vue | 158 ++++--
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskServiceImpl.java | 19
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java | 21
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java | 4
h5/manifest.json | 2
server/system_timer/src/main/resources/bootstrap-test.yml | 2
server/system_gateway/src/main/resources/bootstrap.yml | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java | 45 +
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java | 62 +-
h5/pages/workOrder/list.vue | 325 ++++++++------
server/visits/dmvisit_admin/src/main/resources/bootstrap-test.yml | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRoom.java | 5
h5/pages/operation/record.vue | 25
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRevenue.java | 10
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java | 53 ++
h5/App.vue | 3
server/system_gateway/src/main/resources/bootstrap-test.yml | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwPatrolTaskRecordService.java | 5
server/system_gateway/src/main/resources/application.yml | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwDeviceRecordServiceImpl.java | 1
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java | 9
36 files changed, 961 insertions(+), 385 deletions(-)
diff --git a/h5/App.vue b/h5/App.vue
index 878bfe5..42fad1b 100644
--- a/h5/App.vue
+++ b/h5/App.vue
@@ -18,6 +18,9 @@
body{
font-size: 28rpx;
}
+.primaryColor {
+ color: $primaryColor !important;
+}
.flex-cb {
display: flex;
justify-content: space-between;
diff --git a/h5/api/yw.js b/h5/api/yw.js
index ff980d2..c04116f 100644
--- a/h5/api/yw.js
+++ b/h5/api/yw.js
@@ -70,4 +70,54 @@
url: 'visitsAdmin/cloudService/business/ywDeviceRecord/' + id,
method: 'get'
})
+}
+// 璁惧鍒楄〃
+export const ywDeviceCreate = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/ywDeviceRecord/create',
+ data
+ })
+}
+// 璁惧鍒楄〃
+export const ywDevicePost = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/ywDevice/page',
+ data
+ })
+}
+
+// 宸℃浠诲姟鍒楄〃
+export const ywPatrolTaskPost = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/ywPatrolTask/page',
+ data
+ })
+}
+// 宸℃鐐瑰垪琛�
+export const ywPatrolTaskRecord = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/ywPatrolTaskRecord/page',
+ data
+ })
+}
+// 宸℃浠诲姟璇︽儏
+export const ywPatrolDetail = (id) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/ywPatrolTask/' + id,
+ method: 'get'
+ })
+}
+// 宸℃浠诲姟璇︽儏
+export const ywPatrolPointDetail = (id) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/ywPatrolTaskRecord/' + id,
+ method: 'get'
+ })
+}
+// 宸℃鐐瑰贰妫�
+export const patrolData = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/ywPatrolTaskRecord/patrolData',
+ data
+ })
}
\ No newline at end of file
diff --git a/h5/manifest.json b/h5/manifest.json
index 952b225..52b48e9 100644
--- a/h5/manifest.json
+++ b/h5/manifest.json
@@ -129,7 +129,7 @@
"/gateway_interface" : {
// 杩欎釜瀛楁鍚嶉渶涓庝綘閰嶇疆鐨刡asePrefixUrl涓�鑷达紝绯荤粺璇嗗埆鍒板甫鏈�/dev-api璇锋眰鐨勫湴鍧�鏃讹紝浼氬湪鍓嶉潰鎷兼帴涓婁唬鐞嗘湇鍔″櫒鍦板潃
// "target" : "http://172.20.10.7:10010", // 浠g悊鏈嶅姟鍣ㄥ煙鍚嶆垨IP鍦板潃
- "target" : "http://192.168.0.108:10030", // 浠g悊鏈嶅姟鍣ㄥ煙鍚嶆垨IP鍦板潃
+ "target" : "http://192.168.0.162:10010", // 浠g悊鏈嶅姟鍣ㄥ煙鍚嶆垨IP鍦板潃
// "target" : "http://10.50.250.253:8088/gateway_interface", // 浠g悊鏈嶅姟鍣ㄥ煙鍚嶆垨IP鍦板潃
// "target" : "http://192.168.0.173/gateway_interface", // 浠g悊鏈嶅姟鍣ㄥ煙鍚嶆垨IP鍦板潃
"changeOrigin" : true, // 鍏佽璺ㄥ煙
diff --git a/h5/pages/operation/device.vue b/h5/pages/operation/device.vue
index 125001a..02c6b7d 100644
--- a/h5/pages/operation/device.vue
+++ b/h5/pages/operation/device.vue
@@ -5,7 +5,7 @@
<view class="la"><text class="red">*</text>閫夋嫨璁惧</view>
<view class="line">
<view class="sel_wrap" @click="showModal = true">
- <view class="left" :class="param.name ? '' : 'placeholder9'">{{ param.name ? param.name : '璇烽�夋嫨璁惧' }}</view>
+ <view class="left" :class="param.deviceName ? '' : 'placeholder9'">{{ param.deviceName ? param.deviceName : '璇烽�夋嫨璁惧' }}</view>
<u-icon name="arrow-right" color="#999999" size="17"></u-icon>
</view>
<image class="icon" src="@/static/side/scan.png" mode=""></image>
@@ -28,9 +28,9 @@
<u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon>
<view class="mt6">鍥剧墖/瑙嗛</view>
</view>
- <view class="upload_file" v-for="(item, i) in dealFileList" :key="i">
+ <view class="upload_file" v-for="(item, i) in fileList" :key="i">
<u-icon class="close" size="20" name="close-circle-fill" color="red"
- @click="fileDel('dealBeforeFileList', i)"></u-icon>
+ @click="fileDel('fileList', i)"></u-icon>
<image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
<video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
</view>
@@ -39,13 +39,11 @@
<view class="item">
<view class="la">杩愮淮澶囨敞</view>
<view class="line">
- <textarea v-model="param.checkInfo" placeholder="璇疯緭鍏�" placeholder-class="placeholder9" />
+ <textarea v-model="param.content" placeholder="璇疯緭鍏�" placeholder-class="placeholder9" />
</view>
</view>
</view>
- <view class="sub_btn">
- 鎻愪氦
- </view>
+ <view class="sub_btn" @click="onSubmit">鎻愪氦</view>
<!-- -->
<u-popup :show="showUpload" @close="showUpload = false" closeOnClickOverlay>
<view class="sel_upload_wrap">
@@ -62,14 +60,12 @@
<input v-model="searchValue" @confirm="getDevice()" type="text" placeholder="鎼滅储璁惧鍚嶇О/缂栧彿" placeholder-class="placeholder9" />
</view>
<view class="modal_list">
- <view class="item">
- <view class="name">璁惧name</view>
- <image src="@/static/radioed.png" mode=""></image>
+ <view class="item" v-for="item,i in deviceList" @click="deviceClick(item)">
+ <view class="name">{{ item.name }}</view>
+ <image v-if="activeDevice.id == item.id" src="@/static/radioed.png" mode=""></image>
</view>
</view>
- <view class="sub_btn">
- 纭畾閫夋嫨
- </view>
+ <view class="sub_btn" @click="handleDevice">纭畾閫夋嫨</view>
</view>
</u-popup>
</view>
@@ -77,7 +73,9 @@
<script>
import {
- uploadUrl
+ uploadUrl,
+ ywDevicePost,
+ ywDeviceCreate
} from '@/api'
import dayjs from 'dayjs';
export default {
@@ -86,16 +84,52 @@
param: {status: 0},
showUpload: false,
showModal: false,
- dealFileList: [],
+ fileList: [],
searchValue: '',
deviceList: [],
activeDevice: {}
};
},
+ onLoad() {
+ this.getDevice()
+ },
methods: {
- getDevice(){
+ onSubmit() {
+ const { param, fileList } = this
+ if(!param.deviceId) return this.showToast('璇峰厛閫夋嫨瑕佺淮鎶ょ殑璁惧')
+ ywDeviceCreate({
+ ...param,
+ userId: uni.getStorageSync('userInfo').id,
+ dealDate: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ multifileList: fileList
+ }).then(res => {
+ this.showToast('鎻愪氦鎴愬姛')
+ // uni.navigateBack()
+ })
+ },
+ getDevice(){
+ ywDevicePost({
+ capacity: 9999,
+ page: 1,
+ model: {
+ name: this.searchValue
+ }
+ }).then(res => {
+ this.deviceList = res.data.records || []
+ })
+ },
+ handleDevice() {
+ const { activeDevice } = this
+ if(!activeDevice.id) return this.showToast('璇峰厛閫夋嫨璁惧')
+ this.$set(this.param, 'deviceId', activeDevice.id)
+ this.$set(this.param, 'deviceName', activeDevice.name)
+ this.showModal = false
+ },
+ deviceClick(item) {
+ this.activeDevice = item
+ this.$forceUpdate()
},
statusChange(val){
this.param.status = val
@@ -125,7 +159,7 @@
files: imgs,
name: 'file',
formData: {
- folder: 'HIDDEN_DANGER_FILE'
+ folder: 'YW_DEVICE'
},
header: {
Dm_user_token: token
@@ -137,7 +171,7 @@
i.type = 0;
i.fileurl = i.imgaddr;
i.fileurlFull = i.url;
- this.submitFileList.push(i);
+ this.fileList.push(i);
});
}
},
@@ -171,7 +205,7 @@
},
name: 'file',
formData: {
- folder: 'HIDDEN_DANGER_FILE'
+ folder: 'YW_DEVICE'
},
success: uploadFileRes => {
let res = JSON.parse(uploadFileRes.data);
@@ -180,7 +214,7 @@
i.type = 1;
i.fileurl = i.imgaddr;
i.fileurlFull = i.url;
- this.submitFileList.push(i);
+ this.fileList.push(i);
});
}
},
diff --git a/h5/pages/operation/record.vue b/h5/pages/operation/record.vue
index aaa32ae..18c1025 100644
--- a/h5/pages/operation/record.vue
+++ b/h5/pages/operation/record.vue
@@ -3,11 +3,11 @@
<view class="head_wrap">
<view class="search_wrap">
<image class="mr12 search" src="@/static/home/ic_search@2x.png" mode="widthFix"></image>
- <input v-model="param.keyword" @confirm="getList()" type="text" placeholder="鎼滅储璁惧鍚嶇О/缂栧彿"
+ <input v-model="param.deviceName" @confirm="getList()" type="text" placeholder="鎼滅储璁惧鍚嶇О/缂栧彿"
placeholder-class="placeholder9" />
</view>
<view class="name_wrap" @click="handleMem">
- <view class="name">{{ param.realname ? param.realname : '杩愮淮浜�' }}</view>
+ <view class="name">{{ param.userName ? param.userName : '杩愮淮浜�' }}</view>
<u-icon :name="showModal ? 'arrow-right' : 'arrow-down'" color="#999999" size="12"></u-icon>
</view>
</view>
@@ -57,11 +57,20 @@
this.getpeo()
this.getList()
+ },
+ onReachBottom() {
+ const {total,list} = this
+ if (list.length < total) {
+ this.page = this.page + 1
+ this.getList()
+ } else {
+ this.showToast('鏆傛棤鏇村鏁版嵁')
+ }
},
mounted() {
this.$eventBus.$on('memberSel', (option) => {
- this.$set(this.param, 'realname', option.realname)
- this.$set(this.param, 'memberId', option.id)
+ this.$set(this.param, 'userName', option.realname)
+ this.$set(this.param, 'userId', option.id)
this.getList()
})
@@ -79,7 +88,7 @@
capacity: 10,
model: param
}).then(res => {
- this.list = res.data.records || []
+ this.list = [...this.list, ...res.data.records]
this.total = res.data.total
})
},
@@ -93,8 +102,10 @@
this.columns = [res.data]
})
},
- confirm() {
- this.showModal = false
+ confirm(e) {
+ console.log(e);
+ // this.showModal = false
+ // this.$set(this.param, 'userName', )
},
itemClick(item) {
uni.navigateTo({
diff --git a/h5/pages/polling/detail.vue b/h5/pages/polling/detail.vue
index e2415e9..4d986a3 100644
--- a/h5/pages/polling/detail.vue
+++ b/h5/pages/polling/detail.vue
@@ -1,59 +1,124 @@
<template>
<view class="main_app">
- <view class="head_bg"></view>
- <view class="info">
- <image v-if="true" class="icon" src="@/static/side/ic_dabiaoed.png" mode=""></image>
- <image v-else class="icon" src="@/static/side/ic_dabiao.png" mode=""></image>
+ <view v-if="info.status || info.status == 0" class="head_bg" :style="{
+ background: `linear-gradient(180deg, ${statusM[info.status].color} 0%, rgba(247, 247, 247, 0) 100%)`
+ }"></view>
+ <view class="info">
+ <image v-if="info.status == 2" class="icon" src="@/static/side/ic_dabiaoed.png" mode=""></image>
+ <image v-if="info.status == 3" class="icon" src="@/static/side/ic_dabiao.png" mode=""></image>
<view class="head">
- <view class="name">宸℃璁″垝</view>
- <view class="status">寰呭紑濮�</view>
+ <view class="name">{{ info.title }}</view>
+ <view class="status" v-if="info.status || info.status == 0" :style="{color: statusM[info.status].color}">{{statusM[info.status].name}}</view>
</view>
<view class="line">
<view class="la">浠诲姟鏃ユ湡锛�</view>
- <view class="val">2023-23-23</view>
+ <view class="val" v-if="info.startDate && info.endDate">{{ info.startDate.slice(0, 11) }} 鑷�
+ {{ info.endDate.slice(0, 11) }}</view>
</view>
<view class="line">
<view class="la">鎵ц鏃堕棿锛�</view>
- <view class="val">2023-23-23</view>
+ <view class="val" v-if="info.startDate && info.endDate">{{ info.startDate.slice(11,16) }} 鑷�
+ {{ info.endDate.slice(11, 16) }}</view>
</view>
<view class="line">
<view class="la">瀹屾垚鎯呭喌锛�</view>
- <view class="val">2023-23-23</view>
+ <view class="val">{{info.finishNum}}/{{info.patrolNum}}</view>
</view>
</view>
- <view class="title">宸℃鐐瑰垪琛�(1)</view>
+ <view class="title">宸℃鐐瑰垪琛�({{list.length}})</view>
<view class="list">
- <view class="item" v-for="i in 10" @click="itemClick()">
+ <view class="item" v-for="item in list" @click="itemClick(item)">
<view class="icon"></view>
<view class="content">
<view class="head">
- <view>宸℃鐐�10</view>
- <view class="status">寰呭贰妫�</view>
+ <view>{{item.pointName}}</view>
+ <view class="status" :class="{ gray: item.status == 1 }">{{ item.status == 1 ? '宸插贰妫�' : '寰呭贰妫�' }}</view>
</view>
- <view class="desc">宸℃鍐呭鏈�澶氬睍绀轰袱琛岋紝澶氱殑鐪佺暐宸℃鍐呭鏈�澶氬睍绀轰袱琛岋紝澶氱殑鐪佺暐宸℃鍐呭鏈�澶氬睍绀轰袱琛岋紝澶氱殑鐪佺暐宸℃鍐呭鏈�澶氬睍绀轰袱琛岋紝澶氱殑鐪佺暐宸℃鍐呭鏈�澶氬睍绀轰袱琛岋紝澶氱殑鐪佺暐宸℃鍐呭鏈�澶氬睍绀轰袱琛岋紝澶氱殑鐪佺暐
- </view>
+ <template v-if="item.status == 1">
+ <view class="line">
+ <view class="la">宸℃缁撴灉锛�</view>
+ <view class="val" :class="{ red: item.dealStatus == 1 }">{{ item.dealStatus == 0 ? '姝e父' : '寮傚父' }}</view>
+ </view>
+ <view class="line">
+ <view class="la">宸℃鏃堕棿锛�</view>
+ <view class="val">{{item.dealDate}}</view>
+ </view>
+ </template>
+ <view class="desc" v-else>{{item.content}}</view>
</view>
</view>
</view>
- <view class="footer">
- <view class="sub_btn">鎵爜宸℃</view>
+ <view class="footer">
+ <view class="sub_btn">鎵爜宸℃</view>
</view>
</view>
</template>
<script>
+ import {
+ ywPatrolDetail,
+ ywPatrolTaskRecord
+ } from '@/api'
export default {
data() {
return {
-
+ id: '',
+ info: {},
+ list: [],
+ statusM: [
+ { color: '#4593f7', name: '寰呭紑濮�' },
+ { color: '#73e09a', name: '杩涜涓�' },
+ { color: '#f1a93f', name: '宸茶秴鏈�' },
+ { color: '#b9b9b9', name: '宸插鐞�' },
+ ]
};
+ },
+ onLoad(option) {
+ this.id = option.id
+ this.getDetail()
},
- methods: {
- itemClick() {
- uni.navigateTo({
- url: '/pages/polling/point'
- })
- }
+ onShow() {
+ this.getDetail()
+ },
+ methods: {
+ itemClick(item) {
+ uni.navigateTo({
+ url: '/pages/polling/point?id=' + item.id
+ })
+ },
+ getDetail() {
+ const {
+ id
+ } = this
+ ywPatrolDetail(id).then(res => {
+ this.info = res.data
+ })
+ ywPatrolTaskRecord({
+ capacity: 999,
+ page: 1,
+ model: {
+ taskId: id
+ }
+ }).then(res => {
+ this.list = res.data.records
+ })
+ },
+ async startScan() {
+ try {
+ const video = document.getElementById('video');
+ const stream = await navigator.mediaDevices.getUserMedia({ video: { facingMode: "environment" } });
+ video.srcObject = stream;
+
+ // 浣跨敤 QrScanner 瑙f瀽
+ const qrScanner = new QrScanner(video, result => {
+ alert(`鎵弿缁撴灉: ${result}`);
+ qrScanner.stop(); // 鍋滄鎵爜
+ });
+ qrScanner.start();
+ } catch (err) {
+ console.error('鎵撳紑鎽勫儚澶村け璐�:', err);
+ }
+ }
}
}
</script>
@@ -67,7 +132,7 @@
padding: 30rpx;
.head_bg {
- background: linear-gradient(180deg, #008BFF 0%, rgba(247, 247, 247, 0) 100%);
+ // background: linear-gradient(180deg, #008BFF 0%, rgba(247, 247, 247, 0) 100%);
height: 240rpx;
width: 750rpx;
position: absolute;
@@ -83,14 +148,16 @@
padding: 30rpx 30rpx 10rpx;
margin-bottom: 40rpx;
background: linear-gradient(#FFFFFF 0%, #FFFFFF 48%, #F0F5FF 100%);
- position: relative;
- .icon{
- position: absolute;
- right: 30rpx;
- bottom: 30rpx;
- width: 160rpx;
- height: 122rpx;
+ position: relative;
+
+ .icon {
+ position: absolute;
+ right: 30rpx;
+ bottom: 30rpx;
+ width: 160rpx;
+ height: 122rpx;
}
+
.head {
display: flex;
justify-content: space-between;
@@ -103,17 +170,12 @@
.status {
color: $primaryColor;
+ }
+ .gray{
+ color: gray;
}
}
- .line {
- display: flex;
- margin-bottom: 20rpx;
-
- .la {
- color: #666666;
- }
- }
}
.title {
@@ -123,9 +185,19 @@
margin-bottom: 30rpx;
}
- .list {
- height: calc( 100vh - 720rpx ) ;
+ .line {
+ display: flex;
+ margin-bottom: 20rpx;
+
+ .la {
+ color: #666666;
+ }
+ }
+
+ .list {
+ height: calc(100vh - 720rpx);
overflow: auto;
+
.item {
width: 690rpx;
height: 188rpx;
@@ -136,7 +208,9 @@
display: flex;
padding: 20rpx 30rpx 0 16rpx;
margin-bottom: 20rpx;
-
+ .line{
+ margin-bottom: 10rpx;
+ }
.icon {
width: 10rpx;
height: 148rpx;
@@ -160,6 +234,9 @@
offset-anchor: 28rpx;
color: $primaryColor;
font-weight: 400;
+ }
+ .gray{
+ color: #999999;
}
}
@@ -176,29 +253,31 @@
}
}
}
- .footer{
- position: fixed;
- bottom: 0rpx;
- left: 0rpx;
- width: 750rpx;
- height: 172rpx;
- background-color: #fff;
- padding: 20rpx 40rpx;
- .sub_btn {
-
- width: 670rpx;
- height: 88rpx;
- background: $primaryColor;
- box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 104, 255, 0.3);
- border-radius: 44rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-weight: 500;
- font-size: 32rpx;
- color: #FFFFFF;
- }
+
+ .footer {
+ position: fixed;
+ bottom: 0rpx;
+ left: 0rpx;
+ width: 750rpx;
+ height: 172rpx;
+ background-color: #fff;
+ padding: 20rpx 40rpx;
+
+ .sub_btn {
+
+ width: 670rpx;
+ height: 88rpx;
+ background: $primaryColor;
+ box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 104, 255, 0.3);
+ border-radius: 44rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #FFFFFF;
+ }
}
-
+
}
</style>
\ No newline at end of file
diff --git a/h5/pages/polling/point.vue b/h5/pages/polling/point.vue
index 6a97c8a..1df5fef 100644
--- a/h5/pages/polling/point.vue
+++ b/h5/pages/polling/point.vue
@@ -2,45 +2,51 @@
<view class="main_app">
<view class="info">
<view class="head">
- <view class="">宸℃鐐�</view>
- <view class="status">宸插贰妫�</view>
+ <view class="">{{ info.pointName }}</view>
+ <view class="status" :class="{primaryColor: info.status == 0}">{{ info.status == 1 ? '宸插贰妫�' : '寰呭贰妫�' }}</view>
</view>
- <template v-if="false">
+ <template v-if="info.status == 1">
<view class="line">
<div class="la">宸℃缁撴灉锛�</div>
- <div class="val">姝e父</div>
+ <div class="val primaryColor" :class="{red: info.dealStatus == 1}">{{ info.dealStatus == 0 ? '姝e父' : '寮傚父' }}</div>
</view>
<view class="line">
<div class="la">宸℃鏃堕棿锛�</div>
- <div class="val">2022</div>
+ <div class="val">{{ info.dealDate }}</div>
</view>
</template>
<template v-else>
<view class="desc">
- 宸℃鍐呭
+ {{ info.content }}
</view>
</template>
</view>
<!-- -->
- <view v-if="false" class="content">
- <view class="title">宸℃璁板綍</view>
- <view class="desc">宸茬粡鏇存崲鐏场</view>
+ <view v-if="info.status == 1" class="content">
+ <view class="title">宸℃璁板綍</view>
+ <view class="files">
+ <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in info.multifileList" :key="i">
+ <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
+ <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
+ </view>
+ </view>
+ <view class="desc">{{ info.dealInfo }}</view>
<view class="line line_s">
<view class="la">宸℃浜猴細</view>
- <view class="val">xxx</view>
+ <view class="val">{{ info.realname }}</view>
</view>
<view class="line line_s">
<view class="la">宸℃鏃堕棿锛�</view>
- <view class="val">xxx</view>
+ <view class="val">{{ info.dealDate }}</view>
</view>
</view>
<view v-else class="content">
<view class="title">宸℃澶勭悊</view>
<view class="appr_modal">
<view class="df_sb">
- <view>澶勭悊鏃堕棿</view>
- <view class="df_ac" @click="isShowHandleDate = true" v-if="handleParam.dealTime">
- {{ handleParam.dealTime }}
+ <view><text class="red">*</text>澶勭悊鏃堕棿</view>
+ <view class="df_ac" @click="isShowHandleDate = true" v-if="handleParam.dealDate">
+ {{ handleParam.dealDate }}
<u-icon name="arrow-right"></u-icon>
</view>
<view @click="isShowHandleDate = true" v-else class="placeholder9 df_ac">
@@ -50,7 +56,6 @@
</view>
<view class="label">
- <text>*</text>
涓婁紶鍥剧墖/瑙嗛
</view>
<view class="upload_wrap">
@@ -58,19 +63,19 @@
<u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon>
<view class="mt6">鍥剧墖/瑙嗛</view>
</view>
- <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in dealFileList" :key="i">
+ <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in fileList" :key="i">
<u-icon class="close" size="20" name="close-circle-fill" color="red"
- @click="fileDel('dealBeforeFileList', i)"></u-icon>
+ @click="fileDel('fileList', i)"></u-icon>
<image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
<video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
</view>
</view>
<view class="label">澶勭悊璇存槑</view>
- <textarea v-model="handleParam.checkInfo" placeholder="璇峰~鍐欏鐞嗚鏄�" placeholder-class="placeholder9" />
+ <textarea v-model="handleParam.dealInfo" placeholder="璇峰~鍐欏鐞嗚鏄�" placeholder-class="placeholder9" />
</view>
</view>
- <view class="sub_btn">纭宸℃</view>
+ <view class="sub_btn" @click="onSubmit">纭宸℃</view>
<!-- -->
<u-popup :show="showUpload" @close="showUpload = false" closeOnClickOverlay>
<view class="sel_upload_wrap">
@@ -86,22 +91,47 @@
<script>
import {
- uploadUrl
+ uploadUrl,
+ ywPatrolPointDetail,
+ patrolData
} from '@/api'
import dayjs from 'dayjs';
export default {
data() {
- return {
+ return {
+ id: '',
+ info: {},
showUpload: false,
isShowHandle: false,
isShowHandleDate: false,
- handleParam: {},
- dealFileList: []
+ handleParam: {
+ dealStatus: 1
+ },
+ fileList: []
};
+ },
+ onLoad(option) {
+ this.id = option.id
+ this.getDetail()
+ this.$set(this.handleParam, 'dealDate', dayjs().format('YYYY-MM-DD HH:mm:ss'))
},
methods: {
- onSubmit() {
-
+ onSubmit() {
+ const { handleParam, fileList, id } = this
+ patrolData({
+ ...handleParam,
+ multifileList: fileList,
+ id,
+ }).then(res => {
+ this.showToast('鎿嶄綔鎴愬姛')
+ uni.navigateBack()
+ })
+ },
+ getDetail(){
+ const { id } = this
+ ywPatrolPointDetail(id).then(res => {
+ this.info = res.data
+ })
},
callPhone() {
uni.makePhoneCall({
@@ -109,7 +139,7 @@
});
},
confirmHandleDate(e) {
- this.$set(this.handleParam, 'dealTime', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'));
+ this.$set(this.handleParam, 'dealDate', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'));
this.isShowHandleDate = false;
},
fileDel(str, i) {
@@ -137,7 +167,7 @@
files: imgs,
name: 'file',
formData: {
- folder: 'HIDDEN_DANGER_FILE'
+ folder: 'YW_PATROL'
},
header: {
Dm_user_token: token
@@ -149,7 +179,7 @@
i.type = 0;
i.fileurl = i.imgaddr;
i.fileurlFull = i.url;
- this.submitFileList.push(i);
+ this.fileList.push(i);
});
}
},
@@ -183,7 +213,7 @@
},
name: 'file',
formData: {
- folder: 'HIDDEN_DANGER_FILE'
+ folder: 'YW_PATROL'
},
success: uploadFileRes => {
let res = JSON.parse(uploadFileRes.data);
@@ -192,7 +222,7 @@
i.type = 1;
i.fileurl = i.imgaddr;
i.fileurlFull = i.url;
- this.submitFileList.push(i);
+ this.fileList.push(i);
});
}
},
@@ -342,37 +372,41 @@
margin-bottom: 30rpx;
}
- .adduser_list_item_ipt1_upload {
- margin-top: 24rpx;
- width: 156rpx;
- height: 156rpx;
- margin-right: 24rpx;
- border: 2rpx solid #e5e5e5;
- background: #f7f7f7;
- color: #666666;
- font-size: 22rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- position: relative;
-
- .close {
- position: absolute;
- right: -20rpx;
- top: -20rpx;
- z-index: 9999;
- }
-
- image {
- width: 100%;
- height: 100%;
- }
-
- video {
- width: 100%;
- height: 100%;
- }
- }
+ }
+ .files{
+ display: flex;
+ margin-bottom: 20rpx;
+ }
+ .adduser_list_item_ipt1_upload {
+ margin-top: 24rpx;
+ width: 156rpx;
+ height: 156rpx;
+ margin-right: 24rpx;
+ border: 2rpx solid #e5e5e5;
+ background: #f7f7f7;
+ color: #666666;
+ font-size: 22rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ position: relative;
+
+ .close {
+ position: absolute;
+ right: -20rpx;
+ top: -20rpx;
+ z-index: 9999;
+ }
+
+ image {
+ width: 100%;
+ height: 100%;
+ }
+
+ video {
+ width: 100%;
+ height: 100%;
+ }
}
</style>
\ No newline at end of file
diff --git a/h5/pages/polling/task.vue b/h5/pages/polling/task.vue
index 17f1208..ee37c83 100644
--- a/h5/pages/polling/task.vue
+++ b/h5/pages/polling/task.vue
@@ -8,11 +8,11 @@
</view> -->
<!-- -->
<view class="tabs">
- <view class="tab" :class="{active: activeTab == 0}" @click="tabsClick(0)">
+ <view class="tab" :class="{active: param.status == 0}" @click="tabsClick(0)">
<text>寰呭鐞�</text>
<text class="border"></text>
</view>
- <view class="tab" :class="{active: activeTab == 1}" @click="tabsClick(1)">
+ <view class="tab" :class="{active: param.status == 3}" @click="tabsClick(3)">
<text>宸插鐞�</text>
<text class="border"></text>
</view>
@@ -27,18 +27,22 @@
</view>
<!-- -->
<view class="list">
- <view class="item" v-for="item in 10" @click="itemClick(item)">
- <image v-if="item.stats == 1" src="@/static/side/xunjianed.png" class="icon"></image>
+ <view class="item" v-for="item in list" @click="itemClick(item)">
+ <image v-if="item.status == 0 || item.status == 1" src="@/static/side/xunjianed.png" class="icon"></image>
<image v-else src="@/static/side/xunjian.png" class="icon"></image>
<view class="content">
<view class="name_wrap line">
- <view class="name">宸℃閰掑晩</view>
- <view class="status">寰呭紑濮�</view>
+ <view class="name">{{item.planTitle}}</view>
+ <view class="status" :class="{
+ green: item.status == 1,
+ red: item.status == 2,
+ gray: item.status == 3 || item.status == 4
+ }">{{statusM[item.status]}}</view>
</view>
- <view class="line">浠诲姟鏃ユ湡锛歺xx</view>
- <view class="line">鎵ц鏃堕棿锛�121212</view>
+ <view class="line" v-if="item.startDate && item.endDate">浠诲姟鏃ユ湡锛歿{ item.startDate.slice(0, 11) }} 鑷� {{ item.endDate.slice(0, 11) }}</view>
+ <view class="line">鎵ц鏃堕棿锛歿{ item.startDate.slice(11, 16) }} - {{ item.endDate.slice(11, 16) }}</view>
<view class="line">
- <view>瀹屾垚鎯呭喌锛�121212</view>
+ <view>瀹屾垚鎯呭喌锛歿{item.finishNum}}/{{item.patrolNum}}</view>
<view class="btn">
<image src="@/static/side/ic_saoma@2x.png" class="saoma" mode=""></image>
<view>鎵爜宸℃</view>
@@ -51,29 +55,68 @@
</view>
</template>
-<script>
+<script>
+ import { ywPatrolTaskPost } from '@/api'
export default {
data() {
return {
- param: {},
+ param: {
+ status: 0
+ },
+ list: [],
activeTab: 0,
- selectAll: false
+ selectAll: false,
+ page: 1,
+
+ statusM: {
+ 0: '寰呭紑濮�',
+ 1: '杩涜涓�',
+ 2: '宸茶秴鏈�',
+ 3: '宸插畬鎴�',
+ 4: '宸插彇娑�',
+ }
};
+ },
+ onLoad() {
+ this.getList()
+ },
+ onReachBottom() {
+ const {total,list} = this
+ if (list.length < total) {
+ this.page = this.page + 1
+ this.getList()
+ } else {
+ this.showToast('鏆傛棤鏇村鏁版嵁')
+ }
},
methods: {
tabsClick(val) {
- this.activeTab = val
+ this.param.status = val
+ this.page = 1
+ this.list = []
+ this.getList()
},
allClick() {
this.selectAll = !this.selectAll
+ this.list = []
+ this.page = 1
+ this.getList()
},
- itemClick() {
+ itemClick(item) {
uni.navigateTo({
- url: '/pages/polling/detail'
+ url: '/pages/polling/detail?id=' + item.id
})
},
getList() {
- console.log('---');
+ const { page, param, selectAll } = this
+ ywPatrolTaskPost({
+ model: {...param, dispatchUserId: selectAll ? '' : uni.getStorageSync('userInfo').id, },
+ page,
+ capacity: 10
+ }).then(res => {
+ this.list = [...this.list, ...res.data.records]
+ this.total = res.data.total
+ })
}
}
}
@@ -206,6 +249,12 @@
.status{
color: $primaryColor;
}
+ .green{
+ color: #0ADE79;
+ }
+ .gray{
+ color: #999999;
+ }
}
}
}
diff --git a/h5/pages/workOrder/detail.vue b/h5/pages/workOrder/detail.vue
index a3bf40d..5d31a6c 100644
--- a/h5/pages/workOrder/detail.vue
+++ b/h5/pages/workOrder/detail.vue
@@ -100,7 +100,7 @@
</view>
<view class="adduser_list_item_ipt1_upload" v-for="(item, i) in dealFileList" :key="i">
<u-icon class="close" size="20" name="close-circle-fill" color="red"
- @click="fileDel('dealBeforeFileList', i)"></u-icon>
+ @click="fileDel('dealFileList', i)"></u-icon>
<image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
<video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
</view>
diff --git a/h5/pages/workOrder/edit.vue b/h5/pages/workOrder/edit.vue
index add269c..2fde8da 100644
--- a/h5/pages/workOrder/edit.vue
+++ b/h5/pages/workOrder/edit.vue
@@ -38,7 +38,7 @@
</view>
<view class="upload_file" v-for="(item, i) in fileList" :key="i">
<u-icon class="close" size="20" name="close-circle-fill" color="red"
- @click="fileDel('dealBeforeFileList', i)"></u-icon>
+ @click="fileDel('fileList', i)"></u-icon>
<image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
<video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
</view>
diff --git a/h5/pages/workOrder/list.vue b/h5/pages/workOrder/list.vue
index 6a87955..9189109 100644
--- a/h5/pages/workOrder/list.vue
+++ b/h5/pages/workOrder/list.vue
@@ -3,43 +3,44 @@
<view class="head_wrap">
<view class="search_wrap">
<image class="mr12 search" src="@/static/home/ic_search@2x.png" mode="widthFix"></image>
- <input v-model="param.keyword" @confirm="getList()" type="text" placeholder="鎼滅储妤煎畤/鎴块棿鍚嶇О" placeholder-class="placeholder9" />
+ <input v-model="param.roomName" @confirm="handleQuery" type="text" placeholder="鎼滅储妤煎畤/鎴块棿鍚嶇О"
+ placeholder-class="placeholder9" />
</view>
- </view>
- <!-- -->
- <view class="tabs">
- <view class="tab" :class="{active: activeTab == -1}" @click="tabsClick(-1)">
- <text>寰呭鐞�</text>
- <text class="border"></text>
- </view>
- <view class="tab" :class="{active: activeTab == 2}" @click="tabsClick(2)">
- <text>宸插鐞�</text>
- <text class="border"></text>
- </view>
- <view class="tab" @click="allClick">
- <view class="name">
- <image v-if="selectAll" class="icon" src="@/static/checked.png" mode=""></image>
- <image v-else class="icon" src="@/static/check.png" mode=""></image>
- <text>鏌ョ湅鍏ㄩ儴</text>
- </view>
- <text class="border"></text>
- </view>
+ </view>
+ <!-- -->
+ <view class="tabs">
+ <view class="tab" :class="{active: activeTab == -1}" @click="tabsClick(-1)">
+ <text>寰呭鐞�</text>
+ <text class="border"></text>
+ </view>
+ <view class="tab" :class="{active: activeTab == 2}" @click="tabsClick(2)">
+ <text>宸插鐞�</text>
+ <text class="border"></text>
+ </view>
+ <view class="tab" @click="allClick">
+ <view class="name">
+ <image v-if="selectAll" class="icon" src="@/static/checked.png" mode=""></image>
+ <image v-else class="icon" src="@/static/check.png" mode=""></image>
+ <text>鏌ョ湅鍏ㄩ儴</text>
+ </view>
+ <text class="border"></text>
+ </view>
</view>
<!-- -->
<view class="list">
<view class="item" v-for="item in list" @click="itemClick(item)">
- <image v-if="item.stats == 1" src="@/static/side/workordered.png" class="icon"></image>
+ <image v-if="item.dealStatus == 0" src="@/static/side/workordered.png" class="icon"></image>
<image v-else src="@/static/side/workorder.png" class="icon"></image>
<view class="content">
<view class="name_wrap line">
- <view class="name">{{item.buildingName}}/{{item.roomNum}}</view>
- <view class="status gray" v-if="item.dealStatus == 2">宸插鐞�</view>
- <view class="status" v-if="item.dealStatus == 0">寰呭鐞�</view>
+ <view class="name">{{item.buildingName}}/{{item.roomNum || item.floorName}}</view>
+ <view class="status gray" v-if="item.dealStatus == 2">宸插鐞�</view>
+ <view class="status" v-if="item.dealStatus == 0">寰呭鐞�</view>
<view class="status" v-if="item.dealStatus == 1">寰呭鐞�</view>
</view>
- <view class="line">浣嶇疆绫诲瀷锛歿{item.areaType == '0' ? '瀹ゅ唴瑁呬慨' : '鍏叡鍖哄煙'}}</view>
- <view class="line">宸ュ崟鍒嗙被锛歿{item.categoryName}}</view>
- <view class="line">涓婃姤鏃堕棿锛歿{item.createDate}}</view>
+ <view class="line">浣嶇疆绫诲瀷锛歿{item.areaType == '0' ? '瀹ゅ唴瑁呬慨' : '鍏叡鍖哄煙'}}</view>
+ <view class="line">宸ュ崟鍒嗙被锛歿{item.categoryName}}</view>
+ <view class="line">涓婃姤鏃堕棿锛歿{item.createDate}}</view>
<view class="line">涓婇棬鏃堕棿锛歿{item.getDate}}</view>
</view>
</view>
@@ -48,101 +49,136 @@
</view>
</template>
-<script>
- import { ywWorkorder } from '@/api'
+<script>
+ import {
+ ywWorkorder
+ } from '@/api'
export default {
data() {
return {
- param: {},
- activeTab: -1,
- selectAll: false,
-
- list: [],
- total: 0,
+ param: {},
+ activeTab: -1,
+ selectAll: false,
+
+ list: [],
+ total: 0,
page: 1,
};
- },
- onShow() {
- this.getList()
- },
- onReachBottom() {
-
+ },
+ onShow() {
+ this.getList()
+ },
+ onReachBottom() {
+ const {total,list} = this
+ if (list.length < total) {
+ this.page = this.page + 1
+ this.getList()
+ } else {
+ this.showToast('鏆傛棤鏇村鏁版嵁')
+ }
},
methods: {
- tabsClick(val) {
- this.activeTab = val
+ tabsClick(val) {
+ this.activeTab = val
+ this.list = []
+ this.page = 1
+ this, getList()
+ },
+ allClick() {
+ this.selectAll = !this.selectAll
+ this.list = []
+ this.page = 1
+ this.getList()
+ },
+ itemClick(item) {
+ uni.navigateTo({
+ url: `/pages/workOrder/detail?id=${item.id}`
+ })
+ },
+ handleQuery() {
this.list = []
this.page = 1
- this,getList()
- },
- allClick() {
- this.selectAll = !this.selectAll
- },
- itemClick(item) {
- uni.navigateTo({
- url: `/pages/workOrder/detail?id=${item.id}`
- })
- },
- getList() {
- const { page, total, list, activeTab } = this
- ywWorkorder({
- page,
- capacity: 10,
- model: { }
- }).then(res => {
- this.list = res.data.records || []
- })
+ this.getList()
+ },
+ getList() {
+ const {
+ page,
+ total,
+ list,
+ activeTab,
+ param,
+ selectAll
+ } = this
+ ywWorkorder({
+ page,
+ capacity: 10,
+ model: {
+ ...param,
+ dispatchUserId: selectAll ? '' : uni.getStorageSync('userInfo').id,
+ }
+ }).then(res => {
+ this.list = [...this.list, ...res.data.records]
+ this.total = res.data.total
+ })
}
}
}
</script>
-<style lang="scss" scoped>
- .main_app{
- padding: 0 30rpx;
- }
- .tabs{
- display: flex;
- width: 750rpx;
- margin: 12rpx -30rpx 0;
- border-bottom: 1rpx solid #E5E5E5;
- .tab{
- font-size: 30rpx;
- color: #666666;
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: flex-end;
- height: 88rpx;
- .name{
- display: flex;
- align-items: center;
- }
- .icon{
- width: 28rpx;
- height: 28rpx;
- margin-right: 10rpx;
- }
- .border{
- width: 54rpx;
- height: 6rpx;
- background-color: #fff;
- border-radius: 3rpx;
- margin-top: 24rpx;
- }
- }
- .active{
- font-weight: 600;
- font-size: 32rpx;
- color: #222222;
- .border{
- background-color: $primaryColor;
- }
-
- }
-
+<style lang="scss" scoped>
+ .main_app {
+ padding: 0 30rpx;
}
+
+ .tabs {
+ display: flex;
+ width: 750rpx;
+ margin: 12rpx -30rpx 0;
+ border-bottom: 1rpx solid #E5E5E5;
+
+ .tab {
+ font-size: 30rpx;
+ color: #666666;
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: flex-end;
+ height: 88rpx;
+
+ .name {
+ display: flex;
+ align-items: center;
+ }
+
+ .icon {
+ width: 28rpx;
+ height: 28rpx;
+ margin-right: 10rpx;
+ }
+
+ .border {
+ width: 54rpx;
+ height: 6rpx;
+ background-color: #fff;
+ border-radius: 3rpx;
+ margin-top: 24rpx;
+ }
+ }
+
+ .active {
+ font-weight: 600;
+ font-size: 32rpx;
+ color: #222222;
+
+ .border {
+ background-color: $primaryColor;
+ }
+
+ }
+
+ }
+
.head_wrap {
display: flex;
align-items: center;
@@ -155,9 +191,11 @@
background: #F7F7F7;
border-radius: 38rpx;
padding-left: 30rpx;
- input{
- flex: 1;
+
+ input {
+ flex: 1;
}
+
.search {
width: 28rpx;
height: 28rpx;
@@ -169,44 +207,51 @@
.list {
.item {
display: flex;
- // height: 290rpx;
- padding: 30rpx 0;
+ // height: 290rpx;
+ padding: 30rpx 0;
border-bottom: 2rpx solid #E5E5E5;
+
.icon {
width: 80rpx;
- height: 80rpx;
+ height: 80rpx;
margin-right: 24rpx;
}
.content {
- flex: 1;
- color: #666666;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .line{
- margin-bottom: 20rpx;
- &:nth-last-child(1){
- margin-bottom: 0;
- }
- }
- .name_wrap{
- display: flex;
- justify-content: space-between;
- align-items: center;
- .name{
- display: flex;
- align-items: flex-end;
- font-weight: 600;
- font-size: 34rpx;
- color: #222222;
- }
- .status{
- color: $primaryColor;
- }
- .gray{
- color: #999999;
- }
+ flex: 1;
+ color: #666666;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+
+ .line {
+ margin-bottom: 20rpx;
+
+ &:nth-last-child(1) {
+ margin-bottom: 0;
+ }
+ }
+
+ .name_wrap {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ .name {
+ display: flex;
+ align-items: flex-end;
+ font-weight: 600;
+ font-size: 34rpx;
+ color: #222222;
+ }
+
+ .status {
+ color: $primaryColor;
+ }
+
+ .gray {
+ color: #999999;
+ }
}
}
}
diff --git a/server/system_gateway/src/main/resources/application.yml b/server/system_gateway/src/main/resources/application.yml
index 55950cd..0a4b1bc 100644
--- a/server/system_gateway/src/main/resources/application.yml
+++ b/server/system_gateway/src/main/resources/application.yml
@@ -82,7 +82,7 @@
compression:
enabled: true
mime-types: application/json
- port: 10030
+ port: 8080
tomcat:
max-swallow-size: -1
diff --git a/server/system_gateway/src/main/resources/bootstrap-test.yml b/server/system_gateway/src/main/resources/bootstrap-test.yml
index 409373d..351bfe7 100644
--- a/server/system_gateway/src/main/resources/bootstrap-test.yml
+++ b/server/system_gateway/src/main/resources/bootstrap-test.yml
@@ -6,7 +6,7 @@
password: nacos
discovery:
server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
- namespace: dmvisit_test
+ namespace: funing_test
# namespace: dev_renkang
username: nacos
password: nacos
diff --git a/server/system_gateway/src/main/resources/bootstrap.yml b/server/system_gateway/src/main/resources/bootstrap.yml
index 8ecd0a5..bb432df 100644
--- a/server/system_gateway/src/main/resources/bootstrap.yml
+++ b/server/system_gateway/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
profiles:
- active: dev
+ active: test
application:
name: system_gateway
# 瀹夊叏閰嶇疆
diff --git a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
index fcabf72..56af6c6 100644
--- a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -1296,6 +1296,7 @@
FN_CONTRACT_BILL_FILE(8, "鍚堝悓璐﹀崟闄勪欢 ", "鍚堝悓璐﹀崟闄勪欢 "),
YW_CONTRACT_FILE(9, "鍚堝悓闄勪欢 ", "鍚堝悓闄勪欢 "),
FN_CONTRACT_REVENUE_FILE(10, "鏀舵敮娴佹按闄勪欢 ", "鍚堝悓璐﹀崟闄勪欢 "),
+ FN_PATROL_TASK_RECORD_FILE(11, "宸℃浠诲姟鐐瑰鐞嗛檮浠� ", "宸℃浠诲姟鐐瑰鐞嗛檮浠� "),
;
// 鎴愬憳鍙橀噺
diff --git a/server/system_timer/src/main/resources/bootstrap-test.yml b/server/system_timer/src/main/resources/bootstrap-test.yml
index 6a95c65..13e1c1c 100644
--- a/server/system_timer/src/main/resources/bootstrap-test.yml
+++ b/server/system_timer/src/main/resources/bootstrap-test.yml
@@ -23,6 +23,6 @@
# data-id: com.doumee.meeting.admin
discovery:
server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
- namespace: dmvisit_test
+ namespace: funing_test
username: nacos
password: nacos
\ No newline at end of file
diff --git a/server/visits/admin_timer/src/main/resources/bootstrap-test.yml b/server/visits/admin_timer/src/main/resources/bootstrap-test.yml
index f84b8c1..dd58dce 100644
--- a/server/visits/admin_timer/src/main/resources/bootstrap-test.yml
+++ b/server/visits/admin_timer/src/main/resources/bootstrap-test.yml
@@ -23,6 +23,6 @@
# data-id: com.doumee.meeting.admin
discovery:
server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
- namespace: dmvisit_test
+ namespace: funing_test
username: nacos
password: nacos
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java
index 57d7c63..0ee45de 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java
@@ -2,6 +2,7 @@
import com.doumee.api.BaseController;
import com.doumee.config.annotation.CloudRequiredPermission;
+import com.doumee.config.annotation.LoginNoRequired;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
@@ -78,6 +79,15 @@
return ApiResponse.success(ywContractBillService.findPage(pageWrap));
}
+ @ApiOperation("鍙��娆捐处鍗�")
+ @PostMapping("/getCanBackBill")
+ @CloudRequiredPermission("business:ywcontractbill:query")
+ public ApiResponse<List<YwContractBill>> getCanBackBill (@RequestBody YwContractBill ywContractBill,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ return ApiResponse.success(ywContractBillService.getCanBackBill(ywContractBill));
+ }
+
+
+
@ApiOperation("瀵煎嚭Excel")
@PostMapping("/exportExcel")
@CloudRequiredPermission("business:ywcontractbill:exportExcel")
@@ -92,4 +102,15 @@
public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
return ApiResponse.success(ywContractBillService.getDetail(id));
}
+
+
+ @LoginNoRequired
+ @ApiOperation("鐢熸垚璐﹀崟缂栧彿")
+ @GetMapping("/dealDayBillCode")
+ public ApiResponse dealDayBillCode() {
+ ywContractBillService.dealDayBillCode();
+ return ApiResponse.success("鐢熸垚鎴愬姛");
+ }
+
+
}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwPatrolTaskRecordController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwPatrolTaskRecordController.java
index 1d09868..6fcfbd6 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwPatrolTaskRecordController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwPatrolTaskRecordController.java
@@ -87,6 +87,19 @@
@GetMapping("/{id}")
@CloudRequiredPermission("business:ywpatroltaskrecord:query")
public ApiResponse findById(@PathVariable Integer id) {
- return ApiResponse.success(ywPatrolTaskRecordService.findById(id));
+ return ApiResponse.success(ywPatrolTaskRecordService.getDetail(id));
}
+
+
+ @ApiOperation("宸℃鐐逛换鍔℃暟鎹鐞�")
+ @PostMapping("/patrolData")
+ @CloudRequiredPermission("business:ywpatroltaskrecord:update")
+ public ApiResponse patrolData(@RequestBody YwPatrolTaskRecord ywPatrolTaskRecord,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ ywPatrolTaskRecord.setLoginUserInfo(getLoginUser(token));
+ ywPatrolTaskRecordService.patrolData(ywPatrolTaskRecord);
+ return ApiResponse.success(null);
+ }
+
+
+
}
diff --git a/server/visits/dmvisit_admin/src/main/resources/bootstrap-test.yml b/server/visits/dmvisit_admin/src/main/resources/bootstrap-test.yml
index 9b992cf..ab2c361 100644
--- a/server/visits/dmvisit_admin/src/main/resources/bootstrap-test.yml
+++ b/server/visits/dmvisit_admin/src/main/resources/bootstrap-test.yml
@@ -23,6 +23,6 @@
# data-id: com.doumee.meeting.admin
discovery:
server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
- namespace: dmvisit_test
+ namespace: funing_test
username: nacos
password: nacos
\ No newline at end of file
diff --git a/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml b/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
index 9dc10e9..86e11a3 100644
--- a/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
+++ b/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
profiles:
- active: dev
+ active: test
application:
name: visitsAdmin
# 瀹夊叏閰嶇疆
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java
index 04caa4c..1ceeb44 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java
@@ -173,6 +173,10 @@
@JsonFormat(pattern = "yyyy-MM-dd")
private Date planPayDateStart;
+ @ApiModelProperty(value = "鍒涘缓浜哄悕绉�")
+ @ExcelColumn(name="鍒涘缓浜�",index = 9,width = 10)
+ @TableField(exist = false)
+ private String realname;
@ApiModelProperty(value = "璁″垝浠樻鏃� - 缁撴潫")
@TableField(exist = false)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRevenue.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRevenue.java
index 50f6fd3..b4cf96f 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRevenue.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRevenue.java
@@ -38,7 +38,7 @@
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
@ExcelColumn(name="鍒涘缓鏃ユ湡",index = 8,width = 10,dateFormat = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
@@ -94,15 +94,15 @@
private String contractCode;
- @ApiModelProperty(value = "瀹㈡埛鍚嶇О")
- @TableField(exist = false)
- private String customerNme;
-
@ApiModelProperty(value = "瀹㈡埛鍚嶇О锛堜粯娆炬柟锛�", example = "1")
@ExcelColumn(name="瀹㈡埛鍚嶇О",index = 0,width = 10)
@TableField(exist = false)
private String customerName;
+ @ApiModelProperty(value = "娴佹按璐﹀彿")
+ @TableField(exist = false)
+ private String accountTitle;
+
@ApiModelProperty(value = "鍒涘缓浜哄悕绉�")
@ExcelColumn(name="鍒涘缓浜�",index = 9,width = 10)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRoom.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRoom.java
index b4bf766..fa471e2 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRoom.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRoom.java
@@ -10,6 +10,8 @@
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.math.BigDecimal;
import java.util.Date;
/**
@@ -81,4 +83,7 @@
@ApiModelProperty(value = "鎴块棿鍚嶇О")
@TableField(exist = false)
private String roomName;
+ @ApiModelProperty(value = "寤虹瓚闈㈢Н锛堝钩鏂圭背锛�", example = "1")
+ @TableField(exist = false)
+ private BigDecimal area;
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTask.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTask.java
index e23677a..e093dac 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTask.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTask.java
@@ -108,6 +108,13 @@
@TableField(exist = false)
private String planCode;
+ @ApiModelProperty(value = "宸℃鐐规�绘暟")
+ @TableField(exist = false)
+ private String patrolNum;
+
+ @ApiModelProperty(value = "宸插贰妫�鏁伴噺")
+ @TableField(exist = false)
+ private String finishNum;
@ApiModelProperty(value = "搴忓彿" , hidden = true)
@TableField(exist = false)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTaskRecord.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTaskRecord.java
index 98c9dde..71f6b4e 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTaskRecord.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTaskRecord.java
@@ -2,6 +2,8 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.doumee.core.annotation.excel.ExcelColumn;
+import com.doumee.core.model.LoginUserModel;
+import com.doumee.dao.system.model.Multifile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
@@ -10,6 +12,7 @@
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
+import java.util.List;
/**
* 杩愮淮宸℃浠诲姟 - 宸℃鐐逛俊鎭〃
@@ -19,7 +22,7 @@
@Data
@ApiModel("杩愮淮宸℃浠诲姟 - 宸℃鐐逛俊鎭〃")
@TableName("`yw_patrol_task_record`")
-public class YwPatrolTaskRecord {
+public class YwPatrolTaskRecord extends LoginUserModel {
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "涓婚敭", example = "1")
@@ -94,4 +97,20 @@
@TableField(exist = false)
private String pointName;
+ @ApiModelProperty(value = "澶勭悊浜�")
+ @TableField(exist = false)
+ private String realname;
+
+ @ApiModelProperty(value = "閮ㄩ棬鍚嶇О")
+ @TableField(exist = false)
+ private String companyName;
+
+ @ApiModelProperty(value = "宸℃鍐呭")
+ @TableField(exist = false)
+ private String content;
+
+ @ApiModelProperty(value = "闄勪欢鍒楄〃")
+ @TableField(exist = false)
+ private List<Multifile> multifileList;
+
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java
index e805977..3ef54c3 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java
@@ -102,4 +102,6 @@
* 澶勭悊璐﹀崟缂栧彿
*/
void dealDayBillCode();
+
+ List<YwContractBill> getCanBackBill(YwContractBill model);
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwPatrolTaskRecordService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwPatrolTaskRecordService.java
index 23b5444..38e4bee 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwPatrolTaskRecordService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwPatrolTaskRecordService.java
@@ -94,4 +94,9 @@
* @return long
*/
long count(YwPatrolTaskRecord ywPatrolTaskRecord);
+
+
+ void patrolData(YwPatrolTaskRecord ywPatrolTaskRecord);
+
+ YwPatrolTaskRecord getDetail(Integer id);
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
index 88d3a28..03953ce 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
@@ -186,18 +186,23 @@
public YwContractBill getDetail(Integer id) {
YwContractBill ywContractBill = ywContractBillMapper.selectJoinOne(YwContractBill.class,
new MPJLambdaWrapper<YwContractBill>().selectAll(YwContractBill.class)
- .select(" ( select ifnull(sum(yw.ACT_RECEIVABLE_FEE),0) from yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee ")
+ .select(" ( select ifnull(sum(case when yw.REVENUE_TYPE = 0 then yw.ACT_RECEIVABLE_FEE else -yw.ACT_RECEIVABLE_FEE end),0) from yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee ")
.selectAs(YwContract::getCode,YwContractBill::getContractCode)
.selectAs(YwCustomer::getName,YwContractBill::getCustomerName)
.selectAs(Company::getName,YwContractBill::getCompanyName)
+ .selectAs(SystemUser::getRealname,YwContractBill::getRealname)
.leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
.leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId)
.leftJoin(Company.class,Company::getId,YwContract::getCompanyId)
+ .leftJoin(SystemUser.class,SystemUser::getId,YwContractBill::getCreator)
.eq(YwContractBill::getIsdeleted,Constants.ZERO)
.eq(YwContractBill::getId,id));
if(Objects.isNull(ywContractBill)){
throw new BusinessException(ResponseStatus.DATA_EMPTY);
}
+ ywContractBill.setNeedReceivableFee(
+ ywContractBill.getReceivableFee().subtract(ywContractBill.getActReceivableFee())
+ );
//鎴挎簮鏁版嵁
ywContractBill.setYwContractRoomList(ywContractRoomMapper.selectJoinList(YwContractRoom.class,new MPJLambdaWrapper<YwContractRoom>()
@@ -205,13 +210,30 @@
.selectAs(YwProject::getName,YwRoom::getProjectName)
.selectAs(YwFloor::getName,YwRoom::getFloorName)
.selectAs(YwBuilding::getName,YwRoom::getBuildingName)
+ .selectAs(YwRoom::getCode,YwContractRoom::getRoomName)
+ .selectAs(YwRoom::getArea,YwContractRoom::getArea)
.leftJoin(YwRoom.class,YwRoom::getId,YwContractRoom::getRoomId)
.leftJoin(YwFloor.class,YwFloor::getId,YwRoom::getFloor)
.leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId)
.leftJoin(YwBuilding.class,YwBuilding::getId,YwRoom::getBuildingId)
- .eq(YwContractRoom::getContractId,id)
- .eq(YwContractRoom::getType,Constants.ONE)
+ .eq(Constants.equalsInteger(ywContractBill.getType(),Constants.ONE),YwContractRoom::getContractId,id)
+ .eq(Constants.equalsInteger(ywContractBill.getType(),Constants.ONE),YwContractRoom::getType,Constants.ONE)
+ .eq(Constants.equalsInteger(ywContractBill.getType(),Constants.ZERO),YwContractRoom::getContractId,ywContractBill.getContractId())
+ .eq(Constants.equalsInteger(ywContractBill.getType(),Constants.ZERO),YwContractRoom::getType,Constants.ZERO)
));
+
+ //鏀舵敮璁板綍
+ ywContractBill.setYwContractRevenueList(
+ ywContractRevenueMapper.selectJoinList(YwContractRevenue.class,new MPJLambdaWrapper<YwContractRevenue>()
+ .selectAll(YwContractRevenue.class)
+ .selectAs(YwCustomer::getName,YwContractRevenue::getCustomerName)
+ .leftJoin(YwContract.class,YwContract::getId,YwContractRevenue::getContractId)
+ .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId)
+ .eq(YwContractRevenue::getStatus,Constants.ZERO)
+ .eq(YwContractRevenue::getBillId,ywContractBill.getId())
+ .orderByDesc(YwContractRevenue::getId)
+ )
+ );
//闄勪欢鏁版嵁
List<Multifile> multifileList = multifileMapper.selectJoinList(Multifile.class,new MPJLambdaWrapper<Multifile>()
@@ -254,7 +276,7 @@
YwContractBill model = pageWrap.getModel();
IPage<YwContractBill> iPage = ywContractBillMapper.selectJoinPage(page,YwContractBill.class,
queryWrapper.selectAll(YwContractBill.class)
- .select(" ( select ifnull(sum(yw.ACT_RECEIVABLE_FEE),0) from yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee ")
+ .select(" ( select ifnull(sum(case when yw.REVENUE_TYPE = 0 then yw.ACT_RECEIVABLE_FEE else -yw.ACT_RECEIVABLE_FEE end),0) from yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee ")
.selectAs(YwContract::getCode,YwContractBill::getContractCode)
.selectAs(YwCustomer::getName,YwContractBill::getCustomerName)
.leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
@@ -272,6 +294,8 @@
YwContractBill::getType,model.getType())
.eq(Objects.nonNull(model)&&Objects.nonNull(model.getContractId()),
YwContractBill::getContractId,model.getContractId())
+ .like(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getContractCode()),
+ YwContract::getCode,model.getContractCode())
.ge(Objects.nonNull(model)&&Objects.nonNull(model.getPlanPayDateStart()),YwContractBill::getPlanPayDate, Utils.Date.getStart(model.getPlanPayDateStart()))
.le(Objects.nonNull(model)&&Objects.nonNull(model.getPlanPayDateEnd()),YwContractBill::getPlanPayDate, Utils.Date.getEnd(model.getPlanPayDateEnd())) )
;
@@ -429,5 +453,26 @@
}
+ @Override
+ public List<YwContractBill> getCanBackBill(YwContractBill model) {
+ List<YwContractBill> list = ywContractBillMapper.selectJoinList(YwContractBill.class,
+ new MPJLambdaWrapper<YwContractBill>().selectAll(YwContractBill.class)
+ .select(" ( select ifnull(sum(case when yw.REVENUE_TYPE = 0 then yw.ACT_RECEIVABLE_FEE else -yw.ACT_RECEIVABLE_FEE end),0) from yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee ")
+ .selectAs(YwContract::getCode,YwContractBill::getContractCode)
+ .selectAs(YwCustomer::getName,YwContractBill::getCustomerName)
+ .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
+ .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId)
+ .eq(YwContractBill::getIsdeleted,Constants.ZERO)
+ .in(YwContractBill::getCostType,Constants.ZERO,Constants.ONE,Constants.FOUR,Constants.FIVE,7)
+ .eq(Objects.nonNull(model)&&Objects.nonNull(model.getContractId()),
+ YwContractBill::getContractId,model.getContractId())
+ .le(Objects.nonNull(model)&&Objects.nonNull(model.getPlanPayDateEnd()),YwContractBill::getStartDate, Utils.Date.getEnd(model.getPlanPayDateEnd())) )
+ ;
+
+ for (YwContractBill ywContractBill:list) {
+ ywContractBill.setNeedReceivableFee(ywContractBill.getReceivableFee().subtract(ywContractBill.getActReceivableFee()));
+ }
+ return list;
+ }
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java
index a75c198..8843a63 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java
@@ -237,10 +237,12 @@
.selectAs(YwContract::getCode,YwContractRevenue::getContractCode)
.selectAs(YwCustomer::getName,YwContractRevenue::getCustomerName)
.selectAs(SystemUser::getRealname,YwContractRevenue::getRealname)
+ .selectAs(YwAccount::getTitle,YwContractRevenue::getAccountTitle)
.leftJoin(YwContractBill.class,YwContractBill::getId,YwContractRevenue::getBillId)
.leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
.leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId)
.leftJoin(SystemUser.class,SystemUser::getId,YwContractRevenue::getCreator)
+ .leftJoin(YwAccount.class,YwAccount::getId,YwContractRevenue::getAccountId)
.eq(YwContractRevenue::getId,id)
);
@@ -372,7 +374,7 @@
public List<YwContractRevenue> findList(YwContractRevenue ywContractRevenue) {
List<YwContractRevenue> ywContractRevenueList = ywContractRevenueMapper.selectJoinList(YwContractRevenue.class,new MPJLambdaWrapper<YwContractRevenue>()
.selectAll(YwContractRevenue.class)
- .selectAs(YwCustomer::getName,YwContractRevenue::getCustomerNme)
+ .selectAs(YwCustomer::getName,YwContractRevenue::getCustomerName)
.leftJoin(YwContract.class,YwContract::getId,YwContractRevenue::getContractId)
.leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId)
.eq(YwContractRevenue::getStatus,Constants.ZERO)
@@ -398,8 +400,8 @@
.leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId)
.leftJoin(SystemUser.class,SystemUser::getId,YwContractRevenue::getCreator)
.eq(YwContractRevenue::getIsdeleted,Constants.ZERO)
- .like(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getCustomerNme()),
- YwCustomer::getName,model.getCustomerNme())
+ .like(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getCustomerName()),
+ YwCustomer::getName,model.getCustomerName())
.eq(Objects.nonNull(model)&&Objects.nonNull(model.getPayType()),
YwContractRevenue::getPayType,model.getPayType())
.eq(Objects.nonNull(model)&&Objects.nonNull(model.getRevenueType()),
@@ -413,25 +415,28 @@
for (YwContractRevenue ywContractRevenue:iPage.getRecords()) {
//妤煎畤鍚嶇О
List<YwContractRoom> ywContractRoomList = ywContractRevenue.getYwContractRoomList();
- StringBuilder roomPathName = new StringBuilder();
- for (YwContractRoom ywContractRoom:ywContractRoomList) {
- if(StringUtils.isNotBlank(ywContractRoom.getProjectName())){
- roomPathName.append(ywContractRoom.getProjectName()+"/");
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRoomList)){
+ StringBuilder roomPathName = new StringBuilder();
+ for (YwContractRoom ywContractRoom:ywContractRoomList) {
+ if(StringUtils.isNotBlank(ywContractRoom.getProjectName())){
+ roomPathName.append(ywContractRoom.getProjectName()+"/");
+ }
+ if(StringUtils.isNotBlank(ywContractRoom.getBuildingName())){
+ roomPathName.append(ywContractRoom.getBuildingName()+"/");
+ }
+ if(StringUtils.isNotBlank(ywContractRoom.getFloorName())){
+ roomPathName.append(ywContractRoom.getFloorName()+"/");
+ }
+ if(StringUtils.isNotBlank(ywContractRoom.getRoomName())){
+ roomPathName.append(ywContractRoom.getRoomName());
+ }
+ if(StringUtils.isNotBlank(roomPathName)){
+ roomPathName.append(";");
+ }
}
- if(StringUtils.isNotBlank(ywContractRoom.getBuildingName())){
- roomPathName.append(ywContractRoom.getBuildingName()+"/");
- }
- if(StringUtils.isNotBlank(ywContractRoom.getFloorName())){
- roomPathName.append(ywContractRoom.getFloorName()+"/");
- }
- if(StringUtils.isNotBlank(ywContractRoom.getRoomName())){
- roomPathName.append(ywContractRoom.getRoomName());
- }
- if(StringUtils.isNotBlank(roomPathName)){
- roomPathName.append(";");
- }
+ ywContractRevenue.setRoomPathName(roomPathName.toString());
}
- ywContractRevenue.setRoomPathName(roomPathName.toString());
+
}
return PageData.from(iPage);
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
index 6b26da4..4795aa6 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
@@ -33,6 +33,7 @@
import java.math.BigDecimal;
import java.time.temporal.ChronoUnit;
import java.util.*;
+import java.util.stream.Collectors;
/**
* 杩愮淮鍚堝悓淇℃伅琛⊿ervice瀹炵幇
@@ -311,6 +312,9 @@
update.setBtFee(param.getBtFee());
update.setBtRemark(getbackRentRemarkByParam(param));
ywContractMapper.updateById(update);
+// if(1==1){
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED);
+// }
dealLogBiz(param,Constants.YwLogType.CONTRACT_BACK, param.getLoginUserInfo().getRealname(),getbackRentLogByParam(param));
return param.getId();
}
@@ -348,7 +352,7 @@
List<YwContractBill> canBills = new ArrayList<>();//鍙��绉熶慨鏀规暟鎹�
List<YwContractBill> allBills = ywContractBillMapper.selectList(new QueryWrapper<YwContractBill>().
select("*," +
- "( select ifnull(sum(yw.ACT_RECEIVABLE_FEE),0) from yw_contract_revenue yw where yw.bill_id = yw_contract_bill.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee " )
+ "( select ifnull(sum(case when yw.REVENUE_TYPE = 0 then yw.ACT_RECEIVABLE_FEE else -yw.ACT_RECEIVABLE_FEE end),0) from yw_contract_revenue yw where yw.bill_id = yw_contract_bill.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee " )
.lambda().
eq(YwContractBill::getIsdeleted,Constants.ZERO)
.eq(YwContractBill::getContractId,param.getId()));
@@ -365,15 +369,23 @@
}
if(Constants.equalsInteger(bill.getPayStatus(),Constants.ZERO)
||Constants.equalsInteger(bill.getPayStatus(),Constants.THREE)){
- if(bill.getStartDate().getTime()>param.getEditDate().getTime()){
+ if(bill.getStartDate().getTime()<param.getBtDate().getTime()){
+ canBills.add(bill);
+ }else{
//濡傛灉杩樻病寮�濮嬶紝璐﹀崟鐩存帴鍏抽棴
closeBills.add(bill);
noBills.add(bill);
- }else{
- canBills.add(bill);
}
+// if(bill.getStartDate().getTime()>param.getEditDate().getTime()){
+// //濡傛灉杩樻病寮�濮嬶紝璐﹀崟鐩存帴鍏抽棴
+// closeBills.add(bill);
+// noBills.add(bill);
+// }else{
+// canBills.add(bill);
+// }
}else if(Constants.equalsInteger(bill.getPayStatus(),Constants.ONE) ){
- if(bill.getEndDate().getTime()<param.getEditDate().getTime()){
+ if(bill.getStartDate().getTime()>param.getBtDate().getTime()){
+// if(bill.getEndDate().getTime()<param.getEditDate().getTime()){
//濡傛灉宸茬粨娓咃紝璐﹀崟鐩存帴鍏抽棴
noBills.add(bill);
}else{
@@ -415,6 +427,7 @@
//濡傛灉璐﹀崟杩樻湁娆惧緟鏀讹紝鍒欎繚鎸佺姸鎬佷笉鍙�
}
}
+ b.setReceivableFee(editBill.getReceivableFee());
b.setEditDate(param.getEditDate());
b.setEditor(param.getEditor());
b.setBtActDate(param.getBtActDate());
@@ -467,26 +480,21 @@
if(yjBills.size()>0){
// 濡傛灉鏄娂閲戞垨鑰呬繚璇侀噾锛屼笉鏀寔閫�娆撅紝淇濇寔鍘熸潵鐨勭姸鎬侊紝 0=绉熻祦璐癸紱1=鐗╀笟璐癸紱2=绉熻祦鎶奸噾锛�3=鐗╀笟鎶奸噾锛�4=姘寸數璐癸紱5=鏉傞」璐癸紱6=鍏朵粬;7=淇濊瘉閲�
for(YwContractBill bill : yjBills){
- if(!Constants.equalsInteger(bill.getPayStatus(),Constants.ONE) ){
-// YwContractBill b = new YwContractBill();
-// //浠樻鐘舵�侊細0=寰呮敹娆撅紱1=宸茬粨娓咃紱2=閮ㄥ垎缁撴竻锛�3=寰呬粯娆撅紱4=寰呴��娆撅紱5=宸插叧闂�
-// //濡傛灉璐﹀崟淇℃伅鍋氫簡缂栬緫锛岄噾棰濊绠� 瀹炴敹閲戦 鍜� 淇敼鍚庡簲鏀堕噾棰濅綔瀵规瘮锛屽垽鏂槸鍚﹀簲璇ラ��娆�
-// BigDecimal fee = Constants.formatBigdecimal(bill.getActReceivableFee()).subtract(bill.getReceivableFee());
-// if(fee.compareTo(new BigDecimal(0))== 0){
-// //濡傛灉璐圭敤姝eソ锛屽垯淇敼璐﹀崟淇℃伅涓哄凡缁撴竻
-// b.setPayStatus(Constants.ONE);
-// }else if(fee.compareTo(new BigDecimal(0))> 0){
-// //濡傛灉闇�瑕佽繘琛岄��娆撅紝鏇存柊璐﹀崟淇℃伅涓哄緟閫�娆�
-// b.setPayStatus(Constants.FOUR);
-// }
-// b.setId(bill.getId());
-// b.setEditDate(param.getEditDate());
-// b.setEditor(param.getEditor());
-// b.setReceivableFee(BigDecimal.ZERO);
-// ywContractBillMapper.updateById(b);
- //濡傛灉鏄湭缁撴竻鎶奸噾
- yjNoBills ++;
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(param.getCanBackRentBills())){
+ List<YwContractBill> optional = param.getCanBackRentBills().stream().filter(i->Constants.equalsInteger(bill.getId(),i.getId())).collect(Collectors.toList());
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(optional)){
+ YwContractBill canBill = optional.get(Constants.ZERO);
+ YwContractBill yjBill = new YwContractBill();
+ yjBill.setId(bill.getId());
+ yjBill.setEditDate(param.getEditDate());
+ yjBill.setEditor(param.getEditor());
+ yjBill.setReceivableFee(BigDecimal.ZERO);
+ yjBill.setPayStatus(Constants.FOUR);
+ yjBill.setPlanPayDate(canBill.getPlanPayDate());
+ ywContractBillMapper.updateById(yjBill);
+ }
}
+ yjNoBills ++;
}
}
param.setBtWaitBill(canBills.size() + newBills.size()+yjNoBills);//鏈竻绠楃殑璐﹀崟鏁伴噺
@@ -1227,9 +1235,15 @@
//鏌ヨ璐﹀崟闆嗗悎
model.setBillList(ywContractBillMapper.selectJoinList(YwContractBill.class,new MPJLambdaWrapper<YwContractBill>()
.selectAll(YwContractBill.class )
+ .select(" ( select ifnull(sum(case when yw.REVENUE_TYPE = 0 then yw.ACT_RECEIVABLE_FEE else -yw.ACT_RECEIVABLE_FEE end),0) from yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee ")
.eq( YwContractBill::getContractId,model.getId())
.eq(YwContractBill::getIsdeleted,Constants.ZERO)
.orderByAsc(YwContractBill::getSortnum,YwContractBill::getCreateDate)));
+
+ for (YwContractBill ywContractBill:model.getBillList()) {
+ ywContractBill.setNeedReceivableFee(ywContractBill.getReceivableFee().subtract(ywContractBill.getActReceivableFee()));
+ }
+
model.setCanBackRentBills(new ArrayList<>());
long nowStart = Utils.Date.getStart(new Date()).getTime();
long nowEnd = Utils.Date.getEnd(new Date()).getTime();
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwDeviceRecordServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwDeviceRecordServiceImpl.java
index 2cab8a2..fe1395d 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwDeviceRecordServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwDeviceRecordServiceImpl.java
@@ -174,6 +174,7 @@
.leftJoin(Company.class,Company::getId,SystemUser::getCompanyId)
.leftJoin(YwDevice.class,YwDevice::getId,YwDeviceRecord::getDeviceId)
.eq(YwDeviceRecord::getIsdeleted,Constants.ZERO)
+ .eq(Objects.nonNull(model.getUserId()),YwDeviceRecord::getUserId,model.getUserId())
.and(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getDeviceName()),i->i.like(YwDevice::getName,model.getDeviceName()).or().like(YwDevice::getCode,model.getDeviceName()))
.ge(Objects.nonNull(model.getStartDate()),YwDeviceRecord::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getStartDate()))
.le(Objects.nonNull(model.getEndDate()),YwDeviceRecord::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getEndDate()))
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolPointServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolPointServiceImpl.java
index 0674afb..06e51e0 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolPointServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolPointServiceImpl.java
@@ -157,9 +157,12 @@
@Override
public YwPatrolPoint getDetail(Integer id) {
YwPatrolPoint ywPatrolPoint = ywPatrolPointMapper.selectById(id);
+ if(Objects.isNull(ywPatrolPoint)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
Multifile multifile = multifileMapper.selectOne(new QueryWrapper<Multifile>().lambda().eq(Multifile::getObjId,id)
.eq(Multifile::getObjType,Constants.MultiFile.FN_PATROL_POINT_FILE).last(" limit 1"));
- if(Objects.nonNull(multifile)){
+ if(Objects.nonNull(multifile) && StringUtils.isNotBlank(multifile.getFileurl())){
String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode()
+systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_PATROL).getCode();
ywPatrolPoint.setFileFullUrl(path + multifile.getFileurl());
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskRecordServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskRecordServiceImpl.java
index 85bfb6a..2c6f8d7 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskRecordServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskRecordServiceImpl.java
@@ -1,14 +1,19 @@
package com.doumee.service.business.impl;
+import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.core.constants.ResponseStatus;
+import com.doumee.core.exception.BusinessException;
+import com.doumee.core.model.LoginUserInfo;
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.dao.business.YwContractRevenueMapper;
import com.doumee.dao.business.YwPatrolTaskRecordMapper;
-import com.doumee.dao.business.model.YwDeviceRecord;
-import com.doumee.dao.business.model.YwPatrolPoint;
-import com.doumee.dao.business.model.YwPatrolScheme;
-import com.doumee.dao.business.model.YwPatrolTaskRecord;
+import com.doumee.dao.business.model.*;
+import com.doumee.dao.system.MultifileMapper;
+import com.doumee.dao.system.model.Multifile;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.service.business.YwPatrolTaskRecordService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -19,8 +24,10 @@
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
+import java.util.Date;
import java.util.List;
import java.util.Objects;
@@ -34,6 +41,15 @@
@Autowired
private YwPatrolTaskRecordMapper ywPatrolTaskRecordMapper;
+
+ @Autowired
+ private MultifileMapper multifileMapper;
+
+
+ @Autowired
+ private SystemDictDataBiz systemDictDataBiz;
+
+
@Override
public Integer create(YwPatrolTaskRecord ywPatrolTaskRecord) {
@@ -100,6 +116,7 @@
YwPatrolTaskRecord model = pageWrap.getModel();
queryWrapper.selectAll(YwPatrolTaskRecord.class)
.selectAs(YwPatrolPoint::getName,YwPatrolTaskRecord::getPointName)
+ .selectAs(YwPatrolPoint::getContent,YwPatrolTaskRecord::getContent)
.leftJoin(YwPatrolPoint.class,YwPatrolPoint::getId,YwPatrolTaskRecord::getPointId)
.leftJoin(SystemUser.class,SystemUser::getId,YwPatrolTaskRecord::getDealUserId)
.eq(YwPatrolScheme::getIsdeleted, Constants.ZERO)
@@ -116,4 +133,93 @@
QueryWrapper<YwPatrolTaskRecord> wrapper = new QueryWrapper<>(ywPatrolTaskRecord);
return ywPatrolTaskRecordMapper.selectCount(wrapper);
}
+
+
+ @Override
+ @Transactional(rollbackFor = {Exception.class,BusinessException.class})
+ public void patrolData(YwPatrolTaskRecord ywPatrolTaskRecord) {
+ if(Objects.isNull(ywPatrolTaskRecord)
+ || Objects.isNull(ywPatrolTaskRecord.getId())
+ || Objects.isNull(ywPatrolTaskRecord.getDealStatus())){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = ywPatrolTaskRecord.getLoginUserInfo();
+ YwPatrolTaskRecord model = ywPatrolTaskRecordMapper.selectById(ywPatrolTaskRecord.getId());
+ if(Objects.isNull(model)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!Constants.equalsInteger(model.getStatus(),Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�佸凡娴佽浆");
+ }
+
+ ywPatrolTaskRecordMapper.update(null,new UpdateWrapper<YwPatrolTaskRecord>().lambda()
+ .set(YwPatrolTaskRecord::getDealStatus,ywPatrolTaskRecord.getDealStatus())
+ .set(YwPatrolTaskRecord::getEditor,loginUserInfo.getId())
+ .set(YwPatrolTaskRecord::getEditDate, DateUtil.getCurrDateTime())
+ .set(YwPatrolTaskRecord::getDealDate, DateUtil.getCurrDateTime())
+ .set(YwPatrolTaskRecord::getDealUserId,loginUserInfo.getId())
+ .set(YwPatrolTaskRecord::getStatus,Constants.ONE)
+ .set(YwPatrolTaskRecord::getDealInfo, ywPatrolTaskRecord.getDealInfo())
+ .eq(YwPatrolTaskRecord::getId,ywPatrolTaskRecord.getId()));
+
+ //闄勪欢鏁版嵁
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywPatrolTaskRecord.getMultifileList())){
+ for (Multifile multifile:ywPatrolTaskRecord.getMultifileList()) {
+ if(Objects.isNull(multifile)
+ || StringUtils.isBlank(multifile.getFileurl())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"闄勪欢淇℃伅閿欒");
+ }
+ multifile.setCreator(loginUserInfo.getId());
+ multifile.setCreateDate(new Date());
+ multifile.setIsdeleted(Constants.ZERO);
+ multifile.setObjType(Constants.MultiFile.FN_PATROL_TASK_RECORD_FILE.getKey());
+ multifile.setObjId(ywPatrolTaskRecord.getId());
+ }
+ multifileMapper.insert(ywPatrolTaskRecord.getMultifileList());
+ }
+
+ }
+
+
+
+ @Override
+ public YwPatrolTaskRecord getDetail(Integer id) {
+
+ YwPatrolTaskRecord ywPatrolTaskRecord = ywPatrolTaskRecordMapper.selectJoinOne(YwPatrolTaskRecord.class,new MPJLambdaWrapper<YwPatrolTaskRecord>()
+ .selectAll(YwPatrolTaskRecord.class)
+ .selectAs(YwPatrolPoint::getName,YwPatrolTaskRecord::getPointName)
+ .selectAs(YwPatrolPoint::getContent,YwPatrolTaskRecord::getContent)
+ .selectAs(SystemUser::getRealname,YwPatrolTaskRecord::getRealname)
+ .selectAs(Company::getName,YwPatrolTaskRecord::getCompanyName)
+ .leftJoin(YwPatrolPoint.class,YwPatrolPoint::getId,YwPatrolTaskRecord::getPointId)
+ .leftJoin(SystemUser.class,SystemUser::getId,YwPatrolTaskRecord::getDealUserId)
+ .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId)
+ .eq(YwPatrolScheme::getIsdeleted, Constants.ZERO)
+ .eq(YwPatrolTaskRecord::getId,id)
+ .orderByDesc(YwPatrolScheme::getCreateDate)
+ );
+ //闄勪欢鏁版嵁
+ List<Multifile> multifileList = multifileMapper.selectJoinList(Multifile.class,new MPJLambdaWrapper<Multifile>()
+ .selectAll(Multifile.class)
+ .selectAs(SystemUser::getRealname,Multifile::getUserName)
+ .leftJoin(SystemUser.class,SystemUser::getId,Multifile::getCreator)
+ .eq(Multifile::getObjId,id)
+ .eq(Multifile::getIsdeleted,Constants.ZERO)
+ .eq(Multifile::getObjType,Constants.MultiFile.FN_PATROL_TASK_RECORD_FILE.getKey()));
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(multifileList)){
+ String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode()
+ +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_PATROL).getCode();
+ for (Multifile multifile:multifileList) {
+ if(StringUtils.isNotBlank(multifile.getFileurl())){
+ multifile.setFileurlFull(path + multifile.getFileurl());
+ }
+ }
+ ywPatrolTaskRecord.setMultifileList(multifileList);
+ }
+ return ywPatrolTaskRecord;
+ }
+
+
+
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskServiceImpl.java
index ec9f16f..8ec0422 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskServiceImpl.java
@@ -81,7 +81,20 @@
@Override
public YwPatrolTask findById(Integer id) {
- return ywPatrolTaskMapper.selectById(id);
+ YwPatrolTask ywPatrolTask = ywPatrolTaskMapper.selectJoinOne(YwPatrolTask.class,new MPJLambdaWrapper<YwPatrolTask>()
+ .selectAll(YwPatrolTask.class)
+ .selectAs(YwPatrolScheme::getCode,YwPatrolTask::getPlanCode)
+ .selectAs(YwPatrolScheme::getTitle,YwPatrolTask::getPlanTitle)
+ .selectAs(SystemUser::getRealname,YwPatrolTask::getUserName)
+ .select(" ( select count(1) from yw_patrol_task_record ytr where ytr.TASK_ID = t.id and t.ISDELETED = 0 ) ",YwPatrolTask::getPatrolNum)
+ .select(" ( select count(1) from yw_patrol_task_record ytr where ytr.TASK_ID = t.id and t.STATUS = 1 and t.ISDELETED = 0) ",YwPatrolTask::getPatrolNum)
+ .leftJoin(SystemUser.class,SystemUser::getId,YwPatrolTask::getDealUserId)
+ .leftJoin(YwPatrolScheme.class,YwPatrolScheme::getId,YwPatrolTask::getSchemeId)
+ .eq(YwPatrolTask::getIsdeleted, Constants.ZERO)
+ .eq(YwPatrolTask::getId,id)
+ .last(" limit 1 "))
+ ;
+ return ywPatrolTask;
}
@Override
@@ -123,14 +136,14 @@
.selectAs(YwPatrolScheme::getCode,YwPatrolTask::getPlanCode)
.selectAs(YwPatrolScheme::getTitle,YwPatrolTask::getPlanTitle)
.selectAs(SystemUser::getRealname,YwPatrolTask::getUserName)
+ .select(" ( select count(1) from yw_patrol_task_record ytr where ytr.TASK_ID = t.id and t.ISDELETED = 0 ) ",YwPatrolTask::getPatrolNum)
+ .select(" ( select count(1) from yw_patrol_task_record ytr where ytr.TASK_ID = t.id and t.STATUS = 1 and t.ISDELETED = 0) ",YwPatrolTask::getPatrolNum)
.leftJoin(SystemUser.class,SystemUser::getId,YwPatrolTask::getDealUserId)
.leftJoin(YwPatrolScheme.class,YwPatrolScheme::getId,YwPatrolTask::getSchemeId)
.eq(YwPatrolTask::getIsdeleted, Constants.ZERO)
.like(StringUtils.isNotBlank(model.getPlanTitle()),YwPatrolScheme::getTitle,model.getPlanTitle())
-
.ge(Objects.nonNull(model.getStartDate()), YwPatrolTask::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getStartDate()))
.le(Objects.nonNull(model.getEndDate()),YwPatrolTask::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getEndDate()))
-
.orderByDesc(YwPatrolTask::getId)
;
IPage<YwPatrolTask> iPage = ywPatrolTaskMapper.selectJoinPage(page,YwPatrolTask.class,queryWrapper);
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
index 2bcd954..3d2b0b5 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
@@ -375,17 +375,24 @@
.selectAs(YwRoom::getRoomNum,YwWorkorder::getRoomNum)
.selectAs(YwFloor::getName,YwWorkorder::getFloorName)
.selectAs(YwBuilding::getName,YwWorkorder::getBuildingName)
+ .selectAs(YwProject::getName,YwWorkorder::getProjectName)
.leftJoin(SystemUser.class,SystemUser::getId,YwWorkorder::getDealUserId)
.leftJoin(Category.class,Category::getId,YwWorkorder::getCateId)
.leftJoin(SystemUser.class,SystemUser::getId,YwWorkorder::getCreator)
.leftJoin(YwRoom.class,YwRoom::getId,YwWorkorder::getRoomId)
.leftJoin(YwFloor.class,YwFloor::getId,YwWorkorder::getFloorId)
- .leftJoin(YwBuilding.class,YwBuilding::getId,YwWorkorder::getBuildingId);
+ .leftJoin(YwBuilding.class,YwBuilding::getId,YwWorkorder::getBuildingId)
+ .leftJoin(YwProject.class,YwProject::getId,YwBuilding::getProjectId);
pageWrap.getModel().setIsdeleted(Constants.ZERO);
Utils.MP.blankToNull(pageWrap.getModel());
if (pageWrap.getModel().getId() != null) {
queryWrapper.eq(YwWorkorder::getId, pageWrap.getModel().getId());
}
+ if(Objects.nonNull(pageWrap.getModel().getRoomName())){
+ queryWrapper.and(i->i.like(YwFloor::getName,pageWrap.getModel().getRoomName()).or()
+ .like(YwRoom::getRoomNum,pageWrap.getModel().getRoomName())
+ );
+ }
if (pageWrap.getModel().getCreator() != null) {
queryWrapper.eq(YwWorkorder::getCreator, pageWrap.getModel().getCreator());
}
--
Gitblit v1.9.3