dzx 1 سال پیش
والد
کامیت
15fd9da994

+ 5 - 1
src/main/java/com/xjrsoft/module/student/controller/BaseStudentScholarshipApplicantController.java

@@ -8,11 +8,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.toolkit.MPJWrappers;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.base.entity.BaseSemester;
+import com.xjrsoft.module.organization.entity.User;
 import com.xjrsoft.module.student.dto.AddBaseStudentScholarshipApplicantDto;
 import com.xjrsoft.module.student.dto.BaseStudentScholarshipApplicantCategoryPageDto;
 import com.xjrsoft.module.student.dto.BaseStudentScholarshipApplicantPageDto;
@@ -133,9 +135,11 @@ public class BaseStudentScholarshipApplicantController {
     @SaCheckPermission("basestudentscholarshipapplicant:detail")
     public RT<List<ScholarshipApplicantOptionVo>> optionSelect(@Valid BaseStudentScholarshipApplicantPageDto dto){
         List<BaseStudentScholarshipApplicant> applicantList = applicantService.list(
-            new QueryWrapper<BaseStudentScholarshipApplicant>().lambda()
+            new MPJLambdaWrapper<BaseStudentScholarshipApplicant>()
             .select(BaseStudentScholarshipApplicant::getId)
+            .selectAs(User::getName, BaseStudentScholarshipApplicant::getName)
             .select(BaseStudentScholarshipApplicant.class,x -> VoToColumnUtil.fieldsToColumns(BaseStudentScholarshipApplicantPageVo.class).contains(x.getProperty()))
+            .leftJoin(User.class, User::getId, BaseStudentScholarshipApplicant::getApplicantUserId)
             .eq(ObjectUtil.isNotNull(dto.getBaseStudentScholarshipCategoryId()),BaseStudentScholarshipApplicant::getBaseStudentScholarshipCategoryId, dto.getBaseStudentScholarshipCategoryId())
             .eq(ObjectUtil.isNotNull(dto.getSemesterId()), BaseStudentScholarshipApplicant::getBaseSemesterId, dto.getSemesterId())
             .eq(BaseStudentScholarshipApplicant::getStatus, 1)

+ 13 - 0
src/main/java/com/xjrsoft/module/student/controller/BaseStudentScholarshipReleaseController.java

@@ -38,6 +38,7 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.validation.Valid;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -139,14 +140,26 @@ public class BaseStudentScholarshipReleaseController {
                             .in(BaseStudentScholarshipApplicant::getId, dto.getApplicantIds())
             );
             List<BaseStudentScholarshipApplicant> dataList = new ArrayList<>();
+            List<BaseStudentScholarshipRelease> insertList = new ArrayList<>();
             for (BaseStudentScholarshipApplicant applicantVo : applicantList) {
                 applicantVo.setScholarshipLevel(dto.getScholarshipLevel());
                 applicantVo.setBaseStudentScholarshipCategoryId(dto.getBaseStudentScholarshipCategoryId());
                 dataList.add(applicantVo);
+
+                insertList.add(
+                        new BaseStudentScholarshipRelease(){{
+                            setAmount(applicantVo.getAmount());
+                            setBaseStudentScholarshipApplicantId(applicantVo.getId());
+                            setReleaseDate(new Date());
+                        }}
+                );
             }
             if(!dataList.isEmpty()){
                 applicantService.updateBatchById(dataList);
             }
+            if(!insertList.isEmpty()){
+                releaseService.saveBatch(insertList);
+            }
         }
         return RT.ok(true);
     }

+ 1 - 1
src/main/java/com/xjrsoft/module/student/entity/BaseStudentDevelopment.java

@@ -113,7 +113,7 @@ public class BaseStudentDevelopment implements Serializable {
     * 企合作单位(company_coop),是校企合作单位
     */
     @ApiModelProperty("企合作单位(company_coop),是校企合作单位")
-    private Integer companyCoopId;
+    private Long companyCoopId;
     /**
     * 就业单位名称(非校企合作单位)
     */

+ 1 - 1
src/main/resources/mapper/activity/ActivityInfoMapper.xml

@@ -66,7 +66,7 @@
         a2.event_content AS content,4 AS category,2 AS enroll_status
         , a2.event_type AS type_cn, 1 as is_enroll
         FROM moral_event a2 WHERE a2.delete_mark = 0 AND
-        (a2.attend_teacher = #{dto.loginUserId} OR FIND_IN_SET((
+        (a2.attend_teacher like concat('%',#{dto.loginUserId},'%') OR FIND_IN_SET((
         SELECT class_id FROM base_student_school_roll WHERE user_id = #{dto.loginUserId}
         ),a2.attend_class) > 0
         )

+ 7 - 1
src/main/resources/mapper/student/BaseStudentScholarshipCategoryMapper.xml

@@ -17,6 +17,12 @@
         ) as applicant_count,t3.name as semester_name, t1.scholarship_level,t1.base_semester_id as semester_id FROM base_student_scholarship_category t1
         LEFT JOIN xjr_dictionary_detail t2 ON t1.category = t2.code
         left join base_semester t3 on t1.base_semester_id = t3.id
-        WHERE t1.delete_mark = 0;
+        WHERE t1.delete_mark = 0
+        <if test="dto.name != null and dto.name != ''">
+            and t1.name like concat('%', #{dto.name},'%')
+        </if>
+        <if test="dto.semesterId != null">
+            and t1.base_semester_id = #{dto.semesterId}
+        </if>
     </select>
 </mapper>