parent
652e492770
commit
22060187c8
|
|
@ -95,6 +95,21 @@ public class SysDictDataController extends BaseController
|
|||
|
||||
}
|
||||
|
||||
@GetMapping(value = "/type/leaveReporting")
|
||||
public AjaxResult leaveReporting() {
|
||||
try{
|
||||
List<SysDictData> data = dictTypeService.leaveReporting("");
|
||||
if (StringUtils.isNull(data)) {
|
||||
data = new ArrayList<SysDictData>();
|
||||
}
|
||||
return success(data);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return error("系统错误");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增字典类型
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -93,4 +93,6 @@ public interface SysDictDataMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
|
||||
|
||||
List<SysDictData> leaveReporting(String dictType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,4 +96,6 @@ public interface ISysDictTypeService
|
|||
* @return 结果
|
||||
*/
|
||||
public boolean checkDictTypeUnique(SysDictType dictType);
|
||||
|
||||
List<SysDictData> leaveReporting(String dictType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -221,4 +221,20 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
|
|||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysDictData> leaveReporting(String dictType) {
|
||||
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
|
||||
if (StringUtils.isNotEmpty(dictDatas))
|
||||
{
|
||||
return dictDatas;
|
||||
}
|
||||
dictDatas = dictDataMapper.leaveReporting(dictType);
|
||||
if (StringUtils.isNotEmpty(dictDatas))
|
||||
{
|
||||
DictUtils.setDictCache(dictType, dictDatas);
|
||||
return dictDatas;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
leave_end_interval,
|
||||
</if>
|
||||
leave_duration, source, create_user_id, is_agree, location, host_user_id,host_user_name, remark,examine_status)
|
||||
VALUES (#{userId}, #{userName}, #{orgId}, #{orgName}, #{type} , '请假', #{leaveReason},
|
||||
VALUES (#{userId}, #{userName}, #{orgId}, #{orgName}, #{leaveType} , '请假', #{leaveReason},
|
||||
#{leaveStartDate},
|
||||
<if test="leaveStartInterval != null">
|
||||
#{leaveStartInterval},
|
||||
|
|
@ -43,8 +43,8 @@
|
|||
org_name = #{orgName},
|
||||
</if>
|
||||
|
||||
<if test="type != null and type != ''">
|
||||
leave_type = #{type},
|
||||
<if test="leaveType != null and leaveType != ''">
|
||||
leave_type = #{leaveType},
|
||||
</if>
|
||||
<if test="hostUserId != null and hostUserId != ''">
|
||||
host_user_id = #{hostUserId},
|
||||
|
|
|
|||
|
|
@ -59,8 +59,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="countDictDataByType" resultType="Integer">
|
||||
select count(1) from sys_dict_data where dict_type=#{dictType}
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictDataById" parameterType="Long">
|
||||
<select id="leaveReporting" resultType="com.bonus.system.api.domain.SysDictData">
|
||||
<include refid="selectDictDataVo"/>
|
||||
where status = '0' and dict_type = 'att_status' and is_leave = '1' and dict_code !='37' order by dict_sort asc
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictDataById" parameterType="Long">
|
||||
delete from sys_dict_data where dict_code = #{dictCode}
|
||||
</delete>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue