Przeglądaj źródła

fix:用药时间 用户登录判断

lenovodn 1 rok temu
rodzic
commit
ed1862a12c

+ 4 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/AfterwardsAuditController.java

@@ -126,10 +126,10 @@ public class AfterwardsAuditController extends JeecgController<AfterwardsAudit,
 												   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
 		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 //		 String loginUserName = JwtUtil.getUserNameByToken(request);
-		if (null == loginUser) {
-			log.error("当前用户未登录");
-			throw new JeecgBootException("用户未登录"); // "登录已过期,请重新登录"
-		}
+//		if (null == loginUser) {
+//			log.error("当前用户未登录");
+//			throw new JeecgBootException("用户未登录"); // "登录已过期,请重新登录"
+//		}
 		Page<AuditInfoListResponse> page = new Page<>(pageNo, pageSize);
 		AuditInfoResponse result = afterwardsAuditService.loadAuditInfo(page ,id);
 		return Result.OK(result);

+ 3 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/AdvanceWarningAuditServiceImpl.java

@@ -279,7 +279,9 @@ public class AdvanceWarningAuditServiceImpl extends ServiceImpl<AdvanceWarningAu
                     // 获取两个日期天数相差
                     long until = usageLocalDate.until(now, ChronoUnit.DAYS) + 1;
                     if (record.getUseDay() != null) {
-                        record.setRemainingDays(record.getUseDay() - until);
+                        long l = record.getUseDay() - until;
+                        l=l<=0?0:l;
+                        record.setRemainingDays(l);
                     }
                 }
             }