Java后端V1.0
This commit is contained in:
74
srs-survey/pom.xml
Normal file
74
srs-survey/pom.xml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>srs</artifactId>
|
||||
<groupId>com.srs</groupId>
|
||||
<version>3.8.5</version>
|
||||
</parent>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>9</source>
|
||||
<target>9</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>srs-survey</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
<version>3.5.3.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.srs</groupId>
|
||||
<artifactId>srs-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-core</artifactId>
|
||||
<version>3.5.3.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-extension</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.srs</groupId>
|
||||
<artifactId>srs-comprehensive</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.srs.dormitory</groupId>
|
||||
<artifactId>dms-dormitory</artifactId>
|
||||
<version>3.8.5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
328
srs-survey/src/main/java/com/srs/survey/domain/SurItinerary.java
Normal file
328
srs-survey/src/main/java/com/srs/survey/domain/SurItinerary.java
Normal file
@@ -0,0 +1,328 @@
|
||||
package com.srs.survey.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.srs.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import com.srs.common.core.domain.BaseEntity;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 学生假期返校对象 sur_itinerary
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(value = "SurItinerary对象" , description = "学生假期返校表")
|
||||
@TableName("sur_itinerary")
|
||||
public class SurItinerary extends BaseEntity{
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
public String surveyName;
|
||||
|
||||
@TableField(exist = false)
|
||||
public String teacherName;
|
||||
|
||||
@TableField(exist = false)
|
||||
public String tNo;
|
||||
|
||||
@TableField(exist = false)
|
||||
public String campusName;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
public String parkName;
|
||||
|
||||
@TableField(exist = false)
|
||||
public String buildingName;
|
||||
|
||||
@TableField(exist = false)
|
||||
public String roomNo;
|
||||
|
||||
|
||||
/**
|
||||
* 学生返校id
|
||||
*/
|
||||
@ApiModelProperty("学生返校id")
|
||||
@TableId( value="return_school_id", type = IdType.AUTO )
|
||||
public Long returnSchoolId;
|
||||
|
||||
/**
|
||||
* 学院id
|
||||
*/
|
||||
@ApiModelProperty("学院id")
|
||||
@TableField("dept_id")
|
||||
@Excel(name = "学院id")
|
||||
public Long deptId;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@ApiModelProperty("学院名称")
|
||||
@Excel(name = "学院名称")
|
||||
@TableField(exist = false)
|
||||
public String deptName;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@ApiModelProperty("学号")
|
||||
@TableField("stu_no")
|
||||
@Excel(name = "学号")
|
||||
public String stuNo;
|
||||
|
||||
/**
|
||||
* 所属班级id
|
||||
*/
|
||||
@ApiModelProperty("所属班级")
|
||||
@TableField("class_id")
|
||||
@Excel(name = "所属班级")
|
||||
public Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@ApiModelProperty("所属班级")
|
||||
@Excel(name = "所属班级")
|
||||
@TableField(exist = false)
|
||||
public String className;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@ApiModelProperty("姓名")
|
||||
@TableField("name")
|
||||
@Excel(name = "姓名")
|
||||
public String name;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@ApiModelProperty("联系电话")
|
||||
@TableField("phone")
|
||||
@Excel(name = "联系电话")
|
||||
public String phone;
|
||||
|
||||
/**
|
||||
* 紧急联系人
|
||||
*/
|
||||
@ApiModelProperty("紧急联系人")
|
||||
@TableField("emergency_contact")
|
||||
@Excel(name = "紧急联系人")
|
||||
public String emergencyContact;
|
||||
|
||||
/**
|
||||
* 紧急联系人电话
|
||||
*/
|
||||
@ApiModelProperty("紧急联系人电话")
|
||||
@TableField("emergency_contact_phone")
|
||||
@Excel(name = "紧急联系人电话")
|
||||
public String emergencyContactPhone;
|
||||
|
||||
/**
|
||||
* 所在校区
|
||||
*/
|
||||
@ApiModelProperty("所在校区")
|
||||
@TableField("school_district")
|
||||
@Excel(name = "所在校区")
|
||||
public String schoolDistrict;
|
||||
|
||||
/**
|
||||
* 公寓楼
|
||||
*/
|
||||
@ApiModelProperty("公寓楼")
|
||||
@TableField("apartment")
|
||||
@Excel(name = "公寓楼")
|
||||
public String apartment;
|
||||
|
||||
/**
|
||||
* 宿舍号
|
||||
*/
|
||||
@ApiModelProperty("宿舍号")
|
||||
@TableField("room")
|
||||
@Excel(name = "宿舍号")
|
||||
public String room;
|
||||
|
||||
/**
|
||||
* 计划返校时间
|
||||
*/
|
||||
@ApiModelProperty("计划返校时间")
|
||||
@TableField("scheduled_return_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "计划返校时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date scheduledReturnTime;
|
||||
|
||||
/**
|
||||
* 是否到校
|
||||
*/
|
||||
@ApiModelProperty("是否到校")
|
||||
@TableField("reach_school_status")
|
||||
@Excel(name = "是否到校")
|
||||
public String reachSchoolStatus;
|
||||
|
||||
/**
|
||||
* 家长姓名
|
||||
*/
|
||||
@ApiModelProperty("家长姓名")
|
||||
@TableField("parent_name")
|
||||
@Excel(name = "家长姓名")
|
||||
public String parentName;
|
||||
|
||||
/**
|
||||
* 家长电话
|
||||
*/
|
||||
@ApiModelProperty("家长电话")
|
||||
@TableField("parent_phone")
|
||||
@Excel(name = "家长电话")
|
||||
public String parentPhone;
|
||||
|
||||
/**
|
||||
* 家长是否知晓
|
||||
*/
|
||||
@ApiModelProperty("家长是否知晓")
|
||||
@TableField("know")
|
||||
@Excel(name = "家长是否知晓")
|
||||
public String know;
|
||||
|
||||
/**
|
||||
* 未返校原因分类
|
||||
*/
|
||||
@ApiModelProperty("未返校原因分类")
|
||||
@TableField("absent_school_type")
|
||||
@Excel(name = "未返校原因分类")
|
||||
public String absentSchoolType;
|
||||
|
||||
/**
|
||||
* 未返校详细原因
|
||||
*/
|
||||
@ApiModelProperty("未返校详细原因")
|
||||
@TableField("absent_school_remark")
|
||||
@Excel(name = "未返校详细原因")
|
||||
public String absentSchoolRemark;
|
||||
|
||||
/**
|
||||
* 到校定位
|
||||
*/
|
||||
@ApiModelProperty("到校定位")
|
||||
@TableField("attend_school_gps")
|
||||
@Excel(name = "到校定位")
|
||||
public String attendSchoolGps;
|
||||
|
||||
/**
|
||||
* 到校时间
|
||||
*/
|
||||
@ApiModelProperty("到校时间")
|
||||
@TableField("attend_school_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "到校时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date attendSchoolTime;
|
||||
|
||||
/**
|
||||
* 状态:0.保存,1.保存,2.已审核
|
||||
*/
|
||||
@ApiModelProperty("状态:0.保存,1.待审核,2.已审核")
|
||||
@TableField("status")
|
||||
@Excel(name = "状态:0.保存,1.待审核,2.已审核")
|
||||
public String status;
|
||||
|
||||
/**
|
||||
* 所属主题
|
||||
*/
|
||||
@ApiModelProperty("所属主题")
|
||||
@TableField("survey_id")
|
||||
@Excel(name = "所属主题")
|
||||
public Long surveyId;
|
||||
|
||||
|
||||
@ApiModelProperty("预计离校时间")
|
||||
@TableField("will_leave_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计离校时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date willLeaveTime;
|
||||
|
||||
@ApiModelProperty("是否离校")
|
||||
@TableField("is_leave")
|
||||
@Excel(name = "是否离校")
|
||||
public String isLeave;
|
||||
|
||||
@ApiModelProperty("家长姓名1")
|
||||
@TableField("fam_name")
|
||||
@Excel(name = "家长姓名1")
|
||||
public String famName;
|
||||
|
||||
@ApiModelProperty("家长电话1")
|
||||
@TableField("fam_phone")
|
||||
@Excel(name = "家长电话1")
|
||||
public String famPhone;
|
||||
|
||||
@ApiModelProperty("家长是否知晓1")
|
||||
@TableField("fam_know")
|
||||
@Excel(name = "家长是否知晓1")
|
||||
public String famKnow;
|
||||
|
||||
|
||||
@ApiModelProperty("预计留校时间")
|
||||
@TableField("will_stay_time")
|
||||
@Excel(name = "预计留校时间")
|
||||
public String willStayTime;
|
||||
|
||||
@ApiModelProperty("离校或留校状态")
|
||||
@TableField("leave_status")
|
||||
@Excel(name = "离校或留校状态")
|
||||
public String leaveStatus;
|
||||
|
||||
@ApiModelProperty("是否到家")
|
||||
@TableField("is_home")
|
||||
@Excel(name = "是否到家")
|
||||
public String isHome;
|
||||
|
||||
@ApiModelProperty("到家定位")
|
||||
@TableField("home_gps")
|
||||
@Excel(name = "到家定位")
|
||||
public String homeGps;
|
||||
|
||||
@ApiModelProperty("留校事由")
|
||||
@TableField("stay_reason")
|
||||
@Excel(name = "留校事由")
|
||||
public String stayReason;
|
||||
|
||||
|
||||
@ApiModelProperty("去向地")
|
||||
@TableField("will_addr")
|
||||
@Excel(name = "去向地")
|
||||
public String willAddr;
|
||||
|
||||
|
||||
@TableField("home_gps_addr")
|
||||
public String homeGpsAddr;
|
||||
|
||||
@TableField("home_submit")
|
||||
public String homeSubmit;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("home_gps_time")
|
||||
public Date homeGpsTime;
|
||||
|
||||
@TableField("more_dept_name")
|
||||
public String moreDeptName;
|
||||
|
||||
@TableField("stu_fdy_name")
|
||||
public String stuFdyName;
|
||||
|
||||
@TableField(exist = false)
|
||||
public Long pageNum;
|
||||
@TableField(exist = false)
|
||||
public Long pageSize;
|
||||
|
||||
}
|
@@ -0,0 +1,76 @@
|
||||
package com.srs.survey.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.srs.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import com.srs.common.core.domain.BaseEntity;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 学工去向调查发布 对象 sur_survey
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(value = "SurSurvey对象" , description = "学工去向调查发布表 ")
|
||||
@TableName("sur_survey")
|
||||
public class SurSurvey extends BaseEntity{
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 发布主题id
|
||||
*/
|
||||
@ApiModelProperty("发布主题id")
|
||||
@TableId("survey_id")
|
||||
private Long surveyId;
|
||||
|
||||
/**
|
||||
* 发布的主题
|
||||
*/
|
||||
@ApiModelProperty("发布的主题")
|
||||
@TableField("survey_name")
|
||||
@Excel(name = "发布的主题")
|
||||
private String surveyName;
|
||||
|
||||
/**
|
||||
* 截止时间
|
||||
*/
|
||||
@ApiModelProperty("截止时间")
|
||||
@TableField("cutoff_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "截止时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date cutoffTime;
|
||||
|
||||
/**
|
||||
* 状态:1、发布,0、关闭
|
||||
*/
|
||||
@ApiModelProperty("状态:1、发布,0、关闭")
|
||||
@TableField("status")
|
||||
@Excel(name = "状态:1、发布,0、关闭")
|
||||
private String status;
|
||||
|
||||
@TableField("count_date")
|
||||
public String countDate;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
public String isSubmit;
|
||||
|
||||
@TableField(exist = false)
|
||||
public String leaveStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
public String homeGps;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
package com.srs.survey.domain.dto;
|
||||
|
||||
import com.srs.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LeaveRes {
|
||||
@Excel(name = "学院")
|
||||
public String deptName;
|
||||
@Excel(name = "在学生人数")
|
||||
public int stuNum;
|
||||
@Excel(name = "预计离校学院人数")
|
||||
public int deptLeaveNum;
|
||||
@Excel(name = "计划离校人数")
|
||||
public int schoolLeavers;
|
||||
@Excel(name = "实际离校(到达目的地)")
|
||||
public int homeNum;
|
||||
@Excel(name = "留校人数")
|
||||
public int stayNum;
|
||||
@Excel(name = "返校")
|
||||
public int schoolNum;
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
package com.srs.survey.domain.dto;
|
||||
|
||||
import com.srs.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ReturnRes {
|
||||
|
||||
@Excel(name = "学院")
|
||||
public String deptName;
|
||||
@Excel(name = "年级")
|
||||
public String gradeName;
|
||||
@Excel(name = "学生数")
|
||||
public int stuNum;
|
||||
@Excel(name = "实习人数")
|
||||
public String shixi;
|
||||
@Excel(name = "应返校人数")
|
||||
public String yingfanxiao;
|
||||
@Excel(name = "实际累计返校")
|
||||
public String yifanxiao;
|
||||
@Excel(name = "未返校")
|
||||
public String weifanxiao;
|
||||
@Excel(name = "路上")
|
||||
public String lushang;
|
||||
@Excel(name = "病假")
|
||||
public String bingjia;
|
||||
@Excel(name = "无票")
|
||||
public String wupiao;
|
||||
@Excel(name = "无课请事假延长")
|
||||
public String wuke;
|
||||
@Excel(name = "事假")
|
||||
public String shijia;
|
||||
@Excel(name = "红白事")
|
||||
public String hongbaishi;
|
||||
@Excel(name = "考试")
|
||||
public String kaoshi;
|
||||
@Excel(name = "参赛")
|
||||
public String cansai;
|
||||
@Excel(name = "兵检或役前训练")
|
||||
public String bingjian;
|
||||
@Excel(name = "退学或休学")
|
||||
public String tuixue;
|
||||
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
package com.srs.survey.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SubmitRes {
|
||||
public int submitNum;
|
||||
public String moreDeptName;
|
||||
public int homeNum;
|
||||
public int stayNum;
|
||||
public int schoolNum;
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
package com.srs.survey.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SurItineraryStatisticsVo {
|
||||
private String moreDeptName; // 学院名称
|
||||
private Integer expectedLeaveCount; // 预计离校数量
|
||||
private Integer stayCount; // 留校数量
|
||||
private Integer homeCount; // 到家数量
|
||||
private Integer returnCount; // 返校数量
|
||||
}
|
@@ -0,0 +1,99 @@
|
||||
package com.srs.survey.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.srs.survey.domain.SurItinerary;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.srs.survey.domain.dto.LeaveRes;
|
||||
import com.srs.survey.domain.dto.ReturnRes;
|
||||
import com.srs.survey.domain.dto.SubmitRes;
|
||||
import com.srs.survey.domain.vo.SurItineraryStatisticsVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 学生假期返校Mapper接口
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
@Mapper
|
||||
public interface SurItineraryMapper extends BaseMapper<SurItinerary> {
|
||||
|
||||
public List<Map<String, Object>> countWillLeave(Long surveyId);
|
||||
|
||||
public List<Map<String, Object>> countFdyClassWillLeave(@Param("surveyId") Long surveyId,@Param("fdyNo") String fdyNo);
|
||||
|
||||
public List<Map<String, Object>> listSubmitRes(Long surveyId);
|
||||
|
||||
public List<LeaveRes> listLeaveRes(Long surveyId);
|
||||
|
||||
public List<ReturnRes> listReturnRes(Long surveyId);
|
||||
|
||||
|
||||
public List<SurItinerary> listView(SurItinerary param);
|
||||
|
||||
|
||||
public List<Map<String, Object>> listReturnRes1(Long surveyId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询学生假期返校
|
||||
*
|
||||
* @param returnSchoolId 学生假期返校主键
|
||||
* @return 学生假期返校
|
||||
*/
|
||||
public SurItinerary selectSurItineraryByReturnSchoolId(Long returnSchoolId);
|
||||
|
||||
/**
|
||||
* 查询学生假期返校列表
|
||||
*
|
||||
* @param surItinerary 学生假期返校
|
||||
* @return 学生假期返校集合
|
||||
*/
|
||||
List<SurItinerary> selectSurItineraryList(SurItinerary surItinerary);
|
||||
|
||||
/**
|
||||
* 新增学生假期返校
|
||||
*
|
||||
* @param surItinerary 学生假期返校
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSurItinerary(SurItinerary surItinerary);
|
||||
|
||||
/**
|
||||
* 修改学生假期返校
|
||||
*
|
||||
* @param surItinerary 学生假期返校
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSurItinerary(SurItinerary surItinerary);
|
||||
|
||||
/**
|
||||
* 删除学生假期返校
|
||||
*
|
||||
* @param returnSchoolId 学生假期返校主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSurItineraryByReturnSchoolId(Long returnSchoolId);
|
||||
|
||||
/**
|
||||
* 批量删除学生假期返校
|
||||
*
|
||||
* @param returnSchoolIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSurItineraryByReturnSchoolIds(Long[] returnSchoolIds);
|
||||
/**
|
||||
* 审核学生假期返校
|
||||
*/
|
||||
int auditItinerary(Long returnSchoolId);
|
||||
/**
|
||||
* 批量审核学生
|
||||
*/
|
||||
int batchAuditItinerary(Long[] returnSchoolId);
|
||||
|
||||
List<SurItineraryStatisticsVo> getItineraryStatistics(@Param("surveyId") Long surveyId);
|
||||
|
||||
}
|
@@ -0,0 +1,62 @@
|
||||
package com.srs.survey.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.srs.survey.domain.SurSurvey;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 学工去向调查发布 Mapper接口
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
public interface SurSurveyMapper extends BaseMapper<SurSurvey> {
|
||||
/**
|
||||
* 查询学工去向调查发布
|
||||
*
|
||||
* @param surveyId 学工去向调查发布 主键
|
||||
* @return 学工去向调查发布
|
||||
*/
|
||||
public SurSurvey selectSurSurveyBySurveyId(Long surveyId);
|
||||
|
||||
/**
|
||||
* 查询学工去向调查发布 列表
|
||||
*
|
||||
* @param surSurvey 学工去向调查发布
|
||||
* @return 学工去向调查发布 集合
|
||||
*/
|
||||
List<SurSurvey> selectSurSurveyList(SurSurvey surSurvey);
|
||||
|
||||
/**
|
||||
* 新增学工去向调查发布
|
||||
*
|
||||
* @param surSurvey 学工去向调查发布
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSurSurvey(SurSurvey surSurvey);
|
||||
|
||||
/**
|
||||
* 修改学工去向调查发布
|
||||
*
|
||||
* @param surSurvey 学工去向调查发布
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSurSurvey(SurSurvey surSurvey);
|
||||
|
||||
/**
|
||||
* 删除学工去向调查发布
|
||||
*
|
||||
* @param surveyId 学工去向调查发布 主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSurSurveyBySurveyId(Long surveyId);
|
||||
|
||||
/**
|
||||
* 批量删除学工去向调查发布
|
||||
*
|
||||
* @param surveyIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSurSurveyBySurveyIds(Long[] surveyIds);
|
||||
}
|
@@ -0,0 +1,126 @@
|
||||
package com.srs.survey.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.srs.common.core.domain.AjaxResult;
|
||||
import com.srs.comprehensive.domain.ViewStuInfo;
|
||||
import com.srs.survey.domain.SurItinerary;
|
||||
import com.srs.survey.domain.dto.LeaveRes;
|
||||
import com.srs.survey.domain.dto.ReturnRes;
|
||||
import com.srs.survey.domain.dto.SubmitRes;
|
||||
import com.srs.survey.domain.vo.SurItineraryStatisticsVo;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 学生假期返校Service接口
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
public interface ISurItineraryService extends IService<SurItinerary> {
|
||||
|
||||
|
||||
public AjaxResult sendFdyStuLeaveMsg(SurItinerary param);
|
||||
public AjaxResult sendFdyStuReturnMsg(SurItinerary param);
|
||||
|
||||
public Map<String,Object> listFdyStuReturn(SurItinerary param);
|
||||
|
||||
public Map<String,Object> listFdyStuLeave(SurItinerary param);
|
||||
|
||||
public List<Map<String, Object>> listSubmitRes(Long surveyId);
|
||||
|
||||
public List<Map<String, Object>> countWillLeave(Long surveyId);
|
||||
|
||||
|
||||
public List<Map<String, Object>> countFdyClassWillLeave(Long surveyId,String fdyNo);
|
||||
|
||||
public List<Map<String, Object>> listReturnRes1(Long surveyId);
|
||||
|
||||
public List<LeaveRes> listLeaveRes(Long surveyId);
|
||||
|
||||
public List<ReturnRes> listReturnRes(Long surveyId);
|
||||
|
||||
public AjaxResult getStuCampus();
|
||||
|
||||
public AjaxResult updateStuHomeGpsAddr(SurItinerary param);
|
||||
|
||||
public AjaxResult stuSchoolUpdate(SurItinerary param);
|
||||
|
||||
public AjaxResult manyReturnAudit(Long[] ids);
|
||||
|
||||
public AjaxResult returnAudit(SurItinerary param);
|
||||
|
||||
public AjaxResult stuWillReturnUpdate(SurItinerary param);
|
||||
|
||||
public AjaxResult boolStuOwnReturn(Long id);
|
||||
|
||||
public AjaxResult stuHomeUpdate(SurItinerary param);
|
||||
|
||||
public AjaxResult manyLeaveAudit(Long[] ids);
|
||||
|
||||
public AjaxResult leaveAudit(SurItinerary param);
|
||||
|
||||
public List<SurItinerary> listView(SurItinerary param);
|
||||
|
||||
public AjaxResult stuGetRecordBySvId(Long svId) ;
|
||||
|
||||
public AjaxResult stuLeaveApply(SurItinerary param) ;
|
||||
|
||||
/**
|
||||
* 查询学生假期返校
|
||||
*
|
||||
* @param returnSchoolId 学生假期返校主键
|
||||
* @return 学生假期返校
|
||||
*/
|
||||
public SurItinerary selectSurItineraryByReturnSchoolId(Long returnSchoolId);
|
||||
|
||||
/**
|
||||
* 查询学生假期返校列表
|
||||
*
|
||||
* @param surItinerary 学生假期返校
|
||||
* @return 学生假期返校集合
|
||||
*/
|
||||
List<SurItinerary> selectSurItineraryList(SurItinerary surItinerary);
|
||||
|
||||
/**
|
||||
* 新增学生假期返校
|
||||
*
|
||||
* @param surItinerary 学生假期返校
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSurItinerary(SurItinerary surItinerary);
|
||||
|
||||
/**
|
||||
* 修改学生假期返校
|
||||
*
|
||||
* @param surItinerary 学生假期返校
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSurItinerary(SurItinerary surItinerary);
|
||||
|
||||
/**
|
||||
* 批量删除学生假期返校
|
||||
*
|
||||
* @param returnSchoolIds 需要删除的学生假期返校主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSurItineraryByReturnSchoolIds(Long[] returnSchoolIds);
|
||||
|
||||
/**
|
||||
* 删除学生假期返校信息
|
||||
*
|
||||
* @param returnSchoolId 学生假期返校主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSurItineraryByReturnSchoolId(Long returnSchoolId);
|
||||
/**
|
||||
* 审核学生
|
||||
*/
|
||||
int auditItinerary(Long returnSchoolId);
|
||||
int batchAuditItinerary(Long[] returnSchoolId);
|
||||
|
||||
List<SurItineraryStatisticsVo> getItineraryStatistics(Long surveyId);
|
||||
|
||||
}
|
@@ -0,0 +1,67 @@
|
||||
package com.srs.survey.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.srs.common.core.domain.AjaxResult;
|
||||
import com.srs.survey.domain.SurSurvey;
|
||||
|
||||
/**
|
||||
* 学工去向调查发布 Service接口
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
public interface ISurSurveyService extends IService<SurSurvey> {
|
||||
|
||||
|
||||
public AjaxResult listStu(SurSurvey param);
|
||||
|
||||
/**
|
||||
* 查询学工去向调查发布
|
||||
*
|
||||
* @param surveyId 学工去向调查发布 主键
|
||||
* @return 学工去向调查发布
|
||||
*/
|
||||
public SurSurvey selectSurSurveyBySurveyId(Long surveyId);
|
||||
|
||||
/**
|
||||
* 查询学工去向调查发布 列表
|
||||
*
|
||||
* @param surSurvey 学工去向调查发布
|
||||
* @return 学工去向调查发布 集合
|
||||
*/
|
||||
List<SurSurvey> selectSurSurveyList(SurSurvey surSurvey);
|
||||
|
||||
/**
|
||||
* 新增学工去向调查发布
|
||||
*
|
||||
* @param surSurvey 学工去向调查发布
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSurSurvey(SurSurvey surSurvey);
|
||||
|
||||
/**
|
||||
* 修改学工去向调查发布
|
||||
*
|
||||
* @param surSurvey 学工去向调查发布
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSurSurvey(SurSurvey surSurvey);
|
||||
|
||||
/**
|
||||
* 批量删除学工去向调查发布
|
||||
*
|
||||
* @param surveyIds 需要删除的学工去向调查发布 主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSurSurveyBySurveyIds(Long[] surveyIds);
|
||||
|
||||
/**
|
||||
* 删除学工去向调查发布 信息
|
||||
*
|
||||
* @param surveyId 学工去向调查发布 主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSurSurveyBySurveyId(Long surveyId);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,124 @@
|
||||
package com.srs.survey.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.srs.common.core.domain.AjaxResult;
|
||||
import com.srs.common.utils.DateUtils;
|
||||
import com.srs.survey.domain.SurItinerary;
|
||||
import com.srs.survey.mapper.SurItineraryMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.srs.survey.mapper.SurSurveyMapper;
|
||||
import com.srs.survey.domain.SurSurvey;
|
||||
import com.srs.survey.service.ISurSurveyService;
|
||||
|
||||
import static com.srs.common.utils.SecurityUtils.getUsername;
|
||||
|
||||
/**
|
||||
* 学工去向调查发布 Service业务层处理
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
@Service
|
||||
public class SurSurveyServiceImpl extends ServiceImpl<SurSurveyMapper,SurSurvey> implements ISurSurveyService {
|
||||
@Autowired
|
||||
private SurSurveyMapper surSurveyMapper;
|
||||
@Autowired
|
||||
private SurItineraryMapper _itineraryMapper;
|
||||
|
||||
@Override
|
||||
public AjaxResult listStu(SurSurvey param){
|
||||
QueryWrapper<SurSurvey> queryWrapper = new QueryWrapper<>();
|
||||
if(param.getSurveyName()!=null && !param.getSurveyName().equals("")){
|
||||
queryWrapper.like("survey_name",param.getSurveyName());
|
||||
}
|
||||
queryWrapper.eq("status",1);
|
||||
queryWrapper.orderByDesc("survey_id");
|
||||
List<SurSurvey> list = surSurveyMapper.selectList(queryWrapper);
|
||||
list.forEach(item->{
|
||||
QueryWrapper<SurItinerary> queryWrapper1 = new QueryWrapper<>();
|
||||
queryWrapper1.eq("stu_no",getUsername());
|
||||
queryWrapper1.eq("survey_id",item.getSurveyId());
|
||||
List<SurItinerary> list1 = _itineraryMapper.selectList(queryWrapper1);
|
||||
if(list1.size()>0){
|
||||
item.leaveStatus = list1.get(0).getLeaveStatus();
|
||||
item.isSubmit = "是";
|
||||
item.homeGps = list1.get(0).getHomeGps();
|
||||
}else{
|
||||
item.isSubmit = "否";
|
||||
}
|
||||
});
|
||||
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学工去向调查发布
|
||||
*
|
||||
* @param surveyId 学工去向调查发布 主键
|
||||
* @return 学工去向调查发布
|
||||
*/
|
||||
@Override
|
||||
public SurSurvey selectSurSurveyBySurveyId(Long surveyId) {
|
||||
return surSurveyMapper.selectSurSurveyBySurveyId(surveyId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学工去向调查发布 列表
|
||||
*
|
||||
* @param surSurvey 学工去向调查发布
|
||||
* @return 学工去向调查发布
|
||||
*/
|
||||
@Override
|
||||
public List<SurSurvey> selectSurSurveyList(SurSurvey surSurvey) {
|
||||
return surSurveyMapper.selectSurSurveyList(surSurvey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学工去向调查发布
|
||||
*
|
||||
* @param surSurvey 学工去向调查发布
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSurSurvey(SurSurvey surSurvey) {
|
||||
surSurvey.setCreateTime(DateUtils.getNowDate());
|
||||
return surSurveyMapper.insertSurSurvey(surSurvey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学工去向调查发布
|
||||
*
|
||||
* @param surSurvey 学工去向调查发布
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSurSurvey(SurSurvey surSurvey) {
|
||||
return surSurveyMapper.updateSurSurvey(surSurvey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除学工去向调查发布
|
||||
*
|
||||
* @param surveyIds 需要删除的学工去向调查发布 主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurSurveyBySurveyIds(Long[] surveyIds) {
|
||||
return surSurveyMapper.deleteSurSurveyBySurveyIds(surveyIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学工去向调查发布 信息
|
||||
*
|
||||
* @param surveyId 学工去向调查发布 主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurSurveyBySurveyId(Long surveyId) {
|
||||
return surSurveyMapper.deleteSurSurveyBySurveyId(surveyId);
|
||||
}
|
||||
}
|
@@ -0,0 +1,433 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.srs.survey.mapper.SurItineraryMapper">
|
||||
|
||||
<resultMap type="SurItinerary" id="SurItineraryResult">
|
||||
<result property="returnSchoolId" column="return_school_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="stuNo" column="stu_no" />
|
||||
<result property="classId" column="class_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="emergencyContact" column="emergency_contact" />
|
||||
<result property="emergencyContactPhone" column="emergency_contact_phone" />
|
||||
<result property="schoolDistrict" column="school_district" />
|
||||
<result property="apartment" column="apartment" />
|
||||
<result property="room" column="room" />
|
||||
<result property="scheduledReturnTime" column="scheduled_return_time" />
|
||||
<result property="reachSchoolStatus" column="reach_school_status" />
|
||||
<result property="parentName" column="parent_name" />
|
||||
<result property="parentPhone" column="parent_phone" />
|
||||
<result property="know" column="know" />
|
||||
<result property="absentSchoolType" column="absent_school_type" />
|
||||
<result property="absentSchoolRemark" column="absent_school_remark" />
|
||||
<result property="attendSchoolGps" column="attend_school_gps" />
|
||||
<result property="attendSchoolTime" column="attend_school_time" />
|
||||
<result property="status" column="status" />
|
||||
<result property="surveyId" column="survey_id" />
|
||||
<result property="stuFdyName" column="stu_fdy_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurItineraryVo">
|
||||
select return_school_id, b.dept_id, stu_no, a.class_id, name, a.phone, emergency_contact, emergency_contact_phone, school_district, apartment, room, scheduled_return_time, reach_school_status, a.parent_name, a.parent_phone, know, absent_school_type, absent_school_remark, attend_school_gps, attend_school_time, a.status, survey_id,b.dept_name,c.class_name from sur_itinerary a left join sys_dept b on a.dept_id=b.dept_id left join srs_class c on a.class_id=c.class_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSurItineraryList" parameterType="SurItinerary" resultMap="SurItineraryResult">
|
||||
<include refid="selectSurItineraryVo"/>
|
||||
<where>
|
||||
<if test="deptId != null "> and a.dept_id = #{deptId}</if>
|
||||
<if test="stuNo != null and stuNo != ''"> and stu_no = #{stuNo}</if>
|
||||
<if test="classId != null "> and a.class_id = #{classId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="emergencyContact != null and emergencyContact != ''"> and emergency_contact = #{emergencyContact}</if>
|
||||
<if test="emergencyContactPhone != null and emergencyContactPhone != ''"> and emergency_contact_phone = #{emergencyContactPhone}</if>
|
||||
<if test="schoolDistrict != null and schoolDistrict != ''"> and school_district = #{schoolDistrict}</if>
|
||||
<if test="apartment != null and apartment != ''"> and apartment = #{apartment}</if>
|
||||
<if test="room != null and room != ''"> and room = #{room}</if>
|
||||
<if test="scheduledReturnTime != null "> and scheduled_return_time = #{scheduledReturnTime}</if>
|
||||
<if test="reachSchoolStatus != null and reachSchoolStatus != ''"> and reach_school_status = #{reachSchoolStatus}</if>
|
||||
<if test="parentName != null and parentName != ''"> and parent_name like concat('%', #{parentName}, '%')</if>
|
||||
<if test="parentPhone != null and parentPhone != ''"> and parent_phone = #{parentPhone}</if>
|
||||
<if test="know != null and know != ''"> and know = #{know}</if>
|
||||
<if test="absentSchoolType != null and absentSchoolType != ''"> and absent_school_type = #{absentSchoolType}</if>
|
||||
<if test="absentSchoolRemark != null and absentSchoolRemark != ''"> and absent_school_remark = #{absentSchoolRemark}</if>
|
||||
<if test="attendSchoolGps != null and attendSchoolGps != ''"> and attend_school_gps = #{attendSchoolGps}</if>
|
||||
<if test="attendSchoolTime != null "> and attend_school_time = #{attendSchoolTime}</if>
|
||||
<if test="status != null and status != ''"> and a.status = #{status}</if>
|
||||
<if test="surveyId != null "> and survey_id = #{surveyId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSurItineraryByReturnSchoolId" parameterType="Long" resultMap="SurItineraryResult">
|
||||
<include refid="selectSurItineraryVo"/>
|
||||
where return_school_id = #{returnSchoolId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSurItinerary" parameterType="SurItinerary" useGeneratedKeys="true" keyProperty="returnSchoolId">
|
||||
insert into sur_itinerary
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="stuNo != null">stu_no,</if>
|
||||
<if test="classId != null">class_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="emergencyContact != null">emergency_contact,</if>
|
||||
<if test="emergencyContactPhone != null">emergency_contact_phone,</if>
|
||||
<if test="schoolDistrict != null">school_district,</if>
|
||||
<if test="apartment != null">apartment,</if>
|
||||
<if test="room != null">room,</if>
|
||||
<if test="scheduledReturnTime != null">scheduled_return_time,</if>
|
||||
<if test="reachSchoolStatus != null">reach_school_status,</if>
|
||||
<if test="parentName != null">parent_name,</if>
|
||||
<if test="parentPhone != null">parent_phone,</if>
|
||||
<if test="know != null">know,</if>
|
||||
<if test="absentSchoolType != null">absent_school_type,</if>
|
||||
<if test="absentSchoolRemark != null">absent_school_remark,</if>
|
||||
<if test="attendSchoolGps != null">attend_school_gps,</if>
|
||||
<if test="attendSchoolTime != null">attend_school_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="surveyId != null">survey_id,</if>
|
||||
<if test="stuFdyName != null">stu_fdy_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="stuNo != null">#{stuNo},</if>
|
||||
<if test="classId != null">#{classId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="emergencyContact != null">#{emergencyContact},</if>
|
||||
<if test="emergencyContactPhone != null">#{emergencyContactPhone},</if>
|
||||
<if test="schoolDistrict != null">#{schoolDistrict},</if>
|
||||
<if test="apartment != null">#{apartment},</if>
|
||||
<if test="room != null">#{room},</if>
|
||||
<if test="scheduledReturnTime != null">#{scheduledReturnTime},</if>
|
||||
<if test="reachSchoolStatus != null">#{reachSchoolStatus},</if>
|
||||
<if test="parentName != null">#{parentName},</if>
|
||||
<if test="parentPhone != null">#{parentPhone},</if>
|
||||
<if test="know != null">#{know},</if>
|
||||
<if test="absentSchoolType != null">#{absentSchoolType},</if>
|
||||
<if test="absentSchoolRemark != null">#{absentSchoolRemark},</if>
|
||||
<if test="attendSchoolGps != null">#{attendSchoolGps},</if>
|
||||
<if test="attendSchoolTime != null">#{attendSchoolTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="surveyId != null">#{surveyId},</if>
|
||||
<if test="stuFdyName != null">#{stuFdyName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSurItinerary" parameterType="SurItinerary">
|
||||
update sur_itinerary
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="stuNo != null">stu_no = #{stuNo},</if>
|
||||
<if test="classId != null">class_id = #{classId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="emergencyContact != null">emergency_contact = #{emergencyContact},</if>
|
||||
<if test="emergencyContactPhone != null">emergency_contact_phone = #{emergencyContactPhone},</if>
|
||||
<if test="schoolDistrict != null">school_district = #{schoolDistrict},</if>
|
||||
<if test="apartment != null">apartment = #{apartment},</if>
|
||||
<if test="room != null">room = #{room},</if>
|
||||
<if test="scheduledReturnTime != null">scheduled_return_time = #{scheduledReturnTime},</if>
|
||||
<if test="reachSchoolStatus != null">reach_school_status = #{reachSchoolStatus},</if>
|
||||
<if test="parentName != null">parent_name = #{parentName},</if>
|
||||
<if test="parentPhone != null">parent_phone = #{parentPhone},</if>
|
||||
<if test="know != null">know = #{know},</if>
|
||||
<if test="absentSchoolType != null">absent_school_type = #{absentSchoolType},</if>
|
||||
<if test="absentSchoolRemark != null">absent_school_remark = #{absentSchoolRemark},</if>
|
||||
<if test="attendSchoolGps != null">attend_school_gps = #{attendSchoolGps},</if>
|
||||
<if test="attendSchoolTime != null">attend_school_time = #{attendSchoolTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="surveyId != null">survey_id = #{surveyId},</if>
|
||||
<if test="stuFdyName != null">stu_fdy_name = #{stuFdyName},</if>
|
||||
</trim>
|
||||
where return_school_id = #{returnSchoolId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSurItineraryByReturnSchoolId" parameterType="Long">
|
||||
delete from sur_itinerary where return_school_id = #{returnSchoolId}
|
||||
</delete>
|
||||
<update id="auditItinerary" parameterType="long">
|
||||
update sur_itinerary set status=2 where return_school_id = #{returnSchoolId}
|
||||
</update>
|
||||
<update id="batchAuditItinerary" parameterType="string">
|
||||
update sur_itinerary set status=2 where return_school_id in
|
||||
<foreach item="returnSchoolId" collection="array" open="(" separator="," close=")">
|
||||
#{returnSchoolId}
|
||||
</foreach>
|
||||
</update>
|
||||
<delete id="deleteSurItineraryByReturnSchoolIds" parameterType="String">
|
||||
delete from sur_itinerary where return_school_id in
|
||||
<foreach item="returnSchoolId" collection="array" open="(" separator="," close=")">
|
||||
#{returnSchoolId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="listView" parameterType="SurItinerary" resultType="SurItinerary">
|
||||
select d.survey_name, a.*,b.class_name,b.teacher_name,c.employee_id,f.campus_name,f.park_name,f.building_name,f.room_no
|
||||
from sur_itinerary as a
|
||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||
left join cph_teacher as c on b.teacher_id = c.teacher_id
|
||||
left join sur_survey as d on a.survey_id = d.survey_id
|
||||
left join srs_dormitory_student as e on a.stu_no = e.stu_no
|
||||
left join view_dorm_info as f on e.dormitory_id = f.id
|
||||
<where>
|
||||
<if test="deptId != null "> and b.dept_id = #{deptId}</if>
|
||||
<if test="stuNo != null and stuNo != ''"> and a.stu_no = #{stuNo}</if>
|
||||
<if test="classId != null "> and b.class_id = #{classId}</if>
|
||||
<if test="name != null and name != ''"> and a.name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and a.phone = #{phone}</if>
|
||||
<if test="emergencyContact != null and emergencyContact != ''"> and a.emergency_contact = #{emergencyContact}</if>
|
||||
<if test="emergencyContactPhone != null and emergencyContactPhone != ''"> and a.emergency_contact_phone = #{emergencyContactPhone}</if>
|
||||
<if test="scheduledReturnTime != null "> and a.scheduled_return_time = #{scheduledReturnTime}</if>
|
||||
<if test="reachSchoolStatus != null and reachSchoolStatus != ''"> and a.reach_school_status = #{reachSchoolStatus}</if>
|
||||
<if test="parentName != null and parentName != ''"> and a.parent_name like concat('%', #{parentName}, '%')</if>
|
||||
<if test="parentPhone != null and parentPhone != ''"> and a.parent_phone = #{parentPhone}</if>
|
||||
<if test="know != null and know != ''"> and a.know = #{know}</if>
|
||||
<if test="absentSchoolType != null and absentSchoolType != ''"> and a.absent_school_type = #{absentSchoolType}</if>
|
||||
<if test="absentSchoolRemark != null and absentSchoolRemark != ''"> and a.absent_school_remark = #{absentSchoolRemark}</if>
|
||||
<if test="attendSchoolGps != null and attendSchoolGps != ''"> and a.attend_school_gps = #{attendSchoolGps}</if>
|
||||
<if test="attendSchoolTime != null "> and a.attend_school_time = #{attendSchoolTime}</if>
|
||||
<if test="status != null and status != ''"> and a.status = #{status}</if>
|
||||
<if test="surveyId != null "> and a.survey_id = #{surveyId}</if>
|
||||
<if test="tNo != null "> and c.employee_id = #{tNo}</if>
|
||||
<if test="leaveStatus != null "> and a.leave_status = #{leaveStatus}</if>
|
||||
<if test="surveyName != null and surveyName != ''"> and d.survey_name like concat('%', #{surveyName}, '%')</if>
|
||||
<if test="className != null and className != ''"> and b.class_name like concat('%', #{className}, '%')</if>
|
||||
<if test="moreDeptName != null and moreDeptName != ''"> and a.more_dept_name like concat('%', #{moreDeptName}, '%')</if>
|
||||
<if test="willLeaveTime != null">
|
||||
and date(a.will_leave_time) = date(#{willLeaveTime})
|
||||
</if>
|
||||
</where>
|
||||
order by a.return_school_id desc
|
||||
</select>
|
||||
|
||||
<select id="listReturnRes" parameterType="Long" resultType="ReturnRes">
|
||||
select res1.*,( res1.yingfanxiao - res1.yifanxiao ) as weifanxiao,
|
||||
(
|
||||
select count(1) from sur_itinerary as a
|
||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||
where a.absent_school_type = "路上" and a.survey_id = #{surveyId} and b.dept_name = res1.dept_name and b.grade_name = res1.grade_name
|
||||
) as lushang,
|
||||
(
|
||||
select count(1) from sur_itinerary as a
|
||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||
where a.absent_school_type = "病假" and a.survey_id = #{surveyId} and b.dept_name = res1.dept_name and b.grade_name = res1.grade_name
|
||||
) as bingjia,
|
||||
(
|
||||
select count(1) from sur_itinerary as a
|
||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||
where a.absent_school_type = "无票" and a.survey_id = #{surveyId} and b.dept_name = res1.dept_name and b.grade_name = res1.grade_name
|
||||
) as wupiao,
|
||||
(
|
||||
select count(1) from sur_itinerary as a
|
||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||
where a.absent_school_type = "无课请事假延长" and a.survey_id = #{surveyId} and b.dept_name = res1.dept_name and b.grade_name = res1.grade_name
|
||||
) as wuke,
|
||||
(
|
||||
select count(1) from sur_itinerary as a
|
||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||
where a.absent_school_type = "事假" and a.survey_id = #{surveyId} and b.dept_name = res1.dept_name and b.grade_name = res1.grade_name
|
||||
) as shijia,
|
||||
(
|
||||
select count(1) from sur_itinerary as a
|
||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||
where a.absent_school_type = "红白事" and a.survey_id = #{surveyId} and b.dept_name = res1.dept_name and b.grade_name = res1.grade_name
|
||||
) as hongbaishi,
|
||||
(
|
||||
select count(1) from sur_itinerary as a
|
||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||
where a.absent_school_type = "考试" and a.survey_id = #{surveyId} and b.dept_name = res1.dept_name and b.grade_name = res1.grade_name
|
||||
) as kaoshi,
|
||||
(
|
||||
select count(1) from sur_itinerary as a
|
||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||
where a.absent_school_type = "参赛" and a.survey_id = #{surveyId} and b.dept_name = res1.dept_name and b.grade_name = res1.grade_name
|
||||
) as cansai,
|
||||
(
|
||||
select count(1) from sur_itinerary as a
|
||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||
where a.absent_school_type = "兵检或役前训练" and a.survey_id = #{surveyId} and b.dept_name = res1.dept_name and b.grade_name = res1.grade_name
|
||||
) as bingjian,
|
||||
(
|
||||
select count(1) from sur_itinerary as a
|
||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||
where a.absent_school_type = "退学或休学" and a.survey_id = #{surveyId} and b.dept_name = res1.dept_name and b.grade_name = res1.grade_name
|
||||
) as tuixue
|
||||
|
||||
from
|
||||
(
|
||||
select r1.*,
|
||||
(select count(1) from sur_itinerary as tt1
|
||||
left join view_stu_info as tt2 on tt1.stu_no = tt2.stu_no
|
||||
where tt1.`status` = "2" and tt1.reach_school_status = "是" and tt1.survey_id = #{surveyId} and tt2.dept_name = r1.dept_name and tt2.grade_name = r1.grade_name
|
||||
) as yifanxiao
|
||||
from
|
||||
(
|
||||
select a.dept_name,a.grade_name,count(1) as stu_num,
|
||||
(select count(1) from view_stu_info as tt1 where tt1.`status` = "05" and tt1.dept_name = a.dept_name and tt1.grade_name = a.grade_name ) as shixi,
|
||||
(select count(1) from srs_dormitory_student as tt1
|
||||
left join view_stu_info as tt2 on tt1.stu_no = tt2.stu_no
|
||||
where tt2.`status` = "01" and tt2.dept_name = a.dept_name and tt2.grade_name = a.grade_name ) as yingfanxiao
|
||||
from view_stu_info as a
|
||||
left join srs_grade as b on a.grade_id = b.grade_id
|
||||
where b.grade_status in (1,3) and a.dept_name is not null and a.`status` = "01"
|
||||
GROUP BY a.dept_name,a.grade_name
|
||||
order by a.dept_name,a.grade_name
|
||||
) as r1
|
||||
) as res1
|
||||
</select>
|
||||
|
||||
<select id="listLeaveRes" parameterType="Long" resultType="LeaveRes">
|
||||
select a.dept_name,count(1) as stu_num,
|
||||
(select count(1)
|
||||
from sur_itinerary as t1
|
||||
left join view_stu_info as t2 on t1.stu_no = t2.stu_no
|
||||
where t1.is_home = "是" and t2.dept_name = a.dept_name and t1.survey_id = #{surveyId}
|
||||
) as home_num,
|
||||
(select count(1)
|
||||
from sur_itinerary as t1
|
||||
left join view_stu_info as t2 on t1.stu_no = t2.stu_no
|
||||
where t1.is_leave = "0" and t2.dept_name = a.dept_name and t1.survey_id = #{surveyId}
|
||||
) as stay_num,
|
||||
(select count(1)
|
||||
from sur_itinerary as t1
|
||||
left join view_stu_info as t2 on t1.stu_no = t2.stu_no
|
||||
where t1.`status` = "2" and t1.reach_school_status = "是" and t2.dept_name = a.dept_name and t1.survey_id = #{surveyId}
|
||||
) as school_num
|
||||
from view_stu_info as a
|
||||
left join srs_grade as b on a.grade_id = b.grade_id
|
||||
where b.grade_status in (1,3) and a.`status` = "01" and a.dept_name is not null
|
||||
group by a.dept_name
|
||||
</select>
|
||||
|
||||
<select id="listSubmitRes" parameterType="Long" resultType="map">
|
||||
WITH base_dept AS (
|
||||
SELECT
|
||||
f1.dept_name
|
||||
FROM view_stu_info AS f1
|
||||
LEFT JOIN srs_grade AS f2 ON f1.grade_id = f2.grade_id
|
||||
WHERE f1.status IN ('01','05','06') AND f2.grade_status IN (1,3)
|
||||
GROUP BY f1.dept_name
|
||||
),
|
||||
stu_stat AS (
|
||||
SELECT
|
||||
a.dept_name,
|
||||
COUNT(*) AS stu_num
|
||||
FROM view_stu_info a
|
||||
LEFT JOIN srs_grade b ON a.grade_id = b.grade_id
|
||||
WHERE b.grade_status IN (1,3) AND a.status IN ('01','05','06')
|
||||
GROUP BY a.dept_name
|
||||
),
|
||||
itinerary_stat AS (
|
||||
SELECT
|
||||
SUBSTRING_INDEX(a.more_dept_name, '(', 1) AS dept_name,
|
||||
a.more_dept_name,
|
||||
COUNT(*) AS submit_num,
|
||||
SUM(a.is_home = '是') AS home_num,
|
||||
SUM(a.is_leave = 0) AS stay_num
|
||||
FROM sur_itinerary a
|
||||
WHERE a.survey_id = #{surveyId}
|
||||
GROUP BY dept_name, a.more_dept_name
|
||||
)
|
||||
SELECT
|
||||
bd.dept_name,
|
||||
COALESCE(its.submit_num, 0) AS submit_num,
|
||||
COALESCE(its.more_dept_name, bd.dept_name) AS more_dept_name,
|
||||
COALESCE(its.home_num, 0) AS home_num,
|
||||
COALESCE(its.stay_num, 0) AS stay_num,
|
||||
COALESCE(ss.stu_num, 0) AS stu_num
|
||||
FROM base_dept bd
|
||||
LEFT JOIN itinerary_stat its ON bd.dept_name = its.dept_name
|
||||
LEFT JOIN stu_stat ss ON bd.dept_name = ss.dept_name;
|
||||
</select>
|
||||
<select id="getItineraryStatistics" resultType="SurItineraryStatisticsVo">
|
||||
SELECT
|
||||
more_dept_name AS moreDeptName,
|
||||
SUM(CASE WHEN is_leave = '1' AND leave_status = '2' THEN 1 ELSE 0 END) AS expectedLeaveCount,
|
||||
SUM(CASE WHEN is_leave = '0' AND leave_status = '2' THEN 1 ELSE 0 END) AS stayCount,
|
||||
SUM(CASE WHEN is_home = '是' THEN 1 ELSE 0 END) AS homeCount,
|
||||
SUM(CASE WHEN status = '2' AND reach_school_status = '是' THEN 1 ELSE 0 END) AS returnCount
|
||||
FROM sur_itinerary
|
||||
WHERE survey_id = #{surveyId}
|
||||
GROUP BY more_dept_name
|
||||
</select>
|
||||
|
||||
|
||||
<select id="listReturnRes1" parameterType="Long" resultType="map">
|
||||
WITH base_dept AS (
|
||||
SELECT
|
||||
f1.dept_name
|
||||
FROM view_stu_info AS f1
|
||||
LEFT JOIN srs_grade AS f2 ON f1.grade_id = f2.grade_id
|
||||
WHERE f1.status IN ('01','05','06') AND f2.grade_status IN (1,3)
|
||||
GROUP BY f1.dept_name
|
||||
),
|
||||
stu_stat AS (
|
||||
SELECT
|
||||
a.dept_name,
|
||||
COUNT(*) AS stu_num,
|
||||
SUM(a.status = '05') AS shixi,
|
||||
SUM(a.status in ('01','06')) AS yingfanxiao
|
||||
FROM view_stu_info a
|
||||
LEFT JOIN srs_grade b ON a.grade_id = b.grade_id
|
||||
WHERE b.grade_status IN (1,3) AND a.status IN ('01','05','06')
|
||||
GROUP BY a.dept_name
|
||||
),
|
||||
itinerary_stat AS (
|
||||
SELECT
|
||||
SUBSTRING_INDEX(a.more_dept_name, '(', 1) AS dept_name,
|
||||
a.more_dept_name,
|
||||
COUNT(*) AS submit_num,
|
||||
SUM(a.status = '2' AND a.reach_school_status = '是') AS yifanxiao,
|
||||
SUM(a.absent_school_type = '路上') AS lushang,
|
||||
SUM(a.absent_school_type = '病假') AS bingjia,
|
||||
SUM(a.absent_school_type = '无票') AS wupiao,
|
||||
SUM(a.absent_school_type = '无课请事假延长') AS wuke,
|
||||
SUM(a.absent_school_type = '事假') AS shijia,
|
||||
SUM(a.absent_school_type = '红白事') AS hongbaishi,
|
||||
SUM(a.absent_school_type = '考试') AS kaoshi,
|
||||
SUM(a.absent_school_type = '参赛') AS cansai,
|
||||
SUM(a.absent_school_type = '兵检或役前训练') AS bingjian,
|
||||
SUM(a.absent_school_type = '退学或休学') AS tuixue
|
||||
FROM sur_itinerary a
|
||||
WHERE a.survey_id = #{surveyId}
|
||||
GROUP BY dept_name, a.more_dept_name
|
||||
)
|
||||
SELECT
|
||||
bd.dept_name,
|
||||
COALESCE(its.more_dept_name, bd.dept_name) AS more_dept_name,
|
||||
COALESCE(its.submit_num, 0) AS submit_num,
|
||||
COALESCE(ss.stu_num, 0) AS stu_num,
|
||||
COALESCE(ss.shixi, 0) AS shixi,
|
||||
COALESCE(ss.yingfanxiao, 0) AS yingfanxiao,
|
||||
COALESCE(its.yifanxiao, 0) AS yifanxiao,
|
||||
COALESCE(ss.yingfanxiao - its.yifanxiao, 0) AS weifanxiao,
|
||||
COALESCE(its.lushang, 0) AS lushang,
|
||||
COALESCE(its.bingjia, 0) AS bingjia,
|
||||
COALESCE(its.wupiao, 0) AS wupiao,
|
||||
COALESCE(its.wuke, 0) AS wuke,
|
||||
COALESCE(its.shijia, 0) AS shijia,
|
||||
COALESCE(its.hongbaishi, 0) AS hongbaishi,
|
||||
COALESCE(its.kaoshi, 0) AS kaoshi,
|
||||
COALESCE(its.cansai, 0) AS cansai,
|
||||
COALESCE(its.bingjian, 0) AS bingjian,
|
||||
COALESCE(its.tuixue, 0) AS tuixue
|
||||
FROM base_dept bd
|
||||
LEFT JOIN stu_stat ss ON bd.dept_name = ss.dept_name
|
||||
LEFT JOIN itinerary_stat its ON bd.dept_name = its.dept_name;
|
||||
</select>
|
||||
|
||||
<select id="countWillLeave" parameterType="Long" resultType="map">
|
||||
CALL test_survey_dept_leave_statistics(#{surveyId});
|
||||
</select>
|
||||
|
||||
<select id="countFdyClassWillLeave" statementType="CALLABLE" resultType="map">
|
||||
CALL test_survey_class_leave_statistics(#{surveyId}, #{fdyNo});
|
||||
</select>
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.srs.survey.mapper.SurSurveyMapper">
|
||||
|
||||
<resultMap type="SurSurvey" id="SurSurveyResult">
|
||||
<result property="surveyId" column="survey_id" />
|
||||
<result property="surveyName" column="survey_name" />
|
||||
<result property="countDate" column="count_date" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="cutoffTime" column="cutoff_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurSurveyVo">
|
||||
select survey_id,count_date, survey_name, create_by, create_time, cutoff_time, remark, status from sur_survey
|
||||
</sql>
|
||||
|
||||
<select id="selectSurSurveyList" parameterType="SurSurvey" resultMap="SurSurveyResult">
|
||||
<include refid="selectSurSurveyVo"/>
|
||||
<where>
|
||||
<if test="surveyName != null and surveyName != ''"> and survey_name like concat('%', #{surveyName}, '%')</if>
|
||||
<if test="cutoffTime != null "> and cutoff_time = #{cutoffTime}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
order by survey_id desc
|
||||
</select>
|
||||
|
||||
<select id="selectSurSurveyBySurveyId" parameterType="Long" resultMap="SurSurveyResult">
|
||||
<include refid="selectSurSurveyVo"/>
|
||||
where survey_id = #{surveyId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSurSurvey" parameterType="SurSurvey" useGeneratedKeys="true" keyProperty="surveyId">
|
||||
insert into sur_survey
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="surveyName != null">survey_name,</if>
|
||||
<if test="countDate != null">count_date,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="cutoffTime != null">cutoff_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="surveyName != null">#{surveyName},</if>
|
||||
<if test="countDate != null">#{countDate},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="cutoffTime != null">#{cutoffTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSurSurvey" parameterType="SurSurvey">
|
||||
update sur_survey
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="surveyName != null">survey_name = #{surveyName},</if>
|
||||
<if test="countDate != null">count_date = #{countDate},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="cutoffTime != null">cutoff_time = #{cutoffTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where survey_id = #{surveyId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSurSurveyBySurveyId" parameterType="Long">
|
||||
delete from sur_survey where survey_id = #{surveyId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurSurveyBySurveyIds" parameterType="String">
|
||||
delete from sur_survey where survey_id in
|
||||
<foreach item="surveyId" collection="array" open="(" separator="," close=")">
|
||||
#{surveyId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user