lsw 10 months ago
parent
commit
51162d8841

+ 54 - 52
admin-ui/src/views/work/contract/index.vue

@@ -9,7 +9,7 @@
         <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
         <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
-    <el-table :data="response.rows" border height="calc(100vh - 270px)">
+    <el-table :data="response.rows" border height="calc(100vh - 230px)">
       <el-table-column label="合同名称" align="center" prop="name" />
       <el-table-column label="合同名称" align="center" prop="name" />
       <el-table-column label="合同状态" align="center" prop="state" width="130">
       <el-table-column label="合同状态" align="center" prop="state" width="130">
         <template slot-scope="scope">
         <template slot-scope="scope">
@@ -20,7 +20,9 @@
       <el-table-column label="创建时间" align="center" prop="createTime" width="200" />
       <el-table-column label="创建时间" align="center" prop="createTime" width="200" />
       <el-table-column label="操作" align="center" width="200">
       <el-table-column label="操作" align="center" width="200">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-button size="mini" type="text" icon="el-icon-document" @click="op('look', scope.row)">查看合同</el-button>
+          <el-button size="mini" type="text" icon="el-icon-document">
+            <a target="_blank" :href="baseUrl+scope.row.url">查看合同</a>
+          </el-button>
           <el-button size="mini" type="text" icon="el-icon-edit" @click="op('edit', scope.row)" v-hasPermi="['work:contract:edit']">修改</el-button>
           <el-button size="mini" type="text" icon="el-icon-edit" @click="op('edit', scope.row)" v-hasPermi="['work:contract:edit']">修改</el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
@@ -33,59 +35,59 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import look from './look';
-import edit from './edit';
-export default {
-  name: 'Contract',
-  data() {
-    return {
-      response: {},
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        name: null,
-        state: null,
-        orderByColumn: 'id',
-        isAsc: 'desc'
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    getList() {
-      this.ajax({ url: '/work/contract/list', data: this.queryParams }).then((response) => {
-        this.response = response;
-      });
+  import look from './look';
+  import edit from './edit';
+  export default {
+    name: 'Contract',
+    data() {
+      return {
+        response: {},
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          name: null,
+          state: null,
+          orderByColumn: 'id',
+          isAsc: 'desc'
+        }
+      };
     },
     },
-    handleQuery() {
-      this.queryParams.pageNum = 1;
+    created() {
       this.getList();
       this.getList();
     },
     },
-    resetQuery() {
-      this.resetForm('queryForm');
-      this.handleQuery();
-    },
-    selects(rows) {
-      this.ids = rows.map((item) => item.id);
-    },
-    op(tag, row) {
-      if (tag == 'look') {
-        this.iframe({ obj: look, param: { url: row.url }, title: '查看合同', width: '55%', height: '85%' });
-      }
-      if (tag == 'edit') {
-        this.iframe({ obj: edit, param: { id: row.id }, title: '编辑合同', width: '35%', height: '40%' });
-      }
-    },
-    del(row) {
-      this.$confirm('是否确认删除选中数据?', '警告', { type: 'warning' }).then(() => {
-        this.get({ url: '/work/contract/remove/' + (row.id || this.ids) }).then((response) => {
-          this.$modal.msgSuccess('删除成功');
-          this.getList();
+    methods: {
+      getList() {
+        this.ajax({ url: '/work/contract/list', data: this.queryParams }).then((response) => {
+          this.response = response;
         });
         });
-      });
+      },
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      resetQuery() {
+        this.resetForm('queryForm');
+        this.handleQuery();
+      },
+      selects(rows) {
+        this.ids = rows.map((item) => item.id);
+      },
+      op(tag, row) {
+        if (tag == 'look') {
+          //this.iframe({ obj: look, param: { url: row.url }, title: '查看合同', width: '55%', height: '85%' });
+        }
+        if (tag == 'edit') {
+          this.iframe({ obj: edit, param: { id: row.id }, title: '编辑合同', width: '35%', height: '40%' });
+        }
+      },
+      del(row) {
+        this.$confirm('是否确认删除选中数据?', '警告', { type: 'warning' }).then(() => {
+          this.get({ url: '/work/contract/remove/' + (row.id || this.ids) }).then((response) => {
+            this.$modal.msgSuccess('删除成功');
+            this.getList();
+          });
+        });
+      }
     }
     }
-  }
-};
+  };
 </script>
 </script>

