Compare commits

..

No commits in common. 'master' and 'dev-jingling' have entirely different histories.

2
.gitignore vendored

@ -1,3 +1 @@
jnpf-java-boot/log/jnpf-boot/
.idea/
log/

@ -1,3 +0,0 @@
{
"eggHelper.serverPort": 35684
}

@ -1,15 +1,4 @@
import request from '@/utils/request'
// 接单列表
export function getOrderList(data) {
return request({
url: `/api/scm/RecycleOrder/getList`,
method: 'POST',
data
})
}
//获取我发出的日志
export function getSendList(data, options) {
return request({

@ -234,16 +234,6 @@ export function login(data) {
}
})
}
// 微信手机号登录
export function loginWxMinAPI(data) {
return request({
// url: '/api/scm/wx/hsyGetPhone',
url: '/common/login',
method: 'post',
data
})
}
// 账号注销
export function accountCancel(token) {
return request({

@ -1,213 +1,213 @@
{
"name" : "易回收平台",
"appid" : "__UNI__663111E",
"description" : "专注信息化平台、软件开发、app开发",
"versionName" : "3.4.76",
"versionCode" : 139,
"transformPx" : false,
"app-plus" : {
"compatible" : {
"ignoreVersion" : true
},
/* 5+App */
"usingComponents" : true,
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
"modules" : {
"Maps" : {},
"OAuth" : {},
"Speech" : {},
"Barcode" : {},
"Camera" : {},
"Push" : {}
},
/* */
"distribute" : {
/* */
"android" : {
/* android */
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"schemes" : "jnpf",
"minSdkVersion" : 22,
"targetSdkVersion" : 26,
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
},
"ios" : {
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "以便于修改头像等功能图片上传",
"NSPhotoLibraryAddUsageDescription" : "以便于修改头像等功能图片上传",
"NSCameraUsageDescription" : "以便于修改头像等功能图片上传",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "以便于定位当前位置等功能",
"NSLocationAlwaysUsageDescription" : "以便于定位当前位置等功能",
"NSLocationWhenInUseUsageDescription" : "以便于定位当前位置等功能",
"NSMicrophoneUsageDescription" : "以便于使用语音、录制音频等功能",
"NSCalendarsUsageDescription" : "以便于更好的办公",
"NSContactsUsageDescription" : "以便于更好的沟通",
"NSSpeechRecognitionUsageDescription" : "",
"NSAppleMusicUsageDescription" : "以便于修改头像等功能媒体资料上传",
"NSFaceIDUsageDescription" : "以便于使用快捷登录等功能"
},
"idfa" : false,
"urltypes" : "jnpf",
"capabilities" : {
"entitlements" : {
"com.apple.developer.associated-domains" : [ "applinks:unlink.java.jnpfsoft.com" ]
}
}
},
/* ios */
"sdkConfigs" : {
"payment" : {},
"maps" : {
"baidu" : {
"appkey_ios" : "CA6mx9NZ9DhTYxjVKB7Bkgr6KxpzMfO4",
"appkey_android" : "1vlnkDFaZz4GxAHMMk6kwGRcZr1OfBau"
}
},
"ad" : {},
"oauth" : {
"weixin" : {
"appid" : "wx95396c4c5f44c077",
"appsecret" : "c128e69c3cabe00c468fb177e393b6a0",
"UniversalLinks" : "https://unlink.java.jnpfsoft.com/uni-universallinks/__UNI__1A48209/"
}
},
"speech" : {},
"push" : {
"unipush" : {}
}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen" : {
"android" : {
"hdpi" : "unpackage/res/startup/startup.png",
"xhdpi" : "unpackage/res/startup/startup.png",
"xxhdpi" : "unpackage/res/startup/startup.png"
},
"ios" : {
"iphone" : {
"portrait-896h@3x" : "unpackage/res/startup/startup.png",
"landscape-896h@3x" : "",
"portrait-896h@2x" : "unpackage/res/startup/startup.png",
"landscape-896h@2x" : "",
"retina35" : "unpackage/res/startup/startup.png",
"retina40l" : "",
"retina40" : "unpackage/res/startup/startup.png",
"retina47l" : "",
"retina47" : "unpackage/res/startup/startup.png",
"iphonex" : "unpackage/res/startup/startup.png",
"iphonexl" : "",
"retina55l" : "",
"retina55" : "unpackage/res/startup/startup.png"
}
},
"androidStyle" : "default"
}
},
"nativePlugins" : {}
},
/* SDK */
"quickapp" : {},
/* */
"mp-weixin" : {
/* */
"appid" : "wxf82bcc798891a29d",
"setting" : {
"urlCheck" : true,
"es6" : true,
"postcss" : true,
"minified" : true
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
}
},
// "uniStatistics" : {
// "enable" : false
// },
"optimization" : {
"subPackages" : true
}
},
"h5" : {
"sdkConfigs" : {
"maps" : {}
},
"title" : "易回收平台",
"template" : "template.h5.html",
"domain" : "https://app.java.jnpfsoft.com",
"router" : {
"mode" : "history"
},
"devServer" : {
"disableHostCheck" : true,
"proxy" : {
"/api" : {
"target" : "http://192.168.20.23:8080",
"changeOrigin" : true,
"secure" : false
}
}
}
},
"_spaceID" : "8e84eea8-6922-4033-8e86-67ad7442e692"
}
"name": "jnpf java版",
"appid": "__UNI__663111E",
"description": "专注信息化平台、软件开发、app开发",
"versionName": "3.4.76",
"versionCode": 139,
"transformPx": false,
"app-plus": {
"compatible": {
"ignoreVersion": true
},
/* 5+App */
"usingComponents": true,
"splashscreen": {
"alwaysShowBeforeRender": false,
"waiting": true,
"autoclose": true,
"delay": 0
},
"modules": {
"Maps": {},
"OAuth": {},
"Speech": {},
"Barcode": {},
"Camera": {},
"Push": {}
},
/* */
"distribute": {
/* */
"android": {
/* android */
"permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"schemes": "jnpf",
"minSdkVersion": 22,
"targetSdkVersion": 26,
"abiFilters": ["armeabi-v7a", "arm64-v8a"]
},
"ios": {
"privacyDescription": {
"NSPhotoLibraryUsageDescription": "以便于修改头像等功能图片上传",
"NSPhotoLibraryAddUsageDescription": "以便于修改头像等功能图片上传",
"NSCameraUsageDescription": "以便于修改头像等功能图片上传",
"NSLocationAlwaysAndWhenInUseUsageDescription": "以便于定位当前位置等功能",
"NSLocationAlwaysUsageDescription": "以便于定位当前位置等功能",
"NSLocationWhenInUseUsageDescription": "以便于定位当前位置等功能",
"NSMicrophoneUsageDescription": "以便于使用语音、录制音频等功能",
"NSCalendarsUsageDescription": "以便于更好的办公",
"NSContactsUsageDescription": "以便于更好的沟通",
"NSSpeechRecognitionUsageDescription": "",
"NSAppleMusicUsageDescription": "以便于修改头像等功能媒体资料上传",
"NSFaceIDUsageDescription": "以便于使用快捷登录等功能"
},
"idfa": false,
"urltypes": "jnpf",
"capabilities": {
"entitlements": {
"com.apple.developer.associated-domains": ["applinks:unlink.java.jnpfsoft.com"]
}
}
},
/* ios */
"sdkConfigs": {
"payment": {},
"maps": {
"baidu": {
"appkey_ios": "CA6mx9NZ9DhTYxjVKB7Bkgr6KxpzMfO4",
"appkey_android": "1vlnkDFaZz4GxAHMMk6kwGRcZr1OfBau"
}
},
"ad": {},
"oauth": {
"weixin": {
"appid": "wx95396c4c5f44c077",
"appsecret": "c128e69c3cabe00c468fb177e393b6a0",
"UniversalLinks": "https://unlink.java.jnpfsoft.com/uni-universallinks/__UNI__1A48209/"
}
},
"speech": {},
"push": {
"unipush": {}
}
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen": {
"android": {
"hdpi": "unpackage/res/startup/startup.png",
"xhdpi": "unpackage/res/startup/startup.png",
"xxhdpi": "unpackage/res/startup/startup.png"
},
"ios": {
"iphone": {
"portrait-896h@3x": "unpackage/res/startup/startup.png",
"landscape-896h@3x": "",
"portrait-896h@2x": "unpackage/res/startup/startup.png",
"landscape-896h@2x": "",
"retina35": "unpackage/res/startup/startup.png",
"retina40l": "",
"retina40": "unpackage/res/startup/startup.png",
"retina47l": "",
"retina47": "unpackage/res/startup/startup.png",
"iphonex": "unpackage/res/startup/startup.png",
"iphonexl": "",
"retina55l": "",
"retina55": "unpackage/res/startup/startup.png"
}
},
"androidStyle": "default"
}
},
"nativePlugins": {}
},
/* SDK */
"quickapp": {},
/* */
"mp-weixin": {
/* */
"appid": "wx8f5cb90d8ff960a3",
"setting": {
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true
},
"usingComponents": true,
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
// "uniStatistics" : {
// "enable" : false
// },
"optimization": {
"subPackages": true
}
},
"h5": {
"sdkConfigs": {
"maps": {}
},
"title": "jnpf java版",
"template": "template.h5.html",
"domain": "https://app.java.jnpfsoft.com",
"router": {
"mode": "history"
},
"devServer": {
"disableHostCheck": true,
"proxy": {
"/api": {
"target": "http://192.168.20.23:8080",
"changeOrigin": true,
"secure": false
}
}
}
},
"_spaceID": "8e84eea8-6922-4033-8e86-67ad7442e692"
}

@ -1,12 +1,13 @@
{
"name": "jnpf-app-next",
"version": "1.0.0",
"lockfileVersion": 1,
"lockfileVersion": 2,
"requires": true,
"dependencies": {
"crypto-js": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
"packages": {
"": {
"name": "jnpf-app-next",
"version": "1.0.0",
"license": "ISC"
}
}
}

@ -1,5 +1,5 @@
{
"name": "",
"name": "jnpf-app-next",
"version": "1.0.0",
"description": "",
"main": "main.js",
@ -15,4 +15,4 @@
"extensions": {
"uni-cloud-push": {}
}
}
}

