Browse Source

feat: [部门管理] 增加简称和是否在学科显示

master
memorylkf 2 months ago
parent
commit
37efb1a8d0
5 changed files with 46 additions and 2 deletions
  1. +24
    -0
      hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/domain/SysDept.java
  2. +11
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudySubject.java
  3. +1
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudySubjectServiceImpl.java
  4. +1
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudySubjectMapper.xml
  5. +9
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysDeptMapper.xml

+ 24
- 0
hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/domain/SysDept.java View File

@ -57,6 +57,12 @@ public class SysDept extends BaseEntity
/** 缩写 */
private String abbr;
/** jc */
private String jc;
/** 是否在学科处显示1否,10是 */
private Integer showInSubject;
/** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>();
@ -206,6 +212,8 @@ public class SysDept extends BaseEntity
.append("updateTime", getUpdateTime())
.append("type", getType())
.append("abbr", getAbbr())
.append("jc", getJc())
.append("showInSubject", getShowInSubject())
.toString();
}
@ -224,4 +232,20 @@ public class SysDept extends BaseEntity
public void setAbbr(String abbr) {
this.abbr = abbr;
}
public String getJc() {
return jc;
}
public void setJc(String jc) {
this.jc = jc;
}
public Integer getShowInSubject() {
return showInSubject;
}
public void setShowInSubject(Integer showInSubject) {
this.showInSubject = showInSubject;
}
}

+ 11
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudySubject.java View File

@ -27,6 +27,9 @@ public class StudySubject extends MpBaseEntity
/** 学科名称 */
private String deptName;
/** 学科简称 */
private String deptJc;
/** 负责人id */
private Long leader;
@ -79,6 +82,14 @@ public class StudySubject extends MpBaseEntity
return deptName;
}
public String getDeptJc() {
return deptJc;
}
public void setDeptJc(String deptJc) {
this.deptJc = deptJc;
}
public void setLeader(Long leader)
{
this.leader = leader;

+ 1
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudySubjectServiceImpl.java View File

@ -64,6 +64,7 @@ public class StudySubjectServiceImpl extends ServiceImpl
StudySubject info = new StudySubject();
info.setDeptId(subject.getDeptId());
info.setDeptName(subject.getDeptName());
info.setDeptJc(subject.getDeptJc());
List<StudySubject> exists = existsList.stream().filter(o->o.getDeptId().equals(subject.getDeptId())).collect(Collectors.toList());

+ 1
- 1
hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudySubjectMapper.xml View File

@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hxhq.business.mapper.StudySubjectMapper">
<select id="selectAllSubject" resultType="com.hxhq.business.domain.StudySubject">
SELECT dept_id,dept_name FROM `sys_dept` WHERE del_flag='0' AND `type`=3
SELECT dept_id,dept_name,jc as deptJc FROM `sys_dept` WHERE del_flag='0' AND `show_in_subject`=10
ORDER BY CONVERT(dept_name USING gbk) ASC
</select>
<select id="queryPreFormCountList" resultType="com.hxhq.business.dto.study.StudyListDto">

+ 9
- 1
hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysDeptMapper.xml View File

@ -22,10 +22,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="type" column="type" />
<result property="abbr" column="abbr" />
<result property="jc" column="jc" />
<result property="showInSubject" column="show_in_subject" />
</resultMap>
<sql id="selectDeptVo">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time, d.type, d.abbr
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time, d.type, d.abbr,d.jc,d.show_in_subject
from sys_dept d
</sql>
@ -101,6 +103,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="type != null and type != 0">`type`,</if>
<if test="abbr != null and abbr != ''">`abbr`,</if>
<if test="jc != null and jc != ''">`jc`,</if>
<if test="showInSubject != null and showInSubject != 0">`show_in_subject`,</if>
create_time
)values(
<if test="deptId != null and deptId != 0">#{deptId},</if>
@ -115,6 +119,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="type != null and type != 0">#{type},</if>
<if test="abbr != null and abbr != ''">#{abbr},</if>
<if test="jc != null and jc != ''">#{jc},</if>
<if test="showInSubject != null and showInSubject != 0">#{showInSubject},</if>
sysdate()
)
</insert>
@ -133,6 +139,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="type != null and type != 0">`type` = #{type},</if>
<if test="abbr != null and abbr != ''">`abbr` = #{abbr},</if>
<if test="jc != null and jc != ''">`jc` = #{jc},</if>
<if test="showInSubject != null and showInSubject != 0">`show_in_subject` = #{showInSubject},</if>
update_time = sysdate()
</set>
where dept_id = #{deptId}

Loading…
Cancel
Save