Commit 4c3c1f0b 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/business/bcoursecode/dao/BCourseCodeRepository.java
#	src/main/java/org/rcisoft/business/bcoursecode/service/impl/BCourseCodeServiceImpl.java
#	src/main/java/org/rcisoft/business/bstudent/entity/BStudent.java
parents 3838a8b4 715b68d6
......@@ -10,7 +10,7 @@ Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-04-23 16:50:53
Date: 2018-04-26 10:33:12
*/
SET FOREIGN_KEY_CHECKS=0;
......@@ -29,9 +29,7 @@ CREATE TABLE `b_arrange` (
`del_flag` varchar(1) DEFAULT NULL,
`flag` varchar(1) DEFAULT NULL,
`term_code` varchar(64) DEFAULT NULL,
`desc` varchar(255) DEFAULT NULL,
`grade_code` varchar(64) DEFAULT NULL,
`agency_code` varchar(64) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`status` varchar(1) DEFAULT NULL,
PRIMARY KEY (`business_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
......@@ -39,14 +37,6 @@ CREATE TABLE `b_arrange` (
-- ----------------------------
-- Records of b_arrange
-- ----------------------------
INSERT INTO `b_arrange` VALUES ('339ab1993c7f424294fd0f9e22a1c11a', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-19 10:37:36', '2018-04-19 10:37:36', null, '0', '1', 'newTerm2', null, '大一', '华为', '0');
INSERT INTO `b_arrange` VALUES ('37dcd7171b12477f96396ef66139fb0e', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-19 10:36:25', '2018-04-19 10:36:25', null, '0', '1', 'newTerm', null, '大一', '华为', '0');
INSERT INTO `b_arrange` VALUES ('5a5ec1e7bd9648e7a2ee3bab69b92e88', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-19 10:37:08', '2018-04-19 10:37:08', null, '0', '1', 'newTerm', null, '大二', '小米', '0');
INSERT INTO `b_arrange` VALUES ('62a8fc66457b4118993a2a83b984b568', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-23 15:13:25', '2018-04-23 15:13:25', null, '0', '1', 'newTerm2', null, '大三', '腾讯', '0');
INSERT INTO `b_arrange` VALUES ('692674c8865e46b2915a63baa0f1060f', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-19 14:29:53', '2018-04-19 14:29:53', null, '0', '1', 'newTerm2', null, '大三', '腾讯', '0');
INSERT INTO `b_arrange` VALUES ('8fca18f54e454af4b4a4d85d4f412d02', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-19 10:37:02', '2018-04-19 10:37:02', null, '0', '1', 'newTerm', null, '大二', '华为', '0');
INSERT INTO `b_arrange` VALUES ('ac5e19e11d884e94b6787a0397dc4fc1', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-19 10:36:40', '2018-04-19 10:36:40', null, '0', '1', 'newTerm', null, '大一', '小米', '0');
INSERT INTO `b_arrange` VALUES ('bd965a654ec440eb882a32406190c965', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-19 10:37:16', '2018-04-19 10:37:16', null, '0', '1', 'newTerm', null, '大三', '小米', '0');
INSERT INTO `b_arrange` VALUES ('c8000bd9cc0b45bd83c60f090b43d317', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-19 10:37:57', '2018-04-19 10:37:57', null, '0', '1', 'newTerm2', null, '大二', '阿里巴巴', '0');
INSERT INTO `b_arrange` VALUES ('d3929a4cb5814df1a47625a840724e9b', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-19 10:37:31', '2018-04-19 10:37:31', null, '0', '1', 'newTerm2', null, '大一', '小米', '0');
INSERT INTO `b_arrange` VALUES ('e15b02f7030e43ccab0277eacbe307ce', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-19 10:36:49', '2018-04-19 10:36:49', null, '0', '1', 'newTerm', null, '大一', '融创软通', '0');
INSERT INTO `b_arrange` VALUES ('19aae22e47884deaad96f3470074271e', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-26 10:21:28', '2018-04-26 10:21:28', null, '0', '1', 't001', '哈哈哈', '0');
INSERT INTO `b_arrange` VALUES ('b', 'b', 'b', null, null, null, '0', '1', 'newTerm2', null, '0');
INSERT INTO `b_arrange` VALUES ('e15b02f7030e43ccab0277eacbe307ce', '333e421d32d9425ea99afce95b603902', '333e421d32d9425ea99afce95b603902', '2018-04-19 10:36:49', '2018-04-19 10:36:49', null, '0', '1', 'newTerm', null, '0');
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1_3306
Source Server Version : 50717
Source Host : localhost:3306
Source Database : edu_db
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-04-26 10:33:46
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for b_subtask
-- ----------------------------
DROP TABLE IF EXISTS `b_subtask`;
CREATE TABLE `b_subtask` (
`business_id` varchar(64) NOT NULL,
`create_by` varchar(64) NOT NULL,
`create_date` datetime DEFAULT NULL,
`update_by` varchar(64) NOT NULL,
`update_date` datetime DEFAULT NULL,
`del_flag` varchar(1) NOT NULL,
`flag` varchar(1) NOT NULL,
`remarks` varchar(128) DEFAULT NULL,
`arrange_id` varchar(64) DEFAULT '',
`name` varchar(256) DEFAULT '',
`agency_code` varchar(64) DEFAULT NULL,
`status` varchar(1) DEFAULT NULL,
`grade_code` varchar(64) DEFAULT NULL,
PRIMARY KEY (`business_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of b_subtask
-- ----------------------------
INSERT INTO `b_subtask` VALUES ('1', '1', null, '1', null, '0', '1', null, 'e15b02f7030e43ccab0277eacbe307ce', 'aaa', '假的Code1', '0', null);
INSERT INTO `b_subtask` VALUES ('18228e13a9c14424a9586c76a405f40f', '333e421d32d9425ea99afce95b603902', '2018-04-26 10:21:28', '333e421d32d9425ea99afce95b603902', '2018-04-26 10:21:28', '0', '1', null, '19aae22e47884deaad96f3470074271e', 'aaa', 'xiaomi', '0', null);
INSERT INTO `b_subtask` VALUES ('2', '1', null, '1', null, '0', '1', null, 'e15b02f7030e43ccab0277eacbe307ce', 'bbb', '假的Code2', '0', null);
INSERT INTO `b_subtask` VALUES ('3', '1', null, '1', null, '0', '1', null, 'e15b02f7030e43ccab0277eacbe307ce', 'aaa', '假的Code3', '0', null);
INSERT INTO `b_subtask` VALUES ('4', '1', null, '1', null, '0', '1', null, 'b', 'aaaa', '假的Code4', '0', null);
INSERT INTO `b_subtask` VALUES ('4f3fdf16524949369331a64bed074603', '333e421d32d9425ea99afce95b603902', '2018-04-26 10:21:28', '333e421d32d9425ea99afce95b603902', '2018-04-26 10:21:28', '0', '1', null, '19aae22e47884deaad96f3470074271e', 'aaa', 'hauwei', '0', null);
INSERT INTO `b_subtask` VALUES ('5', '1', null, '1', null, '0', '1', null, 'b', 'bbbb', '假的Code5', '0', null);
INSERT INTO `b_subtask` VALUES ('6', '1', null, '1', null, '0', '1', null, 'b', 'bbbb', '假的Code6', '0', null);
......@@ -25,6 +25,7 @@ import javax.validation.Valid;
import org.rcisoft.business.barrange.entity.BArrange;
import org.rcisoft.business.barrange.service.BArrangeService;
import org.springframework.web.multipart.MultipartFile;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
......@@ -42,34 +43,60 @@ public class BArrangeController extends PaginationController<BArrange> {
@ApiOperation(value="添加", notes="添加")
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PostMapping(value = "/add")
public Result add(@Valid BArrange bArrange, BindingResult bindingResult) {
bArrange.setToken(getToken());
PersistModel data = bArrangeServiceImpl.save(bArrange);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bArrange);
public Result add(String json) {
return Result.builder(bArrangeServiceImpl.save(json),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
json);
}
@ApiOperation(value="查看 集合", notes="查看单 集合")
@GetMapping(value = "/findAll")
public Result findAllByTermCode(BArrange bArrange) {
bArrange.setCreateBy(UserUtil.getUserInfoProp(getToken(),UserUtil.USER_ID));
return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bArrangeServiceImpl.findAll());
bArrangeServiceImpl.findAll(bArrange));
}
@ApiOperation(value="查看 集合", notes="查看单 集合")
@ApiImplicitParam(name = "agencyCode", value = "企业编号", required = true, dataType = "varchar")
@GetMapping(value = "/findAllByAgencyCode")
public Result findAllByAgencyCode(@ApiIgnore BArrange bArrange) {
return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bArrangeServiceImpl.findAllByAgencyCode(bArrange));
}
@ApiOperation(value="excel导入", notes="excel导入排课信息")
@ApiImplicitParam(name = "importFile", value = "excel文件", required = true, dataType = "MultipartFile")
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "excelImport")
public Result excelImport(MultipartFile importFile) throws Exception {
PersistModel data = bArrangeServiceImpl.importExcel(MultipartFile2HSSFWorkbookConverter.convert(importFile),getToken());
public Result excelImport(MultipartFile importFile,String subtaskId) throws Exception {
PersistModel data = bArrangeServiceImpl.importExcel(MultipartFile2HSSFWorkbookConverter.convert(importFile),getToken(),subtaskId);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
data.getInfluenceReason());
}
@ApiOperation(value="查看 集合", notes="查看单 集合")
@GetMapping(value = "/findDtoBybSubtaskId")
public Result findDtoBybSubtaskId(String bSubtaskId) {
return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bArrangeServiceImpl.queryDtoBySubtaskId(bSubtaskId));
}
@ApiOperation(value="查看 集合", notes="查看单 集合")
@GetMapping(value = "/findDtoByMany")
public Result findDtoByMany(String agencyCode,String name,String termCode,String teacherCode) {
return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bArrangeServiceImpl.queryDtoByMany(agencyCode, name, termCode,teacherCode));
}
}
package org.rcisoft.business.barrange.dao;
import org.apache.ibatis.annotations.Param;
import org.rcisoft.business.barrange.entity.BSubtask;
import org.rcisoft.business.barrange.entity.ScheduleDto;
import org.rcisoft.core.base.BaseMapper;
import org.rcisoft.business.barrange.entity.BArrange;
......@@ -18,31 +20,77 @@ import java.util.List;
public interface BArrangeRepository extends BaseMapper<BArrange> {
@Select("<script>select term_code from b_arrange where 1=1 "
+ "and del_flag = 0 "
+ "and flag = 1 "
+ "GROUP BY term_code"
//企业人员查看自身公司的排课信息-------------------------------------------------------------------------------------
@Select("<script>select * from b_arrange "
+ "LEFT JOIN b_subtask ON b_arrange.business_id = b_subtask.arrange_id where 1=1 "
+ " and agency_code = #{agencyCode} "
+ "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+ "GROUP BY b_arrange.business_id "
+ "</script>")
@ResultMap(value = "BaseResultMap2" )
List<BArrange> queryBArranges0();
@ResultMap(value = "BaseResultMapByAgencyCode")
List<BArrange> queryByAgencyCode(BArrange bArrange);
@Select("<script>select grade_code from b_arrange where 1=1 and term_code = #{termCode} "
+ "and del_flag = 0 "
+ "and flag = 1 "
+ "GROUP BY grade_code"
List<BSubtask> queryByAgencyCode2(String agencyCode);
List<BSubtask> queryByAgencyCode3(String agencyCode);
//-----------------------------------------------------------------------------------------------------------------
//维护人员查看全部的排课信息----------------------------------------------------------------------------------------
@Select("<script>select * from b_arrange where 1=1 "
+ "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+ "<if test=\"termCode !=null and termCode != '' \">and term_code = #{termCode} </if> "
+ "<if test=\"status !=null and status != '' \">and status = #{status} </if> "
+ "</script>")
@ResultMap(value = "BaseResultMap2")
List<BArrange> queryAll(BArrange bArrange);
@Select("<script>select name from b_subtask where 1=1 "
+ "and del_flag = 0 "
+ "and flag = 1 "
+ "and arrange_id = #{businessId} GROUP BY name"
+ "</script>")
@ResultMap(value = "BaseResultMap3" )
List<BArrange> queryBArranges1(String termCode);
@ResultMap(value = "bSubtaskResultMap")
List<BSubtask> queryBSubtask(String businessId);
@Select("<script>select * from b_arrange where 1=1 and grade_code = #{gradeCode} "
+ "and del_flag = 0 "
+ "and flag = 1 "
+ "GROUP BY agency_code"
@Select("<script>select * from b_subtask where 1=1 "
+ "and del_flag = 0 "
+ "and flag = 1 and name = #{name}"
+ "</script>")
@ResultMap(value = "BaseResultMap4" )
List<BArrange> queryBArranges2(String gradeCode);
@ResultMap(value = "bSubtaskResultMap2")
List<BSubtask> queryBSubtask1(String businessId);
//-----------------------------------------------------------------------------------------------------------------
@Select("<script>select * from b_schedule_dto LEFT JOIN b_subtask on b_schedule_dto.subtask_id = b_subtask.business_id " +
"LEFT JOIN b_arrange on b_subtask.arrange_id = b_arrange.business_id where 1=1 " +
"and b_subtask.business_id = #{bSubtaskId}" +
"</script>")
@ResultMap(value = "scheduleDtoResultMap")
List<ScheduleDto> queryDtoByAgencySubtaskId(String bSubtaskId);
@Select("<script>select * from b_schedule_dto LEFT JOIN b_subtask on b_schedule_dto.subtask_id = b_subtask.business_id " +
"LEFT JOIN b_arrange on b_subtask.arrange_id = b_arrange.business_id where 1=1 " +
"and b_subtask.agency_code = #{agencyCode}" +
"</script>")
@ResultMap(value = "scheduleDtoResultMap")
List<ScheduleDto> queryDtoByAgencyCode(String agencyCode);
@Select("<script>select * from b_schedule_dto LEFT JOIN b_subtask on b_schedule_dto.subtask_id = b_subtask.business_id " +
"LEFT JOIN b_arrange on b_subtask.arrange_id = b_arrange.business_id where 1=1 " +
"and b_arrange.term_code = #{2} and b_subtask.name = #{1} and b_subtask.agency_code = #{0} " +
"<if test=\"teacherCode !=null and teacherCode != '' \">and teacher_code = #{teacherCode} </if> " +
"</script>")
@ResultMap(value = "scheduleDtoResultMap")
List<ScheduleDto> queryDtoByAgencyMany(String agencyCode,String name,String termCode,@Param("teacherCode") String teacherCode);
int insertList(ArrayList<ScheduleDto> list);
int insertBSubtask(List<BSubtask> list);
}
......@@ -30,17 +30,7 @@ public class BArrange extends IdEntity<BArrange> {
private String termCode;
/*描述*/
private String desc;
/*年级编号*/
@Length(min = 1,max = 64,message = "长度最小为1,最大为64")
@NotBlank
private String gradeCode;
/*企业编号*/
@Length(min = 1,max = 64,message = "长度最小为1,最大为64")
@NotBlank
private String agencyCode;
private String description;
/*状态*/
@Length(min = 1,max = 64,message = "长度为1")
......@@ -48,7 +38,13 @@ public class BArrange extends IdEntity<BArrange> {
private String status;
@Transient
private List<BArrange> childList;
private String agencyCode;
//
// @Transient
// private List<BArrange> childList;
@Transient
private List<BSubtask> childList;
}
package org.rcisoft.business.barrange.entity;
import lombok.*;
import org.rcisoft.core.entity.IdEntity;
import javax.persistence.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* Created with on 2018-4-25 16:58:44.
*/
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "b_subtask")
public class BSubtask extends IdEntity<BSubtask> {
private String arrangeId;
private String name;
/**
* 审核状态 0:未提交 1:已提交 2:通过
*/
private String status;
private String agencyCode;
private String gradeCode;
@Transient
private List<BSubtask> childList;
}
......@@ -81,6 +81,11 @@ public class ScheduleDto extends IdEntity<ScheduleDto>{
@NotBlank
private String roomCode;
/*子任务Id*/
@Length(min = 1,max = 64,message = "长度最小为1,最大为64")
@NotBlank
private String subtaskId;
@Transient
private String roomName;
......
......@@ -2,6 +2,7 @@ package org.rcisoft.business.barrange.service;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.rcisoft.business.barrange.entity.BArrange;
import org.rcisoft.business.barrange.entity.ScheduleDto;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.aop.PageUtil;
......@@ -14,10 +15,10 @@ public interface BArrangeService {
/**
* 保存
* @param bArrange
* @param json
* @return
*/
PersistModel save(BArrange bArrange);
PersistModel save(String json);
......@@ -25,8 +26,16 @@ public interface BArrangeService {
* 分页查询
* @return
*/
List<BArrange> findAll();
List<BArrange> findAll(BArrange bArrange);
List<BArrange> findAllByAgencyCode(BArrange bArrange);
PersistModel importExcel(HSSFWorkbook convert, String token);
PersistModel importExcel(HSSFWorkbook convert, String token , String subtaskId);
List<ScheduleDto> queryDtoBySubtaskId(String bSubtaskId);
List<ScheduleDto> queryDtoByMany(String agencyCode,String name,String termCode,String teacherCode);
}
package org.rcisoft.business.barrange.service.impl;
import com.alibaba.druid.util.StringUtils;
import com.alibaba.fastjson.JSON;
import com.google.gson.JsonObject;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.rcisoft.business.barrange.dao.BArrangeRepository;
import org.rcisoft.business.barrange.entity.BArrange;
import org.rcisoft.business.barrange.entity.BSubtask;
import org.rcisoft.business.barrange.entity.ScheduleDto;
import org.rcisoft.business.barrange.service.BArrangeService;
import org.rcisoft.business.bclass.dao.BClassRepository;
import org.rcisoft.business.bclass.entity.BClass;
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.core.exception.ServiceException;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.result.ResultServiceEnums;
import org.rcisoft.core.util.ExcelUtil;
import org.rcisoft.core.util.RegexValidateUtil;
import org.rcisoft.core.util.UserUtil;
import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.business.barrange.dao.BArrangeRepository;
import org.rcisoft.business.barrange.entity.BArrange;
import org.rcisoft.business.barrange.service.BArrangeService;
import org.rcisoft.sys.user.dao.SysUserMapper;
import org.rcisoft.sys.user.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import springfox.documentation.spring.web.json.Json;
import javax.security.auth.Subject;
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.
......@@ -60,20 +55,36 @@ public class BArrangeServiceImpl implements BArrangeService {
private BRoomsRepository bRoomsRepository;
/**
* 保存 bArrange
* @param bArrange
* @param json
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
// @Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel save(BArrange bArrange){
bArrange.setCommonBusinessId();
//增加操作
public PersistModel save(String json){
BArrange bArrange = new BArrange();
List<BSubtask> subtaskList = new ArrayList<>();
JSONObject jsonObject = JSONObject.fromObject(json);
JSONObject arrange = jsonObject.getJSONObject("arrange");
bArrange.setDescription(arrange.getString("desc"));
bArrange.setTermCode(arrange.getString("termCode"));
bArrange.setStatus("0");
UserUtil.setCurrentPersistOperation(bArrange);
int line = bArrangeRepository.insertSelective(bArrange);
log.info(UserUtil.getUserInfoProp(bArrange.getToken(),UserUtil.USER_USERNAME)+"新增了ID为"+
bArrange.getBusinessId()+"的信息");
JSONArray childList = arrange.getJSONArray("childList");
for(int i = 0; i < childList.size() ; i++){
JSONObject subtask = childList.getJSONObject(i);
BSubtask bSubtask = new BSubtask();
bSubtask.setName(subtask.getString("name"));
bSubtask.setAgencyCode(subtask.getString("agencyCode"));
bSubtask.setArrangeId(bArrange.getBusinessId());
bSubtask.setStatus("0");
UserUtil.setCurrentPersistOperation(bSubtask);
subtaskList.add(bSubtask);
}
bArrangeRepository.insertBSubtask(subtaskList);
return new PersistModel(line);
}
......@@ -83,17 +94,21 @@ public class BArrangeServiceImpl implements BArrangeService {
* 分页查询 bArrange
* @return
*/
public List<BArrange> findAll(){
List<BArrange> list = bArrangeRepository.queryBArranges0();
public List<BArrange> findAll(BArrange bArrange){
List<BArrange> list = bArrangeRepository.queryAll(bArrange);
return list;
}
@Override
public List<BArrange> findAllByAgencyCode(BArrange bArrange) {
return bArrangeRepository.queryByAgencyCode(bArrange);
}
@Transactional(propagation = Propagation.REQUIRED,readOnly = false)
@Override
public PersistModel importExcel(HSSFWorkbook hwb, String token) {
public PersistModel importExcel(HSSFWorkbook hwb, String token , String subtaskId) {
ArrayList<ScheduleDto> scheduleDtos = new ArrayList<ScheduleDto>();
String[] headers = {"课程编号", "教师编号", "班级编号","教室编号","周次","周学时","周一",
"周二","周三","周四","周五","周六"};
ArrayList<String[]> values = ExcelUtil.importExcel(hwb, headers,true); //获取excel数据
......@@ -171,6 +186,7 @@ public class BArrangeServiceImpl implements BArrangeService {
scheduleDto.setThursday(value[9]);
scheduleDto.setFriday(value[10]);
scheduleDto.setSaturday(value[11]);
scheduleDto.setSubtaskId(subtaskId);
scheduleDto.setCommonBusinessId();
UserUtil.setCurrentPersistOperation(scheduleDto);
scheduleDtos.add(scheduleDto);
......@@ -203,4 +219,13 @@ public class BArrangeServiceImpl implements BArrangeService {
return new PersistModel(1, result);
}
@Override
public List<ScheduleDto> queryDtoBySubtaskId(String bSubtaskId) {
return bArrangeRepository.queryDtoByAgencySubtaskId(bSubtaskId);
}
@Override
public List<ScheduleDto> queryDtoByMany(String agencyCode,String name,String termCode,String teacherCode) {
return bArrangeRepository.queryDtoByAgencyMany(agencyCode,name,termCode,teacherCode);
}
}
......@@ -48,7 +48,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);
/**
......
......@@ -10,10 +10,7 @@ import org.rcisoft.core.constant.MessageConstant;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
......@@ -39,4 +36,28 @@ public class BOpinionController extends PaginationController<BOpinion> {
MessageConstant.MESSAGE_ALERT_ERROR,
data);
}
@ApiOperation(value="审核通过", notes="根据排课ID通过审核")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "子任务ID(1-50)", required = true, dataType = "varchar")})
@PutMapping(value = "/auditPass")
public Result auditPass(@RequestParam String businessId){
PersistModel data = bOpinionService.auditPass(businessId);
return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
data);
}
@ApiOperation(value="审核驳回", notes="审核驳回,填写审核意见")
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "子任务ID(1-50)", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "opinion", value = "审核意见(1-200)", required = true, dataType = "varchar")})
@PostMapping("/auditFail")
public Result auditFail(String opinion,String id){
PersistModel data = bOpinionService.save(opinion,id);
return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
data);
}
}
......@@ -2,6 +2,8 @@ package org.rcisoft.business.bopinion.dao;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.rcisoft.business.barrange.entity.BSubtask;
import org.rcisoft.business.bopinion.entity.BOpinion;
import org.rcisoft.core.base.BaseMapper;
......@@ -15,4 +17,22 @@ public interface BOpinionRepository extends BaseMapper<BOpinion> {
@Select("select * from b_opinion where sl_id = #{slId} order by create_date DESC")
@ResultMap(value = "BaseResultMap")
List<BOpinion> queryOpinionBySlId(String slId);
/**
* 审核通过 通过已提交的
* @param businessId
* @return
*/
@Update("update b_subtask set status = 2 where business_id = #{0} and del_flag = 0 and flag = 1 and status = 1")
int changeSubtaskStatus(String businessId);
/**
* 查询驳回的子任务信息
* @param id
* @return
*/
@Select("select * from b_subtask where business_id = #{0} and del_flag = 0 and flag = 1")
@ResultMap("SubTaskResult")
BSubtask querySubtaskInfo(String id);
}
......@@ -5,6 +5,8 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.rcisoft.business.barrange.entity.BArrange;
import org.rcisoft.core.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
......@@ -19,10 +21,12 @@ import java.util.Date;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BOpinion {
@Length(min = 1,max = 64,message = "长度最小为1,最大为50")
@NotBlank
private String businessId;
public class BOpinion extends IdEntity<BOpinion> {
// @Length(min = 1,max = 64,message = "长度最小为1,最大为50")
// @NotBlank
// private String businessId;
@Length(min = 1,max = 255,message = "长度最小为1,最大为200")
@NotBlank
private String opinion;
......@@ -31,4 +35,11 @@ public class BOpinion {
@Length(min = 1,max = 64,message = "长度最小为1,最大为50")
@NotBlank
private String slId;
private String arrangeId;
private String agencyCode;
private String subtaskId;
}
package org.rcisoft.business.bopinion.service;
import org.rcisoft.business.bopinion.entity.BOpinion;
import org.rcisoft.core.model.PersistModel;
import java.util.List;
......@@ -8,5 +9,11 @@ import java.util.List;
* Created by Administrator on 2017/12/21.
*/
public interface BOpinionService {
List<BOpinion> queryOpinionBySlId(String slId);
PersistModel auditPass(String businessId);
PersistModel save(String opinion,String id);
}
package org.rcisoft.business.bopinion.service.impl;
import org.rcisoft.business.barrange.entity.BSubtask;
import org.rcisoft.business.bopinion.dao.BOpinionRepository;
import org.rcisoft.business.bopinion.entity.BOpinion;
import org.rcisoft.business.bopinion.service.BOpinionService;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.util.UserUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
......@@ -24,4 +30,39 @@ public class BOpinionServiceImpl implements BOpinionService{
public List<BOpinion> queryOpinionBySlId(String slId) {
return bOpinionRepository.queryOpinionBySlId(slId);
}
/**
* 审核通过
* @param businessId
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel auditPass(String businessId) {
int line = bOpinionRepository.changeSubtaskStatus(businessId);
return new PersistModel(line);
}
/**
* 审核驳回
* @param opinion
* @param id
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel save(String opinion,String id) {
BSubtask bSubtask = bOpinionRepository.querySubtaskInfo(id);
BOpinion bOpinion = new BOpinion();
bOpinion.setCommonBusinessId();
bOpinion.setOpinion(opinion);
bOpinion.setArrangeId(bSubtask.getArrangeId());
bOpinion.setAgencyCode(bSubtask.getAgencyCode());
bOpinion.setSubtaskId(bSubtask.getBusinessId());
Date day=new Date();
bOpinion.setCreateDate(day);
int line = bOpinionRepository.insertSelective(bOpinion);
return new PersistModel(line);
}
}
......@@ -123,11 +123,7 @@ public class BRoomsController extends FileController<BRooms> {
@PostMapping(value = "/uploadExcel")
public Result uploadExcel(@RequestParam(value="uploadFile",required=true) MultipartFile uploadFile){
String path = super.globalCommonFileUpload(uploadFile,"UUID",
"G:/testplace"+ File.separator + "/xmlAndHtml");
List<BRooms> All = Upload2DataBase.DoIt(path);
return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bRoomsServiceImpl.uploadExcel(All));
global.getBASE_UPLOAD_SERVER_LOCATION()+ File.separator + global.getXML_LOCATION());
return bRoomsServiceImpl.uploadExcel(path);
}
}
package org.rcisoft.business.brooms.dao;
import org.apache.ibatis.annotations.ResultType;
import org.rcisoft.core.base.BaseMapper;
import org.rcisoft.business.brooms.entity.BRooms;
import org.apache.ibatis.annotations.ResultMap;
......@@ -29,6 +30,9 @@ public interface BRoomsRepository extends BaseMapper<BRooms> {
@ResultMap(value = "BaseResultMap" )
List<BRooms> queryBRoomss(BRooms bRooms);
@Select("<script>select code from b_rooms where del_flag = 0</script>")
List<String> queryAllCode();
int addExcel(List<BRooms> list);
}
......@@ -49,6 +49,6 @@ public interface BRoomsService {
BRooms bRooms);
PersistModel uploadExcel(List<BRooms> list);
Result uploadExcel(String path);
}
package org.rcisoft.business.brooms.service.impl;
import org.rcisoft.business.brooms.utils.Upload2DataBase;
import org.rcisoft.core.constant.MessageConstant;
import org.rcisoft.core.result.Result;
import org.rcisoft.core.util.UserUtil;
import org.rcisoft.core.aop.PageUtil;
......@@ -17,6 +19,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
/**
......@@ -101,9 +105,16 @@ public class BRoomsServiceImpl implements BRoomsService {
}
@Override
public PersistModel uploadExcel(List<BRooms> list) {
int num = bRoomsRepository.addExcel(list);
return new PersistModel(num);
public Result uploadExcel(String path) {
Map<String,Object> map = Upload2DataBase.DoIt(path,bRoomsRepository.queryAllCode());
List<BRooms> list = (List<BRooms>) map.get("list");
if(list.size() > 0){
bRoomsRepository.addExcel(list);
}
return Result.builder(new PersistModel(list.size()),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
"成功插入 " + ((List<BRooms>) map.get("list")).size() + " 条数据," +map.get("errorDetail"));
}
}
......@@ -10,15 +10,18 @@ import org.rcisoft.core.util.UserUtil;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.*;
@Slf4j
public class Upload2DataBase {
public static List<BRooms> DoIt(String path){
public static Map<String,Object> DoIt(String path, List<String> AllCode){
Map<String,Object> finalResult = new HashMap<String,Object>();
//将数据存入此list
List<BRooms> list = new ArrayList<>();
//将code存入此list,方便查重
List<String> currentlyCode = new ArrayList<>();
String errorDetail = "";
File file = new File(path);
try {
FileInputStream fis = new FileInputStream(file);
......@@ -35,6 +38,7 @@ public class Upload2DataBase {
Iterator<Row> rowIterator = sheet.iterator();
rowIterator.next();
rowIterator.next();
int location = 3;
//遍历此表
while(rowIterator.hasNext())
{
......@@ -52,7 +56,7 @@ public class Upload2DataBase {
if(cell.getStringCellValue().trim().equals("校本部")){
bRooms.setCampus("0");
classroomName = "本校";
}else{
}else if(cell.getStringCellValue().trim().equals("新校区")){
bRooms.setCampus("1");
classroomName = "新校";
}
......@@ -95,9 +99,48 @@ public class Upload2DataBase {
bRooms.setClassSeat((int)cell.getNumericCellValue());
}
}
//判断是否与数据库有重复code
if(AllCode.contains(bRooms.getCode())){
errorDetail += "第 " + location + " 行所对应的数据: " + bRooms.getCode() + " 已存在于数据库\n ";
location++;
continue;
}
//判断当前excel是否有重复code
if(currentlyCode.contains(bRooms.getCode())){
errorDetail += "第 " + location + " 行所对应的数据: " + bRooms.getCode() + " 已存在于此Excel\n ";
location++;
continue;
}
//判断此行是否为空
if(bRooms.getCode() == null || bRooms.getCode().equals("") ){
if(bRooms.getCategory() == null || bRooms.getCategory().equals("")){
if(bRooms.getCampus() == null || bRooms.getCampus().equals("") ){
if(bRooms.getBuilding() == null || bRooms.getCampus().equals("") ){
if(bRooms.getClassroomNo() == null || bRooms.getClassroomNo().equals("")){
if(bRooms.getClassSeat() == null){
location++;
continue;
}
}
}
}
}
}
//判断是否有空值
if (bRooms.getClassSeat() == null
|| bRooms.getCode() == null || bRooms.getCategory() == null || bRooms.getCampus() == null
|| bRooms.getBuilding() == null || bRooms.getClassroomNo() == null || bRooms.getCode().equals("") || bRooms.getCategory().equals("") || bRooms.getCampus().equals("")
|| bRooms.getBuilding().equals("") || bRooms.getClassroomNo().equals("")){
errorDetail += "第 " + location + " 行所对应的数据有空数据\n ";
location++;
continue;
}
UserUtil.setCurrentPersistOperation(bRooms);
bRooms.setClassroomName(classroomName);
list.add(bRooms);
currentlyCode.add(bRooms.getCode());
//当前行数+1
location++;
} //end of rows iterator
......@@ -109,7 +152,10 @@ public class Upload2DataBase {
} catch (IOException e) {
e.printStackTrace();
}
return list;
finalResult.put("list",list);
finalResult.put("errorDetail",errorDetail);
file.delete();
return finalResult;
}
}
......@@ -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")
......
......@@ -66,9 +66,9 @@ public interface BStudentRepository extends BaseMapper<BStudent> {
List<BStudent> queryStudentBySlCode(@Param("slCode") String slCode, @Param("classCode") String classCode);
@Insert("<script>INSERT INTO b_student" +
"(create_date,update_date,create_by,update_by,remarks,del_flag,flag,business_id,code)VALUES" +
"(create_date,update_date,create_by,update_by,remarks,del_flag,flag,business_id,code,grade_code)VALUES" +
"<foreach collection=\"list\" item=\"item\" separator=\",\">" +
"( #{item.createDate},#{item.updateDate},#{item.createBy},#{item.updateBy},#{item.remarks},#{item.delFlag},#{item.flag},#{item.businessId},#{item.code})" +
"( #{item.createDate},#{item.updateDate},#{item.createBy},#{item.updateBy},#{item.remarks},#{item.delFlag},#{item.flag},#{item.businessId},#{item.code},#{item.gradeCode})" +
"</foreach></script>")
int insertList(List<BStudent> bStudents);
......@@ -147,10 +147,26 @@ public interface BStudentRepository extends BaseMapper<BStudent> {
@Select("<script>select business_id from b_student where code = #{studentCode} and del_flag != 1 and flag = 1</script>")
String queryStudentIdByCode(String studentCode);
/**
@Select("<script>select * from b_student bs " +
"LEFT JOIN b_r_class_student cs on bs.`code` = cs.student_code " +
"where cs.class_code = #{classCode} and del_flag != 1 and flag = 1</script>")
@ResultMap(value = "BaseResultMap")
List<BStudent> queryStudentsByClassCode(String classCode);
*/
@Select("SELECT * FROM b_student \n" +
"LEFT JOIN b_r_class_student ON b_student.`code` = b_r_class_student.student_code\n" +
"LEFT JOIN b_class ON b_r_class_student.class_code = b_class.`code`\n" +
"LEFT JOIN s_user ON b_student.`code` = s_user.login_name\n" +
"WHERE b_r_class_student.class_code = #{classCode}\n" +
"and b_student.del_flag != 1 \n" +
"and b_student.flag = 1")
@ResultMap(value = "BaseResultMap")
List<BStudent> queryStudentsByClassCode(String classCode);
@Select("select * from b_grade where code = #{gradeCode} and del_flag = 0 and flag = 1")
List<BStudent> checkStudentGrade(BStudent bStudent);
}
......@@ -23,7 +23,6 @@ import java.util.Date;
public class BStudent extends IdEntity<BStudent> {
private static final long serialVersionUID = 2375118311059668811L;
public BStudent(String code) {
this.code = code;
}
......@@ -56,7 +55,7 @@ public class BStudent extends IdEntity<BStudent> {
private String recommendCourse;
/*年级*/
@Length(min = 1,max = 15,message = "长度最小为8,最大为15")
@Length(min = 1,max = 64,message = "长度最小为1,最大为64")
private String gradeCode;
@Length(min = 1,max = 15,message = "长度最小为1,最大为15")
......
......@@ -127,7 +127,7 @@ public class BStudentServiceImpl implements BStudentService {
ArrayList<SysUser> users = new ArrayList<SysUser>();
ArrayList<UserRole> userRoles = new ArrayList<UserRole>();
String[] headers = {"学号", "学生姓名", "性别","邮箱","年级"};
ArrayList<String[]> values = ExcelUtil.importExcel(hwb, headers,false); //获取excel数据
ArrayList<String[]> values = ExcelUtil.importExcel(hwb, headers,true); //获取excel数据
if (values.size()<=0){
throw new ServiceException(ResultServiceEnums.EXCEL_IMPORT_DATA_NOT_EXIST);
......@@ -172,6 +172,14 @@ public class BStudentServiceImpl implements BStudentService {
continue;
}
//判断4:学年是否存在,存在才能录入
BStudent bs = new BStudent();
bs.setGradeCode(value[4]);
if (bStudentRepository.checkStudentGrade(bs).size() == 0){
valuesGrade.add(value[4]);
continue;
}
//合法:通过了三次判断,证明可建立该用户
valuesOK.add(value);
//为合法的用户建立Gitlab账户,并批量存储Student、User和UserRole;
......@@ -204,6 +212,7 @@ public class BStudentServiceImpl implements BStudentService {
//创建完Gitlab账户后,将完整的User信息和UserRole计入users和userRoles中等待插入数据库
BStudent bStudent = new BStudent(value[0]);
bStudent.setGradeCode(value[4]);
UserUtil.setCurrentPersistOperation(bStudent);
if (!students.contains(bStudent)) {
students.add(bStudent);
......@@ -234,6 +243,9 @@ public class BStudentServiceImpl implements BStudentService {
if(valuesEmailExist.size()>0){
result+="以下邮箱已注册:"+ JSON.toJSONString(valuesEmailExist)+"。";
}
if(valuesGrade.size()>0){
result+="以下学生的学年信息不存在:"+ JSON.toJSONString(valuesGrade)+"。";
}
if (valuesOK.size()<1){
......
package org.rcisoft.business.bsubtask.controller;
/*固定导入*/
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.common.controller.PaginationController;
import org.rcisoft.common.model.GridModel;
import org.springframework.validation.BindingResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.rcisoft.core.result.Result;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.constant.MessageConstant;
import org.rcisoft.core.util.UserUtil;
import javax.validation.Valid;
import org.rcisoft.business.bsubtask.entity.BSubtask;
import org.rcisoft.business.bsubtask.service.BSubtaskService;
import java.util.List;
/**
* Created by on 2018-4-25 10:50:35.
*/
@RestController
@RequestMapping("bsubtask")
public class BSubtaskController extends PaginationController<BSubtask> {
@Autowired
private BSubtaskService bSubtaskServiceImpl;
@ApiOperation(value="添加", notes="添加")
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PostMapping(value = "/add")
public Result add(@Valid BSubtask bSubtask, BindingResult bindingResult) {
bSubtask.setToken(getToken());
PersistModel data = bSubtaskServiceImpl.save(bSubtask);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bSubtask);
}
@ApiOperation(value="逻辑删除", notes="逻辑删除")
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "id", required = false, dataType = "varchar")})
@DeleteMapping("/delete/{id:\\w+}")
public Result delete(@PathVariable String id) {
BSubtask bSubtask = new BSubtask();
bSubtask.setBusinessId(id);
bSubtask.setToken(getToken());
PersistModel data = bSubtaskServiceImpl.remove(bSubtask);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
id);
}
@ApiOperation(value="修改", notes="修改")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PutMapping("/update/{id:\\w+}")
public Result update(@Valid BSubtask bSubtask, BindingResult bindingResult) {
bSubtask.setToken(getToken());
PersistModel data = bSubtaskServiceImpl.merge(bSubtask);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bSubtask);
}
@ApiOperation(value="查看单 ", notes="查看单 ")
@GetMapping("/detail/{id:\\w+}")
public Result detail(@PathVariable String id) {
return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bSubtaskServiceImpl.findById(id));
}
@ApiOperation(value="查看 集合", notes="查看 集合")
@GetMapping(value = "/queryBSubtaskByPagination")
public GridModel listByPagination(BSubtask bSubtask) {
bSubtask.setCreateBy(UserUtil.getUserInfoProp(getToken(),UserUtil.USER_ID));
bSubtaskServiceImpl.findAllByPagination(getPaginationUtility(), bSubtask);
return getGridModelResponse();
}
}
package org.rcisoft.business.bsubtask.dao;
import org.rcisoft.core.base.BaseMapper;
import org.rcisoft.business.bsubtask.entity.BSubtask;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Created with on 2018-4-25 10:50:35.
*/
@Repository
public interface BSubtaskRepository extends BaseMapper<BSubtask> {
/**
* 分页查询 bSubtask
*
*/
@Select("<script>select * from b_subtask where 1=1 "
+ "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+ "</script>")
@ResultMap(value = "BaseResultMap" )
List<BSubtask> queryBSubtasks(BSubtask bSubtask);
}
package org.rcisoft.business.bsubtask.entity;
import lombok.*;
import org.rcisoft.core.entity.IdEntity;
import javax.persistence.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* Created with on 2018-4-25 10:50:35.
*/
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "b_subtask")
public class BSubtask extends IdEntity<BSubtask> {
private static final long serialVersionUID = -4657954042491427634L;
private String code;
private String name;
}
package org.rcisoft.business.bsubtask.service;
import org.rcisoft.business.bsubtask.entity.BSubtask;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.aop.PageUtil;
import java.util.List;
/**
* Created by on 2018-4-25 10:50:35.
*/
public interface BSubtaskService {
/**
* 保存
* @param bSubtask
* @return
*/
PersistModel save(BSubtask bSubtask);
/**
* 逻辑删除
* @param bSubtask
* @return
*/
PersistModel remove(BSubtask bSubtask);
/**
* 修改
* @param bSubtask
* @return
*/
PersistModel merge(BSubtask bSubtask);
/**
* 根据id查询
* @param id
* @return
*/
BSubtask findById(String id);
/**
* 分页查询
* @param bSubtask
* @return
*/
List<BSubtask> findAllByPagination(PageUtil<BSubtask> paginationUtility,
BSubtask bSubtask);
}
package org.rcisoft.business.bsubtask.service.impl;
import org.rcisoft.core.util.UserUtil;
import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.business.bsubtask.dao.BSubtaskRepository;
import org.rcisoft.business.bsubtask.entity.BSubtask;
import org.rcisoft.business.bsubtask.service.BSubtaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
/**
* Created by on 2018-4-25 10:50:35.
*/
@Service
@Transactional(readOnly = true,propagation = Propagation.NOT_SUPPORTED)
@Slf4j
public class BSubtaskServiceImpl implements BSubtaskService {
@Autowired
private BSubtaskRepository bSubtaskRepository;
/**
* 保存 bSubtask
* @param bSubtask
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel save(BSubtask bSubtask){
//增加操作
UserUtil.setCurrentPersistOperation(bSubtask);
int line = bSubtaskRepository.insertSelective(bSubtask);
log.info(UserUtil.getUserInfoProp(bSubtask.getToken(),UserUtil.USER_USERNAME)+"新增了ID为"+
bSubtask.getBusinessId()+"的信息");
return new PersistModel(line);
}
/**
* 逻辑删除
* @param bSubtask
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel remove(BSubtask bSubtask){
UserUtil.setCurrentMergeOperation(bSubtask);
bSubtask.setDeleted();
int line = bSubtaskRepository.logicalDelete(bSubtask);
log.info(UserUtil.getUserInfoProp(bSubtask.getToken(),UserUtil.USER_USERNAME)+"逻辑删除了ID为"+
bSubtask.getBusinessId()+"的信息");
return new PersistModel(line);
}
/**
* 修改 bSubtask
* @param bSubtask
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel merge(BSubtask bSubtask){
UserUtil.setCurrentMergeOperation(bSubtask);
int line = bSubtaskRepository.updateByPrimaryKeySelective(bSubtask);
log.info(UserUtil.getUserInfoProp(bSubtask.getToken(),UserUtil.USER_USERNAME)+"修改了ID为"+
bSubtask.getBusinessId()+"的信息");
return new PersistModel(line);
}
/**
* 根据id查询 bSubtask
* @param id
* @return
*/
public BSubtask findById(String id){
return bSubtaskRepository.selectByPrimaryKey(id);
}
/**
* 分页查询 bSubtask
* @param bSubtask
* @return
*/
public List<BSubtask> findAllByPagination(PageUtil<BSubtask> paginationUtility,
BSubtask bSubtask){
bSubtask.setStart();
bSubtask.setNotDeleted();
return bSubtaskRepository.queryBSubtasks(bSubtask);
}
}
......@@ -82,8 +82,8 @@ public class BTeacherServiceImpl implements BTeacherService {
ArrayList<UserRole> userRoles = new ArrayList<UserRole>();
String[] headers = {"教师工号", "教师姓名", "性别","邮箱"};
ArrayList<String[]> values = ExcelUtil.importExcel(hwb, headers,false); //获取excel数据
String[] headers = {"教师工号", "教师姓名", "性别","邮箱","教学单位编号"};
ArrayList<String[]> values = ExcelUtil.importExcel(hwb, headers,true); //获取excel数据
if (values.size() == 0){
throw new ServiceException(ResultServiceEnums.EXCEL_IMPORT_DATA_NOT_EXIST);
}
......@@ -92,6 +92,7 @@ public class BTeacherServiceImpl implements BTeacherService {
List<String> valuesRepeat = new ArrayList<>();
List<String> valuesShort = new ArrayList<>();
List<String> valuesEmailExist = new ArrayList<>();
List<String> valuesAgencyExist = new ArrayList<>();
for (String[] value : values) {
......@@ -126,6 +127,14 @@ public class BTeacherServiceImpl implements BTeacherService {
continue;
}
//判断4:教师的所属教学单位是否存在,存在才能添加;
SysUser user3 = new SysUser();
user3.setAgencyCode(value[4]);
if (sysUserMapper.checkTeacherAgency(user3).size() == 0){
valuesAgencyExist.add(value[4]);
continue;
}
//合法:通过了三次判断,证明可建立该用户
valuesOK.add(value);
......@@ -137,8 +146,9 @@ public class BTeacherServiceImpl implements BTeacherService {
value[2] = "";
//1. 添加user
SysUser user = new SysUser(value[0], passwordEncoder.encode(global.getDEFAULT_PASSWORD()), value[1], value[2]); //号,密码,姓名,性别;
SysUser user = new SysUser(value[0], passwordEncoder.encode(global.getDEFAULT_PASSWORD()), value[1], value[2]); //教师工号,密码,姓名,性别;
user.setEmail(value[3]);
user.setAgencyCode(value[4]);//教学单位编号
UserUtil.setCurrentPersistOperation(user);
//2 创建gitlab账户
/*GitUser gitUser = new GitUser();
......@@ -188,6 +198,9 @@ public class BTeacherServiceImpl implements BTeacherService {
if(valuesEmailExist.size()>0){
result+="以下教师邮箱已注册或格式不正确:"+ JSON.toJSONString(valuesEmailExist)+"。";
}
if (valuesAgencyExist.size()>0){
result+="以下教师的所属教学单位不存在:"+JSON.toJSONString(valuesAgencyExist)+"。";
}
if (valuesOK.size()<1){
throw new ServiceException(ResultServiceEnums.EXCEL_IMPORT_DB_INSERT_ERROR.getCode(),result);
......@@ -227,13 +240,13 @@ public class BTeacherServiceImpl implements BTeacherService {
BeanUtils.copyProperties((DataEntity) model, (DataEntity) user);
if (model.getBusinessId() == null) {
if (sysUserMapper.selectOne(new SysUser(model.getCode(),"0","1")) != null)
throw new ServiceException(ResultServiceEnums.TEACHER_EXISTS);
{throw new ServiceException(ResultServiceEnums.TEACHER_EXISTS);}
SysUser user1 = new SysUser();
user1.setEmail(model.getEmail());
user1.setDelFlag("0");
user1.setFlag("1");
if(sysUserMapper.selectOne(user1)!=null)
throw new ServiceException(ResultServiceEnums.EMAIL_EXISTS);
{throw new ServiceException(ResultServiceEnums.EMAIL_EXISTS);}
//1添加用户
user.setHeadPic(global.getDEFAULT_TEACHER_LOCATION());
UserUtil.setCurrentPersistOperation(user);
......@@ -249,13 +262,13 @@ public class BTeacherServiceImpl implements BTeacherService {
line = bTeacherRepository.insertSelective(model);
if (line1 != line)
throw new ServiceException(ResultServiceEnums.INSERT_ERROR);
{throw new ServiceException(ResultServiceEnums.INSERT_ERROR);}
} else {
UserUtil.setCurrentMergeOperation(model);
line = bTeacherRepository.updateByPrimaryKeySelective(model);
String uid = sysUserMapper.selectUserIdByStuOrTeaId(model.getBusinessId(), "b_teacher");
if (uid == null)
throw new ServiceException(ResultServiceEnums.STUDENT_NOT_EXISTS);
{throw new ServiceException(ResultServiceEnums.STUDENT_NOT_EXISTS);}
userService.updateUser(user,uid,line);
}
return new PersistModel(line);
......@@ -264,13 +277,13 @@ public class BTeacherServiceImpl implements BTeacherService {
private Map<String, Object> queryParamHandler(BTeacher model) {
Map param = new HashMap<String, Object>();
if (model.getName() != null)
param.put("name", "%" + model.getName() + "%");
{param.put("name", "%" + model.getName() + "%");}
else
param.put("name", "%%");
{param.put("name", "%%");}
if (model.getCode() != null)
param.put("code", "%" + model.getCode() + "%");
{param.put("code", "%" + model.getCode() + "%");}
else
param.put("code", "%%");
{param.put("code", "%%");}
param.put("teacherCode", model.getTeacherCode());
return param;
}
......
......@@ -257,4 +257,7 @@ public class Global {
/*redis缓存超时时间*/
@Value("${spring.redis.timeout}")
private Integer REDIS_TIMEOUT;
@Value("${global.path.xml_location}")
private String XML_LOCATION;
}
......@@ -2,6 +2,7 @@ package org.rcisoft.sys.user.dao;
import org.apache.ibatis.annotations.*;
import org.rcisoft.business.bagency.entity.BAgency;
import org.rcisoft.core.base.BaseMapper;
import org.rcisoft.sys.user.entity.SysUser;
import org.rcisoft.sys.user.entity.UserRole;
......@@ -25,9 +26,9 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
List<SysUser> queryUserByName(String username);
@Insert("<script>INSERT INTO s_user" +
"(create_date,update_date,create_by,update_by,remarks,del_flag,flag,business_id,login_name,password,name,sex,git_lab_id,git_lab_username,git_lab_impression_token,head_pic,email)VALUES" +
"(create_date,update_date,create_by,update_by,remarks,del_flag,flag,business_id,login_name,password,name,sex,git_lab_id,git_lab_username,git_lab_impression_token,head_pic,email,agency_code)VALUES" +
"<foreach collection=\"list\" item=\"item\" separator=\",\">" +
"( #{item.createDate},#{item.updateDate},#{item.createBy},#{item.updateBy},#{item.remarks},#{item.delFlag},#{item.flag},#{item.businessId},#{item.loginName},#{item.password},#{item.name},#{item.sex},#{item.gitLabId},#{item.gitLabUsername},#{item.gitLabImpressionToken},#{item.headPic},#{item.email})" +
"( #{item.createDate},#{item.updateDate},#{item.createBy},#{item.updateBy},#{item.remarks},#{item.delFlag},#{item.flag},#{item.businessId},#{item.loginName},#{item.password},#{item.name},#{item.sex},#{item.gitLabId},#{item.gitLabUsername},#{item.gitLabImpressionToken},#{item.headPic},#{item.email},#{item.agencyCode})" +
"</foreach></script>")
int insertList(List<SysUser> users);
......@@ -79,4 +80,11 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
"<if test=\"agencyCode !=null and agencyCode != '' \">and su.agency_code = #{agencyCode} </if></script>")
@ResultMap(value = "BaseResultMap")
List<SysUser> queryCreatedUsers(SysUser sysUser);
@Select("<script>select agency_code from s_user where business_id = #{businessId}</script>")
String queryAgencyCodeByBusinessId(String businessId);
@Select("select * from b_agency where code = #{agencyCode} and del_flag = 0 and flag = 1")
List<BAgency> checkTeacherAgency(SysUser sysUser);
}
......@@ -137,6 +137,7 @@ global:
cource_code_location: code
cource_project_location: project
student_code_location: studentCode
xml_location: /xmlTemp
other:
server_url: http://127.0.0.1:8888/eduServer
is_server_linux: 5
......
......@@ -138,6 +138,7 @@ global:
cource_code_location: code
cource_project_location: project
student_code_location: studentCode
xml_location: /xmlTemp
other:
server_url: http://106.2.3.134:10180/eduServer
is_server_linux: 1
......
......@@ -11,11 +11,49 @@
<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="grade_code" jdbcType="VARCHAR" property="gradeCode"/>
<result column="agency_code" jdbcType="VARCHAR" property="agencyCode"/>
<result column="description" jdbcType="VARCHAR" property="description"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
</resultMap>
<resultMap id="BaseResultMapByAgencyCode" type="org.rcisoft.business.barrange.entity.BArrange">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="term_code" jdbcType="VARCHAR" property="termCode"/>
<result column="description" jdbcType="VARCHAR" property="description"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="agency_code" jdbcType="VARCHAR" property="agencyCode" />
<collection property="childList" javaType="ArrayList" column="{agencyCode=agency_code,arrangeId=business_id}" ofType="org.rcisoft.business.barrange.entity.BSubtask"
select="org.rcisoft.business.barrange.dao.BArrangeRepository.queryByAgencyCode2"
/>
</resultMap>
<resultMap id="BaseResultMapByAgencyCode2" type="org.rcisoft.business.barrange.entity.BSubtask">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="agency_code" jdbcType="VARCHAR" property="agencyCode" />
<result column="arrange_id" jdbcType="VARCHAR" property="arrangeId" />
<collection property="childList" javaType="ArrayList" column="{agencyCode=agency_code,name=name,arrangeId=arrange_id}" ofType="org.rcisoft.business.barrange.entity.BSubtask"
select="org.rcisoft.business.barrange.dao.BArrangeRepository.queryByAgencyCode3"
/>
</resultMap>
<resultMap id="bSubtaskResultMap" type="org.rcisoft.business.barrange.entity.BSubtask">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<collection property="childList" javaType="ArrayList" column="name" ofType="org.rcisoft.business.barrange.entity.BSubtask"
select="org.rcisoft.business.barrange.dao.BArrangeRepository.queryBSubtask1"
/>
</resultMap>
<resultMap id="bSubtaskResultMap2" type="org.rcisoft.business.barrange.entity.BSubtask">
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="arrange_id" jdbcType="VARCHAR" property="arrangeId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="agency_code" jdbcType="VARCHAR" property="agencyCode"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
</resultMap>
<resultMap id="scheduleDtoResultMap" type="org.rcisoft.business.barrange.entity.ScheduleDto">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
......@@ -40,50 +78,51 @@
<result column="room_code" jdbcType="VARCHAR" property="roomCode"/>
<result column="room_name" jdbcType="VARCHAR" property="roomName"/>
</resultMap>
<resultMap id="BaseResultMap2" type="org.rcisoft.business.barrange.entity.BArrange">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="term_code" jdbcType="VARCHAR" property="termCode"/>
<collection property="childList" javaType="ArrayList" column="term_code" ofType="org.rcisoft.business.barrange.entity.BArrange"
select="org.rcisoft.business.barrange.dao.BArrangeRepository.queryBArranges1"
/>
</resultMap>
<resultMap id="BaseResultMap3" type="org.rcisoft.business.barrange.entity.BArrange">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="grade_code" jdbcType="VARCHAR" property="gradeCode"/>
<collection property="childList" javaType="ArrayList" column="grade_code" ofType="org.rcisoft.business.barrange.entity.BArrange"
select="org.rcisoft.business.barrange.dao.BArrangeRepository.queryBArranges2"
/>
</resultMap>
<resultMap id="BaseResultMap4" type="org.rcisoft.business.barrange.entity.BArrange">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<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="grade_code" jdbcType="VARCHAR" property="gradeCode"/>
<result column="agency_code" jdbcType="VARCHAR" property="agencyCode"/>
<result column="description" jdbcType="VARCHAR" property="description"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<collection property="childList" javaType="ArrayList" column="business_id" ofType="org.rcisoft.business.barrange.entity.BSubtask"
select="org.rcisoft.business.barrange.dao.BArrangeRepository.queryBSubtask"
/>
</resultMap>
<insert id="insertList">
insert into b_schedule_dto(business_id,flag,del_flag,update_by,create_by,create_date,update_date,remarks,
lesson_code,teacher_code,class_code,week,class_hour,
monday,tuesday,wednesday,thursday,friday,saturday,room_code)
monday,tuesday,wednesday,thursday,friday,saturday,room_code,subtask_id)
values
<foreach collection="list" item="item" separator=",">
(#{item.businessId},#{item.flag},#{item.delFlag},#{item.updateBy},#{item.createBy},
#{item.createDate},#{item.updateDate},#{item.remarks},
#{item.lessonCode},#{item.teacherCode},#{item.classCode},
#{item.week},#{item.classHour},
#{item.monday},#{item.tuesday},#{item.wednesday},#{item.thursday},#{item.friday},#{item.saturday},#{item.roomCode})
#{item.monday},#{item.tuesday},#{item.wednesday},#{item.thursday},#{item.friday},#{item.saturday},#{item.roomCode},#{item.subtaskId})
</foreach>
</insert>
<insert id="insertBSubtask">
insert into b_subtask(business_id,flag,del_flag,update_by,create_by,create_date,update_date,remarks,
arrange_id,name,agency_code,status,grade_code)
values
<foreach collection="list" item="item" separator=",">
(#{item.businessId},#{item.flag},#{item.delFlag},#{item.updateBy},#{item.createBy},
#{item.createDate},#{item.updateDate},#{item.remarks},
#{item.arrangeId},#{item.name},#{item.agencyCode},
#{item.status},#{item.gradeCode})
</foreach>
</insert>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryByAgencyCode2" parameterType="java.util.Map"
resultMap="BaseResultMapByAgencyCode2">
select name,agency_code,arrange_id from b_subtask where 1=1 and agency_code = #{agencyCode} and arrange_id = #{arrangeId}
and flag = 1 and del_flag = 0 GROUP BY name
</select>
<select id="queryByAgencyCode3" parameterType="java.util.Map"
resultMap="bSubtaskResultMap2">
select * from b_subtask where 1=1 and del_flag = 0 and flag = 1 and name = #{name} and agency_code = #{agencyCode} and arrange_id = #{arrangeId}
</select>
</mapper>
\ No newline at end of file
......@@ -6,6 +6,20 @@
<result column="opinion" jdbcType="VARCHAR" property="opinion"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="sl_id" jdbcType="VARCHAR" property="slId"/>
<result column="arrange_id" jdbcType="VARCHAR" property="arrangeId"/>
<result column="agency_code" jdbcType="VARCHAR" property="agencyCode"/>
<result column="subtask_id" jdbcType="VARCHAR" property="subtaskId"/>
</resultMap>
<resultMap id="SubTaskResult" type="org.rcisoft.business.barrange.entity.BSubtask">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="agency_code" jdbcType="VARCHAR" property="agencyCode"/>
<result column="arrange_id" jdbcType="VARCHAR" property="arrangeId"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
</resultMap>
</mapper>
\ No newline at end of file
......@@ -17,5 +17,7 @@
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="grade_code" jdbcType="VARCHAR" property="gradeCode"/>
<result column="class_name" jdbcType="VARCHAR" property="className"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
</resultMap>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.rcisoft.business.bsubtask.dao.BSubtaskRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.business.bsubtask.entity.BSubtask">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="code" jdbcType="VARCHAR" property="code"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
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