Bläddra i källkod

首页逻辑修改

gao.qiang 2 år sedan
förälder
incheckning
b67c250308

+ 1 - 1
purchase-admin/src/main/java/com/ozs/web/controller/home/HomeNoticeController.java

@@ -36,7 +36,7 @@ public class HomeNoticeController extends BaseController {
 
     @ApiOperation(value = "查询首页公告")
     @PostMapping("/selectHomeNotice")
-    @PreAuthorize("@ss.hasPermi('home:homeNotice:selecthomeNotice')")
+//    @PreAuthorize("@ss.hasPermi('home:homeNotice:selecthomeNotice')")
     @Log(title = ModularConstans.notice, businessType = BusinessType.QUERY)
     public AjaxResult selectHomeNotice(@RequestBody HomeNoticeVo homeNoticeVo) {
         LambdaQueryWrapper<HomeNotice> lw = new LambdaQueryWrapper<HomeNotice>();

+ 2 - 4
purchase-admin/src/main/java/com/ozs/web/controller/home/HomeNotificationMessageController.java

@@ -9,7 +9,6 @@ import com.ozs.common.annotation.Log;
 import com.ozs.common.constant.ModularConstans;
 import com.ozs.common.core.controller.BaseController;
 import com.ozs.common.core.domain.AjaxResult;
-import com.ozs.common.core.domain.R;
 import com.ozs.common.enums.BusinessType;
 import com.ozs.common.utils.StringUtils;
 import com.ozs.home.domain.HomeNotificationMessage;
@@ -19,7 +18,6 @@ import com.ozs.home.service.HomeNotificationMessageService;
 import com.ozs.pm.doman.PmDemand;
 import com.ozs.pm.mapper.PmDemandMapper;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -43,7 +41,7 @@ public class HomeNotificationMessageController extends BaseController {
 
     @ApiOperation(value = "查询首页通知消息")
     @PostMapping("/selectHomeNotificationMessage")
-    @PreAuthorize("@ss.hasPermi('home:homeNotificationMessage:selectHomeNotificationMessage')")
+//    @PreAuthorize("@ss.hasPermi('home:homeNotificationMessage:selectHomeNotificationMessage')")
     @Log(title = ModularConstans.notice, businessType = BusinessType.QUERY)
     public AjaxResult selectHomeNotificationMessage(@RequestBody HomeNotificationMessageVo homeNotificationMessageVo) {
         LambdaQueryWrapper<HomeNotificationMessage> lw = new LambdaQueryWrapper<HomeNotificationMessage>();
@@ -60,7 +58,7 @@ public class HomeNotificationMessageController extends BaseController {
 
     @ApiOperation(value = "填写滞后原因")
     @PostMapping("/saveReasonsForLag")
-    @PreAuthorize("@ss.hasPermi('home:homeNotificationMessage:saveReasonsForLag')")
+//    @PreAuthorize("@ss.hasPermi('home:homeNotificationMessage:saveReasonsForLag')")
     @Log(title = ModularConstans.notice, businessType = BusinessType.UPDATE)
     public AjaxResult saveReasonsForLag(@RequestBody ReasonsForLagVo reasonsForLagVo) {
         HomeNotificationMessage homeNotificationMessage = homeNotificationMessageService.getById(reasonsForLagVo.getHomeNotificationMessageId());

+ 1 - 1
purchase-system/src/main/java/com/ozs/home/domain/HomeNotice.java

@@ -39,7 +39,7 @@ public class HomeNotice extends BaseEntity {
     private Date noticeTime;
 
     /** 采购项目编号 */
-    private Long projectNo;
+    private String projectNo;
 
     /** 合同履行日期 */
     private String performanceDate;

+ 3 - 0
purchase-system/src/main/java/com/ozs/home/domain/HomeNotificationMessage.java

@@ -1,6 +1,8 @@
 package com.ozs.home.domain;
 
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.ozs.common.core.domain.BaseEntity;
 import io.swagger.annotations.ApiModel;
 import lombok.AllArgsConstructor;
@@ -23,6 +25,7 @@ import java.util.Date;
 public class HomeNotificationMessage extends BaseEntity {
 
     /** 主键 */
+    @TableId(type = IdType.AUTO)
     private Long homeNotificationMessageId;
 
     /** 首页分类(0需求单位首页1采购管理部门首页2采购部首页) */

+ 1 - 1
purchase-system/src/main/java/com/ozs/home/domain/vo/HomeNotificationMessageVo.java

@@ -23,6 +23,6 @@ public class HomeNotificationMessageVo extends PageVo {
     /** 首页分类(0需求单位首页1采购管理部门首页2采购部首页) */
     private String homepageClassification;
 
-    /** 公消息分类(0预警消息1.发函催告2.预期告警) */
+    /** 公消息分类(0预警消息1.发函催告2.预期告警) */
     private String messageClassification;
 }

+ 6 - 3
purchase-system/src/main/java/com/ozs/home/mapper/HomeNotificationMessageMapper.java

@@ -2,14 +2,17 @@ package com.ozs.home.mapper;
 
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ozs.base.domain.BasePolicy;
 import com.ozs.home.domain.HomeNotificationMessage;
 import org.apache.ibatis.annotations.Mapper;
 
 /**
- * 首页通知消息 数据层
+ * 政策法规Mapper接口
  *
- * @author bu
+ * @author ruoyi
+ * @date 2023-01-14
  */
 @Mapper
-public interface HomeNotificationMessageMapper extends BaseMapper<HomeNotificationMessage> {
+public interface HomeNotificationMessageMapper extends BaseMapper<HomeNotificationMessage>
+{
 }

+ 3 - 5
purchase-system/src/main/java/com/ozs/home/service/HomeNotificationMessageService.java

@@ -1,14 +1,12 @@
 package com.ozs.home.service;
 
-
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.ozs.home.domain.HomeNotice;
+import com.ozs.base.domain.BasePolicy;
 import com.ozs.home.domain.HomeNotificationMessage;
 
+
 /**
- * 首页通知消息 服务层
- *
- * @author bu
+ * @author Administrator
  */
 public interface HomeNotificationMessageService extends IService<HomeNotificationMessage> {
 }

+ 2 - 6
purchase-system/src/main/java/com/ozs/home/service/impl/HomeNotificationMessageServiceImpl.java

@@ -1,21 +1,17 @@
 package com.ozs.home.service.impl;
 
-
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ozs.home.domain.HomeNotice;
 import com.ozs.home.domain.HomeNotificationMessage;
-import com.ozs.home.mapper.HomeNoticeMapper;
 import com.ozs.home.mapper.HomeNotificationMessageMapper;
-import com.ozs.home.service.HomeNoticeService;
 import com.ozs.home.service.HomeNotificationMessageService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
 /**
- * @author buzhanyi
+ * @author Administrator
  */
 @Service
 @Slf4j
 public class HomeNotificationMessageServiceImpl extends ServiceImpl<HomeNotificationMessageMapper, HomeNotificationMessage> implements HomeNotificationMessageService {
-    
+
 }

+ 5 - 5
purchase-system/src/main/java/com/ozs/plan/service/impl/PlanYearsServiceImpl.java

@@ -596,7 +596,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
                 queryWrapper
                         .or(wrapper -> wrapper.lambda().eq(PmDemand::getPurchaseDeptId, sysDept.getDeptId())
                                 .eq(PmDemand::getIsExcess, IsExcess.NO_EXCESS.getCode()))
-                        .or(wrapper -> wrapper.lambda().in(PmDemand::getPurchaseDeptId, sysDepts)
+                        .or(wrapper -> wrapper.lambda().in(PmDemand::getPurchaseDeptId, collect)
                                 .eq(PmDemand::getIsExcess, IsExcess.EXCESS.getCode()))
                         .in("project_status",PmProjectStatus.DEMAND_WAIT_AUDIT.getCode(),PmProjectStatus.DEMAND_AUDIT_RETURN.getCode());
                 pmDemands = pmDemandMapper.selectList(queryWrapper);
@@ -665,7 +665,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
                 queryWrapper
                         .or(wrapper -> wrapper.lambda().eq(PmDemand::getPurchaseDeptId, sysDept.getDeptId())
                                 .eq(PmDemand::getIsExcess, IsExcess.NO_EXCESS.getCode()))
-                        .or(wrapper -> wrapper.lambda().in(PmDemand::getPurchaseDeptId, sysDepts)
+                        .or(wrapper -> wrapper.lambda().in(PmDemand::getPurchaseDeptId, collect)
                                 .eq(PmDemand::getIsExcess, IsExcess.EXCESS.getCode()))
                         .in("project_status",PmProjectStatus.TASK_WAIT_RELEASE.getCode(),PmProjectStatus.BID_INFO_WAIT_FILL.getCode());
                 pmDemands = pmDemandMapper.selectList(queryWrapper);
@@ -694,7 +694,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
                 queryWrapper
                         .or(wrapper -> wrapper.lambda().eq(PmDemand::getPurchaseDeptId, sysDept.getDeptId())
                                 .eq(PmDemand::getIsExcess, IsExcess.NO_EXCESS.getCode()))
-                        .or(wrapper -> wrapper.lambda().in(PmDemand::getPurchaseDeptId, sysDepts)
+                        .or(wrapper -> wrapper.lambda().in(PmDemand::getPurchaseDeptId, collect)
                                 .eq(PmDemand::getIsExcess, IsExcess.EXCESS.getCode()))
                         .in("project_status",PmProjectStatus.BID_INFO_WAIT_FILL.getCode(),PmProjectStatus.CONTRACT_WAIT_FILL.getCode());
                 pmDemands = pmDemandMapper.selectList(queryWrapper);
@@ -723,7 +723,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
                 queryWrapper
                         .or(wrapper -> wrapper.lambda().eq(PmDemand::getPurchaseDeptId, sysDept.getDeptId())
                                 .eq(PmDemand::getIsExcess, IsExcess.NO_EXCESS.getCode()))
-                        .or(wrapper -> wrapper.lambda().in(PmDemand::getPurchaseDeptId, sysDepts)
+                        .or(wrapper -> wrapper.lambda().in(PmDemand::getPurchaseDeptId, collect)
                                 .eq(PmDemand::getIsExcess, IsExcess.EXCESS.getCode()))
                         .lt("project_status",PmProjectStatus.CONTRACT_WAIT_FILL.getCode());
                 pmDemands = pmDemandMapper.selectList(queryWrapper);
@@ -752,7 +752,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
                 queryWrapper
                         .or(wrapper -> wrapper.lambda().eq(PmDemand::getPurchaseDeptId, sysDept.getDeptId())
                                 .eq(PmDemand::getIsExcess, IsExcess.NO_EXCESS.getCode()))
-                        .or(wrapper -> wrapper.lambda().in(PmDemand::getPurchaseDeptId, sysDepts)
+                        .or(wrapper -> wrapper.lambda().in(PmDemand::getPurchaseDeptId, collect)
                                 .eq(PmDemand::getIsExcess, IsExcess.EXCESS.getCode()))
                         .gt("project_status",PmProjectStatus.CONTRACT_WAIT_FILL.getCode());
                 pmDemands = pmDemandMapper.selectList(queryWrapper);

+ 4 - 0
purchase-system/src/main/java/com/ozs/pm/doman/PmDemand.java

@@ -2,6 +2,9 @@ package com.ozs.pm.doman;
 
 import java.math.BigDecimal;
 import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ozs.common.annotation.Excel;
 import com.ozs.common.core.domain.BaseEntity;
@@ -27,6 +30,7 @@ public class PmDemand extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 主键 */
+    @TableId(type = IdType.AUTO)
     private Long demandId;
 
     /** 计划ID */

+ 2 - 2
purchase-system/src/main/java/com/ozs/system/service/impl/SysUserServiceImpl.java

@@ -222,7 +222,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     @Override
     public void checkUserAllowed(SysUser user)
     {
-        if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin())
+        if (StringUtils.isNotNull(user.getUserId()) && "1".equals(user.getUserId().toString()))
         {
             throw new ServiceException("不允许操作超级管理员用户");
         }
@@ -462,7 +462,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     {
         for (Long userId : userIds)
         {
-//            checkUserAllowed(new SysUser(userId));
+            checkUserAllowed(new SysUser(userId));
             checkUserDataScope(userId);
         }
         // 删除用户与角色关联