Commit 29e2bb9c authored by hanshuai's avatar hanshuai

hanshuai stop/start

parent ab5397c2
......@@ -72,4 +72,5 @@ public class BArrangeController extends PaginationController<BArrange> {
MessageConstant.MESSAGE_ALERT_ERROR,
data.getInfluenceReason());
}
}
package org.rcisoft.business.barrange.dao;
import org.apache.ibatis.annotations.Insert;
import org.rcisoft.business.barrange.entity.ScheduleDto;
import org.rcisoft.business.bsubtask.entity.BSubtask;
import org.rcisoft.core.base.BaseMapper;
import org.rcisoft.business.barrange.entity.BArrange;
import org.apache.ibatis.annotations.ResultMap;
......@@ -43,5 +45,8 @@ public interface BArrangeRepository extends BaseMapper<BArrange> {
List<BArrange> queryBArranges2(String gradeCode);
int insertList(ArrayList<ScheduleDto> scheduleDtos);
@Insert("insert into b_subtask(name) values(#{name})")
void insertSubtask(BSubtask bSubtask);
}
......@@ -23,7 +23,7 @@ public class BArrange extends IdEntity<BArrange> {
private static final long serialVersionUID = -5524520301999990921L;
private String termCode;
private String desc;
private String description;
private String gradeCode;
......@@ -31,6 +31,8 @@ public class BArrange extends IdEntity<BArrange> {
private String status;
private String subtaskCode;
@Transient
private List<BArrange> childList;
......
......@@ -10,6 +10,8 @@ import org.rcisoft.business.blesson.dao.BLessonRepository;
import org.rcisoft.business.blesson.entity.BLesson;
import org.rcisoft.business.brooms.dao.BRoomsRepository;
import org.rcisoft.business.brooms.entity.BRooms;
import org.rcisoft.business.bsubtask.dao.BSubtaskRepository;
import org.rcisoft.business.bsubtask.entity.BSubtask;
import org.rcisoft.core.exception.ServiceException;
import org.rcisoft.core.result.ResultServiceEnums;
import org.rcisoft.core.util.ExcelUtil;
......@@ -34,7 +36,6 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import sun.reflect.generics.repository.ClassRepository;
/**
* Created by on 2018-4-19 10:28:59.
......@@ -59,6 +60,8 @@ public class BArrangeServiceImpl implements BArrangeService {
@Autowired
private BRoomsRepository bRoomsRepository;
@Autowired
private BSubtaskRepository bSubtaskRepository;
/**
* 保存 bArrange
......@@ -68,10 +71,19 @@ public class BArrangeServiceImpl implements BArrangeService {
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel save(BArrange bArrange){
BSubtask bSubtask = new BSubtask();
bArrange.setCommonBusinessId();
//增加操作
UserUtil.setCurrentPersistOperation(bArrange);
int line = bArrangeRepository.insertSelective(bArrange);
String subTasks = bArrange.getSubtaskCode();
String[] subTask = subTasks.split(",");
for (String s : subTask){
bSubtask.setCommonBusinessId();
bSubtask.setName(s);
UserUtil.setCurrentPersistOperation(bSubtask);
bSubtaskRepository.insertSelective(bSubtask);
}
log.info(UserUtil.getUserInfoProp(bArrange.getToken(),UserUtil.USER_USERNAME)+"新增了ID为"+
bArrange.getBusinessId()+"的信息");
return new PersistModel(line);
......
......@@ -49,7 +49,7 @@ public interface BCourseCodeRepository extends BaseMapper<BCourseCode> {
* @param id
* @return
*/
@Select("select count(*) from b_course_code where business_id > #{id} and flag=1 and del_flag = 0 ")
@Select("select count(*) from b_course_code where business_id > 8 and flag=1 and del_flag = 0 ")
int select_flag_stop(int id);
/**
......
......@@ -47,7 +47,7 @@ public class BStudentController extends PaginationController<BStudent> {
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendCourse", value = "推荐原因(1-200)", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "gradeCode", value = "年级", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "gradeCode", value = "年级(1-64)", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "name", value = "姓名(1-15)", required = false, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "/add")
......
......@@ -56,6 +56,8 @@ public class BStudent extends IdEntity<BStudent> {
private String recommendCourse;
/*年级*/
@Length(min = 1,max = 64,message = "长度最小为1,最大为15")
@NotBlank
private String gradeCode;
@Length(min = 1,max = 15,message = "长度最小为1,最大为15")
......
......@@ -110,8 +110,9 @@ global:
licPath: /lk/license.lic
pubPath: /lk/publicCerts.store
password:
min_password: 6
max_password: 16
default: 123456
min_password: 6
max_password: 16
path:
base_upload_server_location: G:/education_res
physical_upload_server_location: G:/education_res
......
......@@ -11,10 +11,11 @@
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="term_code" jdbcType="VARCHAR" property="termCode"/>
<result column="desc" jdbcType="VARCHAR" property="desc"/>
<result column="description" jdbcType="VARCHAR" property="description"/>
<result column="grade_code" jdbcType="VARCHAR" property="gradeCode"/>
<result column="agency_code" jdbcType="VARCHAR" property="agencyCode"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="subtask_code" jdbcType="VARCHAR" property="subtaskCode"/>
</resultMap>
<resultMap id="BaseResultMap2" type="org.rcisoft.business.barrange.entity.BArrange">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
......
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