Commit 77fcbb1b authored by 李博今's avatar 李博今

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

# Conflicts:
#	src/main/java/org/rcisoft/core/result/ResultServiceEnums.java
parents 11970a73 7145ef70
......@@ -141,7 +141,7 @@ public class BClassController extends PaginationController<BClass> {
@ApiImplicitParam(name = "code", value = "班级编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "className", value = "班级名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentNum", value = "学生数量", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")})
@ApiImplicitParam(name = "type", value = "班级类型 0行政班,1企业班", required = true, dataType = "varchar")})
@GetMapping(value = "/queryBClasss")
public Result queryBClasss(BClass param) {
param.setCreateBy(UserUtil.getUserInfoProp(getToken(),UserUtil.USER_ID));
......
......@@ -72,7 +72,8 @@ public class BCompanyController extends PaginationController<BCompany> {
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询公司用户信息")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "登录名", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "name", value = "姓名", required = false, dataType = "varchar")})
@ApiImplicitParam(name = "name", value = "姓名", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "agencyCode", value = "教学单位Code", required = false, dataType = "varchar")})
@GetMapping(value = "/queryCompanysByPagination")
public GridModel queryCompanysByPagination(BCompany param) {
bCompanyService.queryCompanysByPagination(getPaginationUtility(),param);
......
......@@ -24,7 +24,8 @@ public interface BCompanyRepository extends BaseMapper<BCompany>{
"LEFT JOIN s_role sr on ur.role_id = sr.business_id\n" +
"where bc.del_flag != 1 and su.del_flag != 1 "+
"<if test=\"name!=null and name != ''\">and su.`name` like CONCAT('%',#{name},'%') </if>"+
"<if test=\"code!=null and code != ''\">and bc.`code` like CONCAT('%',#{code},'%') </if></script>")
"<if test=\"code!=null and code != ''\">and bc.`code` like CONCAT('%',#{code},'%') </if>" +
"<if test=\"agencyCode !=null and agencyCode != '' \">and bc.agency_code = #{agencyCode} </if></script>")
@ResultMap(value = "BaseResultMap" )
List<BCompany> queryCompanys(BCompany param);
......
......@@ -52,5 +52,8 @@ public class BTerm extends IdEntity<BTerm> {
private String current;
private String week;
private Integer maxSlCode;
}
......@@ -77,6 +77,11 @@ public class BTermServiceImpl implements BTermService {
if(bSlRepository.selectslNumByTermId(id)>0) {
throw new ServiceException(ResultServiceEnums.TERM_HAS_SL);
}
//验证是否是当前学期
BTerm bTerm = bTermRepository.selectByPrimaryKey(id);
if(bTerm.getCurrent().equals("1")){
throw new ServiceException(ResultServiceEnums.CURRENT_TERM);
}
int line = bTermRepository.deleteByPrimaryKey(id);
return new PersistModel(line, MessageConstant.MESSAGE_ALERT_SUCCESS);
}
......
......@@ -179,6 +179,8 @@ public enum ResultServiceEnums {
ROLE_HAS_USER(95,"仍然有绑定此角色的用户,不可删除此角色"),
EXISE_ROOM_CODE(96,"此教室编号已存在,添加失败"),
CURRENT_TERM(96,"当前学期不可删除"),
;
private Integer code;
......
......@@ -31,7 +31,7 @@ public class ExcelDownloadController {
private static final String SL_FILE_NAME = "sl.xls";
private static final String ROOM_FILE_NAME = "room.xls";
private static final String BUSINESS_CLASS = "business-class.xls";
private static final String IMPORT_DTO = "import-dto.xls";
private static final String IMPORT_DTO = "schedule-task.xls";
@Autowired
private Global global;
......
......@@ -15,5 +15,8 @@
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="code" jdbcType="VARCHAR" property="code"/>
<result column="week" jdbcType="VARCHAR" property="week" />
<result column="max_sl_code" jdbcType="INTEGER" property="maxSlCode" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="current" jdbcType="VARCHAR" property="current" />
</resultMap>
</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