+ 34 - 31
admin-ui/src/views/work/platform/index.vue

@@ -16,6 +16,9 @@
           <el-form-item label="负责人手机号" prop="phone">
           <el-form-item label="负责人手机号" prop="phone">
             <el-input v-model="form.phone" placeholder="请输入手机号" clearable />
             <el-input v-model="form.phone" placeholder="请输入手机号" clearable />
           </el-form-item>
           </el-form-item>
+          <el-form-item label="通讯地址" prop="address">
+            <el-input v-model="form.address" placeholder="请输入通讯地址" clearable />
+          </el-form-item>
           <el-form-item label="平台邮箱" prop="email">
           <el-form-item label="平台邮箱" prop="email">
             <el-input v-model="form.email" placeholder="请输入邮箱" clearable />
             <el-input v-model="form.email" placeholder="请输入邮箱" clearable />
           </el-form-item>
           </el-form-item>
@@ -51,38 +54,38 @@
 </template>
 </template>
 
 
 <script>
 <script>
-export default {
-  data() {
-    return {
-      form: {},
-      rules: {
-        serviceCompany: [{ required: true, message: '不能为空', trigger: 'blur' }],
-        director: [{ required: true, message: '不能为空', trigger: 'blur' }],
-        phone: [{ required: true, message: '不能为空', trigger: 'blur' }],
-        email: [{ required: true, message: '不能为空', trigger: 'blur' }],
-        bankName: [{ required: true, message: '不能为空', trigger: 'blur' }],
-        bankAccount: [{ required: true, message: '不能为空', trigger: 'blur' }],
-        rate: [{ required: true, message: '不能为空', trigger: 'blur' }]
-      }
-    };
-  },
-  mounted() {
-    this.ajax({ url: '/work/platform/detail' }).then((response) => {
-      this.form = response.data;
-    });
-  },
-  methods: {
-    submitForm() {
-      this.$refs['form'].validate((valid) => {
-        if (valid) {
-          if (this.form.id) {
-            this.ajax({ method: 'post', url: '/work/platform/edit', data: this.form }).then((response) => {
-              this.$modal.msgSuccess('修改成功');
-            });
-          }
+  export default {
+    data() {
+      return {
+        form: {},
+        rules: {
+          serviceCompany: [{ required: true, message: '不能为空', trigger: 'blur' }],
+          director: [{ required: true, message: '不能为空', trigger: 'blur' }],
+          phone: [{ required: true, message: '不能为空', trigger: 'blur' }],
+          email: [{ required: true, message: '不能为空', trigger: 'blur' }],
+          bankName: [{ required: true, message: '不能为空', trigger: 'blur' }],
+          bankAccount: [{ required: true, message: '不能为空', trigger: 'blur' }],
+          rate: [{ required: true, message: '不能为空', trigger: 'blur' }]
         }
         }
+      };
+    },
+    mounted() {
+      this.ajax({ url: '/work/platform/detail' }).then((response) => {
+        this.form = response.data;
       });
       });
+    },
+    methods: {
+      submitForm() {
+        this.$refs['form'].validate((valid) => {
+          if (valid) {
+            if (this.form.id) {
+              this.ajax({ method: 'post', url: '/work/platform/edit', data: this.form }).then((response) => {
+                this.$modal.msgSuccess('修改成功');
+              });
+            }
+          }
+        });
+      }
     }
     }
-  }
-};
+  };
 </script>
 </script>

+ 1 - 1
app/App.vue

