Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • B basic
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • edu-cloud-classroom
  • basic
  • Merge requests
  • !4

Merged
Created 4 years ago by lizhiqiang@lizhiqiangMaintainer

Lizhiqiang

  • Overview 0
  • Commits 2
  • Changes 11
  • lizhiqiang @lizhiqiang merged 4 years ago

    merged

  • lizhiqiang @lizhiqiang mentioned in commit 7196e592 4 years ago

    mentioned in commit 7196e592

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Compare
  • master (base)

and
  • latest version
    61da8201
    2 commits, 4 years ago

11 files
+ 83
- 7

    Preferences

    File browser
    Compare changes
basic-core-data/sr‎c/…/…/…/…/core/data‎
contr‎oller‎
TfclassLessonC‎ontroller.java‎ +15 -0
TfclassSchoolSemes‎terController.java‎ +15 -0
UnitBaseInfoC‎ontroller.java‎ +10 -3
map‎per‎
TfclassLess‎onMapper.xml‎ +5 -1
TfclassSchoolSe‎mesterMapper.xml‎ +5 -1
UnitBaseInf‎oMapper.xml‎ +4 -1
mo‎del‎
TfclassLe‎sson.java‎ +10 -0
TfclassSchool‎Semester.java‎ +10 -0
ser‎vice‎
im‎pl‎
TfclassLessonS‎erviceImpl.java‎ +6 -0
UnitBaseInfoSe‎rviceImpl.java‎ +1 -1
TfclassLesso‎nService.java‎ +2 -0
basic-core-data/src/main/java/com/basic/core/data/controller/TfclassLessonController.java
+ 15
- 0
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -107,6 +107,21 @@ public class TfclassLessonController {
return JsonUtils.resultSuccess("修改成功");
}
/**
* 禁用课节
* @param tfclassLesson
* @return
*/
@RequestMapping(value = "/editTfclassLesson",method = RequestMethod.POST)
public JSONObject editTfclassLesson(@RequestBody TfclassLesson tfclassLesson){
int flag = tfclassLessonService.editByCondition(tfclassLesson);
if(flag>0){
return JsonUtils.resultSuccess("修改成功");
}else{
return JsonUtils.resultError("修改失败");
}
}
/**
* 显示第几课节
* @param startingTime
basic-core-data/src/main/java/com/basic/core/data/controller/TfclassLessonController.java
+ 15
- 0
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -107,6 +107,21 @@ public class TfclassLessonController {
return JsonUtils.resultSuccess("修改成功");
}
/**
* 禁用课节
* @param tfclassLesson
* @return
*/
@RequestMapping(value = "/editTfclassLesson",method = RequestMethod.POST)
public JSONObject editTfclassLesson(@RequestBody TfclassLesson tfclassLesson){
int flag = tfclassLessonService.editByCondition(tfclassLesson);
if(flag>0){
return JsonUtils.resultSuccess("修改成功");
}else{
return JsonUtils.resultError("修改失败");
}
}
/**
* 显示第几课节
* @param startingTime
basic-core-data/src/main/java/com/basic/core/data/controller/TfclassSchoolSemesterController.java
+ 15
- 0
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -101,6 +101,21 @@ public class TfclassSchoolSemesterController {
return result;
}
/**
* 禁用学期
* @param tfclassSchoolSemester
* @return
*/
@RequestMapping(value = "/editTfclassSchoolSemester",method = RequestMethod.POST)
public JSONObject editTfclassSchoolSemester(@RequestBody TfclassSchoolSemester tfclassSchoolSemester){
boolean flag = tfclassSchoolSemesterService.update(tfclassSchoolSemester);
if (flag){
return JsonUtils.resultSuccess("修改成功");
}else{
return JsonUtils.resultError("修改失败");
}
}
/**
* 删除学期
* @param id
basic-core-data/src/main/java/com/basic/core/data/controller/UnitBaseInfoController.java
+ 10
- 3
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -120,7 +120,7 @@ public class UnitBaseInfoController {
@RequestMapping(value = "/deleteUnitBaseInfo",method = RequestMethod.GET)
public JSONObject deleteUnitBaseInfo(@RequestParam String id){
UnitBaseInfo unitBaseInfo = unitBaseInfoService.getById(id);
List<UnitBaseInfo> clientUnitBaseInfo= unitBaseInfoService.getByFatherId(id);
List<UnitBaseInfo> clientUnitBaseInfo= unitBaseInfoService.getByFatherId(id);//判断是否有子院系没有禁用
if(clientUnitBaseInfo != null && clientUnitBaseInfo.size() > 0){
return JsonUtils.resultError("请先删除子院系!");
}
@@ -134,9 +134,16 @@ public class UnitBaseInfoController {
*/
@RequestMapping(value = "/editUnitBaseInfoByCondition",method = RequestMethod.POST)
public JSONObject editByCondition(@RequestBody UnitBaseInfo unitBaseInfo){
List<UnitBaseInfo> clientUnitBaseInfo= unitBaseInfoService.getByFatherId(unitBaseInfo.getId());
Map<String,Object> map = new HashMap<>();
map.put("fatherId",unitBaseInfo.getId());
map.put("disabled",false);
List<UnitBaseInfo> clientUnitBaseInfo= unitBaseInfoService.getByCondition(map);
if(clientUnitBaseInfo != null && clientUnitBaseInfo.size() > 0){
return JsonUtils.resultError("请先删除子院系!");
for (int i = 0; i < clientUnitBaseInfo.size(); i++) {
if (!clientUnitBaseInfo.get(i).getDisabled()){
return JsonUtils.resultError("请先删除子院系!");
}
}
}
int flag = unitBaseInfoService.editByCondition(unitBaseInfo);
if(flag>0){
basic-core-data/src/main/java/com/basic/core/data/mapper/TfclassLessonMapper.xml
+ 5
- 1
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -9,9 +9,10 @@
<result column="time_len" property="timeLen" jdbcType="INTEGER" />
<result column="weights" property="weights" jdbcType="INTEGER" />
<result column="status" property="status" jdbcType="BIT" />
<result column="disabled" property="disabled" jdbcType="SMALLINT" />
</resultMap>
<sql id="Base_Column_List" >
id, lesson_num, starting_time, end_Time, time_len, weights,status
id, lesson_num, starting_time, end_Time, time_len, weights,status, disabled
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
@@ -101,6 +102,9 @@
<if test="status != null">
status = #{status,jdbcType=BIT},
</if>
<if test="disabled != null" >
disabled = #{disabled,jdbcType=SMALLINT},
</if>
</set>
where id = #{id,jdbcType=CHAR}
</update>
basic-core-data/src/main/java/com/basic/core/data/mapper/TfclassSchoolSemesterMapper.xml
+ 5
- 1
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -11,11 +11,12 @@
<result column="end_date" property="endDate" jdbcType="DATE" />
<result column="weeks" property="weeks" jdbcType="INTEGER" />
<result column="effective" property="effective" jdbcType="BIT" />
<result column="disabled" property="disabled" jdbcType="SMALLINT" />
<result column="remarks" property="remarks" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, year_id, semester, semester_name, start_date, start_course_date, end_date, weeks,
effective, remarks
effective, remarks, disabled
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
@@ -134,6 +135,9 @@
<if test="remarks != null" >
remarks = #{remarks,jdbcType=VARCHAR},
</if>
<if test="disabled != null" >
disabled = #{disabled,jdbcType=SMALLINT},
</if>
</set>
where id = #{id,jdbcType=CHAR}
</update>
basic-core-data/src/main/java/com/basic/core/data/mapper/UnitBaseInfoMapper.xml
+ 4
- 1
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -372,7 +372,7 @@
<select id="findByFatherId" resultMap="UnitBaseInfoMap" parameterType="java.lang.String">
SELECT <include refid="Base_Column_List"/> from
tb_unit_base_info where father_id= #{id,jdbcType=VARCHAR} and disabled = 0 ORDER by unit_number
tb_unit_base_info where father_id= #{id,jdbcType=VARCHAR} ORDER by unit_number
</select>
<select id="findByCondition" resultMap="UnitBaseInfoMap" parameterType="java.util.Map">
@@ -396,6 +396,9 @@
<if test="disabled != null">
and disabled =#{disabled,jdbcType=SMALLINT}
</if>
<if test="fatherId != null">
and father_id = #{fatherId,jdbcType=VARCHAR}
</if>
ORDER by unit_number
</select>
<select id="findIdByCode" resultMap="UnitBaseInfoMap" parameterType="java.lang.String" >
basic-core-data/src/main/java/com/basic/core/data/model/TfclassLesson.java
+ 10
- 0
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -25,6 +25,8 @@ public class TfclassLesson {
private Boolean status;
private Boolean disabled;
public String getId() {
return id;
}
@@ -80,4 +82,12 @@ public class TfclassLesson {
public void setStatus(Boolean status) {
this.status = status;
}
public Boolean getDisabled() {
return disabled;
}
public void setDisabled(Boolean disabled) {
this.disabled = disabled;
}
}
\ No newline at end of file
basic-core-data/src/main/java/com/basic/core/data/model/TfclassSchoolSemester.java
+ 10
- 0
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -28,6 +28,8 @@ public class TfclassSchoolSemester {
private Boolean effective;
private Boolean disabled;
private String remarks;
public String getId() {
@@ -98,6 +100,14 @@ public class TfclassSchoolSemester {
return effective;
}
public Boolean getDisabled() {
return disabled;
}
public void setDisabled(Boolean disabled) {
this.disabled = disabled;
}
public void setEffective(Boolean effective) {
this.effective = effective;
}
basic-core-data/src/main/java/com/basic/core/data/service/impl/TfclassLessonServiceImpl.java
+ 6
- 0
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -67,6 +67,11 @@ public class TfclassLessonServiceImpl implements TfclassLessonService {
return tfclassLessonDao.findByCondition(map);
}
@Override
public int editByCondition(TfclassLesson tfclassLesson) {
return tfclassLessonDao.updateByPrimaryKeySelective(tfclassLesson);
}
public void updateLessonNum(){
Map<String,Object> map = new HashMap<>(1);
map.put("status",false);
@@ -77,4 +82,5 @@ public class TfclassLessonServiceImpl implements TfclassLessonService {
tfclassLessonDao.updateByPrimaryKeySelective(tfclassLesson);
}
}
}
basic-core-data/src/main/java/com/basic/core/data/service/impl/UnitBaseInfoServiceImpl.java
+ 1
- 1
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -26,7 +26,7 @@ public class UnitBaseInfoServiceImpl implements UnitBaseInfoService {
@Override
public UnitBaseInfo getAllUnitBaseInfoTree(String id) {
UnitBaseInfo unitBaseInfo = unitBaseInfoDao.findUnitById(id);
List<UnitBaseInfo> childUnitBaseInfo = unitBaseInfoDao.findByFatherId(id);
List<UnitBaseInfo> childUnitBaseInfo = unitBaseInfoDao.findByFatherId(id);//通过FatherId查询所有
//遍历子节点
if(childUnitBaseInfo != null){
for(UnitBaseInfo child : childUnitBaseInfo){
basic-core-data/src/main/java/com/basic/core/data/service/TfclassLessonService.java
+ 2
- 0
  • View file @ 61da8201

  • Edit in single-file editor

  • Edit in Web IDE


@@ -50,4 +50,6 @@ public interface TfclassLessonService {
* @return
*/
List<TfclassLesson> getByCondition(Map<String,Object> map);
int editByCondition(TfclassLesson tfclassLesson);
}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Milestone
No milestone
None
None
Time tracking
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Lock merge request
Unlocked
participants
Reference:
Source branch: lizhiqiang

Menu

Projects Groups Snippets
Help