diff --git a/src/main/java/io/v/nutz/web/commons/controller/SignatureController.java b/src/main/java/io/v/nutz/web/commons/controller/SignatureController.java index 9a67083..250e718 100644 --- a/src/main/java/io/v/nutz/web/commons/controller/SignatureController.java +++ b/src/main/java/io/v/nutz/web/commons/controller/SignatureController.java @@ -52,8 +52,27 @@ public class SignatureController { @At @Ok("json") @RequiresAuthentication - public Object doSub(String prefix, String id, String base64) { - redisService.setex(prefix + ":" + id, 60 * 10, base64); + public Object doSub(String prefix, String id, String base64, Boolean is_value_base64) { + if (is_value_base64) { + redisService.setex(prefix + ":" + id, 60 * 10, base64); + } else { + String today = DateUtil.today(); + String[] split = today.split("-"); + String todayPath = "/signature/" + split[0] + "/" + split[1] + "/" + split[2]; + String fileName = R.UU32() + ".png"; + String fullPath = todayPath + "/" + fileName; + + String replaceData = base64.replaceAll("data:image/png;base64,", ""); + + try (InputStream is = new ByteArrayInputStream(Base64.decode(replaceData))) { + ftpService.upload(todayPath, fileName, is); + redisService.setex(prefix + ":" + id, 60 * 10, fullPath); + } catch (Exception e) { + return Result.error("签字数据上传失败"); + } + } + + return Result.success(); } @@ -94,6 +113,7 @@ public class SignatureController { try (InputStream is = new ByteArrayInputStream(Base64.decode(replaceData))) { ftpService.upload(todayPath, fileName, is); } catch (Exception e) { + e.printStackTrace(); return Result.error("签字数据上传失败"); } @@ -105,11 +125,11 @@ public class SignatureController { @Ok("void") @RequiresAuthentication public void getSignData(String path, HttpServletResponse response) { - try{ + try { response.setContentType("image/jpg"); response.setHeader("Content-Disposition", "attachment;filename=1.png"); ftpService.download(path, response.getOutputStream()); - }catch (Exception e){ + } catch (Exception e) { e.printStackTrace(); } } diff --git a/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionManageController.java b/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionManageController.java index 679f44d..579c33e 100644 --- a/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionManageController.java +++ b/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionManageController.java @@ -175,7 +175,7 @@ public class ActivityUnionManageController { }); tissue.getCover(); - if (tissue.getIsPushHome()!=0) { + if (tissue.getIsPushHome()!= null && tissue.getIsPushHome()!=0) { mobileHomeService.handle(tissue, "ActivityTissue", "/mobile/activity/unionActivity", tissue.getIsPushHome()); } @@ -188,7 +188,7 @@ public class ActivityUnionManageController { @ViReturn @RequiresPermissions(value = {"activity.union.info", "activity.club.info", "activity.school.info2"}, logical = Logical.OR) public Object doEdit(@Param("tissue") ActivityTissue tissue) { - if (tissue.getIsPushHome()!=0) { + if (tissue.getIsPushHome()!= null && tissue.getIsPushHome()!=0) { mobileHomeService.handle(tissue, "ActivityTissue", "/mobile/activity/unionActivity", tissue.getIsPushHome()); } else { mobileHomeService.delete(tissue.getId()); diff --git a/src/main/java/io/v/nutz/zhgh/jf/controller/reimbursement/ActivityReimbursementMineController.java b/src/main/java/io/v/nutz/zhgh/jf/controller/reimbursement/ActivityReimbursementMineController.java index 3a85677..69f47d2 100644 --- a/src/main/java/io/v/nutz/zhgh/jf/controller/reimbursement/ActivityReimbursementMineController.java +++ b/src/main/java/io/v/nutz/zhgh/jf/controller/reimbursement/ActivityReimbursementMineController.java @@ -108,13 +108,13 @@ public class ActivityReimbursementMineController { Cnd cnd = Cnd.NEW(); if (!ShiroUtil.hasAnyRoles("sysadmin,wyh02,H10,xghng")) { SqlExpressionGroup group2 = new SqlExpressionGroup(); - if (ShiroUtil.hasAnyRoles("gh01,H04")) { - group2.or("u.unionid", "=", vi.getUnionId()); - } else if (ShiroUtil.hasRole("H02")) { - group2.or("scu.clubid", "=", vi.getClubId()); - } else { - group2.or("act.user_id", "=", ShiroUtil.getUserId()); - } +// if (ShiroUtil.hasAnyRoles("gh01,H04")) { +// group2.or("u.unionid", "=", vi.getUnionId()); +// } else if (ShiroUtil.hasRole("H02")) { +// group2.or("scu.clubid", "=", vi.getClubId()); +// } else { +// } + group2.or("act.user_id", "=", ShiroUtil.getUserId()); cnd.and(group2); } diff --git a/src/main/java/io/v/nutz/zhgh/mobile/common/updateSign.java b/src/main/java/io/v/nutz/zhgh/mobile/common/updateSign.java index 06b1d08..6c03911 100644 --- a/src/main/java/io/v/nutz/zhgh/mobile/common/updateSign.java +++ b/src/main/java/io/v/nutz/zhgh/mobile/common/updateSign.java @@ -30,10 +30,10 @@ public class updateSign { @At public void update(String sign, String user_id) { - if(StrUtil.isBlank(user_id)){ + if (StrUtil.isBlank(user_id)) { user_id = (String) ShiroUtil.getPrincipalProperty("id"); } - if (Strings.isNotBlank(getMySign())) { + if (Strings.isNotBlank(getMySign(null))) { userSignService.update(Chain.make("data", sign), Cnd.where("user_id", "=", user_id)); } else { userSignService.insert(new UserSign(user_id, sign)); @@ -41,8 +41,21 @@ public class updateSign { } @At - public String getMySign() { - List userSigns = userSignService.query(Cnd.NEW().and("user_id", "=", ShiroUtil.getPrincipalProperty("id"))); + public void update(String sign, String user_id, String prefix) { + if (StrUtil.isBlank(user_id)) { + user_id = (String) ShiroUtil.getPrincipalProperty("id"); + } + if (Strings.isNotBlank(getMySign(prefix))) { + userSignService.update(Chain.make("data", sign), Cnd.where("user_id", "=", user_id)); + } else { + userSignService.insert(new UserSign(user_id, sign, prefix)); + } + } + + @At + public String getMySign(String prefix) { + List userSigns = userSignService.query(Cnd.NEW().and("user_id", "=", ShiroUtil.getPrincipalProperty("id")) + .andEX("prefix", "=", prefix)); return userSigns.isEmpty() ? null : userSigns.get(0).getData(); } } diff --git a/src/main/resources/static/components/difficulty/apply.vue b/src/main/resources/static/components/difficulty/apply.vue index b57ee6e..e950238 100644 --- a/src/main/resources/static/components/difficulty/apply.vue +++ b/src/main/resources/static/components/difficulty/apply.vue @@ -1,7 +1,7 @@ diff --git a/src/main/resources/static/components/difficulty/info.vue b/src/main/resources/static/components/difficulty/info.vue index 3f556e9..61ddc16 100644 --- a/src/main/resources/static/components/difficulty/info.vue +++ b/src/main/resources/static/components/difficulty/info.vue @@ -14,66 +14,33 @@ {{ viewData.sqrloginname }} - - - {{ viewData.idcard }} - - - - - {{ viewData.bbname }} - - + + {{ viewData.sex }} + + + {{ viewData.unitname }} + + + + + {{ viewData.brnzsr }} + + {{ viewData.birthday }} - - - - - - - {{ viewData.bbunit }} - - + - - - - {{ viewData.yhmc }} - - - - - {{ viewData.yhkh }} - - - - - - {{ viewData.hospital }} - - - - - {{ viewData.hospitalized_time }} + + + {{ viewData.jtzz }} + + {{ viewData.apply_reason }} + {{ viewData.zyzkyybz }} + - + - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + @@ -247,12 +123,14 @@ - {{ moment(viewData.upa.auditTime).format("YYYY-MM-DD") }} + {{ viewData.upa.auditTime }} -
{{ viewData.upa.auditOpinion ? viewData.upa.auditOpinion : '暂无' }}
+
+ {{ viewData.upa.auditOpinion ? viewData.upa.auditOpinion : '暂无' }} +
- + - + - {{ viewData.sua.username }} + {{ viewData.tda.username }} - + - {{ moment(viewData.sua.auditTime).format("YYYY-MM-DD") }} + {{ viewData.tda.auditTime }} - - - {{ viewData.xghbzje }} + + + {{ viewData.xghbzje }}(元) - -
{{ viewData.sua.auditOpinion ? viewData.sua.auditOpinion : '暂无' }}
+
+ {{ viewData.tda.auditOpinion ? viewData.tda.auditOpinion : '暂无' }} +
- + 暂无 + +
+
+ + + + + + + + + + {{ viewData.sma.username }} + + + + + {{ viewData.sma.auditTime }} + + + + + + +
+ {{ viewData.sma.auditOpinion ? viewData.sma.auditOpinion : '暂无' }} +
+
+ + 暂无 @@ -362,9 +279,9 @@ module.exports = { if (data) { this.viewData.files = [] this.difficulty = this.handle ? "999" : "1" - console.log(data) this.viewData = data - if (this.viewData.files.length > 0) { + console.log(data) + if (this.viewData.files && this.viewData.files.length > 0) { this.viewData.files = JSON.parse(data.files) } @@ -375,7 +292,7 @@ module.exports = { type: 'error' }); } - }, + } } } diff --git a/src/main/resources/static/components/evaluate/evaluateInfo.vue b/src/main/resources/static/components/evaluate/evaluateInfo.vue index 40315c1..b45c888 100644 --- a/src/main/resources/static/components/evaluate/evaluateInfo.vue +++ b/src/main/resources/static/components/evaluate/evaluateInfo.vue @@ -110,7 +110,7 @@ pre {
- + diff --git a/src/main/resources/static/components/honor/honorInfo.vue b/src/main/resources/static/components/honor/honorInfo.vue index 4901f61..9417151 100644 --- a/src/main/resources/static/components/honor/honorInfo.vue +++ b/src/main/resources/static/components/honor/honorInfo.vue @@ -150,7 +150,7 @@ - + diff --git a/src/main/resources/static/components/member/MemberInfo.vue b/src/main/resources/static/components/member/MemberInfo.vue index a4551e9..ed36f10 100644 --- a/src/main/resources/static/components/member/MemberInfo.vue +++ b/src/main/resources/static/components/member/MemberInfo.vue @@ -140,7 +140,7 @@
+ code="political"> diff --git a/src/main/resources/static/components/mobile/difficulty/info.vue b/src/main/resources/static/components/mobile/difficulty/info.vue index 16b1036..1351a35 100644 --- a/src/main/resources/static/components/mobile/difficulty/info.vue +++ b/src/main/resources/static/components/mobile/difficulty/info.vue @@ -47,7 +47,7 @@