@@ -30,7 +30,7 @@ button::after {
 /**挂载iconfont字体图标*/
 /**挂载iconfont字体图标*/
 @font-face {
 @font-face {
 	font-family: 'iconfont';
 	font-family: 'iconfont';
-	src: url('https://at.alicdn.com/t/c/font_4507607_k9ip9dx4fqq.ttf?t=1716280447579') format('truetype');
+	src: url('https://at.alicdn.com/t/c/font_4507607_k7tryf81fl.ttf?t=1716877178929') format('truetype');
 	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
 	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
 }
 }
 .icon {
 .icon {

+ 1 - 1
app/pages/auth/index.vue

@@ -16,7 +16,7 @@
 						<card v-model="item.p1" text="点击拍摄/上传人像面" icon="&#xe690;" :read="item.isAuthentication === 1" side="face" @success="success"></card>
 						<card v-model="item.p1" text="点击拍摄/上传人像面" icon="&#xe690;" :read="item.isAuthentication === 1" side="face" @success="success"></card>
 					</view>
 					</view>
 					<view class="r50">
 					<view class="r50">
-						<card v-model="item.p2" text="点击拍摄/上传国徽面" icon="&#xe61f;" :read="item.isAuthentication === 1" side="back" @success="success"></card>
+						<card v-model="item.p2" text="点击拍摄/上传国徽面" icon="&#xe61e;" :read="item.isAuthentication === 1" side="back" @success="success"></card>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>

+ 167 - 164
app/pages/index/index.vue

@@ -75,187 +75,190 @@
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
-export default {
-	data() {
-		return {
-			ip: this.http.ip,
-			user: {},
-			bannerList: [],
-			noticeList: [],
-			contract: {},
-			show: false,
-			actions: [{ name: '查看合同' }, { name: '去签字' }]
-		};
-	},
-	onShow() {
-		if (this.hasLogin()) {
-			this.getUserInfo();
-		}
-	},
-	onLoad() {
-		this.getData();
-	},
-	methods: {
-		getUserInfo() {
-			this.http.request({
-				url: '/app/user/info',
-				success: (res) => {
-					this.user = res.data.data;
-				}
-			});
+	export default {
+		data() {
+			return {
+				ip: this.http.ip,
+				user: {},
+				bannerList: [],
+				noticeList: [],
+				contract: {},
+				show: false,
+				actions: [{ name: '查看合同' }, { name: '去签字' }]
+			};
 		},
 		},
-		getData() {
-			this.http.request({
-				url: '/app/home/index',
-				success: (res) => {
-					this.contract = res.data.data.contract;
-					this.bannerList = res.data.data.bannerList;
-					res.data.data.noticeList.forEach((item) => {
-						this.noticeList.push(item.title);
-					});
-				}
-			});
-		},
-		go(url) {
+		onShow() {
 			if (this.hasLogin()) {
 			if (this.hasLogin()) {
-				if (url == 'auth') {
-					uni.navigateTo({ url: '/pages/auth/index' });
-				}
-				if (url == 'company' && this.user.isAuthentication === 1) {
-					uni.navigateTo({ url: '/pages/company/index' });
-				}
-				if (url == 'packages' && this.user.isCompany > 0 && this.user.isContract == 1) {
-					uni.navigateTo({ url: '/pages/packages/index' });
-				}
-				if (url == 'contract' && this.user.isContract == 1) {
-					this.look();
-				}
-				if (url == 'contract' && this.user.isContract == 0) {
-					this.show = true;
-				}
-			} else {
-				uni.navigateTo({ url: '/pages/user/login' });
+				this.getUserInfo();
 			}
 			}
 		},
 		},
-		selectClick(e) {
-			if (e.name == '查看合同') {
-				this.look();
-			} else {
-				this.$refs.sig.getSyncSignature();
-			}
+		onLoad() {
+			this.getData();
 		},
 		},
-		//查看合同
-		look() {
-			uni.showLoading({ title: '正在打开合同...', mask: true });
-			uni.downloadFile({
-				url: this.user.isContract == 0 ? this.ip + this.contract.url : this.ip + '/app/contract/look',
-				header: { Authorization: this.getUser().token },
-				success: (res) => {
-					uni.openDocument({
-						filePath: res.tempFilePath,
-						showMenu: true,
-						success: (res) => {
-							uni.hideLoading();
-						}
-					});
-				},
-				fail: (res) => {
-					uni.hideLoading();
+		methods: {
+			getUserInfo() {
+				this.http.request({
+					url: '/app/user/info',
+					success: (res) => {
+						this.user = res.data.data;
+					}
+				});
+			},
+			getData() {
+				this.http.request({
+					url: '/app/home/index',
+					success: (res) => {
+						this.contract = res.data.data.contract;
+						this.bannerList = res.data.data.bannerList;
+						res.data.data.noticeList.forEach((item) => {
+							this.noticeList.push(item.title);
+						});
+					}
+				});
+			},
+			go(url) {
+				if (this.hasLogin()) {
+					if (url == 'auth') {
+						uni.navigateTo({ url: '/pages/auth/index' });
+					}
+					if (url == 'company' && this.user.isAuthentication === 1) {
+						uni.navigateTo({ url: '/pages/company/index' });
+					}
+					if (url == 'packages' && this.user.isCompany > 0 && this.user.isContract == 1) {
+						uni.navigateTo({ url: '/pages/packages/index' });
+					}
+					if (url == 'contract' && this.user.isContract == 1) {
+						this.look();
+					}
+					if (url == 'contract' && this.user.isContract == 0) {
+						this.show = true;
+					}
+				} else {
+					uni.navigateTo({ url: '/pages/user/login' });
 				}
 				}
-			});
-		},
-		//电子签名
-		sign(val) {
-			this.http.request({
-				url: '/app/contract/add',
-				data: { contractId: this.contract.id, url: val },
-				method: 'POST',
-				success: (res) => {
-					uni.showModal({
-						title: '提示',
-						content: '签约成功',
-						showCancel: false,
-						success: (res) => {
-							this.getUserInfo();
-						}
-					});
+			},
+			selectClick(e) {
+				if (e.name == '查看合同') {
+					this.look();
+				} else {
+					this.$refs.sig.getSyncSignature();
 				}
 				}
-			});
+			},
+			//查看合同
+			look() {
+				uni.showLoading({ title: '正在打开合同...', mask: true });
+				uni.downloadFile({
+					url: this.user.isContract == 0 ? this.ip + this.contract.url : this.ip + '/app/contract/look',
+					header: { Authorization: this.getUser().token },
+					success: (res) => {
+						uni.openDocument({
+							filePath: res.tempFilePath,
+							showMenu: true,
+							success: (res) => {
+								uni.hideLoading();
+							},
+							fail: (res) => {
+								uni.hideLoading();
+								uni.showModal({ title: '提示', content: '打开合同失败', showCancel: false });
+							}
+						});
+					},
+					fail: (res) => {
+						uni.hideLoading();
+					}
+				});
+			},
+			//电子签名
+			sign(val) {
+				this.http.request({
+					url: '/app/contract/add',
+					data: { contractId: this.contract.id, url: val },
+					method: 'POST',
+					success: (res) => {
+						uni.showModal({
+							title: '提示',
+							content: '签约成功',
+							showCancel: false,
+							success: (res) => {
+								this.getUserInfo();
+							}
+						});
+					}
+				});
+			}
 		}
 		}
-	}
-};
+	};
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-.main {
-	padding: 5px 15px 15px 15px;
-}
-.banner {
-}
-.notice {
-	margin-top: 10px;
-	margin-bottom: -10px;
-}
-.flow {
-	padding-top: 20px;
-	.title {
-		font-size: 15px;
-		margin-bottom: 10px;
+	.main {
+		padding: 5px 15px 15px 15px;
 	}
 	}
-	.item {
-		border-radius: 10px;
-		overflow: hidden;
-		float: left;
-		width: 50%;
-		.out {
-			padding: 5px;
-			.int {
-				padding: 15px;
-				background-color: white;
-				overflow: hidden;
-				border-radius: 9px;
-				text-align: center;
-				.tb {
-					margin: 0 auto;
-					width: 40px;
-					height: 40px;
-					padding: 10px;
-					line-height: 39px;
-					color: $main-color;
-					box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-					border-radius: 50%;
-					font-size: 27px;
-				}
-				.con {
-					padding-top: 8px;
-					.bt {
-						font-size: 18px;
-					}
-					.zt {
-						font-size: 13px;
-						padding-top: 5px;
-						color: #909090;
-					}
-				}
-				.state {
-					padding-top: 11px;
-					.zt {
-						font-size: 13px;
+	.banner {}
+	.notice {
+		margin-top: 10px;
+		margin-bottom: -10px;
+	}
+	.flow {
+		padding-top: 20px;
+		.title {
+			font-size: 15px;
+			margin-bottom: 10px;
+		}
+		.item {
+			border-radius: 10px;
+			overflow: hidden;
+			float: left;
+			width: 50%;
+			.out {
+				padding: 5px;
+				.int {
+					padding: 15px;
+					background-color: white;
+					overflow: hidden;
+					border-radius: 9px;
+					text-align: center;
+					.tb {
+						margin: 0 auto;
+						width: 40px;
+						height: 40px;
+						padding: 10px;
+						line-height: 39px;
 						color: $main-color;
 						color: $main-color;
+						box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+						border-radius: 50%;
+						font-size: 27px;
 					}
 					}
-					.icon {
-						color: #909090;
+					.con {
+						padding-top: 8px;
+						.bt {
+							font-size: 18px;
+						}
+						.zt {
+							font-size: 13px;
+							padding-top: 5px;
+							color: #909090;
+						}
 					}
 					}
-					.go {
-						padding: 5px 12px;
-						font-size: 14px;
-						background-color: #5a7afc;
-						color: white;
-						border-radius: 20px;
+					.state {
+						padding-top: 11px;
+						.zt {
+							font-size: 13px;
+							color: $main-color;
+						}
+						.icon {
+							color: #909090;
+						}
+						.go {
+							padding: 5px 12px;
+							font-size: 14px;
+							background-color: #5a7afc;
+							color: white;
+							border-radius: 20px;
+						}
 					}
 					}
 				}
 				}
 			}
 			}
 		}
 		}
 	}
 	}
-}
-</style>
+</style>

+ 5 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/util/AppUtil.java

@@ -2,6 +2,7 @@ package com.ruoyi.web.work.api.util;
 
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
 import com.alibaba.fastjson2.JSONObject;
+import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.common.utils.HttpUtils;
 import com.ruoyi.common.utils.HttpUtils;
 import com.ruoyi.web.work.domain.User;
 import com.ruoyi.web.work.domain.User;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpResponse;
@@ -53,13 +54,14 @@ public class AppUtil {
                 System.out.println("Http code: " + stat);
                 System.out.println("Http code: " + stat);
                 System.out.println("http header error msg: " + response.getFirstHeader("X-Ca-Error-Message"));
                 System.out.println("http header error msg: " + response.getFirstHeader("X-Ca-Error-Message"));
                 System.out.println("Http body error msg:" + EntityUtils.toString(response.getEntity()));
                 System.out.println("Http body error msg:" + EntityUtils.toString(response.getEntity()));
-                return null;
+                throw new ServiceException("身份证识别失败");
             }
             }
             String res = EntityUtils.toString(response.getEntity());
             String res = EntityUtils.toString(response.getEntity());
+            System.out.println("zzzzz");
             return JSON.parseObject(res);
             return JSON.parseObject(res);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            System.out.println("1111");
+            throw new ServiceException(e.getMessage());
         }
         }
