commit
e5235468a1
|
|
@ -355,6 +355,19 @@ CREATE TABLE JCL_CODERULE_DETAIL (
|
|||
CONSTRAINT JCL_CODERULE_DETAIL PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
--JCL_CODERULE_RESERVED
|
||||
CREATE TABLE JCL_CODERULE_RESERVED (
|
||||
id int auto_increment NOT NULL,
|
||||
coderule_id int(11) null,
|
||||
reserved_code varchar(255) null,
|
||||
reserved_desc varchar (1000) null,
|
||||
creator int null,
|
||||
delete_type int null,
|
||||
create_time date null,
|
||||
update_time date null,
|
||||
CONSTRAINT JCL_CODERULE_RESERVED PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
package com.engine.organization.entity.codesetting.bo;
|
||||
|
||||
import com.engine.organization.entity.codesetting.param.CodeBaseParam;
|
||||
import com.engine.organization.entity.codesetting.param.CodeSaveDetailParam;
|
||||
import com.engine.organization.entity.codesetting.param.CodeSaveParam;
|
||||
import com.engine.organization.entity.codesetting.po.CodeRuleDetailPO;
|
||||
import com.engine.organization.entity.codesetting.po.CodeRulePO;
|
||||
import com.engine.organization.enums.DeleteTypeEnum;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/31
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class CodeSettingBO {
|
||||
|
||||
public static CodeRulePO buildCodeRule(CodeSaveParam params,Long uid,Long codeRuleId) {
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
parseOneSelfType(params.getDateSerial(), sb);
|
||||
parseOneSelfType(params.getDeptSerial(), sb);
|
||||
parseOneSelfType(params.getJobtitlesSerial(), sb);
|
||||
|
||||
CodeRulePO codeRulePO = CodeRulePO.builder()
|
||||
.serialType(params.getSerialType())
|
||||
.serialEnable(Optional.of(params.getSerialEnable()).orElse("0"))
|
||||
.oneselfType(sb.toString())
|
||||
.creator(uid)
|
||||
.deleteType(DeleteTypeEnum.NOT_DELETED.getValue())
|
||||
.updateTime(new Date())
|
||||
.build();
|
||||
if (codeRuleId == null) {
|
||||
codeRulePO.setCreateTime(new Date());
|
||||
}else {
|
||||
codeRulePO.setId(codeRuleId);
|
||||
}
|
||||
return codeRulePO;
|
||||
|
||||
}
|
||||
|
||||
public static List<CodeRuleDetailPO> bulidCodeDetailList(List<CodeSaveDetailParam> codeSaveDetailParams, Long uid,Long codeRuleId) {
|
||||
if(CollectionUtils.isEmpty(codeSaveDetailParams)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return codeSaveDetailParams.stream().map(e -> CodeRuleDetailPO.builder()
|
||||
.coderuleId(codeRuleId)
|
||||
.ruleType(e.getRuletype())
|
||||
.ruleValue(e.getRulevalue())
|
||||
.showOrder(e.getShoworder())
|
||||
.creator(uid)
|
||||
.deleteType(DeleteTypeEnum.NOT_DELETED.getValue())
|
||||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
.build()
|
||||
).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解析构建单独流程类型
|
||||
* @param param
|
||||
* @param sb
|
||||
*/
|
||||
private static void parseOneSelfType(CodeBaseParam param, StringBuilder sb) {
|
||||
if(Objects.nonNull(param)) {
|
||||
String enable = Util.null2String(param.getEnable(),"0");
|
||||
String key = param.getKey();
|
||||
if (enable.equals("1") && StringUtils.isNotEmpty(key)) {
|
||||
sb.append(key);
|
||||
sb.append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.engine.organization.entity.codesetting.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/31
|
||||
* @Version V1.0
|
||||
**/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CodeBaseParam {
|
||||
|
||||
private String enable;
|
||||
|
||||
private String key;
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.engine.organization.entity.codesetting.param;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/31
|
||||
* @Version V1.0
|
||||
**/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CodeSaveDetailParam {
|
||||
|
||||
private String ruletype;
|
||||
|
||||
private String rulevalue;
|
||||
|
||||
private int showorder;
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.engine.organization.entity.codesetting.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/31
|
||||
* @Version V1.0
|
||||
**/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CodeSaveParam {
|
||||
|
||||
private String serialEnable;
|
||||
|
||||
private List<CodeSaveDetailParam> codeSaveDetailParams;
|
||||
|
||||
private String serialType;
|
||||
|
||||
private CodeBaseParam dateSerial;
|
||||
|
||||
private CodeBaseParam deptSerial;
|
||||
|
||||
private CodeBaseParam jobtitlesSerial;
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
package com.engine.organization.entity.codesetting.po;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/30
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class CodeRule {
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
package com.engine.organization.entity.codesetting.po;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/30
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class CodeRuleDetail {
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.engine.organization.entity.codesetting.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/30
|
||||
* @Version V1.0
|
||||
**/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CodeRuleDetailPO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
private Long coderuleId;
|
||||
|
||||
/**
|
||||
* 规则类型
|
||||
*/
|
||||
private String ruleType;
|
||||
|
||||
/**
|
||||
* 规则值
|
||||
*/
|
||||
private String ruleValue;
|
||||
|
||||
private int showOrder;
|
||||
|
||||
private Long creator;
|
||||
private int deleteType;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package com.engine.organization.entity.codesetting.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/30
|
||||
* @Version V1.0
|
||||
**/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CodeRulePO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 编号类型(目前编号类型未知 后期可设置枚举)
|
||||
*/
|
||||
private String serialType;
|
||||
|
||||
/**
|
||||
* 是否开启
|
||||
*/
|
||||
private String serialEnable;
|
||||
|
||||
/**
|
||||
* 日期单独流水year,month,day
|
||||
*/
|
||||
private String oneselfType;
|
||||
|
||||
private Long creator;
|
||||
private int deleteType;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.engine.organization.entity.codesetting.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/31
|
||||
* @Version V1.0
|
||||
**/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CodeRuleReservedPO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
private int codeRuleId;
|
||||
|
||||
private String reservedCode;
|
||||
|
||||
private String reservedDesc;
|
||||
|
||||
private Long creator;
|
||||
private int deleteType;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.engine.organization.enums;
|
||||
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/31
|
||||
* @Version V1.0
|
||||
**/
|
||||
public enum RuleCodeTypeEnum {
|
||||
|
||||
|
||||
SUBCOMPANY("SUBCOMPANY"),
|
||||
DEPARTMENT("DEPARTMENT"),
|
||||
JOBTITLES("JOBTITLES"),
|
||||
USER("USER"),
|
||||
YEAR("YEAR"),
|
||||
MONTH("MONTH"),
|
||||
DAY("DAY"),
|
||||
STRING("STRING"),
|
||||
NUMBER("NUMBER");
|
||||
|
||||
private String value;
|
||||
|
||||
RuleCodeTypeEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static RuleCodeTypeEnum getByValue(String value) {
|
||||
for (RuleCodeTypeEnum ruleCodeType : values()) {
|
||||
if (ruleCodeType.getValue().equals(value)) {
|
||||
return ruleCodeType;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.engine.organization.mapper.codesetting;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/31
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface CodeRuleDetailMapper {
|
||||
|
||||
void delete(Long codeRuleId);
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?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="com.engine.organization.mapper.codesetting.CodeRuleDetailMapper">
|
||||
|
||||
|
||||
<delete id="delete">
|
||||
delete from JCL_CODERULE_DETAIL where coderule_id = #{codeRuleId}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.engine.organization.mapper.codesetting;
|
||||
|
||||
import com.engine.organization.entity.codesetting.po.CodeRulePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/31
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface CodeRuleMapper {
|
||||
|
||||
Long getCodeRuleId(@Param("serialType") String serialType);
|
||||
|
||||
void updateCodeRule(@Param("codeRulePO") CodeRulePO codeRulePO);
|
||||
|
||||
void insertCodeRule(CodeRulePO codeRulePO);
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<?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="com.engine.organization.mapper.codesetting.CodeRuleMapper">
|
||||
|
||||
<select id="getCodeRuleId" resultType="long">
|
||||
select t.id
|
||||
from JCL_CODERULE t
|
||||
where serial_type = #{serialType}
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updateCodeRule" parameterType="com.engine.organization.entity.codesetting.po.CodeRulePO">
|
||||
update JCL_CODERULE
|
||||
<set>
|
||||
serial_enable = #{serialEnable}
|
||||
oneself_type = #{oneselfType}
|
||||
creator=#{creator},
|
||||
update_time=#{updateTime},
|
||||
</set>
|
||||
WHERE id = #{codeRuleId} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<insert id="insertCodeRule" parameterType="com.engine.organization.entity.codesetting.po.CodeRulePO" keyProperty="id"
|
||||
keyColumn="id" useGeneratedKeys="true">
|
||||
INSERT INTO JCL_CODERULE
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="serial_type != null ">
|
||||
serial_type,
|
||||
</if>
|
||||
<if test="serial_enable != null ">
|
||||
serial_enable,
|
||||
</if>
|
||||
<if test="oneself_type != null ">
|
||||
oneself_type,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="serialType != null ">
|
||||
serialType,
|
||||
</if>
|
||||
<if test="serialEnable != null ">
|
||||
serialEnable,
|
||||
</if>
|
||||
<if test="oneselfType != null ">
|
||||
oneselfType,
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
package com.engine.organization.mapper.employee;
|
||||
|
||||
import com.engine.organization.entity.department.po.DepartmentPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.codesetting.param.CodeSaveParam;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
|
||||
/**
|
||||
|
|
@ -10,5 +11,23 @@ import com.engine.organization.util.response.ReturnResult;
|
|||
**/
|
||||
public interface CodeSettingService {
|
||||
|
||||
/***
|
||||
* 是否具有权限
|
||||
* @param serialtype
|
||||
* @return
|
||||
*/
|
||||
ReturnResult getHasRight(String serialtype);
|
||||
|
||||
/**
|
||||
* 保存更新
|
||||
* @param params
|
||||
*/
|
||||
void saveOrUpdateCodeSetting(CodeSaveParam params);
|
||||
|
||||
/**
|
||||
* 获取主表id
|
||||
* @param serialType
|
||||
* @return
|
||||
*/
|
||||
Long getCodeRuleId(String serialType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,23 @@
|
|||
package com.engine.organization.service.impl;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.hrm.entity.RuleCodeType;
|
||||
import com.engine.organization.entity.codesetting.bo.CodeSettingBO;
|
||||
import com.engine.organization.entity.codesetting.param.CodeSaveParam;
|
||||
import com.engine.organization.entity.codesetting.po.CodeRuleDetailPO;
|
||||
import com.engine.organization.entity.codesetting.po.CodeRulePO;
|
||||
import com.engine.organization.mapper.codesetting.CodeRuleDetailMapper;
|
||||
import com.engine.organization.mapper.codesetting.CodeRuleMapper;
|
||||
import com.engine.organization.service.CodeSettingService;
|
||||
import com.engine.organization.util.OrganizationAssert;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -17,6 +28,10 @@ import java.util.Map;
|
|||
**/
|
||||
public class CodeSettingServiceImpl extends Service implements CodeSettingService {
|
||||
|
||||
public CodeSettingService getCodeSettingService(User user) {
|
||||
return ServiceUtil.getService(CodeSettingServiceImpl.class,user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReturnResult getHasRight(String serialtype) {
|
||||
boolean hasRight = false;
|
||||
|
|
@ -38,4 +53,29 @@ public class CodeSettingServiceImpl extends Service implements CodeSettingServic
|
|||
retmap.put("hasRight", hasRight);
|
||||
return ReturnResult.successed(retmap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveOrUpdateCodeSetting(CodeSaveParam params) {
|
||||
OrganizationAssert.notNull(params,"参数不能为空");
|
||||
Long codeRuleId = getCodeSettingService(user).getCodeRuleId(params.getSerialType());
|
||||
CodeRulePO codeRulePO = CodeSettingBO.buildCodeRule(params,(long)user.getUID(),codeRuleId);
|
||||
//1.新增或更新主表
|
||||
if (codeRulePO != null) {
|
||||
MapperProxyFactory.getProxy(CodeRuleMapper.class).updateCodeRule(codeRulePO);
|
||||
}else {
|
||||
MapperProxyFactory.getProxy(CodeRuleMapper.class).insertCodeRule(codeRulePO);
|
||||
}
|
||||
|
||||
//2.插入明细表
|
||||
codeRuleId = getCodeSettingService(user).getCodeRuleId(params.getSerialType());
|
||||
MapperProxyFactory.getProxy(CodeRuleDetailMapper.class).delete(codeRuleId);
|
||||
List<CodeRuleDetailPO> codeRuleDetailPO = CodeSettingBO.bulidCodeDetailList(params.getCodeSaveDetailParams(),(long)user.getUID(),codeRuleId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getCodeRuleId(String serialType) {
|
||||
return MapperProxyFactory.getProxy(CodeRuleMapper.class).getCodeRuleId(serialType);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
package com.engine.organization.web;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.codesetting.param.CodeSaveParam;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.CodeSettingWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
|
|
@ -47,4 +46,19 @@ public class CodeSettingController {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@POST
|
||||
@Path("/saveOrUpdateCodeSetting")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult saveBaseComp(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody CodeSaveParam params) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return getCodeSettingWrapper(user).saveOrUpdateCodeSetting(params);
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.organization.wrapper;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.codesetting.param.CodeSaveParam;
|
||||
import com.engine.organization.service.CodeSettingService;
|
||||
import com.engine.organization.service.impl.CodeSettingServiceImpl;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
|
|
@ -22,4 +23,9 @@ public class CodeSettingWrapper extends Service {
|
|||
public ReturnResult getHasRight(String serialtype) {
|
||||
return getCodeSettingService(user).getHasRight(serialtype);
|
||||
}
|
||||
|
||||
public ReturnResult saveOrUpdateCodeSetting(CodeSaveParam params) {
|
||||
getCodeSettingService(user).saveOrUpdateCodeSetting(params);
|
||||
return ReturnResult.successed();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue