Browse Source

feature 解决检查任务子表没数据的问题

xiahan 9 months ago
parent
commit
abfab999e8

+ 5 - 4
js-security/security-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/ThemeCheckServiceImpl.java

@@ -263,6 +263,7 @@ public class ThemeCheckServiceImpl extends ServiceImpl<ThemeCheckDao, ThemeCheck
         themeCheckContentDo.setId(SecurityUtil.getUUID());
         JSCommonUtils.setBaseDetail(themeCheckContentDo, sysUser);
         themeCheckContentDo.setItemsort(index);
+        themeCheckContentDo.setTenantid(themeCheckItemDo.getTenantid());
         themeCheckContentDo.setThemecheckitemid(themeCheckItemDo.getId());
         themeCheckContentDo.setCheckmethod(checkTemplateItemsDo.getChecktype());
         themeCheckContentDo.setCheckposition(checkTemplateItemsDo.getCheckposition());
@@ -275,8 +276,8 @@ public class ThemeCheckServiceImpl extends ServiceImpl<ThemeCheckDao, ThemeCheck
      * 生产检查任务信息
      *
      * @param sysUser            检查人信息
-     * @param themeCheckWorkpark 检查小组信息
-     * @param themeCheckId       检查任务ID
+     * @param themeCheckWorkPark 检查小组信息
+     * @param themeCheck       检查任务ID
      * @return
      */
     private ThemeCheckItemDo generateThemeCheckItem(SysUserDo sysUser, ThemeCheckWorkparkDo themeCheckWorkPark, ThemeCheckDo themeCheck) {
@@ -320,7 +321,7 @@ public class ThemeCheckServiceImpl extends ServiceImpl<ThemeCheckDao, ThemeCheck
      * @param checkTemplateItemss
      */
     private void sendMail(ThemeCheckDo themeCheckDo, List<ThemeCheckWorkparkDo> themeCheckWorkparks, List<CheckTemplateItemsDo> checkTemplateItemss) {
-        if (themeCheckWorkparks != null && themeCheckWorkparks.size() > 0) {
+        if (themeCheckWorkparks != null && !themeCheckWorkparks.isEmpty()) {
             for (ThemeCheckWorkparkDo themeCheckWorkpark : themeCheckWorkparks) {
                 // 邮件发送
                 MailDo mail = new MailDo();
@@ -350,7 +351,7 @@ public class ThemeCheckServiceImpl extends ServiceImpl<ThemeCheckDao, ThemeCheck
                         }
                     }
                 }
-                if (mialUsers != null && mialUsers.size() > 0) {
+                if (mialUsers != null && !mialUsers.isEmpty()) {
                     String[] userArray = new String[mialUsers.size()];
                     mail.setReceiveEmail(mialUsers.toArray(userArray));
                     StringBuilder mailContent = new StringBuilder();