@ -54,14 +54,14 @@
{
"path": "pages/index/portal",
"style": {
// "navigationStyle": "custom", //
// "navigationBarTextStyle": "black" //
"navigationStyle": "custom", //
"navigationBarTextStyle": "black" //
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "易回收平台"
"navigationBarTitleText": "JNPF快速开发平台"
}
},
// #ifndef MP
@ -115,7 +115,7 @@
{
"path": "pages/index/workFlow",
"style": {
"navigationBarTitleText": "易回收平台"
"navigationBarTitleText": "JNPF快速开发平台"
}
},
{
@ -128,13 +128,13 @@
{
"path": "pages/index/contacts",
"style": {
"navigationBarTitleText": "易回收平台"
"navigationBarTitleText": "JNPF快速开发平台"
}
},
{
"path": "pages/index/my",
"style": {
"navigationBarTitleText": "易回收平台",
"navigationBarTitleText": "JNPF快速开发平台",
"app-plus": {
"bounce": "none"
}
@ -1041,7 +1041,7 @@
]
},
"globalStyle": {
"navigationBarTitleText": "易回收平台",
"navigationBarTitleText": "JNPF快速开发平台",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#ffffff",
"backgroundColor": "#f0f2f6",

@ -14,7 +14,7 @@
<view class="u-m-t-20">
<view class="" style="background-color: #fff;">
<u-cell-group style="padding: 0 20rpx;" :border="false">
<!-- <u-cell-item title="我的组织" @click="openPage('/pages/my/business/index','Organize')"
<u-cell-item title="我的组织" @click="openPage('/pages/my/business/index','Organize')"
:title-style="titleStyle">
<text class="icon-ym icon-ym-zuzhi u-m-r-16 u-font-36" slot="icon" style="color: #303133;" />
</u-cell-item>
@ -27,29 +27,23 @@
:title-style="titleStyle">
<text class="icon-ym icon-ym-generator-section u-m-r-16 u-font-36" slot="icon"
style="color: #303133;" />
</u-cell-item> -->
<u-cell-item title="已完成订单" @click="openPage('/pages/my/business/index','Organize')"
:title-style="titleStyle">
<text class="icon-ym icon-ym-zuzhi u-m-r-16 u-font-36" slot="icon" style="color: #303133;" />
</u-cell-item>
<u-cell-item title="联系我们" @click="openPage('/pages/my/business/index','Position')"
:title-style="titleStyle">
<text class="icon-ym icon-ym-position1 u-m-r-16 u-font-36" slot="icon"
style="color: #303133;" />
<!-- #ifndef H5 -->
<u-cell-item title="扫一扫" @click="scanCode()" :title-style="titleStyle">
<text class="icon-ym icon-ym-scanCode1 u-m-r-16 u-font-36"
style="font-weight: bold;color: #303133;" slot="icon" />
</u-cell-item>
<u-cell-item title="自动接单" @click="openPage('/pages/my/subordinate/index')"
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<u-cell-item title="账号安全" @click="openPage('/pages/my/accountSecurity/index')"
:title-style="titleStyle">
<text class="icon-ym icon-ym-generator-section u-m-r-16 u-font-36" slot="icon"
style="color: #303133;" />
<text class="icon-ym icon-ym-zhanghao u-m-r-16 u-font-36" slot="icon" style="color: #303133;" />
</u-cell-item>
<!-- #endif -->
<u-cell-item title="设置" @click="openPage('/pages/my/settings/index')" :title-style="titleStyle"
:border-bottom="false">
<text class="icon-ym icon-ym-shezhi u-m-r-16 u-font-36" slot="icon" style="color: #303133;" />
</u-cell-item>
<u-cell-item title="消息列表" @click="openPage('/pages/my/settings/index')" :title-style="titleStyle"
:border-bottom="false">
<text class="icon-ym icon-ym-shezhi u-m-r-16 u-font-36" slot="icon" style="color: #303133;" />
</u-cell-item>
</u-cell-group>
</view>
</view>

@ -1,52 +1,131 @@
<template>
<view class="reportLog-v">
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :sticky="true"
:down="downOption" :up="upOption" :bottombar="false">
<view class="search-box_sticky">
<u-tabs :list="tabsList" :current="current" @change="change" :is-scroll='false'>
</u-tabs>
<!-- <view class="search-box">
<u-search placeholder="请输入关键词搜索" v-model="keyword" height="72" :show-action="false" @change="search"
bg-color="#f0f2f6" shape="square">
</u-search>
</view> -->
</view>
<view class="list" v-for="(item, index) in list" :key="index">
<u-swipe-action :index="index" :show="item.show" @click="handleClick" @open="open" :options="options"
@content-click="goDetail(item.id)">
<view class="list-txt u-flex-col">
<view class="u-font-30 u-flex u-m-b-10 distance">
<text class="title u-line-1">{{item.distance}}</text>
</view>
<view class="u-font-30 u-flex u-m-b-10">
<text class="title u-line-1">{{item.clientName}}</text>
<text>{{item.creatorTime | date('mm-dd')}}</text>
<view class="menhu-v">
<!-- #ifndef MP -->
<uni-nav-bar class='nav' :fixed="true" :statusBar="true" :border="false" :right-icon="rightIcon"
@clickRight="scan">
<block slot="default">
<view class="nav-left" @click="showSelectBox">
<view class="nav-left-text">
{{portalTitle}}
</view>
<uni-icons class='right-icons' type="arrowdown" color="#000000" size="14"
v-if="portalList.length>0 &&userInfo.appPortalId" :class="{'select-right-icons':showSelect}" />
</view>
</block>
</uni-nav-bar>
<template>
<template v-if="userInfo.appPortalId">
<mescroll-body ref="mescrollRef" @down="downCallback" :down="downOption" :sticky="true" @up="upCallback"
:up="upOption" :bottombar="false" style="min-height: 100%" @init="mescrollInit">
<view class="portal-v" v-if="authConfig.type==0">
<template v-if="formData.length">
<view class="portal-box" v-for="(item,index) in formData" :key="index">
<portalItem :item='item' ref="portalItem" :key="key" :protalData="formData"
v-if="item.show" />
</view>
</template>
<view v-else class="portal-v portal-nodata">
<view class="u-flex-col" style="align-items: center;">
<u-image width="280rpx" height="280rpx" :src="emptyImg1"></u-image>
<text class="u-m-t-20" style="color: #909399;">暂无数据</text>
</view>
</view>
<text class="u-m-t-10">{{userInfo.userName}}</text>
<text class="u-m-t-10">{{userInfo.userName}}</text>
</view>
</u-swipe-action>
<template v-if="authConfig.type==1">
<!-- #ifdef APP-PLUS -->
<view v-if="authConfig.linkType==1 && showWebView">
<web-view :src="authConfig.customUrl"></web-view>
</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view v-if="authConfig.linkType==1 && showWebView" style="height:calc(100vh - 100px)">
<web-view :src="authConfig.customUrl"></web-view>
</view>
<!-- #endif -->
<view v-else class="portal-v portal-nodata">
<view class="u-flex-col" style="align-items: center;">
<u-image width="280rpx" height="280rpx" :src="emptyImg"></u-image>
<text class="u-m-t-20" style="color: #909399;">当前内容无法在APP上显示请前往PC门户查看</text>
</view>
</view>
</template>
</mescroll-body>
</template>
<view class="portal-v" v-else>
<view class="portal-box">
<defaultPortal></defaultPortal>
</view>
</view>
</mescroll-body>
<!-- <view class="com-addBtn" @click="goDetail()">
<u-icon name="plus" size="60" color="#fff" />
</view> -->
</template>
<!-- #endif -->
<!-- #ifdef MP -->
<view>
<web-view :src="mpPortalUrl"></web-view>
</view>
<!-- #endif -->
<!-- #ifndef MP -->
<u-popup v-model="showSelect" mode="top" class="select-box" height="600rpx" @close="closePopup">
<!-- #ifdef APP-PLUS -->
<view :style="{'margin-top':statusBarHeight+88+'px'}"></view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view :style="{'margin-top':statusBarHeight+88+'rpx'}"></view>
<!-- #endif -->
<view v-for="(item,index) in portalList" :key="index" class="select-item" @click="selectItem(item,index)">
<text class="u-m-r-12 u-font-40"
:class="[item.icon,{'currentItem':item.id === userInfo.appPortalId}]" />
<text class="item-text sysName">{{item.fullName}}</text>
<u-icon name="checkbox-mark " class="currentItem" v-if="item.id === userInfo.appPortalId"></u-icon>
</view>
</u-popup>
<!-- #endif -->
</view>
</template>
<script>
var wv; //webview
import {
getSendList,
getReceiveList,
delLog,
getOrderList
} from '@/api/apply/reportLog.js'
PortalList,
SetPortal
} from '@/api/portal/portal.js'
// #ifndef MP
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js"
import IndexMixin from './mixin.js'
import chat from '@/libs/chat.js'
import portalItem from '@/components/visualPortal/components/index.vue'
import defaultPortal from '@/components/visualPortal/components/defaultPortal.vue'
import {
auth
} from '@/api/portal/portal.js'
// #endif
import resources from '@/libs/resources.js'
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
export default {
mixins: [MescrollMixin],
// #ifndef MP
mixins: [MescrollMixin, IndexMixin],
// #endif
components: {
// #ifndef MP
portalItem,
defaultPortal
// #endif
},
data() {
return {
showWebView: true,
emptyImg: require(`@/static/image/defProtal.png`),
emptyImg1: resources.message.nodata,
rightIcon: '',
key: +new Date(),
formData: [],
portalTitle: '门户',
statusBarHeight: '',
showSelect: false,
selectData: {
name: '',
id: ''
},
portalList: [],
id: '',
userInfo: {},
downOption: {
use: true,
auto: true
@ -54,123 +133,243 @@
upOption: {
page: {
num: 0,
size: 20,
size: 50,
time: null
},
empty: {
use: true,
icon: resources.message.nodata,
tip: "暂无数据",
fixed: true,
top: "300rpx",
use: false,
},
textNoMore: '没有更多数据',
},
current: 0,
tabsList: [{
name: '待接单'
},
{
name: '进行中'
}
],
keyword: '',
list: [
{
appointmentTimeEnd:null,
appointmentTimeStart:null,
clientName:"光头强",
attitudeStar: 0,
distance: '20km',
clientId: null,
clientMobile: "18012341234",
recycleAddress: "石嘴山XXX街道001号"
},
{
appointmentTimeEnd:null,
appointmentTimeStart:null,
clientName:"光头强2",
attitudeStar: 0,
distance: '20km',
clientId: null,
clientMobile: "18012341234",
recycleAddress: "石嘴山XXX街道001号"
}
],
userInfo: {},
options: [{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}]
}
authConfig: {},
token: '',
mpPortalUrl: ''
};
},
onLoad() {
onShow() {
this.$forceUpdate()
this.token = uni.getStorageSync('token')
if (!this.$store.state.chat.socket) chat.initSocket()
this.mpPortalUrl = this.define.baseURL + '/pages/mpPortal/index?token=' + this.token
this.userInfo = uni.getStorageSync('userInfo') || {}
uni.$on('refresh', () => {
this.list = [];
this.current = 0
if (!this.userInfo.appPortalId) return
// #ifndef MP
this.getPortalList()
this.$nextTick(() => {
this.mescroll.resetUpScroll();
this.portalList = []
})
// #endif
// #ifdef APP-PLUS
this.rightIcon = 'scan'
// #endif
},
onReady() {
// #ifdef APP-PLUS
this.setWebview()
// #endif
},
onUnload() {
uni.$off('refresh')
onLoad(e) {
// #ifndef MP
uni.$on('refresh', () => {
this.formData = [];
this.mescroll.resetUpScroll();
})
// #endif
},
methods: {
upCallback(page) {
const method = this.current ? getReceiveList : getSendList
let query = {
currentPage: page.num,
pageSize: page.size,
keyword: this.keyword
setWebview() {
if (this.authConfig.linkType == 1) {
var currentWebview = this.$scope
.$getAppWebview() //html5plusplus.webview.currentWebview()uni-appvue使plus.webview.currentWebview()
let height = 0;
uni.getSystemInfo({
//
success: (sysinfo) => {
height = sysinfo.windowHeight - 50; // ---(-50)
},
complete: () => {}
});
this.$nextTick(() => {
setTimeout(() => {
wv = currentWebview.children()[0]
wv.setStyle({
top: 80,
height,
scalable: true
})
}, 500); //
})
}
getOrderList(query, {
load: page.num == 1
}).then(res => {
this.mescroll.endSuccess(res.data.list.length);
if (page.num == 1) this.list = [];
const list = res.data.list.map(o => ({
show: false,
...o
}));
this.list = this.list.concat(list);
},
upCallback(keyword) {
auth(this.userInfo.appPortalId).then(res => {
this.authConfig = res.data || {}
let data = JSON.parse(res.data.formData) || {};
this.formData = []
this.formData = data.layout ? JSON.parse(JSON.stringify(data.layout)) : []
this.handelFormData(data)
if (data.refresh.autoRefresh) {
setInterval(() => {
uni.$emit('proRefresh')
}, data.refresh.autoRefreshTime * 60000)
}
this.mescroll.endSuccess(this.formData.length);
this.key = +new Date()
// #ifdef APP-PLUS
this.setWebview()
// #endif
}).catch(() => {
this.mescroll.endSuccess(0);
this.mescroll.endErr();
this.key = +new Date()
})
},
open(index) {
this.list[index].show = true;
this.list.map((val, idx) => {
if (index != idx) this.list[idx].show = false;
})
handelFormData(data) {
const loop = (list) => {
list.forEach(o => {
o.allRefresh = data.refresh
o.show = false
if (o.visibility && o.visibility.length && o.visibility.includes('app')) o.show =
true
if (o.children && o.children.length) loop(o.children)
})
this.key = +new Date()
}
loop(this.formData)
this.dataList = this.formData.filter(o => o.show)
if (this.dataList.length < 1) {
this.formData = this.dataList
this.mescroll.endSuccess(this.dataList.length);
}
},
handleClick(index, index1) {
const item = this.list[index]
delLog(item.id).then(res => {
this.$u.toast(res.msg)
this.list.splice(index, 1)
if (!this.list.length) this.mescroll.resetUpScroll()
})
isJSON(str) {
try {
var obj = JSON.parse(str);
if (typeof obj == 'object' && obj) {
return true;
} else {
return false;
}
} catch (e) {
return false;
}
},
goDetail(id) {
const url = './form?type=' + this.current + (id ? '&id=' + id : '')
uni.navigateTo({
url: url
scan() {
uni.scanCode({
success: res => {
if (this.isJSON(res.result.trim())) {
const result = JSON.parse(res.result.trim())
if (result.t === 'ADP') {
let config = {
isPreview: 1,
id: result.id,
previewType: result.previewType
}
uni.navigateTo({
url: '/pages/apply/dynamicModel/index?config=' + this.base64
.encode(JSON.stringify(config), "UTF-8"),
fail: (err) => {
this.$u.toast("暂无此页面")
}
})
}
if (result.t === 'DFD') {
let config = JSON.stringify(result)
uni.navigateTo({
url: '/pages/apply/dynamicModel/scanForm?config=' + config,
fail: (err) => {
this.$u.toast("暂无此页面")
}
})
}
if (result.t === 'WFP') {
uni.navigateTo({
url: '/pages/workFlow/scanForm/index?config=' + JSON.stringify(
result),
fail: (err) => {
this.$u.toast("暂无")
}
})
}
if (result.t === 'report') {
let url =
`${this.report}/preview.html?id=${result.id}&token=${this.token}&page=1&from=menu&fullName=${result.fullName}`
uni.navigateTo({
url: '/pages/apply/externalLink/index?url=' + encodeURIComponent(
url) + '&fullName= ' + result.fullName,
fail: (err) => {
this.$u.toast("暂无")
}
})
}
if (result.t === 'portal') {
uni.navigateTo({
url: '/pages/index/scanProtal?id=' + result.id,
fail: (err) => {
this.$u.toast("暂无")
}
})
}
} else {
uni.navigateTo({
url: '/pages/my/scanResult/index?result=' + res.result,
fail: (err) => {
this.$u.toast("暂无此页面")
}
})
}
}
});
},
getPortalList() {
PortalList().then(res => {
let list = res.data.list || [];
list.map(o => {
this.portalList.push(...o.children)
this.portalList.forEach(o => {
if (o.id === this.userInfo.appPortalId) {
this.portalTitle = o.fullName
}
})
})
})
},
change(index) {
this.current = index;
this.mescroll.resetUpScroll()
closePopup() {
// #ifdef APP-PLUS
this.setWebview()
uni.$emit('showVideo', true)
this.showWebView = true
// #endif
},
showSelectBox() {
if (Array.isArray(this.portalList) && this.portalList.length) this.showSelect = !this.showSelect
// #ifdef APP-PLUS
uni.$emit('showVideo', false)
this.showWebView = false
this.setWebview()
// #endif
},
getStatusBarHeight() {
let that = this;
wx.getSystemInfo({
success: function(res) {
that.statusBarHeight = res.statusBarHeight;
},
});
},
selectItem(item, index) {
SetPortal(item.id).then(res => {
this.portalTitle = this.portalList[index].fullName
this.userInfo.appPortalId = item.id
// #ifndef MP
this.mescroll.resetUpScroll();
// #endif
this.showSelectBox()
uni.setStorageSync('userInfo', this.userInfo)
})
}
// search() {
// this.searchTimer && clearTimeout(this.searchTimer)
// this.searchTimer = setTimeout(() => {
// this.list = [];
// this.mescroll.resetUpScroll();
// }, 300)
// }
}
}
</script>
@ -180,25 +379,92 @@
background-color: #f0f2f6;
}
.reportLog-v {
.menhu-v {
.nav {
z-index: 99999;
.list {
width: 100%;
margin-bottom: 20rpx;
color: #9a9a9a;
/deep/.uni-navbar__content {
z-index: 99999;
}
/deep/.uni-navbar__header-container {
justify-content: center;
}
.list-txt {
padding: 16rpx 32rpx;
.nav-left {
max-width: 100%;
display: flex;
align-items: center;
.distance {
justify-content: space-between;
border-bottom: 2rpx solid #ECECF4;
padding: 10rpx 0;
.title {
color: #3D3D3D;
}
.nav-left-text {
font-weight: 700;
font-size: 32rpx;
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.right-icons {
font-weight: 700;
margin-top: 2px;
margin-left: 4px;
transition-duration: 0.3s;
}
.select-right-icons {
transform: rotate(-180deg);
}
}
}
.select-box {
overflow-y: scroll;
.currentItem {
color: #2979FF;
}
.select-item {
height: 100rpx;
display: flex;
align-items: center;
padding: 0 20rpx;
font-size: 30rpx;
color: #303133;
text-align: left;
position: relative;
&::after {
content: " ";
position: absolute;
left: 2%;
top: 0;
box-sizing: border-box;
width: 96%;
height: 1px;
transform: scale(1, .3);
border: 0 solid #e4e7ed;
z-index: 2;
border-bottom-width: 1px;
}
.sysName {
flex: 1;
overflow: auto;
min-width: 0;
}
}
}
}
</style>
/deep/.portal-nodata {
position: absolute;
top: 450rpx;
width: 100%;
text-align: center;
z-index: 100;
background-color: #f0f2f6;
}
</style>

@ -1,790 +0,0 @@
<template>
<view class="apply-v">
<uni-nav-bar class="nav" :fixed="true" :statusBar="true" :border="false" height="44">
<block slot="default">
<view class="nav-left" @click="showSelectBox">
<view class="nav-left-text">
{{ selectData.name }}
</view>
<uni-icons class="right-icons" type="arrowdown" color="#000000" size="14"
v-if="userInfo.systemIds.length > 1" :class="{ 'select-right-icons': showSelect }" />
</view>
</block>
</uni-nav-bar>
<view class="search-box_sticky" :style="{'top':topSearch+'rpx'}">
<view class="search-box">
<u-search placeholder="请输入关键词搜索" v-model="keyword" height="72" :show-action="false" @change="search"
bg-color="#f0f2f6" shape="square">
</u-search>
</view>
</view>
<mescroll-body ref="mescrollRef" @down="downCallback" :down="downOption" :sticky="true" @up="upCallback"
:up="upOption" :bottombar="false" style="min-height: 100%" @init="mescrollInit">
<view class="common-block">
<view class="caption">常用功能</view>
<view class="u-flex u-flex-wrap">
<view class="item u-flex-col u-col-center" v-for="(item, i) in usualList" :key="i"
@click="handelClick(item)">
<text class="u-font-40 item-icon" :class="item.icon"
:style="{ background: item.iconBackground || '#008cff' }" />
<text class="u-font-24 u-line-1 item-text">{{ item.fullName}}</text>
</view>
<view class="item u-flex-col u-col-center" @click="moreApp">
<text class="u-font-40 item-icon more">+</text>
<text class="u-font-24 u-line-1 item-text">添加</text>
</view>
</view>
</view>
<view class="u-m-b-20">
<u-tabs :list="tabsMenuList" :current="current" @change="change" :is-scroll="true" name="fullName"
:key="key">
</u-tabs>
</view>
<view class="workFlow-list">
<view class="part" v-for="(item, i) in menuList" :key="i" v-if="!!current ||(!current && hasChildren)">
<view v-if="!!item.children && item.children.length > 0">
<view class="caption u-line-1">
{{ item.fullName }}
</view>
<view class="u-flex u-flex-wrap">
<view class="item u-flex-col u-col-center" v-for="(child, ii) in item.children" :key="ii"
@click="handelClick(child)">
<text class="u-font-40 item-icon" :class="child.icon"
:style="{ background: child.iconBackground || '#008cff' }" />
<text class="u-font-24 u-line-1 item-text">{{child.fullName}}</text>
</view>
</view>
</view>
<NoData v-if="!!current && (!Array.isArray(item.children) || !item.children.length)"></NoData>
</view>
<NoData v-else></NoData>
</view>
</mescroll-body>
<u-popup v-model="passwordShow" mode="center" length="auto">
<view class="jnpf-wrap jnpf-wrap-workflow">
<u-form :model="dataForm" :rules="rules" ref="dataForm" label-position="left" label-width="150"
label-align="left">
<u-form-item label="旧密码" prop="oldPassword" required>
<u-input v-model="dataForm.oldPassword" placeholder="旧密码" type="password"></u-input>
</u-form-item>
<u-form-item label="新密码" prop="password" required>
<u-input v-model="dataForm.password" placeholder="新密码" type="password"></u-input>
</u-form-item>
<u-form-item label="重复密码" prop="repeatPsd" required>
<u-input v-model="dataForm.repeatPsd" placeholder="重复密码" type="password"></u-input>
</u-form-item>
<u-form-item label="验证码" prop="code" required>
<view class="u-flex">
<u-input v-model="dataForm.code" placeholder="验证码"></u-input>
<view style="flex: 0.1">
<u-image :showLoading="true" :src="baseURL + imgUrl" width="130px" height="38px"
@click="changeCode">
</u-image>
</view>
</view>
</u-form-item>
<u-button class="buttom-btn" type="primary" @click.stop="dataFormSubmit">
{{ "保存" }}
</u-button>
</u-form>
</view>
</u-popup>
<u-popup v-model="showSelect" mode="top" class="select-box" height="600px">
<view :style="{ 'margin-top': statusBarHeight + 44 + 'px' }"></view>
<view v-for="(item, index) in userInfo.systemIds" :key="index" class="select-item"
@click="selectItem(item, index)">
<text class="u-m-r-12 u-font-40"
:class="[item.icon, { currentItem: item.id === userInfo.appSystemId }]" />
<text class="item-text sysName"
:class="{ currentItem: item.id === userInfo.appSystemId }">{{ item.name }}</text>
<u-icon name="checkbox-mark " class="currentItem" v-if="item.id === userInfo.appSystemId"></u-icon>
</view>
</u-popup>
</view>
</template>
<script>
import {
getMenuList,
getUsualList
} from "@/api/apply/apply.js";
import NoData from '@/components/noData'
import {
setMajor,
updatePassword,
getSystemConfig,
updatePasswordMessage,
} from "@/api/common";
import chat from "@/libs/chat.js";
import resources from "@/libs/resources.js";
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
import IndexMixin from "./mixin.js";
import md5Libs from "uview-ui/libs/function/md5";
export default {
mixins: [MescrollMixin, IndexMixin],
components: {
NoData
},
data() {
var validatePass = (rule, value, callback) => {
// const passwordreg = /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{6,16}/
//
const containsNumbers = /[0-9]+/;
//
const includeLowercaseLetters = /[a-z]+/;
//
const includeUppercaseLetters = /[A-Z]+/;
//
const containsCharacters = /\W/;
if (value === "") {
callback(new Error("新密码不能为空"));
} else if (this.baseForm.passwordStrengthLimit == 1) {
if (this.baseForm.passwordLengthMin) {
if (value.length < this.baseForm.passwordLengthMinNumber) {
callback(
new Error(
"新密码长度不能小于" +
this.baseForm.passwordLengthMinNumber +
"位"
)
);
}
}
if (this.baseForm.containsNumbers) {
if (!containsNumbers.test(value)) {
callback(new Error("新密码必须包含数字"));
}
}
if (this.baseForm.includeLowercaseLetters) {
if (!includeLowercaseLetters.test(value)) {
callback(new Error("新密码必须包含小写字母"));
}
}
if (this.baseForm.includeUppercaseLetters) {
if (!includeUppercaseLetters.test(value)) {
callback(new Error("新密码必须包含大写字字母"));
}
}
if (this.baseForm.containsCharacters) {
if (!containsCharacters.test(value)) {
callback(new Error("新密码必须包含字符"));
}
}
callback();
} else {
callback();
}
};
var validatePass2 = (rule, value, callback) => {
if (value === "") {
callback(new Error("重复密码不能为空"));
} else if (value !== this.dataForm.password) {
callback(new Error("两次密码输入不一致"));
} else {
callback();
}
};
return {
topSearch: 80,
passwordShow: false,
current: 0,
bannerList: [{
image: resources.banner.home1Url,
},
{
image: resources.banner.home2Url,
},
{
image: resources.banner.home3Url,
},
],
usualList: [],
tabsMenuList: [{
fullName: "全部功能",
}],
menuList: [],
downOption: {
use: true,
auto: true,
},
upOption: {
page: {
num: 0,
size: 50,
time: null,
},
empty: {
use: true,
icon: resources.message.nodata,
tip: "暂无数据",
fixed: false,
top: "560rpx",
},
textNoMore: "",
},
keyword: "",
statusBarHeight: "",
userInfo: {
systemIds: [],
}, //CurrentUseruserInfo
showSelect: false,
selectData: {
name: "",
id: "",
},
modelId: "",
config: {},
fullName: "",
key: +new Date(),
imgUrl: "",
timestamp: "",
dataForm: {
oldPassword: "",
password: "",
repeatPsd: "",
code: "",
timestamp: "",
},
baseForm: {
passwordStrengthLimit: 0,
passwordLengthMin: false,
passwordLengthMinNumber: 0,
containsNumbers: false,
includeLowercaseLetters: false,
includeUppercaseLetters: false,
containsCharacters: false,
mandatoryModificationOfInitialPassword: 0,
},
rules: {
oldPassword: [{
required: true,
message: "旧密码不能为空",
trigger: "blur",
}, ],
password: [{
required: true,
validator: validatePass,
trigger: "blur",
}, ],
repeatPsd: [{
required: true,
validator: validatePass2,
trigger: "blur",
}, ],
code: [{
required: true,
message: "验证码不能为空",
trigger: "blur",
}, ],
},
};
},
computed: {
baseURL() {
return this.define.baseURL;
},
token() {
return this.$store.getters.token;
},
report() {
return this.define.report;
},
hasChildren() {
let hasChildren = false
for (let i = 0; i < this.menuList.length; i++) {
if (this.menuList[i].children && this.menuList[i].children.length) {
hasChildren = true
break
}
}
return hasChildren
}
},
watch: {
passwordShow(val) {
if (val) {
this.$nextTick(() => {
this.$refs.dataForm.setRules(this.rules);
});
}
},
},
onShow() {
this.keyword = ""
},
onLoad() {
if (!this.$store.state.chat.socket) chat.initSocket()
uni.$on('updateUsualList', data => {
this.getUsualList()
})
uni.$on('refresh', () => {
this.menuList = [];
this.current = 0;
this.mescroll.resetUpScroll();
});
this.getStatusBarHeight();
this.changeCode()
},
onUnload() {
uni.$off("updateUsualList");
},
methods: {
getStatusBarHeight() {
let that = this
wx.getSystemInfo({
success(res) {
that.statusBarHeight = res.statusBarHeight;
},
});
// #ifdef APP-PLUS
uni.getSystemInfo({
success(res) {
that.statusBarHeight = res.statusBarHeight;
let topSearch = 75 + that.statusBarHeight * 2
that.topSearch = topSearch
}
})
// #endif
},
changeCode() {
let timestamp = Math.random();
this.timestamp = timestamp;
this.imgUrl = `/api/file/ImageCode/${timestamp}`;
},
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (valid) {
let query = {
oldPassword: md5Libs.md5(this.dataForm.oldPassword),
password: md5Libs.md5(this.dataForm.password),
code: this.dataForm.code,
timestamp: this.timestamp,
};
updatePassword(query)
.then((res) => {
this.$store.dispatch("user/logout").then(() => {
uni.reLaunch({
url: "/pages/login/index",
});
});
})
.catch(() => {
this.changeImg();
});
}
});
},
initSysList(res) {
this.userInfo = res;
if (this.userInfo.systemIds && this.userInfo.systemIds.length) {
this.userInfo.systemIds.forEach((item) => {
if (item.id == this.userInfo.appSystemId) this.selectData = item
});
}
updatePasswordMessage();
getSystemConfig().then((res) => {
if (
this.userInfo.changePasswordDate == null &&
res.data.mandatoryModificationOfInitialPassword == 1
) {
this.passwordShow = true;
}
this.baseForm = res.data;
});
},
search() {
this.searchTimer && clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.list = [];
this.mescroll.resetUpScroll();
}, 300);
},
getUsualList() {
getUsualList(2).then((res) => {
this.usualList = res.data.list.map((o) => {
const objectData = o.objectData ? JSON.parse(o.objectData) : {};
return {
...o,
...objectData,
};
});
});
},
upCallback(keyword) {
let query = {
keyword: this.keyword,
};
uni.showLoading({
title: '正在加载',
mask: true
})
this.$store.dispatch("user/getCurrentUser").then((res) => {
this.initSysList(res);
this.getUsualList();
getMenuList(query)
.then((res) => {
let list = res.data.list || [];
this.tabsMenuList = [{
fullName: "全部功能",
}];
this.mescroll.endSuccess(list.length);
for (let i = 0; i < list.length; i++) {
let children = list[i].children;
let tabsMenuList = {
fullName: list[i].fullName,
};
this.tabsMenuList.push(tabsMenuList);
if (Array.isArray(children) && children.length) {
for (let j = 0; j < children.length; j++) {
let iconBackground = "",
moduleId = "";
if (children[j].propertyJson) {
let propertyJson = JSON.parse(children[j].propertyJson);
iconBackground = propertyJson.iconBackgroundColor || "";
moduleId = propertyJson.moduleId || "";
}
this.$set(children[j], "iconBackground", iconBackground);
this.$set(children[j], "moduleId", moduleId);
}
}
}
this.list = list;
this.menuList = list;
uni.hideLoading()
this.key = +new Date();
this.mescroll.endSuccess(this.menuList.length, false);
})
.catch(() => {
this.mescroll.endSuccess(0);
this.mescroll.endErr();
});
});
},
change(index) {
this.current = index;
this.fullName = this.tabsMenuList[index].fullName;
this.menuList = this.list;
this.keyword = ""
if (this.current > 0) this.menuList = [this.list[index - 1]];
},
search() {
this.searchTimer && clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.list = [];
this.menuList = [];
this.mescroll.resetUpScroll();
}, 300);
},
moreApp() {
uni.navigateTo({
url: "/pages/workFlow/allApp/index?type=2",
});
},
handelClick(item) {
if (item.type == 2) {
uni.navigateTo({
url: item.urlAddress +
"?menuId=" +
item.id +
"&fullName=" +
item.fullName,
fail: (err) => {
this.$u.toast("暂无此页面");
},
});
return;
}
if (item.type == 3) {
this.modelId = item.moduleId;
if (!item.moduleId) {
this.$u.toast("暂无此页面");
return;
}
uni.navigateTo({
url: "/pages/apply/dynamicModel/index?config=" +
this.base64.encode(JSON.stringify(item), "UTF-8"),
fail: (err) => {
this.$u.toast("暂无此页面");
},
});
}
if (item.type == 7 || item.type == 5) {
let url =
encodeURIComponent(item.urlAddress) + "&fullName=" + item.fullName;
if (item.type == 5) {
url = encodeURIComponent(
`${this.report}/preview.html?id=${item.moduleId}&token=${this.token}&page=1&from=menu`
);
}
if (!item.urlAddress && item.type == 7) {
this.$u.toast("暂无此页面");
return;
}
uni.navigateTo({
url: "/pages/apply/externalLink/index?url=" +
url +
"&fullName=" +
item.fullName +
"&type=" +
item.type,
fail: (err) => {
this.$u.toast("暂无此页面");
},
});
// // #ifdef APP-PLUS
// plus.runtime.openURL(item.urlAddress);
// // #endif
// // #ifndef APP-PLUS
// uni.navigateTo({
// url: '/pages/apply/externalLink/index?url=' + url,
// fail: (err) => {
// this.$u.toast("")
// }
// })
// // #endif
return;
}
if (item.type == 8) {
if (!item.urlAddress) {
this.$u.toast("暂无此页面");
return;
}
uni.navigateTo({
url: "/pages/index/scanProtal?id=" + item.moduleId + "&protalType=1" + "&fullName=" + item
.fullName,
fail: (err) => {
this.$u.toast("暂无此页面");
},
});
return
}
},
showSelectBox() {
if (this.userInfo.systemIds.length <= 1) return;
this.showSelect = !this.showSelect;
},
selectItem(item, index) {
if (item.id === this.userInfo.appSystemId) return
let query = {
majorId: item.id,
majorType: "System",
menuType: 1,
};
setMajor(query).then((res) => {
if (res.code == 200) {
this.changeSelData(item, index);
this.keyword = "";
this.$u.toast(res.msg);
this.mescroll.resetUpScroll();
}
});
},
changeSelData(item, index) {
this.selectData = item
this.userInfo.appSystemId = item.id
this.showSelect = false
},
},
};
</script>
<style lang="scss">
page {
background-color: #f0f2f6;
}
.apply-v {
.search-box_sticky {
margin-bottom: 20rpx;
.search-box {
padding: 20rpx;
}
}
.common-block {
background-color: #fff;
margin: 20rpx 0;
.caption {
padding: 0 32rpx;
font-size: 36rpx;
line-height: 100rpx;
font-weight: bold;
}
.item {
margin-bottom: 32rpx;
width: 25%;
.item-icon {
width: 88rpx;
height: 88rpx;
margin-bottom: 8rpx;
line-height: 88rpx;
text-align: center;
border-radius: 20rpx;
color: #fff;
font-size: 56rpx;
&.more {
background: #ececec;
color: #666666;
font-size: 50rpx;
}
}
.item-text {
width: 100%;
text-align: center;
padding: 0 16rpx;
}
}
}
.nav {
z-index: 99999;
/deep/.uni-navbar__content {
z-index: 99999;
}
/deep/.uni-navbar__header-container {
justify-content: center;
}
}
.nav-left {
max-width: 100%;
display: flex;
align-items: center;
.nav-left-text {
font-weight: 700;
font-size: 32rpx;
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.right-icons {
font-weight: 700;
margin-top: 2px;
margin-left: 4px;
transition-duration: 0.3s;
}
.select-right-icons {
transform: rotate(-180deg);
}
}
.select-box {
.currentItem {
color: #2979ff;
}
.select-item {
height: 100rpx;
display: flex;
align-items: center;
padding: 0 20rpx;
font-size: 30rpx;
color: #303133;
text-align: left;
position: relative;
&::after {
content: " ";
position: absolute;
left: 2%;
top: 0;
box-sizing: border-box;
width: 96%;
height: 1px;
transform: scale(1, 0.3);
border: 0 solid #e4e7ed;
z-index: 2;
border-bottom-width: 1px;
}
.sysName {
flex: 1;
overflow: auto;
min-width: 0;
}
}
}
.search-box {
overflow-y: overlay;
height: 112rpx;
width: 100%;
padding: 20rpx 20rpx;
z-index: 10000;
background: #fff;
}
.banner {
padding: 0rpx 20rpx 20rpx;
background-color: #fff;
.u-indicator-item-round.u-indicator-item-round-active {
background-color: $u-type-primary;
}
}
.notice-bar {
margin: 20rpx 20rpx 0;
background: #fff;
border-radius: 8rpx;
z-index: 99;
color: #303133 !important;
}
.workFlow-list {
// padding: 20rpx 20rpx 0;
.part {
background: #fff;
margin-bottom: 20rpx;
.caption {
padding: 0 32rpx;
font-size: 36rpx;
line-height: 100rpx;
font-weight: bold;
}
.item {
margin-bottom: 32rpx;
width: 25%;
.item-icon {
width: 88rpx;
height: 88rpx;
margin-bottom: 8rpx;
line-height: 88rpx;
text-align: center;
border-radius: 20rpx;
color: #fff;
font-size: 56rpx;
&.more {
background: #ececec;
color: #666666;
font-size: 50rpx;
}
}
.item-text {
width: 100%;
text-align: center;
padding: 0 16rpx;
}
}
}
}
}
</style>

@ -1,127 +0,0 @@
<template>
<view class="contacts-v">
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :sticky="true"
:down="downOption" :up="upOption" :bottombar="false">
<view class="search-box search-box_sticky">
<u-search placeholder="请输入关键词搜索" v-model="keyword" height="72" :show-action="false" @change="search"
bg-color="#f0f2f6" shape="square">
</u-search>
</view>
<view class="list-cell u-p-l-20 u-p-r-20" v-for="(item, i) in list" :key="i" @click="detail(item.id)">
<view class="u-border-bottom list-item u-font-28 u-flex">
<u-avatar :src="baseURL+item.headIcon"></u-avatar>
<view class="list-cell-txt">
<view class="u-font-30 u-m-b-4" style="color: #303133;font-size: 28rpx;">
{{item.realName}}/{{item.account}}
</view>
<view class="u-font-24 department u-m-t-4">{{item.department}}</view>
</view>
</view>
</view>
</mescroll-body>
</view>
</template>
<script>
import {
getImUser
} from '@/api/common.js'
import resources from '@/libs/resources.js'
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
import IndexMixin from './mixin.js'
export default {
mixins: [MescrollMixin, IndexMixin],
data() {
return {
downOption: {
use: true,
auto: true
},
upOption: {
page: {
num: 0,
size: 20,
time: null
},
empty: {
use: true,
icon: resources.message.nodata,
tip: "暂无数据",
fixed: true,
top: "300rpx",
},
textNoMore: '没有更多数据',
},
keyword: '',
list: []
}
},
computed: {
baseURL() {
return this.define.baseURL
}
},
methods: {
upCallback(page) {
let query = {
currentPage: page.num,
pageSize: page.size,
keyword: this.keyword
}
getImUser(query, {
load: page.num == 1
}).then(res => {
this.mescroll.endSuccess(res.data.list.length);
if (page.num == 1) this.list = [];
const list = res.data.list;
this.list = this.list.concat(list);
}).catch(() => {
this.mescroll.endErr();
})
},
search() {
// ,
this.searchTimer && clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.list = [];
this.mescroll.resetUpScroll();
}, 300)
},
detail(id) {
uni.navigateTo({
url: '/pages/message/userDetail/index?userId=' + id,
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #eef0f4;
}
.contacts-v {
.list-cell {
width: 100%;
background-color: #fff;
.list-item {
box-sizing: border-box;
overflow: hidden;
color: $u-content-color;
height: 136rpx;
.list-cell-txt {
margin-left: 20rpx;
.department {
color: #909399;
font-size: 24rpx;
}
}
}
}
}
</style>

@ -1,321 +0,0 @@
<template>
<view class="index-v">
<view class="search-box_sticky">
<view class="reply-item u-border-bottom u-flex " @click="openPage('/pages/message/message/index?type=')">
<view class="reply-item-img-sysMsg reply-item-icon u-flex u-row-center reply-item-icon-color2">
<text class="icon-ym icon-ym-xitong" />
</view>
<view class="reply-item-txt u-flex-1">
<view class="reply-item-cell reply-item-title u-flex u-row-between">
<text class="title">站内消息</text>
<text
class="u-font-24">{{msgInfo.messageDate?$u.timeFormat(msgInfo.messageDate, 'mm-dd hh:MM'):''}}</text>
</view>
<view class="reply-item-cell u-flex u-row-between">
<text class="reply-item-txt-msg u-line-1 againColor">{{msgInfo.messageText}}</text>
<u-badge type="error" :count="msgInfo.messageCount" :absolute="false"
v-if="msgInfo.messageCount" />
</view>
</view>
</view>
<view class="reply-item u-border-bottom u-flex " @click="openPage('./contacts')">
<view class="reply-item-img-sysMsg reply-item-icon u-flex u-row-center reply-item-icon-color">
<text class="icon-ym icon-ym-contacts" />
</view>
<view class="reply-item-txt u-flex-1">
<view class="reply-item-cell reply-item-title u-flex u-row-between" style="margin: 0;">
<text class="title">通讯录</text>
</view>
</view>
</view>
</view>
<mescroll-body ref="mescrollRef" @down="downCallback" :sticky="false" :up="upOption" :bottombar="false">
<view class="replyList">
<view class="flow-list">
<view class="flow-list-box">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item v-for="(item, index) in list" :key="item.id" :right-options="options"
@click="relocation(item.id)">
<view class="reply-item u-border-bottom u-flex" @click="toIm(item)" :id="'item'+index"
ref="mydom">
<view class="reply-item-img">
<u-avatar :src="baseURL+item.headIcon" mode="square" size="96" />
</view>
<view class="reply-item-txt u-flex-1">
<view class="reply-item-cell reply-item-title u-flex u-row-between">
<text class="title">{{item.realName}}/{{item.account}}</text>
<text class="u-font-24 againColor">{{item.latestDate|toDateText}}</text>
</view>
<view class="reply-item-cell u-flex u-row-between">
<text
class="reply-item-txt-msg u-line-1 againColor">{{getMsgText(item.latestMessage,item.messageType)}}</text>
<u-badge type="error" :count="item.unreadMessage" :absolute="false" />
</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
</view>
</mescroll-body>
</view>
</template>
<script>
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
import IndexMixin from './mixin.js'
import {
mapGetters
} from "vuex"
import {
getIMReply,
relocation
} from '@/api/message.js'
export default {
mixins: [MescrollMixin, IndexMixin],
data() {
return {
keyword: '',
list: [],
options: [{
text: '移除',
style: {
backgroundColor: '#dd524d'
}
}],
upOption: {
use: false
}
}
},
watch: {
badgeNum(val) {
this.setTabBarBadge()
},
},
computed: {
...mapGetters(['msgInfo']),
baseURL() {
return this.define.baseURL
},
report() {
return this.define.report
},
token() {
return this.$store.getters.token
},
},
onLoad() {
uni.$on('updateList', data => {
this.updateReply(data)
})
uni.$on('updateMsgNum', id => {
this.updateMsgNum(id)
})
},
onUnload() {
uni.$off('updateList')
uni.$off('updateMsgNum')
},
methods: {
relocation(id) {
relocation(id).then(res => {
getIMReply().then(res => {
this.list = res.data.list || [];
this.mescroll.endSuccess(res.data.list.length, false);
uni.hideLoading()
}).catch(() => {
this.mescroll.endErr();
})
}).catch(() => {})
},
isJSON(str) {
try {
var obj = JSON.parse(str);
if (typeof obj == 'object' && obj) {
return true;
} else {
return false;
}
} catch (e) {
return false;
}
},
downCallback(page) {
getIMReply().then(res => {
this.list = res.data.list || [];
this.mescroll.endSuccess(res.data.list.length, false);
uni.hideLoading()
}).catch(() => {
this.mescroll.endErr();
})
},
search() {
return
this.searchTimer && clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.list = [];
this.mescroll.resetUpScroll();
}, 300)
},
updateReply(data) {
let boo = false
const len = this.list.length
for (let i = 0; i < len; i++) {
if (data.id === this.list[i].id) {
this.list[i].unreadMessage += data.unreadMessage
this.list[i].latestMessage = data.latestMessage
this.list[i].messageType = data.messageType
this.list[i].latestDate = data.latestDate
boo = true
break
}
}
if (boo) return
data.unreadMessage = data.unreadMessage
this.list.unshift(data)
},
updateMsgNum(id) {
const len = this.list.length
for (let i = 0; i < len; i++) {
if (id === this.list[i].id) {
const num = this.list[i].unreadMessage
this.$store.commit('chat/REDUCE_BADGE_NUM', num)
this.list[i].unreadMessage = 0
break
}
}
},
getMsgText(text, type) {
if (!text) return ""
let message = ''
switch (type) {
case 'voice':
message = '[语音]'
break;
case 'image':
message = '[图片]'
break;
default:
message = text
break;
}
return message
},
openPage(path) {
if (!path) return
uni.navigateTo({
url: path
})
},
toIm(item) {
const name = item.realName + '/' + item.account
if (item.unreadMessage) {
this.$store.commit('chat/REDUCE_BADGE_NUM', item.unreadMessage)
item.unreadMessage = 0
}
uni.navigateTo({
url: '/pages/message/im/index?name=' + name + '&formUserId=' + item.id + '&headIcon=' + item
.headIcon
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #f0f2f6;
}
.index-v {
.search-box_sticky {
margin-bottom: 20rpx;
padding: 0 20rpx;
}
.replyList {
padding: 0 20rpx;
background-color: #fff;
.againColor {
color: #909399;
}
}
.reply-item {
height: 132rpx;
background-color: #fff;
.reply-item-img-sysMsg {
width: 96rpx;
height: 96rpx;
border-radius: 16rpx;
overflow: hidden;
margin-right: 16rpx;
flex-shrink: 0;
}
.reply-item-img {
width: 96rpx;
height: 96rpx;
border-radius: 50%;
overflow: hidden;
margin-right: 16rpx;
flex-shrink: 0;
}
.reply-item-icon-color {
background-color: #2bd34f;
}
.reply-item-icon-color2 {
background-color: #3B87F7;
}
.reply-item-icon {
.icon-ym {
color: #fff;
font-size: 50rpx;
}
}
.reply-item-txt {
.reply-item-cell {
height: 40rpx;
color: #C6C6C6;
font-size: 24rpx;
&.reply-item-title {
height: 44rpx;
margin-bottom: 4px;
.title {
font-size: 28rpx;
color: #303133;
}
}
.reply-item-txt-msg {
width: 480rpx;
}
}
}
}
}
.search-box_sticky {
padding: 0 32rpx;
}
.flow-list .uni-swipe {
margin-bottom: 0px !important;
border-radius: 0px !important;
}
.flow-list .flow-list-box {
margin: 0px !important;
}
</style>

@ -1,27 +0,0 @@
import {
mapGetters
} from "vuex"
export default {
computed: {
...mapGetters(['badgeNum']),
},
onShow() {
this.setTabBarBadge()
},
methods: {
setTabBarBadge() {
const badgeNum = this.badgeNum
if (badgeNum) {
uni.setTabBarBadge({
index: 3,
text: badgeNum > 99 ? '99+' : badgeNum.toString()
});
} else {
uni.removeTabBarBadge({
index: 3
});
}
}
}
}

@ -1,276 +0,0 @@
<template>
<view class="my-v" v-if="loading">
<view class="u-flex user-box u-p-l-20 u-p-r-10 u-p-b-20">
<view class="u-m-r-10">
<u-avatar size="140" @click='chooseAvatar' :src='avatarSrc'></u-avatar>
</view>
<view class="u-flex-1 f-right" @click="personalPage('/pages/my/personalData/index')">
<view class="u-font-18 u-m-l-16">{{baseInfo.realName}}</view>
<view class="u-m-l-10 u-p-10">
<u-icon name="arrow-right" color="#969799" size="28"></u-icon>
</view>
</view>
</view>
<view class="u-m-t-20">
<view class="" style="background-color: #fff;">
<u-cell-group style="padding: 0 20rpx;" :border="false">
<!-- <u-cell-item title="我的组织" @click="openPage('/pages/my/business/index','Organize')"
:title-style="titleStyle">
<text class="icon-ym icon-ym-zuzhi u-m-r-16 u-font-36" slot="icon" style="color: #303133;" />
</u-cell-item>
<u-cell-item title=" 我的岗位" @click="openPage('/pages/my/business/index','Position')"
:title-style="titleStyle">
<text class="icon-ym icon-ym-position1 u-m-r-16 u-font-36" slot="icon"
style="color: #303133;" />
</u-cell-item>
<u-cell-item title="我的下属" @click="openPage('/pages/my/subordinate/index')"
:title-style="titleStyle">
<text class="icon-ym icon-ym-generator-section u-m-r-16 u-font-36" slot="icon"
style="color: #303133;" />
</u-cell-item> -->
<u-cell-item title="已完成订单" @click="openPage('/pages/my/business/index','Organize')"
:title-style="titleStyle">
<text class="icon-ym icon-ym-zuzhi u-m-r-16 u-font-36" slot="icon" style="color: #303133;" />
</u-cell-item>
<u-cell-item title="联系我们" @click="openPage('/pages/my/business/index','Position')"
:title-style="titleStyle">
<text class="icon-ym icon-ym-position1 u-m-r-16 u-font-36" slot="icon"
style="color: #303133;" />
</u-cell-item>
<u-cell-item title="自动接单" @click="openPage('/pages/my/subordinate/index')"
:title-style="titleStyle">
<text class="icon-ym icon-ym-generator-section u-m-r-16 u-font-36" slot="icon"
style="color: #303133;" />
</u-cell-item>
<u-cell-item title="设置" @click="openPage('/pages/my/settings/index')" :title-style="titleStyle"
:border-bottom="false">
<text class="icon-ym icon-ym-shezhi u-m-r-16 u-font-36" slot="icon" style="color: #303133;" />
</u-cell-item>
<u-cell-item title="消息列表" @click="openPage('/pages/my/settings/index')" :title-style="titleStyle"
:border-bottom="false">
<text class="icon-ym icon-ym-shezhi u-m-r-16 u-font-36" slot="icon" style="color: #303133;" />
</u-cell-item>
</u-cell-group>
</view>
</view>
<view class="u-p-t-20">
<view class="logout-cell" hover-class="u-cell-hover" @click="logout">退</view>
</view>
</view>
</template>
<script>
import IndexMixin from './mixin.js'
import {
UpdateAvatar
} from '@/api/common'
import {
UserSettingInfo
} from '@/api/common'
export default {
mixins: [IndexMixin],
data() {
return {
titleStyle: {
color: '#303133'
},
avatarSrc: '',
baseInfo: {},
loading: false
}
},
computed: {
baseURL() {
return this.define.comUploadUrl
},
baseURL2() {
return this.define.baseURL
},
token() {
return this.$store.getters.token
},
report() {
return this.define.report
}
},
onShow() {
UserSettingInfo().then(res => {
this.baseInfo = res.data || {}
this.avatarSrc = this.baseURL2 + this.baseInfo.avatar
this.loading = true
})
},
methods: {
chooseAvatar() {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
success: (res) => {
let tempFilePaths = res.tempFilePaths[0]
uni.uploadFile({
url: this.baseURL + 'userAvatar',
filePath: tempFilePaths,
name: 'file',
header: {
'Authorization': this.token
},
success: (uploadFileRes) => {
let data = JSON.parse(uploadFileRes.data)
UpdateAvatar(data.data.name).then(res => {
this.$u.toast('头像更换成功')
this.avatarSrc = this.baseURL2 + data.data.url
})
},
fail: (err) => {
this.$u.toast('头像更换失败')
}
});
}
});
},
openPage(path, type) {
if (!path) return
let url = !!type ? path + '?majorType=' + type : path
uni.navigateTo({
url: url
})
},
personalPage(path) {
if (!path) return
uni.navigateTo({
url: path + '?baseInfo=' + encodeURIComponent(JSON
.stringify(this.baseInfo))
})
},
isJSON(str) {
try {
var obj = JSON.parse(str);
if (typeof obj == 'object' && obj) {
return true;
} else {
return false;
}
} catch (e) {
return false;
}
},
logout() {
uni.showModal({
title: '提示',
content: '确定退出当前账号吗?',
success: res => {
if (res.confirm) {
this.$store.dispatch('user/logout').then(() => {
uni.closeSocket()
uni.reLaunch({
url: '/pages/login/index'
})
})
}
}
})
},
scanCode() {
uni.scanCode({
success: res => {
if (this.isJSON(res.result.trim())) {
const result = JSON.parse(res.result.trim())
if (result.t === 'ADP') {
let config = {
isPreview: 1,
moduleId: result.id,
previewType: result.previewType
}
uni.navigateTo({
url: '/pages/apply/dynamicModel/index?config=' + this.base64
.encode(JSON.stringify(config), "UTF-8"),
fail: (err) => {
this.$u.toast("暂无此页面")
}
})
}
if (result.t === 'DFD') {
uni.navigateTo({
url: '/pages/apply/dynamicModel/scanForm?config=' + JSON.stringify(
result),
fail: (err) => {
this.$u.toast("暂无此页面")
}
})
}
if (result.t === 'WFP') {
uni.navigateTo({
url: '/pages/workFlow/scanForm/index?config=' + JSON.stringify(
result),
fail: (err) => {
this.$u.toast("暂无")
}
})
}
if (result.t === 'report') {
let url =
`${this.report}/preview.html?id=${result.id}&token=${this.token}&page=1&from=menu`
uni.navigateTo({
url: '/pages/apply/externalLink/index?url=' +
encodeURIComponent(
url) + '&fullName= ' + result.fullName,
fail: (err) => {
this.$u.toast("暂无")
}
})
}
if (result.t === 'portal') {
uni.navigateTo({
url: '/pages/index/scanProtal?id=' + result.id,
fail: (err) => {
this.$u.toast("暂无")
}
})
}
} else {
uni.navigateTo({
url: '/pages/my/scanResult/index?result=' + res.result,
fail: (err) => {
this.$u.toast("暂无此页面")
}
})
}
}
});
}
}
}
</script>
<style lang="scss">
page {
background-color: #f0f2f6;
}
.my-v {
/deep/ .u-cell {
height: 112rpx;
padding: 0;
}
.user-box {
background-color: #fff;
}
.logout-cell {
text-align: center;
font-size: 28rpx;
height: 112rpx;
background-color: #fff;
color: #d9001b;
line-height: 112rpx;
}
.f-right {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
text-align: center;
}
}
</style>

@ -1,180 +0,0 @@
<template>
<view class="reportLog-v">
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :sticky="true"
:down="downOption" :up="upOption" :bottombar="false">
<view class="search-box_sticky">
<u-tabs :list="tabsList" :current="current" @change="change" :is-scroll='false'>
</u-tabs>
<!-- <view class="search-box">
<u-search placeholder="请输入关键词搜索" v-model="keyword" height="72" :show-action="false" @change="search"
bg-color="#f0f2f6" shape="square">
</u-search>
</view> -->
</view>
<view class="log-list" v-for="(item, index) in list" :key="index">
<u-swipe-action :index="index" :show="item.show" @click="handleClick" @open="open" :options="options"
@content-click="goDetail(item.id)">
<view class="log-list-txt u-flex-col">
<view class="u-font-30 u-flex u-m-b-10 log-title">
<text class="title u-line-1">{{item.title}}</text>
<text>{{item.creatorTime | date('mm-dd')}}</text>
</view>
<text class="u-m-t-10">{{userInfo.userName}}/{{userInfo.userAccount}}</text>
</view>
</u-swipe-action>
</view>
</mescroll-body>
<!-- <view class="com-addBtn" @click="goDetail()">
<u-icon name="plus" size="60" color="#fff" />
</view> -->
</view>
</template>
<script>
import {
getSendList,
getReceiveList,
delLog,
getOrderList
} from '@/api/apply/reportLog.js'
import resources from '@/libs/resources.js'
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
export default {
mixins: [MescrollMixin],
data() {
return {
downOption: {
use: true,
auto: true
},
upOption: {
page: {
num: 0,
size: 20,
time: null
},
empty: {
use: true,
icon: resources.message.nodata,
tip: "暂无数据",
fixed: true,
top: "300rpx",
},
textNoMore: '没有更多数据',
},
current: 0,
tabsList: [{
name: '待接单'
},
{
name: '进行中'
}
],
keyword: '',
list: [],
userInfo: {},
options: [{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}]
}
},
onLoad() {
this.userInfo = uni.getStorageSync('userInfo') || {}
uni.$on('refresh', () => {
this.list = [];
this.current = 0
this.mescroll.resetUpScroll();
})
},
onUnload() {
uni.$off('refresh')
},
methods: {
upCallback(page) {
const method = this.current ? getReceiveList : getSendList
let query = {
currentPage: page.num,
pageSize: page.size,
keyword: this.keyword
}
getOrderList(query, {
load: page.num == 1
}).then(res => {
debugger
this.mescroll.endSuccess(res.data.list.length);
if (page.num == 1) this.list = [];
const list = res.data.list.map(o => ({
show: false,
...o
}));
this.list = this.list.concat(list);
}).catch(() => {
this.mescroll.endErr();
})
},
open(index) {
this.list[index].show = true;
this.list.map((val, idx) => {
if (index != idx) this.list[idx].show = false;
})
},
handleClick(index, index1) {
const item = this.list[index]
delLog(item.id).then(res => {
this.$u.toast(res.msg)
this.list.splice(index, 1)
if (!this.list.length) this.mescroll.resetUpScroll()
})
},
goDetail(id) {
const url = './form?type=' + this.current + (id ? '&id=' + id : '')
uni.navigateTo({
url: url
})
},
change(index) {
this.current = index;
this.mescroll.resetUpScroll()
},
search() {
this.searchTimer && clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.list = [];
this.mescroll.resetUpScroll();
}, 300)
}
}
}
</script>
<style lang="scss">
page {
background-color: #f0f2f6;
}
.reportLog-v {
.log-list {
width: 100%;
margin-bottom: 20rpx;
color: #9a9a9a;
.log-list-txt {
padding: 16rpx 32rpx;
.log-title {
justify-content: space-between;
.title {
color: #333333;
width: 500rpx;
}
}
}
}
}
</style>

@ -1,123 +0,0 @@
<template>
<view class="scan-v">
<mescroll-body ref="mescrollRef" @down="downCallback" :down="downOption" :sticky="true" @up="upCallback"
:up="upOption" :bottombar="false" style="min-height: 100%" @init="mescrollInit">
<view class="portal-v">
<view v-if="formData.length">
<view class="portal-box" v-for="(item,index) in formData" :key="index">
<portalItem :item='item' ref="portalItem" :protalData="formData"></portalItem>
</view>
</view>
<view v-else class="portal-v portal-nodata">
<view class="u-flex-col" style="align-items: center;">
<u-image width="280rpx" height="280rpx" :src="emptyImg"></u-image>
<text class="u-m-t-20" style="color: #909399;">暂无数据</text>
</view>
</view>
</view>
</mescroll-body>
</view>
</template>
<script>
import portalItem from '@/components/visualPortal/components/index.vue'
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js"
import {
getPreviewPortal
} from '@/api/portal/portal.js'
import {
auth
} from '@/api/portal/portal.js'
import resources from '@/libs/resources.js'
export default {
mixins: [MescrollMixin],
components: {
portalItem
},
data() {
return {
id: '',
show: false,
formData: [],
dataList: [],
emptyImg: resources.message.nodata,
fullName: '',
downOption: {
use: true,
auto: true
},
upOption: {
page: {
num: 0,
size: 50,
time: null
},
empty: {
use: false,
},
textNoMore: '没有更多数据',
},
protalType: 1
}
},
onLoad(e) {
this.id = e.id
this.protalType = e.protalType
this.fullName = e.fullName
uni.setNavigationBarTitle({
title: this.fullName || '门户预览'
})
uni.$on('refresh', () => {
this.formData = [];
this.mescroll.resetUpScroll();
})
},
methods: {
upCallback(keyword) {
const method = this.protalType == 1 ? auth : getPreviewPortal
if (this.protalType != 1) this.mescroll.lockDownScroll(true);
method(this.id).then(res => {
let data = res.data.formData ? JSON.parse(res.data.formData) : {};
this.formData = data.layout ? JSON.parse(JSON.stringify(data.layout)) : [];
this.mescroll.endSuccess(this.formData.length);
if (!this.formData.length) return
this.handelFormData(data)
}).catch(() => {
this.mescroll.endSuccess(0);
this.mescroll.endErr();
})
},
handelFormData(data) {
const loop = (list) => {
list.forEach(o => {
o.allRefresh = data.refresh
o.show = false
if (o.visibility && o.visibility.length && o.visibility.includes('app')) o.show =
true
if (o.children && o.children.length) loop(o.children)
})
this.key = +new Date()
}
loop(this.formData)
this.dataList = this.formData.filter(o => o.show)
if (this.dataList.length < 1) {
this.formData = this.dataList
}
},
}
}
</script>
<style lang="scss">
page {
background-color: #f0f2f6;
}
/deep/.portal-nodata {
position: absolute;
top: 450rpx;
width: 100%;
text-align: center;
z-index: 100;
background-color: #f0f2f6;
}
</style>

@ -1,409 +0,0 @@
<template>
<view class="workFlow-v">
<view class="search-box_sticky">
<view class="head-tabs u-flex">
<view class="head-tabs-item" @click="openPage('/pages/workFlow/flowLaunch/index')">
<text class="icon-ym icon-ym-flowLaunch-app u-m-r-4 icon-style" />
<text>我发起的</text>
</view>
<view class="head-tabs-item" @click="openPage('/pages/workFlow/flowTodo/index')">
<text class="icon-ym icon-ym-flowTodo-app u-m-r-4 icon-style" />
<text>待办事宜</text>
<u-badge type="error" class="badge" :count="count" :absolute="true" :offset="offset">
</u-badge>
</view>
<view class="head-tabs-item" @click="openPage('/pages/workFlow/flowDone/index')">
<text class="icon-ym icon-ym-flowDone-app u-m-r-4 icon-style" />
<text>已办事宜</text>
</view>
<view class="head-tabs-item" @click="openPage('/pages/workFlow/flowCopy/index')">
<text class="icon-ym icon-ym-flowCopy-app u-m-r-4 icon-style" />
<text>抄送我的</text>
</view>
<view class="head-tabs-item" @click="openPage('/pages/workFlow/entrust/index')">
<text class="icon-ym icon-ym-flowEntrust-app u-m-r-4 icon-style" />
<text>流程委托</text>
</view>
</view>
<view class="search-box">
<u-search placeholder="请输入关键词搜索" v-model="keyword" height="72" :show-action="false" @change="search"
bg-color="#f0f2f6" shape="square">
</u-search>
</view>
</view>
<mescroll-body ref="mescrollRef" @down="downCallback" :down="downOption" :sticky="false" @up="upCallback"
:up="upOption" :bottombar="false" style="min-height: 100%" @init="mescrollInit">
<view class="common-block">
<view class="caption">常用表单</view>
<view class="u-flex u-flex-wrap">
<view class="item u-flex-col u-col-center" v-for="(item, i) in usualList" :key="i"
@click="handelClick(item, 1)">
<text class="u-font-40 item-icon" :class="item.icon"
:style="{ background: item.iconBackground || '#008cff' }" />
<text class="u-font-24 u-line-1 item-text">{{ item.fullName }}</text>
</view>
<view class="item u-flex-col u-col-center" @click="moreApp">
<text class="u-font-40 item-icon more">+</text>
<text class="u-font-24 u-line-1 item-text">添加</text>
</view>
</view>
</view>
<u-tabs :list="categoryList" :current="current" @change="change" :is-scroll="true" name="fullName">
</u-tabs>
<view class="workFlow-list">
<view class="part">
<view class="caption u-line-1" v-if="list.length >= 1">{{
current === 0 ? "全部流程" : fullName
}}</view>
<view class="u-flex u-flex-wrap">
<view class="item u-flex-col u-col-center" v-for="(child, ii) in list" :key="ii"
@click="handelClick(child)">
<text class="u-font-40 item-icon" :class="child.icon"
:style="{ background: child.iconBackground || '#008cff' }" />
<text class="u-font-24 u-line-1 item-text">{{
child.fullName
}}</text>
</view>
</view>
</view>
</view>
</mescroll-body>
<u-picker mode="selector" v-model="show" :default-selector="[0]" title="请选择流程" :range="selector"
range-key="fullName" @confirm="confirm"></u-picker>
</view>
</template>
<script>
import {
FlowEngineListAll,
FlowEnginePageList,
getFlowTodoCount,
FlowJsonList,
} from "@/api/workFlow/flowEngine";
import {
getUsualList
} from "@/api/apply/apply.js";
import resources from "@/libs/resources.js";
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
import IndexMixin from "./mixin.js";
import {
mapGetters
} from "vuex";
export default {
mixins: [MescrollMixin, IndexMixin],
data() {
return {
selector: [],
show: false,
activeFlow: {},
templateList: [],
count: 0,
offset: [-12, 55],
usualList: [],
downOption: {
use: true,
auto: true,
},
className: "",
upOption: {
page: {
num: 0,
size: 50,
time: null,
},
empty: {
use: true,
icon: resources.message.nodata,
tip: "暂无数据",
fixed: false,
top: "560rpx",
},
textNoMore: "没有更多数据",
},
keyword: "",
category: "",
current: 0,
categoryList: [{
fullName: "全部流程",
}, ],
list: [],
fullName: "",
loading: false,
selectFlowValue: 0,
enCode: "",
};
},
onLoad() {
uni.$on("updateUsualList", (data) => {
this.getUsualList();
});
this.getPaymentMethodOptions();
uni.$on("refresh", () => {
this.list = [];
this.current = 0;
this.mescroll.resetUpScroll();
});
},
onUnload() {
uni.$off("updateUsualList");
},
onShow() {
this.keyword = ""
this.setFlowTodoCount()
},
methods: {
setFlowTodoCount() {
const query = {
flowCirculateType: [],
flowDoneType: [],
toBeReviewedType: [],
}
getFlowTodoCount(query).then((res) => {
this.count = res.data.toBeReviewed || 0;
})
.catch(() => {});
},
openPage(path) {
if (!path) return;
uni.navigateTo({
url: path,
});
},
upCallback(page) {
this.$nextTick(() => {
this.getUsualList();
});
let query = {
currentPage: page.num,
pageSize: page.size,
keyword: this.keyword,
category: this.category == 0 ? "" : this.category,
flowType: 0,
};
this.loading = false;
FlowEnginePageList(query, {
load: page.num == 1,
})
.then((res) => {
let resData = res.data.list || [];
this.mescroll.endSuccess(resData.length);
if (page.num == 1) this.list = [];
const list = resData.map((o) => ({
show: false,
...o,
}));
this.list = this.list.concat(list);
this.loading = true;
})
.catch(() => {
this.mescroll.endErr();
});
},
search() {
this.searchTimer && clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.list = [];
this.mescroll.resetUpScroll();
}, 300);
},
change(index) {
this.current = index;
this.fullName = this.categoryList[index].fullName;
this.category = this.categoryList[index].id ?
this.categoryList[index].id :
"";
this.list = [];
this.mescroll.resetUpScroll();
},
//
getUsualList() {
getUsualList(1).then((res) => {
this.usualList = res.data.list.map((o) => {
const objectData = o.objectData ? JSON.parse(o.objectData) : {};
return {
...o,
...objectData,
};
});
});
},
getPaymentMethodOptions() {
this.$store
.dispatch("base/getDictionaryData", {
sort: "WorkFlowCategory",
})
.then((res) => {
res.forEach((i) => {
this.categoryList.push(i);
});
});
},
moreApp() {
uni.navigateTo({
url: "/pages/workFlow/allApp/index?categoryList=" +
encodeURIComponent(JSON.stringify(this.categoryList)),
});
},
confirm(e) {
this.activeFlow = this.templateList[e[0]];
this.Jump();
},
Jump() {
const config = {
id: "",
flowId: this.activeFlow.id,
opType: "-1",
fullName: this.activeFlow.fullName,
enCode: this.enCode,
};
uni.navigateTo({
url: "/pages/workFlow/flowBefore/index?config=" +
this.base64.encode(JSON.stringify(config), "UTF-8"),
});
},
handelClick(item, type) {
this.enCode = item.enCode;
FlowJsonList(item.id, "1").then((res) => {
this.templateList = res.data;
if (!this.templateList.length) {
this.$u.toast("流程不存在");
} else {
if (this.templateList.length > 1) {
this.show = true;
this.selector = this.templateList;
} else {
this.activeFlow = this.templateList[0];
this.Jump();
}
}
});
},
},
};
</script>
<style lang="scss">
page {
background-color: #f0f2f6;
}
.workFlow-v {
.common-block {
background: #fff;
margin-bottom: 20rpx;
.caption {
padding-left: 32rpx;
font-size: 36rpx;
line-height: 100rpx;
font-weight: bold;
}
.item {
margin-bottom: 32rpx;
width: 25%;
.item-icon {
width: 88rpx;
height: 88rpx;
margin-bottom: 8rpx;
line-height: 88rpx;
text-align: center;
border-radius: 20rpx;
color: #fff;
font-size: 56rpx;
&.more {
background: #ececec;
color: #666666;
font-size: 50rpx;
}
}
.item-text {
width: 100%;
text-align: center;
padding: 0 16rpx;
}
}
}
.search-box_sticky {
margin-bottom: 20rpx;
.search-box {
padding: 20rpx;
}
}
.head-tabs {
width: 100%;
padding: 0 32rpx;
height: 132rpx;
overflow-x: scroll;
.head-tabs-item {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #303133;
line-height: 40rpx;
flex-shrink: 0;
position: relative;
.icon-style {
font-size: 48rpx;
color: #303133;
margin-bottom: 24rpx;
}
}
}
.workFlow-list {
margin-top: 20rpx;
.part {
background: #fff;
margin-bottom: 20rpx;
.caption {
padding-left: 32rpx;
font-size: 36rpx;
line-height: 100rpx;
font-weight: bold;
}
.item {
margin-bottom: 32rpx;
width: 25%;
.item-icon {
width: 88rpx;
height: 88rpx;
margin-bottom: 8rpx;
line-height: 88rpx;
text-align: center;
border-radius: 20rpx;
color: #fff;
font-size: 56rpx;
&.more {
background: #ececec;
color: #666666;
font-size: 50rpx;
}
}
.item-text {
width: 100%;
text-align: center;
padding: 0 16rpx;
}
}
}
}
}
</style>

@ -7,7 +7,7 @@
<view class="launch-img">
<image :src="startup" mode="widthFix"></image>
</view>
<view class="copyright">©2020-2025 上海长江电气设备集团有限公司</view>
<view class="copyright">Copyright © 2023 引迈信息技术有限公司出品</view>
</view>
<!-- #endif -->
</view>

@ -8,14 +8,14 @@
</u-image>
</u-image>
</view>
<!-- <view class="login-version">
<view class="login-version">
<view class="login-version-text">{{sysConfigInfo.sysVersion || define.sysVersion}}</view>
</view> -->
</view>
</view>
<view class="logo-hd u-flex-col">
<view class="loginSwitch u-flex-col">
<view class="loginInputBox u-flex-col">
<!-- <u-form :model="formData" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
<view class="loginInputBox u-flex-col" v-show="!isSso && !ssoLoading">
<u-form :model="formData" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-width="150" label-align="left">
<u-form-item prop="account">
<u-input input-align='left' v-model="formData.account" placeholder="请输入帐号" @focus="onFocus"
@ -36,15 +36,11 @@
</view>
</view>
</u-form-item>
</u-form> -->
<!-- <view class="loginBtnBox u-m-t-64">
</u-form>
<view class="loginBtnBox u-m-t-64">
<u-button @click="login" type="primary" :loading="loading">{{ loading ? "登录中...":"登录"}}
</u-button>
</view> -->
<button class="button phone" open-type="getPhoneNumber" @getphonenumber="onGetphonenumber">
<text class="icon icon-phone"></text>
手机号快捷登录
</button>
</view>
<template v-if="socialsList.length">
<u-divider margin-top='40' margin-bottom='40' half-width='100%'>其他登录方式</u-divider>
<view class="other-list">
@ -115,7 +111,6 @@
<script>
import {
login,
loginWxMinAPI,
getCodeConfig,
getCallback,
otherlogin,
@ -178,7 +173,7 @@
}
},
onReady() {
// this.$refs.dataForm.setRules(this.rules);
this.$refs.dataForm.setRules(this.rules);
},
onLoad(options) {
this.ssoTicket = uni.getStorageSync('ssoTicket')
@ -186,18 +181,18 @@
this.appIcon = !!this.sysConfigInfo.appIcon ? this.baseURL + this.sysConfigInfo.appIcon :
'/static/logo.png'
this.sysName = !!this.sysConfigInfo.companyName ? this.sysConfigInfo.sysName :
'易回收平台'
'JNPF快速开发平台'
this.copyright = !!this.sysConfigInfo.copyright ? this.sysConfigInfo.copyright :
this.define.copyright
// let needCode = uni.getStorageSync('app_loginNeedCode')
// this.isCode = needCode
// this.changeCode()
// this.getLoginConfig()
// this.formData.password = '';
// if (options.data) {
// this.tenantUserInfo = JSON.parse(options.data)
// if (this.tenantUserInfo) this.show = true
// }
let needCode = uni.getStorageSync('app_loginNeedCode')
this.isCode = needCode
this.changeCode()
this.getLoginConfig()
this.formData.password = '';
if (options.data) {
this.tenantUserInfo = JSON.parse(options.data)
if (this.tenantUserInfo) this.show = true
}
},
methods: {
loginToken(res) {
@ -252,30 +247,6 @@
}
}
},
async onGetphonenumber(ev) {
const { encryptedData, iv } = ev.detail
const res = await wx.login()
const code = res.code
const params = { code, encryptedData, iv }
loginWxMinAPI(params).then(res => {
let token = res.sessionKey
this.$store.commit('user/SET_TOKEN', token)
uni.setStorageSync('token', token)
// this.$store.dispatch('user/getCurrentUser').then((res) => {
// this.loading = false
// uni.switchTab({
// url: '/pages/index/portal'
// });
// }).catch(() => {
// this.loading = false
// })
uni.switchTab({
url: '/pages/index/portal'
});
}).catch((err) => {
this.loading = false
})
},
wechatLogin() {
// #ifdef MP-WEIXIN
getTicket().then(res => {
@ -451,62 +422,41 @@
this.timestamp = timestamp
this.imgUrl = `/api/oauth/ImageCode/${this.codeLength || 4}/${timestamp}`
},
async login() {
// this.$refs.dataForm.validate(valid => {
// if (valid) {
// this.loading = true
// let query = {
// account: this.formData.account,
// password: md5Libs.md5(this.formData.password),
// timestamp: this.timestamp,
// code: this.formData.code,
// origin: this.formData.origin,
// jnpf_ticket: this.ssoTicket
// }
// // #ifdef APP-PLUS
// const clientId = plus.push.getClientInfo().clientid;
// query.clientId = clientId
// /* unipush2.0 */
// // query.Client_Id = this.cid
// // #endif
// login(query).then(res => {
// let token = res.data.token
// this.$store.commit('user/SET_TOKEN', token)
// uni.setStorageSync('token', token)
// this.$store.dispatch('user/getCurrentUser').then((res) => {
// this.loading = false
// uni.switchTab({
// url: '/pages/index/portal'
// });
// }).catch(() => {
// this.loading = false
// })
// }).catch((err) => {
// this.loading = false
// })
// }
// });
const res = await wx.login()
const code = res.code
this.loading = true
let query = {
code:code
}
login(query).then(res => {
let token = res.data.token
this.$store.commit('user/SET_TOKEN', token)
uni.setStorageSync('token', token)
this.$store.dispatch('user/getCurrentUser').then((res) => {
this.loading = false
uni.switchTab({
url: '/pages/index/portal'
});
}).catch(() => {
this.loading = false
})
}).catch((err) => {
this.loading = false
})
login() {
this.$refs.dataForm.validate(valid => {
if (valid) {
this.loading = true
let query = {
account: this.formData.account,
password: md5Libs.md5(this.formData.password),
timestamp: this.timestamp,
code: this.formData.code,
origin: this.formData.origin,
jnpf_ticket: this.ssoTicket
}
// #ifdef APP-PLUS
const clientId = plus.push.getClientInfo().clientid;
query.clientId = clientId
/* unipush2.0 */
// query.Client_Id = this.cid
// #endif
login(query).then(res => {
let token = res.data.token
this.$store.commit('user/SET_TOKEN', token)
uni.setStorageSync('token', token)
this.$store.dispatch('user/getCurrentUser').then((res) => {
this.loading = false
uni.switchTab({
url: '/pages/index/portal'
});
}).catch(() => {
this.loading = false
})
}).catch((err) => {
this.loading = false
})
}
});
},
ssoLogin() {
getTicket().then(res => {
@ -672,24 +622,6 @@
}
}
.phone {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 80rpx;
font-size: 28rpx;
border-radius: 72rpx;
color: #fff;
background-color: #3775F6;
.icon {
font-size: 40rpx;
margin-right: 6rpx;
}
}
.copyright {
position: fixed;
bottom: 40rpx;

@ -1,794 +0,0 @@
<template>
<view class="logo-v">
<view class="login-bg">
<image src="https://app.cdn.jnpfsoft.com/image/login-bg.png" mode="widthFix"></image>
<view class="logoImg">
<u-image :src="appIcon" mode="widthFix">
<u-image slot="error" src="/static/logo.png" mode="widthFix">
</u-image>
</u-image>
</view>
<!-- <view class="login-version">
<view class="login-version-text">{{sysConfigInfo.sysVersion || define.sysVersion}}</view>
</view> -->
</view>
<view class="logo-hd u-flex-col">
<view class="loginSwitch u-flex-col">
<view class="loginInputBox u-flex-col">
<!-- <u-form :model="formData" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-width="150" label-align="left">
<u-form-item prop="account">
<u-input input-align='left' v-model="formData.account" placeholder="请输入帐号" @focus="onFocus"
@blur="onBlur">
</u-input>
</u-form-item>
<u-form-item prop="password">
<u-input input-align='left' v-model="formData.password" type="password" placeholder="请输入密码">
</u-input>
</u-form-item>
<u-form-item prop="code" required v-if="needCode">
<view class="u-flex code-box">
<u-input v-model="formData.code" placeholder="验证码" input-align='left'></u-input>
<view style="flex: 0.1;">
<u-image :showLoading="true" :src="baseURL+imgUrl" width="130px" height="38px"
@click="changeCode">
</u-image>
</view>
</view>
</u-form-item>
</u-form> -->
<!-- <view class="loginBtnBox u-m-t-64">
<u-button @click="login" type="primary" :loading="loading">{{ loading ? "登录中...":"登录"}}
</u-button>
</view> -->
<button class="button phone" open-type="getPhoneNumber" @getphonenumber="onGetphonenumber">
<text class="icon icon-phone"></text>
手机号快捷登录
</button>
<template v-if="socialsList.length">
<u-divider margin-top='40' margin-bottom='40' half-width='100%'>其他登录方式</u-divider>
<view class="other-list">
<block v-for="(item,i) in socialsList" :key="i">
<!--#ifdef MP-WEIXIN -->
<view class="other-item" v-if="item.enname==='wechat_open'" :title="item.name"
@click="wechatLogin()"><i :class="item.icon" />
</view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<!--#ifdef APP-PLUS-->
<view class="other-item" v-if="item.enname==='qq'" :title="item.name"
@click="qqOtherlogin()"><i :class="item.icon" />
</view>
<!-- #endif -->
<!-- #ifdef H5 || MP-WEIXIN -->
<view class="other-item" v-if="item.enname==='qq'" :title="item.name"
@click="otherslogin(item.enname,item.renderUrl)"><i :class="item.icon" />
</view>
<!-- #endif -->
<view class="other-item" v-else :title="item.name"
@click="otherslogin(item.enname,item.renderUrl)"><i :class="item.icon" />
</view>
<!-- #endif -->
</block>
</view>
</template>
</view>
<view class="sso-login-btn" v-show="isSso && !ssoLoading">
<u-button @click="ssoLogin" type="primary" :loading="loading">{{ loading ? "登录中...":"登录"}}
</u-button>
</view>
</view>
</view>
<view class="copyright">{{copyright}}</view>
<u-popup v-model="show" mode="left" width="90%" height="100%">
<view class="mian">
<view class='top'>
<view class='img'>
<image style="height:50rpx;width: 50rpx;text-align: center;"
src="/static/image/tabbar/contactsHL.png" mode="widthFix"></image>
</view>
<view class='title'>
请选择登录账号
</view>
</view>
<view v-for="(item,i) in tenantUserInfo" :key="i">
<view class='info' @click="socailsLogin(item)">
<view class='user-name'>
{{item.socialName}}
</view>
<view class='user-tenancy'>
租户名称 {{item.tenantName}}
</view>
<view class='user-tenancy'>
租户id{{item.tenantId}}
</view>
<view class='user-tenancy'>
账号{{item.accountName}}
</view>
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import {
login,
loginWxMinAPI,
getCodeConfig,
getCallback,
otherlogin,
getLoginConfig,
getSocialsUserList,
socialsLogin,
getTicket
} from '@/api/common.js'
import md5Libs from "uview-ui/libs/function/md5";
import resources from '@/libs/resources'
export default {
data() {
return {
imgUrl: '',
loading: false,
formData: {
account: "",
password: "",
code: "",
origin: 'password'
},
needCode: false,
codeLength: 4,
isCode: false,
rules: {
account: [{
required: true,
message: '请输入账号',
trigger: 'blur',
}],
password: [{
required: true,
message: '请输入密码',
trigger: 'blur',
}],
},
sysConfigInfo: {},
appIcon: '',
sysName: '',
copyright: '',
isCopyright: true,
socialsList: [],
show: false,
tenantUserInfo: [],
ssoLoading: true,
isSso: false,
ssoTicket: '',
ssoUrl: '',
preUrl: '',
ticketParams: "",
loginCode: '',
}
},
computed: {
baseURL() {
return this.define.baseURL
},
cid() {
return this.$store.getters.cid
}
},
onReady() {
// this.$refs.dataForm.setRules(this.rules);
},
onLoad(options) {
this.ssoTicket = uni.getStorageSync('ssoTicket')
this.sysConfigInfo = uni.getStorageSync('sysConfigInfo')
this.appIcon = !!this.sysConfigInfo.appIcon ? this.baseURL + this.sysConfigInfo.appIcon :
'/static/logo.png'
this.sysName = !!this.sysConfigInfo.companyName ? this.sysConfigInfo.sysName :
'易回收平台'
this.copyright = !!this.sysConfigInfo.copyright ? this.sysConfigInfo.copyright :
this.define.copyright
// let needCode = uni.getStorageSync('app_loginNeedCode')
// this.isCode = needCode
// this.changeCode()
// this.getLoginConfig()
// this.formData.password = '';
// if (options.data) {
// this.tenantUserInfo = JSON.parse(options.data)
// if (this.tenantUserInfo) this.show = true
// }
},
methods: {
loginToken(res) {
if (res.data.status != 2) {
//
if (res.data.status == 1) {
uni.showLoading({
title: '登录中'
})
this.$store.commit('user/SET_TOKEN', res.data.value)
uni.setStorageSync('token', res.data.value)
this.$store.dispatch('user/getCurrentUser').then((res) => {
uni.hideLoading()
uni.reLaunch({
url: '/pages/index/portal'
});
}).catch(() => {
uni.hideLoading()
uni.reLaunch({
url: '/pages/login/index'
});
})
} else if (res.data.status == 6) {
this.tenantUserInfo = JSON.parse(res.data.value)
if (this.tenantUserInfo.length == 1) {
uni.showLoading({
title: '登录中'
})
this.$store.commit('user/SET_TOKEN', res.data.value)
uni.setStorageSync('token', res.data.value)
this.$store.dispatch('user/getCurrentUser').then((res) => {
uni.hideLoading()
uni.reLaunch({
url: '/pages/index/portal'
});
}).catch(() => {
uni.hideLoading()
uni.reLaunch({
url: '/pages/login/index'
})
})
} else {
this.show = true
}
} else {
this.show = false
this.ssoUrl = ''
uni.showToast({
title: res.data.value || '操作超时,请重新点击登录',
icon: 'none'
})
}
}
},
async onGetphonenumber(ev) {
const { encryptedData, iv } = ev.detail
const res = await wx.login()
const code = res.code
const params = { code, encryptedData, iv }
loginWxMinAPI(params).then(res => {
let token = res.sessionKey
this.$store.commit('user/SET_TOKEN', token)
uni.setStorageSync('token', token)
// this.$store.dispatch('user/getCurrentUser').then((res) => {
// this.loading = false
// uni.switchTab({
// url: '/pages/index/portal'
// });
// }).catch(() => {
// this.loading = false
// })
uni.switchTab({
url: '/pages/index/portal'
});
}).catch((err) => {
this.loading = false
})
},
wechatLogin() {
// #ifdef MP-WEIXIN
getTicket().then(res => {
this.ssoTicket = res.data
uni.login({
provider: 'weixin',
success: (loginRes) => {
this.loginCode = loginRes.code
}
})
uni.getUserProfile({
desc: '获取你的昵称、头像、地区及性别',
success: (info) => {
let qurey = {
encryptedData: info.encryptedData,
iv: info.iv,
signature: info.signature,
code: this.loginCode,
jnpf_ticket: this.ssoTicket,
socialName: info.userInfo.nickName,
source: 'wechat_applets'
}
socialsLogin(qurey).then(res => {
this.loginToken(res)
})
}
})
})
// #endif
// #ifdef APP-PLUS
getTicket().then(res => {
this.ssoTicket = res.data
uni.login({
provider: 'weixin',
success: (loginRes) => {
//
uni.getUserProfile({
provider: 'weixin',
success: (info) => {
let data = {
source: 'wechat_open',
uuid: info.userInfo.unionId,
socialName: info.userInfo.nickName,
jnpf_ticket: this.ssoTicket
};
socialsLogin(data).then(res => {
this.loginToken(res)
})
},
fail: function(err) {
//
// err.code
}
})
},
fail: function(err) {
//
// err.code
}
});
})
// #endif
},
qqOtherlogin() {
getTicket().then(res => {
this.ssoTicket = res.data
uni.login({
provider: 'qq',
success: (loginRes) => {
//
uni.getUserInfo({
provider: 'qq',
success: (info) => {
let data = {
source: 'qq',
jnpf_ticket: this.ssoTicket,
socialName: info.userInfo.nickName,
uuid: info.userInfonickName.unionid,
};
socialsLogin(data).then(res => {
this.loginToken(res)
}).catch((err) => {})
// , info.authResult
}
})
},
fail: function(err) {
//
// err.code
}
});
})
},
socailsLogin(item) {
item.tenantLogin = true
socialsLogin(item).then(res => {
if (res.code == 200) {
uni.showLoading({
title: '登录中'
})
this.$store.commit('user/SET_TOKEN', res.data.token)
uni.setStorageSync('token', res.data.token)
this.$store.dispatch('user/getCurrentUser').then((res) => {
uni.hideLoading()
uni.switchTab({
url: '/pages/index/portal'
});
this.show = false
}).catch(() => {
uni.hideLoading()
uni.switchTab({
url: '/pages/login/index'
});
})
}
}).catch(() => {
uni.hideLoading()
uni.switchTab({
url: '/pages/login/index'
});
})
},
otherslogin(key, url) {
if (key === 'wechat_open') {
this.wechatLogin();
} else {
getTicket().then(res => {
this.ssoTicket = res.data
url = url.replace('JNPF_TICKET', this.ssoTicket)
uni.setStorageSync('ssoUrl', url)
uni.navigateTo({
url: `/pages/login/otherLogin?ssoTicket=` + this.ssoTicket
})
}).catch(() => {})
}
},
onFocus(e) {
this.getCodeConfig(e)
},
onBlur(e) {
this.getCodeConfig(e)
},
//
getLoginConfig() {
getLoginConfig().then(res => {
this.isSso = res.data.redirect
this.preUrl = res.data.url
this.ticketParams = res.data.ticketParams
let socialsList = res.data.socialsList || []
this.socialsList = socialsList.filter(o => o.latest && o.enname !=
'github' && o
.enname !=
'wechat_enterprise')
this.ssoLoading = false
}).catch(() => {
this.isSso = false
this.ssoLoading = false
})
},
getCodeConfig(val) {
if (!val) return
getCodeConfig(val).then(res => {
this.needCode = !!res.data.enableVerificationCode
if (this.needCode) {
this.codeLength = res.data.verificationCodeNumber || 4
this.changeCode()
}
})
},
changeCode() {
let timestamp = Math.random()
this.timestamp = timestamp
this.imgUrl = `/api/oauth/ImageCode/${this.codeLength || 4}/${timestamp}`
},
async login() {
// this.$refs.dataForm.validate(valid => {
// if (valid) {
// this.loading = true
// let query = {
// account: this.formData.account,
// password: md5Libs.md5(this.formData.password),
// timestamp: this.timestamp,
// code: this.formData.code,
// origin: this.formData.origin,
// jnpf_ticket: this.ssoTicket
// }
// // #ifdef APP-PLUS
// const clientId = plus.push.getClientInfo().clientid;
// query.clientId = clientId
// /* unipush2.0 */
// // query.Client_Id = this.cid
// // #endif
// login(query).then(res => {
// let token = res.data.token
// this.$store.commit('user/SET_TOKEN', token)
// uni.setStorageSync('token', token)
// this.$store.dispatch('user/getCurrentUser').then((res) => {
// this.loading = false
// uni.switchTab({
// url: '/pages/index/portal'
// });
// }).catch(() => {
// this.loading = false
// })
// }).catch((err) => {
// this.loading = false
// })
// }
// });
const res = await wx.login()
const code = res.code
this.loading = true
let query = {
code:code
}
login(query).then(res => {
let token = res.data.token
this.$store.commit('user/SET_TOKEN', token)
uni.setStorageSync('token', token)
this.$store.dispatch('user/getCurrentUser').then((res) => {
this.loading = false
uni.switchTab({
url: '/pages/index/portal'
});
}).catch(() => {
this.loading = false
})
}).catch((err) => {
this.loading = false
})
},
ssoLogin() {
getTicket().then(res => {
this.ssoTicket = res.data
this.ssoUrl = this.preUrl + '?' + this.ticketParams + '=' + this.ssoTicket
uni.setStorageSync('ssoUrl', this.ssoUrl)
uni.navigateTo({
url: `/pages/login/otherLogin?ssoTicket=${this.ssoTicket}`
})
})
}
}
}
</script>
<style lang="scss">
page {
width: 100%;
min-height: 100vh;
}
.logo-v {
height: 100vh;
display: flex;
flex-direction: column;
.login-version {
position: fixed;
right: 0px;
top: 0px;
width: 120rpx;
height: 120rpx;
background: url('../../static/image/login_version.png') no-repeat center;
background-size: 100%;
.login-version-text {
width: 120rpx;
height: 120rpx;
line-height: 70rpx;
text-align: center;
color: #fff;
font-size: 28rpx;
transform: rotate(45deg);
}
}
.login-bg {
height: 500rpx;
position: relative;
image {
width: 100%;
height: 100%;
}
.logoImg {
width: 160rpx;
height: 160rpx;
margin: 0 auto;
position: absolute;
/* #ifdef APP-PLUS */
bottom: -90rpx;
/* #endif */
/* #ifndef APP-PLUS */
bottom: 0;
/* #endif */
left: 0;
right: 0;
/deep/uni-image {
border-radius: 10px !important;
}
image {
width: 100%;
height: 100%;
border-radius: 20%;
}
}
}
.logo-hd {
width: 100%;
.introduce {
justify-content: center;
align-items: center;
.text-one {
height: 70rpx;
font-weight: 700;
}
.text-two {
color: #999999;
}
}
.loginSwitch {
margin-top: 40rpx;
justify-content: center;
align-items: center;
.tabs {
color: #999999;
position: relative;
&::after {
content: "";
width: 64rpx;
height: 4rpx;
background-color: #356efe;
margin-top: 15rpx;
position: absolute;
left: 0;
bottom: -15rpx;
display: block;
border-radius: 50rpx;
}
// &.active1 {
// &::after {
// left: 0;
// }
// }
&.active2 {
&::after {
left: 70%;
}
}
.tab {
width: 50%;
height: 80upx;
text-align: center;
color: #AEAFB5;
font-size: 32upx;
&.active {
color: #3281ff;
}
}
}
.loginInputBox {
width: 100%;
/* #ifdef APP-PLUS */
margin-top: 120rpx;
/* #endif */
/* #ifndef APP-PLUS */
margin-top: 80rpx;
/* #endif */
padding: 0 64rpx;
.code-box {
width: 100%;
}
.loginBtnBox {}
}
}
}
.phone {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 80rpx;
font-size: 28rpx;
border-radius: 72rpx;
color: #fff;
background-color: #3775F6;
.icon {
font-size: 40rpx;
margin-right: 6rpx;
}
}
.copyright {
position: fixed;
bottom: 40rpx;
left: 0;
right: 0;
text-align: center;
color: #9A9A9A;
font-size: 24rpx;
}
.sso-login-btn {
width: 100%;
padding: 0 64rpx;
/* #ifdef APP-PLUS */
margin-top: 404rpx;
/* #endif */
/* #ifndef APP-PLUS */
margin-top: 364rpx;
/* #endif */
}
}
.other-list {
display: flex;
align-items: center;
justify-content: space-around;
.other-item {
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
cursor: pointer;
border-radius: 50%;
i {
font-size: 20px;
color: #a0acb7;
}
// &:hover {
// background-color: #1890ff;
// i {
// color: #fff;
// }
// }
}
}
.mian {
background: url('/static/image/tenancy.png');
height: 100%;
}
.img {
margin-top: 20rpx;
margin-left: 30%;
}
.title {
margin-top: -55rpx;
margin-left: 260rpx;
font-size: 32rpx;
}
.info {
margin: auto auto;
width: 96%;
height: 300rpx;
background-color: #fff;
margin-bottom: 20rpx;
border-radius: 10rpx;
border-left: 10rpx solid #9DC8FA;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.user-name {
font-weight: bold;
font-size: 32rpx;
margin-left: 20rpx;
margin-bottom: 20rpx;
margin-top: 30rpx;
width: 100%;
height: 60rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.user-tenancy {
font-size: 28rpx;
margin-left: 20rpx;
margin-bottom: 20rpx;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>

@ -1,110 +0,0 @@
@@ -0,0 +1,70 @@
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
import {
getTicketStatus,
socialsLogin
} from '@/api/common.js'
export default {
data() {
return {
show: false,
url: '',
ticket: '',
ssoTimer: null,
tenantUserInfo: [],
}
},
onLoad(option) {
this.url = uni.getStorageSync('ssoUrl')
this.ticket = option.ssoTicket
this.ssoTimer = setInterval(() => {
this.getTicketStatus()
}, 1000)
},
onUnload() {
this.clearTimer()
},
methods: {
getTicketStatus() {
if (!this.ticket) return
getTicketStatus(this.ticket).then(res => {
if (res.data.status != 2) {
this.clearTimer()
//
if (res.data.status == 1) {
uni.showLoading({
title: '登录中'
})
this.$store.commit('user/SET_TOKEN', res.data.value)
uni.setStorageSync('token', res.data.value)
this.$store.dispatch('user/getCurrentUser').then((res) => {
uni.hideLoading()
uni.reLaunch({
url: '/pages/index/portal'
});
}).catch(() => {
uni.hideLoading()
uni.reLaunch({
url: '/pages/login/index'
});
})
} else if (res.data.status == 4) {
uni.setStorageSync('ssoTicket', this.ticket)
uni.reLaunch({
url: '/pages/login/index'
});
} else if (res.data.status == 6) {
let tenantUserInfo = JSON.parse(res.data.value)
if (tenantUserInfo.length == 1) {
uni.showLoading({
title: '登录中'
})
this.$store.commit('user/SET_TOKEN', res.data.value)
uni.setStorageSync('token', res.data.value)
this.$store.dispatch('user/getCurrentUser').then((res) => {
uni.hideLoading()
uni.reLaunch({
url: '/pages/index/portal'
});
}).catch(() => {
uni.hideLoading()
uni.reLaunch({
url: '/pages/login/index'
})
})
} else {
uni.reLaunch({
url: '/pages/login/index?data=' + JSON.stringify(tenantUserInfo)
})
}
} else {
this.show = false
this.ssoUrl = ''
uni.showToast({
title: res.data.value || '操作超时,请重新点击登录',
icon: 'none'
})
uni.reLaunch({
url: '/pages/login/index'
});
}
}
})
},
clearTimer() {
if (this.ssoTimer) {
clearInterval(this.ssoTimer)
this.ssoTimer = null
}
}
}
}
</script>

@ -4,7 +4,7 @@
const baseURL = process.env.NODE_ENV === "production" ?
"https://app.java.jnpfsoft.com" : "http://localhost:30000" // 接口前缀
const define = {
copyright: "©2020-2025 上海长江电气设备集团有限公司",
copyright: "Copyright @ 2023 引迈信息技术有限公司版权所有",
sysVersion: "V3.5",
baseURL: baseURL,
webSocketUrl: process.env.NODE_ENV === "production" ? "wss://app.java.jnpfsoft.com/websocket" :
@ -16,9 +16,9 @@ const define = {
// #endif
// #ifdef MP
const baseURL = "http://localhost:8808" // "https://app.java.jnpfsoft.com"
const baseURL = "http://localhost:30000" // "https://app.java.jnpfsoft.com"
const define = {
copyright: "©2020-2025 上海长江电气设备集团有限公司",
copyright: "Copyright @ 2023 引迈信息技术有限公司版权所有",
sysVersion: "V3.5",
baseURL: baseURL,
webSocketUrl: "ws://localhost:30000/api/message/websocket", //"wss://app.java.jnpfsoft.com/api/message/websocket"

@ -32,6 +32,7 @@ function request(config) {
if (config.url === '/api/oauth/Login') {
url += '?client_id=admin&client_secret=123456&scope=all&grant_type=password'
}
if (config.options.load) {
uni.showLoading({
title: config.options.loadText || '正在加载'
@ -50,13 +51,12 @@ function request(config) {
uni.hideLoading()
}
if (res.statusCode === 200) {
// if (res.data.code == 200) {
// resolve(res.data)
// } else {
// ajaxError(res.data)
// reject(res.data.msg)
// }
resolve(res.data)
if (res.data.code == 200) {
resolve(res.data)
} else {
ajaxError(res.data)
reject(res.data.msg)
}
} else {
ajaxError(res.data)
reject(res.errMsg)

@ -1,139 +0,0 @@
package jnpf.database.config;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import jnpf.base.UserInfo;
import jnpf.constant.PermissionConst;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.entity.UserEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.util.DateUtil;
import jnpf.util.StringUtil;
import jnpf.util.UserProvider;
import jnpf.util.context.SpringContext;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* MybatisPlus
*
* @author Allen Pan
* @version V3.4.1
* @copyright
* @date 2019927 9:18
*/
@Component
@Slf4j
//@Configuration
//@Intercepts({@Signature(type = Executor.class, method = "update", args = {MappedStatement.class, Object.class})})
public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
//@Autowired
private static ApplicationContext applicationContext;
private UserProvider userProvider;
private OrganizeService organizeService;
@Override
public void insertFill(MetaObject metaObject) {
String companyId = "";
// userProvider= applicationContext.getBean(UserProvider.class);
UserProvider userProvider = SpringContext.getBean(UserProvider.class);
OrganizeService organizeService = SpringContext.getBean(OrganizeService.class);
UserInfo userInfo= userProvider.get();
List<String> organizeIdList = new ArrayList<>();
if(userInfo != null && StringUtil.isNotEmpty(userInfo.getOrganizeId())){
OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId());
if (organizeEntity==null){
// organizeEntity.setId("-1");
organizeIdList.add("-1");
}else {
organizeIdList.add(organizeEntity.getId());
if(PermissionConst.DEPARTMENT.equals(organizeEntity.getCategory())){
userInfo.setDepartmentId(organizeEntity.getId());
do {
//获取父组织
organizeEntity = organizeService.getInfo(organizeEntity.getParentId());
organizeIdList.add(organizeEntity.getId());
}while (PermissionConst.DEPARTMENT.equals(organizeEntity.getCategory()));
companyId = organizeEntity.getId();
}else{
companyId = organizeEntity.getId();
}
}
}
organizeIdList.add("96240625-934F-490B-8AA6-0BC775B18468");
Collections.reverse(organizeIdList);
String organizeId = JSON.toJSONString(organizeIdList);
// 可以在这里填充编码查询到编码规则自动填充
// TableInfo tableInfo = this.findTableInfo(metaObject);
// String tableName = tableInfo.getTableName();
log.info("start insert fill ....");
System.out.println(userInfo);
this.setFieldValByName("creatorUserId", userInfo.getUserId(), metaObject);
this.setFieldValByName("creatorTime", DateUtil.getNowDate(), metaObject);
this.setFieldValByName("creatorUserName", userInfo.getUserName(), metaObject);
this.setFieldValByName("creatoruserid", userInfo.getUserId(), metaObject);
this.setFieldValByName("creatortime", DateUtil.getNowDate(), metaObject);
this.setFieldValByName("creatorusername", userInfo.getUserName(), metaObject);
this.setFieldValByName("lastModifyUserId", userInfo.getUserId(), metaObject);
this.setFieldValByName("lastModifyTime", DateUtil.getNowDate(), metaObject);
this.setFieldValByName("lastModifyUserName", userInfo.getUserName(), metaObject);
this.setFieldValByName("organizeJsonId", organizeId, metaObject);
this.setFieldValByName("companyId", companyId, metaObject);
this.setFieldValByName("departmentId", userInfo.getDepartmentId(), metaObject);
// System.out.println(userProvider.getDepartmentId(userInfo.getUserId()));
/* if (userInfo.getUserId()!=null){
this.setFieldValByName("departmentId", userProvider.getDepartmentId(userInfo.getUserId()), metaObject);
}*/
}
@Override
public void updateFill(MetaObject metaObject) {
log.info("start update fill ....");
UserProvider userProvider = SpringContext.getBean(UserProvider.class);
System.out.println(userProvider.get());
// userProvider= applicationContext.getBean(UserProvider.class);
UserInfo userInfo = userProvider.get();
this.setFieldValByName("lastModifyTime", DateUtil.getNowDate(), metaObject);
this.setFieldValByName("lastModifyUserId", userInfo.getUserId(), metaObject);
this.setFieldValByName("lastModifyUserName", userInfo.getUserName(), metaObject);
this.setFieldValByName("deleteTime", DateUtil.getNowDate(), metaObject);
this.setFieldValByName("deleteUserId", userInfo.getUserId(), metaObject);
this.setFieldValByName("deleteUserName", userInfo.getUserName(), metaObject);
}
}

@ -1,25 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIELjCCAxagAwIBAgIUL3BGpENxaOOyw7pbzx/5QVJq1N0wDQYJKoZIhvcNAQEL
BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
Q0EwHhcNMjQwMzExMDkwMjA4WhcNMjkwMzEwMDkwMjA4WjCBhzETMBEGA1UEAwwK
MTY2ODUyNzk1MzEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMTMwMQYDVQQL
DCrkuIrmtbfplb/msZ/kupHmga/mlbDlrZfnp5HmioDmnInpmZDlhazlj7gxCzAJ
BgNVBAYTAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAOKEZU4HFlimKzHLOgEV8lwJxkJrifWYSSo6l8SbNcv4lEgZ
mXha5y3a2XqzCAX3DIfXb5KiV1LP/QyWSAgsTV+g7ryyyP5i9JWvTiyWC8tHLGj5
cp58V7ifq6UrXIWSeSt81r33ZHnngDIWYTtHPy3DfU+1+yLlKP3t+5UCWRp7w+DC
UZKen9ygAMW9ZXSIB/LasAu6d3h9CVZQd/cVG7pslvO/Iedf1jvVATNx5d08XLSY
bQGgenNpRrAIgnWzapa2fiBlHR7vmTI8GimmXEkHXLBy6GUbwrMOuLJ/qVWNtgGs
OZ5QKYyAufWfp8nf4ZibU0Mk/ZELr3iWAiJap1UCAwEAAaOBuTCBtjAJBgNVHRME
AjAAMAsGA1UdDwQEAwID+DCBmwYDVR0fBIGTMIGQMIGNoIGKoIGHhoGEaHR0cDov
L2V2Y2EuaXRydXMuY29tLmNuL3B1YmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUw
REJDMDRCMDZBRDM5NzU0OTg0NkMwMUMzRThFQkQyJnNnPUhBQ0M0NzFCNjU0MjJF
MTJCMjdBOUQzM0E4N0FEMUNERjU5MjZFMTQwMzcxMA0GCSqGSIb3DQEBCwUAA4IB
AQCt9QtqT/i2d6aJx4TNjuh3CF6WKjphFVAKqnse+3qr6PQR4D8NzgdbAECdBbJt
U0R20n4UGMZNijoIy1CaOqJCuLavuU+wZxvQnzFJihjCKWmn8NRs9vYtDaDpbns5
X+9Dt/uw1tuvXZbRqg0X+bfPNBDUU/WBFqwQ2XpawVa2v5+BIvYovuOeI01VxuiF
MXqs6Lteg3FiMnOFgTYSPq5jcFZK/FvhPGVu8pmPkmDeRoc0jPPNDryvhVeR91cQ
kdEgYktuprSWJlXGP+Og4S7DLOBenLnwoB2MzN/E/jE2gHwxfff/ckyGVZ5nC2CJ
za+em1H7eL+LTMqdqHRckg0N
-----END CERTIFICATE-----

@ -1,28 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDihGVOBxZYpisx
yzoBFfJcCcZCa4n1mEkqOpfEmzXL+JRIGZl4Wuct2tl6swgF9wyH12+SoldSz/0M
lkgILE1foO68ssj+YvSVr04slgvLRyxo+XKefFe4n6ulK1yFknkrfNa992R554Ay
FmE7Rz8tw31Ptfsi5Sj97fuVAlkae8PgwlGSnp/coADFvWV0iAfy2rALund4fQlW
UHf3FRu6bJbzvyHnX9Y71QEzceXdPFy0mG0BoHpzaUawCIJ1s2qWtn4gZR0e75ky
PBopplxJB1ywcuhlG8KzDriyf6lVjbYBrDmeUCmMgLn1n6fJ3+GYm1NDJP2RC694
lgIiWqdVAgMBAAECggEAMY2nH8+7Gr+XWXhNAynK8EmPHr6p2plrABr7Up5lwW5q
+e7nvQWd51EmHIqH6c4m5pzBosFy+wHXKObDcU5HyvDI6WzvPX9mZEyKfISCpgC2
/Wv8oCExi4kaorJ+thXZ/iJ8U+iICYcUa2Cr+qzWbGuEwWhdPUAGnK5wSCPQXFNn
oAuC86dD/IWsDgT5UreofNl0Sd4aepq3gNzAqpCKG16golkwMD0vybpaPc4uiwKv
CZt06GRfgwOzI4S5kqM/HYptgBQiO6+SKbiS2MKVmamadsN/NIpd/24xH6IYaiMX
sXYVd1gYxE8bQ79XdZ6xthLYoLGspGPfYWabym2CLQKBgQD1jITwJ+oVHyDscBan
TEJhOaVv7n1dMFka9JAouYYJrhTF2LAwSTmqf3Yp0YrY/ucv9WXRpzO6YBN2bWO+
9PCgqgCEFirBEftfaC0CA2D2bpED5iBe6Y09ueJBIWSgzCFDiMlDhVKy0+ZraUZ3
WkYNW9CEd3LnhQMnIiEEhsdMywKBgQDsKIIbog39E0hAY/02edH+tVEDjyJrdb2m
kqv65sH3NmFsWGWEeZLS0KJomgQdCuEOmdWWFqOIrfs6Ugmu/3g1hzC8O01xJEJr
XrI3Nnn+sghsdgHvorRYsb8pRZbPQD24p2MmbQcanPbO2HB8ydeD6G5WYju7Me6l
RvnjgHJ4XwKBgFEYE19tDzXijfEII7Mk0Fdjvmt1DBoWuZbZZjLM8qOHxnyAz89i
n5Tbe57cAUshBCEmnnXbDo5i5IqcHfEW29Fz06/L0lrpIWek9BhSHVfFtEbhXZd6
8paMKVjxOlaQk/vF1RJjmahNqy+WGRuZyMDorbjR6jTkDOKDtvvTt0Z5AoGABPC4
ABH8zu2HVmmBE5Gq1fQ/FJ767lqRNBnfZSlMp3pIwXZ78TCF5MkejKekLGNc3+xR
7ojctPBG0CqFL1cC0cPZPibTcOl8Rji966/FD5Hz4Sj602OI+E4HnLpq9Dz4zZMa
3OPtAR6Ff0BB4ipqysSjAkWd0EW0I1r/wUWfn2sCgYEA3OZ6OBEZ/sTJMGke9/CL
3k2mS9jKpqJTZfIUbNtwwhPah/vL13zVfT2srOzL0IPX7SIQGowHhg6NjxUTOayd
AGDQs65NfKkyt9+8bf4F93afo9fFQAxcRJ1rqXranscqDRfzdJFCubGIkYq9cN0J
6kUN10GoZtQZnCvSdMB8SSs=
-----END PRIVATE KEY-----

@ -70,10 +70,9 @@ spring:
# redis单机模式
redis:
database: 0 #缓存库编号
host: 222.71.165.187
# host: 127.0.0.1
host: 222.71.165.188
port: 6379
password: qawsed,.123 # 密码为空时,请将本行注释
password: qweasd,.123 # 密码为空时,请将本行注释
timeout: 3000 #超时时间(单位:秒)
lettuce: #Lettuce为Redis的Java驱动包
pool:
@ -231,34 +230,3 @@ xxl:
task-update-address: ${xxl.job.admin.addresses}api/ScheduleTask
task-remove-address: ${xxl.job.admin.addresses}api/ScheduleTask/remove
task-start-or-remove-address: ${xxl.job.admin.addresses}api/ScheduleTask/updateTask
# ===================== 微信小程序配置 =====================
wx:
# 回收员端
huishouyuan:
appid: wxf82bcc798891a29d
appsecret: f37fb0ab2b5f691d8507acced60a58fb
nxhs:
url: 'http://222.71.165.188:8808'
token: '8bd2aa89033ead51c505e44994e42189'
# ===================== mqtt配置 =====================
mqtt:
host: http://222.71.165.188:18083
username: 4d6e330f3c9a1441 #api密钥
password: zPzaZT7Z2uMKH7CfvB7SyFWYA3GZcMBMFi757fZh9BpD #api密钥
authentication-method: password_based:built_in_database #用户认证方式
get-user-api: /api/v5/authentication/{id}/users/{user_id} #添加用户api
add-user-api: /api/v1/mqtt/add-user #添加用户api
delete-user-api: /api/v1/mqtt/add-user #添加用户api
client:
host: tcp://222.71.165.188:1883
clientId: pc-service
username: pc-service
password: 123456
cleanSession: false
timeout: 30
qos: 1
keepAlive: 30
topics:

@ -2,7 +2,7 @@
server:
tomcat:
uri-encoding: UTF-8 #tomcat编码
port: 50000 #tomcat端口
port: 30000 #tomcat端口
spring:
devtools: #spring开发者工具模块
@ -17,11 +17,11 @@ spring:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置手动配置druid
datasource:
db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM8、KingbaseES、PostgreSQL请严格按可选值填写)
host: 222.71.165.188
port: 3309
username: root
password: linus,.123
db-name: ningxia_pro
host: 192.168.0.210
port: 3306
username: java_boot_test
password: pBx5HaW6WMGSTdDf
db-name: java_boot_test
db-schema: #金仓达梦选填
prepare-url: #自定义url
@ -43,10 +43,10 @@ spring:
# ===================== Redis配置 =====================
# redis单机模式
redis:
database: 0 #缓存库编号
host: 222.71.165.187
database: 1 #缓存库编号
host: 192.168.0.220
port: 6379
password: qawsed,.123 # 密码为空时,请将本行注释
password: 123456 # 密码为空时,请将本行注释
timeout: 3000 #超时时间(单位:秒)
lettuce: #Lettuce为Redis的Java驱动包
pool:
@ -75,7 +75,6 @@ spring:
# max-idle: 8 # 连接池中的最大空闲连接
config:
ApiDomain: http://127.0.0.1:50000 #后端域名(文档预览中使用)
# ===================== 是否开启测试环境 =====================
TestVersion: false
# ===================== ApacheShardingSphere 配置开关 =====================
@ -89,7 +88,7 @@ config:
enable-storage: true #启用存储
enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
domain: "" # 访问域名例如“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
base-path: D:/work/jnpf-resources/ # 基础路径
base-path: F:/work/jnpf-resources/ # 基础路径
path-patterns: /** # 访问路径
storage-path: # 存储路径
aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写
@ -173,7 +172,7 @@ xxl:
max: 100
# xxl-job服务端地址
admin:
addresses: http://222.71.165.188:30020/xxl-job-admin/
addresses: http://127.0.0.1:30020/xxl-job-admin/
executor:
address: ''
appname: xxl-job-executor-sample1
@ -193,28 +192,3 @@ xxl:
task-update-address: ${xxl.job.admin.addresses}api/ScheduleTask
task-remove-address: ${xxl.job.admin.addresses}api/ScheduleTask/remove
task-start-or-remove-address: ${xxl.job.admin.addresses}api/ScheduleTask/updateTask
nxhs:
url: 'http://118.195.155.9:8808'
token: '8bd2aa89033ead51c505e44994e42189'
mqtt:
host: http://222.71.165.188:18083
username: 4d6e330f3c9a1441 #api密钥
password: zPzaZT7Z2uMKH7CfvB7SyFWYA3GZcMBMFi757fZh9BpD #api密钥
authentication-method: password_based:built_in_database #用户认证方式
get-user-api: /api/v5/authentication/{id}/users/{user_id} #添加用户api
add-user-api: /api/v1/mqtt/add-user #添加用户api
delete-user-api: /api/v1/mqtt/add-user #添加用户api
client:
host: tcp://222.71.165.188:1883
clientId: pc-service
username: pc-service
password: 123456
cleanSession: false
timeout: 30
qos: 1
keepAlive: 30
topics:
"[+/Dead]": 1

@ -102,23 +102,13 @@ gateway:
#- /api/message/Notice
#- /api/permission/Users/*
# 放行接口(不记录日志)
- /api/scm/wx/hsyLogin
- /api/scm/wx/hsyGetPhone
- /api/scm/login/hsyLogin
- /api/scm/login/test
- /api/scm/Client/test
- /api/permission/Organize
- /api/permission/Organize/POST
- /api/permission/Organize/check
- /api/permission/Users/Actions/ResetPasswordForget
exclude-url:
# # 配置示例
#- /api/message/Notice
#- /api/permission/Users/*
# 入站IP禁止配置以外的IP访问block-url配置的接口
white-ip:
192.168.0.66
#- 192.168.0.10
#- 192.168.0.20
# 日志配置
@ -135,26 +125,4 @@ log:
level:
# 等级 TRACE,DEBUG,INFO,WARN,ERROR(不区分大小写)
root: debug
path: log/${spring.application.name}
wx:
pay.v3:
# 微信支付 小程序id (预约端)
app-id: wx630bc4f43990c80c
# 商户号
mch-id: 1668527953
# api 证书序列号
mch-serial-no: 2F7046A4437168E3B2C3BA5BCF1FF941526AD4DD
# 商户私钥
key-path: apiclient_key.pem
# 商户公钥
cert-path: apiclient_cert.pem
# 平台序列号
platform-serial-no: 3689FA78387DCD66E71E9A2AAA08E462CC823C0A
# 平台公钥
platform-cert-path: wechatpay_3689FA78387DCD66E71E9A2AAA08E462CC823C0A.pem
# APIv3 密钥
api-key3: 529c750f4971d17db01ef595da8edfd3
# 支付回调地址
notify: https://dc5c-114-95-242-226.ngrok-free.app/api/wx-pay/notify
# notify: https://nxsh.cjyx.cc/api/wx-pay/notify
path: log/${spring.application.name}

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.ClientAccountDetailMapper">
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.DeliverBlacklistMapper">
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.NxFileMapper">
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.NxManagerMapper">
</mapper>

@ -1,74 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.NxPriceMapper">
<resultMap id="getNxPriceMap" type="jnpf.entity.NxPriceEntity">
<id column="id" property="id"/>
<result column="price_code" property="priceCode"/>
<result column="buiness_id" property="buinessId"/>
<result column="price_type" property="priceType"/>
<result column="remak" property="remak"/>
<result column="f_creator_time" property="creatorTime"/>
<result column="f_creator_user_id" property="creatorUserId"/>
<result column="f_last_modify_time" property="lastModifyTime"/>
<result column="f_last_modify_user_id" property="lastModifyUserId"/>
<result column="creatorUserIds" property="creatorUserIds"/>
<result column="lastModifyUserIds" property="lastModifyUserIds"/>
<result column="recoveryPrice" property="recoveryPrice"/>
<result column="productCode" property="productCode"/>
<result column="productName" property="productName"/>
<result column="stationName" property="stationName"/>
<result column="stationCode" property="stationCode"/>
<result column="priceStatus" property="priceStatus"/>
<result column="company_id" property="companyId"/>
<result column="department_id" property="departmentId"/>
<result column="organize_json_id" property="organizeJsonId"/>
</resultMap>
<select id="queryByKeyword" resultMap="getNxPriceMap">
SELECT
a.*,
b.recovery_price AS recoveryPrice,
c.code AS productCode,
c.name AS productName,
CASE
c.unit
WHEN 1 THEN
'克'
WHEN 2 THEN
'千克'
WHEN 3 THEN
'吨'
END unit,
e.station_name AS stationName,
e.station_code AS stationCode,
CASE
a.status
WHEN 1 THEN
'生效'
WHEN 2 THEN
'失效'
END priceStatus,
f.f_real_name AS creatorUserIds,
g.f_real_name AS lastModifyUserIds
FROM
nx_price a
LEFT JOIN nx_price_product b ON a.id = b.price_id
LEFT JOIN nx_product c ON b.product_id = c.id
LEFT JOIN nx_price_recycle d ON a.id = d.price_id
LEFT JOIN nx_enterprise_recycle_station e ON d.recycle_id = e.id
LEFT JOIN base_user f ON f.f_id=a.f_creator_user_id
LEFT JOIN base_user g ON g.f_id=a.f_last_modify_user_id
${organizeJson} and a.f_delete_mark is null
<if test="nxProductPagination.sidx != null and nxProductPagination.sidx != ''">
ORDER BY ${nxProductPagination.sidx} ${nxProductPagination.sort}
</if>
</select>
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.NxPriceProductMapper">
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.NxPriceRecycleMapper">
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.NxProductMapper">
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.NxWalletMapper">
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.RecycleBucketMapper">
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.RecycleCameraMapper">
</mapper>

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.RecycleCleanOrderMapper">
<update id="auditBatch">
UPDATE NX_RECYCLE_CLEAN_ORDER
SET
<!-- <choose>-->
<!-- <when test="batch.auditStatus == 1">-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- </otherwise>-->
<!-- </choose>-->
ADJUST_WEIGHT = WEIGHT,
ADJUST_PRICE = TOTAL_PRICE,
ADJUST_STATUS = #{batch.adjustStatus},
ADJUST_COMM = #{batch.adjustComm},
ENTRY_STATUS = #{batch.entryStatus},
F_LAST_MODIFY_TIME = #{batch.lastModifyTime},
F_LAST_MODIFY_USER_ID = #{batch.lastModifyUserId}
WHERE ID IN
<foreach collection="batch.ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.RecycleDeliveryOrderMapper">
<update id="auditBatch">
UPDATE NX_RECYCLE_DELIVERY_ORDER
SET
ADJUST_WEIGHT = REPORT_WEIGHT,
ADJUST_PRICE = TOTAL_PRICE,
ADJUST_STATUS = #{batch.adjustStatus},
ADJUST_COMM = #{batch.adjustComm},
F_LAST_MODIFY_TIME = #{batch.lastModifyTime},
F_LAST_MODIFY_USER_ID = #{batch.lastModifyUserId}
WHERE ID IN
<foreach collection="batch.ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.RecycleDeviceConfigOneMapper">
</mapper>

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.RecycleDeviceMapper">
<select id="QueryRecycleDevice" resultType="jnpf.entity.RecycleDeviceEntity">
SELECT
a.id,
a.address,
a.device_name AS deviceName,
a.device_code AS deviceCode
FROM
nx_recycle_device a
${ew.customSqlSegment}
<!-- and
not exists (select 1 from nx_recycle_staff_device b where a.device_code=b.device_code)
-->
</select>
</mapper>

@ -13,11 +13,9 @@
<result column="client_id" jdbcType="VARCHAR" property="clientId" />
<result column="client_name" jdbcType="VARCHAR" property="clientName" />
<result column="client_mobile" jdbcType="VARCHAR" property="clientMobile" />
<result column="f_creator_user_id" jdbcType="VARCHAR" property="creatorUserId" />
<result column="company_id" jdbcType="VARCHAR" property="companyId" />
<result column="organize_json_id" jdbcType="VARCHAR" property="organizeJsonId" />
<result column="client_address_id" jdbcType="VARCHAR" property="clientAddressId" />
<result column="creator_user_id" jdbcType="VARCHAR" property="creatorUserId" />
<result column="creator_time" jdbcType="TIMESTAMP" property="creatorTime" />
<result column="recycle_address" jdbcType="VARCHAR" property="recycleAddress" />
<result column="appointment_time_start" jdbcType="TIMESTAMP" property="appointmentTimeStart" />
<result column="appointment_time_end" jdbcType="TIMESTAMP" property="appointmentTimeEnd" />
<result column="staffs_id" jdbcType="VARCHAR" property="staffsId" />
@ -40,20 +38,14 @@
<result column="undefined3" jdbcType="VARCHAR" property="undefined3" />
<result column="undefined4" jdbcType="VARCHAR" property="undefined4" />
<result column="f_flow_id" jdbcType="VARCHAR" property="flowId" />
<result column="predict_weight" jdbcType="VARCHAR" property="predictWeight" />
<result column="longitude" jdbcType="VARCHAR" property="longitude" />
<result column="latitude" jdbcType="VARCHAR" property="latitude" />
<result column="distance" jdbcType="VARCHAR" property="distance" />
</resultMap>
<sql id="Base_Column_List">
id, recycle_station_id, order_number, order_type_id, order_amount, order_client_status_id,
order_staffs_status_id, receive_period, client_id, client_name, client_mobile, creator_user_id,
creator_time, client_address_id, appointment_time_start, appointment_time_end, staffs_id,
creator_time, recycle_address, appointment_time_start, appointment_time_end, staffs_id,
staffs_name, consult_time_start, consult_time_end, receive_time, settle_time, remark,
star_score, comment, comment_pics, response_star, attitude_star, price_star, is_user_deleted,
is_deleted, undefined1, undefined2, undefined3, undefined4, f_flow_id,predict_weight,longitude,latitude,distance,f_creator_user_id,
company_id,organize_json_id
is_deleted, undefined1, undefined2, undefined3, undefined4, f_flow_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
@ -69,22 +61,21 @@
insert into nx_recycle_order (id, recycle_station_id, order_number,
order_type_id, order_amount, order_client_status_id,
order_staffs_status_id, receive_period, client_id,
client_name, client_mobile,
client_address_id, appointment_time_start,
client_name, client_mobile, creator_user_id,
creator_time, recycle_address, appointment_time_start,
appointment_time_end, staffs_id, staffs_name,
consult_time_start, consult_time_end, receive_time,
settle_time, remark, star_score,
comment, comment_pics, response_star,
attitude_star, price_star, is_user_deleted,
is_deleted, undefined1, undefined2,
undefined3, undefined4, f_flow_id ,predict_weight,longitude,latitude,distance,f_creator_user_id,
company_id,organize_json_id
undefined3, undefined4, f_flow_id
)
values (#{id,jdbcType=VARCHAR}, #{recycleStationId,jdbcType=VARCHAR}, #{orderNumber,jdbcType=VARCHAR},
#{orderTypeId,jdbcType=VARCHAR}, #{orderAmount,jdbcType=DECIMAL}, #{orderClientStatusId,jdbcType=VARCHAR},
#{orderStaffsStatusId,jdbcType=VARCHAR}, #{receivePeriod,jdbcType=INTEGER}, #{clientId,jdbcType=VARCHAR},
#{clientName,jdbcType=VARCHAR}, #{clientMobile,jdbcType=VARCHAR},
#{clientAddressId,jdbcType=VARCHAR}, #{appointmentTimeStart,jdbcType=TIMESTAMP},
#{clientName,jdbcType=VARCHAR}, #{clientMobile,jdbcType=VARCHAR}, #{creatorUserId,jdbcType=VARCHAR},
#{creatorTime,jdbcType=TIMESTAMP}, #{recycleAddress,jdbcType=VARCHAR}, #{appointmentTimeStart,jdbcType=TIMESTAMP},
#{appointmentTimeEnd,jdbcType=TIMESTAMP}, #{staffsId,jdbcType=VARCHAR}, #{staffsName,jdbcType=VARCHAR},
#{consultTimeStart,jdbcType=TIMESTAMP}, #{consultTimeEnd,jdbcType=TIMESTAMP}, #{receiveTime,jdbcType=TIMESTAMP},
#{settleTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{starScore,jdbcType=INTEGER},
@ -92,14 +83,7 @@
#{attitudeStar,jdbcType=INTEGER}, #{priceStar,jdbcType=INTEGER}, #{isUserDeleted,jdbcType=INTEGER},
#{isDeleted,jdbcType=INTEGER}, #{undefined1,jdbcType=VARCHAR}, #{undefined2,jdbcType=VARCHAR},
#{undefined3,jdbcType=VARCHAR}, #{undefined4,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}
, #{predictWeight,jdbcType=VARCHAR}
, #{longitude,jdbcType=VARCHAR}
, #{latitude,jdbcType=VARCHAR}
, #{distance,jdbcType=VARCHAR}
, #{creatorUserId,jdbcType=VARCHAR}
, #{companyId,jdbcType=VARCHAR}
, #{organizeJsonId,jdbcType=VARCHAR}
)
)
</insert>
<insert id="insertSelective" parameterType="jnpf.entity.RecycleOrderEntity">
insert into nx_recycle_order
@ -137,8 +121,14 @@
<if test="clientMobile != null">
client_mobile,
</if>
<if test="clientAddressId != null">
client_address_id,
<if test="creatorUserId != null">
creator_user_id,
</if>
<if test="creatorTime != null">
creator_time,
</if>
<if test="recycleAddress != null">
recycle_address,
</if>
<if test="appointmentTimeStart != null">
appointment_time_start,
@ -206,27 +196,6 @@
<if test="flowId != null">
f_flow_id,
</if>
<if test="predictWeight != null">
predict_weight,
</if>
<if test="longitude != null">
longitude,
</if>
<if test="latitude != null">
latitude,
</if>
<if test="distance != null">
distance,
</if>
<if test="creatorUserId != null">
f_creator_user_id,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="organize_json_id != null">
organize_json_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -262,9 +231,14 @@
<if test="clientMobile != null">
#{clientMobile,jdbcType=VARCHAR},
</if>
<if test="clientAddressId != null">
#{clientAddressId,jdbcType=VARCHAR},
<if test="creatorUserId != null">
#{creatorUserId,jdbcType=VARCHAR},
</if>
<if test="creatorTime != null">
#{creatorTime,jdbcType=TIMESTAMP},
</if>
<if test="recycleAddress != null">
#{recycleAddress,jdbcType=VARCHAR},
</if>
<if test="appointmentTimeStart != null">
#{appointmentTimeStart,jdbcType=TIMESTAMP},
@ -332,21 +306,6 @@
<if test="flowId != null">
#{flowId,jdbcType=VARCHAR},
</if>
<if test="predictWeight != null">
#{predictWeight,jdbcType=VARCHAR},
</if>
<if test="longitude != null">
#{longitude,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
#{latitude,jdbcType=VARCHAR},
</if>
<if test="distance != null">
#{distance,jdbcType=VARCHAR},
</if>
<if test="distance != null">
#{distance,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="jnpf.entity.RecycleOrderEntity">
@ -382,9 +341,14 @@
<if test="clientMobile != null">
client_mobile = #{clientMobile,jdbcType=VARCHAR},
</if>
<if test="clientAddressId != null">
client_address_id = #{clientAddressId,jdbcType=VARCHAR},
<if test="creatorUserId != null">
creator_user_id = #{creatorUserId,jdbcType=VARCHAR},
</if>
<if test="creatorTime != null">
creator_time = #{creatorTime,jdbcType=TIMESTAMP},
</if>
<if test="recycleAddress != null">
recycle_address = #{recycleAddress,jdbcType=VARCHAR},
</if>
<if test="appointmentTimeStart != null">
appointment_time_start = #{appointmentTimeStart,jdbcType=TIMESTAMP},
@ -449,8 +413,8 @@
<if test="undefined4 != null">
undefined4 = #{undefined4,jdbcType=VARCHAR},
</if>
<if test="creatorUserId != null">
f_flow_id = #{creatorUserId,jdbcType=VARCHAR},
<if test="flowId != null">
f_flow_id = #{flowId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
@ -467,7 +431,9 @@
client_id = #{clientId,jdbcType=VARCHAR},
client_name = #{clientName,jdbcType=VARCHAR},
client_mobile = #{clientMobile,jdbcType=VARCHAR},
client_address_id = #{clientAddressId,jdbcType=VARCHAR},
creator_user_id = #{creatorUserId,jdbcType=VARCHAR},
creator_time = #{creatorTime,jdbcType=TIMESTAMP},
recycle_address = #{recycleAddress,jdbcType=VARCHAR},
appointment_time_start = #{appointmentTimeStart,jdbcType=TIMESTAMP},
appointment_time_end = #{appointmentTimeEnd,jdbcType=TIMESTAMP},
staffs_id = #{staffsId,jdbcType=VARCHAR},

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.RecycleOrderProductMapper">
<resultMap id="recycleOrderProductRM" type="jnpf.entity.RecycleOrderProductEntity">
<id column="id" jdbcType="VARCHAR" property="id" />
<id column="recycle_order_id" jdbcType="VARCHAR" property="recycleOrderId" />
<id column="product_id" jdbcType="VARCHAR" property="productId" />
<id column="product_name" jdbcType="VARCHAR" property="productName" />
<id column="product_actual_weight" jdbcType="VARCHAR" property="productActualWeight" />
<id column="recovery_price" jdbcType="VARCHAR" property="recoveryPrice" />
<id column="actual_recovery_price" jdbcType="VARCHAR" property="actualRecoveryPrice" />
</resultMap>
<select id="recycleOrderProductSelect" resultMap="recycleOrderProductRM">
SELECT
a.id as id,
a.recycle_order_id as recycle_order_id,
a.product_id as product_id,
a.product_actual_weight as product_actual_weight,
a.recovery_price as recovery_price,
a.actual_recovery_price as actual_recovery_price,
b.name as product_name
FROM nx_recycle_order_product a
left join nx_product as b ON a.product_id = b.id WHERE a.recycle_order_id = #{id}
</select>
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.RecycleStaffDeviceMapper">
</mapper>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.SimCardMapper">
</mapper>

@ -1,24 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIEFDCCAvygAwIBAgIUNon6eDh9zWbnHpoqqgjkYsyCPAowDQYJKoZIhvcNAQEL
BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
Q0EwHhcNMjQwMzA4MDcxMDU3WhcNMjkwMzA3MDcxMDU3WjBuMRgwFgYDVQQDDA9U
ZW5wYXkuY29tIHNpZ24xEzARBgNVBAoMClRlbnBheS5jb20xHTAbBgNVBAsMFFRl
bnBheS5jb20gQ0EgQ2VudGVyMQswCQYDVQQGEwJDTjERMA8GA1UEBwwIU2hlblpo
ZW4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJUqXCOnWQmrpqLyy6
0HfdYezdBfe66CPyAIeqV7sTReRNZvYVONjkhOzVlZ88d0+PmPADGmPskPCrhFCX
K5sN5TBfCog+FZPQJ+Ol0JAZKvQkK+smPt2pmVfBth020DCKlc8U0LPAE0nxqF0E
30b9NQLdoD77kE0duIpK/b9ASb9UPlR2vcQobXXehzaZph6Wd3ys2rHI2ZbKNicP
XqSXtTb86+x734ufKbeGQd0MrV/+LaMc1qNdjx3pjpvbw9WDSQH99nwjGoqOFvU7
IhHz5KzIKnJf4ZqLBvkRzK/L5r4MUxrOfWPS3x6yvDNBRqO5d2rCoXAtdAl9LefA
G1jDAgMBAAGjgbkwgbYwCQYDVR0TBAIwADALBgNVHQ8EBAMCA/gwgZsGA1UdHwSB
kzCBkDCBjaCBiqCBh4aBhGh0dHA6Ly9ldmNhLml0cnVzLmNvbS5jbi9wdWJsaWMv
aXRydXNjcmw/Q0E9MUJENDIyMEU1MERCQzA0QjA2QUQzOTc1NDk4NDZDMDFDM0U4
RUJEMiZzZz1IQUNDNDcxQjY1NDIyRTEyQjI3QTlEMzNBODdBRDFDREY1OTI2RTE0
MDM3MTANBgkqhkiG9w0BAQsFAAOCAQEATvBq6b8Zvvz+ld8MZ3VFy61DY5iUALlN
Nn2IAan0iVP3bb1FCeYdFJsgGo3hc1C3o2mPbq5FPTO6qYW3fP3bKYlmivNL/tQW
IGAWDI1ynhAs/RZZD5ASrzpcJigfXrkh7imMxJO55dEXP2XQfFRMvbeYlcvEIrMt
I48TESeHB59/TGI2GTUwt51bXk3k3QJd8iji0w6ZKLtk1Pu0Jx3o2KOw9GEJX47/
CkQDl/1i73Q4UPA1GpfR+2X9WPOIHnmznvUzTJATZHwUfJaIrlaY7ky7x20S43xZ
YXWK6++q9Pf62QixKUE7WvxtGDnYYWGh7xrAu/aENZ/OxcqieQMeKA==
-----END CERTIFICATE-----

@ -7,7 +7,7 @@ import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
//import jdk.nashorn.internal.parser.Token;
import jdk.nashorn.internal.parser.Token;
import jnpf.base.entity.SysConfigEntity;
import jnpf.base.service.SysconfigService;
import jnpf.message.entity.AccountConfigEntity;

@ -189,9 +189,6 @@ public class LoginController {
if (pcUserVO == null) {
throw new LoginException("账户异常");
}
List menuList = pcUserVO.getMenuList();
menuList.remove(0);
pcUserVO.setMenuList(menuList);
return ActionResult.success(pcUserVO);
}

@ -43,7 +43,6 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.web.multipart.MultipartFile;
@ -472,23 +471,6 @@ public class UserServiceImpl extends SuperServiceImpl<UserMapper, UserEntity> im
return true;
}
@Override
@Transactional
public void insert(UserEntity entity) throws Exception {
entity.setPassword("123456");
if (StringUtil.isEmpty(entity.getAccount())) {
throw new DataException("账号不能为空");
}
entity.setSecretkey(RandomUtil.uuId());
entity.setPassword(Md5Util.getStringMd5(entity.getPassword().toLowerCase() + entity.getSecretkey().toLowerCase()));
entity.setIsAdministrator(0);
entity.setCreatorUserId("349057407209541"); // 创建者: admin
entity.setOrganizeId("532165739403018373"); // 组织: app移动端
entity.setRoleId("532181982466015365"); // 角色: app前台专用
saveOrUpdateCommon(entity.getId(), entity);
this.save(entity);
}
@Override
@DSTransactional
public Boolean update(String userId, UserEntity entity) throws Exception {

@ -172,29 +172,6 @@ public class AuthorizeController extends SuperController<AuthorizeService, Autho
}
/**
*
*
* @param objectId
* @param dataValuesQuery
* @return
*/
@Operation(summary = "获取岗位/角色/用户权限树形结构申请入住")
@Parameters({
@Parameter(name = "objectId", description = "对象主键", required = true),
@Parameter(name = "dataValuesQuery", description = "权限值", required = true)
})
@SaCheckPermission(value = {"permission.authorize", "permission.role"}, mode = SaMode.OR)
@PostMapping("/Data/{objectId}/Valuess")
public AuthorizeVO getValuesDatas(@PathVariable("objectId") String objectId, @RequestBody DataValuesQuery dataValuesQuery) {
AuthorizeVO authorizeModel = authorizeService.getAuthorize(true, false);
List<AuthorizeEntity> list = authorizeService.list(new QueryWrapper<AuthorizeEntity>().lambda().eq(AuthorizeEntity::getObjectId, objectId));
return authorizeModel;
}
/**
*
*

@ -122,9 +122,6 @@ public class OrganizeAdministratorController extends SuperController<OrganizeAdm
return ActionResult.success("保存成功");
}
/**
*
*
@ -950,760 +947,4 @@ public class OrganizeAdministratorController extends SuperController<OrganizeAdm
}
parentIdInList(modulePermissionList, tempModule, allModuleSelectorVOList, moduleSelectorModel, moduleSelectorModels);
}
/**
*
*
* @param userId id
* @return
*/
@Operation(summary = "申请入住获取组织下拉框列表")
@SaCheckPermission(value = {"permission.grades"})
@GetMapping("/Selectors")
public OrganizeAdministratorSelectedVO getSelectors(String userId) {
// if (StringUtil.isNotEmpty(userId)) {
// if (userId.equals(UserProvider.getLoginUserId())) {
// return ActionResult.fail("无法设置当前用户为分级管理员");
// }
// UserEntity userEntity = userService.getInfo(userId);
// if (userEntity != null && Objects.equals(userEntity.getIsAdministrator(), 1)) {
// return ActionResult.fail("无法设置超管为分级管理员");
// }
// }
OrganizeAdministratorSelectedVO vo = new OrganizeAdministratorSelectedVO();
List<SystemSelectorVO> systemPermissionList = new ArrayList<>();
List<ModuleSelectorVO> moduleVOPermissionList = new ArrayList<>();
List<ModuleSelectorModel> modulePermissionList = new ArrayList<>();
List<String> moduleSelectedList = new ArrayList<>();
List<String> systemSelectedList = new ArrayList<>();
// 存储组织集合
List<OrganizeEntity> organizeList = organizeService.getList(false);
// 获取所有组织
List<OrganizeAdministratorSelectorModel> selectorModels = JsonUtil.getJsonToList(organizeList, OrganizeAdministratorSelectorModel.class);
// 获取应用列表
List<SystemEntity> list = systemApi.getList(null, false, true, true, false);
List<SystemSelectorVO> systemSelectorVOList = JsonUtil.getJsonToList(list, SystemSelectorVO.class);
systemSelectorVOList.forEach(t -> t.setIsPermission(0));
// 菜单
SystemEntity mainSystem = systemApi.getInfoByEnCode(JnpfConst.MAIN_SYSTEM_CODE);
List<ModuleEntity> mainModule = moduleApi.getMainModule();
List<ModuleEntity> allModule = new ArrayList<>(mainModule);
List<ModuleSelectorModel> moduleSelectorVOList = JsonUtil.getJsonToList(mainModule, ModuleSelectorModel.class);
List<ModuleSelectorModel> allModuleSelectorVOList = JsonUtil.getJsonToList(allModule, ModuleSelectorModel.class);
boolean isAdministrator = userProvider.get().getIsAdministrator();
if (isAdministrator) {
selectorModels.forEach(t -> {
// 设置组织id
t.setOrganizeId(t.getId());
t.setThisLayerAdd(0);
t.setThisLayerEdit(0);
t.setThisLayerDelete(0);
t.setThisLayerSelect(0);
t.setSubLayerAdd(0);
t.setSubLayerEdit(0);
t.setSubLayerDelete(0);
t.setSubLayerSelect(0);
});
moduleSelectorVOList.forEach(t -> t.setIsPermission(0));
} else {
List<OrganizeAdministratorEntity> organizeAdministratorEntity = organizeAdminIsTratorService.getOrganizeAdministratorEntity(UserProvider.getLoginUserId(), jnpf.constant.PermissionConst.ORGANIZE, false);
List<OrganizeAdministratorEntity> organizeAdministratorEntitys = new ArrayList<>(organizeAdministratorEntity);
// 处理子组织权限
organizeAdministratorEntitys.forEach(t -> {
if (t.getSubLayerSelect() != null && t.getSubLayerSelect() == 1) {
// 得到组织id
List<String> underOrganizations = organizeService.getUnderOrganizations(t.getOrganizeId(), false);
underOrganizations.forEach(uo -> {
OrganizeAdministratorEntity organizeAdministratorEntity1 = organizeAdministratorEntity.stream().filter(oae -> uo.equals(oae.getOrganizeId())).findFirst().orElse(null);
if (organizeAdministratorEntity1 != null) {
organizeAdministratorEntity1.setThisLayerSelect(1);
organizeAdministratorEntity1.setSubLayerSelect(1);
}
});
if (t.getSubLayerAdd() != null && t.getSubLayerAdd() == 1) {
underOrganizations.forEach(uo -> {
OrganizeAdministratorEntity organizeAdministratorEntity1 = organizeAdministratorEntity.stream().filter(oae -> uo.equals(oae.getOrganizeId())).findFirst().orElse(null);
if (organizeAdministratorEntity1 != null) {
organizeAdministratorEntity1.setThisLayerAdd(1);
organizeAdministratorEntity1.setSubLayerAdd(1);
}
});
}
if (t.getSubLayerEdit() != null && t.getSubLayerEdit() == 1) {
underOrganizations.forEach(uo -> {
OrganizeAdministratorEntity organizeAdministratorEntity1 = organizeAdministratorEntity.stream().filter(oae -> uo.equals(oae.getOrganizeId())).findFirst().orElse(null);
if (organizeAdministratorEntity1 != null) {
organizeAdministratorEntity1.setThisLayerEdit(1);
organizeAdministratorEntity1.setSubLayerEdit(1);
}
});
}
if (t.getSubLayerDelete() != null && t.getSubLayerDelete() == 1) {
underOrganizations.forEach(uo -> {
OrganizeAdministratorEntity organizeAdministratorEntity1 = organizeAdministratorEntity.stream().filter(oae -> uo.equals(oae.getOrganizeId())).findFirst().orElse(null);
if (organizeAdministratorEntity1 != null) {
organizeAdministratorEntity1.setThisLayerDelete(1);
organizeAdministratorEntity1.setSubLayerDelete(1);
}
});
}
}
});
List<OrganizeAdministratorSelectorModel> selectorModelss = new ArrayList<>(16);
selectorModels.forEach(t -> {
// 设置组织id
t.setOrganizeId(t.getId());
OrganizeAdministratorEntity administratorEntity = organizeAdministratorEntity.stream().filter(tt -> t.getOrganizeId().equals(tt.getOrganizeId())).findFirst().orElse(null);
if (administratorEntity != null) {
boolean flag = false;
if (administratorEntity.getThisLayerSelect() != null && administratorEntity.getThisLayerSelect() == 1) {
t.setThisLayerSelect(0);
flag = true;
if (administratorEntity.getThisLayerAdd() == 1) {
t.setThisLayerAdd(0);
}
if (administratorEntity.getThisLayerEdit() == 1) {
t.setThisLayerEdit(0);
}
if (administratorEntity.getThisLayerDelete() == 1) {
t.setThisLayerDelete(0);
}
}
if (administratorEntity.getSubLayerSelect()!= null && administratorEntity.getSubLayerSelect() == 1) {
t.setSubLayerSelect(0);
flag = true;
if (administratorEntity.getSubLayerAdd()!= null && administratorEntity.getSubLayerAdd() == 1) {
t.setSubLayerAdd(0);
}
if (administratorEntity.getSubLayerEdit()!= null && administratorEntity.getSubLayerEdit() == 1) {
t.setSubLayerEdit(0);
}
if (administratorEntity.getSubLayerDelete()!= null && administratorEntity.getSubLayerDelete() == 1) {
t.setSubLayerDelete(0);
}
}
if (flag) {
selectorModelss.add(t);
}
}
});
selectorModels = selectorModelss;
List<OrganizeAdministratorEntity> moduleOrganizeAdministratorEntity = organizeAdminIsTratorService.getOrganizeAdministratorEntity(UserProvider.getLoginUserId(), jnpf.constant.PermissionConst.MODULE, false);
List<String> moduleIds = moduleOrganizeAdministratorEntity.stream().map(OrganizeAdministratorEntity::getOrganizeId).collect(Collectors.toList());
List<ModuleEntity> moduleByIds = moduleApi.getModuleByIds(moduleIds);
List<ModuleSelectorModel> moduleSelectorVOLists = JsonUtil.getJsonToList(moduleByIds, ModuleSelectorModel.class);
moduleSelectorVOList = moduleSelectorVOLists;
// List<OrganizeAdministratorEntity> systemOrganizeAdministratorEntity = organizeAdminIsTratorService.getOrganizeAdministratorEntity(UserProvider.getLoginUserId(), true, PermissionConst.SYSTEM);
}
// 判断是否为空
if (StringUtil.isNotEmpty(userId)) {
List<OrganizeAdministratorEntity> organizeAdministratorEntity = organizeAdminIsTratorService.getOrganizeAdministratorEntity(userId, jnpf.constant.PermissionConst.ORGANIZE, false);
// 处理子组织字段
List<OrganizeAdministratorSelectorModel> finalSelectorModels3 = selectorModels;
organizeAdministratorEntity.forEach(t -> {
if (!isAdministrator) {
if (t.getSubLayerSelect() != null && t.getSubLayerSelect() == 1) {
// 得到组织id
List<String> underOrganizations = organizeService.getUnderOrganizations(t.getOrganizeId(), false);
// 将同样的组织id的数据先处理好
List<OrganizeAdministratorSelectorModel> collect1 = finalSelectorModels3.stream().filter(fsm -> underOrganizations.contains(fsm.getOrganizeId())).collect(Collectors.toList());
collect1.forEach(cl -> {
OrganizeAdministratorSelectorModel organizeAdministratorSelectorModel = finalSelectorModels3.stream().filter(fms -> fms.getOrganizeId().equals(cl.getOrganizeId())).findFirst().orElse(null);
if (organizeAdministratorSelectorModel != null) {
if (organizeAdministratorSelectorModel.getThisLayerSelect() != null && organizeAdministratorSelectorModel.getThisLayerSelect() == 0) {
organizeAdministratorSelectorModel.setThisLayerSelect(0);
} else {
organizeAdministratorSelectorModel.setThisLayerSelect(3);
}
if (organizeAdministratorSelectorModel.getSubLayerSelect() != null && organizeAdministratorSelectorModel.getSubLayerSelect() == 0) {
organizeAdministratorSelectorModel.setSubLayerSelect(0);
} else {
organizeAdministratorSelectorModel.setSubLayerSelect(3);
}
}
});
// 当前模型包含组织id
List<String> collect = underOrganizations.stream().filter(uo -> !finalSelectorModels3.stream().map(OrganizeAdministratorSelectorModel::getOrganizeId).collect(Collectors.toList()).contains(uo)).collect(Collectors.toList());
collect.forEach(cl -> {
OrganizeAdministratorEntity organizeAdministratorEntity1 = organizeAdministratorEntity.stream().filter(oa -> oa.getOrganizeId().equals(cl)).findFirst().orElse(null);
if (organizeAdministratorEntity1 != null) {
OrganizeEntity info = organizeService.getInfo(organizeAdministratorEntity1.getOrganizeId());
OrganizeAdministratorSelectorModel organizeAdministratorSelectorModel = JsonUtil.getJsonToBean(info, OrganizeAdministratorSelectorModel.class);
organizeAdministratorSelectorModel.setOrganizeId(organizeAdministratorEntity1.getOrganizeId());
organizeAdministratorSelectorModel.setThisLayerSelect(3);
organizeAdministratorSelectorModel.setSubLayerSelect(3);
finalSelectorModels3.add(organizeAdministratorSelectorModel);
}
});
}
}
});
List<OrganizeAdministratorSelectorModel> finalSelectorModels = new ArrayList<>(selectorModels);
List<OrganizeAdministratorSelectorModel> finalSelectorModels1 = new ArrayList<>(selectorModels);
organizeAdministratorEntity.forEach(t -> {
// 我没有他有时,需要判断此组织是否跟我所管理的组织相同,不同则需要放进去
OrganizeAdministratorSelectorModel organizeAdministratorSelectorModel = finalSelectorModels.stream().filter(selectorModel -> selectorModel.getOrganizeId().equals(t.getOrganizeId())).findFirst().orElse(null);
if (organizeAdministratorSelectorModel == null) {
boolean flag = false;
if (t.getThisLayerSelect() != null) {
if (t.getThisLayerSelect() == 1) {
t.setThisLayerSelect(2);
flag = true;
if (flag && t.getThisLayerAdd() != null && t.getThisLayerAdd() == 1) {
t.setThisLayerAdd(2);
} else if (t.getThisLayerAdd() != null) {
t.setThisLayerAdd(null);
}
if (flag && t.getThisLayerEdit() != null && t.getThisLayerEdit() == 1) {
t.setThisLayerEdit(2);
} else if (t.getThisLayerEdit() != null) {
t.setThisLayerEdit(null);
}
if (flag && t.getThisLayerDelete() != null && t.getThisLayerDelete() == 1) {
t.setThisLayerDelete(2);
} else if (t.getThisLayerDelete() != null) {
t.setThisLayerDelete(null);
}
} else {
t.setThisLayerSelect(null);
t.setThisLayerAdd(null);
t.setThisLayerEdit(null);
t.setThisLayerDelete(null);
}
}
boolean flag1 = false;
if (t.getSubLayerSelect() != null) {
if (t.getSubLayerSelect() == 1) {
t.setSubLayerSelect(2);
flag1 = true;
if (flag1 && t.getSubLayerAdd() != null && t.getSubLayerAdd() == 1) {
t.setSubLayerAdd(2);
} else if (t.getSubLayerAdd() != null) {
t.setSubLayerAdd(null);
}
if (flag1 && t.getSubLayerEdit() != null && t.getSubLayerEdit() == 1) {
t.setSubLayerEdit(2);
} else if (t.getSubLayerEdit() != null) {
t.setSubLayerEdit(null);
}
if (flag1 && t.getSubLayerDelete() != null && t.getSubLayerDelete() == 1) {
t.setSubLayerDelete(2);
} else if (t.getSubLayerDelete() != null) {
t.setSubLayerDelete(null);
}
} else {
t.setSubLayerSelect(null);
t.setSubLayerAdd(null);
t.setSubLayerEdit(null);
t.setSubLayerDelete(null);
}
}
if (flag || flag1) {
OrganizeAdministratorSelectorModel jsonToBean = JsonUtil.getJsonToBean(t, OrganizeAdministratorSelectorModel.class);
OrganizeEntity info = organizeService.getInfo(t.getOrganizeId());
if (info != null) {
jsonToBean.setParentId(info.getParentId());
jsonToBean.setId(info.getId());
jsonToBean.setCategory(info.getCategory());
jsonToBean.setIcon(jnpf.constant.PermissionConst.COMPANY.equals(info.getCategory()) ? "icon-ym icon-ym-tree-organization3" : "icon-ym icon-ym-tree-department1");
jsonToBean.setOrganizeId(t.getOrganizeId());
jsonToBean.setOrganizeIdTree(info.getOrganizeIdTree());
jsonToBean.setFullName(info.getFullName());
finalSelectorModels1.add(jsonToBean);
}
}
}
});
organizeAdministratorEntity.forEach(t -> {
finalSelectorModels1.forEach(fs -> {
if (t.getOrganizeId().equals(fs.getOrganizeId())) {
// 本层添加
if (fs.getThisLayerAdd() != null) {
if (fs.getThisLayerAdd() == 0) {
if (t.getThisLayerAdd() != null) {
if (t.getThisLayerAdd() == 1) {
fs.setThisLayerAdd(1);
} else {
fs.setThisLayerAdd(0);
}
}
} else if (fs.getThisLayerAdd() == 3) {
if (t.getThisLayerAdd() != null) {
if (t.getThisLayerAdd() == 1) {
fs.setThisLayerAdd(1);
} else {
fs.setThisLayerAdd(3);
}
}
} else {
if (t.getThisLayerAdd() != null) {
if (t.getThisLayerAdd() == 1) {
if (isAdministrator) {
fs.setThisLayerAdd(1);
} else {
fs.setThisLayerAdd(2);
}
}
}
}
} else {
if (t.getThisLayerAdd() != null) {
if (t.getThisLayerAdd() == 1) {
if (isAdministrator) {
fs.setThisLayerAdd(1);
} else {
fs.setThisLayerAdd(2);
}
}
}
}
// 本层编辑
if (fs.getThisLayerEdit() != null) {
if (fs.getThisLayerEdit() == 0) {
if (t.getThisLayerEdit() != null) {
if (t.getThisLayerEdit() == 1) {
fs.setThisLayerEdit(1);
} else {
fs.setThisLayerEdit(0);
}
}
} else if (fs.getThisLayerEdit() == 3) {
if (t.getThisLayerEdit() != null) {
if (t.getThisLayerEdit() == 1) {
fs.setThisLayerEdit(1);
} else {
fs.setThisLayerEdit(3);
}
}
} else {
if (t.getThisLayerEdit() != null) {
if (t.getThisLayerEdit() == 1) {
if (isAdministrator) {
fs.setThisLayerEdit(1);
} else {
fs.setThisLayerEdit(2);
}
}
}
}
} else {
if (t.getThisLayerEdit() != null) {
if (t.getThisLayerEdit() == 1) {
if (isAdministrator) {
fs.setThisLayerEdit(1);
} else {
fs.setThisLayerEdit(2);
}
}
}
}
// 本层删除
if (fs.getThisLayerDelete() != null) {
if (fs.getThisLayerDelete() == 0) {
if (t.getThisLayerDelete() != null) {
if (t.getThisLayerDelete() == 1) {
fs.setThisLayerDelete(1);
} else {
fs.setThisLayerDelete(0);
}
}
} else if (fs.getThisLayerDelete() == 3) {
if (t.getThisLayerDelete() != null) {
if (t.getThisLayerDelete() == 1) {
fs.setThisLayerDelete(1);
} else {
fs.setThisLayerDelete(3);
}
}
} else {
if (t.getThisLayerDelete() != null) {
if (t.getThisLayerDelete() == 1) {
if (isAdministrator) {
fs.setThisLayerDelete(1);
} else {
fs.setThisLayerDelete(2);
}
}
}
}
} else {
if (t.getThisLayerDelete() != null) {
if (t.getThisLayerDelete() == 1) {
if (isAdministrator) {
fs.setThisLayerDelete(1);
} else {
fs.setThisLayerDelete(2);
}
}
}
}
// 本层查看
if (fs.getThisLayerSelect() != null) {
if (fs.getThisLayerSelect() == 0) {
if (t.getThisLayerSelect() != null) {
if (t.getThisLayerSelect() == 1) {
fs.setThisLayerSelect(1);
} else {
fs.setThisLayerSelect(0);
}
}
} else if (fs.getThisLayerSelect() == 3) {
if (t.getThisLayerSelect() != null) {
if (t.getThisLayerSelect() == 1) {
fs.setThisLayerSelect(1);
} else {
fs.setThisLayerSelect(3);
}
}
} else {
if (t.getThisLayerSelect() != null) {
if (t.getThisLayerSelect() == 1) {
if (isAdministrator) {
fs.setThisLayerSelect(1);
} else {
fs.setThisLayerSelect(2);
}
}
}
}
} else {
if (t.getThisLayerSelect() != null) {
if (t.getThisLayerSelect() == 1) {
if (isAdministrator) {
fs.setThisLayerSelect(1);
} else {
fs.setThisLayerSelect(2);
}
}
}
}
// 子层添加
if (fs.getSubLayerAdd() != null) {
if (fs.getSubLayerAdd() == 0) {
if (t.getSubLayerAdd() != null) {
if (t.getSubLayerAdd() == 1) {
fs.setSubLayerAdd(1);
} else {
fs.setSubLayerAdd(0);
}
}
} else if (fs.getSubLayerAdd() == 3) {
if (t.getSubLayerAdd() != null) {
if (t.getSubLayerAdd() == 1) {
fs.setSubLayerAdd(1);
} else {
fs.setSubLayerAdd(3);
}
}
} else {
if (t.getSubLayerAdd() != null) {
if (t.getSubLayerAdd() == 1) {
if (isAdministrator) {
fs.setSubLayerAdd(1);
} else {
fs.setSubLayerAdd(2);
}
}
}
}
} else {
if (t.getSubLayerAdd() != null) {
if (t.getSubLayerAdd() == 1) {
if (isAdministrator) {
fs.setSubLayerAdd(1);
} else {
fs.setSubLayerAdd(2);
}
}
}
}
if (fs.getSubLayerEdit() != null) {
if (fs.getSubLayerEdit() == 0) {
if (t.getSubLayerEdit() != null) {
if (t.getSubLayerEdit() == 1) {
fs.setSubLayerEdit(1);
} else {
fs.setSubLayerEdit(0);
}
}
} else if (fs.getSubLayerEdit() == 3) {
if (t.getSubLayerEdit() != null) {
if (t.getSubLayerEdit() == 1) {
fs.setSubLayerEdit(1);
} else {
fs.setSubLayerEdit(3);
}
}
} else {
if (t.getSubLayerEdit() != null) {
if (t.getSubLayerEdit() == 1) {
if (isAdministrator) {
fs.setSubLayerEdit(1);
} else {
fs.setSubLayerEdit(2);
}
}
}
}
} else {
if (t.getSubLayerEdit() != null) {
if (t.getSubLayerEdit() == 1) {
if (isAdministrator) {
fs.setSubLayerEdit(1);
} else {
fs.setSubLayerEdit(2);
}
}
}
}
if (fs.getSubLayerDelete() != null) {
if (fs.getSubLayerDelete() == 0) {
if (t.getSubLayerDelete() != null) {
if (t.getSubLayerDelete() == 1) {
fs.setSubLayerDelete(1);
} else {
fs.setSubLayerDelete(0);
}
}
} else if (fs.getSubLayerDelete() == 3) {
if (t.getSubLayerDelete() != null) {
if (t.getSubLayerDelete() == 1) {
fs.setSubLayerDelete(1);
} else {
fs.setSubLayerDelete(3);
}
}
} else {
if (t.getSubLayerDelete() != null) {
if (t.getSubLayerDelete() == 1) {
if (isAdministrator) {
fs.setSubLayerDelete(1);
} else {
fs.setSubLayerDelete(2);
}
}
}
}
} else {
if (t.getSubLayerDelete() != null) {
if (t.getSubLayerDelete() == 1) {
if (isAdministrator) {
fs.setSubLayerDelete(1);
} else {
fs.setSubLayerDelete(2);
}
}
}
}
if (fs.getSubLayerSelect() != null) {
if (fs.getSubLayerSelect() == 0) {
if (t.getSubLayerSelect() != null) {
if (t.getSubLayerSelect() == 1) {
fs.setSubLayerSelect(1);
} else {
fs.setSubLayerSelect(0);
}
}
} else if (fs.getSubLayerSelect() == 3) {
if (t.getSubLayerSelect() != null) {
if (t.getSubLayerSelect() == 1) {
fs.setSubLayerSelect(1);
} else {
fs.setSubLayerSelect(3);
}
}
} else {
if (t.getSubLayerSelect() != null) {
if (t.getSubLayerSelect() == 1) {
if (isAdministrator) {
fs.setSubLayerSelect(1);
} else {
fs.setSubLayerSelect(2);
}
}
}
}
} else {
if (t.getSubLayerSelect() != null) {
if (t.getSubLayerSelect() == 1) {
if (isAdministrator) {
fs.setSubLayerSelect(1);
} else {
fs.setSubLayerSelect(2);
}
}
}
}
}
});
});
selectorModels = finalSelectorModels1;
// 系统
List<OrganizeAdministratorEntity> systemOrganizeAdministratorEntity = organizeAdminIsTratorService.getOrganizeAdministratorEntity(userId, jnpf.constant.PermissionConst.SYSTEM, true);
List<String> systemPermissionIds = systemOrganizeAdministratorEntity.stream().map(OrganizeAdministratorEntity::getOrganizeId).collect(Collectors.toList());
List<String> collect = systemSelectorVOList.stream().map(SystemSelectorVO::getId).collect(Collectors.toList());
List<String> systemList = new ArrayList<>();
systemList.addAll(systemPermissionIds);
systemList.addAll(collect);
// 交集 1
List<String> collect1 = systemPermissionIds.stream().filter(collect::contains).collect(Collectors.toList());
systemList = systemList.stream().distinct().collect(Collectors.toList());
// 去掉交集后
systemList.removeAll(collect1);
// 我有他没有 0
List<String> collect2 = collect.stream().filter(systemList::contains).collect(Collectors.toList());
// 他有我没有 2
List<String> collect3 = systemPermissionIds.stream().filter(systemList::contains).collect(Collectors.toList());
List<SystemEntity> listByIds1 = systemApi.getListByIds(collect1);
List<SystemSelectorVO> systemSelectorVOList1 = JsonUtil.getJsonToList(listByIds1, SystemSelectorVO.class);
systemSelectorVOList1.forEach(t -> t.setIsPermission(1));
List<SystemEntity> listByIds2 = systemApi.getListByIds(collect2);
List<SystemSelectorVO> systemSelectorVOList2 = JsonUtil.getJsonToList(listByIds2, SystemSelectorVO.class);
systemSelectorVOList2.forEach(t -> t.setIsPermission(0));
List<SystemEntity> listByIds3 = systemApi.getListByIds(collect3);
List<SystemSelectorVO> systemSelectorVOList3 = JsonUtil.getJsonToList(listByIds3, SystemSelectorVO.class);
systemSelectorVOList3.forEach(t -> {
t.setIsPermission(2);
t.setDisabled(true);
});
// systemSelectedList.addAll(systemSelectorVOList1.stream().map(SystemSelectorVO::getId).collect(Collectors.toList()));
// systemSelectedList.addAll(systemSelectorVOList3.stream().map(SystemSelectorVO::getId).collect(Collectors.toList()));
systemSelectedList.addAll(systemSelectorVOList.stream().map(SystemSelectorVO::getId).collect(Collectors.toList()));
systemPermissionList.addAll(systemSelectorVOList1);
systemPermissionList.addAll(systemSelectorVOList2);
systemPermissionList.addAll(systemSelectorVOList3);
systemPermissionList = systemPermissionList.stream().sorted(Comparator.comparing(SystemSelectorVO::getSortCode).thenComparing(Comparator.comparing(SystemSelectorVO::getCreatorTime).reversed())).collect(Collectors.toList());
// 菜单
List<OrganizeAdministratorEntity> moduleOrganizeAdministratorEntity = organizeAdminIsTratorService.getOrganizeAdministratorEntity(userId, PermissionConst.MODULE, false);
List<String> modulePermissionIds = moduleOrganizeAdministratorEntity.stream().map(OrganizeAdministratorEntity::getOrganizeId).collect(Collectors.toList());
List<String> moduleCollect = moduleSelectorVOList.stream().map(ModuleSelectorModel::getId).collect(Collectors.toList());
// List<ModuleSelectorModel> moduleSelectorVOListssId = moduleSelectorVOList;
// List<ModuleSelectorModel> moduleSelectorVOListss = moduleSelectorVOList;
// for (ModuleSelectorModel model:moduleSelectorVOList){
// model.getId();
// moduleSelectorVOListssId.addAll(model.getId());
// }
//申请入住先赋值所有的菜单
moduleSelectedList.addAll(moduleSelectorVOList.stream().map(ModuleSelectorModel::getId).collect(Collectors.toList()));
List<String> moduleList = new ArrayList<>();
moduleList.addAll(modulePermissionIds);
moduleList.addAll(moduleCollect);
// 交集 1
List<String> moduleCollect1 = modulePermissionIds.stream().filter(moduleCollect::contains).collect(Collectors.toList());
moduleList = moduleList.stream().distinct().collect(Collectors.toList());
// 去掉交集后
moduleList.removeAll(moduleCollect1);
// 我有他没有 0
List<String> moduleCollect2 = moduleCollect.stream().filter(moduleList::contains).collect(Collectors.toList());
// 他有我没有 2
List<String> moduleCollect3 = modulePermissionIds.stream().filter(moduleList::contains).collect(Collectors.toList());
List<ModuleEntity> moduleListByIds1 = moduleApi.getModuleByIds(moduleCollect1);
List<ModuleSelectorModel> moduleSelectorVOList1 = JsonUtil.getJsonToList(moduleListByIds1, ModuleSelectorModel.class);
moduleSelectorVOList1.forEach(t -> t.setIsPermission(1));
List<ModuleEntity> moduleListByIds2 = moduleApi.getModuleByIds(moduleCollect2);
List<ModuleSelectorModel> moduleSelectorVOList2 = JsonUtil.getJsonToList(moduleListByIds2, ModuleSelectorModel.class);
moduleSelectorVOList2.forEach(t -> t.setIsPermission(0));
List<ModuleEntity> moduleListByIds3 = moduleApi.getModuleByIds(moduleCollect3);
List<ModuleSelectorModel> moduleSelectorVOList3 = JsonUtil.getJsonToList(moduleListByIds3, ModuleSelectorModel.class);
moduleSelectorVOList3.forEach(t -> {
t.setIsPermission(2);
t.setDisabled(true);
});
modulePermissionList.addAll(moduleSelectorVOList1);
modulePermissionList.addAll(moduleSelectorVOList2);
modulePermissionList.addAll(moduleSelectorVOList3);
Set<ModuleSelectorModel> tempModule = new HashSet<>(modulePermissionList);
// 处理上级
List<ModuleSelectorModel> finalModulePermissionList = modulePermissionList;
modulePermissionList.forEach(t -> {
// 判断上级是否存在,不存在的话取出放入总权限列表
parentIdInList(finalModulePermissionList, tempModule, allModuleSelectorVOList, t, t);
});
modulePermissionList = new ArrayList<>(tempModule);
modulePermissionList.forEach(t -> {
if ("-1".equals(t.getParentId())) {
t.setParentId(t.getSystemId());
}
});
// 加入主系统
ModuleSelectorModel jsonToBean = JsonUtil.getJsonToBean(mainSystem, ModuleSelectorModel.class);
if (moduleSelectorVOList1.stream().anyMatch(t -> t.getId().equals(jsonToBean.getId()))) {
jsonToBean.setIsPermission(1);
} else if (moduleSelectorVOList2.stream().anyMatch(t -> t.getId().equals(jsonToBean.getId()))) {
jsonToBean.setIsPermission(0);
} else if (moduleSelectorVOList3.stream().anyMatch(t -> t.getId().equals(jsonToBean.getId()))) {
jsonToBean.setIsPermission(2);
jsonToBean.setDisabled(true);
}
// moduleSelectedList.addAll(moduleSelectorVOList1.stream().map(ModuleSelectorModel::getId).collect(Collectors.toList()));
// moduleSelectedList.addAll(moduleSelectorVOList3.stream().map(ModuleSelectorModel::getId).collect(Collectors.toList()));
jsonToBean.setType(0);
jsonToBean.setParentId("-1");
modulePermissionList.add(jsonToBean);
modulePermissionList = modulePermissionList.stream().sorted(Comparator.comparing(ModuleSelectorModel::getSortCode).thenComparing(Comparator.comparing(ModuleSelectorModel::getCreatorTime).reversed())).collect(Collectors.toList());
List<SumTree<ModuleSelectorModel>> menuList = TreeDotUtils.convertListToTreeDotFilter(modulePermissionList);
moduleVOPermissionList = JsonUtil.getJsonToList(menuList, ModuleSelectorVO.class);
} else {
selectorModels = new ArrayList<>();
}
// 判断断层有没有上下级关系
List<OrganizeAdministratorSelectorModel> finalSelectorModels2 = new ArrayList<>(selectorModels);
selectorModels.forEach(t -> {
if (StringUtil.isNotEmpty(t.getOrganizeIdTree())) {
List<String> list1 = new ArrayList<>();
String[] split = t.getOrganizeIdTree().split(",");
list1 = Arrays.asList(split);
Collections.reverse(list1);
for (String orgId : list1) {
OrganizeAdministratorSelectorModel organizeEntity1 = finalSelectorModels2.stream().filter(organizeEntity -> organizeEntity.getId().equals(orgId)).findFirst().orElse(null);
if (organizeEntity1 != null && !organizeEntity1.getId().equals(t.getId())) {
t.setParentId(organizeEntity1.getId());
String[] split1 = t.getOrganizeIdTree().split(organizeEntity1.getId());
if (split1.length > 1) {
t.setFullName(organizeService.getFullNameByOrgIdTree(split1[1], "/"));
}
break;
}
}
}
});
selectorModels.forEach(t -> t.setIcon(StringUtil.isNotEmpty(t.getCategory()) ? "company".equals(t.getCategory()) ? "icon-ym icon-ym-tree-organization3" : "icon-ym icon-ym-tree-department1" : ""));
List<SumTree<OrganizeAdministratorSelectorModel>> trees = TreeDotUtils.convertListToTreeDot(selectorModels);
List<OrganizeAdministratorSelectorVO> listVO = JsonUtil.getJsonToList(trees, OrganizeAdministratorSelectorVO.class);
listVO.forEach(t -> {
t.setFullName(organizeService.getFullNameByOrgIdTree(t.getOrganizeIdTree(), "/"));
});
vo.setOrgAdminList(listVO);
vo.setSystemPermissionList(systemPermissionList);
vo.setModulePermissionList(moduleVOPermissionList);
vo.setSystemIds(systemSelectedList);
vo.setModuleIds(moduleSelectedList);
return vo;
}
}

@ -5,8 +5,6 @@ import cn.dev33.satoken.annotation.SaMode;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.parser.Feature;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import jnpf.base.controller.SuperController;
@ -15,12 +13,6 @@ import io.swagger.v3.oas.annotations.Operation;
import jnpf.annotation.OrganizePermission;
import jnpf.base.ActionResult;
import jnpf.base.Pagination;
import jnpf.base.entity.*;
import jnpf.base.model.base.SystemBaeModel;
import jnpf.base.model.button.ButtonModel;
import jnpf.base.model.module.ModuleModel;
import jnpf.base.model.resource.ResourceModel;
import jnpf.base.service.ModuleService;
import jnpf.base.vo.ListVO;
import jnpf.constant.MsgCode;
import jnpf.constant.PermissionConst;
@ -29,21 +21,11 @@ import jnpf.message.service.SynThirdQyService;
import jnpf.permission.entity.OrganizeAdministratorEntity;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.exception.DataException;
import jnpf.permission.entity.PermissionGroupEntity;
import jnpf.permission.entity.UserEntity;
import jnpf.permission.model.authorize.AuthorizeDataReturnVO;
import jnpf.permission.model.authorize.AuthorizeDataUpForm;
import jnpf.permission.model.authorize.AuthorizeVO;
import jnpf.permission.model.authorize.DataValuesQuery;
import jnpf.permission.model.organize.*;
import jnpf.permission.model.organizeadministrator.OrganizeAdminIsTratorCrForm;
import jnpf.permission.model.organizeadministrator.OrganizeAdministratorCrModel;
import jnpf.permission.model.organizeadministrator.OrganizeAdministratorSelectedVO;
import jnpf.permission.model.organizeadministrator.OrganizeAdministratorSelectorVO;
import jnpf.permission.model.permissiongroup.PermissionGroupModel;
import jnpf.permission.model.user.form.UserCrForm;
import jnpf.permission.model.user.mod.UserIdModel;
import jnpf.permission.service.*;
import jnpf.permission.service.OrganizeAdministratorService;
import jnpf.permission.service.OrganizeRelationService;
import jnpf.permission.service.OrganizeService;
import jnpf.permission.service.UserService;
import jnpf.util.JsonUtil;
import jnpf.util.JsonUtilEx;
import jnpf.util.StringUtil;
@ -52,9 +34,7 @@ import jnpf.util.treeutil.ListToTreeUtil;
import jnpf.util.treeutil.SumTree;
import jnpf.util.treeutil.newtreeutil.TreeDotUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@ -85,14 +65,6 @@ public class OrganizeController extends SuperController<OrganizeService, Organiz
private SynThirdQyService synThirdQyService;
@Autowired
private SynThirdDingTalkService synThirdDingTalkService;
@Autowired
private PermissionGroupService permissionGroupService;
@Autowired
private AuthorizeController authorizeController;
@Autowired
private AuthorizeService authorizeService;
@Autowired
private ModuleService moduleService;
/**
* 线
*/
@ -104,12 +76,6 @@ public class OrganizeController extends SuperController<OrganizeService, Organiz
private UserProvider userProvider;
@Autowired
private OrganizeRelationService organizeRelationService;
@Autowired
private UserController userController;
@Autowired
private OrganizeAdministratorController organizeAdministratorController;
@Autowired
private OrganizeAdministratorService organizeAdminIsTratorService;
//---------------------------组织管理--------------------------------------------
@ -180,9 +146,6 @@ public class OrganizeController extends SuperController<OrganizeService, Organiz
List<OrganizeListVO> listVO = JsonUtil.getJsonToList(trees, OrganizeListVO.class);
listVO.forEach(t -> {
t.setFullName(organizeService.getFullNameByOrgIdTree(orgIdNameMaps, t.getOrganizeIdTree(), "/"));
if("长江云息".equals(t.getFullName())){
t.setFullName("易回收平台");
}
});
ListVO<OrganizeListVO> vo = new ListVO<>();
vo.setList(listVO);
@ -423,20 +386,20 @@ public class OrganizeController extends SuperController<OrganizeService, Organiz
})
@SaCheckPermission(value = {"permission.organize"})
@PostMapping
@Transactional
public ActionResult create(@RequestBody @Valid OrganizeCrForm organizeCrForm) {
OrganizeEntity entity = JsonUtil.getJsonToBean(organizeCrForm, OrganizeEntity.class);
entity.setCategory("company");
if (organizeService.isExistByFullName(entity, false, false)) {
return ActionResult.fail("公司名称不能重复");
}
// if (organizeService.isExistByEnCode(entity.getEnCode(), entity.getId())) {
// return ActionResult.fail("公司编码不能重复");
// }
if (organizeService.isExistByEnCode(entity.getEnCode(), entity.getId())) {
return ActionResult.fail("公司编码不能重复");
}
// 通过组织id获取父级组织
String organizeIdTree = getOrganizeIdTree(entity);
entity.setOrganizeIdTree(organizeIdTree);
organizeService.create(entity);
threadPoolExecutor.execute(() -> {
try{
@ -451,502 +414,6 @@ public class OrganizeController extends SuperController<OrganizeService, Organiz
return ActionResult.success(MsgCode.SU001.get());
}
/**
*
*
* @param organizeCrForm
* @return
*/
@OrganizePermission
@Operation(summary = "申请入住新建组织")
@Parameters({
@Parameter(name = "organizeCrForm", description = "新建模型", required = true)
})
@SaCheckPermission(value = {"permission.organize.check"})
@PostMapping("/check")
// @Transactional
public ActionResult checkCreate(@RequestBody @Valid OrganizeCrForm organizeCrForm) throws Exception {
OrganizeEntity entity = JsonUtil.getJsonToBean(organizeCrForm, OrganizeEntity.class);
entity.setCategory("company");
if (organizeService.isExistByFullName(entity, false, false)) {
return ActionResult.fail("公司名称不能重复");
}
boolean areEqual = organizeCrForm.getCode().equals("000000");
if (areEqual == false) {
return ActionResult.fail("验证码必须为000000");
}
QueryWrapper<UserEntity> queryWrapperuser =new QueryWrapper<>();
queryWrapperuser.lambda().eq(UserEntity::getAccount,organizeCrForm.getPropertyJson().getManagerTelePhone());
List<UserEntity> userEntityList =userService.list(queryWrapperuser);
if (userEntityList!=null && userEntityList.size()>0){
return ActionResult.fail("账户名称不能重复或者手机号不能重复");
}
if (organizeCrForm.getEnabledMark() == 1) {
// 通过组织id获取父级组织
String organizeIdTree = getOrganizeIdTree(entity);
entity.setOrganizeIdTree(organizeIdTree);
organizeService.create(entity);
//申请入住新建组织自动添加用户
UserCrForm userCrForm = new UserCrForm();
userCrForm.setRealName(entity.getFullName()); //商户名称变为用户名称
userCrForm.setAccount(organizeCrForm.getPropertyJson().getManagerTelePhone()); //Json手机号为账户
userCrForm.setGender(3); //默认保密
userCrForm.setOrganizeId(entity.id);
userCrForm.setEnabledMark(1);
userCrForm.setIsAdministrator(1); //新增租户变成管理员
userCrForm.setMobilePhone(organizeCrForm.getPropertyJson().getManagerTelePhone());
UserEntity userEntity = JsonUtil.getJsonToBean(userCrForm, UserEntity.class);
userEntity.setPassword("4a7d1ed414474e4033ac29ccb8653d9b");
// if (userService.isExistByAccount(userCrForm.getAccount())) {
// return ActionResult.fail("账户名称不能重复");
// }
userService.create(userEntity);
//申请入住赋予分级权限
OrganizeAdministratorSelectedVO vo = new OrganizeAdministratorSelectedVO();
vo = organizeAdministratorController.getSelectors(userEntity.id);
OrganizeAdministratorSelectorVO vo1 = vo.getOrgAdminList().get(0);
OrganizeAdministratorCrModel organizeAdministratorCrModel = new OrganizeAdministratorCrModel();
List<OrganizeAdministratorCrModel> organizeAdministratorCrModelList = new ArrayList<>();
organizeAdministratorCrModelList.add(organizeAdministratorCrModel);
OrganizeAdminIsTratorCrForm organizeAdminIsTratorCrForm = new OrganizeAdminIsTratorCrForm();
organizeAdminIsTratorCrForm.setModuleIds(vo.getModuleIds());
// organizeAdminIsTratorCrForm.setSystemIds(vo.getSystemIds());
organizeAdminIsTratorCrForm.setUserId(userEntity.id);
organizeAdminIsTratorCrForm.setOrgAdminModelCheck(vo.getOrgAdminList());
// organizeAdministratorController.saveCheck(organizeAdminIsTratorCrForm);
String userId = organizeAdminIsTratorCrForm.getUserId();
List<OrganizeAdministratorSelectorVO> list = new ArrayList<>(16);
// 递归得到所有的数组
getOrganizeAdminIsTratorModelCheck(list, organizeAdminIsTratorCrForm.getOrgAdminModelCheck());
List<OrganizeAdministratorEntity> jsonToList = JsonUtil.getJsonToList(list, OrganizeAdministratorEntity.class);
// 处理应用
// List<String> systemIds = organizeAdminIsTratorCrForm.getSystemIds();
// systemIds.forEach(t -> {
// OrganizeAdministratorEntity organizeAdministratorEntity = new OrganizeAdministratorEntity();
// organizeAdministratorEntity.setOrganizeType(jnpf.constant.PermissionConst.SYSTEM);
// organizeAdministratorEntity.setOrganizeId(t);
// organizeAdministratorEntity.setThisLayerSelect(1);
// jsonToList.add(organizeAdministratorEntity);
// });
// 处理菜单
List<String> moduleIds = organizeAdminIsTratorCrForm.getModuleIds();
moduleIds.forEach(t -> {
OrganizeAdministratorEntity organizeAdministratorEntity = new OrganizeAdministratorEntity();
organizeAdministratorEntity.setOrganizeType(jnpf.constant.PermissionConst.MODULE);
organizeAdministratorEntity.setOrganizeId(t);
organizeAdministratorEntity.setThisLayerSelect(1);
jsonToList.add(organizeAdministratorEntity);
});
organizeAdminIsTratorService.createList(jsonToList, userId);
//查询组织id和人员
QueryWrapper<OrganizeAdministratorEntity> administratorQueryWrapper = new QueryWrapper<>();
administratorQueryWrapper.lambda().eq(OrganizeAdministratorEntity::getUserId, userEntity.id);
administratorQueryWrapper.lambda().eq(OrganizeAdministratorEntity::getOrganizeId, entity.id);
administratorQueryWrapper.lambda().eq(OrganizeAdministratorEntity::getThisLayerAdd, 0);
administratorQueryWrapper.lambda().select(OrganizeAdministratorEntity::getId);
//替代前台传值,显示组织权限
List<String> organizeAdminIsTratorList = organizeAdminIsTratorService.listObjs(administratorQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
if (organizeAdminIsTratorList.size() > 0) {
List<OrganizeAdministratorEntity> organizeAdministratorEntityList = organizeAdminIsTratorService.listByIds(organizeAdminIsTratorList);
for (OrganizeAdministratorEntity oEntity : organizeAdministratorEntityList) {
oEntity.setThisLayerAdd(1);
oEntity.setThisLayerEdit(1);
oEntity.setThisLayerDelete(1);
oEntity.setSubLayerAdd(1);
oEntity.setSubLayerEdit(1);
oEntity.setSubLayerDelete(1);
oEntity.setThisLayerSelect(1);
oEntity.setSubLayerSelect(1);
}
organizeAdminIsTratorService.updateBatchById(organizeAdministratorEntityList);
}
//添加权限
PermissionGroupModel model = new PermissionGroupModel();
//公司名称为权限名称
model.setFullName(organizeCrForm.getFullName() + "权限");
model.setEnCode(organizeCrForm.getPropertyJson().getManagerTelePhone() + "Code");//Json手机号为编码
model.setSortCode(0L);
model.setEnabledMark(1);
PermissionGroupEntity permissionGroupEntity = JsonUtil.getJsonToBean(model, PermissionGroupEntity.class);
if (permissionGroupService.isExistByFullName(permissionGroupEntity.getId(), permissionGroupEntity)) {
return ActionResult.fail(MsgCode.EXIST001.get());
}
if (permissionGroupService.isExistByEnCode(permissionGroupEntity.getId(), permissionGroupEntity)) {
return ActionResult.fail(MsgCode.EXIST002.get());
}
permissionGroupService.create(permissionGroupEntity);
//权限赋予成员
PermissionGroupEntity permissionGroupEntity1 = permissionGroupService.info(permissionGroupEntity.id);
String permissionId = permissionGroupEntity.id;
if (entity == null) {
return ActionResult.fail(MsgCode.FA003.get());
}
UserIdModel userIdModel = new UserIdModel();
StringJoiner stringJoiner = new StringJoiner(",");
userIdModel.setIds(entity.id + "--company");
List<String> userIdUserIdModel = userIdModel.getIds();
userIdUserIdModel.forEach(t -> {
stringJoiner.add(t);
});
permissionGroupEntity1.setPermissionMember(stringJoiner.toString());
// 修改前的用户
List<String> member = permissionGroupService.list(Collections.singletonList(permissionId))
.stream().filter(t -> StringUtil.isNotEmpty(t.getPermissionMember())).map(PermissionGroupEntity::getPermissionMember).collect(Collectors.toList());
// 新的用户
member.addAll(userIdUserIdModel);
member = member.stream().distinct().collect(Collectors.toList());
List<String> userIdList = userService.getUserIdList(member, null);
permissionGroupService.update(permissionId, permissionGroupEntity1);
userService.delCurUser(userIdList.stream().toArray(String[]::new));
//查询所有的菜单
DataValuesQuery dataValuesQuery = new DataValuesQuery();
dataValuesQuery.setType("system");
AuthorizeVO authorizeVO = authorizeController.getValuesDatas(permissionId, dataValuesQuery);
//给业务平台id
List<String> systemBaeModelList = new ArrayList<>();
for (SystemBaeModel systemBaeModel : authorizeVO.getSystemList()) {
systemBaeModelList.add(systemBaeModel.getId());
}
//给菜单id
List<String> moduleModelList = new ArrayList<>();
for (ModuleModel moduleModel : authorizeVO.getModuleList()) {
// moduleModelList.add(moduleModel.getId());
if (moduleModel.getId().equals("549936226388435525")==true){
moduleModelList.add(moduleModel.getId());
}else if (moduleModel.getId().equals("539722444282269573")==true){
moduleModelList.add(moduleModel.getId());
}else if (moduleModel.getId().equals("539722119542476677")==true){
moduleModelList.add(moduleModel.getId());
}
// else if (moduleModel.getId().equals("539724075967188869")==true){
// moduleModelList.add(moduleModel.getId());
// }
}
//给按钮id
List<String> buttonModelList = new ArrayList<>();
for (ButtonModel buttonModel : authorizeVO.getButtonList()) {
// buttonModelList.add(buttonModel.getId());
if (buttonModel.getId().equals("549936226388435525")==true){
buttonModelList.add(buttonModel.getId());
}else if (buttonModel.getId().equals("539722444282269573")==true){
buttonModelList.add(buttonModel.getId());
}else if (buttonModel.getId().equals("539722119542476677")==true){
buttonModelList.add(buttonModel.getId());
}
}
//给权限id
List<String> resourceModelList = new ArrayList<>();
for (ResourceModel resourceModel : authorizeVO.getResourceList()) {
// resourceModelList.add(resourceModel.getId());
if (resourceModel.getId().equals("549937669757493829")==true){
resourceModelList.add(resourceModel.getId());
}
if (resourceModel.getId().equals("540425881139554885")==true){
resourceModelList.add(resourceModel.getId());
}
}
for (ResourceModel resourceModel : authorizeVO.getResourceList()) {
QueryWrapper<ModuleEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ModuleEntity::getId, resourceModel.getModuleId());
List<ModuleEntity> moduleEntityList = moduleService.list(queryWrapper);
if (moduleEntityList.size() > 0) {
// resourceModelList.add(moduleEntityList.get(0).getId());
QueryWrapper<ModuleEntity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.lambda().eq(ModuleEntity::getId, moduleEntityList.get(0).getParentId());
List<ModuleEntity> moduleEntityList1 = moduleService.list(queryWrapper1);
if (moduleEntityList1.size() > 0) {
// resourceModelList.add(moduleEntityList1.get(0).getId());
if (moduleEntityList1.get(0).getId().equals("549936226388435525")==true){
resourceModelList.add(moduleEntityList1.get(0).getId());
}else if (moduleEntityList1.get(0).getId().equals("539722444282269573")==true){
resourceModelList.add(moduleEntityList1.get(0).getId());
}else if (moduleEntityList1.get(0).getId().equals("539722119542476677")==true){
resourceModelList.add(moduleEntityList1.get(0).getId());
}
}
}
}
//去重菜单id
List<String> newList = new ArrayList<>();
for (String id : resourceModelList) {
if (!newList.contains(id)) {
newList.add(id);
}
}
//string转为 String[]
String[] arraySystem = systemBaeModelList.toArray(new String[0]);
String[] arrayModuleList = moduleModelList.toArray(new String[0]);
String[] arrayButtonList = buttonModelList.toArray(new String[0]);
String[] arrayResourceList = newList.toArray(new String[0]);
//赋值
AuthorizeDataUpForm authorizeDataUpForm = new AuthorizeDataUpForm();
authorizeDataUpForm.setSystemIds(arraySystem);
authorizeDataUpForm.setModule(arrayModuleList);
authorizeDataUpForm.setButton(arrayButtonList);
authorizeDataUpForm.setResource(arrayResourceList);
//添加权限
authorizeService.save(permissionId, authorizeDataUpForm);
// String[] arraySystem1 = authorizeVO.getSystemList().toArray(new String[0]);
//取消租户的管理员
UserEntity userEntityAdmin = new UserEntity();
userEntityAdmin.setIsAdministrator(0);
userService.update(userEntity.id, userEntity);
return ActionResult.success(MsgCode.SU001.get());
}
else if (organizeCrForm.getEnabledMark() == 2) {
// 通过组织id获取父级组织
String organizeIdTree = getOrganizeIdTree(entity);
entity.setOrganizeIdTree(organizeIdTree);
organizeService.create(entity);
//申请入住新建组织自动添加用户
UserCrForm userCrForm = new UserCrForm();
userCrForm.setRealName(entity.getFullName()); //商户名称变为用户名称
userCrForm.setAccount(organizeCrForm.getPropertyJson().getManagerTelePhone()); //Json手机号为账户
userCrForm.setGender(3); //默认保密
userCrForm.setOrganizeId(entity.id);
userCrForm.setEnabledMark(1);
userCrForm.setIsAdministrator(1); //新增租户变成管理员
userCrForm.setMobilePhone(organizeCrForm.getPropertyJson().getManagerTelePhone());
UserEntity userEntity = JsonUtil.getJsonToBean(userCrForm, UserEntity.class);
userEntity.setPassword("4a7d1ed414474e4033ac29ccb8653d9b");
// if (userService.isExistByAccount(userCrForm.getAccount())) {
// return ActionResult.fail("账户名称不能重复");
// }
userService.create(userEntity);
//申请入住赋予分级权限
// ActionResult<OrganizeAdministratorSelectedVO> vo = new ActionResult<OrganizeAdministratorSelectedVO>();
OrganizeAdministratorSelectedVO vo = new OrganizeAdministratorSelectedVO();
vo = organizeAdministratorController.getSelectors(userEntity.id);
OrganizeAdministratorSelectorVO vo1 = vo.getOrgAdminList().get(0);
OrganizeAdministratorCrModel organizeAdministratorCrModel = new OrganizeAdministratorCrModel();
List<OrganizeAdministratorCrModel> organizeAdministratorCrModelList = new ArrayList<>();
organizeAdministratorCrModelList.add(organizeAdministratorCrModel);
OrganizeAdminIsTratorCrForm organizeAdminIsTratorCrForm = new OrganizeAdminIsTratorCrForm();
organizeAdminIsTratorCrForm.setModuleIds(vo.getModuleIds());
organizeAdminIsTratorCrForm.setSystemIds(vo.getSystemIds());
organizeAdminIsTratorCrForm.setUserId(userEntity.id);
organizeAdminIsTratorCrForm.setOrgAdminModelCheck(vo.getOrgAdminList());
// organizeAdministratorController.saveCheck(organizeAdminIsTratorCrForm);
String userId = organizeAdminIsTratorCrForm.getUserId();
List<OrganizeAdministratorSelectorVO> list = new ArrayList<>(16);
// 递归得到所有的数组
getOrganizeAdminIsTratorModelCheck(list, organizeAdminIsTratorCrForm.getOrgAdminModelCheck());
List<OrganizeAdministratorEntity> jsonToList = JsonUtil.getJsonToList(list, OrganizeAdministratorEntity.class);
// 处理应用
List<String> systemIds = organizeAdminIsTratorCrForm.getSystemIds();
systemIds.forEach(t -> {
OrganizeAdministratorEntity organizeAdministratorEntity = new OrganizeAdministratorEntity();
organizeAdministratorEntity.setOrganizeType(jnpf.constant.PermissionConst.SYSTEM);
organizeAdministratorEntity.setOrganizeId(t);
organizeAdministratorEntity.setThisLayerSelect(1);
jsonToList.add(organizeAdministratorEntity);
});
// 处理菜单
List<String> moduleIds = organizeAdminIsTratorCrForm.getModuleIds();
moduleIds.forEach(t -> {
OrganizeAdministratorEntity organizeAdministratorEntity = new OrganizeAdministratorEntity();
organizeAdministratorEntity.setOrganizeType(jnpf.constant.PermissionConst.MODULE);
organizeAdministratorEntity.setOrganizeId(t);
organizeAdministratorEntity.setThisLayerSelect(1);
jsonToList.add(organizeAdministratorEntity);
});
organizeAdminIsTratorService.createList(jsonToList, userId);
//查询组织id和人员
QueryWrapper<OrganizeAdministratorEntity> administratorQueryWrapper = new QueryWrapper<>();
administratorQueryWrapper.lambda().eq(OrganizeAdministratorEntity::getUserId, userEntity.id);
administratorQueryWrapper.lambda().eq(OrganizeAdministratorEntity::getOrganizeId, entity.id);
administratorQueryWrapper.lambda().eq(OrganizeAdministratorEntity::getThisLayerAdd, 0);
administratorQueryWrapper.lambda().select(OrganizeAdministratorEntity::getId);
//替代前台传值,显示组织权限
List<String> organizeAdminIsTratorList = organizeAdminIsTratorService.listObjs(administratorQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
if (organizeAdminIsTratorList.size() > 0) {
List<OrganizeAdministratorEntity> organizeAdministratorEntityList = organizeAdminIsTratorService.listByIds(organizeAdminIsTratorList);
for (OrganizeAdministratorEntity oEntity : organizeAdministratorEntityList) {
oEntity.setThisLayerAdd(1);
oEntity.setThisLayerEdit(1);
oEntity.setThisLayerDelete(1);
oEntity.setSubLayerAdd(1);
oEntity.setSubLayerEdit(1);
oEntity.setSubLayerDelete(1);
oEntity.setThisLayerSelect(1);
oEntity.setSubLayerSelect(1);
}
organizeAdminIsTratorService.updateBatchById(organizeAdministratorEntityList);
}
//添加权限
PermissionGroupModel model = new PermissionGroupModel();
//公司名称为权限名称
model.setFullName(organizeCrForm.getFullName() + "权限");
model.setEnCode(organizeCrForm.getPropertyJson().getManagerTelePhone() + "Code");//Json手机号为编码
model.setSortCode(0L);
model.setEnabledMark(1);
PermissionGroupEntity permissionGroupEntity = JsonUtil.getJsonToBean(model, PermissionGroupEntity.class);
if (permissionGroupService.isExistByFullName(permissionGroupEntity.getId(), permissionGroupEntity)) {
return ActionResult.fail(MsgCode.EXIST001.get());
}
if (permissionGroupService.isExistByEnCode(permissionGroupEntity.getId(), permissionGroupEntity)) {
return ActionResult.fail(MsgCode.EXIST002.get());
}
permissionGroupService.create(permissionGroupEntity);
//权限赋予成员
PermissionGroupEntity permissionGroupEntity1 = permissionGroupService.info(permissionGroupEntity.id);
String permissionId = permissionGroupEntity.id;
if (entity == null) {
return ActionResult.fail(MsgCode.FA003.get());
}
UserIdModel userIdModel = new UserIdModel();
StringJoiner stringJoiner = new StringJoiner(",");
userIdModel.setIds(entity.id + "--company");
List<String> userIdUserIdModel = userIdModel.getIds();
userIdUserIdModel.forEach(t -> {
stringJoiner.add(t);
});
permissionGroupEntity1.setPermissionMember(stringJoiner.toString());
// 修改前的用户
List<String> member = permissionGroupService.list(Collections.singletonList(permissionId))
.stream().filter(t -> StringUtil.isNotEmpty(t.getPermissionMember())).map(PermissionGroupEntity::getPermissionMember).collect(Collectors.toList());
// 新的用户
member.addAll(userIdUserIdModel);
member = member.stream().distinct().collect(Collectors.toList());
List<String> userIdList = userService.getUserIdList(member, null);
permissionGroupService.update(permissionId, permissionGroupEntity1);
userService.delCurUser(userIdList.stream().toArray(String[]::new));
//查询所有的菜单
DataValuesQuery dataValuesQuery = new DataValuesQuery();
dataValuesQuery.setType("system");
AuthorizeVO authorizeVO = authorizeController.getValuesDatas(permissionId, dataValuesQuery);
//给业务平台id
List<String> systemBaeModelList = new ArrayList<>();
for (SystemBaeModel systemBaeModel : authorizeVO.getSystemList()) {
systemBaeModelList.add(systemBaeModel.getId());
}
//给菜单id
List<String> moduleModelList = new ArrayList<>();
for (ModuleModel moduleModel : authorizeVO.getModuleList()) {
moduleModelList.add(moduleModel.getId());
}
//给按钮id
List<String> buttonModelList = new ArrayList<>();
for (ButtonModel buttonModel : authorizeVO.getButtonList()) {
buttonModelList.add(buttonModel.getId());
}
//给权限id
List<String> resourceModelList = new ArrayList<>();
for (ResourceModel resourceModel : authorizeVO.getResourceList()) {
resourceModelList.add(resourceModel.getId());
}
for (ResourceModel resourceModel : authorizeVO.getResourceList()) {
QueryWrapper<ModuleEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ModuleEntity::getId, resourceModel.getModuleId());
List<ModuleEntity> moduleEntityList = moduleService.list(queryWrapper);
if (moduleEntityList.size() > 0) {
resourceModelList.add(moduleEntityList.get(0).getId());
QueryWrapper<ModuleEntity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.lambda().eq(ModuleEntity::getId, moduleEntityList.get(0).getParentId());
List<ModuleEntity> moduleEntityList1 = moduleService.list(queryWrapper1);
if (moduleEntityList1.size() > 0) {
resourceModelList.add(moduleEntityList1.get(0).getId());
}
}
}
//去重菜单id
List<String> newList = new ArrayList<>();
for (String id : resourceModelList) {
if (!newList.contains(id)) {
newList.add(id);
}
}
//string转为 String[]
String[] arraySystem = systemBaeModelList.toArray(new String[0]);
String[] arrayModuleList = moduleModelList.toArray(new String[0]);
String[] arrayButtonList = buttonModelList.toArray(new String[0]);
String[] arrayResourceList = newList.toArray(new String[0]);
//赋值
AuthorizeDataUpForm authorizeDataUpForm = new AuthorizeDataUpForm();
authorizeDataUpForm.setSystemIds(arraySystem);
authorizeDataUpForm.setModule(arrayModuleList);
authorizeDataUpForm.setButton(arrayButtonList);
authorizeDataUpForm.setResource(arrayResourceList);
//添加权限
authorizeService.save(permissionId, authorizeDataUpForm);
// String[] arraySystem1 = authorizeVO.getSystemList().toArray(new String[0]);
//取消租户的管理员
UserEntity userEntityAdmin = new UserEntity();
userEntityAdmin.setIsAdministrator(0);
userService.update(userEntity.id, userEntity);
return ActionResult.success(MsgCode.SU001.get());
}
return ActionResult.success(MsgCode.SU001.get());
}
/**
*
*
* @param list
* @param jsonToList
*/
private void getOrganizeAdminIsTratorModelCheck(List<OrganizeAdministratorSelectorVO> list, List<OrganizeAdministratorSelectorVO> jsonToList) {
if (jsonToList != null) {
jsonToList.forEach(t -> {
OrganizeAdministratorSelectorVO vo = JsonUtil.getJsonToBean(t, OrganizeAdministratorSelectorVO.class);
vo.setChildren(null);
if (vo.getThisLayerSelect() != null && (vo.getThisLayerSelect() == 2 || vo.getThisLayerSelect() == 1)) {
vo.setThisLayerSelect(1);
if (vo.getThisLayerAdd() != null && (vo.getThisLayerAdd() == 2 || vo.getThisLayerAdd() == 1)) {
vo.setThisLayerAdd(1);
}
if (vo.getThisLayerEdit() != null && (vo.getThisLayerEdit() == 2 || vo.getThisLayerEdit() == 1)) {
vo.setThisLayerEdit(1);
}
if (vo.getThisLayerDelete() != null && (vo.getThisLayerDelete() == 2 || vo.getThisLayerDelete() == 1)) {
vo.setThisLayerDelete(1);
}
} else if (vo.getThisLayerSelect() == null || vo.getThisLayerSelect() == 0 || vo.getThisLayerSelect() == 3) {
vo.setThisLayerSelect(0);
vo.setThisLayerAdd(0);
vo.setThisLayerEdit(0);
vo.setThisLayerDelete(0);
}
if (vo.getSubLayerSelect() != null && (vo.getSubLayerSelect() == 2 || vo.getSubLayerSelect() == 1)) {
vo.setSubLayerSelect(1);
if (vo.getSubLayerAdd() != null && (vo.getSubLayerAdd() == 2 || vo.getSubLayerAdd() == 1)) {
vo.setSubLayerAdd(1);
}
if (vo.getSubLayerEdit() != null && (vo.getSubLayerEdit() == 2 || vo.getSubLayerEdit() == 1)) {
vo.setSubLayerEdit(1);
}
if (vo.getSubLayerDelete() != null && (vo.getSubLayerDelete() == 2 || vo.getSubLayerDelete() == 1)) {
vo.setSubLayerDelete(1);
}
} else if (vo.getSubLayerSelect() == null || vo.getSubLayerSelect() == 0 || vo.getSubLayerSelect() == 3) {
vo.setSubLayerSelect(0);
vo.setSubLayerAdd(0);
vo.setSubLayerEdit(0);
vo.setSubLayerDelete(0);
}
list.add(vo);
getOrganizeAdminIsTratorModelCheck(list, t.getChildren());
});
}
}
/**
*
*
@ -974,9 +441,9 @@ public class OrganizeController extends SuperController<OrganizeService, Organiz
if (organizeService.isExistByFullName(entity, false, true)) {
return ActionResult.fail("公司名称不能重复");
}
// if (organizeService.isExistByEnCode(entity.getEnCode(), entity.getId())) {
// return ActionResult.fail("公司编码不能重复");
// }
if (organizeService.isExistByEnCode(entity.getEnCode(), entity.getId())) {
return ActionResult.fail("公司编码不能重复");
}
// 通过组织id获取父级组织
String organizeIdTree = getOrganizeIdTree(entity);
entity.setOrganizeIdTree(organizeIdTree);

@ -25,7 +25,6 @@ import jnpf.permission.entity.*;
import jnpf.permission.model.user.UserIdListVo;
import jnpf.permission.model.user.WorkHandoverModel;
import jnpf.permission.model.user.form.UserCrForm;
import jnpf.permission.model.user.form.UserResetPasswordForgeForm;
import jnpf.permission.model.user.form.UserResetPasswordForm;
import jnpf.permission.model.user.form.UserUpForm;
import jnpf.permission.model.user.mod.*;
@ -722,43 +721,6 @@ public class UserController extends SuperController<UserService, UserEntity> {
return ActionResult.success("操作失败,用户不存在");
}
/**
*
*
* @param
* @param
* @return ignore
*/
@UserPermission
@Operation(summary = "首页修改用户密码")
@Parameters({
@Parameter(name = "userResetPasswordForm", description = "修改密码模型", required = true)
})
@SaCheckPermission("permission.user")
@PostMapping("/Actions/ResetPasswordForget")
public ActionResult<String> modifyPasswordForget( @RequestBody @Valid UserResetPasswordForgeForm userResetPasswordForgeForm) {
QueryWrapper<UserEntity> userEntityQueryWrapper = new QueryWrapper<>();
userEntityQueryWrapper.lambda().eq(UserEntity::getAccount,userResetPasswordForgeForm.getAccount());
// userEntityQueryWrapper.lambda().eq(UserEntity::getOrganizeId,userResetPasswordForgeForm.id);
// userEntityQueryWrapper.lambda().select(UserEntity::getId);
// List<String> useList = userService.listObjs(userEntityQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
List<UserEntity> userEntityList = userService.list(userEntityQueryWrapper);
if (userEntityList.size()>0){
UserEntity entity = userService.getInfo(userEntityList.get(0).getId());
if (entity != null) {
entity.setPassword(userResetPasswordForgeForm.getUserPassword());
userService.updatePassword(entity);
userService.delCurUser(entity.getId());
PullUserUtil.syncUser(entity, "modifyPassword", userProvider.get().getTenantId());
return ActionResult.success(MsgCode.SU005.get());
}
}
return ActionResult.fail("操作失败,用户不存在");
}
/**
*
*

@ -5,8 +5,6 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
/**
*
*
@ -59,40 +57,4 @@ public class OrganizeEntity extends PermissionEntityBase{
*/
@TableField("F_ORGANIZE_ID_TREE")
private String organizeIdTree;
/**
*
*/
@TableField("REGISTRANT_PICTURES")
private String registrant_pictures;
/**
*
*/
@TableField("SOCIETY_PICTURES")
private String society_pictures;
/**
* logo
*/
@TableField("PICTURES")
private String pictures;
/**
*
*/
@TableField("CODE")
private String code;
/**
*
*/
@TableField("FUND")
private BigDecimal fund;
/**
* (1/2-)
*/
@TableField("MERCHANT_TYPE")
private Integer merchantType;
}

@ -312,6 +312,4 @@ public class UserEntity extends SuperExtendEntity.SuperExtendDEEntity<String> {
@TableField("f_handover_mark")
private Integer handoverMark;
}

@ -1,13 +1,11 @@
package jnpf.permission.model.organize;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
/**
*
@ -23,7 +21,7 @@ public class OrganizeCrForm {
private String parentId;
@NotBlank(message = "公司名称不能为空")
private String fullName;
// @NotBlank(message = "公司编码不能为空")
@NotBlank(message = "公司编码不能为空")
private String enCode;
private String description;
@NotNull(message = "公司状态不能为空")
@ -31,15 +29,4 @@ public class OrganizeCrForm {
private OrganizeCrModel propertyJson;
@Schema(description = "排序")
private Long sortCode;
private Object registrantPictures;
private Object societyPictures;
private Object pictures;
private String code;
private BigDecimal fund;
@NotNull(message = "商户类型不能为空")
private Integer merchantType;
}

@ -33,13 +33,6 @@ public class OrganizeCrModel {
@Schema(description = "公司性质")
private String enterpriseNature;
private String fax;
private String registeredAddress;
private String socialCreditCode;
private String registeredName;
private String idCard;
private String telePhone;
}

@ -31,12 +31,6 @@ public class OrganizeAdminIsTratorCrForm implements Serializable {
@Schema(description = "分级管理员模型集合")
private List<OrganizeAdministratorCrModel> orgAdminModel;
/**
*
*/
@Schema(description = "分级管理员模型集合")
private List<OrganizeAdministratorSelectorVO> orgAdminModelCheck;
@Schema(description = "菜单集合")
private List<String> moduleIds;

@ -96,9 +96,4 @@ public class UserCrForm {
@Schema(description = "分组id")
private String groupId;
@Schema(description = "是否管理员")
private Integer isAdministrator;
}

@ -1,29 +0,0 @@
package jnpf.permission.model.user.form;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
*
* @author JNPF
* @version V3.1.0
* @copyright
* @date 2021/3/12 15:31
*/
@Data
public class UserResetPasswordForgeForm {
@Schema(description = "用户id")
private String id;
@Schema(description = "新密码,需要 MD5 加密后传输")
private String account;
@Schema(description = "新密码,需要 MD5 加密后传输")
private String userPassword;
@Schema(description = "重复新密码")
private String validatePassword;
}

@ -168,14 +168,6 @@ public interface UserService extends SuperService<UserEntity> {
*/
Boolean create(UserEntity entity) throws Exception;
/**
*
*
* @param entity
*/
void insert(UserEntity entity) throws Exception;
/**
*
*

@ -27,10 +27,6 @@
<artifactId>jnpf-system-biz</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.jnpf</groupId>
<artifactId>jnpf-scm-biz</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

@ -1,110 +0,0 @@
package jnpf.scheduletask.task;
import com.google.common.collect.Lists;
import com.xxl.job.core.handler.annotation.XxlJob;
import jnpf.entity.PaymentEntity;
import jnpf.entity.RecycleDeliveryOrderEntity;
import jnpf.model.recycledeliveryorder.DeliveryAuditBatch;
import jnpf.service.CompanyService;
import jnpf.service.PaymentService;
import jnpf.service.RecycleDeliveryOrderService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
@Component
@Slf4j
public class OrderReviewTask {
@Resource
private RecycleDeliveryOrderService recycleDeliveryOrderService;
@Resource
private CompanyService companyService;
@Resource
private PaymentService paymentService;
@XxlJob("handleDeliveryTask")
public void handleDeliveryTask() {
//查询待审核的数据
List<RecycleDeliveryOrderEntity> list = recycleDeliveryOrderService.getList();
if (CollectionUtils.isEmpty(list)) {
log.info("没有需要审核的数据!");
return;
}
//需要审核通过的单据id
//0 手动审核 1 24小时自动 2 48小时自动
List<String> ids = Lists.newArrayList();
List<String> fails = Lists.newArrayList();
for (RecycleDeliveryOrderEntity entity : list) {
if (Objects.isNull(entity.getAdjustSet())
|| entity.getAdjustSet() == 0
|| Objects.isNull(entity.getCreatorTime())
|| Objects.isNull(entity.getReportWeight())
|| entity.getReportWeight().compareTo(BigDecimal.ZERO) <= 0
|| Objects.isNull(entity.getPrice())
|| entity.getPrice().compareTo(BigDecimal.ZERO) <= 0) {
fails.add(entity.getId());
} else if (entity.getAdjustSet() == 1) {
//判断创建时间跟当前时间比对 是否超过24小时
if (isTimeExceededInMinutes(entity.getCreatorTime(), 1)) {
ids.add(entity.getId());
}
} else if (entity.getAdjustSet() == 2) {
//判断创建时间跟当前时间比对 是否超过48小时
if (isTimeExceededInMinutes(entity.getCreatorTime(), 2)) {
ids.add(entity.getId());
}
}
}
log.info("自动审核的单据id{}", ids);
log.info("自动审核失败的单据id{}", fails);
if (CollectionUtils.isNotEmpty(ids)) {
companyService.batchAudit(new DeliveryAuditBatch(ids, "1", "自动审核"));
}
}
@XxlJob("handlePaymentTask")
public void handlePaymentTask() {
//关闭超时订单
List<PaymentEntity> list = paymentService.getTimeoutPayment();
log.info("需要关闭的微信支付订单:{}", list.size());
if (list.size() > 0) {
for (PaymentEntity entity : list) {
try {
paymentService.closeOrder(entity.getOrderNo());
log.info("关闭微信支付订单成功,订单号:{}", entity.getOrderNo());
} catch (Exception e) {
log.error("关闭微信支付订单失败,订单号:{}", entity.getOrderNo());
e.printStackTrace();
}
}
}
}
public static boolean isTimeExceededInMinutes(Date creatTime, int type) {
Date now = new Date(); // 获取当前时间
// 计算两个时间之间的毫秒差
long diffInMillis = now.getTime() - creatTime.getTime();
// 转换毫秒差为分钟差 即只要超过一分钟就是超过了24小时或者48小时
long minsDiff = diffInMillis / (1000 * 60);
// 根据type判断时间是否超过指定的分钟数
if (type == 1 && minsDiff > 1440) {
return true;
} else if (type == 2 && minsDiff > 2880) {
return true;
}
return false;
}
}

@ -33,11 +33,5 @@
<artifactId>jnpf-common-all</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.github.javen205</groupId>
<artifactId>IJPay-All</artifactId>
<version>2.9.11</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

@ -1,42 +0,0 @@
package jnpf.config;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import com.ijpay.core.kit.PayKit;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import java.security.cert.X509Certificate;
/**
*
*/
@Data
@Slf4j
@Configuration
@ConfigurationProperties(prefix = "wx.pay.v3")
public class WxPayProperties {
private String appId;//小程序id
private String mchId;//商户号
private String mchSerialNo;//api证书序列号
private String keyPath;//商户私钥
private String certPath;//商户公钥 给别人用的
private String platformSerialNo;//微信平台 序列号
private String platformCertPath;//微信平台 公钥
private String apiKey3;//v3秘钥
private String notify;//支付回调地址
public String getSerialNumber() {
X509Certificate certificate = PayKit.getCertificate(this.getCertPath());
if (certificate == null) {
throw new RuntimeException("商户证书序列号获取失败!");
}
String serialNo = certificate.getSerialNumber().toString(16).toUpperCase();
// 提前两天检查证书是否有效
boolean isValid = PayKit.checkCertificateIsValid(certificate, this.mchId, -2);
log.info("证书是否可用 {} 证书有效期为 {}", isValid, DateUtil.format(certificate.getNotAfter(), DatePattern.NORM_DATETIME_PATTERN));
return serialNo;
}
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.BucketIconEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-22
*/
public interface BucketIconMapper extends BaseMapper<BucketIconEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.ClientAccountDetailEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* clientAccountDetail
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-03-14
*/
public interface ClientAccountDetailMapper extends BaseMapper<ClientAccountDetailEntity> {
}

@ -1,7 +0,0 @@
package jnpf.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.entity.CompanyEntity;
public interface CompanyMapper extends BaseMapper<CompanyEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.DeliverBlacklistEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* DeliverBlacklist
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-08-26
*/
public interface DeliverBlacklistMapper extends BaseMapper<DeliverBlacklistEntity> {
}

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-01-29
*/
public interface EnterpriseAccountBillMapper extends BaseMapper<EnterpriseAccountBillEntity> {

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-01-31
*/
public interface HousingEstateMapper extends BaseMapper<HousingEstateEntity> {

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.NxFileEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* nxFile
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-03-12
*/
public interface NxFileMapper extends BaseMapper<NxFileEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.NxManagerEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* nxManager
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-04-16
*/
public interface NxManagerMapper extends BaseMapper<NxManagerEntity> {
}

@ -1,28 +0,0 @@
package jnpf.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.entity.NxPriceEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.model.nxprice.NxPricePagination;
import jnpf.model.nxproduct.NxProductPagination;
import org.apache.ibatis.annotations.Param;
/**
* nxPrice
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-03-05
*/
public interface NxPriceMapper extends BaseMapper<NxPriceEntity> {
IPage<NxPriceEntity> queryByKeyword(@Param("page") Page<NxPriceEntity> page, @Param("nxProductPagination") NxPricePagination nxPricePagination, @Param("ew") QueryWrapper<NxPriceEntity> NxPriceEntityQueryWrapper,@Param("organizeJson") String organizeJson);
// IPage<NxPriceEntity> queryByKeyword(@Param("page") Page<NxPriceEntity> page, @Param("nxProductPagination") NxPricePagination nxPricePagination, @Param("ew") QueryWrapper<NxPriceEntity> NxPriceEntityQueryWrapper);
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.NxPriceProductEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* nxPrice
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-03-05
*/
public interface NxPriceProductMapper extends BaseMapper<NxPriceProductEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.NxPriceRecycleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* nxPrice
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-03-05
*/
public interface NxPriceRecycleMapper extends BaseMapper<NxPriceRecycleEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.NxProductEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* nxProduct
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-03-11
*/
public interface NxProductMapper extends BaseMapper<NxProductEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.NxWalletEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* nxWallet
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-03-25
*/
public interface NxWalletMapper extends BaseMapper<NxWalletEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.PaymentLogEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-24
*/
public interface PaymentLogMapper extends BaseMapper<PaymentLogEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.PaymentEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-24
*/
public interface PaymentMapper extends BaseMapper<PaymentEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.RecycleBucketEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-06-17
*/
public interface RecycleBucketMapper extends BaseMapper<RecycleBucketEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.RecycleCameraEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* RecycleCamera
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-05-30
*/
public interface RecycleCameraMapper extends BaseMapper<RecycleCameraEntity> {
}

@ -1,18 +0,0 @@
package jnpf.mapper;
import jnpf.entity.RecycleCleanOrderEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.model.recyclecleanorder.CleanAuditBatch;
import org.apache.ibatis.annotations.Param;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-06-18
*/
public interface RecycleCleanOrderMapper extends BaseMapper<RecycleCleanOrderEntity> {
int auditBatch(@Param("batch") CleanAuditBatch batch);
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.RecycleDelegaterEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-29
*/
public interface RecycleDelegaterMapper extends BaseMapper<RecycleDelegaterEntity> {
}

@ -1,19 +0,0 @@
package jnpf.mapper;
import jnpf.entity.RecycleDeliveryOrderEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.model.recycledeliveryorder.DeliveryAuditBatch;
import org.apache.ibatis.annotations.Param;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-06-18
*/
public interface RecycleDeliveryOrderMapper extends BaseMapper<RecycleDeliveryOrderEntity> {
int auditBatch(@Param("batch") DeliveryAuditBatch batch);
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.RecycleDeliveryPhotoEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-05-29
*/
public interface RecycleDeliveryPhotoMapper extends BaseMapper<RecycleDeliveryPhotoEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.RecycleDeviceConfigEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-06-20
*/
public interface RecycleDeviceConfigMapper extends BaseMapper<RecycleDeviceConfigEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.RecycleDeviceConfigOneEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* RecycleDeviceConfigOne
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-03
*/
public interface RecycleDeviceConfigOneMapper extends BaseMapper<RecycleDeviceConfigOneEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.RecycleDeviceEventEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-02
*/
public interface RecycleDeviceEventMapper extends BaseMapper<RecycleDeviceEventEntity> {
}

@ -1,28 +0,0 @@
package jnpf.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.entity.RecycleDeviceEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-06-22
*/
public interface RecycleDeviceMapper extends BaseMapper<RecycleDeviceEntity> {
List<RecycleDeviceEntity> QueryRecycleDevice(@Param("stationId") String stationId);
IPage<RecycleDeviceEntity> QueryRecycleDevice(@Param("page") Page<RecycleDeviceEntity> page, @Param("ew") QueryWrapper<RecycleDeviceEntity> queryWrapper);
}

@ -1,17 +0,0 @@
package jnpf.mapper;
import jnpf.entity.RecycleOrderProductEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
/**
* RecycleOrder
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-05-20
*/
public interface RecycleOrderProductMapper extends BaseMapper<RecycleOrderProductEntity> {
List<RecycleOrderProductEntity> recycleOrderProductSelect(String id);
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.RecycleStaffDeviceEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* recycleStationStaff
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-06-24
*/
public interface RecycleStaffDeviceMapper extends BaseMapper<RecycleStaffDeviceEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.SimCardEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* SIM
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-06-21
*/
public interface SimCardMapper extends BaseMapper<SimCardEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.StationAreaEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-05-21
*/
public interface StationAreaMapper extends BaseMapper<StationAreaEntity> {
}

@ -1,16 +0,0 @@
package jnpf.mapper;
import jnpf.entity.UserBindEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* nx_user_bind
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-27
*/
public interface UserBindMapper extends BaseMapper<UserBindEntity> {
}

@ -1,35 +0,0 @@
package jnpf.service;
import jnpf.model.bucketicon.*;
import jnpf.entity.*;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
/**
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-22
*/
public interface BucketIconService extends IService<BucketIconEntity> {
List<BucketIconEntity> getList(BucketIconPagination bucketIconPagination);
List<BucketIconEntity> getTypeList(BucketIconPagination bucketIconPagination,String dataType);
BucketIconEntity getInfo(String id);
void delete(BucketIconEntity entity);
void create(BucketIconEntity entity);
boolean update(String id, BucketIconEntity entity);
//子表方法
//副表数据方法
String checkForm(BucketIconForm form,int i);
void saveOrUpdate(BucketIconForm bucketIconForm,String id, boolean isSave) throws Exception;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save