Commit b6f0a937 authored by YangZhaoJun1's avatar YangZhaoJun1

Merge branch 'V2.0.3' of http://103.249.252.28:90/lcy/education into V2.0.3

# Conflicts:
#	src/main/java/org/rcisoft/sys/role/dao/SysRoleRepository.java
parents 8fd158d1 d3529fda
...@@ -98,4 +98,10 @@ ADD COLUMN `sunday` varchar(64) NULL AFTER `sub_agency_id`; ...@@ -98,4 +98,10 @@ ADD COLUMN `sunday` varchar(64) NULL AFTER `sub_agency_id`;
ALTER TABLE `b_opinion` ALTER TABLE `b_opinion`
ADD COLUMN `sub_agency_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '子任务下教学单位id' AFTER `flag`; ADD COLUMN `sub_agency_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '子任务下教学单位id' AFTER `flag`;
/*子任务表新增排序*/
ALTER TABLE `b_subtask`
ADD COLUMN `subtask_seq` varchar(10) NULL AFTER `grade_code`;
/*子公司表新增排序*/
ALTER TABLE `b_sub_agency`
ADD COLUMN `sub_agency_seq` varchar(10) NULL AFTER `status`;
...@@ -172,4 +172,5 @@ public class BArrangeController extends PaginationController<BArrange> { ...@@ -172,4 +172,5 @@ public class BArrangeController extends PaginationController<BArrange> {
businessId); businessId);
} }
} }
...@@ -53,7 +53,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> { ...@@ -53,7 +53,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> {
@Select("<script>select name,business_id,status from b_subtask where 1=1 " @Select("<script>select name,business_id,status from b_subtask where 1=1 "
+ "and del_flag = 0 " + "and del_flag = 0 "
+ "and flag = 1 " + "and flag = 1 "
+ "and arrange_id = #{businessId} GROUP BY name order by create_date desc" + "and arrange_id = #{businessId} GROUP BY name order by subtask_seq "
+ "</script>") + "</script>")
@ResultMap(value = "bSubtaskResultMap") @ResultMap(value = "bSubtaskResultMap")
List<BSubtask> queryBSubtask(String businessId); List<BSubtask> queryBSubtask(String businessId);
...@@ -62,7 +62,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> { ...@@ -62,7 +62,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> {
+ "left join b_agency on b_sub_agency.agency_code = b_agency.code " + "left join b_agency on b_sub_agency.agency_code = b_agency.code "
+ "where 1=1 " + "where 1=1 "
+ "and b_sub_agency.del_flag = 0 " + "and b_sub_agency.del_flag = 0 "
+ "and b_sub_agency.flag = 1 and subtask_id = #{businessId}" + "and b_sub_agency.flag = 1 and subtask_id = #{businessId} order by sub_agency_seq"
+ "</script>") + "</script>")
@ResultMap(value = "BSubAgencyResultMap") @ResultMap(value = "BSubAgencyResultMap")
List<BSubtask> queryBSubtask1(String businessId); List<BSubtask> queryBSubtask1(String businessId);
...@@ -84,7 +84,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> { ...@@ -84,7 +84,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> {
"LEFT JOIN b_teacher on b_teacher.`code` = b_schedule_dto.teacher_code " + "LEFT JOIN b_teacher on b_teacher.`code` = b_schedule_dto.teacher_code " +
"LEFT JOIN s_user on s_user.login_name = b_teacher.`code` " + "LEFT JOIN s_user on s_user.login_name = b_teacher.`code` " +
"where sub_agency_id = #{subAgencyId} " + "where sub_agency_id = #{subAgencyId} " +
"ORDER BY class_code,week " + "ORDER BY lesson_code,class_code,teacher_code,week " +
//"GROUP BY lesson_code,teacher_code,class_code " + //"GROUP BY lesson_code,teacher_code,class_code " +
"</script>") "</script>")
@ResultMap(value = "scheduleDtoResultMap") @ResultMap(value = "scheduleDtoResultMap")
......
...@@ -27,6 +27,8 @@ public class BSubAgency extends IdEntity<BSubAgency> { ...@@ -27,6 +27,8 @@ public class BSubAgency extends IdEntity<BSubAgency> {
private String status; private String status;
private String subAgencySeq;
@Transient @Transient
private String agencyName; private String agencyName;
......
...@@ -37,12 +37,16 @@ public class BSubtask extends IdEntity<BSubtask> { ...@@ -37,12 +37,16 @@ public class BSubtask extends IdEntity<BSubtask> {
private String gradeCode; private String gradeCode;
private String subtaskSeq;
@Transient @Transient
private List<BSubAgency> childList; private List<BSubAgency> childList;
@Transient @Transient
private String agencyCode; private String agencyCode;
public BSubtask(String businessId, String status) { public BSubtask(String businessId, String status) {
this.businessId = businessId; this.businessId = businessId;
this.status = status; this.status = status;
......
...@@ -144,6 +144,7 @@ public class BArrangeServiceImpl implements BArrangeService { ...@@ -144,6 +144,7 @@ public class BArrangeServiceImpl implements BArrangeService {
bSubtask.setName(subtask.getString("name")); bSubtask.setName(subtask.getString("name"));
bSubtask.setArrangeId(bArrange.getBusinessId()); bSubtask.setArrangeId(bArrange.getBusinessId());
bSubtask.setStatus("0"); bSubtask.setStatus("0");
bSubtask.setSubtaskSeq(String.valueOf(i));
UserUtil.setCurrentPersistOperation(bSubtask); UserUtil.setCurrentPersistOperation(bSubtask);
subtaskList.add(bSubtask); subtaskList.add(bSubtask);
JSONArray childList2 = subtask.getJSONArray("childList"); JSONArray childList2 = subtask.getJSONArray("childList");
...@@ -151,6 +152,7 @@ public class BArrangeServiceImpl implements BArrangeService { ...@@ -151,6 +152,7 @@ public class BArrangeServiceImpl implements BArrangeService {
for(int j = 0; j < childList2.size() ; j++){ for(int j = 0; j < childList2.size() ; j++){
JSONObject agency = childList2.getJSONObject(j); JSONObject agency = childList2.getJSONObject(j);
BSubAgency bSubAgency = new BSubAgency(); BSubAgency bSubAgency = new BSubAgency();
bSubAgency.setSubAgencySeq(String.valueOf(j));
if (agency.get("agencyCode") != null && !agency.get("agencyCode").equals("")){ if (agency.get("agencyCode") != null && !agency.get("agencyCode").equals("")){
bSubAgency.setAgencyCode(agency.getString("agencyCode")); bSubAgency.setAgencyCode(agency.getString("agencyCode"));
bSubAgency.setStatus("0"); bSubAgency.setStatus("0");
...@@ -831,4 +833,5 @@ public class BArrangeServiceImpl implements BArrangeService { ...@@ -831,4 +833,5 @@ public class BArrangeServiceImpl implements BArrangeService {
return new PersistModel(1,bArrangeRepository.deleteArrange(businessId)); return new PersistModel(1,bArrangeRepository.deleteArrange(businessId));
} }
} }
...@@ -161,8 +161,7 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -161,8 +161,7 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiOperation(value="根据条件分页查询", notes="根据URL中的参数分页查询") @ApiOperation(value="根据条件分页查询", notes="根据URL中的参数分页查询")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "课程编号", required = false, dataType = "varchar"), @ApiImplicitParam(name = "code", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonName", value = "课程名称", required = false, dataType = "varchar"), @ApiImplicitParam(name = "condition", value = "模糊查询条件", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "directionId", value = "课程方向ID", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "classHour", value = "课时", required = false, dataType = "varchar"), @ApiImplicitParam(name = "classHour", value = "课时", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "credits", value = "学分", required = false, dataType = "varchar")}) @ApiImplicitParam(name = "credits", value = "学分", required = false, dataType = "varchar")})
@GetMapping(value = "/queryBLessonsByPagination") @GetMapping(value = "/queryBLessonsByPagination")
......
...@@ -30,9 +30,8 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -30,9 +30,8 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"left join b_lesson_direction bld on bld.lession_id = b.business_id " + "left join b_lesson_direction bld on bld.lession_id = b.business_id " +
"left join b_direction bd on bd.business_id = bld.direction_id "+ "left join b_direction bd on bd.business_id = bld.direction_id "+
"where b.del_flag != 1 and b.flag = 1 " + "where b.del_flag != 1 and b.flag = 1 " +
"<if test=\"lessonName!=null and lessonName != ''\">and b.`lesson_name` LIKE CONCAT('%',#{lessonName},'%') </if>"+
"<if test=\"directionId!=null and directionId != ''\">and bld.direction_id = #{directionId} </if>"+ "<if test=\"directionId!=null and directionId != ''\">and bld.direction_id = #{directionId} </if>"+
"<if test=\"code!=null and code != ''\">and b.`code` LIKE CONCAT('%',#{code},'%') </if></script>") "<if test=\"condition!=null and condition != ''\">and b.`code` LIKE CONCAT('%',#{condition},'%') or b.lesson_name LIKE CONCAT('%',#{condition},'%') </if></script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
List<BLesson> queryBLessons(BLesson param); List<BLesson> queryBLessons(BLesson param);
......
...@@ -51,6 +51,9 @@ public class BLesson extends IdEntity<BLesson> { ...@@ -51,6 +51,9 @@ public class BLesson extends IdEntity<BLesson> {
@Transient @Transient
private String chapterClassHour;//目前已添加总学时 private String chapterClassHour;//目前已添加总学时
@Transient
private String condition;//模糊查询条件
public BLesson(String code) { public BLesson(String code) {
this.code = code; this.code = code;
} }
......
...@@ -114,6 +114,9 @@ public class BRoomsController extends FileController<BRooms> { ...@@ -114,6 +114,9 @@ public class BRoomsController extends FileController<BRooms> {
} }
@ApiOperation(value="查看 集合", notes="查看单 集合") @ApiOperation(value="查看 集合", notes="查看单 集合")
@ApiImplicitParams({
@ApiImplicitParam(name = "condition", value = "condition", required = false, dataType = "varchar")
})
@GetMapping(value = "/queryBRoomsByPagination") @GetMapping(value = "/queryBRoomsByPagination")
public GridModel listByPagination(BRooms bRooms) { public GridModel listByPagination(BRooms bRooms) {
bRooms.setCreateBy(UserUtil.getUserInfoProp(getToken(),UserUtil.USER_ID)); bRooms.setCreateBy(UserUtil.getUserInfoProp(getToken(),UserUtil.USER_ID));
......
...@@ -23,8 +23,7 @@ public interface BRoomsRepository extends BaseMapper<BRooms> { ...@@ -23,8 +23,7 @@ public interface BRoomsRepository extends BaseMapper<BRooms> {
*/ */
@Select("<script>select * from b_rooms where 1=1 " @Select("<script>select * from b_rooms where 1=1 "
+ "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> " + "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+ "<if test=\"classroomName !=null and classroomName != '' \">and classroom_name like concat(concat(\"%\",#{classroomName}),\"%\") </if> " + "<if test=\"condition !=null and condition != '' \">and classroom_name like concat(concat(\"%\",#{condition}),\"%\") or code like concat(concat(\"%\",#{condition}),\"%\") </if> "
+ "<if test=\"code !=null and code != '' \">and code like concat(concat(\"%\",#{code}),\"%\") </if> "
+ "<if test=\"category !=null and category != '' \">and category = #{category} </if> " + "<if test=\"category !=null and category != '' \">and category = #{category} </if> "
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> " + "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+ "order by create_date desc" + "order by create_date desc"
......
...@@ -69,6 +69,9 @@ public class BRooms extends IdEntity<BRooms> { ...@@ -69,6 +69,9 @@ public class BRooms extends IdEntity<BRooms> {
@Transient @Transient
private String transitCategory; private String transitCategory;
@Transient
private String condition;//模糊查询条件
public BRooms(String code) { public BRooms(String code) {
this.code = code; this.code = code;
} }
......
...@@ -17,6 +17,7 @@ import org.rcisoft.business.bslschedule.entity.ScheduleResult; ...@@ -17,6 +17,7 @@ import org.rcisoft.business.bslschedule.entity.ScheduleResult;
import org.rcisoft.business.bslschedule.util.FindTime; import org.rcisoft.business.bslschedule.util.FindTime;
import org.rcisoft.business.bterm.dao.BTermRepository; import org.rcisoft.business.bterm.dao.BTermRepository;
import org.rcisoft.business.bterm.entity.BTerm; import org.rcisoft.business.bterm.entity.BTerm;
import org.rcisoft.business.bterm.utils.Week;
import org.rcisoft.core.exception.ServiceException; import org.rcisoft.core.exception.ServiceException;
import org.rcisoft.core.result.ResultServiceEnums; import org.rcisoft.core.result.ResultServiceEnums;
import org.rcisoft.core.util.ExcelUtil; import org.rcisoft.core.util.ExcelUtil;
...@@ -158,7 +159,11 @@ public class BSlScheduleServiceImpl implements BSlScheduleService { ...@@ -158,7 +159,11 @@ public class BSlScheduleServiceImpl implements BSlScheduleService {
public ScheduleResult queryMoreBSlSchedules(String week,String termCode1 , String subAgencyId) { public ScheduleResult queryMoreBSlSchedules(String week,String termCode1 , String subAgencyId) {
ScheduleResult scheduleResult = new ScheduleResult(); ScheduleResult scheduleResult = new ScheduleResult();
BTerm bTerm = bTermRepository.queryBtermByCode(termCode1).get(0); BTerm bTerm = bTermRepository.queryBtermByCode(termCode1).get(0);
scheduleResult.setWeekNum(bTerm.getWeek()); if(bTerm.getWeek() == null || bTerm.getWeek().equals("")){
scheduleResult.setWeekNum(String.valueOf(Week.buildList(bTerm.getStartDate(),bTerm.getEndDate()).size() + 1));
}else{
scheduleResult.setWeekNum(bTerm.getWeek());
}
Map<String,Date> map = FindTime.findTime(bTerm.getStartDate(),bTerm.getEndDate()); Map<String,Date> map = FindTime.findTime(bTerm.getStartDate(),bTerm.getEndDate());
Date min = new Date(); Date min = new Date();
//按周获取时间段 //按周获取时间段
......
...@@ -89,7 +89,7 @@ public class BStudentController extends PaginationController<BStudent> { ...@@ -89,7 +89,7 @@ public class BStudentController extends PaginationController<BStudent> {
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询学生信息") @ApiOperation(value="根据条件分页查询", notes="根据条件分页查询学生信息")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "学号", required = false, dataType = "varchar"), @ApiImplicitParam(name = "condition", value = "模糊查询条件", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"), @ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"), @ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"), @ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"),
......
...@@ -32,8 +32,7 @@ public interface BStudentRepository extends BaseMapper<BStudent> { ...@@ -32,8 +32,7 @@ public interface BStudentRepository extends BaseMapper<BStudent> {
"LEFT JOIN s_user u ON b.`code` = u.login_name\n" + "LEFT JOIN s_user u ON b.`code` = u.login_name\n" +
"LEFT JOIN b_grade bg ON b.grade_code = bg.`code`\n" + "LEFT JOIN b_grade bg ON b.grade_code = bg.`code`\n" +
"where b.del_flag != 1 and b.flag = 1 "+ "where b.del_flag != 1 and b.flag = 1 "+
"<if test=\"name!=null and name != ''\">and u.`name` like CONCAT('%',#{name},'%') </if>"+ "<if test=\"condition!=null and condition != ''\">and u.`name` like CONCAT('%',#{condition},'%') or b.`code` like CONCAT('%',#{condition},'%') </if>"+
"<if test=\"code!=null and code != ''\">and b.`code` like CONCAT('%',#{code},'%') </if>" +
"order by b.grade_code desc" + "order by b.grade_code desc" +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap" ) @ResultMap(value = "BaseResultMap" )
......
...@@ -86,5 +86,9 @@ public class BStudent extends IdEntity<BStudent> { ...@@ -86,5 +86,9 @@ public class BStudent extends IdEntity<BStudent> {
/**年级名称*/ /**年级名称*/
@Transient @Transient
private String gradeName; private String gradeName;
@Transient
private String condition;//模糊查询条件
} }
...@@ -102,7 +102,7 @@ public class BTeacherController extends PaginationController<BTeacher> { ...@@ -102,7 +102,7 @@ public class BTeacherController extends PaginationController<BTeacher> {
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询教师信息") @ApiOperation(value="根据条件分页查询", notes="根据条件分页查询教师信息")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "教师工号", required = false, dataType = "varchar"), @ApiImplicitParam(name = "condition", value = "模糊查询条件", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"), @ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"), @ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"), @ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"),
......
...@@ -16,7 +16,7 @@ public interface BTeacherRepository extends BaseMapper<BTeacher> { ...@@ -16,7 +16,7 @@ public interface BTeacherRepository extends BaseMapper<BTeacher> {
/** /**
* 根据条件查找 * 根据条件查找
* @param param * @param model
* @return * @return
*/ */
@Select("<script>SELECT b.`business_id`,b.`is_recommend`,b.`recommend_date`,b.`recommend_order`,b.`recommend_course`,b.`code`,\n" + @Select("<script>SELECT b.`business_id`,b.`is_recommend`,b.`recommend_date`,b.`recommend_order`,b.`recommend_course`,b.`code`,\n" +
...@@ -26,11 +26,10 @@ public interface BTeacherRepository extends BaseMapper<BTeacher> { ...@@ -26,11 +26,10 @@ public interface BTeacherRepository extends BaseMapper<BTeacher> {
"LEFT JOIN s_user u ON b.`code` = u.login_name\n" + "LEFT JOIN s_user u ON b.`code` = u.login_name\n" +
"LEFT JOIN b_agency ba ON b.agency_code = ba.`code`\n" + "LEFT JOIN b_agency ba ON b.agency_code = ba.`code`\n" +
"where b.del_flag != 1" + "where b.del_flag != 1" +
"<if test=\"name!=null\">and u.`name` like #{name}</if>"+ "<if test=\"condition != null and condition != ''\">and u.`name` like CONCAT('%',#{condition},'%') or b.`code` like CONCAT('%',#{condition},'%')</if>"+
"<if test=\"code!=null\">and b.`code` like #{code}</if>" +
"<if test=\"teacherCode!=null\">and b.`code` != #{teacherCode}</if></script>") "<if test=\"teacherCode!=null\">and b.`code` != #{teacherCode}</if></script>")
@ResultMap(value = "BaseResultMap" ) @ResultMap(value = "BaseResultMap" )
List<BTeacher> queryBTeachers(Map<String, Object> param); List<BTeacher> queryBTeachers(BTeacher model);
@Insert("<script>INSERT INTO b_teacher" + @Insert("<script>INSERT INTO b_teacher" +
"(create_date,update_date,create_by,update_by,remarks,del_flag,flag,business_id,code,agency_code)VALUES" + "(create_date,update_date,create_by,update_by,remarks,del_flag,flag,business_id,code,agency_code)VALUES" +
......
...@@ -72,6 +72,8 @@ public class BTeacher extends IdEntity<BTeacher> { ...@@ -72,6 +72,8 @@ public class BTeacher extends IdEntity<BTeacher> {
@Transient @Transient
private String agencyName; private String agencyName;
@Transient
private String condition;//模糊查询条件
public BTeacher(String code, String agencyCode) { public BTeacher(String code, String agencyCode) {
this.code = code; this.code = code;
......
...@@ -66,12 +66,13 @@ public class BTeacherServiceImpl implements BTeacherService { ...@@ -66,12 +66,13 @@ public class BTeacherServiceImpl implements BTeacherService {
@Override @Override
public List<BTeacher> queryBTeachersByPagination(PageUtil pageUtil, BTeacher model) { public List<BTeacher> queryBTeachersByPagination(PageUtil pageUtil, BTeacher model) {
return bTeacherRepository.queryBTeachers(queryParamHandler(model)); return bTeacherRepository.queryBTeachers(model);
} }
@Override @Override
public List<BTeacher> queryBTeachers(BTeacher model) { public List<BTeacher> queryBTeachers(BTeacher model) {
return bTeacherRepository.queryBTeachers(queryParamHandler(model)); return bTeacherRepository.queryBTeachers(model);
// return bTeacherRepository.queryBTeachers(queryParamHandler(model));
} }
@Override @Override
......
...@@ -57,6 +57,7 @@ public class BTermServiceImpl implements BTermService { ...@@ -57,6 +57,7 @@ public class BTermServiceImpl implements BTermService {
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public PersistModel persist(BTerm model, String token){ public PersistModel persist(BTerm model, String token){
int line = 0; int line = 0;
model.setWeek(String.valueOf(Week.buildList(model.getStartDate(),model.getEndDate()).size() + 1));
if(model.getBusinessId()!=null) { if(model.getBusinessId()!=null) {
UserUtil.setCurrentMergeOperation(model); UserUtil.setCurrentMergeOperation(model);
line = bTermRepository.updateByPrimaryKeySelective(model); line = bTermRepository.updateByPrimaryKeySelective(model);
......
...@@ -176,7 +176,7 @@ public enum ResultServiceEnums { ...@@ -176,7 +176,7 @@ public enum ResultServiceEnums {
STARTDATE_EQUAL_ENDDATE(94,"开始时间等于结束时间"), STARTDATE_EQUAL_ENDDATE(94,"开始时间等于结束时间"),
ROLE_HAS_USER(95,"仍然有绑定此角色的用户,不可删除此角色"), ROLE_HAS_USER(95,"该角色已被使用,不可删除"),
EXISE_ROOM_CODE(96,"此教室编号已存在,添加失败"), EXISE_ROOM_CODE(96,"此教室编号已存在,添加失败"),
......
...@@ -209,12 +209,24 @@ public interface SysRoleRepository extends BaseMapper<SysRole> { ...@@ -209,12 +209,24 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
* @param businessId * @param businessId
* @return * @return
*/ */
@Delete("DELETE " + @Delete("DELETE\n" +
"FROM " + "FROM\n" +
"s_r_user_role sr " + "\ts_r_user_role\n" +
"LEFT JOIN s_user s on s.business_id = sr.user_id " + "WHERE\n" +
"LEFT JOIN ${tb} c ON c. CODE = s.login_name " + "\ts_r_user_role.business_id = (\n" +
"WHERE" + "\t\tSELECT\n" +
"c.business_id = #{cid}") "\t\t\tab.*\n" +
"\t\tFROM\n" +
"\t\t\t(\n" +
"\t\t\t\tSELECT\n" +
"\t\t\t\t\ts_r_user_role.business_id\n" +
"\t\t\t\tFROM\n" +
"\t\t\t\t\ts_r_user_role\n" +
"\t\t\t\tLEFT JOIN s_user ON s_r_user_role.user_id = s_user.business_id\n" +
"\t\t\t\tLEFT JOIN ${tb} ON ${tb}.`code` = s_user.login_name\n" +
"\t\t\t\tWHERE\n" +
"\t\t\t\t\t${tb}.business_id = #{cid}\n" +
"\t\t\t) ab\n" +
"\t)")
int deleteUserRoleByChildrenId(@Param("tb") String tableByKey,@Param("cid") String businessId); int deleteUserRoleByChildrenId(@Param("tb") String tableByKey,@Param("cid") String businessId);
} }
...@@ -11,8 +11,8 @@ server: ...@@ -11,8 +11,8 @@ server:
# org.springframework.web: DEBUG # org.springframework.web: DEBUG
druid: druid:
url: jdbc:mysql://192.168.1.125:13318/new_edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false #url: jdbc:mysql://192.168.1.125:13318/new_edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
# url: jdbc:mysql://127.0.0.1:3306/new_edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false url: jdbc:mysql://127.0.0.1:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username: root username: root
password: 123456 password: 123456
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<result column="term_code" jdbcType="VARCHAR" property="termCode"/> <result column="term_code" jdbcType="VARCHAR" property="termCode"/>
<result column="description" jdbcType="VARCHAR" property="description"/> <result column="description" jdbcType="VARCHAR" property="description"/>
<result column="status" jdbcType="VARCHAR" property="status"/> <result column="status" jdbcType="VARCHAR" property="status"/>
</resultMap> </resultMap>
<resultMap id="BSubAgencyResultMap" type="org.rcisoft.business.barrange.entity.BSubAgency"> <resultMap id="BSubAgencyResultMap" type="org.rcisoft.business.barrange.entity.BSubAgency">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/> <id column="business_id" jdbcType="VARCHAR" property="businessId"/>
...@@ -116,24 +117,24 @@ ...@@ -116,24 +117,24 @@
<insert id="insertBSubtask"> <insert id="insertBSubtask">
insert into b_subtask(business_id,flag,del_flag,update_by,create_by,create_date,update_date,remarks, insert into b_subtask(business_id,flag,del_flag,update_by,create_by,create_date,update_date,remarks,
arrange_id,name,status,grade_code) arrange_id,name,status,grade_code,subtask_seq)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.businessId},#{item.flag},#{item.delFlag},#{item.updateBy},#{item.createBy}, (#{item.businessId},#{item.flag},#{item.delFlag},#{item.updateBy},#{item.createBy},
#{item.createDate},#{item.updateDate},#{item.remarks}, #{item.createDate},#{item.updateDate},#{item.remarks},
#{item.arrangeId},#{item.name}, #{item.arrangeId},#{item.name},
#{item.status},#{item.gradeCode}) #{item.status},#{item.gradeCode},#{item.subtaskSeq})
</foreach> </foreach>
</insert> </insert>
<insert id="insertBSubAgency"> <insert id="insertBSubAgency">
insert into b_sub_agency(business_id,flag,del_flag,update_by,create_by,create_date,update_date,remarks, insert into b_sub_agency(business_id,flag,del_flag,update_by,create_by,create_date,update_date,remarks,
subtask_id,agency_code,status) subtask_id,agency_code,status,sub_agency_seq)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.businessId},#{item.flag},#{item.delFlag},#{item.updateBy},#{item.createBy}, (#{item.businessId},#{item.flag},#{item.delFlag},#{item.updateBy},#{item.createBy},
#{item.createDate},#{item.updateDate},#{item.remarks}, #{item.createDate},#{item.updateDate},#{item.remarks},
#{item.subtaskId},#{item.agencyCode},#{item.status}) #{item.subtaskId},#{item.agencyCode},#{item.status},#{item.subAgencySeq})
</foreach> </foreach>
</insert> </insert>
...@@ -142,12 +143,12 @@ ...@@ -142,12 +143,12 @@
select b_subtask.business_id,name,agency_code,arrange_id,b_subtask.status as subtask_status from b_subtask select b_subtask.business_id,name,agency_code,arrange_id,b_subtask.status as subtask_status from b_subtask
left join b_sub_agency on b_subtask.business_id = b_sub_agency.subtask_id left join b_sub_agency on b_subtask.business_id = b_sub_agency.subtask_id
where 1=1 and arrange_id = #{arrangeId} and agency_code = #{agencyCode} where 1=1 and arrange_id = #{arrangeId} and agency_code = #{agencyCode}
and b_subtask.flag = 1 and b_subtask.del_flag = 0 and b_subtask.flag = 1 and b_subtask.del_flag = 0 order by subtask_seq
</select> </select>
<select id="queryByAgencyCode3" parameterType="java.util.Map" <select id="queryByAgencyCode3" parameterType="java.util.Map"
resultMap="BSubAgencyResultMap"> resultMap="BSubAgencyResultMap">
select * from b_sub_agency where 1=1 and del_flag = 0 and flag = 1 and agency_code = #{agencyCode} and subtask_id = #{subtaskId} select * from b_sub_agency where 1=1 and del_flag = 0 and flag = 1 and agency_code = #{agencyCode} and subtask_id = #{subtaskId} order by sub_agency_seq
</select> </select>
<resultMap id="selectSubAgencyAndOptionResultMap" type="org.rcisoft.business.barrange.entity.BSubAgency"> <resultMap id="selectSubAgencyAndOptionResultMap" type="org.rcisoft.business.barrange.entity.BSubAgency">
......
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