Browse Source

Merge branch '20240416_sun' of sckj/mz-cloud into master

15143018065 1 year ago
parent
commit
215437654e

+ 12 - 0
ruoyi-modules/mz-lnst/src/main/java/com/ruoyi/lnst/service/impl/ZwywLrJbxxServiceImpl.java

@@ -277,6 +277,12 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService {
                 String xb = Integer.parseInt(zwywLrJbxx.getLrZjhm().substring(17, 18)) % 2 == 0 ? "2" : "1";
                 zwywLrJbxx.setLrXb(xb);
             }
+            LoginUser user = SecurityUtils.getLoginUser();
+            if (ObjectUtils.isNotEmpty(user)) {
+                if (ObjectUtils.isNotEmpty(user.getSysUser())) {
+                    zwywLrJbxx.setCreateUserId(String.valueOf(user.getSysUser().getUserId()));
+                }
+            }
         } catch (Exception ignored) {}
         return zwywLrJbxxMapper.insert(zwywLrJbxx);
     }
@@ -341,6 +347,12 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService {
                 String xb = Integer.parseInt(zwywLrJbxx.getLrZjhm().substring(17, 18)) % 2 == 0 ? "2" : "1";
                 zwywLrJbxx.setLrXb(xb);
             }
+            LoginUser user = SecurityUtils.getLoginUser();
+            if (ObjectUtils.isNotEmpty(user)) {
+                if (ObjectUtils.isNotEmpty(user.getSysUser())) {
+                    zwywLrJbxx.setCreateUserId(String.valueOf(user.getSysUser().getUserId()));
+                }
+            }
         } catch (Exception ignored) {}
         return zwywLrJbxxMapper.insert(zwywLrJbxx);
     }