提交 414de11a authored 作者: aiqingguo's avatar aiqingguo

违约方案查询

上级 86c1543e
package com.clx.performance.vo.pc.breakcontract.carrier;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
/**
* @author liruixin
* Date 2023-10-24
* Time 16:02
*/
@Getter
@Setter
@ToString
@NoArgsConstructor
public class BreakContractOwnerRuleFileVO {
@ApiModelProperty(value = "id", example = "1")
private Integer id;
@ApiModelProperty(value = "违约方案名称", example = "方案1")
private String name;
@ApiModelProperty(value = "违约方案文件", example = "url")
private String file;
}
package com.clx.performance.vo.pc.breakcontract.carrier;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
/**
* @author liruixin
* Date 2023-10-24
* Time 16:02
*/
@Getter
@Setter
@ToString
@NoArgsConstructor
public class BreakContractOwnerRulePullDownVO {
@ApiModelProperty(value = "id", example = "1")
private Integer id;
@ApiModelProperty(value = "违约方案名称", example = "方案1")
private String name;
@ApiModelProperty(value = "违约方案文件", example = "url")
private String file;
}
......@@ -24,6 +24,9 @@ public class BreakContractOwnerRuleVO {
@ApiModelProperty(value = "违约方案名称", example = "方案1")
private String name;
@ApiModelProperty(value = "违约方案文件", example = "url")
private String file;
@ApiModelProperty(value = "状态:1启用 2禁用", example = "1")
private Integer status;
......
......@@ -6,6 +6,8 @@ import com.clx.performance.param.pc.breakcontract.carrier.BreakContractOwnerRule
import com.clx.performance.param.pc.breakcontract.carrier.BreakContractOwnerRuleStatusUpdateParam;
import com.clx.performance.param.pc.breakcontract.carrier.PageBreakContractOwnerRuleParam;
import com.clx.performance.service.breakcontract.BreakContractOwnerRuleService;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleFileVO;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRulePullDownVO;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleVO;
import com.msl.common.base.PageData;
import com.msl.common.convertor.aspect.UnitCovert;
......@@ -55,6 +57,13 @@ public class CarrierBreakContractOwnerRuleController {
return Result.ok(breakContractOwnerRuleService.getRuleInfo(id));
}
@ApiOperation(value = "查询规则文档信息", notes = "<br>By:艾庆国")
@GetMapping("/getRuleFile")
public Result<BreakContractOwnerRuleFileVO> getRuleFile(Integer id) {
return Result.ok(breakContractOwnerRuleService.getRuleFile(id));
}
@ApiOperation(value = "分页搜索违约列表",notes = "<br>By:艾庆国")
@PostMapping("/pageRule")
@UnitCovert(param = false)
......@@ -65,7 +74,7 @@ public class CarrierBreakContractOwnerRuleController {
@ApiOperation(value = "查询方案下拉列表",notes = "<br>By:艾庆国")
@PostMapping("/listPullDown")
public Result<List<BreakContractOwnerRuleVO>> listPullDown() {
public Result<List<BreakContractOwnerRulePullDownVO>> listPullDown() {
return Result.ok(breakContractOwnerRuleService.listPullDown());
}
......
......@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.param.pc.breakcontract.carrier.BreakContractOwnerRuleAddParam;
import com.clx.performance.param.pc.breakcontract.carrier.BreakContractOwnerRuleStatusUpdateParam;
import com.clx.performance.param.pc.breakcontract.carrier.PageBreakContractOwnerRuleParam;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleFileVO;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRulePullDownVO;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleVO;
import java.util.List;
......@@ -18,8 +20,10 @@ public interface BreakContractOwnerRuleService {
void saveRule(BreakContractOwnerRuleAddParam param);
void updateStatus(BreakContractOwnerRuleStatusUpdateParam param);
BreakContractOwnerRuleVO getRuleInfo(Integer id);
BreakContractOwnerRuleFileVO getRuleFile(Integer id);
IPage<BreakContractOwnerRuleVO> pageRule(PageBreakContractOwnerRuleParam param);
List<BreakContractOwnerRuleVO> listPullDown();
List<BreakContractOwnerRulePullDownVO> listPullDown();
}
......@@ -11,6 +11,8 @@ import com.clx.performance.param.pc.breakcontract.carrier.BreakContractOwnerRule
import com.clx.performance.param.pc.breakcontract.carrier.PageBreakContractOwnerRuleParam;
import com.clx.performance.service.breakcontract.BreakContractOwnerRuleService;
import com.clx.performance.struct.breakcontract.BreakContractOwnerRuleStruct;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleFileVO;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRulePullDownVO;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleVO;
import com.msl.common.exception.ServiceSystemException;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -67,6 +69,18 @@ public class BreakContractOwnerRuleServiceImpl implements BreakContractOwnerRul
return vo;
}
@Override
public BreakContractOwnerRuleFileVO getRuleFile(Integer id) {
BreakContractOwnerRule rule = breakContractOwnerRuleDao.getEntityByKey(id).orElseThrow(PerformanceResultEnum.BREAK_CONTRACT_RULE_NO_FOUND);
BreakContractOwnerRuleFileVO vo = new BreakContractOwnerRuleFileVO();
vo.setId(rule.getId());
vo.setName(rule.getName());
vo.setFile(rule.getFile());
return vo;
}
@Override
public IPage<BreakContractOwnerRuleVO> pageRule(PageBreakContractOwnerRuleParam param) {
return breakContractOwnerRuleDao.pageByParam(param);
......@@ -74,8 +88,8 @@ public class BreakContractOwnerRuleServiceImpl implements BreakContractOwnerRul
}
@Override
public List<BreakContractOwnerRuleVO> listPullDown() {
return breakContractOwnerRuleStruct.convert(breakContractOwnerRuleDao.listEnable());
public List<BreakContractOwnerRulePullDownVO> listPullDown() {
return breakContractOwnerRuleStruct.convertBreakContractOwnerRulePullDownVO(breakContractOwnerRuleDao.listEnable());
}
}
package com.clx.performance.struct.breakcontract;
import com.clx.performance.model.breakcontract.BreakContractOwnerRule;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRulePullDownVO;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleVO;
import com.msl.common.utils.DateStructUtil;
import com.msl.common.utils.DateUtils;
......@@ -12,5 +13,6 @@ import java.util.List;
public interface BreakContractOwnerRuleStruct {
List<BreakContractOwnerRuleVO> convert(List<BreakContractOwnerRule> list);
List<BreakContractOwnerRulePullDownVO> convertBreakContractOwnerRulePullDownVO(List<BreakContractOwnerRule> list);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论