yangdamao 1 жил өмнө
parent
commit
baa8b4bb0c

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/bo/ClassGradeUserQueryBo.java

@@ -49,6 +49,11 @@ public class ClassGradeUserQueryBo extends BaseEntity {
 	@ApiModelProperty(value = "排序的方向", example = "asc,desc")
 	private String isAsc;
 
+	/**
+	 * 排序標識
+	 */
+	private Integer ascSort = 0;
+
 	/**
 	 * 学员ID
 	 */

+ 7 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
@@ -78,7 +79,6 @@ import com.zhongzheng.modules.user.domain.UserStudyRecordPhoto;
 import com.zhongzheng.modules.user.mapper.UserStudyRecordPhotoMapper;
 import com.zhongzheng.modules.user.service.*;
 import com.zhongzheng.modules.user.vo.*;
-import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.Param;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -1128,6 +1128,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
 
     @Override
     public List<ClassPeriodStudentVo> listUserPeriodManage(ClassGradeUserQueryBo bo) {
+
         //查询班级学员信息
         List<ClassPeriodStudentVo> classPeriodStudentVos = baseMapper.listUserPeriod(bo);
         //查找学员学习记录
@@ -2198,6 +2199,11 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
 
     @Override
     public List<ClassPeriodStudentVo> listUserPeriod(ClassGradeUserQueryBo bo) {
+        String tenantId = ServletUtils.getRequest().getHeader("TenantId");
+        if (StringUtils.isNotBlank(tenantId) && tenantId.equals("779352047136603")){
+           //豪邦的學時審核按修改時間排序
+            bo.setAscSort(1);
+        }
         //查询班级学员信息
         List<ClassPeriodStudentVo> classPeriodStudentVos = baseMapper.listUserPeriod(bo);
         //查找学员学习记录

+ 6 - 3
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -664,15 +664,18 @@
         <if test="periodEndTime != null and periodEndTime !='' ">
             AND #{periodEndTime} >= cgu.period_time
         </if>
-        <if test="periodStatus != 2 and periodStatus != 3">
+        <if test="periodStatus != 2 and periodStatus != 3 and ascSort == 0">
             order by cgu.update_time desc
         </if>
-        <if test="periodStatus == 2 ">
+        <if test="periodStatus == 2 and ascSort == 0">
             order by cgu.period_wait_time,cgu.create_time
         </if>
-        <if test="periodStatus == 3 ">
+        <if test="periodStatus == 3 and ascSort == 0">
             order by cgu.period_ing_time,cgu.create_time
         </if>
+        <if test="ascSort == 1 ">
+            order by cgu.update_time desc
+        </if>
     </select>