Commit bb8d2878 authored by 曹志's avatar 曹志

spacetech-service-growth

parent b81c7945
......@@ -11,5 +11,122 @@
<artifactId>spacetech-service-growth</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
\ No newline at end of file
<dependencies>
<!--nacos服务发现-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!--nacos注册中心-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!--dubbo-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-dubbo</artifactId>
</dependency>
<!-- zookeeper client dependency -->
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<exclusions>
<exclusion>
<artifactId>zookeeper</artifactId>
<groupId>org.apache.zookeeper</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- zookeeper client dependency -->
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.4.6</version>
<!--排除这个slf4j-log4j12-->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--mysql驱动-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!--druid连接池-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.10</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.spacetech</groupId>
<artifactId>spacetech-common-utils</artifactId>
<version>1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<artifactId>zookeeper</artifactId>
<groupId>org.apache.zookeeper</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>-->
<dependency>
<groupId>com.spacetech</groupId>
<artifactId>spacetech-gateway</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
<!--lombok-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.10.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
package com.spacetech;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@SpringBootApplication
@EnableDiscoveryClient
public class GrowthApplication {
public static void main(String[] args) {
SpringApplication.run(GrowthApplication.class, args);
}
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.BmiRules;
public interface BmiRulesDao extends CrudRepository<BmiRules, String> {
@Query(value = " SELECT * FROM bmi_rules WHERE campusid = ?1 ", nativeQuery = true)
List<BmiRules> listRuleByCampusid(Long campusid);
@Query(value = " SELECT * FROM bmi_rules WHERE campusid = ?1 AND age = ?2 AND sex = ?3", nativeQuery = true)
List<BmiRules> listRuleByAgeAndSex(Long campusid, Integer age, Integer sex);
@Query(value = " SELECT * FROM bmi_rules WHERE campusid = ?1 AND type = ?2 AND age = ?3 AND sex = ?4 ORDER BY type,orderid,sex,age ", nativeQuery = true)
List<BmiRules> listBmiByAgeAndSex(Long campusid, String type, Integer age, String sex);
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.FinalIndex;
public interface FinalIndexDao extends CrudRepository<FinalIndex, String> {
/*-----------------------------DELETE---------------------------*/
@Modifying
@Query(value = "DELETE FROM `final_index` WHERE termcode = ?1 AND gradeid = ?2 AND campusid = ?3", nativeQuery = true)
void deleteAllByCampusidAndTermcodeAndGradeid(String termcode, Long gradeid, Long campusid);
@Modifying
@Query(value = "DELETE FROM `final_index` WHERE id in ?1", nativeQuery = true)
void deleteByid(List<String> ids);
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT COUNT(*) FROM final_index WHERE gradeid = ?1 AND termcode = ?2 AND campusid = ?3 AND type = ?4 ", nativeQuery = true)
BigInteger countByGradeid(Long targetGradeid, String termcode, Long campusid, String type);
@Query(value = "SELECT * FROM final_index WHERE gradeid = ?1 AND termcode = ?2 AND campusid = ?3 AND type = ?4 ORDER BY orderid, create_time ,id", nativeQuery = true)
List<FinalIndex> listGrowthFinalIndexMsg(Long gradeid, String termcode, Long campusid, String type);
@Query(value = " SELECT fi.* FROM final_index fi " + " INNER JOIN `growth_index_config` gic ON fi.id = gic.indexid "
+ " WHERE gic.record_configid = '0' AND gic.phase_num = 0 AND gic.campusid = ?1 AND gic.growthid = ?2 ORDER BY fi.orderid ", nativeQuery = true)
List<FinalIndex> listByGrowthid(Long campusid, String growthid);
@Query(value = " SELECT fi.id,fi.title,orderid,content,parentid,gi.index_levelid,gi.id AS growthIndexId FROM final_index fi "
+ " INNER JOIN growth_index_config gic ON fi.termcode = gic.termcode AND fi.gradeid = gic.gradeid AND gic.indexid = fi.id "
+ " LEFT JOIN growth_index gi ON gi.growthid = gic.growthid AND gi.indexid = fi.id AND gi.growthid = ?1 AND gi.stuid = ?2 AND gi.recordid IS NULL AND gi.phase_num = 0 "
+ " WHERE gic.gradeid = ?3 AND gic.termcode = ?4 AND gic.growthid = ?1 AND gic.record_configid = '0' AND gic.phase_num = 0 AND fi.type = ?5 ORDER BY orderid,fi.id ", nativeQuery = true)
List<Object[]> listByStuid(String growthid, Long stuid, Long gradeid, String termcode, String type);
@Query(value = "SELECT * FROM final_index WHERE id IN ?1 ", nativeQuery = true)
List<FinalIndex> listByIds(List<String> ids);
@Query(value = "SELECT * FROM final_index WHERE campusid = ?1 AND gradeid = ?2 AND termcode = ?3 ORDER BY orderid", nativeQuery = true)
List<FinalIndex> listByGradeidAndTermCode(Long campusid, Long gradeid, String termcode);
/*-----------------------------UPDATE-------------------------- */
@Modifying
@Query(value = "UPDATE `final_index` SET title = ?1,content = ?2 WHERE id = ?3", nativeQuery = true)
void updateById(String title, String content, String id);
@Query(value = " SELECT * FROM final_index WHERE campusid = ?1 ", nativeQuery = true)
List<FinalIndex> listByCampusid(Long campusid);
@Modifying
@Query(value = " DELETE FROM final_index WHERE campusid = ?1 AND gradeid IN ?2 ", nativeQuery = true)
void deleteByGradeids(Long campusid, List<Long> gradeids);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthBirthday;
public interface GrowthBirthdayDao extends
CrudRepository<GrowthBirthday, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = " SELECT * FROM growth_birthday t WHERE growthid = ?1 AND stuid = ?2 AND permission IN ?3 AND campusid = ?4 ORDER BY permission LIMIT 2 ", nativeQuery = true)
List<GrowthBirthday> findByGrowthidAndStuid(String growthid, Long stuid,
List<Integer> permission, Long campusid);
@Query(value = " SELECT * FROM growth_birthday t WHERE growthid = ?1 AND stuid IN ?2 AND permission = ?3 AND campusid = ?4 ORDER BY permission ", nativeQuery = true)
List<GrowthBirthday> findByGrowthidAndStuids(String growthid, List<Long> stuids,
Integer permission, Long campusid);
@Query(value = " SELECT stuid,COUNT(id) FROM `growth_birthday` WHERE growthid = ?1 AND campusid = ?2 AND permission = ?3 AND stuid IN ?4 GROUP BY stuid", nativeQuery = true)
List<Object[]> listStusBirthdayCountByGrowthidAndPermission(
String growthid, Long campusid, Integer permission,
List<Long> stuidList);
@Query(value = " SELECT id FROM growth_birthday t WHERE campusid = ?1 AND growthid = ?2 AND stuid = ?3 ORDER BY create_time DESC LIMIT ?4 ", nativeQuery = true)
List<String> listByStuid(Long campusid, String growthid, Long stuid, Integer limit);
/*-----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthClass;
public interface GrowthClassDao extends CrudRepository<GrowthClass, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = " SELECT gt.* FROM growth_class gt "
+ " INNER JOIN growth_stu gs ON gs.classid = gt.classid AND gs.growthid = gt.growthid "
+ " WHERE gt.growthid = ?1 AND gs.stuid = ?2 AND gs.campusid = ?3 LIMIT 1 ",nativeQuery = true)
GrowthClass findByGrowthidAndStuid(String growthid, Long stuid, Long campusid);
@Query(value = "SELECT * FROM `growth_class` WHERE campusid = ?1 AND classid = ?2 AND growthid = ?3 ORDER BY create_time DESC LIMIT 1 ",nativeQuery = true)
GrowthClass findByGrowthidAndClassid(Long campusid, Long classid, String growthid);
/*-----------------------------UPDATE-------------------------- */
@Modifying
@Query(value = "UPDATE `growth_class` SET picpath = ?2, content = ?3 WHERE id = ?1",nativeQuery = true)
void updateByid(String id, String picpath, String content);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthClasscircle;
public interface GrowthClasscircleDao extends CrudRepository<GrowthClasscircle, String> {
@Query(value = "SELECT * FROM `growth_classcircle` WHERE growthid = ?1 AND stuid = ?2 AND campusid = ?3 ORDER BY create_time", nativeQuery = true)
List<GrowthClasscircle> listByGrowthidAndStuid(String growthid, Long stuid, Long campusid);
@Query(value = "SELECT cl.wlzyid FROM growth_classcircle cl INNER JOIN growth gr ON cl.growthid = gr.id "
+ "WHERE cl.stuid = ?1 AND gr.campusid = ?2 AND gr.termcode = ?3 AND gradeid = ?4", nativeQuery = true)
List<Object> listWlzyidBysuid(Long stuid, Long campusid, String termcode, Long gradeid);
@Query(value = "SELECT cl.content,pi.picpath,cl.wlzyid FROM growth_classcircle cl INNER JOIN growth_picture pi ON cl.id = pi.dataid "
+ "INNER JOIN growth gr ON pi.growthid = gr.id "
+ "WHERE cl.stuid = ?1 AND cl.campusid = ?2 AND gr.termcode = ?3 AND gr.gradeid = ?4 ORDER BY cl.create_time", nativeQuery = true)
List<Object[]> listByStuidAndTermcode(Long stuid, Long campusid, String termcode, Long gradeid);
@Query(value = "SELECT * FROM `growth_classcircle` WHERE growthid = ?1 AND stuid = ?2 AND wlzyid = ?3 AND campusid = ?4 LIMIT 1", nativeQuery = true)
GrowthClasscircle findByGrowthidAndStuid(String growthid, Long stuid, String wlzyid, Long campusid);
@Query(value = "SELECT DISTINCT wlzyid FROM `growth_classcircle` WHERE growthid = ?1 AND stuid = ?2 AND wlzyid IN ?3 AND campusid = ?4 LIMIT 1", nativeQuery = true)
List<Object> listByWlzyids(String growthid, Long stuid, List<String> wlzyid, Long campusid);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthCommonModule;
public interface GrowthCommonModuleDao extends CrudRepository<GrowthCommonModule, String> {
@Modifying
@Query(value = "DELETE FROM `growth_common_module` WHERE campusid = ?1 AND growthid = ?2 AND moduleid = ?3 AND phase_num = ?4 AND stuid IN ?5 ", nativeQuery = true)
void deleteByModuleidAndStuid(Long campusid, String growthid, String moduleid, Integer phaseNum,
List<Long> stuid);
@Query(value = "SELECT * FROM `growth_common_module` WHERE campusid = ?1 AND growthid = ?2 AND moduleid = ?3 AND phase_num = ?4 AND stuid = ?5 LIMIT 1", nativeQuery = true)
GrowthCommonModule getByModuleidAndStuid(Long campusid, String growthid, String moduleid, Integer phaseNum,
Long stuid);
@Query(value = "SELECT * FROM `growth_common_module` WHERE campusid = ?1 AND growthid = ?2 AND moduleid = ?3 AND phase_num = ?4 AND classid = ?5 LIMIT 1", nativeQuery = true)
GrowthCommonModule getByModuleidAndClassid(Long campusid, String growthid, String moduleid, Integer phaseNum,
Long classid);
@Query(value = "SELECT * FROM `growth_common_module` WHERE campusid = ?1 AND growthid = ?2 AND moduleid = ?3 AND stuid = ?4 ORDER BY phase_num", nativeQuery = true)
List<GrowthCommonModule> listByModuleidAndStuid(Long campusid, String growthid, String moduleid, Long stuid);
@Query(value = "SELECT * FROM `growth_common_module` WHERE campusid = ?1 AND growthid = ?2 AND moduleid = ?3 AND classid = ?4 ORDER BY phase_num", nativeQuery = true)
List<GrowthCommonModule> listByModuleidAndClassid(Long campusid, String growthid, String moduleid, Long classid);
@Query(value = "SELECT * FROM `growth_common_module` WHERE campusid = ?1 AND growthid = ?2 AND moduleid = ?3 AND phase_num = ?4 AND stuid IN ?5 ", nativeQuery = true)
List<GrowthCommonModule> listByModuleidAndStuids(Long campusid, String growthid, String moduleid, Integer phaseNum,
List<Long> stuids);
@Query(value = "SELECT id FROM `growth_common_module` WHERE campusid = ?1 AND growthid = ?2 AND stuid = ?3 ORDER BY create_time DESC LIMIT ?4 ", nativeQuery = true)
List<String> listByStuid(Long campusid, String growthid, Long stuid, Integer limit);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthDaily;
public interface GrowthDailyDao extends CrudRepository<GrowthDaily, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT * FROM growth_daily WHERE growthid = ?1 AND stuid = ?2 ORDER BY create_time DESC ", nativeQuery = true)
List<GrowthDaily> listDaily(String growthid, Long stuid);
/*-----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.Growth;
public interface GrowthDao extends CrudRepository<Growth, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT DISTINCT g.id,g.gradeid,g.grade_name,g.is_lock,g.title growthTitle,ga.title scene_title,ga.picpath scene_pic," +
" gb.title style_title,gb.picpath style_pic, g.style_code FROM growth g " +
" INNER JOIN growth_layout ga ON g.scene_code = ga.code AND ga.type = 'SCENE' AND ga.xx_type = ?3 " +
" INNER JOIN growth_layout gb ON g.style_code = gb.code AND gb.type = 'STYLE' AND gb.xx_type = ?3 " +
" WHERE g.campusid = ?1 AND termcode = ?2", nativeQuery = true)
List<Object[]> listGrowth(Long campusid, String termcode, Integer xxType);
@Query(value = "SELECT 1 FROM growth_birthday WHERE growthid = ?1 LIMIT 1 UNION "
+ "SELECT 1 FROM growth_class WHERE growthid = ?1 LIMIT 1 UNION "
+ "SELECT 1 FROM growth_daily WHERE growthid = ?1 LIMIT 1 UNION "
+ "SELECT 1 FROM growth_family WHERE growthid = ?1 LIMIT 1 UNION "
+ "SELECT 1 FROM growth_final_comment WHERE growthid = ?1 LIMIT 1 UNION "
+ "SELECT 1 FROM growth_health WHERE growthid = ?1 LIMIT 1 UNION "
+ "SELECT 1 FROM growth_holiday WHERE growthid = ?1 LIMIT 1 UNION "
+ "SELECT 1 FROM growth_memory WHERE growthid = ?1 LIMIT 1 UNION "
+ "SELECT 1 FROM growth_record WHERE growthid = ?1 LIMIT 1 UNION "
+ "SELECT 1 FROM growth_stu WHERE growthid = ?1 LIMIT 1 UNION "
+ "SELECT 1 FROM growth_teacher WHERE growthid = ?1 LIMIT 1 ", nativeQuery = true)
List<Object[]> listRelatedData(String growthid);
@Query(value = " SELECT * FROM growth WHERE termcode = ?1 AND gradeid = ?2 AND campusid = ?3 LIMIT 1", nativeQuery = true)
Growth findByTermcodeAndClassid(String termcode, Long gradeid, Long campusid);
@Query(value = "SELECT g.id,g.title,gl.picpath,g.termcode,g.gradeid, g.style_code FROM growth g INNER JOIN growth_layout gl "
+ "ON g.style_code = gl.code AND gl.type = 'STYLE' WHERE g.campusid = ?1 ORDER BY g.termcode DESC,g.gradeid ", nativeQuery = true)
List<Object[]> listByTerm(Long campusid);
@Query(value = " SELECT DISTINCT g.id,g.title,scene.picpath AS scene,style.picpath AS style,g.termcode FROM growth g "
+ " INNER JOIN growth_stu gs ON gs.growthid = g.id "
+ " INNER JOIN growth_layout scene ON scene.`code` = g.scene_code AND scene.type = 'SCENE' "
+ " INNER JOIN growth_layout style ON style.`code` = g.scene_code AND style.type = 'STYLE' "
+ " WHERE gs.stuid = ?1 AND gs.campusid = ?2 ORDER BY g.termcode DESC LIMIT ?3, ?4 ", nativeQuery = true)
List<Object[]> listByStuid(Long stuid, Long campusid, Integer startNum, Integer pageSize);
/*-----------------------------UPDATE-------------------------- */
@Modifying
@Query(value = "UPDATE growth SET is_lock = ?1 WHERE id = ?2", nativeQuery = true)
void updateLock(Integer isLock, String id);
@Modifying
@Query(value = "UPDATE growth SET icon_type = ?1 WHERE id = ?2 AND campusid = ?3", nativeQuery = true)
void updateIconTypeByGrowthidAndCampusid(String iconType, String growthid, Long campusid);
@Query(value = " SELECT * from growth WHERE campusid = ?1 AND termcode = ?2 ", nativeQuery = true)
List<Growth> listGrowthByTermcode(Long campusid, String termcode);
@Query(value = " SELECT * FROM growth WHERE campusid = ?1 AND gradeid IN ?2 ", nativeQuery = true)
List<Growth> listByGradeids(Long campusid, List<Long> gradeids);
@Modifying
@Query(value = " DELETE FROM growth WHERE campusid = ?1 AND id IN ?2 ", nativeQuery = true)
void deleteByGrowthids(Long campusid, List<String> growthids);
@Query(value = " SELECT * FROM growth WHERE campusid = ?1 LIMIT 1", nativeQuery = true)
Growth findByTemplateCampusid(Long campusid);
@Query(value = " SELECT * FROM growth WHERE campusid = ?1 AND gradeid = ?2 AND termcode = ?3 LIMIT 1 ", nativeQuery = true)
Growth findByTermcodeAndGradeid(Long campusid, Long gradeid, String termcode);
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.Date;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthDownload;
public interface GrowthDownloadDao extends
CrudRepository<GrowthDownload, String> {
@Query(value = " SELECT COUNT( *) FROM growth_download WHERE campusid = ?1 "
+ " AND classid = ?2 AND stuid IN ?3 AND style = ?4 AND growthid = ?5 ", nativeQuery = true)
BigInteger countByClassidAndStuid(Long campusid, Long classid,
List<Long> stuids, String style, String growthid);
@Query(value = " SELECT * FROM growth_download WHERE campusid = ?1 "
+ " AND classid = ?2 AND stuid IN ?3 AND style = ?4 AND growthid = ?5 ", nativeQuery = true)
List<GrowthDownload> listStuidByClassidAndStuid(Long campusid,
Long classid, List<Long> stuids, String style, String growthid);
@Query(value = " SELECT * FROM growth_download WHERE campusid = ?1 "
+ " AND classid IN ?2 AND stu_name LIKE ?3 AND style = ?4 AND growthid = ?5 ORDER BY stuid,download_time ", nativeQuery = true)
List<GrowthDownload> listStuidByClassidAndStuid(Long campusid,
List<Long> classidList, String stuName, String style, String growthid);
@Query(value = " SELECT state,count(*) FROM growth_download WHERE campusid = ?1 "
+ " AND classid IN ?2 AND style = ?3 AND growthid = ?4 group by state", nativeQuery = true)
List<Object[]> countByGorwthid(Long campusid, List<Long> classidList, String style, String growthid);
@Query(value = " SELECT * FROM growth_download WHERE campusid = ?1 "
+ " AND classid IN ?2 AND stu_name LIKE ?3 AND style = ?4 AND growthid = ?5 AND state IN ?6", nativeQuery = true)
List<GrowthDownload> listStuidByClassidAndStuid(Long campusid,
List<Long> classidList, String stuName, String style, String growthid, List<String> stateList);
@Query(value = " SELECT * FROM growth_download WHERE campusid = ?1 "
+ " AND classid = ?2 AND stuid IN ?3 AND style = ?4 AND growthid = ?5 ORDER BY create_time,stuid LIMIT ?6,?7 ", nativeQuery = true)
List<GrowthDownload> listByClassidAndStuid(Long campusid, Long classid,
List<Long> stuids, String style, String growthid, int start,
Integer pageSize);
@Query(value = " SELECT * FROM growth_download WHERE campusid = ?1 "
+ " AND classid IN ?2 AND style = ?3 AND growthid = ?4 AND stuid IN ?5 ", nativeQuery = true)
List<GrowthDownload> listByGrowthidAndStuid(Long campusid, List<Long> classidList,
String style, String growthid, List<Long> stuids);
@Query(value = " SELECT * FROM growth_download WHERE campusid = ?1 "
+ " AND classid = ?2 AND growthid = ?3 AND stuid = ?4 AND style = ?5 LIMIT 1 ", nativeQuery = true)
GrowthDownload findOneByStuidAndStyle(Long campusid, Long classid,
String growthid, Long stuid, String style);
@Query(value = " SELECT COUNT(*) FROM growth_download WHERE campusid = ?1 "
+ " AND state = ?2 ", nativeQuery = true)
BigInteger countByState(Long campusid, String state);
@Modifying
@Query(value = "UPDATE growth_download SET state = ?1,msg=?2,download_time=?3,url=?5,end_time=?6 WHERE id = ?4", nativeQuery = true)
void updateScreenshot(String state, String msg, Date screenFinshTime, String id, String url, Date endTime);
@Modifying
@Query(value = "UPDATE growth_download SET state = ?1,msg=?2,end_time=?3,url=?5 WHERE id = ?4", nativeQuery = true)
void updateCut(String state, String msg, Date cutFinshTime, String id, String url);
@Query(value = " SELECT * FROM growth_download WHERE TIMESTAMPDIFF(DAY, create_time,NOW())>=?1 ORDER BY create_time ", nativeQuery = true)
List<GrowthDownload> listByDaysBefore(int days);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthDownloadPage;
public interface GrowthDownloadPageDao extends CrudRepository<GrowthDownloadPage, String> {
@Query(value = " SELECT * FROM growth_download_page WHERE campusid = ?1 "
+ " AND downloadid = ?2 ", nativeQuery = true)
List<GrowthDownloadPage> listByDownloadid(Long campusid, String downloadid);
}
package com.spacetech.dao;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthFamily;
public interface GrowthFamilyDao extends CrudRepository<GrowthFamily, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = " SELECT * FROM growth_family t WHERE growthid = ?1 AND stuid = ?2 AND campusid = ?3 LIMIT 1 ",nativeQuery = true)
GrowthFamily findByGrowthidAndStuid(String growthid, Long stuid, Long campusid);
@Query(value = " SELECT GROUP_CONCAT(CONCAT(family_picpath,',',father_picpath,',',mother_picpath) ORDER BY create_time DESC) " +
" FROM growth_family WHERE campusid = ?1 AND growthid = ?2 ", nativeQuery = true)
String findFamilyPicByGrowthid(Long campusid, String growthid);
/*-----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthFinalComment;
public interface GrowthFinalCommentDao extends CrudRepository<GrowthFinalComment, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT c.id,s.stuid,s.stu_name,c.teacher_comment "
+ "FROM growth_stu s LEFT JOIN growth_final_comment c ON s.stuid = c.stuid AND s.growthid = c.growthid "
+ "WHERE s.growthid = ?1 AND s.classid = ?2 AND s.stu_name LIKE ?3 LIMIT ?4,?5", nativeQuery = true)
List<Object[]> listStu(String growthid, Long classid, String stuName, Integer start, Integer pageSize);
@Query(value = "SELECT id,stuid,teacher_comment FROM growth_final_comment "
+ "WHERE growthid = ?1 AND classid = ?2", nativeQuery = true)
List<Object[]> listStu(String growthid, Long classid);
@Query(value = "SELECT COUNT(*) FROM growth_stu s LEFT JOIN growth_final_comment c "
+ "ON s.stuid = c.stuid AND s.growthid = c.growthid "
+ "WHERE s.growthid = ?1 AND s.classid = ?2 AND s.stu_name LIKE ?3", nativeQuery = true)
BigInteger countStu(String growthid, Long classid, String stuName);
@Query(value = "SELECT * FROM growth_final_comment s WHERE s.growthid = ?1 AND s.stuid = ?2 AND campusid = ?3 LIMIT 1 ", nativeQuery = true)
GrowthFinalComment findByStuid(String growthid, Long stuid, Long campusid);
@Query(value = "SELECT * FROM `growth_final_comment` WHERE growthid = ?1 AND classid = ?2 AND stuid IN ?3 AND campusid = ?4 ",nativeQuery = true)
List<GrowthFinalComment> listByStuids(String growthid, Long classid, List<Long> stuids, Long campusid);
@Query(value = "SELECT stuid,COUNT(id) FROM `growth_final_comment` WHERE stuid IN ?1 AND growthid = ?2 AND campusid = ?3 GROUP BY stuid",nativeQuery = true)
List<Object[]> listCountByStuid(List<Long> stuids, String growthid, Long campusid);
/*-----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthHealth;
public interface GrowthHealthDao extends CrudRepository<GrowthHealth, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT * FROM growth_health WHERE growthid=?1 and stuid IN ?2", nativeQuery = true)
List<GrowthHealth> findGrowthHealthByGrowthidAndStuids(String growthid,
List<Long> stuids);
@Query(value = "SELECT * FROM growth_health WHERE growthid=?1 and stuid = ?2 AND campusid = ?3 LIMIT 1 ", nativeQuery = true)
GrowthHealth findByGrowthidAndStuid(String growthid, Long stuid, Long campusid);
/*-----------------------------UPDATE-------------------------- */
@Modifying
@Query(value = "UPDATE `growth_health` SET height = ?2,weight=?3,left_sight=?4,right_sight=?5 WHERE id = ?1", nativeQuery = true)
void updateById(String id, Float height, Float weight, String leftSight,
String rightSight);
}
package com.spacetech.dao;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthHoliday;
public interface GrowthHolidayDao extends CrudRepository<GrowthHoliday, String>{
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT * FROM growth_holiday s WHERE s.growthid = ?1 AND s.stuid = ?2 AND campusid = ?3 LIMIT 1 ", nativeQuery = true)
GrowthHoliday findByStuid(String growthid, Long stuid, Long campusid);
/*-----------------------------UPDATE-------------------------- */
@Modifying
@Query(value = "UPDATE `growth_holiday` SET happy_thing = ?2,want_do = ?3,content = ?4 WHERE id = ?1",nativeQuery = true)
void updateByid(String id, String happyThing, String wantDo, String content);
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthIndexConfig;
public interface GrowthIndexConfigDao extends
CrudRepository<GrowthIndexConfig, String> {
/*-----------------------------count---------------------------*/
@Query(value = " SELECT COUNT(*) FROM growth_index_config WHERE indexid = ?1 ", nativeQuery = true)
BigInteger countByIndexid(String monthIndexid);
@Query(value = " SELECT COUNT(*) FROM growth_index_config WHERE indexid IN ?1 ", nativeQuery = true)
BigInteger countByIndexids(List<String> monthIndexids);
/*-----------------------------DELETE---------------------------*/
@Modifying
@Query(value = "DELETE FROM `growth_index_config` WHERE record_configid = ?1 AND growthid = ?2 AND phase_month = ?3 ", nativeQuery = true)
void deleteByRecordid(String recordid, String growthid, String month);
@Modifying
@Query(value = "DELETE FROM `growth_index_config` WHERE growthid = ?1 AND campusid = ?2 AND termcode = ?3 AND gradeid = ?4 AND type = ?5 ", nativeQuery = true)
void deleteByGrowthidAndGradeid(String growthid, Long campusid,
String termcode, Long gradeid, String type);
@Modifying
@Query(value = "DELETE FROM `growth_index_config` WHERE record_configidid = '0' AND phase_num = 0 AND campusid = ?1 AND termcode = ?2 "
+ " AND gradeid = ?3 AND growthid = ?4 ", nativeQuery = true)
void deleteFinal(Long campusid, String termcode, Long gradeid,
String growthid);
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT * FROM `growth_index_config` WHERE campusid = ?1 AND termcode = ?2 AND gradeid = ?3 AND type = ?4", nativeQuery = true)
List<GrowthIndexConfig> listByTermcodeAndGradeid(Long campusid,
String termcode, Long gradeid, String type);
@Query(value = " SELECT * FROM growth_index_config WHERE campusid = ?1 AND `type` IN ?2 ", nativeQuery = true)
List<GrowthIndexConfig> listByCampusidAndType(Long campusid, List<String> types);
@Modifying
@Query(value = " DELETE FROM growth_index_config WHERE campusid = ?1 AND growthid IN ?2 ", nativeQuery = true)
void deleteByGrowthids(Long campusid, List<String> growthids);
/*-----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthIndex;
public interface GrowthIndexDao extends CrudRepository<GrowthIndex, String> {
/*-----------------------------COUNT----------------------------*/
/*-----------------------------DELETE---------------------------*/
@Modifying
@Query(value = "DELETE FROM `growth_index` WHERE growthid = ?1 AND termcode = ?2 AND gradeid = ?3 AND stuid = ?4 AND phase_month = ?5 AND campusid = ?6 AND type = ?7", nativeQuery = true)
void deleteByGrowthidAndStuidAndPhaseNum(String growthid, String termcode, Long gradeid, Long stuid, String month,
Long campusid, String type);
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT * FROM `growth_index` WHERE growthid = ?1 AND stuid = ?2 AND phase_month = ?3 AND campusid = ?4 AND type = ?5 ORDER BY create_time", nativeQuery = true)
List<GrowthIndex> listByGrowthidAndPhaseNum(String growthid, Long stuid, String month, Long campusid, String type);
@Query(value = "SELECT gi.id,gi.indexid,gi.index_levelid,gi.stuid,fi.content FROM `growth_index` gi INNER JOIN final_index fi ON fi.id = gi.indexid "
+ " WHERE gi.growthid = ?1 AND gi.stuid = ?2 AND gi.phase_month = ?3 AND gi.campusid = ?4 AND gi.type = ?5 ORDER BY gi.create_time", nativeQuery = true)
List<Object[]> listByGrowthidAndPhaseNumAndStuid(String growthid, Long stuid, String month, Long campusid,
String type);
@Query(value = "SELECT stuid,COUNT(id) FROM `growth_index` WHERE growthid = ?1 AND campusid = ?2 AND termcode = ?3 AND gradeid = ?4 AND phase_month = ?5 AND stuid IN ?6 GROUP BY stuid", nativeQuery = true)
List<Object[]> listStusRecordCountByTermcodeAndGradeid(String growthid, Long campusid, String termcode,
Long gradeid, String phaseMonth, List<Long> stuidList);
@Query(value = "SELECT gi.id,gi.indexid,gi.index_levelid,gi.stuid,fi.content FROM `growth_index` gi INNER JOIN final_index fi ON fi.id = gi.indexid "
+ " WHERE gi.growthid = ?1 AND gi.indexid = ?2 AND gi.phase_month = ?3 AND gi.campusid = ?4 AND gi.type = ?5 AND gi.stuid IN ?6 ORDER BY gi.create_time", nativeQuery = true)
List<Object[]> listByGrowthidAndPhaseNumAndIndexid(String growthid, String indexid, String month, Long campusid,
String type, List<Long> stuid);
@Query(value = "SELECT stuid,count(1) FROM `growth_index` WHERE campusid = ?1 AND growthid = ?2 AND phase_num = ?3 AND type = ?4 AND stuid IN ?5 AND index_levelid <> '' GROUP BY stuid ", nativeQuery = true)
List<Object[]> countByGroupAndPhaseNum(Long campusid, String growthid, Integer phaseNum, String type,
List<Long> stuidList);
@Query(value = " SELECT * FROM growth_index WHERE campusid = ?1 AND growthid = ?2 AND type = ?3 AND index_levelid !='' AND stuid IN ?4", nativeQuery = true)
List<GrowthIndex> listByIndexidsAndStuids(Long campusid, String growthid, String type, List<Long> stuids);
/*-----------------------------UPDATE-------------------------- */
@Modifying
@Query(value = " DELETE FROM growth_index WHERE campusid = ?1 AND growthid IN ?2 ", nativeQuery = true)
void deleteByGrowthids(Long campusid, List<String> growthids);
@Query(value = " SELECT COUNT(1) FROM growth_index WHERE campusid = ?1 AND stuid IN ?2 AND growthid = ?3 AND `type` = ?4 ",nativeQuery = true)
BigInteger countByStuids(Long campusid, List<Long> stuids, String growthid, String indexType);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthLayout;
public interface GrowthLayoutDao extends CrudRepository<GrowthLayout, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT * FROM growth_layout gl WHERE gl.type = ?1 AND xx_type=?2 ORDER BY gl.orderid", nativeQuery = true)
List<GrowthLayout> listLayout(String type, int xxType);
@Query(value = "SELECT * FROM growth_layout WHERE xx_type = ?1 ORDER BY orderid", nativeQuery = true)
List<GrowthLayout> listLayout(String type);
@Query(value = "SELECT * FROM growth_layout gl WHERE gl.code = ?1 AND gl.type = ?2", nativeQuery = true)
GrowthLayout findByCodeAndType(String code, String type);
/*-----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthMemory;
public interface GrowthMemoryDao extends CrudRepository<GrowthMemory, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT * FROM growth_memory s WHERE s.growthid = ?1 AND s.stuid = ?2 AND campusid = ?3 LIMIT 1 ", nativeQuery = true)
GrowthMemory findByStuid(String growthid, Long stuid, Long campusid);
/*-----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthModule;
public interface GrowthModuleDao extends CrudRepository<GrowthModule, String> {
/*-----------------------------DELETE---------------------------*/
@Modifying
@Query(value = "DELETE FROM growth_module WHERE growthid = ?1 ", nativeQuery = true)
void deleteByGrowthid(String growthid);
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT * FROM growth_module WHERE growthid = ?1", nativeQuery = true)
List<GrowthModule> findByGrowthid(String growthid);
/*-----------------------------UPDATE-------------------------- */
@Modifying
@Query(value = "DELETE FROM growth_module WHERE campusid = ?1 AND growthid IN ?2 ", nativeQuery = true)
void deleteByGrowthids(Long campusid, List<String> growthids);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthModulePicture;
public interface GrowthModulePictureDao extends CrudRepository<GrowthModulePicture, String> {
@Query(value = "SELECT * FROM growth_module_picture WHERE growthid = ?1 AND moduleid = ?2 AND style_code = ?3 AND campusid = ?4 LIMIT 1", nativeQuery = true)
GrowthModulePicture findByGrowthidAndModuleid(String growthid, String moduleid, String styleCode, Long campusid);
@Query(value = "SELECT * FROM growth_module_picture WHERE growthid = ?1 AND style_code = ?2 AND campusid = ?3 ORDER BY orderid", nativeQuery = true)
List<GrowthModulePicture> listByGrowthidAndStyleCode(String growthid, String styleCode, Long campusid);
@Query(value = "SELECT * FROM growth_module_picture WHERE growthid IN ?1 AND moduleid = ?2", nativeQuery = true)
List<GrowthModulePicture> listByGrowthidsAndModuleid(List<String> growthids, String moduleid);
@Modifying
@Query(value = "UPDATE growth_module_picture SET picpath = ?1, mobile_picpath = ?2 WHERE moduleid = ?3 AND style_code = ?4 AND growthid = ?5 AND campusid = ?6", nativeQuery = true)
void update(String coverPath, String mobilePicpath, String moduleid, String styleCode, String growthid,
Long campusid);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthPhaseConfig;
public interface GrowthPhaseConfigDao extends CrudRepository<GrowthPhaseConfig, String> {
@Query(value = "SELECT * FROM `growth_phase_config` WHERE campusid = ?1 AND moduleid = ?2 LIMIT 1", nativeQuery = true)
GrowthPhaseConfig getByModuleid(Long campusid, String moduleid);
@Query(value = "SELECT * FROM `growth_phase_config` WHERE campusid = ?1 AND moduleid IN ?2", nativeQuery = true)
List<GrowthPhaseConfig> listByModuleidsAndCampusid(Long campusid, List<String> moduleids);
@Query(value = " SELECT g.moduleid, g.count FROM growth_phase_config g WHERE g.campusid = ?1 AND g.moduleid IN ?2 ORDER BY g.id ", nativeQuery = true)
List<Object[]> listByModuleids(Long campusid, List<String> modulids);
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthPhaseStu;
public interface GrowthPhaseStuDao extends CrudRepository<GrowthPhaseStu, Long> {
@Query(value = "SELECT stuid,COUNT(1) FROM growth_phase_stu WHERE stuid IN ?1 AND growthid = ?2 AND moduleid IN ?3 AND user_type IN ?4 AND campusid = ?5 GROUP BY stuid", nativeQuery = true)
List<Object[]> listGroupByStuidAndGrowthid(List<Long> stuids, String growthid, List<String> moduleids,
List<Integer> userTypes, Long campusid);
@Query(value = " SELECT moduleid, COUNT(1) FROM growth_phase_stu "
+ " WHERE campusid = ?1 AND growthid = ?2 AND classid = ?3 AND moduleid IN ?4 AND user_type = ?5 GROUP BY moduleid ", nativeQuery = true)
List<Object[]> countByModuleidsAndClassid(Long campusid, String growthid, Long classid, List<String> moduleids,
Integer userType);
@Query(value = " SELECT moduleid, COUNT(1) FROM growth_phase_stu WHERE campusid = ?1 AND growthid = ?2 AND moduleid IN ?3 AND user_type = ?4 AND stuid = ?5 GROUP BY moduleid ", nativeQuery = true)
List<Object[]> countByModuleidsAndStuid(Long campusid, String growthid, List<String> moduleids, Integer userType,
Long stuid);
@Query(value = " SELECT phase_num, COUNT(1) FROM growth_phase_stu WHERE moduleid = ?1 AND campusid = ?2 AND classid = ?3 GROUP BY phase_num ", nativeQuery = true)
List<Object[]> countByModuleid(String moduleid, Long campusid, Long classid);
@Query(value = " SELECT phase_num, COUNT(1) FROM growth_phase_stu WHERE moduleid = ?1 AND campusid = ?2 AND classid = ?3 AND stuid = ?4 GROUP BY phase_num ", nativeQuery = true)
List<Object[]> countByModuleidAndStuid(String moduleid, Long campusid, Long classid, Long stuid);
@Query(value = "SELECT * FROM growth_phase_stu WHERE stuid = ?1 AND growthid = ?2 AND moduleid IN ?3 AND user_type = ?4 AND campusid = ?5", nativeQuery = true)
List<GrowthPhaseStu> listByStuidAndGrowthid(Long stuid, String growthid, List<String> moduleids, Integer usertype,
Long campusid);
@Query(value = "SELECT * FROM growth_phase_stu WHERE growthid = ?1 AND moduleid IN ?2 AND user_type = ?3 AND classid = ?4 AND campusid = ?5", nativeQuery = true)
List<GrowthPhaseStu> listByGrowthidAndClassid(String growthid, List<String> moduleids, Integer usertype,
Long classid, Long campusid);
@Query(value = " SELECT COUNT(1) FROM growth_phase_stu WHERE campusid = ?1 AND growthid = ?2 AND moduleid = ?3 "
+ " AND phase_num = ?4 AND stuid = ?5 AND classid = ?6 AND user_type = ?7 ", nativeQuery = true)
BigInteger countByClassidAndStuidAndUserType(Long campusid, String growthid, String moduleid, Integer phaseNum,
Long stuid, Long classid, Integer userType);
@Query(value = "SELECT * FROM growth_phase_stu WHERE growthid IN ?1 AND moduleid IN ?2 AND user_type = ?3 AND campusid = ?4", nativeQuery = true)
List<GrowthPhaseStu> listByGrowthids(List<String> growthids, String moduleid, Integer usertype, Long campusid);
@Query(value = "SELECT moduleid,phase_num,COUNT(1) FROM growth_phase_stu WHERE growthid = ?1 AND moduleid IN ?2 "
+ " AND user_type = ?3 AND classid = ?4 AND campusid = ?5 GROUP BY moduleid,phase_num", nativeQuery = true)
List<Object[]> listGroupByModuleidAndPhaseNum(String growthid, List<String> moduleids, Integer usertype,
Long classid, Long campusid);
@Query(value = "SELECT * FROM growth_phase_stu WHERE growthid = ?1 AND moduleid = ?2 AND user_type = ?3 "
+ " AND phase_num = ?4 AND stuid IN ?5 AND campusid = ?6", nativeQuery = true)
List<GrowthPhaseStu> listByGrowthidAndStuids(String growthid, String moduleid, Integer usertype, Integer phaseNum,
List<Long> stuids, Long campusid);
@Query(value = "SELECT classid,COUNT(1) FROM growth_phase_stu WHERE classid = ?1 AND growthid = ?2 AND moduleid IN ?3 AND user_type IN ?4 AND campusid = ?5 GROUP BY stuid", nativeQuery = true)
List<Object[]> listGroupByClassidAndGrowthid(Long classid, String growthid, List<String> moduleids,
List<Integer> userTypes, Long campusid);
@Query(value = "SELECT * FROM growth_phase_stu WHERE stuid IN ?1 AND growthid = ?2 AND moduleid IN ?3 AND user_type = ?4 AND campusid = ?5", nativeQuery = true)
List<GrowthPhaseStu> listByStuidAndGrowthid(List<Long> stuids, String growthid, List<String> moduleids,
Integer userType, Long campusid);
@Query(value = "SELECT * FROM growth_phase_stu WHERE stuid IN ?1 AND growthid = ?2 AND moduleid =?3 AND phase_num = ?4 AND user_type = ?5 AND campusid = ?6", nativeQuery = true)
List<GrowthPhaseStu> listByStuidAndGrowthid(List<Long> stuids, String growthid, String moduleid, Integer phaseNum,
Integer userType, Long campusid);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthPicture;
public interface GrowthPictureDao extends CrudRepository<GrowthPicture, String> {
/*-----------------------------DELETE---------------------------*/
@Modifying
@Query(value = "DELETE FROM `growth_picture` WHERE dataid = ?1 AND growthid = ?2 AND campusid = ?3", nativeQuery = true)
void deleteByDataid(String dataid, String growthid, Long campusid);
@Modifying
@Query(value = "DELETE FROM `growth_picture` WHERE dataid IN ?1 AND growthid = ?2 AND campusid = ?3", nativeQuery = true)
void deleteByDataids(List<String> dataids, String growthid, Long campusid);
@Modifying
@Query(value = " DELETE FROM `growth_picture` WHERE campusid = ?1 AND growthid = ?2 AND moduleid = ?3 "
+ " AND EXISTS (SELECT 1 FROM growth_common_module cm WHERE dataid = cm.id AND campusid = ?1 AND growthid = ?2 AND moduleid = ?3 AND phase_num = ?4 AND stuid IN (?5) ) ", nativeQuery = true)
void deleteByStuids(Long campusid, String growthid, String moduleid, Integer phaseNum, List<Long> stuids);
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = " SELECT gp.id,gp.picpath,gr.id recordid,gr.content,gr.remark FROM `growth_record` gr "
+ " LEFT JOIN `growth_picture` gp ON gp.dataid = gr.id AND gp.growthid = ?1 AND gp.campusid = ?4 "
+ " WHERE gr.`growthid` = ?1 AND gr.stuid = ?2 AND gr.month = ?3 AND gr.campusid = ?4 AND gr.permission = ?5 "
+ " ORDER BY gp.orderid ", nativeQuery = true)
List<Object[]> listByGrowthidAndPhaseNumAndStuid(String growthid, Long stuid, String phaseMonth, Long campusid,
Integer permission);
@Query(value = "SELECT * FROM `growth_picture` WHERE `growthid` = ?1 AND moduleid = ?2 AND dataid = ?3 AND campusid = ?4 ORDER BY orderid ", nativeQuery = true)
List<GrowthPicture> listByGrowthidAndModuleid(String growthid, String moduleid, String dataid, Long campusid);
@Query(value = "SELECT * FROM `growth_picture` WHERE `growthid` = ?1 AND moduleid = ?2 AND dataid IN ?3 AND campusid = ?4 ORDER BY dataid,create_time DESC ", nativeQuery = true)
List<GrowthPicture> listByGrowthidAndDataid(String growthid, String moduleid, List<String> dataid, Long campusid);
@Query(value = "SELECT * FROM `growth_picture` WHERE `growthid` = ?1 AND campusid = ?2 LIMIT ?3 ", nativeQuery = true)
List<GrowthPicture> listByGrowthid(String growthid, Long campusid, Integer limit);
@Query(value = "SELECT p.picpath,r.title,p.create_time FROM growth_picture p "
+ " INNER JOIN module_record r ON r.id = p.moduleid "
+ " WHERE p.campusid =?1 AND p.growthid = ?2 AND p.dataid IN ?3 AND p.picpath IS NOT NULL AND p.picpath <> '' ORDER BY p.create_time DESC LIMIT ?4 ", nativeQuery = true)
List<Object[]> listByDataid(Long campusid, String growthid, List<String> dataid, Integer pageSize);
/*-----------------------------UPDATE-------------------------- */
@Query(value = "SELECT * FROM `growth_picture` WHERE `growthid` = ?1 AND moduleid = ?2 AND campusid = ?3 AND dataid = ?4 ORDER BY orderid ", nativeQuery = true)
List<GrowthPicture> listByGrowthidAndModuleid(String growthid, String moduleid, Long campusid, String dataid);
@Modifying
@Query(value = "DELETE FROM `growth_picture` WHERE campusid = ?1 AND moduleid = ?2 AND growthid = ?3 AND dataid = ?4 ", nativeQuery = true)
void deleteByCampusidAndModuleidAndGrowthidAndDataid(Long campusid, String moduleid, String growthid,
String dataid);
@Query(value = " SELECT p.moduleid,GROUP_CONCAT(DISTINCT p.picpath ORDER BY p.create_time DESC) FROM `growth_picture` p " +
" INNER JOIN growth_phase_stu gps ON gps.moduleid = p.moduleid AND gps.growthid = p.growthid " +
" WHERE p.growthid = ?1 AND p.moduleid IN ?2 AND gps.user_type = ?3 AND gps.classid = ?4 AND p.campusid = ?5 GROUP BY p.moduleid ", nativeQuery = true)
List<Object[]> listByModuleid(String growthid, List<String> moduleids, Integer userType, Long classid, Long campusid);
@Query(value = " SELECT p.moduleid,GROUP_CONCAT(DISTINCT p.picpath ORDER BY p.create_time DESC) FROM `growth_picture` p " +
" INNER JOIN growth_phase_stu gps ON gps.moduleid = p.moduleid AND gps.growthid = p.growthid " +
" WHERE p.growthid = ?1 AND p.moduleid IN ?2 AND gps.user_type = ?3 AND stuid = ?4 AND gps.classid = ?5 AND p.campusid = ?6 GROUP BY p.moduleid ", nativeQuery = true)
List<Object[]> listByModuleidAndStuid(String growthid, List<String> moduleids, Integer userType, Long stuid, Long classid, Long campusid);
}
package com.spacetech.dao;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthPush;
public interface GrowthPushDao extends CrudRepository<GrowthPush, Long> {
@Query(value = " SELECT * FROM growth_push WHERE classid = ?1 AND growthid = ?2 AND campusid = ?3 ORDER BY create_time DESC LIMIT 1", nativeQuery = true)
GrowthPush findRecentRecord(Long classid, String growthid, Long campusid);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthPushModule;
public interface GrowthPushModuleDao extends CrudRepository<GrowthPushModule, Long> {
@Query(value = "SELECT gpm.phase_index,gpm.moduleid,gpm.module_title,m.logo,m.type FROM growth_module gm INNER JOIN module_record m ON gm.moduleid = m.parentid "
+ "INNER JOIN module_campus mc ON m.parentid = mc.recordid AND mc.campusid = gm.campusid INNER JOIN growth_push_module gpm ON gpm.moduleid = m.parentid "
+ "WHERE gm.growthid = ?1 AND gpm.recordid = ?2 AND m.id IN ?3 AND gpm.campusid = ?4 ORDER BY m.orderid,gpm.phase_index", nativeQuery = true)
List<Object[]> listByGrowthidAndRecordid(String growthid, Long recordid, List<String> moduleids, Long campusid);
@Query(value = "SELECT * FROM growth_push_module WHERE campusid = ?1 AND recordid = ?2", nativeQuery = true)
List<GrowthPushModule> listByRecordid(Long campusid, Long recordid);
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthPushStu;
public interface GrowthPushStuDao extends CrudRepository<GrowthPushStu, Long> {
@Query(value = " SELECT * FROM growth_push_stu WHERE campusid = ?1 AND recordid = ?2", nativeQuery = true)
List<GrowthPushStu> listByRecordid(Long campusid, Long recordid);
@Query(value = " SELECT COUNT(1) FROM growth_push_stu WHERE campusid = ?1 AND recordid = ?2", nativeQuery = true)
BigInteger countByRecordid(Long campusid, Long recordid);
@Modifying
@Query(value = " UPDATE growth_push_stu SET isread = ?4 WHERE campusid = ?1 AND recordid = ?2 AND stuid = ?3", nativeQuery = true)
void updateByRecordidAndStuid(Long campusid, Long recordid, Long stuid, Boolean isread);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.spacetech.entity.GrowthRecordConfig;
public interface GrowthRecordConfigDao extends
PagingAndSortingRepository<GrowthRecordConfig, String>,
JpaSpecificationExecutor<GrowthRecordConfig> {
/************ count ***************/
/************ delete ***************/
/**
* find
*
* @param growthid
***************/
@Query(value = " SELECT * FROM growth_record_config WHERE campusid = ?1 AND termcode = ?2 AND gradeid = ?3 "
+ " AND month = ?4 AND growthid = ?5 LIMIT 1 ", nativeQuery = true)
GrowthRecordConfig findOne(Long campusid, String termcode, Long gradeid,
String phaseMonth, String growthid);
@Query(value = "SELECT * FROM `growth_record_config` WHERE growthid = ?1 AND `month` = ?2 LIMIT 1", nativeQuery = true)
GrowthRecordConfig findByGrowthidAndMonth(String growthid, String month);
/************ list ***************/
@Query(value = " SELECT * FROM `growth_record_config` WHERE growthid = ?1 ", nativeQuery = true)
List<GrowthRecordConfig> listByGrowthid(String growthid);
@Query(value = " SELECT * FROM growth_record_config WHERE growthid = ?1 AND state = ?2 ", nativeQuery = true)
List<GrowthRecordConfig> listByGrowthidAndState(String growthid, Integer state);
/************ save ***************/
/************ update ***************/
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthRecord;
public interface GrowthRecordDao extends CrudRepository<GrowthRecord, String> {
/*-----------------------------COUNT----------------------------*/
/*-----------------------------DELETE---------------------------*/
@Modifying
@Query(value = "delete from growth_record where id in ?1 ",nativeQuery = true)
void deleteByIdList(List<String> recordidList);
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = " SELECT DISTINCT gr.id,grc.phase_num,grc.`month`,gic.permission AS configPermission,gr.permission ,gr.content,gr.remark,grc.is_follow,grc.content AS followContent,grc.state "
+ " FROM growth_record_config grc "
+ " INNER JOIN growth_index_config gic ON gic.growthid = grc.growthid AND gic.termcode = grc.termcode AND gic.gradeid = grc.gradeid AND gic.phase_month = grc.month "
+ " LEFT JOIN growth_record gr ON grc.growthid = gr.growthid AND grc.`month` = gr.`month` AND gr.permission = gic.permission AND grc.campusid = gr.campusid AND gr.stuid = ?2 "
+ " WHERE grc.growthid = ?1 AND grc.campusid = ?3 ORDER BY gr.phase_num,gr.permission,gic.permission ", nativeQuery = true)
List<Object[]> findByGrowthidAndStuid(String growthid, Long stuid, Long campusid);
@Query(value = "SELECT * FROM growth_record WHERE growthid = ?1 AND stuid IN ?2 AND month = ?3 AND campusid = ?4 AND permission = ?5 ", nativeQuery = true)
List<GrowthRecord> listByMonth(String growthid, List<Long> stuidList, String month, Long campusid,
Integer permission);
@Query(value = "SELECT id FROM growth_record WHERE campusid = ?1 AND growthid = ?2 AND stuid = ?3 ORDER BY create_time DESC LIMIT ?4 ", nativeQuery = true)
List<String> listByStuid(Long campusid, String growthid, Long stuid, Integer limit);
/*-----------------------------UPDATE-------------------------- */
@Modifying
@Query(value = "UPDATE `growth_record` SET content = ?2,remark = ?3 WHERE id = ?1", nativeQuery = true)
void updateByid(String id, String content, String remark);
@Modifying
@Query(value = " DELETE FROM growth_record WHERE campusid = ?1 AND growthid IN ?2 ", nativeQuery = true)
void deleteByGrowthids(Long campusid, List<String> growthids);
}
package com.spacetech.dao;
import com.spacetech.entity.GrowthRemindUser;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
public interface GrowthRemindUserDao extends CrudRepository<GrowthRemindUser, String> {
@Query(value = " SELECT * FROM growth_remind_user "
+ " WHERE campusid = ?1 AND userid = ?2 AND gradeid = ?3 AND termcode = ?4 LIMIT 1 ", nativeQuery = true)
GrowthRemindUser findByGradeidAndTermcode(Long campusid, Long userid, Long gradeid, String termcode);
}
package com.spacetech.dao;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthSchool;
public interface GrowthSchoolDao extends CrudRepository<GrowthSchool, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT * FROM growth_school WHERE growthid = ?1 LIMIT 1", nativeQuery = true)
GrowthSchool findSchool(String growthid);
/*-----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthStu;
public interface GrowthStuDao extends CrudRepository<GrowthStu, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = " SELECT classid,class_name FROM growth_stu WHERE growthid = ?1 GROUP BY classid ORDER BY class_order_id ", nativeQuery = true)
List<Object[]> listClass(String growthid);
@Query(value = " SELECT * FROM growth_stu WHERE growthid = ?1 AND stuid = ?2 AND campusid = ?3 LIMIT 1 ", nativeQuery = true)
GrowthStu findByGrowthAndStuid(String growthid, Long stuid, Long campusid);
@Query(value = "SELECT * FROM growth_stu WHERE campusid = ?1 AND growthid = ?2 AND termcode = ?3 AND gradeid = ?4 AND stu_name LIKE ?5 ORDER BY class_order_id", nativeQuery = true)
List<GrowthStu> listByGradeid(Long campusid, String growthid, String termcode, Long gradeid, String nameLike);
@Query(value = "SELECT * FROM growth_stu WHERE growthid = ?1", nativeQuery = true)
List<GrowthStu> listByGrowthid(String growthid);
@Query(value = " SELECT DISTINCT classid,class_name FROM growth_stu WHERE termcode = ?1 AND campusid = ?2 ORDER BY gradeid,class_order_id ", nativeQuery = true)
List<Object[]> findClass(String termcode, Long campusid);
@Query(value = " SELECT * FROM growth_stu WHERE growthid = ?1 AND classid = ?2 AND campusid = ?3 ", nativeQuery = true)
List<GrowthStu> listStu(String growthid, Long classid, Long campusid);
@Query(value = " SELECT * FROM growth_stu WHERE growthid = ?1 AND classid IN ?2 AND campusid = ?3 AND stu_name LIKE ?4 ", nativeQuery = true)
List<GrowthStu> listStu(String growthid, List<Long> classidList, Long campusid, String stuName);
@Query(value = " SELECT count(*) FROM growth_stu WHERE growthid = ?1 AND classid IN ?2 AND campusid = ?3", nativeQuery = true)
BigInteger countByGrowthid(String growthid, List<Long> classidList, Long campusid);
@Query(value = " SELECT * FROM growth_stu WHERE growthid = ?1 AND stuid = ?2 LIMIT 1", nativeQuery = true)
GrowthStu getByStuid(String growthid, Long stuid);
@Query(value = "SELECT * FROM growth_stu WHERE growthid = ?1 AND stuid IN ?2 ORDER BY stuid limit ?3,?4", nativeQuery = true)
List<GrowthStu> listByStuids(String growthid, List<Long> stuids, int start, int size);
@Query(value = "SELECT count(id) FROM growth_stu WHERE growthid = ?1 AND stuid IN ?2 ", nativeQuery = true)
BigInteger countByStuids(String growthid, List<Long> stuids);
@Query(value = "SELECT * from growth_stu WHERE campusid = ?1 AND growthid IN ?2 ", nativeQuery = true)
List<GrowthStu> listByGrowthids(Long camousid, List<String> growthids);
@Query(value = " SELECT GROUP_CONCAT(picpath ORDER BY create_time DESC) FROM growth_stu WHERE campusid = ?1 AND growthid = ?2 ", nativeQuery = true)
String findStuPicByGrowthid(Long campusid, String growthid);
@Modifying
@Query(value = "DELETE FROM growth_stu WHERE campusid = ?1 AND growthid IN ?2 ", nativeQuery = true)
void deleteByGrowthids(Long campusid, List<String> growthids);
/*-----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthTeacher;
public interface GrowthTeacherDao extends CrudRepository<GrowthTeacher, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = " SELECT gt.* FROM growth_teacher gt "
+ " INNER JOIN growth_stu gs ON gs.classid = gt.classid AND gs.growthid = gt.growthid "
+ " WHERE gt.growthid = ?1 AND gs.stuid = ?2 AND gs.campusid = ?3 LIMIT 2 ", nativeQuery = true)
List<GrowthTeacher> findByGrowthidAndStuid(String growthid, Long stuid, Long campusid);
@Query(value = "SELECT * FROM growth_teacher WHERE growthid = ?1", nativeQuery = true)
List<GrowthTeacher> listByGrowthid(String growthid);
/*-----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthTimes;
public interface GrowthTimesDao extends CrudRepository<GrowthTimes, String> {
@Modifying
@Query(value = "DELETE FROM `growth_times` WHERE campusid = ?1 AND growthid = ?2 AND phase_num = ?3 AND stuid IN ?4 ", nativeQuery = true)
void deleteByModuleidAndStuid(Long campusid, String growthid, Integer phaseNum,
List<Long> stuid);
@Query(value = "SELECT * FROM `growth_times` WHERE campusid = ?1 AND growthid = ?2 AND phase_num = ?3 AND stuid = ?4 LIMIT 1", nativeQuery = true)
GrowthTimes getByStuid(Long campusid, String growthid, Integer phaseNum, Long stuid);
@Query(value = "SELECT * FROM `growth_times` WHERE campusid = ?1 AND growthid = ?2 AND stuid = ?3 ORDER BY phase_num", nativeQuery = true)
List<GrowthTimes> listByStuid(Long campusid, String growthid, Long stuid);
@Query(value = "SELECT * FROM `growth_times` WHERE campusid = ?1 AND growthid = ?2 AND phase_num = ?3 AND stuid IN ?4 ", nativeQuery = true)
List<GrowthTimes> listByStuids(Long campusid, String growthid, Integer phaseNum, List<Long> stuids);
@Query(value = "SELECT id FROM `growth_times` WHERE campusid = ?1 AND growthid = ?2 AND stuid = ?3 ORDER BY create_time DESC LIMIT ?4 ", nativeQuery = true)
List<String> listByStuidAndLimit(Long campusid, String growthid, Long stuid, Integer limit);
}
package com.spacetech.dao;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthTitlePage;
public interface GrowthTitlePageDao extends CrudRepository<GrowthTitlePage, String> {
/*-----------------------------DELETE---------------------------*/
/*-----------------------------INSERT-------------------------- */
/*-----------------------------SELECT-------------------------- */
@Query(value = "SELECT * FROM growth_title_page WHERE growthid = ?1 ORDER BY create_time DESC LIMIT 1 ", nativeQuery = true)
GrowthTitlePage findTitlePage(String growthid);
/*-----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.GrowthWorks;
public interface GrowthWorksDao extends CrudRepository<GrowthWorks, String> {
@Modifying
@Query(value = "DELETE FROM `growth_works` WHERE campusid = ?1 AND growthid = ?2 AND phase_num = ?3 AND stuid IN ?4 ", nativeQuery = true)
void deleteByModuleidAndStuid(Long campusid, String growthid, Integer phaseNum,
List<Long> stuid);
@Query(value = "SELECT * FROM `growth_works` WHERE campusid = ?1 AND growthid = ?2 AND phase_num = ?3 AND stuid = ?4 LIMIT 1", nativeQuery = true)
GrowthWorks getByStuid(Long campusid, String growthid, Integer phaseNum, Long stuid);
@Query(value = "SELECT * FROM `growth_works` WHERE campusid = ?1 AND growthid = ?2 AND stuid = ?3 ORDER BY phase_num", nativeQuery = true)
List<GrowthWorks> listByStuid(Long campusid, String growthid, Long stuid);
@Query(value = "SELECT * FROM `growth_works` WHERE campusid = ?1 AND growthid = ?2 AND phase_num = ?3 AND stuid IN ?4 ", nativeQuery = true)
List<GrowthWorks> listByStuids(Long campusid, String growthid, Integer phaseNum, List<Long> stuids);
@Query(value = "SELECT id FROM `growth_works` WHERE campusid = ?1 AND growthid = ?2 AND stuid = ?3 ORDER BY create_time DESC LIMIT ?4", nativeQuery = true)
List<String> listByStuidAndLimit(Long campusid, String growthid, Long stuid, Integer limit);
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.List;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.spacetech.entity.IndexLevel;
public interface IndexLevelDao
extends PagingAndSortingRepository<IndexLevel, String>, JpaSpecificationExecutor<IndexLevel> {
/************ count ***************/
/************ delete ***************/
/************ find ***************/
/************ list ***************/
@Query(value = " SELECT * FROM `index_level` WHERE campusid = ?1 AND type = ?2 ", nativeQuery = true)
List<IndexLevel> listByType(Long campusid, String type);
@Query(value = " SELECT * FROM `index_level` WHERE campusid = ?1 AND type = ?2 ORDER BY orderid", nativeQuery = true)
List<IndexLevel> listByTypeOrderByOrderid(Long campusid, String type);
@Modifying
@Query(value = "UPDATE index_level SET title=?2 WHERE id = ?1 ", nativeQuery = true)
void updateTitle(String levelid, String title);
@Query(value = " SELECT COUNT(*) FROM index_level WHERE campusid = ?1 AND type = ?2 ", nativeQuery = true)
BigInteger countByCampusidType(Long campusid, String type);
@Modifying
@Query(value = " INSERT INTO index_level "
+ " SELECT guid(),l.indexid,l.title,l.type,l.orderid, ?2 ,l.creatorid,NOW() "
+ " FROM index_level l WHERE l.campusid = ?1 AND l.type=?3 ", nativeQuery = true)
void initByCampusid(Long commonTemplateCampusid, Long campusid, String type);
/************ save ***************/
/************ update ***************/
@Query(value = " SELECT * FROM index_level WHERE campusid = ?1 ORDER BY type ", nativeQuery = true)
List<IndexLevel> listByCampusid(Long campusid);
}
package com.spacetech.dao;
import java.util.List;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.spacetech.entity.ModuleCampus;
public interface ModuleCampusDao extends PagingAndSortingRepository<ModuleCampus, String>,
JpaSpecificationExecutor<ModuleCampus> {
/************ count ***************/
/************ find ***************/
/************ list ***************/
@Query(value = " SELECT * FROM module_campus WHERE campusid = ?1 ", nativeQuery = true)
List<ModuleCampus> listByCampusid(Long campusid);
/************ save ***************/
/************ update ***************/
@Modifying
@Query(value = "DELETE FROM module_campus WHERE campusid = ?1 AND recordid = ?2", nativeQuery = true)
void deleteByRecordid(Long campusid, String recordid);
@Modifying
@Query(value = "DELETE FROM module_campus WHERE campusid = ?1 ", nativeQuery = true)
void deleteByCampusid(Long campusid);
@Modifying
@Query(value = "INSERT INTO module_campus(id, recordid, campusid, create_time, creatorid) SELECT guid(),parentid, campusid, NOW(), ?2 FROM module_record WHERE campusid = ?1 ", nativeQuery = true)
void insertModuleCampus(Long campusid, Long userid);
@Query(value = "SELECT * FROM module_campus WHERE campusid = ?1 AND recordid = ?2", nativeQuery = true)
ModuleCampus findByRecordid(Long campusid, String recordid);
}
package com.spacetech.dao;
import com.spacetech.entity.ModuleGroup;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface ModuleGroupDao extends PagingAndSortingRepository<ModuleGroup, Long>,
JpaSpecificationExecutor<ModuleGroup> {
@Query(value = " SELECT mgr.groupid, m.parentid, m.title, m.background_url, m.have_phase, " +
" m.phase_num, m.type_group, m.type, m.campusid FROM growth_module gm " +
" INNER JOIN module_record m ON gm.moduleid = m.parentid " +
" INNER JOIN module_group_record mgr ON mgr.moduleid = m.parentid " +
" INNER JOIN module_campus mc ON mc.recordid = m.parentid AND mc.campusid = gm.campusid " +
" WHERE m.campusid = ?1 AND gm.growthid = ?2 AND m.rolecode LIKE ?3 ORDER BY mgr.groupid, m.orderid ", nativeQuery = true)
List<Object[]> listModule(Long campusid, String growthid, String rolecode);
@Query(value = " SELECT * FROM module_group WHERE campusid = ?1 AND rolecode LIKE ?2 ORDER BY id ", nativeQuery = true)
List<ModuleGroup> listByCampusidAndRolecode(Long campusid, String rolecode);
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.ModuleRecord;
public interface ModuleRecordDao extends CrudRepository<ModuleRecord, String> {
/** -----------------------------DELETE--------------------------- */
/** -----------------------------INSERT-------------------------- */
/** -----------------------------FIND-------------------------- */
/**
* 根据campusid和growthid查询成长记录配置项
*
* @param campusid
* @param termcode
* @param gradeid
* @return
*/
@Query(value = " SELECT mr.id,IFNULL(gm.alias,mr.title),mr.is_fix,mr.orderid,mr.rolecode,mr.url,mr.type,grow.is_lock,grow.id AS growthid,mr.edit_url,mr.is_mobile,mr.logo,mr.mobile_url,mr.have_phase "
+ " FROM module_record mr INNER JOIN growth_module gm ON gm.moduleid=mr.id "
+ " INNER JOIN growth grow ON grow.id = gm.growthid "
+ " INNER JOIN module_campus mc ON mc.campusid = grow.campusid AND mc.recordid = mr.id "
+ " WHERE gm.campusid = ?1 AND grow.termcode = ?2 AND grow.gradeid = ?3 ORDER BY orderid ", nativeQuery = true)
List<Object[]> findByTermcodeAndGradeid(Long campusid, String termcode, Long gradeid);
@Query(value = " SELECT mr.parentid,IFNULL(gm.alias,mr.title),mr.is_fix,mr.orderid,mr.rolecode,mr.url,mr.type,grow.is_lock,grow.id AS growthid,mr.edit_url,mr.is_mobile,mr.logo,mr.mobile_url,mr.have_phase "
+ " FROM module_record mr INNER JOIN growth_module gm ON gm.moduleid = mr.parentid AND gm.campusid = mr.campusid "
+ " INNER JOIN growth grow ON grow.id = gm.growthid "
+ " INNER JOIN module_campus mc ON mc.campusid = grow.campusid AND mc.recordid = mr.parentid "
+ " WHERE gm.campusid = ?1 AND grow.termcode = ?2 AND grow.gradeid = ?3 " + " ORDER BY orderid ", nativeQuery = true)
List<Object[]> findByCampusidAndGradeid(Long campusid, String termcode, Long gradeid);
@Query(value = "SELECT * FROM module_record WHERE campusid = ?1 ORDER BY orderid", nativeQuery = true)
List<ModuleRecord> findByCampusid(Long campusid);
@Query(value = "SELECT COUNT(*) FROM module_record WHERE campusid = ?1", nativeQuery = true)
BigInteger countByCampusid(Long campusid);
@Query(value = "SELECT * FROM module_record m WHERE m.type = ?1 AND campusid = 0 ", nativeQuery = true)
ModuleRecord findByType(String type);
@Query(value = "SELECT r.* FROM `module_record` r INNER JOIN `module_campus` c ON r.id = c.recordid WHERE c.campusid = ?1 ORDER BY r.orderid", nativeQuery = true)
List<ModuleRecord> listByCampusid(Long campusid);
@Query(value = "SELECT r.* FROM `module_record` r INNER JOIN `module_campus` c ON r.parentid = c.recordid AND r.campusid = c.campusid "
+ "WHERE c.campusid = ?1 ORDER BY r.orderid", nativeQuery = true)
List<ModuleRecord> listByCampus(Long campusid);
@Query(value = "SELECT * FROM module_record WHERE campusid = 0 AND is_open = 1", nativeQuery = true)
List<ModuleRecord> listByOpen();
@Query(value = "SELECT mr.* FROM `growth_module` gm "
+ " INNER JOIN `module_record` mr ON gm.moduleid = mr.parentid "
+ " INNER JOIN module_campus mc ON mr.parentid = mc.recordid AND gm.campusid = mc.campusid "
+ " WHERE mr.campusid = ?1 AND gm.growthid = ?2 AND mr.type = ?3 ", nativeQuery = true)
List<ModuleRecord> listByCampusidAndGrowthidAndType(Long campusid, String growthid, String type);
@Query(value = "SELECT m.* FROM growth_module gm " + " INNER JOIN module_record m ON gm.moduleid = m.parentid "
+ " INNER JOIN module_campus mc ON m.parentid = mc.recordid AND mc.campusid = gm.campusid "
+ " where growthid = ?1 AND m.campusid = ?2 ORDER BY m.orderid", nativeQuery = true)
List<ModuleRecord> listByGrowthid(String growthid, Long campusid);
/** -----------------------------UPDATE-------------------------- */
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.List;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.spacetech.entity.MonthIndex;
public interface MonthIndexDao
extends PagingAndSortingRepository<MonthIndex, String>, JpaSpecificationExecutor<MonthIndex> {
/************ count ***************/
@Query(value = " SELECT COUNT(*) FROM `month_index` WHERE campusid = ?1 AND termcode = ?2 "
+ " AND gradeid = ?3 ", nativeQuery = true)
BigInteger countByCampusidTermcodeGradeid(Long campusid, String termcode, Long gradeid);
@Query(value = " SELECT COUNT(*) FROM `month_index` WHERE campusid = ?1 "
+ " AND gradeid = ?2 AND termcode = ?3 ", nativeQuery = true)
BigInteger countByCampusidAndGradeid(Long campusid, Long gradeid, String termcode);
/************ delete ***************/
@Modifying
@Query(value = "DELETE FROM month_index WHERE id IN ?1 ", nativeQuery = true)
void deleteByIds(List<String> monthIndexids);
/************ find ***************/
/************ list ***************/
@Query(value = " SELECT * FROM `month_index` WHERE campusid = ?1 AND termcode = ?2 "
+ " AND gradeid = ?3 ORDER BY orderid , create_time DESC,id LIMIT ?4,?5 ", nativeQuery = true)
List<MonthIndex> listByTermcodeAndGradeid(Long campusid, String termcode, Long gradeid, Integer start,
Integer pageSize);
@Query(value = " SELECT * FROM `month_index` WHERE campusid = ?1 AND termcode = ?2 "
+ " AND gradeid = ?3 ORDER BY orderid , create_time DESC,id ", nativeQuery = true)
List<MonthIndex> listByTermcodeAndGradeid(Long campusid, String termcode, Long gradeid);
@Query(value = " SELECT * FROM `month_index` WHERE campusid = ?1 AND gradeid = ?2 "
+ " AND termcode = ?3 ORDER BY orderid LIMIT ?4,?5 ", nativeQuery = true)
List<MonthIndex> listByCampusidAndGradeid(Long campusid, Long gradeid, String termcode, Integer start,
Integer pageSize);
@Query(value = " SELECT id FROM `month_index` WHERE campusid = ?1 AND termcode = ?2 "
+ " AND gradeid = ?3 ", nativeQuery = true)
List<String> listIndexids(Long campusid, String termcode, Long gradeid);
@Query(value = " SELECT mi.id,mi.title,IFNULL(gi.permission,-1) FROM month_index mi "
+ " LEFT JOIN growth_index_config gi ON gi.indexid = mi.id AND gi.phase_month = ?4 "
+ " WHERE mi.campusid = ?1 AND mi.termcode=?2 AND mi.gradeid =?3 GROUP BY mi.id order by mi.title", nativeQuery = true)
List<Object[]> listToPermission(Long campusid, String termcode, Long gradeid, String month);
/************ save ***************/
/************ update ***************/
@Modifying
@Query(value = "UPDATE month_index SET title=?2 WHERE id = ?1 ", nativeQuery = true)
void updateTitle(String monthIndexid, String title);
@Query(value = " SELECT DISTINCT mi.id,mi.title,grc.phase_num,grc.`month`,gic.permission,gi.index_levelid FROM month_index mi "
+ " INNER JOIN growth_index_config gic ON gic.gradeid = mi.gradeid AND gic.termcode = mi.termcode AND gic.indexid = mi.id "
+ " INNER JOIN growth_record_config grc ON grc.growthid = gic.growthid AND gic.phase_month = grc.month "
+ " LEFT JOIN growth_index gi ON gi.growthid = gic.growthid AND gi.indexid = gic.indexid AND gi.phase_month = gic.phase_month AND gi.stuid = ?2 "
+ " WHERE grc.growthid = ?1 AND grc.campusid = ?3 ORDER BY grc.phase_num,gic.permission,mi.orderid,mi.id ", nativeQuery = true)
List<Object[]> findByGrowthidAndStuid(String growthid, Long stuid, Long campusid);
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.Date;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.StuHealthHistory;
public interface StuHealthHistoryDao extends CrudRepository<StuHealthHistory, String> {
@Query(value = " SELECT h.time,h.weight,n.minweight,n.maxweight,h.user_type FROM stu_health_history h "
+ " LEFT JOIN stu_health_normal n ON h.months = n.months AND h.sex = n.sex AND n.campusid = 0 "
+ " WHERE h.campusid = ?1 AND h.stuid = ?2 AND h.weight IS NOT NULL AND (DATE_FORMAT(h.time,'%Y-%m-%d') NOT IN ?4 "
+ " OR h.user_type = ?3 ) ORDER BY h.time ", nativeQuery = true)
List<Object[]> listWeightByStuid(Long campusid, Long stuid, Integer userType, List<String> timeStr);
@Query(value = " SELECT h.time,h.height,n.minheight,n.maxheight,h.user_type FROM stu_health_history h "
+ " LEFT JOIN stu_health_normal n ON h.months = n.months AND h.sex = n.sex AND n.campusid = 0 "
+ " WHERE h.campusid = ?1 AND h.stuid = ?2 AND h.height IS NOT NULL AND (DATE_FORMAT(h.time,'%Y-%m-%d') NOT IN ?4 "
+ " OR h.user_type = ?3 ) ORDER BY h.time ", nativeQuery = true)
List<Object[]> listHeightByStuid(Long campusid, Long stuid, Integer userType, List<String> timeStr);
@Query(value = " SELECT * FROM stu_health_history "
+ " WHERE campusid = ?1 AND stuid = ?2 AND vision_left IS NOT NULL "
+ " AND (DATE_FORMAT(time,'%Y-%m-%d') NOT IN ?4 "
+ " OR user_type = ?3 ) ORDER BY time ", nativeQuery = true)
List<StuHealthHistory> listVisionLeftByStuid(Long campusid, Long stuid, Integer userType, List<String> timeStr);
@Query(value = " SELECT * FROM stu_health_history "
+ " WHERE campusid = ?1 AND stuid = ?2 AND vision_right IS NOT NULL "
+ " AND (DATE_FORMAT(time,'%Y-%m-%d') NOT IN ?4 "
+ " OR user_type = ?3 ) ORDER BY time ", nativeQuery = true)
List<StuHealthHistory> listVisionRightByStuid(Long campusid, Long stuid, Integer userType, List<String> timeStr);
@Query(value = " SELECT * FROM `stu_health_history` WHERE campusid = ?1 "
+ " AND user_type = ?2 AND stuid = ?3 AND weight IS NOT NULL ", nativeQuery = true)
List<StuHealthHistory> listWeightByStuid(Long campusid, Integer userType, Long stuid);
@Query(value = " SELECT * FROM `stu_health_history` WHERE campusid = ?1 "
+ " AND user_type = ?2 AND stuid = ?3 AND height IS NOT NULL ", nativeQuery = true)
List<StuHealthHistory> listHeightByStuid(Long campusid, Integer userType, Long stuid);
@Query(value = " SELECT * FROM `stu_health_history` WHERE campusid = ?1 AND user_type = ?2 "
+ " AND stuid = ?3 AND vision_left IS NOT NULL ", nativeQuery = true)
List<StuHealthHistory> listVisionLeftByStuid(Long campusid, Integer userType, Long stuid);
@Query(value = " SELECT * FROM `stu_health_history` WHERE campusid = ?1 AND user_type = ?2 "
+ " AND stuid = ?3 AND vision_right IS NOT NULL ", nativeQuery = true)
List<StuHealthHistory> listVisionRightByStuid(Long campusid, Integer userType, Long stuid);
@Query(value = " SELECT COUNT(DISTINCT time) FROM `stu_health_history` "
+ " WHERE campusid = ?1 AND stuid = ?2 AND weight IS NOT NULL ", nativeQuery = true)
BigInteger countWeightByStuid(Long campusid, Long stuid);
@Query(value = " SELECT COUNT(DISTINCT time) FROM `stu_health_history` "
+ " WHERE campusid = ?1 AND stuid = ?2 AND height IS NOT NULL ", nativeQuery = true)
BigInteger countHeightByStuid(Long campusid, Long stuid);
@Query(value = " SELECT COUNT(DISTINCT time) FROM `stu_health_history` WHERE campusid = ?1 "
+ " AND stuid = ?2 AND vision_left IS NOT NULL ", nativeQuery = true)
BigInteger countVisionLeftByStuid(Long campusid, Long stuid);
@Query(value = " SELECT COUNT(DISTINCT time) FROM `stu_health_history` WHERE campusid = ?1 "
+ " AND stuid = ?2 AND vision_right IS NOT NULL ", nativeQuery = true)
BigInteger countVisionRightByStuid(Long campusid, Long stuid);
@Query(value = " SELECT * FROM `stu_health_history` WHERE campusid = ?1 AND user_type = ?2 "
+ " AND stuid = ?3 AND DATE_FORMAT(time,'%Y-%m-%d') = DATE_FORMAT(?4,'%Y-%m-%d') ", nativeQuery = true)
StuHealthHistory findByStuidAndTime(Long campusid, Integer userType, Long stuid, Date createTime);
@Modifying
@Query(value = " DELETE FROM `stu_health_history` WHERE campusid = ?1 AND user_type = ?2 "
+ " AND stuid IN ?3 AND DATE_FORMAT(time,'%Y-%m-%d') = DATE_FORMAT(?4,'%Y-%m-%d') ", nativeQuery = true)
void deleteByStuidAndTime(Long campusid, Integer userType, List<Long> stuids, Date createTime);
@Query(value = " SELECT * FROM `stu_health_history` WHERE campusid = ?1 AND user_type = ?2 "
+ " AND stuid IN ?3 AND DATE_FORMAT(time,'%Y-%m-%d') = DATE_FORMAT(?4,'%Y-%m-%d') ", nativeQuery = true)
List<StuHealthHistory> listByStuidAndTime(Long campusid, Integer userType, List<Long> stuids, Date createTime);
@Query(value = " SELECT * FROM `stu_health_history` WHERE campusid = ?1 AND user_type = ?2 "
+ " AND DATE_FORMAT(time,'%Y-%m-%d') = DATE_FORMAT(?3,'%Y-%m-%d') ", nativeQuery = true)
List<StuHealthHistory> listByUserTypeAndTime(Long campusid, Integer userType, Date createTime);
@Modifying
@Query(value = " DELETE FROM `stu_health_history` WHERE campusid = ?1 AND user_type = ?2 "
+ " AND DATE_FORMAT(time,'%Y-%m-%d') = DATE_FORMAT(?3,'%Y-%m-%d') ", nativeQuery = true)
void deleteByTime(Long campusid, Integer userType, Date time);
@Query(value = " SELECT height FROM `stu_health_history` WHERE campusid = ?1 AND stuid = ?2 AND height IS NOT NULL"
+ " ORDER BY DATE_FORMAT(time,'%Y-%m-%d') DESC,user_type LIMIT 1 ", nativeQuery = true)
Float findHeightByStuid(Long campusid, Long stuid);
@Query(value = " SELECT weight FROM `stu_health_history` WHERE campusid = ?1 AND stuid = ?2 AND weight IS NOT NULL "
+ " ORDER BY DATE_FORMAT(time,'%Y-%m-%d') DESC,user_type LIMIT 1 ", nativeQuery = true)
Float findWeightByStuid(Long campusid, Long stuid);
@Query(value = " SELECT vision_left FROM `stu_health_history` WHERE campusid = ?1 AND stuid = ?2 AND vision_left IS NOT NULL "
+ " ORDER BY DATE_FORMAT(time,'%Y-%m-%d') DESC,user_type LIMIT 1 ", nativeQuery = true)
Float findVisionLeftByStuid(Long campusid, Long stuid);
@Query(value = " SELECT vision_right FROM `stu_health_history` WHERE campusid = ?1 AND stuid = ?2 AND vision_right IS NOT NULL "
+ " ORDER BY DATE_FORMAT(time,'%Y-%m-%d') DESC,user_type LIMIT 1 ", nativeQuery = true)
Float findVisionRightByStuid(Long campusid, Long stuid);
@Query(value = " SELECT * FROM (SELECT * FROM stu_health_history WHERE campusid = ?1 ORDER BY time DESC) `temp` "
+ " GROUP BY stuid ORDER BY `time` DESC ", nativeQuery = true)
List<StuHealthHistory> listByCampusid(Long campusid);
}
package com.spacetech.dao;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.StuHealthNormal;
public interface StuHealthNormalDao extends CrudRepository<StuHealthNormal, String> {
@Query(value = " SELECT months FROM `stu_health_normal` WHERE campusid=?1 "
+ " AND sex = ?2 AND months <=?3 ORDER BY months DESC LIMIT 1; ", nativeQuery = true)
Integer getMonths(Long campusid, Integer sex, Integer months);
@Query(value = " SELECT MIN(months) FROM `stu_health_normal` "
+ " WHERE campusid=?1 AND sex = ?2 ", nativeQuery = true)
Integer getMinMonths(Long campusid, Integer sex);
@Query(value = " SELECT MAX(months) FROM `stu_health_normal` "
+ " WHERE campusid=?1 AND sex = ?2 ", nativeQuery = true)
Integer getMaxMonths(Long commonTemplateCampusid, Integer sex);
}
package com.spacetech.dao;
import java.math.BigInteger;
import java.util.Date;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.spacetech.entity.StuHealthTime;
public interface StuHealthTimeDao extends CrudRepository<StuHealthTime, String> {
@Query(value = " SELECT * FROM `stu_health_time` WHERE campusid = ?1 AND termcode = ?2 "
+ " AND DATE_FORMAT(time,'%Y-%m-%d') = DATE_FORMAT(?3,'%Y-%m-%d') ", nativeQuery = true)
StuHealthTime findByTermcodeAndTime(Long campusid, String termcode, Date time);
@Query(value = " SELECT COUNT(*) FROM `stu_health_time` WHERE campusid = ?1 "
+ " AND termcode = ?2 ORDER BY time ", nativeQuery = true)
BigInteger countByTermcode(Long campusid, String termcode);
@Query(value = " SELECT * FROM `stu_health_time` WHERE campusid = ?1 "
+ " AND termcode = ?2 ORDER BY time ", nativeQuery = true)
List<StuHealthTime> listByTermcode(Long campusid, String termcode);
}
package com.spacetech.entity;
import com.spacetech.common.entity.IdEntity;
import com.spacetech.common.utils.StringUtil;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
@Entity
@Table(name = "bmi_rules")
public class BmiRules extends IdEntity implements java.io.Serializable {
private static final long serialVersionUID = -1L;
private Long age;
private Integer orderid;
private String experssion;
private String type;
private String remark;
private String name;
private String sex;
private Long campusid;
private Long creatorid;
private Date createTime;
public Long getAge() {
return age;
}
public void setAge(Long age) {
this.age = age;
}
public Integer getOrderid() {
return orderid;
}
public void setOrderid(Integer orderid) {
this.orderid = orderid;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getExperssion() {
return experssion;
}
public void setExperssion(String experssion) {
this.experssion = experssion;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public BmiRules() {
}
public BmiRules(BmiRules bmiRules,Long campusid) {
this.id = StringUtil.guid();
this.age = bmiRules.getAge();
this.orderid = bmiRules.getOrderid();
this.experssion = bmiRules.getExperssion();
this.type = bmiRules.getType();
this.remark = bmiRules.getRemark();
this.name = bmiRules.getName();
this.sex = bmiRules.getSex();
this.campusid = campusid;
this.creatorid = bmiRules.getCreatorid();
this.createTime = bmiRules.getCreateTime();
}
}
package com.spacetech.entity;
import java.util.Date;
import java.util.Map;
import javax.persistence.*;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.spacetech.common.utils.DateUtil;
import com.spacetech.common.utils.StringUtil;
import com.spacetech.service.FinalIndexService;
@Entity
@Table(name = "final_index")
public class FinalIndex implements java.io.Serializable {
private static final long serialVersionUID = 5150645058975156191L;
@Id
private String id;
private String termcode;
private String title;
private String content;
private String parentid;
private Long gradeid;
private Long campusid;
private Long creatorid;
private Integer orderid;
private Date createTime;
private String type;
public FinalIndex() {
}
public FinalIndex(FinalIndex finalIndex, JSONObject params, Map<String, String> defaultFinalIndexMap) {
this.id = FinalIndexService.PARENT_INDEX.equals(finalIndex.getParentid())
? defaultFinalIndexMap.get(finalIndex.getId())
: StringUtil.guid();
this.termcode = params.getString("termcode");
this.title = finalIndex.getTitle();
this.content = finalIndex.getContent();
this.parentid = FinalIndexService.PARENT_INDEX.equals(finalIndex.getParentid()) ? FinalIndexService.PARENT_INDEX
: defaultFinalIndexMap.get(finalIndex.getParentid());
this.gradeid = params.getLong("gradeid");
this.campusid = params.getLong("campusid");
this.creatorid = params.getLong("userid");
this.orderid = finalIndex.getOrderid();
this.createTime = DateUtil.getCurrentTimeDate();
this.type = params.getString("type");
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTermcode() {
return termcode;
}
public void setTermcode(String termcode) {
this.termcode = termcode;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getParentid() {
return parentid;
}
public void setParentid(String parentid) {
this.parentid = parentid;
}
public Long getGradeid() {
return gradeid;
}
public void setGradeid(Long gradeid) {
this.gradeid = gradeid;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Integer getOrderid() {
return orderid;
}
public void setOrderid(Integer orderid) {
this.orderid = orderid;
}
@Temporal(TemporalType.TIMESTAMP)
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.alibaba.fastjson.JSONObject;
import com.spacetech.common.entity.IdEntity;
import com.spacetech.common.utils.DateUtil;
import com.spacetech.common.utils.StringUtil;
@Entity
@Table(name = "growth")
public class Growth extends IdEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = 5615797995489108643L;
public static final Integer IS_LOCK_STATE = 1;
public static final String ICON_TYPE_CAMPUS = "CAMPUS";
public static final String ICON_TYPE_STUDENT = "STUDENT";
private static final String GROWTH_SCENE_AND_STYLE_CODE = "spring";
private static final Boolean GROWTH_ISLOCK = false;
private String termcode;
private Long gradeid;
private String gradeName;
private String title;
private Boolean isLock;
private String sceneCode;
private String styleCode;
private Long campusid;
private Long creatorid;
private Date createTime;
private String iconType;
public String getIconType() {
return iconType;
}
public void setIconType(String iconType) {
this.iconType = iconType;
}
public String getTermcode() {
return termcode;
}
public void setTermcode(String termcode) {
this.termcode = termcode;
}
public Long getGradeid() {
return gradeid;
}
public void setGradeid(Long gradeid) {
this.gradeid = gradeid;
}
public String getGradeName() {
return gradeName;
}
public void setGradeName(String gradeName) {
this.gradeName = gradeName;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Boolean getIsLock() {
return isLock;
}
public void setIsLock(Boolean isLock) {
this.isLock = isLock;
}
public String getSceneCode() {
return sceneCode;
}
public void setSceneCode(String sceneCode) {
this.sceneCode = sceneCode;
}
public String getStyleCode() {
return styleCode;
}
public void setStyleCode(String styleCode) {
this.styleCode = styleCode;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Growth (){
}
public Growth (Long campusid, Long creatorid, Long gradeid, JSONObject gradeJson, String termcode){
this.setId(StringUtil.guid());
this.setCampusid(campusid);
this.setGradeid(gradeid);
this.setGradeName(gradeJson.getString("njmc"));
this.setTermcode(termcode);
this.setCreatorid(creatorid);
this.setCreateTime(DateUtil.getCurrentTimeDate());
this.setIsLock(GROWTH_ISLOCK);
this.setTitle(gradeJson.getString("njmc"));
this.setSceneCode(GROWTH_SCENE_AND_STYLE_CODE);
this.setStyleCode(GROWTH_SCENE_AND_STYLE_CODE);
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_birthday")
public class GrowthBirthday extends IdEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = 5047456724203467998L;
private String growthid;
private String content;
private Long campusid;
private Long stuid;
private Long creatorid;
private Date createTime;
private Integer permission;
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getPermission() {
return permission;
}
public void setPermission(Integer permission) {
this.permission = permission;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import com.alibaba.fastjson.annotation.JSONField;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_class")
public class GrowthClass extends IdEntity implements Serializable {
private static final long serialVersionUID = -7838036995731998231L;
private String growthid;
private Long classid;
private String picpath;
private String content;
private Long campusid;
private Long creatorid;
private Date createTime;
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getClassid() {
return classid;
}
public void setClassid(Long classid) {
this.classid = classid;
}
public String getPicpath() {
return picpath;
}
public void setPicpath(String picpath) {
this.picpath = picpath;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
@Temporal(TemporalType.TIMESTAMP)
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
\ No newline at end of file
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.alibaba.fastjson.JSONObject;
import com.spacetech.common.entity.IdEntity;
import com.spacetech.common.utils.DateUtil;
@Entity
@Table(name = "growth_classcircle")
public class GrowthClasscircle extends IdEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = -208428228796765417L;
private String wlzyid;
private String content;
private Long stuid;
private String growthid;
private Long campusid;
private Long creatorid;
private Date createTime;
private Date updateTime;
public String getWlzyid() {
return wlzyid;
}
public void setWlzyid(String wlzyid) {
this.wlzyid = wlzyid;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Transient
public JSONObject toJson() {
JSONObject classcircleJson = new JSONObject();
classcircleJson.put("id", id);
classcircleJson.put("wlzyid", wlzyid);
classcircleJson.put("content", content);
classcircleJson.put("stuid", stuid);
classcircleJson.put("growthid", growthid);
classcircleJson.put("createTime", DateUtil.dateToNormalString(createTime));
return classcircleJson;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_common_module")
public class GrowthCommonModule extends IdEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1967913855682127432L;
private String growthid;
private String moduleid;
private Integer phaseNum;
private Long stuid;
private Long classid;
private String content;
private Long campusid;
private Long creatorid;
private Date createTime;
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public String getModuleid() {
return moduleid;
}
public void setModuleid(String moduleid) {
this.moduleid = moduleid;
}
public Integer getPhaseNum() {
return phaseNum;
}
public void setPhaseNum(Integer phaseNum) {
this.phaseNum = phaseNum;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public Long getClassid() {
return classid;
}
public void setClassid(Long classid) {
this.classid = classid;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_daily")
public class GrowthDaily extends IdEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = 3584967781417691807L;
private String growthid;
private Long stuid;
private String content;
private String publisherName;
private Long publisherid;
private String picpath;
private Long campusid;
private Long creatorid;
private Date createTime;
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getPublisherName() {
return publisherName;
}
public void setPublisherName(String publisherName) {
this.publisherName = publisherName;
}
public Long getPublisherid() {
return publisherid;
}
public void setPublisherid(Long publisherid) {
this.publisherid = publisherid;
}
public String getPicpath() {
return picpath;
}
public void setPicpath(String picpath) {
this.picpath = picpath;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_download")
public class GrowthDownload extends IdEntity implements Serializable {
public static final String STATE_NOTSTART = "notStart";
public static final String STATE_WAIT = "wait";// 待开始
public static final String STATE_ERROR = "error";// 截图失败
public static final String STATE_SCREEN_SUCCESS = "screen_success";// 截图成功
public static final String STATE_SUCCESS = "success";// 裁剪成功
public static final String STATE_CUT_ERROR = "cut_error";// 裁剪失败
public static final String STATE_PENDING = "pending";// 生成中
public static final String STATE_NOTSTART_STR = "未生成";
public static final String STATE_WAIT_STR = "待开始";
public static final String STATE_ERROR_STR = "生成失败";
public static final String STATE_SUCCESS_STR = "成功";
public static final String STATE_PENDING_STR = "生成中";
public static final String STATE_SCREEN_SUCCESS_STR="截图成功,等待裁剪";
public static final String STATE_CUT_ERROR_STR="裁剪失败";
/**
*
*/
private static final long serialVersionUID = 8445580239163763606L;
private Date createTime;
private Long campusid;
private Long creatorid;
private String growthid;
private Long stuid;
private String stuName;
private Long classid;
private String url;
private String msg;
private String state;
private String style;
private Date downloadTime;
private Date endTime;
private String className;
private String campusName;
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public String getStuName() {
return stuName;
}
public void setStuName(String stuName) {
this.stuName = stuName;
}
public Long getClassid() {
return classid;
}
public void setClassid(Long classid) {
this.classid = classid;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getStyle() {
return style;
}
public void setStyle(String style) {
this.style = style;
}
public Date getDownloadTime() {
return downloadTime;
}
public void setDownloadTime(Date downloadTime) {
this.downloadTime = downloadTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public String getCampusName() {
return campusName;
}
public void setCampusName(String campusName) {
this.campusName = campusName;
}
@Transient
public String getStateCh() {
if (state.equals(STATE_ERROR)) {
return STATE_ERROR_STR;
} else if (state.equals(STATE_NOTSTART)) {
return STATE_NOTSTART_STR;
} else if (state.equals(STATE_WAIT)) {
return STATE_WAIT_STR;
} else if (state.equals(STATE_SUCCESS)) {
return STATE_SUCCESS_STR;
} else if (state.equals(STATE_PENDING)) {
return STATE_PENDING_STR;
} else if (state.equals(STATE_SCREEN_SUCCESS)) {
return STATE_SCREEN_SUCCESS_STR;
} else if (state.equals(STATE_CUT_ERROR)) {
return STATE_CUT_ERROR_STR;
} else {
return "";
}
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_download_page")
public class GrowthDownloadPage extends IdEntity implements Serializable {
public static final String STATE_UPDATE = "update";
public static final String STATE_CREATE = "create";
public static final String STATE_DELETE = "delete";
/**
*
*/
private static final long serialVersionUID = -6316215467092562182L;
private Date createTime;
private Long campusid;
private Long creatorid;
private String downloadid;
private Integer pageIndex;
private String pageData;
private Date updateTime;
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public String getDownloadid() {
return downloadid;
}
public void setDownloadid(String downloadid) {
this.downloadid = downloadid;
}
public Integer getPageIndex() {
return pageIndex;
}
public void setPageIndex(Integer pageIndex) {
this.pageIndex = pageIndex;
}
public String getPageData() {
return pageData;
}
public void setPageData(String pageData) {
this.pageData = pageData;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_family")
public class GrowthFamily extends IdEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = 8058560194120268579L;
private String growthid;
private Long stuid;
private String fatherPicpath;
private String fatherName;
private String fatherPhone;
private String fatherCareer;
private String fatherLike;
private String motherPicpath;
private String motherName;
private String motherPhone;
private String motherCareer;
private String motherLike;
private String address;
private String familyPicpath;
private Long campusid;
private Long creatorid;
private Date createTime;
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public String getFatherPicpath() {
return fatherPicpath;
}
public void setFatherPicpath(String fatherPicpath) {
this.fatherPicpath = fatherPicpath;
}
public String getFatherName() {
return fatherName;
}
public void setFatherName(String fatherName) {
this.fatherName = fatherName;
}
public String getFatherPhone() {
return fatherPhone;
}
public void setFatherPhone(String fatherPhone) {
this.fatherPhone = fatherPhone;
}
public String getFatherCareer() {
return fatherCareer;
}
public void setFatherCareer(String fatherCareer) {
this.fatherCareer = fatherCareer;
}
public String getFatherLike() {
return fatherLike;
}
public void setFatherLike(String fatherLike) {
this.fatherLike = fatherLike;
}
public String getMotherPicpath() {
return motherPicpath;
}
public void setMotherPicpath(String motherPicpath) {
this.motherPicpath = motherPicpath;
}
public String getMotherName() {
return motherName;
}
public void setMotherName(String motherName) {
this.motherName = motherName;
}
public String getMotherPhone() {
return motherPhone;
}
public void setMotherPhone(String motherPhone) {
this.motherPhone = motherPhone;
}
public String getMotherCareer() {
return motherCareer;
}
public void setMotherCareer(String motherCareer) {
this.motherCareer = motherCareer;
}
public String getMotherLike() {
return motherLike;
}
public void setMotherLike(String motherLike) {
this.motherLike = motherLike;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getFamilyPicpath() {
return familyPicpath;
}
public void setFamilyPicpath(String familyPicpath) {
this.familyPicpath = familyPicpath;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.alibaba.fastjson.JSONObject;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_final_comment")
public class GrowthFinalComment extends IdEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = -108075291104662040L;
private String growthid;
private Long classid;
private Long stuid;
private String teacherComment;
private Long campusid;
private Long creatorid;
private Date createTime;
private String parentComment;
private String stuComment;
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getClassid() {
return classid;
}
public void setClassid(Long classid) {
this.classid = classid;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getTeacherComment() {
return teacherComment;
}
public void setTeacherComment(String teacherComment) {
this.teacherComment = teacherComment;
}
public String getParentComment() {
return parentComment;
}
public void setParentComment(String parentComment) {
this.parentComment = parentComment;
}
public String getStuComment() {
return stuComment;
}
public void setStuComment(String stuComment) {
this.stuComment = stuComment;
}
public JSONObject toJson() {
JSONObject result = new JSONObject();
result.put("id", id);
result.put("growthid", growthid);
result.put("classid", classid);
result.put("stuid", stuid);
result.put("teacherComment", teacherComment);
result.put("campusid", campusid);
result.put("parentComment", parentComment);
result.put("stuComment", stuComment);
return result;
}
}
package com.spacetech.entity;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "growth_health")
public class GrowthHealth implements java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
private String id;// 主键ID
private String growthid;// 成长档案总表ID
private Long stuid;// 学生ID
private Float height;// 身高
private Float weight;// 体重
private String leftSight;// 左视力
private String rightSight;// 右视力
private String picpath;
private Long campusid;// 校区ID
private Long creatorid; // 创建人ID
private Date createTime; // 创建时间
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public Float getHeight() {
return height;
}
public void setHeight(Float height) {
this.height = height;
}
public Float getWeight() {
return weight;
}
public void setWeight(Float weight) {
this.weight = weight;
}
public String getLeftSight() {
return leftSight;
}
public void setLeftSight(String leftSight) {
this.leftSight = leftSight;
}
public String getRightSight() {
return rightSight;
}
public void setRightSight(String rightSight) {
this.rightSight = rightSight;
}
public String getPicpath() {
return picpath;
}
public void setPicpath(String picpath) {
this.picpath = picpath;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import com.alibaba.fastjson.annotation.JSONField;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_holiday")
public class GrowthHoliday extends IdEntity implements Serializable {
private static final long serialVersionUID = 5812299174800654277L;
private String growthid;
private Long stuid;
private String happyThing;
private String wantDo;
private String content;
private Long campusid;
private Long creatorid;
private Date createTime;
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public String getHappyThing() {
return happyThing;
}
public void setHappyThing(String happyThing) {
this.happyThing = happyThing;
}
public String getWantDo() {
return wantDo;
}
public void setWantDo(String wantDo) {
this.wantDo = wantDo;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
@Temporal(TemporalType.TIMESTAMP)
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.spacetech.common.entity.IdEntity;
import com.spacetech.common.utils.DateUtil;
import com.spacetech.common.utils.StringUtil;
@Entity
@Table(name = "growth_index")
public class GrowthIndex extends IdEntity implements Serializable {
private static final long serialVersionUID = -9075522223107877860L;
//按考勤项目
public static final Integer TYPE_PROJECT = 2;
//按学生
public static final Integer TYPE_STUDENT = 1;
//期末考評
public static final String GROWTH_FINAL_INDEX = "final";
//期初考評
public static final String GROWTH_INITIAL_INDEX = "initial";
private String growthid; // 成长档案总表ID
private String termcode; // 学期
private Long gradeid; // 年级ID
private Long stuid; // 学生ID
private String indexid; // 指标ID
private String recordid; // 成长记录期次ID
private String indexLevelid; // 指标等级ID
private Integer phaseNum; // 期次;默认值为0
private Long campusid; // 校区ID
private Long creatorid; // 创建人ID
private Date createTime;
private String phaseMonth;
private String type; // 期末:final 期初:initial 月评:month
public GrowthIndex() {
}
public GrowthIndex(JSONObject index,JSONObject params) {
this.id = StringUtil.isNullOrEmpty(index.getString("id"))
? StringUtil.getNullStr(StringUtil.getBigId())
: index.getString("id");
this.growthid = params.getString("growthid");
this.phaseMonth = StringUtil.getNullStr(params.getString("phaseMonth"));
this.campusid = params.getLong("campusid");
this.termcode = params.getString("termcode");
this.gradeid = params.getLong("gradeid");
this.stuid = index.getLong("stuid");
this.indexid = params.getString("indexid");
this.indexLevelid = index.getString("indexLevelid");
this.phaseNum = StringUtil.getNullInt(params.getInteger("phaseNum"));
this.creatorid = params.getLong("userid");
this.createTime = DateUtil.getCurrentTimeDate();
this.type = params.getString("type");
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public String getTermcode() {
return termcode;
}
public void setTermcode(String termcode) {
this.termcode = termcode;
}
public Long getGradeid() {
return gradeid;
}
public void setGradeid(Long gradeid) {
this.gradeid = gradeid;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public String getIndexid() {
return indexid;
}
public void setIndexid(String indexid) {
this.indexid = indexid;
}
public String getRecordid() {
return recordid;
}
public void setRecordid(String recordid) {
this.recordid = recordid;
}
public String getIndexLevelid() {
return indexLevelid;
}
public void setIndexLevelid(String indexLevelid) {
this.indexLevelid = indexLevelid;
}
public Integer getPhaseNum() {
return phaseNum;
}
public void setPhaseNum(Integer phaseNum) {
this.phaseNum = phaseNum;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
@Temporal(TemporalType.TIMESTAMP)
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getPhaseMonth() {
return phaseMonth;
}
public void setPhaseMonth(String phaseMonth) {
this.phaseMonth = phaseMonth;
}
}
package com.spacetech.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import com.alibaba.fastjson.annotation.JSONField;
import com.spacetech.common.utils.StringUtil;
@Entity
@Table(name = "growth_index_config")
public class GrowthIndexConfig implements java.io.Serializable {
private static final long serialVersionUID = -9075522223107877860L;
public static final Integer PERMISSION_TEACHER = 1;
public static final Integer PERMISSION_USER = 2;
public static final Integer FINAL_PHASENUM = 0;
public static final String FINAL_RECORDCONFIGID = "0";
public static final String TYPE_FINAL = "final";
public static final String TYPE_INITIAL = "initial";
public static final String TYPE_MONTH = "month";
@Id
private String id;
private String recordConfigid; // 成长记录期次ID
private Integer phaseNum; // 期次
private String growthid;
private String termcode; // 学期
private Long gradeid; // 年级
private String indexid; // 考评项ID
private Integer permission; // 填写权限;1:老师;2:家长3:期末考
private Long campusid; // 校区ID
private Long creatorid; // 创建人ID
private Date createTime; // 创建时间
private String phaseMonth;
private String type;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getRecordConfigid() {
return recordConfigid;
}
public void setRecordConfigid(String recordConfigid) {
this.recordConfigid = recordConfigid;
}
public Integer getPhaseNum() {
return phaseNum;
}
public void setPhaseNum(Integer phaseNum) {
this.phaseNum = phaseNum;
}
public String getTermcode() {
return termcode;
}
public void setTermcode(String termcode) {
this.termcode = termcode;
}
public Long getGradeid() {
return gradeid;
}
public void setGradeid(Long gradeid) {
this.gradeid = gradeid;
}
public String getIndexid() {
return indexid;
}
public void setIndexid(String indexid) {
this.indexid = indexid;
}
public Integer getPermission() {
return permission;
}
public void setPermission(Integer permission) {
this.permission = permission;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
@Temporal(TemporalType.TIMESTAMP)
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Transient
public void setRecord(GrowthRecordConfig growthRecordConfig) {
id = StringUtil.guid();
recordConfigid = growthRecordConfig.getId();
phaseNum = growthRecordConfig.getPhaseNum();
termcode = growthRecordConfig.getTermcode();
gradeid = growthRecordConfig.getGradeid();
campusid = growthRecordConfig.getCampusid();
creatorid = growthRecordConfig.getCreatorid();
growthid = growthRecordConfig.getGrowthid();
phaseMonth = growthRecordConfig.getMonth();
createTime = new Date();
}
@Transient
public static List<Integer> getMonth() {
List<Integer> monthList = new ArrayList<>();
monthList.add(PERMISSION_TEACHER);
monthList.add(PERMISSION_USER);
return monthList;
}
public String getPhaseMonth() {
return phaseMonth;
}
public void setPhaseMonth(String phaseMonth) {
this.phaseMonth = phaseMonth;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_layout")
public class GrowthLayout extends IdEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = -5269733513714855131L;
private String title;
private String code;
private String picpath;
private String csspath;
private Integer orderid;
private String type;
private Long campusid;
private Long creatorid;
private Date createTime;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getPicpath() {
return picpath;
}
public void setPicpath(String picpath) {
this.picpath = picpath;
}
public String getCsspath() {
return csspath;
}
public void setCsspath(String csspath) {
this.csspath = csspath;
}
public Integer getOrderid() {
return orderid;
}
public void setOrderid(Integer orderid) {
this.orderid = orderid;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_memory")
public class GrowthMemory extends IdEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = 7135102989414623639L;
private String growthid;
private String commentMyself;
private String happyThing;
private String commentTeacher;
private String sadThing;
private String wantDo;
private String game;
private String notDo;
private String bestFriend;
private Long campusid;
private Long stuid;
private Long creatorid;
private Date createTime;
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public String getCommentMyself() {
return commentMyself;
}
public void setCommentMyself(String commentMyself) {
this.commentMyself = commentMyself;
}
public String getHappyThing() {
return happyThing;
}
public void setHappyThing(String happyThing) {
this.happyThing = happyThing;
}
public String getCommentTeacher() {
return commentTeacher;
}
public void setCommentTeacher(String commentTeacher) {
this.commentTeacher = commentTeacher;
}
public String getSadThing() {
return sadThing;
}
public void setSadThing(String sadThing) {
this.sadThing = sadThing;
}
public String getWantDo() {
return wantDo;
}
public void setWantDo(String wantDo) {
this.wantDo = wantDo;
}
public String getGame() {
return game;
}
public void setGame(String game) {
this.game = game;
}
public String getNotDo() {
return notDo;
}
public void setNotDo(String notDo) {
this.notDo = notDo;
}
public String getBestFriend() {
return bestFriend;
}
public void setBestFriend(String bestFriend) {
this.bestFriend = bestFriend;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import com.alibaba.fastjson.annotation.JSONField;
@Entity
@Table(name = "growth_module")
public class GrowthModule implements java.io.Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@Id
private String id; // 主键ID
private String growthid;// 成长档案总表ID
private String moduleid;// 成长档案模块项ID
private String alias;// 别名
private Integer orderid;// 排序字段;默认值1000
private Long campusid;// 校区ID
private Long creatorid; // 创建人ID
private Date createTime; // 创建时间
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public String getModuleid() {
return moduleid;
}
public void setModuleid(String moduleid) {
this.moduleid = moduleid;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public Integer getOrderid() {
return orderid;
}
public void setOrderid(Integer orderid) {
this.orderid = orderid;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
@Temporal(TemporalType.TIMESTAMP)
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.alibaba.fastjson.JSONObject;
import com.spacetech.common.entity.IdEntity;
import com.spacetech.common.exception.ApiException;
import com.spacetech.common.utils.DateUtil;
import com.spacetech.common.utils.StringUtil;
@Entity
@Table(name = "growth_module_picture")
public class GrowthModulePicture extends IdEntity implements java.io.Serializable {
private static final long serialVersionUID = -3892003119416678981L;
public static final String COMMON_GROWTHID = "";
public static final Long COMMON_CAMPUSID = 0L;
public static final String PC_TYPE = "PC";
public static final String MOBILE_TYPE = "MOBILE";
private String name;
private String picpath;
private String mobilePicpath;
private String styleCode;
private String growthid;
private String moduleid;
private Integer orderid;
private Long campusid;
private Long creatorid;
private Date createTime;
public GrowthModulePicture() {
}
public GrowthModulePicture(GrowthModulePicture growthModulePicture, JSONObject params) {
this.id = StringUtil.guid();
this.name = growthModulePicture.getName();
this.styleCode = growthModulePicture.getStyleCode();
this.growthid = params.getString("growthid");
this.moduleid = growthModulePicture.getModuleid();
this.orderid = growthModulePicture.getOrderid();
this.campusid = params.getLong("campusid");
this.creatorid = StringUtil.getNullLong(params.getString("userid"));
this.createTime = DateUtil.getCurrentTimeDate();
if (StringUtil.getNullStr(params.getString("moduleid")).equals(growthModulePicture.getModuleid())) {
this.picpath = params.getString("picpath");
this.mobilePicpath = params.getString("mobilePicpath");
} else {
this.picpath = growthModulePicture.getPicpath();
this.mobilePicpath = growthModulePicture.getMobilePicpath();
}
}
public String getMobilePicpath() {
return mobilePicpath;
}
public void setMobilePicpath(String mobilePicpath) {
this.mobilePicpath = mobilePicpath;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPicpath() {
return picpath;
}
public void setPicpath(String picpath) {
this.picpath = picpath;
}
public String getStyleCode() {
return styleCode;
}
public void setStyleCode(String styleCode) {
this.styleCode = styleCode;
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public String getModuleid() {
return moduleid;
}
public void setModuleid(String moduleid) {
this.moduleid = moduleid;
}
public Integer getOrderid() {
return orderid;
}
public void setOrderid(Integer orderid) {
this.orderid = orderid;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Transient
public JSONObject toJson(String type) {
JSONObject growthModulePictureJson = new JSONObject();
growthModulePictureJson.put("name", this.getName());
if (PC_TYPE.equals(type)) {
growthModulePictureJson.put("picpath", this.getPicpath());
} else if (MOBILE_TYPE.equals(type)) {
growthModulePictureJson.put("picpath", this.getMobilePicpath());
} else {
throw new ApiException("类型不存在 !");
}
return growthModulePictureJson;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.alibaba.fastjson.JSONObject;
import com.spacetech.common.entity.IdEntity;
import com.spacetech.common.utils.DateUtil;
import com.spacetech.common.utils.StringUtil;
@Entity
@Table(name = "growth_phase_config")
public class GrowthPhaseConfig extends IdEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = -8251382037337669504L;
private String moduleid;
private Integer count;
private String phaseMonth;
private Long campusid;
private Long creatorid;
private Date createTime;
public GrowthPhaseConfig() {
}
public GrowthPhaseConfig(JSONObject params) {
this.setId(StringUtil.guid());
this.setModuleid(params.getString("moduleid"));
this.setCount(params.getInteger("count"));
this.setCampusid(params.getLong("campusid"));
this.setCreatorid(params.getLong("userid"));
this.setCreateTime(DateUtil.getCurrentTimeDate());
}
public String getModuleid() {
return moduleid;
}
public void setModuleid(String moduleid) {
this.moduleid = moduleid;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getPhaseMonth() {
return phaseMonth;
}
public void setPhaseMonth(String phaseMonth) {
this.phaseMonth = phaseMonth;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import com.spacetech.common.utils.DateUtil;
@Entity
@Table(name = "growth_phase_stu")
public class GrowthPhaseStu implements Serializable {
private static final long serialVersionUID = 7464182786027242498L;
private Long id;
private String growthid;
private Long stuid;
private Long classid;
private String moduleid;
private Integer phaseNum;
private Integer userType;
private Long campusid;
private Long creatorid;
private Date createTime;
public GrowthPhaseStu() {
}
public GrowthPhaseStu(String growthid, Long stuid, Long classid, String moduleid, Integer phaseNum,
Integer userType, Long campusid, Long creatorid) {
this.growthid = growthid;
this.stuid = stuid;
this.classid = classid;
this.moduleid = moduleid;
this.phaseNum = phaseNum;
this.userType = userType;
this.campusid = campusid;
this.creatorid = creatorid;
this.createTime = DateUtil.getCurrentTimeDate();
}
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public Long getClassid() {
return classid;
}
public void setClassid(Long classid) {
this.classid = classid;
}
public String getModuleid() {
return moduleid;
}
public void setModuleid(String moduleid) {
this.moduleid = moduleid;
}
public Integer getPhaseNum() {
return phaseNum;
}
public void setPhaseNum(Integer phaseNum) {
this.phaseNum = phaseNum;
}
public Integer getUserType() {
return userType;
}
public void setUserType(Integer userType) {
this.userType = userType;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import com.alibaba.fastjson.annotation.JSONField;
import com.spacetech.common.entity.IdEntity;
@Entity
@Table(name = "growth_picture")
public class GrowthPicture extends IdEntity implements Serializable {
public static final int PIC_LIMIT_SIZE = 9;
private static final long serialVersionUID = 8717421122178994470L;
private String picpath; //图片地址
private String dataid; //数据ID
private String moduleid;//成长档案模块ID
private Long campusid;//校区ID
private Long creatorid;//创建人ID
private String growthid;
private Date createTime;
private Integer orderid;
public Integer getOrderid() {
return orderid;
}
public void setOrderid(Integer orderid) {
this.orderid = orderid;
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public String getPicpath() {
return picpath;
}
public void setPicpath(String picpath) {
this.picpath = picpath;
}
public String getDataid() {
return dataid;
}
public void setDataid(String dataid) {
this.dataid = dataid;
}
public String getModuleid() {
return moduleid;
}
public void setModuleid(String moduleid) {
this.moduleid = moduleid;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
@Temporal(TemporalType.TIMESTAMP)
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.spacetech.common.entity.IdLongEntity;
import com.spacetech.common.utils.DateUtil;
import com.spacetech.common.utils.StringUtil;
@Entity
@Table(name = "growth_push")
public class GrowthPush extends IdLongEntity implements Serializable {
private static final long serialVersionUID = 8502609886717263527L;
private String growthid;
private Long classid;
private Long campusid;
private Long creatorid;
private Date createTime;
public GrowthPush() {
}
public GrowthPush(String growthid, Long classid, Long campusid, Long creatorid) {
this.id = StringUtil.getBigIntId();
this.growthid = growthid;
this.classid = classid;
this.campusid = campusid;
this.creatorid = creatorid;
this.createTime = DateUtil.getCurrentTimeDate();
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getClassid() {
return classid;
}
public void setClassid(Long classid) {
this.classid = classid;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.spacetech.common.entity.IdLongEntity;
import com.spacetech.common.utils.DateUtil;
import com.spacetech.common.utils.StringUtil;
@Entity
@Table(name = "growth_push_module")
public class GrowthPushModule extends IdLongEntity implements Serializable {
private static final long serialVersionUID = 8502609886717263527L;
private String growthid;
private Long recordid;
private String moduleid;
private String moduleTitle;
private Integer phaseIndex;
private Long campusid;
private Long creatorid;
private Date createTime;
public GrowthPushModule() {
}
public GrowthPushModule(String growthid, Long recordid, String moduleid, String moduleTitle, Integer phaseIndex,
Long campusid, Long creatorid) {
this.id = StringUtil.getBigIntId();
this.growthid = growthid;
this.recordid = recordid;
this.moduleid = moduleid;
this.moduleTitle = moduleTitle;
this.phaseIndex = phaseIndex;
this.campusid = campusid;
this.creatorid = creatorid;
this.createTime = DateUtil.getCurrentTimeDate();
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getRecordid() {
return recordid;
}
public void setRecordid(Long recordid) {
this.recordid = recordid;
}
public String getModuleid() {
return moduleid;
}
public void setModuleid(String moduleid) {
this.moduleid = moduleid;
}
public String getModuleTitle() {
return moduleTitle;
}
public void setModuleTitle(String moduleTitle) {
this.moduleTitle = moduleTitle;
}
public Integer getPhaseIndex() {
return phaseIndex;
}
public void setPhaseIndex(Integer phaseIndex) {
this.phaseIndex = phaseIndex;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.spacetech.entity;
import com.spacetech.common.entity.IdLongEntity;
import com.spacetech.common.utils.DateUtil;
import com.spacetech.common.utils.StringUtil;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
@Entity
@Table(name = "growth_push_stu")
public class GrowthPushStu extends IdLongEntity implements Serializable {
private static final long serialVersionUID = 8502609886717263527L;
private String growthid;
private Long recordid;
private Long stuid;
private Boolean isread;
private Long campusid;
private Long creatorid;
private Date createTime;
public GrowthPushStu() {
}
public GrowthPushStu(String growthid, Long recordid, Long stuid, Long campusid, Long creatorid) {
this.id = StringUtil.getBigIntId();
this.growthid = growthid;
this.recordid = recordid;
this.stuid = stuid;
this.isread = false;
this.campusid = campusid;
this.creatorid = creatorid;
this.createTime = DateUtil.getCurrentTimeDate();
}
public String getGrowthid() {
return growthid;
}
public void setGrowthid(String growthid) {
this.growthid = growthid;
}
public Long getRecordid() {
return recordid;
}
public void setRecordid(Long recordid) {
this.recordid = recordid;
}
public Long getStuid() {
return stuid;
}
public void setStuid(Long stuid) {
this.stuid = stuid;
}
public Boolean getIsread() {
return isread;
}
public void setIsread(Boolean isread) {
this.isread = isread;
}
public Long getCampusid() {
return campusid;
}
public void setCampusid(Long campusid) {
this.campusid = campusid;
}
public Long getCreatorid() {
return creatorid;
}
public void setCreatorid(Long creatorid) {
this.creatorid = creatorid;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment