Jelajahi Sumber

资料审核

change 3 tahun lalu
induk
melakukan
9905beda1a

+ 2 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/base/UserProfileController.java

@@ -67,12 +67,12 @@ public class UserProfileController extends BaseController {
     /**
      * 修改填写资料审核
      */
-    @ApiOperation("修改填写资料审核")
+    @ApiOperation("审核资料")
     @PreAuthorize("@ss.hasPermi('system:profile:edit')")
     @Log(title = "填写资料审核", businessType = BusinessType.UPDATE)
     @PostMapping()
     public AjaxResult<Void> edit(@RequestBody UserProfileEditBo bo) {
-        return toAjax(iUserProfileService.updateByEditBo(bo) ? 1 : 0);
+        return toAjax(iUserProfileService.updateAuditByEditBo(bo) ? 1 : 0);
     }
 
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IUserProfileService.java

@@ -53,4 +53,6 @@ public interface IUserProfileService extends IService<UserProfile> {
 	String addWord(UserProfileAddBo bo);
 
 	UserProfileVo getInfo(UserProfileQueryBo bo);
+
+	boolean updateAuditByEditBo(UserProfileEditBo bo);
 }

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

@@ -9,6 +9,7 @@ import cn.hutool.extra.template.TemplateEngine;
 import cn.hutool.extra.template.TemplateUtil;
 import cn.hutool.poi.word.Word07Writer;
 import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.common.utils.SecurityUtils;
 import org.apache.poi.xwpf.usermodel.BreakType;
 import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
 import org.springframework.stereotype.Service;
@@ -163,6 +164,15 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         return baseMapper.getInfo(bo);
     }
 
+    @Override
+    public boolean updateAuditByEditBo(UserProfileEditBo bo) {
+        UserProfile update = BeanUtil.toBean(bo,UserProfile.class);
+        update.setId(bo.getId());
+        update.setCreateByName("SAAS-"+ SecurityUtils.getUsername());
+        update.setUpdateTime(DateUtils.getNowTime());
+        return this.updateById(update);
+    }
+
     /**
      * 远程读取image转换为Base64字符串
      *

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserPlanServiceImpl.java

@@ -607,10 +607,10 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
         endDate = c.getTime();
 
         Date startDate = startDateStr;
-
+        int day = startDate.getDay();
         while (startDate.compareTo(endDate) <= 0) {
             for (Long integer : longs) {
-                if (startDate.getDay() != integer) {
+                if (startDate.getDay() == integer) {
                     result++;
                     break;
                 }