Showing
11 changed files
with
1060 additions
and
0 deletions
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/ledger/fund/GetFundCoordinationBo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.bo.ledger.fund; | |
| 2 | + | |
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 4 | +import java.math.BigDecimal; | |
| 5 | +import com.lframework.starter.common.constants.StringPool; | |
| 6 | +import java.time.LocalDate; | |
| 7 | +import com.lframework.starter.web.core.bo.BaseBo; | |
| 8 | +import com.lframework.xingyun.sc.entity.FundCoordination; | |
| 9 | +import io.swagger.annotations.ApiModelProperty; | |
| 10 | + | |
| 11 | +import lombok.Data; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * <p> | |
| 15 | + * 资金协调手续 GetBo | |
| 16 | + * </p> | |
| 17 | + * | |
| 18 | + */ | |
| 19 | +@Data | |
| 20 | +public class GetFundCoordinationBo extends BaseBo<FundCoordination> { | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * ID | |
| 24 | + */ | |
| 25 | + @ApiModelProperty("ID") | |
| 26 | + private String id; | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 申请人 | |
| 30 | + */ | |
| 31 | + @ApiModelProperty("申请人") | |
| 32 | + private String applicant; | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * 资金清收责任人 | |
| 36 | + */ | |
| 37 | + @ApiModelProperty("资金清收责任人") | |
| 38 | + private String fundResponsiblePerson; | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 申请日期 | |
| 42 | + */ | |
| 43 | + @ApiModelProperty("申请日期") | |
| 44 | + @JsonFormat(pattern = StringPool.DATE_PATTERN) | |
| 45 | + private LocalDate applicationDate; | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 订货单位 | |
| 49 | + */ | |
| 50 | + @ApiModelProperty("订货单位") | |
| 51 | + private String orderingUnit; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 客户简称ID | |
| 55 | + */ | |
| 56 | + @ApiModelProperty("客户简称ID") | |
| 57 | + private String shortCustomerId; | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 客户类型 | |
| 61 | + */ | |
| 62 | + @ApiModelProperty("客户类型") | |
| 63 | + private String customerType; | |
| 64 | + | |
| 65 | + /** | |
| 66 | + * 无限担保书 | |
| 67 | + */ | |
| 68 | + @ApiModelProperty("无限担保书") | |
| 69 | + private String unlimitedGuaranteeLetter; | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * 结算期限 | |
| 73 | + */ | |
| 74 | + @ApiModelProperty("结算期限") | |
| 75 | + private String settlementPeriod; | |
| 76 | + | |
| 77 | + /** | |
| 78 | + * 授权额度 | |
| 79 | + */ | |
| 80 | + @ApiModelProperty("授权额度") | |
| 81 | + private String creditLimit; | |
| 82 | + | |
| 83 | + /** | |
| 84 | + * 订货日期 | |
| 85 | + */ | |
| 86 | + @ApiModelProperty("订货日期") | |
| 87 | + @JsonFormat(pattern = StringPool.DATE_PATTERN) | |
| 88 | + private LocalDate orderDate; | |
| 89 | + | |
| 90 | + /** | |
| 91 | + * 订货数量 | |
| 92 | + */ | |
| 93 | + @ApiModelProperty("订货数量") | |
| 94 | + private BigDecimal orderQuantity; | |
| 95 | + | |
| 96 | + /** | |
| 97 | + * 协调事由需求说明 | |
| 98 | + */ | |
| 99 | + @ApiModelProperty("协调事由需求说明") | |
| 100 | + private String requirementSpecification; | |
| 101 | + | |
| 102 | + public GetFundCoordinationBo() { | |
| 103 | + | |
| 104 | + } | |
| 105 | + | |
| 106 | + public GetFundCoordinationBo(FundCoordination dto) { | |
| 107 | + | |
| 108 | + super(dto); | |
| 109 | + } | |
| 110 | + | |
| 111 | + @Override | |
| 112 | + public BaseBo<FundCoordination> convert(FundCoordination dto) { | |
| 113 | + return super.convert(dto); | |
| 114 | + } | |
| 115 | + | |
| 116 | + @Override | |
| 117 | + protected void afterInit(FundCoordination dto) { | |
| 118 | + | |
| 119 | + } | |
| 120 | +} | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/ledger/fund/QueryFundCoordinationBo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.bo.ledger.fund; | |
| 2 | + | |
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 4 | +import java.math.BigDecimal; | |
| 5 | +import com.lframework.starter.common.constants.StringPool; | |
| 6 | +import com.lframework.starter.web.core.bo.BaseBo; | |
| 7 | +import java.time.LocalDate; | |
| 8 | +import com.lframework.xingyun.sc.entity.FundCoordination; | |
| 9 | +import io.swagger.annotations.ApiModelProperty; | |
| 10 | + | |
| 11 | +import lombok.Data; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * <p> | |
| 15 | + * 资金协调手续 QueryBo | |
| 16 | + * </p> | |
| 17 | + * | |
| 18 | + */ | |
| 19 | +@Data | |
| 20 | +public class QueryFundCoordinationBo extends BaseBo<FundCoordination> { | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * ID | |
| 24 | + */ | |
| 25 | + @ApiModelProperty("ID") | |
| 26 | + private String id; | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 申请人 | |
| 30 | + */ | |
| 31 | + @ApiModelProperty("申请人") | |
| 32 | + private String applicant; | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * 资金清收责任人 | |
| 36 | + */ | |
| 37 | + @ApiModelProperty("资金清收责任人") | |
| 38 | + private String fundResponsiblePerson; | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 申请日期 | |
| 42 | + */ | |
| 43 | + @ApiModelProperty("申请日期") | |
| 44 | + @JsonFormat(pattern = StringPool.DATE_PATTERN) | |
| 45 | + private LocalDate applicationDate; | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 订货单位 | |
| 49 | + */ | |
| 50 | + @ApiModelProperty("订货单位") | |
| 51 | + private String orderingUnit; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 客户简称ID | |
| 55 | + */ | |
| 56 | + @ApiModelProperty("客户简称ID") | |
| 57 | + private String shortCustomerId; | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 客户类型 | |
| 61 | + */ | |
| 62 | + @ApiModelProperty("客户类型") | |
| 63 | + private String customerType; | |
| 64 | + | |
| 65 | + /** | |
| 66 | + * 无限担保书 | |
| 67 | + */ | |
| 68 | + @ApiModelProperty("无限担保书") | |
| 69 | + private String unlimitedGuaranteeLetter; | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * 结算期限 | |
| 73 | + */ | |
| 74 | + @ApiModelProperty("结算期限") | |
| 75 | + private String settlementPeriod; | |
| 76 | + | |
| 77 | + /** | |
| 78 | + * 授权额度 | |
| 79 | + */ | |
| 80 | + @ApiModelProperty("授权额度") | |
| 81 | + private String creditLimit; | |
| 82 | + | |
| 83 | + /** | |
| 84 | + * 订货日期 | |
| 85 | + */ | |
| 86 | + @ApiModelProperty("订货日期") | |
| 87 | + @JsonFormat(pattern = StringPool.DATE_PATTERN) | |
| 88 | + private LocalDate orderDate; | |
| 89 | + | |
| 90 | + /** | |
| 91 | + * 订货数量 | |
| 92 | + */ | |
| 93 | + @ApiModelProperty("订货数量") | |
| 94 | + private BigDecimal orderQuantity; | |
| 95 | + | |
| 96 | + /** | |
| 97 | + * 协调事由需求说明 | |
| 98 | + */ | |
| 99 | + @ApiModelProperty("协调事由需求说明") | |
| 100 | + private String requirementSpecification; | |
| 101 | + | |
| 102 | + public QueryFundCoordinationBo() { | |
| 103 | + | |
| 104 | + } | |
| 105 | + | |
| 106 | + public QueryFundCoordinationBo(FundCoordination dto) { | |
| 107 | + | |
| 108 | + super(dto); | |
| 109 | + } | |
| 110 | + | |
| 111 | + @Override | |
| 112 | + public BaseBo<FundCoordination> convert(FundCoordination dto) { | |
| 113 | + return super.convert(dto); | |
| 114 | + } | |
| 115 | + | |
| 116 | + @Override | |
| 117 | + protected void afterInit(FundCoordination dto) { | |
| 118 | + | |
| 119 | + } | |
| 120 | +} | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/ledger/FundCoordinationController.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.controller.ledger; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.annotations.security.HasPermission; | |
| 4 | +import com.lframework.starter.web.core.controller.DefaultBaseController; | |
| 5 | +import com.lframework.starter.web.core.utils.PageResultUtil; | |
| 6 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 7 | +import com.lframework.starter.web.core.components.resp.InvokeResult; | |
| 8 | +import javax.validation.constraints.NotBlank; | |
| 9 | +import com.lframework.xingyun.sc.bo.ledger.fund.GetFundCoordinationBo; | |
| 10 | +import com.lframework.xingyun.sc.bo.ledger.fund.QueryFundCoordinationBo; | |
| 11 | +import com.lframework.xingyun.sc.entity.FundCoordination; | |
| 12 | +import com.lframework.xingyun.sc.service.ledger.FundCoordinationService; | |
| 13 | +import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo; | |
| 14 | +import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo; | |
| 15 | +import com.lframework.xingyun.sc.vo.ledger.fund.UpdateFundCoordinationVo; | |
| 16 | +import io.swagger.annotations.ApiImplicitParam; | |
| 17 | +import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; | |
| 18 | +import com.lframework.starter.common.exceptions.impl.DefaultClientException; | |
| 19 | +import io.swagger.annotations.ApiOperation; | |
| 20 | +import com.lframework.starter.common.utils.CollectionUtil; | |
| 21 | +import io.swagger.annotations.Api; | |
| 22 | +import org.springframework.web.bind.annotation.DeleteMapping; | |
| 23 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 24 | +import org.springframework.validation.annotation.Validated; | |
| 25 | +import org.springframework.web.bind.annotation.*; | |
| 26 | +import javax.validation.Valid; | |
| 27 | +import java.util.List; | |
| 28 | +import java.util.stream.Collectors; | |
| 29 | + | |
| 30 | +/** | |
| 31 | + * 资金协调手续 Controller | |
| 32 | + * | |
| 33 | + */ | |
| 34 | +@Api(tags = "资金协调手续") | |
| 35 | +@Validated | |
| 36 | +@RestController | |
| 37 | +@RequestMapping("/fundCoordination") | |
| 38 | +public class FundCoordinationController extends DefaultBaseController { | |
| 39 | + | |
| 40 | + @Autowired | |
| 41 | + private FundCoordinationService fundCoordinationService; | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 查询列表 | |
| 45 | + */ | |
| 46 | + @ApiOperation("查询列表") | |
| 47 | + @HasPermission({"account-manage:donor-coordination:query"}) | |
| 48 | + @GetMapping("/query") | |
| 49 | + public InvokeResult<PageResult<QueryFundCoordinationBo>> query(@Valid QueryFundCoordinationVo vo) { | |
| 50 | + | |
| 51 | + PageResult<FundCoordination> pageResult = fundCoordinationService.query(getPageIndex(vo), getPageSize(vo), vo); | |
| 52 | + | |
| 53 | + List<FundCoordination> datas = pageResult.getDatas(); | |
| 54 | + List<QueryFundCoordinationBo> results = null; | |
| 55 | + | |
| 56 | + if (!CollectionUtil.isEmpty(datas)) { | |
| 57 | + results = datas.stream().map(QueryFundCoordinationBo::new).collect(Collectors.toList()); | |
| 58 | + } | |
| 59 | + | |
| 60 | + return InvokeResultBuilder.success(PageResultUtil.rebuild(pageResult, results)); | |
| 61 | + } | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 根据ID查询 | |
| 65 | + */ | |
| 66 | + @ApiOperation("根据ID查询") | |
| 67 | + @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) | |
| 68 | + @HasPermission({"account-manage:donor-coordination:query"}) | |
| 69 | + @GetMapping | |
| 70 | + public InvokeResult<GetFundCoordinationBo> get(@NotBlank(message = "id不能为空!") String id) { | |
| 71 | + | |
| 72 | + FundCoordination data = fundCoordinationService.findById(id); | |
| 73 | + if (data == null) { | |
| 74 | + throw new DefaultClientException("资金协调手续不存在!"); | |
| 75 | + } | |
| 76 | + | |
| 77 | + GetFundCoordinationBo result = new GetFundCoordinationBo(data); | |
| 78 | + | |
| 79 | + return InvokeResultBuilder.success(result); | |
| 80 | + } | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * 新增 | |
| 84 | + */ | |
| 85 | + @ApiOperation("新增") | |
| 86 | + @HasPermission({"account-manage:donor-coordination:add"}) | |
| 87 | + @PostMapping | |
| 88 | + public InvokeResult<Void> create(@Valid @RequestBody CreateFundCoordinationVo vo) { | |
| 89 | + | |
| 90 | + fundCoordinationService.create(vo); | |
| 91 | + | |
| 92 | + return InvokeResultBuilder.success(); | |
| 93 | + } | |
| 94 | + | |
| 95 | + /** | |
| 96 | + * 修改 | |
| 97 | + */ | |
| 98 | + @ApiOperation("修改") | |
| 99 | + @HasPermission({"account-manage:donor-coordination:modify"}) | |
| 100 | + @PutMapping | |
| 101 | + public InvokeResult<Void> update(@Valid @RequestBody UpdateFundCoordinationVo vo) { | |
| 102 | + | |
| 103 | + fundCoordinationService.update(vo); | |
| 104 | + | |
| 105 | + return InvokeResultBuilder.success(); | |
| 106 | + } | |
| 107 | + | |
| 108 | + /** | |
| 109 | + * 根据ID删除 | |
| 110 | + */ | |
| 111 | + @ApiOperation("根据ID删除") | |
| 112 | + @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) | |
| 113 | + @HasPermission({"account-manage:donor-coordination:delete"}) | |
| 114 | + @DeleteMapping | |
| 115 | + public InvokeResult<Void> deleteById(@NotBlank(message = "id不能为空!") String id) { | |
| 116 | + | |
| 117 | + fundCoordinationService.deleteById(id); | |
| 118 | + | |
| 119 | + return InvokeResultBuilder.success(); | |
| 120 | + } | |
| 121 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.entity; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 4 | +import java.math.BigDecimal; | |
| 5 | +import com.lframework.starter.web.core.dto.BaseDto; | |
| 6 | +import java.time.LocalDate; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import com.baomidou.mybatisplus.annotation.FieldFill; | |
| 9 | +import com.lframework.starter.web.core.entity.BaseEntity; | |
| 10 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 11 | +import lombok.Data; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * <p> | |
| 15 | + * 资金协调手续 | |
| 16 | + * </p> | |
| 17 | + * | |
| 18 | + */ | |
| 19 | +@Data | |
| 20 | +@TableName("fund_coordination") | |
| 21 | +public class FundCoordination extends BaseEntity implements BaseDto { | |
| 22 | + | |
| 23 | + private static final long serialVersionUID = 1L; | |
| 24 | + | |
| 25 | + public static final String CACHE_NAME = "FundCoordination"; | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * ID | |
| 29 | + */ | |
| 30 | + private String id; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 申请人 | |
| 34 | + */ | |
| 35 | + private String applicant; | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * 申请人 | |
| 39 | + */ | |
| 40 | + @TableField(exist = false) | |
| 41 | + private String applicantName; | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 资金清收责任人 | |
| 45 | + */ | |
| 46 | + private String fundResponsiblePerson; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 申请日期 | |
| 50 | + */ | |
| 51 | + private LocalDate applicationDate; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 订货单位 | |
| 55 | + */ | |
| 56 | + private String orderingUnit; | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 客户简称ID | |
| 60 | + */ | |
| 61 | + private String customerShortId; | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 客户简称 | |
| 65 | + */ | |
| 66 | + @TableField(exist = false) | |
| 67 | + private String customerShortName; | |
| 68 | + | |
| 69 | + /** | |
| 70 | + * 客户类型 | |
| 71 | + */ | |
| 72 | + private String customerType; | |
| 73 | + | |
| 74 | + /** | |
| 75 | + * 无限担保书 | |
| 76 | + */ | |
| 77 | + private String unlimitedGuaranteeLetter; | |
| 78 | + | |
| 79 | + /** | |
| 80 | + * 结算期限 | |
| 81 | + */ | |
| 82 | + private String settlementPeriod; | |
| 83 | + | |
| 84 | + /** | |
| 85 | + * 授权额度 | |
| 86 | + */ | |
| 87 | + private String creditLimit; | |
| 88 | + | |
| 89 | + /** | |
| 90 | + * 订货日期 | |
| 91 | + */ | |
| 92 | + private LocalDate orderDate; | |
| 93 | + | |
| 94 | + /** | |
| 95 | + * 订货数量 | |
| 96 | + */ | |
| 97 | + private BigDecimal orderQuantity; | |
| 98 | + | |
| 99 | + /** | |
| 100 | + * 协调事由需求说明 | |
| 101 | + */ | |
| 102 | + private String requirementSpecification; | |
| 103 | + | |
| 104 | + /** | |
| 105 | + * 创建人ID | |
| 106 | + */ | |
| 107 | + @TableField(fill = FieldFill.INSERT) | |
| 108 | + private String createById; | |
| 109 | + | |
| 110 | + /** | |
| 111 | + * 创建人 | |
| 112 | + */ | |
| 113 | + @TableField(fill = FieldFill.INSERT) | |
| 114 | + private String createBy; | |
| 115 | + | |
| 116 | + /** | |
| 117 | + * 更新人ID | |
| 118 | + */ | |
| 119 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 120 | + private String updateById; | |
| 121 | + | |
| 122 | + /** | |
| 123 | + * 更新人 | |
| 124 | + */ | |
| 125 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 126 | + private String updateBy; | |
| 127 | + | |
| 128 | + /** | |
| 129 | + * 创建时间 | |
| 130 | + */ | |
| 131 | + @TableField(fill = FieldFill.INSERT) | |
| 132 | + private LocalDateTime createTime; | |
| 133 | + | |
| 134 | + /** | |
| 135 | + * 更新时间 | |
| 136 | + */ | |
| 137 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 138 | + private LocalDateTime updateTime; | |
| 139 | + | |
| 140 | +} | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/ledger/FundCoordinationServiceImpl.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.impl.ledger; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | |
| 4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
| 5 | +import com.github.pagehelper.PageInfo; | |
| 6 | +import com.lframework.starter.web.core.impl.BaseMpServiceImpl; | |
| 7 | +import com.lframework.starter.web.core.utils.PageResultUtil; | |
| 8 | +import com.lframework.starter.web.core.utils.OpLogUtil; | |
| 9 | +import com.lframework.starter.common.exceptions.impl.DefaultClientException; | |
| 10 | +import java.io.Serializable; | |
| 11 | +import com.lframework.starter.web.core.utils.IdUtil; | |
| 12 | +import com.lframework.starter.web.core.annotations.oplog.OpLog; | |
| 13 | +import com.lframework.starter.web.core.utils.PageHelperUtil; | |
| 14 | +import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | |
| 15 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 16 | +import com.lframework.starter.common.utils.StringUtil; | |
| 17 | +import com.lframework.starter.common.utils.ObjectUtil; | |
| 18 | +import com.lframework.starter.common.utils.Assert; | |
| 19 | +import com.lframework.xingyun.sc.entity.FundCoordination; | |
| 20 | +import com.lframework.xingyun.sc.mappers.FundCoordinationMapper; | |
| 21 | +import com.lframework.xingyun.sc.service.ledger.FundCoordinationService; | |
| 22 | +import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo; | |
| 23 | +import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo; | |
| 24 | +import com.lframework.xingyun.sc.vo.ledger.fund.UpdateFundCoordinationVo; | |
| 25 | +import org.springframework.transaction.annotation.Transactional; | |
| 26 | +import org.springframework.stereotype.Service; | |
| 27 | + | |
| 28 | +import java.util.List; | |
| 29 | + | |
| 30 | +@Service | |
| 31 | +public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinationMapper, FundCoordination> implements FundCoordinationService { | |
| 32 | + | |
| 33 | + @Override | |
| 34 | + public PageResult<FundCoordination> query(Integer pageIndex, Integer pageSize, QueryFundCoordinationVo vo) { | |
| 35 | + | |
| 36 | + Assert.greaterThanZero(pageIndex); | |
| 37 | + Assert.greaterThanZero(pageSize); | |
| 38 | + | |
| 39 | + PageHelperUtil.startPage(pageIndex, pageSize); | |
| 40 | + List<FundCoordination> datas = this.query(vo); | |
| 41 | + | |
| 42 | + return PageResultUtil.convert(new PageInfo<>(datas)); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public List<FundCoordination> query(QueryFundCoordinationVo vo) { | |
| 47 | + | |
| 48 | + return getBaseMapper().query(vo); | |
| 49 | + } | |
| 50 | + | |
| 51 | + @Override | |
| 52 | + public FundCoordination findById(String id) { | |
| 53 | + | |
| 54 | + return getBaseMapper().findById(id); | |
| 55 | + } | |
| 56 | + | |
| 57 | + @OpLog(type = OtherOpLogType.class, name = "新增资金协调手续,ID:{}", params = {"#id"}) | |
| 58 | + @Transactional(rollbackFor = Exception.class) | |
| 59 | + @Override | |
| 60 | + public String create(CreateFundCoordinationVo vo) { | |
| 61 | + | |
| 62 | + FundCoordination data = new FundCoordination(); | |
| 63 | + data.setId(IdUtil.getId()); | |
| 64 | + data.setApplicant(vo.getApplicant()); | |
| 65 | + if (!StringUtil.isBlank(vo.getFundResponsiblePerson())) { | |
| 66 | + data.setFundResponsiblePerson(vo.getFundResponsiblePerson()); | |
| 67 | + } | |
| 68 | + data.setApplicationDate(vo.getApplicationDate()); | |
| 69 | + if (!StringUtil.isBlank(vo.getOrderingUnit())) { | |
| 70 | + data.setOrderingUnit(vo.getOrderingUnit()); | |
| 71 | + } | |
| 72 | + data.setCustomerShortId(vo.getCustomerShortId()); | |
| 73 | + if (!StringUtil.isBlank(vo.getCustomerType())) { | |
| 74 | + data.setCustomerType(vo.getCustomerType()); | |
| 75 | + } | |
| 76 | + if (!StringUtil.isBlank(vo.getUnlimitedGuaranteeLetter())) { | |
| 77 | + data.setUnlimitedGuaranteeLetter(vo.getUnlimitedGuaranteeLetter()); | |
| 78 | + } | |
| 79 | + if (!StringUtil.isBlank(vo.getSettlementPeriod())) { | |
| 80 | + data.setSettlementPeriod(vo.getSettlementPeriod()); | |
| 81 | + } | |
| 82 | + if (!StringUtil.isBlank(vo.getCreditLimit())) { | |
| 83 | + data.setCreditLimit(vo.getCreditLimit()); | |
| 84 | + } | |
| 85 | + if (vo.getOrderDate() != null) { | |
| 86 | + data.setOrderDate(vo.getOrderDate()); | |
| 87 | + } | |
| 88 | + if (vo.getOrderQuantity() != null) { | |
| 89 | + data.setOrderQuantity(vo.getOrderQuantity()); | |
| 90 | + } | |
| 91 | + if (!StringUtil.isBlank(vo.getRequirementSpecification())) { | |
| 92 | + data.setRequirementSpecification(vo.getRequirementSpecification()); | |
| 93 | + } | |
| 94 | + | |
| 95 | + getBaseMapper().insert(data); | |
| 96 | + | |
| 97 | + OpLogUtil.setVariable("id", data.getId()); | |
| 98 | + OpLogUtil.setExtra(vo); | |
| 99 | + | |
| 100 | + return data.getId(); | |
| 101 | + } | |
| 102 | + | |
| 103 | + @OpLog(type = OtherOpLogType.class, name = "修改资金协调手续,ID:{}", params = {"#id"}) | |
| 104 | + @Transactional(rollbackFor = Exception.class) | |
| 105 | + @Override | |
| 106 | + public void update(UpdateFundCoordinationVo vo) { | |
| 107 | + | |
| 108 | + FundCoordination data = getBaseMapper().selectById(vo.getId()); | |
| 109 | + if (ObjectUtil.isNull(data)) { | |
| 110 | + throw new DefaultClientException("资金协调手续不存在!"); | |
| 111 | + } | |
| 112 | + | |
| 113 | + LambdaUpdateWrapper<FundCoordination> updateWrapper = Wrappers.lambdaUpdate(FundCoordination.class) | |
| 114 | + .set(FundCoordination::getFundResponsiblePerson, StringUtil.isBlank(vo.getFundResponsiblePerson()) ? null : vo.getFundResponsiblePerson()) | |
| 115 | + .set(FundCoordination::getOrderingUnit, StringUtil.isBlank(vo.getOrderingUnit()) ? null : vo.getOrderingUnit()) | |
| 116 | + .set(FundCoordination::getCustomerShortId, vo.getCustomerShortId()) | |
| 117 | + .set(FundCoordination::getCustomerType, StringUtil.isBlank(vo.getCustomerType()) ? null : vo.getCustomerType()) | |
| 118 | + .set(FundCoordination::getUnlimitedGuaranteeLetter, StringUtil.isBlank(vo.getUnlimitedGuaranteeLetter()) ? null : vo.getUnlimitedGuaranteeLetter()) | |
| 119 | + .set(FundCoordination::getSettlementPeriod, StringUtil.isBlank(vo.getSettlementPeriod()) ? null : vo.getSettlementPeriod()) | |
| 120 | + .set(FundCoordination::getCreditLimit, StringUtil.isBlank(vo.getCreditLimit()) ? null : vo.getCreditLimit()) | |
| 121 | + .set(FundCoordination::getOrderDate, vo.getOrderDate() == null ? null : vo.getOrderDate()) | |
| 122 | + .set(FundCoordination::getOrderQuantity, vo.getOrderQuantity() == null ? null : vo.getOrderQuantity()) | |
| 123 | + .set(FundCoordination::getRequirementSpecification, StringUtil.isBlank(vo.getRequirementSpecification()) ? null : vo.getRequirementSpecification()) | |
| 124 | + .eq(FundCoordination::getId, vo.getId()); | |
| 125 | + | |
| 126 | + getBaseMapper().update(updateWrapper); | |
| 127 | + | |
| 128 | + OpLogUtil.setVariable("id", data.getId()); | |
| 129 | + OpLogUtil.setExtra(vo); | |
| 130 | + } | |
| 131 | + | |
| 132 | + @OpLog(type = OtherOpLogType.class, name = "删除资金协调手续,ID:{}", params = {"#id"}) | |
| 133 | + @Transactional(rollbackFor = Exception.class) | |
| 134 | + @Override | |
| 135 | + public void deleteById(String id) { | |
| 136 | + | |
| 137 | + getBaseMapper().deleteById(id); | |
| 138 | + } | |
| 139 | + | |
| 140 | + @Override | |
| 141 | + public void cleanCacheByKey(Serializable key) { | |
| 142 | + | |
| 143 | + } | |
| 144 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.mappers; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.mapper.BaseMapper; | |
| 4 | +import com.lframework.xingyun.sc.entity.FundCoordination; | |
| 5 | +import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo; | |
| 6 | +import org.apache.ibatis.annotations.Param; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 资金协调手续 Mapper 接口 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + */ | |
| 16 | +public interface FundCoordinationMapper extends BaseMapper<FundCoordination> { | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 查询列表 | |
| 20 | + * @param vo | |
| 21 | + * @return | |
| 22 | + */ | |
| 23 | + List<FundCoordination> query(@Param("vo") QueryFundCoordinationVo vo); | |
| 24 | + | |
| 25 | + FundCoordination findById(@Param("id") String id); | |
| 26 | +} | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/service/ledger/FundCoordinationService.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.service.ledger; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.service.BaseMpService; | |
| 4 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 5 | +import com.lframework.xingyun.sc.entity.FundCoordination; | |
| 6 | +import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo; | |
| 7 | +import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo; | |
| 8 | +import com.lframework.xingyun.sc.vo.ledger.fund.UpdateFundCoordinationVo; | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 资金协调手续 Service | |
| 13 | + */ | |
| 14 | +public interface FundCoordinationService extends BaseMpService<FundCoordination> { | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 查询列表 | |
| 18 | + * @return | |
| 19 | + */ | |
| 20 | + PageResult<FundCoordination> query(Integer pageIndex, Integer pageSize, QueryFundCoordinationVo vo); | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * 查询列表 | |
| 24 | + * @param vo | |
| 25 | + * @return | |
| 26 | + */ | |
| 27 | + List<FundCoordination> query(QueryFundCoordinationVo vo); | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * 根据ID查询 | |
| 31 | + * @param id | |
| 32 | + * @return | |
| 33 | + */ | |
| 34 | + FundCoordination findById(String id); | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 创建 | |
| 38 | + * @param vo | |
| 39 | + * @return | |
| 40 | + */ | |
| 41 | + String create(CreateFundCoordinationVo vo); | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 修改 | |
| 45 | + * @param vo | |
| 46 | + */ | |
| 47 | + void update(UpdateFundCoordinationVo vo); | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * 根据ID删除 | |
| 51 | + * @param id | |
| 52 | + * @return | |
| 53 | + */ | |
| 54 | + void deleteById(String id); | |
| 55 | +} | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/vo/ledger/fund/CreateFundCoordinationVo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.vo.ledger.fund; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.components.validation.IsNumberPrecision; | |
| 4 | +import java.math.BigDecimal; | |
| 5 | +import javax.validation.constraints.NotBlank; | |
| 6 | +import java.time.LocalDate; | |
| 7 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 8 | +import javax.validation.constraints.NotNull; | |
| 9 | +import io.swagger.annotations.ApiModelProperty; | |
| 10 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 11 | +import org.hibernate.validator.constraints.Length; | |
| 12 | +import java.io.Serializable; | |
| 13 | +import lombok.Data; | |
| 14 | + | |
| 15 | +@Data | |
| 16 | +public class CreateFundCoordinationVo implements BaseVo, Serializable { | |
| 17 | + | |
| 18 | + private static final long serialVersionUID = 1L; | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * 申请人 | |
| 22 | + */ | |
| 23 | + @ApiModelProperty(value = "申请人", required = true) | |
| 24 | + @NotBlank(message = "请输入申请人!") | |
| 25 | + @Length(message = "申请人最多允许32个字符!") | |
| 26 | + private String applicant; | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 资金清收责任人 | |
| 30 | + */ | |
| 31 | + @ApiModelProperty("资金清收责任人") | |
| 32 | + @Length(message = "资金清收责任人最多允许32个字符!") | |
| 33 | + private String fundResponsiblePerson; | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 申请日期 | |
| 37 | + */ | |
| 38 | + @ApiModelProperty(value = "申请日期", required = true) | |
| 39 | + @NotNull(message = "请输入申请日期!") | |
| 40 | + @TypeMismatch(message = "申请日期格式有误!") | |
| 41 | + private LocalDate applicationDate; | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 订货单位 | |
| 45 | + */ | |
| 46 | + @ApiModelProperty("订货单位") | |
| 47 | + @Length(message = "订货单位最多允许65,535个字符!") | |
| 48 | + private String orderingUnit; | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * 客户简称ID | |
| 52 | + */ | |
| 53 | + @ApiModelProperty(value = "客户简称ID", required = true) | |
| 54 | + @NotBlank(message = "请输入客户简称ID!") | |
| 55 | + @Length(message = "客户简称ID最多允许32个字符!") | |
| 56 | + private String customerShortId; | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 客户类型 | |
| 60 | + */ | |
| 61 | + @ApiModelProperty("客户类型") | |
| 62 | + @Length(message = "客户类型最多允许50个字符!") | |
| 63 | + private String customerType; | |
| 64 | + | |
| 65 | + /** | |
| 66 | + * 无限担保书 | |
| 67 | + */ | |
| 68 | + @ApiModelProperty("无限担保书") | |
| 69 | + @Length(message = "无限担保书最多允许500个字符!") | |
| 70 | + private String unlimitedGuaranteeLetter; | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 结算期限 | |
| 74 | + */ | |
| 75 | + @ApiModelProperty("结算期限") | |
| 76 | + @Length(message = "结算期限最多允许100个字符!") | |
| 77 | + private String settlementPeriod; | |
| 78 | + | |
| 79 | + /** | |
| 80 | + * 授权额度 | |
| 81 | + */ | |
| 82 | + @ApiModelProperty("授权额度") | |
| 83 | + @Length(message = "授权额度最多允许100个字符!") | |
| 84 | + private String creditLimit; | |
| 85 | + | |
| 86 | + /** | |
| 87 | + * 订货日期 | |
| 88 | + */ | |
| 89 | + @ApiModelProperty("订货日期") | |
| 90 | + @TypeMismatch(message = "订货日期格式有误!") | |
| 91 | + private LocalDate orderDate; | |
| 92 | + | |
| 93 | + /** | |
| 94 | + * 订货数量 | |
| 95 | + */ | |
| 96 | + @ApiModelProperty("订货数量") | |
| 97 | + @TypeMismatch(message = "订货数量格式有误!") | |
| 98 | + @IsNumberPrecision(message = "订货数量最多允许4位小数!", value = 4) | |
| 99 | + private BigDecimal orderQuantity; | |
| 100 | + | |
| 101 | + /** | |
| 102 | + * 协调事由需求说明 | |
| 103 | + */ | |
| 104 | + @ApiModelProperty("协调事由需求说明") | |
| 105 | + @Length(message = "协调事由需求说明最多允许65,535个字符!") | |
| 106 | + private String requirementSpecification; | |
| 107 | + | |
| 108 | +} | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/vo/ledger/fund/QueryFundCoordinationVo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.vo.ledger.fund; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | +import com.lframework.starter.web.core.vo.PageVo; | |
| 5 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 6 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 7 | +import io.swagger.annotations.ApiModelProperty; | |
| 8 | +import java.io.Serializable; | |
| 9 | + | |
| 10 | +@Data | |
| 11 | +public class QueryFundCoordinationVo extends PageVo implements BaseVo, Serializable { | |
| 12 | + | |
| 13 | + private static final long serialVersionUID = 1L; | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * 申请日期 | |
| 17 | + */ | |
| 18 | + @ApiModelProperty("申请日期") | |
| 19 | + @TypeMismatch(message = "申请日期格式有误!") | |
| 20 | + private String applicationDateStart; | |
| 21 | + | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 申请日期 | |
| 25 | + */ | |
| 26 | + @ApiModelProperty("申请日期") | |
| 27 | + @TypeMismatch(message = "申请日期格式有误!") | |
| 28 | + private String applicationDateEnd; | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * 订货单位 | |
| 32 | + */ | |
| 33 | + @ApiModelProperty("订货单位") | |
| 34 | + private String orderingUnit; | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 客户简称 | |
| 38 | + */ | |
| 39 | + @ApiModelProperty("客户简称") | |
| 40 | + private String shortName; | |
| 41 | + | |
| 42 | +} | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/vo/ledger/fund/UpdateFundCoordinationVo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.vo.ledger.fund; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | +import com.lframework.starter.web.core.components.validation.IsNumberPrecision; | |
| 5 | +import java.math.BigDecimal; | |
| 6 | +import javax.validation.constraints.NotBlank; | |
| 7 | +import java.time.LocalDate; | |
| 8 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 9 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 10 | +import io.swagger.annotations.ApiModelProperty; | |
| 11 | +import org.hibernate.validator.constraints.Length; | |
| 12 | +import java.io.Serializable; | |
| 13 | + | |
| 14 | +@Data | |
| 15 | +public class UpdateFundCoordinationVo implements BaseVo, Serializable { | |
| 16 | + | |
| 17 | + private static final long serialVersionUID = 1L; | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * ID | |
| 21 | + */ | |
| 22 | + @ApiModelProperty(value = "ID", required = true) | |
| 23 | + @NotBlank(message = "id不能为空!") | |
| 24 | + private String id; | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 资金清收责任人 | |
| 28 | + */ | |
| 29 | + @ApiModelProperty("资金清收责任人") | |
| 30 | + @Length(message = "资金清收责任人最多允许32个字符!") | |
| 31 | + private String fundResponsiblePerson; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 订货单位 | |
| 35 | + */ | |
| 36 | + @ApiModelProperty("订货单位") | |
| 37 | + @Length(message = "订货单位最多允许65,535个字符!") | |
| 38 | + private String orderingUnit; | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 客户简称ID | |
| 42 | + */ | |
| 43 | + @ApiModelProperty(value = "客户简称ID", required = true) | |
| 44 | + @NotBlank(message = "请输入客户简称ID!") | |
| 45 | + @Length(message = "客户简称ID最多允许32个字符!") | |
| 46 | + private String customerShortId; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 客户类型 | |
| 50 | + */ | |
| 51 | + @ApiModelProperty("客户类型") | |
| 52 | + @Length(message = "客户类型最多允许50个字符!") | |
| 53 | + private String customerType; | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 无限担保书 | |
| 57 | + */ | |
| 58 | + @ApiModelProperty("无限担保书") | |
| 59 | + @Length(message = "无限担保书最多允许500个字符!") | |
| 60 | + private String unlimitedGuaranteeLetter; | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * 结算期限 | |
| 64 | + */ | |
| 65 | + @ApiModelProperty("结算期限") | |
| 66 | + @Length(message = "结算期限最多允许100个字符!") | |
| 67 | + private String settlementPeriod; | |
| 68 | + | |
| 69 | + /** | |
| 70 | + * 授权额度 | |
| 71 | + */ | |
| 72 | + @ApiModelProperty("授权额度") | |
| 73 | + @Length(message = "授权额度最多允许100个字符!") | |
| 74 | + private String creditLimit; | |
| 75 | + | |
| 76 | + /** | |
| 77 | + * 订货日期 | |
| 78 | + */ | |
| 79 | + @ApiModelProperty("订货日期") | |
| 80 | + @TypeMismatch(message = "订货日期格式有误!") | |
| 81 | + private LocalDate orderDate; | |
| 82 | + | |
| 83 | + /** | |
| 84 | + * 订货数量 | |
| 85 | + */ | |
| 86 | + @ApiModelProperty("订货数量") | |
| 87 | + @TypeMismatch(message = "订货数量格式有误!") | |
| 88 | + @IsNumberPrecision(message = "订货数量最多允许4位小数!", value = 4) | |
| 89 | + private BigDecimal orderQuantity; | |
| 90 | + | |
| 91 | + /** | |
| 92 | + * 协调事由需求说明 | |
| 93 | + */ | |
| 94 | + @ApiModelProperty("协调事由需求说明") | |
| 95 | + @Length(message = "协调事由需求说明最多允许65,535个字符!") | |
| 96 | + private String requirementSpecification; | |
| 97 | + | |
| 98 | +} | ... | ... |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lframework.xingyun.sc.mappers.FundCoordinationMapper"> | |
| 4 | + | |
| 5 | + <resultMap id="FundCoordination" type="com.lframework.xingyun.sc.entity.FundCoordination"> | |
| 6 | + <id column="id" property="id"/> | |
| 7 | + <result column="applicant" property="applicant"/> | |
| 8 | + <result column="applicant_name" property="applicantName"/> | |
| 9 | + <result column="fund_responsible_person" property="fundResponsiblePerson"/> | |
| 10 | + <result column="application_date" property="applicationDate"/> | |
| 11 | + <result column="ordering_unit" property="orderingUnit"/> | |
| 12 | + <result column="customer_short_id" property="customerShortId"/> | |
| 13 | + <result column="customer_short_name" property="customerShortName"/> | |
| 14 | + <result column="customer_type" property="customerType"/> | |
| 15 | + <result column="unlimited_guarantee_letter" property="unlimitedGuaranteeLetter"/> | |
| 16 | + <result column="settlement_period" property="settlementPeriod"/> | |
| 17 | + <result column="credit_limit" property="creditLimit"/> | |
| 18 | + <result column="order_date" property="orderDate"/> | |
| 19 | + <result column="order_quantity" property="orderQuantity"/> | |
| 20 | + <result column="requirement_specification" property="requirementSpecification"/> | |
| 21 | + <result column="create_by_id" property="createById"/> | |
| 22 | + <result column="create_by" property="createBy"/> | |
| 23 | + <result column="update_by_id" property="updateById"/> | |
| 24 | + <result column="update_by" property="updateBy"/> | |
| 25 | + <result column="create_time" property="createTime"/> | |
| 26 | + <result column="update_time" property="updateTime"/> | |
| 27 | + </resultMap> | |
| 28 | + | |
| 29 | + <sql id="FundCoordination_sql"> | |
| 30 | + SELECT | |
| 31 | + tb.id, | |
| 32 | + tb.applicant, | |
| 33 | + u.name AS applicant_name, | |
| 34 | + tb.fund_responsible_person, | |
| 35 | + tb.application_date, | |
| 36 | + tb.ordering_unit, | |
| 37 | + tb.customer_short_id, | |
| 38 | + cs.short_name AS customer_short_name, | |
| 39 | + tb.customer_type, | |
| 40 | + tb.unlimited_guarantee_letter, | |
| 41 | + tb.settlement_period, | |
| 42 | + tb.credit_limit, | |
| 43 | + tb.order_date, | |
| 44 | + tb.order_quantity, | |
| 45 | + tb.requirement_specification, | |
| 46 | + tb.create_by_id, | |
| 47 | + tb.create_by, | |
| 48 | + tb.update_by_id, | |
| 49 | + tb.update_by, | |
| 50 | + tb.create_time, | |
| 51 | + tb.update_time | |
| 52 | + FROM fund_coordination AS tb | |
| 53 | + left join base_data_customer_short cs on cs.id = tb.customer_short_id | |
| 54 | + left join sys_user u on u.id = tb.applicant | |
| 55 | + </sql> | |
| 56 | + | |
| 57 | + <select id="query" resultMap="FundCoordination"> | |
| 58 | + <include refid="FundCoordination_sql"/> | |
| 59 | + <where> | |
| 60 | + <if test="vo.applicationDateStart != null and vo.applicationDateStart != ''"> | |
| 61 | + AND tb.application_date >= #{vo.applicationDateStart} | |
| 62 | + </if> | |
| 63 | + <if test="vo.applicationDateEnd != null and vo.applicationDateEnd != ''"> | |
| 64 | + <![CDATA[ | |
| 65 | + AND tb.application_date <= #{vo.applicationDateEnd} | |
| 66 | + ]]> | |
| 67 | + </if> | |
| 68 | + <if test="vo.orderingUnit != null and vo.orderingUnit != ''"> | |
| 69 | + AND tb.ordering_unit LIKE CONCAT('%', #{vo.orderingUnit}) | |
| 70 | + </if> | |
| 71 | + <if test="vo.shortName != null and vo.shortName != ''"> | |
| 72 | + AND cs.short_name LIKE CONCAT('%', #{vo.shortName}, '%') | |
| 73 | + </if> | |
| 74 | + </where> | |
| 75 | + ORDER BY tb.create_time DESC | |
| 76 | + </select> | |
| 77 | + | |
| 78 | + <select id="findById" resultType="com.lframework.xingyun.sc.entity.FundCoordination"> | |
| 79 | + <include refid="FundCoordination_sql"/> | |
| 80 | + <where> | |
| 81 | + <if test="id != null and id != ''"> | |
| 82 | + AND tb.id = #{id} | |
| 83 | + </if> | |
| 84 | + </where> | |
| 85 | + </select> | |
| 86 | +</mapper> | ... | ... |