1 year ago
parent
commit
7cd65f71a2

+ 2 - 1
platform-dao/src/main/java/com/platform/dao/mapper/repair/RepairApplicationFormMapper.java

@@ -3,6 +3,7 @@ package com.platform.dao.mapper.repair;
 import com.platform.dao.config.MyMapper;
 import com.platform.dao.dto.repair.RepairApplicationFormDTO;
 import com.platform.dao.entity.repair.RepairApplicationForm;
+import com.platform.dao.vo.NoticeVO;
 import com.platform.dao.vo.repair.RepairApplicationFormVO;
 import com.platform.dao.vo.report.FiftyFailSbReportVO;
 import org.springframework.stereotype.Component;
@@ -20,7 +21,7 @@ import java.util.Map;
  */
 @Component
 public interface RepairApplicationFormMapper extends MyMapper<RepairApplicationForm> {
-    Map<String,Integer> getLoginNotice(RepairApplicationFormDTO dto);
+    List<NoticeVO> getLoginNotice(RepairApplicationFormDTO dto);
     List<FiftyFailSbReportVO> getFiftyFailSbReport(RepairApplicationFormDTO dto);
 
     String getDeptName(String id);

+ 23 - 0
platform-dao/src/main/java/com/platform/dao/vo/NoticeVO.java

@@ -0,0 +1,23 @@
+package com.platform.dao.vo;
+
+import com.platform.common.bean.DataScope;
+import com.platform.dao.entity.operate.Article;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import javax.persistence.Id;
+import javax.persistence.Transient;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * @author cyz
+ */
+@Data
+@Accessors(chain = true)
+public class NoticeVO implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String calendarDate;
+    private Integer num;
+}

+ 6 - 2
platform-dao/src/main/resources/mapper/repair/RepairApplicationFormMapper.xml

@@ -574,8 +574,8 @@
     </select>
 
     <select id="getLoginNotice" parameterType="com.platform.dao.dto.repair.RepairApplicationFormDTO"
-            resultType="java.util.Map">
-        select count(1) ,calendar_date from t_repair_application_form form
+            resultType="com.platform.dao.vo.NoticeVO">
+        select count(1) as num,calendar_date as calendarDate  from t_repair_application_form form
         <where>
             <if test="dispatchUserId!=null and dispatchUserId!=''">
                 form.dispatch_user_id = #{dispatchUserId}
@@ -583,7 +583,11 @@
             <if test="repairUserId!=null and repairUserId!=''">
                 form.repair_user_id = #{repairUserId}
             </if>
+            <if test="addCalendar">
+                and form.calendar_date is not null
+            </if>
         </where>
         group by calendar_date
+        order by calendar_date asc
     </select>
 </mapper>

+ 2 - 1
platform-service/src/main/java/com/platform/service/repair/RepairApplicationFormService.java

@@ -10,6 +10,7 @@ import com.platform.dao.dto.repair.RepairFormDTO;
 import com.platform.dao.entity.repair.RepairApplicationForm;
 import com.platform.dao.entity.repair.RepairForm;
 import com.platform.dao.vo.NoticeNumberVO;
+import com.platform.dao.vo.NoticeVO;
 import com.platform.dao.vo.query.check.CheckJobVO;
 import com.platform.dao.vo.query.workplace.WorkplaceRepairVO;
 import com.platform.dao.vo.repair.RepairApplicationFormVO;
@@ -33,7 +34,7 @@ import java.util.Map;
  * @Version Copyright (c) 2019,北京乾元坤和科技有限公司 All rights reserved.
  */
 public interface RepairApplicationFormService extends IBaseService<RepairApplicationForm, RepairApplicationFormDTO> {
-    Map<String,Integer> getLoginNotice();
+    List<NoticeVO> getLoginNotice();
 
     TuiCalendar getTuiCalendar(RepairApplicationFormDTO repairApplicationFormDTO);
 

+ 3 - 2
platform-service/src/main/java/com/platform/service/repair/impl/RepairApplicationFormServiceImpl.java

@@ -50,6 +50,7 @@ import com.platform.dao.mapper.upms.SysUserRoleMapper;
 import com.platform.dao.mapper.workplace.WorkplaceBacklogMapper;
 import com.platform.dao.util.MessageTemplateUtil;
 import com.platform.dao.vo.NoticeNumberVO;
+import com.platform.dao.vo.NoticeVO;
 import com.platform.dao.vo.SysUserRoleVO;
 import com.platform.dao.vo.SysUserVO;
 import com.platform.dao.vo.query.check.CheckJobVO;
@@ -121,7 +122,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
     private final BigDecimal initNum= new BigDecimal(0);
 
     @Override
-    public Map<String, Integer> getLoginNotice() {
+    public List<NoticeVO> getLoginNotice() {
         UserInfo userInfo = SecurityUtils.getUserInfo();
         //获取近七天的日期
         List<String> nextDayList = DateUtils.getNextSevenDays(LocalDate.now().minusDays(1));
@@ -133,7 +134,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
             dto.setRepairUserId(userInfo.getUserId());
         }
         dto.setAddCalendar(true);
-        Map<String,Integer> map = mapper.getLoginNotice(dto);
+        List<NoticeVO> map = mapper.getLoginNotice(dto);
         return map;
     }