-        return null;
     }
     }
 }
 }

+ 0 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/ContractDetail.java

@@ -30,9 +30,6 @@ public class ContractDetail{
     @ApiModelProperty(value = "合同路径")
     @ApiModelProperty(value = "合同路径")
     private String url;
     private String url;
 
 
-    @ApiModelProperty(value = "合同模板路径")
-    private String contractUrl;
-
     @ApiModelProperty(value = "状态:0=正常,1=停用")
     @ApiModelProperty(value = "状态:0=正常,1=停用")
     private Integer state;
     private Integer state;
 
 

+ 3 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/Platform.java

@@ -31,6 +31,9 @@ public class Platform{
     @ApiModelProperty(value = "银行卡账号")
     @ApiModelProperty(value = "银行卡账号")
     private String bankAccount;
     private String bankAccount;
 
 
+    @ApiModelProperty(value = "通讯地址")
+    private String address;
+
     @ApiModelProperty(value = "平台方负责人")
     @ApiModelProperty(value = "平台方负责人")
     private String director;
     private String director;
 
 

+ 24 - 7
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/ContractServiceImpl.java

@@ -2,12 +2,16 @@ package com.ruoyi.web.work.service.impl;
 
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.config.RuoYiConfig;
 import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.constant.CacheConstants;
 import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.web.work.api.util.AppUtil;
 import com.ruoyi.web.work.api.util.AppUtil;
 import com.ruoyi.web.work.domain.Contract;
 import com.ruoyi.web.work.domain.Contract;
 import com.ruoyi.web.work.domain.ContractDetail;
 import com.ruoyi.web.work.domain.ContractDetail;
+import com.ruoyi.web.work.domain.Platform;
 import com.ruoyi.web.work.domain.User;
 import com.ruoyi.web.work.domain.User;
 import com.ruoyi.web.work.domain.dto.ContractDto;
 import com.ruoyi.web.work.domain.dto.ContractDto;
 import com.ruoyi.web.work.mapper.ContractMapper;
 import com.ruoyi.web.work.mapper.ContractMapper;
@@ -45,6 +49,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
     @Autowired
     @Autowired
     IUserService userService;
     IUserService userService;
 
 
+    @Autowired
+    private RedisCache redisCache;
+
     @Override
     @Override
     public List<Contract> selectList(Contract contract) {
     public List<Contract> selectList(Contract contract) {
         return contractMapper.selectList(contract);
         return contractMapper.selectList(contract);
@@ -69,7 +76,6 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
         detail = new ContractDetail();
         detail = new ContractDetail();
         detail.setUserId(AppUtil.getUser().getId());
         detail.setUserId(AppUtil.getUser().getId());
         detail.setContractId(contract.getId());
         detail.setContractId(contract.getId());
-        detail.setContractUrl(contract.getUrl());
         detail.setUrl(dto.getUrl());
         detail.setUrl(dto.getUrl());
         detail.setState(1);
         detail.setState(1);
         if (!detailService.save(detail)) {
         if (!detailService.save(detail)) {
@@ -84,16 +90,21 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
     }
     }
 
 
     @Override
     @Override
-    public void look(HttpServletResponse response,Long userId) throws IOException {
-        User user=userService.getById(userId);
-        if(user==null){
+    public void look(HttpServletResponse response, Long userId) throws IOException {
+        Platform platform = redisCache.getCacheObject(CacheConstants.APP_PLATFORM);
+        User user = userService.getById(userId);
+        if (user == null) {
             throw new ServerException("用户信息不存在");
             throw new ServerException("用户信息不存在");
         }
         }
         ContractDetail detail = detailService.selectByUserId(userId);
         ContractDetail detail = detailService.selectByUserId(userId);
         if (detail == null) {
         if (detail == null) {
             throw new ServerException("你还未签约");
             throw new ServerException("你还未签约");
         }
         }
-        String contractPath = RuoYiConfig.getProfile() + StringUtils.substringAfter(RuoYiConfig.getProfile() + detail.getContractUrl(), Constants.RESOURCE_PREFIX);
+        Contract contract = getById(detail.getContractId());
+        if (contract == null) {
+            throw new ServerException("合同不存在");
+        }
+        String contractPath = RuoYiConfig.getProfile() + StringUtils.substringAfter(RuoYiConfig.getProfile() + contract.getUrl(), Constants.RESOURCE_PREFIX);
         String imgPath = RuoYiConfig.getProfile() + StringUtils.substringAfter(RuoYiConfig.getProfile() + detail.getUrl(), Constants.RESOURCE_PREFIX);
         String imgPath = RuoYiConfig.getProfile() + StringUtils.substringAfter(RuoYiConfig.getProfile() + detail.getUrl(), Constants.RESOURCE_PREFIX);
         // 加载文档
         // 加载文档
         Document doc = new Document();
         Document doc = new Document();
@@ -105,10 +116,16 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
         // 调整图片大小和旋转角度
         // 调整图片大小和旋转角度
         picture.setWidth(80); // 设置图片宽度
         picture.setWidth(80); // 设置图片宽度
         picture.setHeight(30); // 设置图片高度
         picture.setHeight(30); // 设置图片高度
+
         // 查找并替换占位符
         // 查找并替换占位符
-        doc.replace("${sfz}", user.getIdCard(), true, true);
+        doc.replace("${serviceCompany}", platform.getServiceCompany(), true, true);
+        doc.replace("${director}", platform.getDirector(), true, true);
+        doc.replace("${address}", platform.getAddress(), true, true);
+        doc.replace("${name}", user.getName(), true, true);
+        doc.replace("${idCard}", user.getIdCard(), true, true);
         doc.replace("${phone}", user.getPhone(), true, true);
         doc.replace("${phone}", user.getPhone(), true, true);
-
+        doc.replace("${address2}", user.getAddress(), true, true);
+        doc.replace("${date}", DateUtils.getDate(), true, true);
         // 查找并替换占位符
         // 查找并替换占位符
         TextSelection[] selections = doc.findAllString("${jiaSign}", true, true);
         TextSelection[] selections = doc.findAllString("${jiaSign}", true, true);
         for (TextSelection selection : selections) {
         for (TextSelection selection : selections) {

+ 4 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/StatementServiceImpl.java

@@ -80,7 +80,7 @@ public class StatementServiceImpl extends ServiceImpl<StatementMapper, Statement
         for (int i = 0; i < list.size(); i++) {
         for (int i = 0; i < list.size(); i++) {
             StatementExportListVo e = list.get(i);
             StatementExportListVo e = list.get(i);
             e.setIndex(i + 1);
             e.setIndex(i + 1);
-            e.setFlag(e.getBankName().contains("建设银行") ? 0 : 1);
+            e.setFlag(e.getBankName().contains("建行")||e.getBankName().contains("建设银行") ? 0 : 1);
             e.setRemarks(dto.getRemarks());
             e.setRemarks(dto.getRemarks());
         }
         }
         return list;
         return list;
@@ -203,7 +203,10 @@ public class StatementServiceImpl extends ServiceImpl<StatementMapper, Statement
         if (detail == null || !detail.getCompanyId().equals(SecurityUtils.getLoginUser().getUser().getCompanyId())) {
         if (detail == null || !detail.getCompanyId().equals(SecurityUtils.getLoginUser().getUser().getCompanyId())) {
             return AjaxResult.error("关联结算单不存在或非法操作");
             return AjaxResult.error("关联结算单不存在或非法操作");
         }
         }
+        Platform platform = redisCache.getCacheObject(CacheConstants.APP_PLATFORM);
         detail.setMoney(dto.getMoney());
         detail.setMoney(dto.getMoney());
+        detail.setServiceMoney(platform.getRate().divide(new BigDecimal("100")).multiply(detail.getMoney()));
+        detail.setRealMoney(detail.getMoney().subtract(detail.getServiceMoney()));
         if (!detailService.updateById(detail)) {
         if (!detailService.updateById(detail)) {
             throw new ServiceException("编辑金额失败");
             throw new ServiceException("编辑金额失败");
         }
         }