15 changed files with 650 additions and 1 deletions
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
package jnpf.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import jnpf.entity.TReceiveConfig; |
||||
|
||||
|
||||
/** |
||||
* @author xbw |
||||
*/ |
||||
public interface TReceiveConfigMapper extends BaseMapper<TReceiveConfig> { |
||||
|
||||
} |
||||
|
||||
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
package jnpf.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import jnpf.entity.TReceive; |
||||
|
||||
|
||||
/** |
||||
* @author xbw |
||||
*/ |
||||
public interface TReceiveMapper extends BaseMapper<TReceive> { |
||||
|
||||
} |
||||
|
||||
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
package jnpf.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.entity.TReceiveConfig; |
||||
import jnpf.model.dto.TReceiveDto; |
||||
|
||||
|
||||
/** |
||||
* @author xbw |
||||
*/ |
||||
public interface TReceiveConfigService extends IService<TReceiveConfig> { |
||||
|
||||
TReceiveConfig detail(); |
||||
|
||||
void update(TReceiveDto.TReceiveDtoConfig tReceiveDtoConfig); |
||||
} |
||||
|
||||
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
package jnpf.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.entity.TReceive; |
||||
import jnpf.model.dto.TReceiveDto; |
||||
|
||||
|
||||
/** |
||||
* @author xbw |
||||
*/ |
||||
public interface TReceiveService extends IService<TReceive> { |
||||
|
||||
/**查询修改记录 |
||||
* @param param 分页 |
||||
* @return {@link IPage}<{@link TReceive}> |
||||
*/ |
||||
IPage<TReceive> selectList(TReceiveDto.TReceiveDtoBasePageParam param); |
||||
|
||||
} |
||||
|
||||
@ -0,0 +1,126 @@
@@ -0,0 +1,126 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS; |
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import jnpf.base.UserInfo; |
||||
import jnpf.entity.TReceive; |
||||
import jnpf.entity.TReceiveConfig; |
||||
import jnpf.enump.TReceiveEnum; |
||||
import jnpf.exception.DataException; |
||||
import jnpf.mapper.TReceiveConfigMapper; |
||||
import jnpf.model.dto.TReceiveDto; |
||||
import jnpf.service.TReceiveConfigService; |
||||
import jnpf.service.TReceiveService; |
||||
import jnpf.util.UserProvider; |
||||
import org.apache.dubbo.common.utils.CollectionUtils; |
||||
import org.springframework.beans.BeanUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.time.LocalDateTime; |
||||
import java.util.*; |
||||
import java.util.stream.Collectors; |
||||
|
||||
|
||||
/** |
||||
* @author xbw |
||||
*/ |
||||
@Service("iTReceiveServiceConfig") |
||||
@DS("receiveConfig") |
||||
public class TReceiveConfigServiceImpl extends ServiceImpl<TReceiveConfigMapper, TReceiveConfig> implements TReceiveConfigService { |
||||
|
||||
@Resource |
||||
TReceiveService tReceiveService; |
||||
|
||||
@Override |
||||
public TReceiveConfig detail() { |
||||
return this.baseMapper.selectOne(Wrappers.emptyWrapper()); |
||||
} |
||||
|
||||
@Override |
||||
public void update(TReceiveDto.TReceiveDtoConfig tReceiveDtoConfig) { |
||||
TReceiveConfig tReceiveConfig = this.baseMapper.selectOne(Wrappers.emptyWrapper()); |
||||
tReceiveConfig = Optional.ofNullable(tReceiveConfig).orElse(new TReceiveConfig()); |
||||
List<TReceive> tReceives = new ArrayList<>(); |
||||
//领用数量变化 需要社长审核范围
|
||||
if (!Objects.equals(tReceiveDtoConfig.getReceiveNumber(), tReceiveConfig.getReceiveNumber())) { |
||||
TReceive tReceive = new TReceive(); |
||||
tReceive.setModifyItem(TReceiveEnum.PresidentReviewEnum.NUMBER.getDescribe()); |
||||
tReceive.setModifyValue(String.valueOf(tReceiveDtoConfig.getReceiveNumber())); |
||||
tReceive.setSetItem(TReceiveEnum.ReceiveEnum.PRESIDENT.getDescribe()); |
||||
tReceives.add(tReceive); |
||||
} |
||||
//单册金额变化 需要社长审核范围
|
||||
if (!Objects.equals(tReceiveDtoConfig.getVolumeAmount(), tReceiveConfig.getVolumeAmount())) { |
||||
TReceive tReceive = new TReceive(); |
||||
tReceive.setModifyItem(TReceiveEnum.PresidentReviewEnum.SINGLE_AMOUNT.getDescribe()); |
||||
tReceive.setModifyValue(String.valueOf(tReceiveDtoConfig.getReceiveNumber())); |
||||
tReceive.setSetItem(TReceiveEnum.ReceiveEnum.PRESIDENT.getDescribe()); |
||||
tReceives.add(tReceive); |
||||
} |
||||
//领用总金额变化 需要社长审核范围
|
||||
if (!Objects.equals(tReceiveDtoConfig.getVolumeAmountAll(), tReceiveConfig.getVolumeAmountAll())) { |
||||
TReceive tReceive = new TReceive(); |
||||
tReceive.setModifyItem(TReceiveEnum.PresidentReviewEnum.ALL_AMOUNT.getDescribe()); |
||||
tReceive.setModifyValue(String.valueOf(tReceiveDtoConfig.getReceiveNumber())); |
||||
tReceive.setSetItem(TReceiveEnum.ReceiveEnum.PRESIDENT.getDescribe()); |
||||
tReceives.add(tReceive); |
||||
} |
||||
//是否开放 领用审核权限
|
||||
if (!Objects.equals(tReceiveDtoConfig.getReceiveAuth(), tReceiveConfig.getReceiveAuth())) { |
||||
List<String> list = Arrays.asList(Optional.ofNullable(tReceiveConfig.getReceiveAuth()).orElse("").split(",")); |
||||
// 差集
|
||||
List<String> collect = Arrays.stream(tReceiveDtoConfig.getReceiveAuth().split(",")).filter(item -> !list.contains(item)).collect(Collectors.toList()); |
||||
if (!collect.isEmpty()) { |
||||
|
||||
TReceive tReceive = new TReceive(); |
||||
tReceive.setModifyItem(TReceiveEnum.ReceiveItemEnum.OPEN.getDescribe()); |
||||
// 换成描述值
|
||||
List<String> collectDescribe = collect.stream().map(item -> Optional.ofNullable(TReceiveEnum.ReceiveAuthEnum.getEnumByCode(Integer.valueOf(item))).map(TReceiveEnum.ReceiveAuthEnum::getDescribe).orElse("")).collect(Collectors.toList()); |
||||
tReceive.setModifyValue(CollectionUtils.join(collectDescribe, ",")); |
||||
tReceive.setSetItem(TReceiveEnum.ReceiveEnum.AUTH.getDescribe()); |
||||
tReceives.add(tReceive); |
||||
} |
||||
|
||||
|
||||
} |
||||
//是否开放 领用范围
|
||||
if (!Objects.equals(tReceiveDtoConfig.getReceiveRadius(), tReceiveConfig.getReceiveRadius())) { |
||||
List<String> list = Arrays.asList(Optional.ofNullable(tReceiveConfig.getReceiveRadius()).orElse("").split(",")); |
||||
// 差集
|
||||
List<String> collect = Arrays.stream(tReceiveDtoConfig.getReceiveRadius().split(",")).filter(item -> !list.contains(item)).collect(Collectors.toList()); |
||||
if (!collect.isEmpty()) { |
||||
|
||||
TReceive tReceive = new TReceive(); |
||||
tReceive.setModifyItem(TReceiveEnum.ReceiveItemEnum.OPEN.getDescribe()); |
||||
// 换成描述值
|
||||
List<String> collectDescribe = collect.stream().map(item -> Optional.ofNullable(TReceiveEnum.ReceiveRadiusEnum.getEnumByCode(Integer.valueOf(item))).map(TReceiveEnum.ReceiveRadiusEnum::getDescribe).orElse("")).collect(Collectors.toList()); |
||||
tReceive.setModifyValue(CollectionUtils.join(collectDescribe, ",")); |
||||
tReceive.setSetItem(TReceiveEnum.ReceiveEnum.RADIUS.getDescribe()); |
||||
tReceives.add(tReceive); |
||||
} |
||||
} |
||||
if (tReceives.isEmpty()) { |
||||
throw new DataException("配置没有变动"); |
||||
} |
||||
UserInfo user = UserProvider.getUser(); |
||||
BeanUtils.copyProperties(tReceiveDtoConfig, tReceiveConfig); |
||||
// 更新配置
|
||||
tReceiveConfig.setUpdateTime(LocalDateTime.now()); |
||||
tReceiveConfig.setUpdateName(user.getUserName()); |
||||
tReceiveConfig.setUpdateBy(user.getId()); |
||||
this.updateById(tReceiveConfig); |
||||
|
||||
LocalDateTime now = LocalDateTime.now(); |
||||
|
||||
tReceives.forEach(item -> { |
||||
item.setCreateTime(now); |
||||
item.setCreateBy(user.getId()); |
||||
item.setCreateName(user.getUserName()); |
||||
}); |
||||
// 添加修改记录
|
||||
tReceiveService.saveBatch(tReceives); |
||||
|
||||
} |
||||
} |
||||
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import jnpf.entity.TReceive; |
||||
import jnpf.mapper.TReceiveMapper; |
||||
import jnpf.model.dto.TReceiveDto; |
||||
import jnpf.service.TReceiveService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
|
||||
/** |
||||
* @author xbw |
||||
*/ |
||||
@Service("iTReceiveService") |
||||
@DS("receive") |
||||
public class TReceiveServiceImpl extends ServiceImpl<TReceiveMapper, TReceive> implements TReceiveService { |
||||
|
||||
|
||||
@Override |
||||
public IPage<TReceive> selectList(TReceiveDto.TReceiveDtoBasePageParam param) { |
||||
return this.page(new Page<>(param.getCurrent(), param.getSize())); |
||||
} |
||||
} |
||||
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
<?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="jnpf.mapper.TReceiveConfigMapper"> |
||||
|
||||
<resultMap type="jnpf.entity.TReceiveConfig" id="TBunchingMap"> |
||||
<result property="id" column="id" jdbcType="INTEGER"/> |
||||
<result property="receiveNumber" column="receive_number"/> |
||||
<result property="volumeAmount" column="volume_amount"/> |
||||
<result property="volumeAmountAll" column="volume_amount_all"/> |
||||
<result property="receiveAuth" column="receive_auth"/> |
||||
<result property="receiveRadius" column="receive_radius"/> |
||||
|
||||
<result property="createBy" column="create_by"/> |
||||
<result property="updateBy" column="update_by"/> |
||||
<result property="updateName" column="update_name"/> |
||||
<result property="updateTime" column="update_time"/> |
||||
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/> |
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
||||
<result property="createName" column="create_name" jdbcType="VARCHAR"/> |
||||
</resultMap> |
||||
|
||||
<sql id="Base_Column_List"> |
||||
id,receive_number,volume_amount,volume_amount_all,receive_auth,receive_radius, |
||||
create_by,update_by,update_name,update_time,del_flag, |
||||
create_time,create_name |
||||
</sql> |
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
<?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="jnpf.mapper.TReceiveMapper"> |
||||
|
||||
<resultMap type="jnpf.entity.TReceive" id="TBunchingMap"> |
||||
<result property="id" column="id" jdbcType="INTEGER"/> |
||||
<result property="setItem" column="set_item"/> |
||||
<result property="modifyItem" column="modify_item"/> |
||||
<result property="modifyValue" column="modify_value"/> |
||||
|
||||
<result property="createBy" column="create_by"/> |
||||
<result property="updateBy" column="update_by"/> |
||||
<result property="updateName" column="update_name"/> |
||||
<result property="updateTime" column="update_time"/> |
||||
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/> |
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
||||
<result property="createName" column="create_name" jdbcType="VARCHAR"/> |
||||
</resultMap> |
||||
|
||||
<sql id="Base_Column_List"> |
||||
id,set_item,modify_item,modify_value, |
||||
create_by,update_by,update_name,update_time,del_flag, |
||||
create_time,create_name |
||||
</sql> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,54 @@
@@ -0,0 +1,54 @@
|
||||
package jnpf.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jnpf.base.ActionResult; |
||||
import jnpf.constant.MsgCode; |
||||
import jnpf.entity.TReceive; |
||||
import jnpf.entity.TReceiveConfig; |
||||
import jnpf.model.dto.TReceiveDto; |
||||
import jnpf.service.TReceiveConfigService; |
||||
import jnpf.service.TReceiveService; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
/** |
||||
* @author xbw |
||||
*/ |
||||
@RestController |
||||
@Api("领用设置") |
||||
@Tag(name = "领用设置", description = "TReceive") |
||||
@RequestMapping("/receive") |
||||
@AllArgsConstructor |
||||
public class TReceiveController { |
||||
|
||||
private final TReceiveService tReceiveService; |
||||
private final TReceiveConfigService tReceiveConfigService; |
||||
|
||||
@Operation(summary = "修改领用配置") |
||||
@PostMapping("update") |
||||
public ActionResult<Void> update(@RequestBody TReceiveDto.TReceiveDtoConfig param) { |
||||
tReceiveConfigService.update(param); |
||||
return ActionResult.success(MsgCode.SU000.get()); |
||||
} |
||||
|
||||
@Operation(summary = "查看配置") |
||||
@PostMapping("detail") |
||||
public ActionResult<TReceiveConfig> detail() { |
||||
return ActionResult.success(MsgCode.SU000.get(), tReceiveConfigService.detail()); |
||||
} |
||||
|
||||
|
||||
@Operation(summary = "领用设置记录查询") |
||||
@PostMapping("selectList") |
||||
public ActionResult<IPage<TReceive>> selectList(@RequestBody TReceiveDto.TReceiveDtoBasePageParam param) { |
||||
return ActionResult.success(MsgCode.SU000.get(), tReceiveService.selectList(param)); |
||||
} |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,85 @@
@@ -0,0 +1,85 @@
|
||||
package jnpf.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.*; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* @author xbw |
||||
*/ |
||||
@Data |
||||
@TableName("t_receive") |
||||
public class TReceive implements Serializable { |
||||
private static final long serialVersionUID = -65167281438767901L; |
||||
|
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
private Long id; |
||||
|
||||
@ApiModelProperty(value = "设置项") |
||||
@TableField(value = "set_item") |
||||
private String setItem; |
||||
|
||||
@ApiModelProperty(value = "修改配置") |
||||
@TableField(value = "modify_item") |
||||
private String modifyItem; |
||||
|
||||
@ApiModelProperty(value = "参数值") |
||||
@TableField(value = "modify_value") |
||||
private String modifyValue; |
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "删除标记0-正常 1-删除") |
||||
@TableField(value = "del_flag") |
||||
@TableLogic |
||||
private Integer delFlag; |
||||
|
||||
@ApiModelProperty(value = "创建者id") |
||||
@TableField(value = "create_by") |
||||
private String createBy; |
||||
|
||||
@ApiModelProperty(value = "创建者名称") |
||||
@TableField(value = "create_name") |
||||
private String createName; |
||||
|
||||
@ApiModelProperty(value = "创建时间") |
||||
@TableField(value = "create_time",fill = FieldFill.INSERT) |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime createTime; |
||||
|
||||
@ApiModelProperty(value = "更新者id") |
||||
@TableField(value = "update_by") |
||||
private String updateBy; |
||||
|
||||
@ApiModelProperty(value = "更新者名称") |
||||
@TableField(value = "update_name") |
||||
private String updateName; |
||||
|
||||
@ApiModelProperty(value = "修改时间") |
||||
@TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE) |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime updateTime; |
||||
|
||||
@ApiModelProperty(value = "创建人单位名称") |
||||
@TableField(value = "create_corp_name") |
||||
private String createCorpName; |
||||
|
||||
@ApiModelProperty(value = "创建人单位id") |
||||
@TableField(value = "create_corp_id") |
||||
private String createCorpId; |
||||
|
||||
@ApiModelProperty(value = "创建人部门名称") |
||||
@TableField(value = "create_dept_name") |
||||
private String createDeptName; |
||||
|
||||
@ApiModelProperty(value = "创建人部门id") |
||||
@TableField(value = "create_dept_id") |
||||
private String createDeptId; |
||||
} |
||||
@ -0,0 +1,93 @@
@@ -0,0 +1,93 @@
|
||||
package jnpf.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.*; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* @author xbw |
||||
*/ |
||||
@Data |
||||
@TableName("t_receive_config") |
||||
public class TReceiveConfig implements Serializable { |
||||
private static final long serialVersionUID = -65167281438767901L; |
||||
|
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
private Long id; |
||||
|
||||
@ApiModelProperty(value = "领用数量") |
||||
@TableField(value = "receive_number") |
||||
private Integer receiveNumber; |
||||
|
||||
@ApiModelProperty(value = "单册金额") |
||||
@TableField(value = "volume_amount") |
||||
private Integer volumeAmount; |
||||
|
||||
@ApiModelProperty(value = "审核权限") |
||||
@TableField(value = "receive_auth") |
||||
private String receiveAuth; |
||||
|
||||
@ApiModelProperty(value = "总金额") |
||||
@TableField(value = "volume_amount_all") |
||||
private Integer volumeAmountAll; |
||||
|
||||
@ApiModelProperty(value = "领用范围") |
||||
@TableField(value = "receive_radius") |
||||
private String receiveRadius; |
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "删除标记0-正常 1-删除") |
||||
@TableField(value = "del_flag") |
||||
@TableLogic |
||||
private Integer delFlag; |
||||
|
||||
@ApiModelProperty(value = "创建者id") |
||||
@TableField(value = "create_by") |
||||
private String createBy; |
||||
|
||||
@ApiModelProperty(value = "创建者名称") |
||||
@TableField(value = "create_name") |
||||
private String createName; |
||||
|
||||
@ApiModelProperty(value = "创建时间") |
||||
@TableField(value = "create_time",fill = FieldFill.INSERT) |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime createTime; |
||||
|
||||
@ApiModelProperty(value = "更新者id") |
||||
@TableField(value = "update_by") |
||||
private String updateBy; |
||||
|
||||
@ApiModelProperty(value = "更新者名称") |
||||
@TableField(value = "update_name") |
||||
private String updateName; |
||||
|
||||
@ApiModelProperty(value = "修改时间") |
||||
@TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE) |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime updateTime; |
||||
|
||||
@ApiModelProperty(value = "创建人单位名称") |
||||
@TableField(value = "create_corp_name") |
||||
private String createCorpName; |
||||
|
||||
@ApiModelProperty(value = "创建人单位id") |
||||
@TableField(value = "create_corp_id") |
||||
private String createCorpId; |
||||
|
||||
@ApiModelProperty(value = "创建人部门名称") |
||||
@TableField(value = "create_dept_name") |
||||
private String createDeptName; |
||||
|
||||
@ApiModelProperty(value = "创建人部门id") |
||||
@TableField(value = "create_dept_id") |
||||
private String createDeptId; |
||||
} |
||||
@ -0,0 +1,105 @@
@@ -0,0 +1,105 @@
|
||||
package jnpf.enump; |
||||
|
||||
import lombok.Getter; |
||||
|
||||
/** |
||||
* @author xbw |
||||
*/ |
||||
public class TReceiveEnum { |
||||
@Getter |
||||
public enum ReceiveEnum { |
||||
AUTH(0, "领用审核权限"), |
||||
PRESIDENT(1, "需要社长审核"), |
||||
RADIUS(2, "领用范围"); |
||||
|
||||
private final Integer code; |
||||
private final String describe; |
||||
|
||||
ReceiveEnum(Integer code, String describe) { |
||||
this.code = code; |
||||
this.describe = describe; |
||||
} |
||||
} |
||||
|
||||
@Getter |
||||
public enum ReceiveItemEnum { |
||||
OPEN(0, "是否开放"); |
||||
|
||||
private final Integer code; |
||||
private final String describe; |
||||
|
||||
ReceiveItemEnum(Integer code, String describe) { |
||||
this.code = code; |
||||
this.describe = describe; |
||||
} |
||||
} |
||||
|
||||
|
||||
@Getter |
||||
public enum ReceiveAuthEnum { |
||||
DIRECTOR(0, "编辑室主任"), |
||||
SUB_LEADER(1, "分管领导"), |
||||
PRESIDENT(2, "社长");; |
||||
|
||||
private final Integer code; |
||||
private final String describe; |
||||
|
||||
ReceiveAuthEnum(Integer code, String describe) { |
||||
this.code = code; |
||||
this.describe = describe; |
||||
} |
||||
|
||||
public static TReceiveEnum.ReceiveAuthEnum getEnumByCode(Integer type) { |
||||
for (TReceiveEnum.ReceiveAuthEnum enm : TReceiveEnum.ReceiveAuthEnum.values()) { |
||||
if (enm.getCode().equals(type)) { |
||||
return enm; |
||||
} |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
} |
||||
|
||||
@Getter |
||||
public enum ReceiveRadiusEnum { |
||||
CLIQUE(0, "集团"), |
||||
OUR_ASSOCIATION(1, "本社"), |
||||
FOREIGN_AGENCY(2, "外社"), |
||||
OTHER(3, "其他"); |
||||
|
||||
private final Integer code; |
||||
private final String describe; |
||||
|
||||
ReceiveRadiusEnum(Integer code, String describe) { |
||||
this.code = code; |
||||
this.describe = describe; |
||||
} |
||||
|
||||
public static TReceiveEnum.ReceiveRadiusEnum getEnumByCode(Integer type) { |
||||
for (TReceiveEnum.ReceiveRadiusEnum enm : TReceiveEnum.ReceiveRadiusEnum.values()) { |
||||
if (enm.getCode().equals(type)) { |
||||
return enm; |
||||
} |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
} |
||||
|
||||
@Getter |
||||
public enum PresidentReviewEnum { |
||||
NUMBER(0, "领用数量"), |
||||
SINGLE_AMOUNT(1, "单册金额"), |
||||
ALL_AMOUNT(2, "领用总金额"); |
||||
|
||||
private final Integer code; |
||||
private final String describe; |
||||
|
||||
PresidentReviewEnum(Integer code, String describe) { |
||||
this.code = code; |
||||
this.describe = describe; |
||||
} |
||||
} |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
package jnpf.model.dto; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author xbw |
||||
*/ |
||||
public class TReceiveDto { |
||||
|
||||
private TReceiveDto() { |
||||
} |
||||
|
||||
|
||||
@Data |
||||
public static class TReceiveDtoBasePageParam { |
||||
@ApiModelProperty("当前页") |
||||
private Integer current = 1; |
||||
@ApiModelProperty("页大小") |
||||
private Integer size = 10; |
||||
} |
||||
|
||||
@Data |
||||
public static class TReceiveDtoConfig { |
||||
@ApiModelProperty(value = "领用数量") |
||||
private Integer receiveNumber; |
||||
|
||||
@ApiModelProperty(value = "单册金额") |
||||
private Integer volumeAmount; |
||||
|
||||
@ApiModelProperty(value = "总金额") |
||||
private Integer volumeAmountAll; |
||||
|
||||
@ApiModelProperty(value = "领用范围 0-编辑室主任 1-分管领导 2-社长 用,隔开") |
||||
private String receiveAuth; |
||||
|
||||
@ApiModelProperty(value = "领用范围 0-集团 1-本社 2-外社 3-其他 用,隔开") |
||||
private String receiveRadius; |
||||
} |
||||
} |
||||
Loading…
Reference in new issue