MrShi
2024-12-01 d3830805113d4303dcc5aaad671b5167e9b2e188
Merge branch 'master' of http://139.186.142.91:10010/r/productDev/funingyunwei
已修改36个文件
898 ■■■■ 文件已修改
h5/App.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/api/yw.js 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/operation/device.vue 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/operation/record.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/polling/detail.vue 131 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/polling/point.vue 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/polling/task.vue 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/workOrder/detail.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/workOrder/edit.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/workOrder/list.vue 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_gateway/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_gateway/src/main/resources/bootstrap-test.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_gateway/src/main/resources/bootstrap.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/core/utils/Constants.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_timer/src/main/resources/bootstrap-test.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/admin_timer/src/main/resources/bootstrap-test.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwPatrolTaskRecordController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/resources/bootstrap-test.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/resources/bootstrap.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRevenue.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractRoom.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTask.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTaskRecord.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwPatrolTaskRecordService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwDeviceRecordServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolPointServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskRecordServiceImpl.java 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskServiceImpl.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/App.vue
@@ -18,6 +18,9 @@
body{
    font-size: 28rpx;
}
.primaryColor {
    color: $primaryColor !important;
}
.flex-cb {
  display: flex;
  justify-content: space-between;
h5/api/yw.js
@@ -71,3 +71,53 @@
    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
  })
}
h5/manifest.json
@@ -129,7 +129,7 @@
                "/gateway_interface" : {
                    // 这个字段名需与你配置的basePrefixUrl一致,系统识别到带有/dev-api请求的地址时,会在前面拼接上代理服务器地址
                    // "target" : "http://172.20.10.7:10010", // 代理服务器域名或IP地址
                    "target" : "http://192.168.0.108:10030", // 代理服务器域名或IP地址
                    "target" : "http://192.168.0.162:10010", // 代理服务器域名或IP地址
                    // "target" : "http://10.50.250.253:8088/gateway_interface", // 代理服务器域名或IP地址
                    // "target" : "http://192.168.0.173/gateway_interface", // 代理服务器域名或IP地址
                    "changeOrigin" : true, // 允许跨域 
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);
                                    });
                                }
                            },
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>
@@ -58,10 +58,19 @@
            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({
h5/pages/polling/detail.vue
@@ -1,37 +1,50 @@
<template>
    <view class="main_app">
        <view class="head_bg"></view>
        <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="true" class="icon" src="@/static/side/ic_dabiaoed.png" mode=""></image>
            <image v-else class="icon" src="@/static/side/ic_dabiao.png" mode=""></image>
            <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">巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略
                    <template v-if="item.status == 1">
                        <view class="line">
                            <view class="la">巡检结果:</view>
                            <view class="val" :class="{ red: item.dealStatus == 1 }">{{ item.dealStatus == 0 ? '正常' : '异常' }}</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>
@@ -42,17 +55,69 @@
</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()
        },
        onShow() {
            this.getDetail()
        },
        methods: {
            itemClick() {
            itemClick(item) {
                uni.navigateTo({
                    url: '/pages/polling/point'
                    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 解析
                    const qrScanner = new QrScanner(video, result => {
                      alert(`扫描结果: ${result}`);
                      qrScanner.stop(); // 停止扫码
                    });
                    qrScanner.start();
                  } catch (err) {
                    console.error('打开摄像头失败:', err);
                  }
            }
        }
    }
@@ -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;
@@ -84,6 +149,7 @@
            margin-bottom: 40rpx;
            background: linear-gradient(#FFFFFF 0%, #FFFFFF 48%, #F0F5FF 100%);
            position: relative;
            .icon{
                position: absolute;
                right: 30rpx;
@@ -91,6 +157,7 @@
                width: 160rpx;
                height: 122rpx;
            }
            .head {
                display: flex;
                justify-content: space-between;
@@ -104,6 +171,18 @@
                .status {
                    color: $primaryColor;
                }
                .gray{
                    color: gray;
                }
            }
        }
        .title {
            font-weight: 600;
            font-size: 32rpx;
            color: #222222;
            margin-bottom: 30rpx;
            }
            .line {
@@ -114,18 +193,11 @@
                    color: #666666;
                }
            }
        }
        .title {
            font-weight: 600;
            font-size: 32rpx;
            color: #222222;
            margin-bottom: 30rpx;
        }
        .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;
@@ -161,6 +235,9 @@
                            color: $primaryColor;
                            font-weight: 400;
                        }
                        .gray{
                            color: #999999;
                        }
                    }
                    .desc {
@@ -176,6 +253,7 @@
                }
            }
        }
        .footer{
            position: fixed;
            bottom: 0rpx;
@@ -184,6 +262,7 @@
            height: 172rpx;
            background-color: #fff;
            padding: 20rpx 40rpx;
            .sub_btn {
                
                width: 670rpx;
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">正常</div>
                    <div class="val primaryColor" :class="{red: info.dealStatus == 1}">{{ info.dealStatus == 0 ? '正常' : '异常' }}</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 v-if="info.status == 1" class="content">
            <view class="title">巡检记录</view>
            <view class="desc">已经更换灯泡</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 {
                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() {
                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,6 +372,11 @@
            margin-bottom: 30rpx;
        }
    }
    .files{
        display: flex;
        margin-bottom: 20rpx;
    }
        .adduser_list_item_ipt1_upload {
            margin-top: 24rpx;
            width: 156rpx;
@@ -372,7 +407,6 @@
            video {
                width: 100%;
                height: 100%;
            }
        }
    }
</style>
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">任务日期:xxx</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>
@@ -52,28 +56,67 @@
</template>
<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;
                    }
                }
            }
        }
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>
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>
h5/pages/workOrder/list.vue
@@ -3,7 +3,8 @@
        <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>
        <!--  -->
@@ -28,11 +29,11 @@
        <!--  -->
        <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="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>
@@ -49,7 +50,9 @@
</template>
<script>
    import { ywWorkorder } from '@/api'
    import {
        ywWorkorder
    } from '@/api'
    export default {
        data() {
            return {
@@ -66,7 +69,13 @@
            this.getList()
        },
        onReachBottom() {
            const {total,list} = this
            if (list.length < total) {
                this.page = this.page + 1
                this.getList()
            } else {
                this.showToast('暂无更多数据')
            }
        },
        methods: {
            tabsClick(val) {
@@ -77,20 +86,39 @@
            },
            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()
            },
            getList() {
                const { page, total, list, activeTab } = this
                const {
                    page,
                    total,
                    list,
                    activeTab,
                    param,
                    selectAll
                } = this
                ywWorkorder({
                    page,
                    capacity: 10,
                    model: {  }
                    model: {
                        ...param,
                        dispatchUserId: selectAll ? '' : uni.getStorageSync('userInfo').id,
                    }
                }).then(res => {
                    this.list = res.data.records || []
                    this.list = [...this.list, ...res.data.records]
                    this.total = res.data.total
                })
            }
        }
@@ -101,11 +129,13 @@
    .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;
@@ -115,15 +145,18 @@
            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;
@@ -132,10 +165,12 @@
                margin-top: 24rpx;
            }
        }
        .active{
            font-weight: 600;
            font-size: 32rpx;
            color: #222222;
            .border{
                background-color: $primaryColor;
            }
@@ -143,6 +178,7 @@
        }
        
    }
    .head_wrap {
        display: flex;
        align-items: center;
@@ -155,9 +191,11 @@
            background: #F7F7F7;
            border-radius: 38rpx;
            padding-left: 30rpx;
            input{
                flex: 1;
            }
            .search {
                width: 28rpx;
                height: 28rpx;
@@ -172,6 +210,7 @@
            // height: 290rpx;
            padding: 30rpx 0;
            border-bottom: 2rpx solid #E5E5E5;
            .icon {
                width: 80rpx;
                height: 80rpx;
@@ -184,16 +223,20 @@
                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;
@@ -201,9 +244,11 @@
                        font-size: 34rpx;
                        color: #222222;
                    }
                    .status{
                        color: $primaryColor;
                    }
                    .gray{
                        color: #999999;
                    }
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
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
server/system_gateway/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active: dev
    active: test
  application:
    name: system_gateway
  # 安全配置
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, "巡检任务点处理附件 ", "巡检任务点处理附件 "),
        ;
        // 成员变量
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
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
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("生成成功");
    }
}
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);
    }
}
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
server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active: dev
    active: test
  application:
    name: visitsAdmin
    # 安全配置
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)
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)
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;
}
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)
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;
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java
@@ -102,4 +102,6 @@
     * 处理账单编号
     */
    void dealDayBillCode();
    List<YwContractBill> getCanBackBill(YwContractBill model);
}
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);
}
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;
    }
}
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,6 +415,7 @@
        for (YwContractRevenue ywContractRevenue:iPage.getRecords()) {
            //楼宇名称
            List<YwContractRoom> ywContractRoomList = ywContractRevenue.getYwContractRoomList();
            if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRoomList)){
            StringBuilder roomPathName = new StringBuilder();
            for (YwContractRoom ywContractRoom:ywContractRoomList) {
                if(StringUtils.isNotBlank(ywContractRoom.getProjectName())){
@@ -433,6 +436,8 @@
            }
            ywContractRevenue.setRoomPathName(roomPathName.toString());
        }
        }
        return PageData.from(iPage);
    }
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;
/**
 * 运维合同信息表Service实现
@@ -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){
//                        //如果费用正好,则修改账单信息为已结清
//                        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();
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()))
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());
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;
    }
}
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);
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());
        }