Commit 65574c964710aeebec315d65c3b4c8b1b485efaf

Authored by 房远帅
1 parent 86fc74b8

账期:资金协调手续-根据客户简称获取基础数据

... ... @@ -1008,6 +1008,9 @@ CREATE TABLE `fund_coordination` (
1008 1008 `credit_limit` varchar(100) DEFAULT NULL COMMENT '授权额度',
1009 1009 `order_date` date DEFAULT NULL COMMENT '订货日期',
1010 1010 `order_quantity` decimal(15,4) DEFAULT NULL COMMENT '订货数量',
  1011 + `total_accounts_receivable` varchar(100) DEFAULT NULL COMMENT '总计应收款',
  1012 + `overdue_receivables` varchar(100) DEFAULT NULL COMMENT '超期应收款',
  1013 + `agreed_internal_receivables` varchar(100) DEFAULT NULL COMMENT '约定内应收款',
1011 1014 `requirement_specification` text DEFAULT NULL COMMENT '协调事由需求说明',
1012 1015 `office_clerk` varchar(32) DEFAULT NULL COMMENT '办事处内勤ID',
1013 1016 `office_clerk_opinion` text DEFAULT NULL COMMENT '办事处内勤审核意见',
... ...
... ... @@ -117,6 +117,24 @@ public class GetFundCoordinationBo extends BaseBo<FundCoordination> {
117 117 private BigDecimal orderQuantity;
118 118
119 119 /**
  120 + * 总计应收款
  121 + */
  122 + @ApiModelProperty("总计应收款")
  123 + private String totalAccountsReceivable;
  124 +
  125 + /**
  126 + * 超期应收款
  127 + */
  128 + @ApiModelProperty("超期应收款")
  129 + private String overdueReceivables;
  130 +
  131 + /**
  132 + * 约定内应收款
  133 + */
  134 + @ApiModelProperty("约定内应收款")
  135 + private String agreedInternalReceivables;
  136 +
  137 + /**
120 138 * 协调事由需求说明
121 139 */
122 140 @ApiModelProperty("协调事由需求说明")
... ...
... ... @@ -109,6 +109,24 @@ public class QueryFundCoordinationBo extends BaseBo<FundCoordination> {
109 109 private BigDecimal orderQuantity;
110 110
111 111 /**
  112 + * 总计应收款
  113 + */
  114 + @ApiModelProperty("总计应收款")
  115 + private String totalAccountsReceivable;
  116 +
  117 + /**
  118 + * 超期应收款
  119 + */
  120 + @ApiModelProperty("超期应收款")
  121 + private String overdueReceivables;
  122 +
  123 + /**
  124 + * 约定内应收款
  125 + */
  126 + @ApiModelProperty("约定内应收款")
  127 + private String agreedInternalReceivables;
  128 +
  129 + /**
112 130 * 协调事由需求说明
113 131 */
114 132 @ApiModelProperty("协调事由需求说明")
... ...
... ... @@ -22,12 +22,14 @@ import com.lframework.xingyun.sc.bo.ledger.fund.QueryFundCoordinationBo;
22 22 import com.lframework.xingyun.sc.bo.ledger.rel.GetFundOrderingUnitBo;
23 23 import com.lframework.xingyun.sc.entity.FundCoordination;
24 24 import com.lframework.xingyun.sc.entity.ReceiptLedgerInfo;
  25 +import com.lframework.xingyun.sc.entity.UnlimitedGuaranteeLetter;
25 26 import com.lframework.xingyun.sc.service.ledger.FundCoordinationService;
26 27 import com.lframework.xingyun.sc.service.ledger.ReceiptLedgerInfoService;
  28 +import com.lframework.xingyun.sc.service.ledger.UnlimitedGuaranteeLetterService;
27 29 import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo;
28 30 import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo;
29 31 import com.lframework.xingyun.sc.vo.ledger.fund.UpdateFundCoordinationVo;
30   -import com.lframework.xingyun.sc.vo.ledger.receipt.QueryReceiptLedgerInfoVo;
  32 +import com.lframework.xingyun.sc.vo.ledger.guarantee.QueryUnlimitedGuaranteeLetterVo;
31 33 import io.swagger.annotations.ApiImplicitParam;
32 34 import com.lframework.starter.web.core.components.resp.InvokeResultBuilder;
33 35 import com.lframework.starter.common.exceptions.impl.DefaultClientException;
... ... @@ -39,6 +41,8 @@ import org.springframework.beans.factory.annotation.Autowired;
39 41 import org.springframework.validation.annotation.Validated;
40 42 import org.springframework.web.bind.annotation.*;
41 43 import javax.validation.Valid;
  44 +import java.math.BigDecimal;
  45 +import java.math.RoundingMode;
42 46 import java.time.LocalDate;
43 47 import java.time.temporal.ChronoUnit;
44 48 import java.util.ArrayList;
... ... @@ -67,6 +71,8 @@ public class FundCoordinationController extends DefaultBaseController {
67 71 private ReceiptLedgerInfoService receiptLedgerInfoService;
68 72 @Resource
69 73 private SysDataDicItemService sysDataDicItemService;
  74 + @Resource
  75 + private UnlimitedGuaranteeLetterService unlimitedGuaranteeLetterService;
70 76
71 77 /**
72 78 * 查询列表
... ... @@ -166,14 +172,11 @@ public class FundCoordinationController extends DefaultBaseController {
166 172
167 173 @ApiOperation("查询")
168 174 @PostMapping("/getBaseInfo")
169   - public InvokeResult<List<GetFundCoordinationBo>> getBaseInfo(@RequestBody(required = false) List<String> ids) {
170   - if (CollectionUtil.isEmpty(ids)) {
  175 + public InvokeResult<List<GetFundCoordinationBo>> getBaseInfo(@RequestBody(required = false) List<String> names) {
  176 + if (CollectionUtil.isEmpty(names)) {
171 177 return InvokeResultBuilder.success(CollectionUtil.emptyList());
172 178 }
173   - QueryReceiptLedgerInfoVo vo = new QueryReceiptLedgerInfoVo();
174   - vo.setCustomerShortId(ids.get(0));
175   - vo.setIncludeEndAccountReceivable(true);
176   - List<ReceiptLedgerInfo> query = receiptLedgerInfoService.query(vo);
  179 + List<ReceiptLedgerInfo> query = receiptLedgerInfoService.queryByCustomerShortName(names.get(0));
177 180 if (CollectionUtil.isEmpty(query)) {
178 181 return InvokeResultBuilder.success(CollectionUtil.emptyList());
179 182 }
... ... @@ -196,12 +199,35 @@ public class FundCoordinationController extends DefaultBaseController {
196 199 Map<String, List<ReceiptLedgerInfo>> map = query.stream()
197 200 .collect(Collectors.groupingBy(ReceiptLedgerInfo::getCustomerId));
198 201 StringBuilder customerNameStr = new StringBuilder();
  202 + //无限担保书
  203 + StringBuilder unlimitedGuaranteeLetterStr = new StringBuilder();
199 204 //订货单位集合
200 205 List<GetFundOrderingUnitBo> fundOrderingUnitList = new ArrayList<>();
  206 + //总计应收款
  207 + BigDecimal totalAccountsReceivable = BigDecimal.ZERO;
  208 + //超期应收款
  209 + BigDecimal overdueReceivables = BigDecimal.ZERO;
  210 + //一次协调
  211 + BigDecimal firstCoordinate = BigDecimal.ZERO;
  212 + //二次协调
  213 + BigDecimal second = BigDecimal.ZERO;
  214 + //清欠
  215 + BigDecimal clearDebts = BigDecimal.ZERO;
  216 + //约定内应收款
  217 + BigDecimal agreedInternalReceivables = BigDecimal.ZERO;
201 218 for (Map.Entry<String, List<ReceiptLedgerInfo>> entry : map.entrySet()) {
202 219 String customerId = entry.getKey();
203 220 List<ReceiptLedgerInfo> receiptList = entry.getValue();
204 221 customerNameStr.append(receiptList.get(0).getCustomerName()).append("、");
  222 + //无限担保书
  223 + QueryUnlimitedGuaranteeLetterVo vo1 = new QueryUnlimitedGuaranteeLetterVo();
  224 + vo1.setOrderingUnit(customerId);
  225 + List<UnlimitedGuaranteeLetter> query1 = unlimitedGuaranteeLetterService.query(vo1);
  226 + if (CollectionUtil.isEmpty(query1)) {
  227 + unlimitedGuaranteeLetterStr.append("无").append(",");
  228 + } else {
  229 + unlimitedGuaranteeLetterStr.append("有").append(",");
  230 + }
205 231 GetFundOrderingUnitBo bo = new GetFundOrderingUnitBo();
206 232 bo.setOrderingUnit(customerId);
207 233 bo.setOrderingUnitName(receiptList.get(0).getCustomerName());
... ... @@ -215,8 +241,46 @@ public class FundCoordinationController extends DefaultBaseController {
215 241 bo1.setAccountsReceivable(receipt.getStartAccountReceivable().stripTrailingZeros().toPlainString());
216 242 }
217 243 SysDataDicItem sysDataDicItem = sysDataDicItemService.findByCode("DEBT_STATUS", receipt.getDebtStatus());
  244 + if (sysDataDicItem != null && sysDataDicItem.getCode().equals("FIRST_COORDINATE")) {
  245 + if (receipt.getStartAccountReceivable() != null) {
  246 + //一次协调
  247 + firstCoordinate = firstCoordinate.add(receipt.getStartAccountReceivable());
  248 + //超期应收款
  249 + overdueReceivables = overdueReceivables.add(receipt.getStartAccountReceivable());
  250 + //总计应收款
  251 + totalAccountsReceivable = totalAccountsReceivable.add(receipt.getStartAccountReceivable());
  252 + }
  253 + }
  254 + if (sysDataDicItem != null && sysDataDicItem.getCode().equals("SECOND_COORDINATE")) {
  255 + if (receipt.getStartAccountReceivable() != null) {
  256 + //二次协调
  257 + second = second.add(receipt.getStartAccountReceivable());
  258 + //超期应收款
  259 + overdueReceivables = overdueReceivables.add(receipt.getStartAccountReceivable());
  260 + //总计应收款
  261 + totalAccountsReceivable = totalAccountsReceivable.add(receipt.getStartAccountReceivable());
  262 + }
  263 + }
  264 + if (sysDataDicItem != null && sysDataDicItem.getCode().equals("CLEAR_DEBTS")) {
  265 + if (receipt.getStartAccountReceivable() != null) {
  266 + //清欠
  267 + clearDebts = clearDebts.add(receipt.getStartAccountReceivable());
  268 + //超期应收款
  269 + overdueReceivables = overdueReceivables.add(receipt.getStartAccountReceivable());
  270 + //总计应收款
  271 + totalAccountsReceivable = totalAccountsReceivable.add(receipt.getStartAccountReceivable());
  272 + }
  273 + }
  274 + if (sysDataDicItem != null && sysDataDicItem.getCode().equals("AGREEMENT")) {
  275 + if (receipt.getStartAccountReceivable() != null) {
  276 + //约定内应收款
  277 + agreedInternalReceivables = agreedInternalReceivables.add(receipt.getStartAccountReceivable());
  278 + //总计应收款
  279 + totalAccountsReceivable = totalAccountsReceivable.add(receipt.getStartAccountReceivable());
  280 + }
  281 + }
218 282 if (!(sysDataDicItem != null && (sysDataDicItem.getCode().equals("FIRST_COORDINATE")
219   - || sysDataDicItem.getCode().equals("SECOND") || sysDataDicItem.getCode().equals("CLEAR_DEBTS")))) {
  283 + || sysDataDicItem.getCode().equals("SECOND_COORDINATE") || sysDataDicItem.getCode().equals("CLEAR_DEBTS")))) {
220 284 continue;
221 285 }
222 286 bo1.setStatus(sysDataDicItem.getName());
... ... @@ -241,6 +305,50 @@ public class FundCoordinationController extends DefaultBaseController {
241 305 customerNameStr.deleteCharAt(customerNameStr.length() - 1);
242 306 }
243 307 getFundCoordinationBo.setOrderingUnitName(customerNameStr.toString());
  308 + //无限担保书
  309 + if (unlimitedGuaranteeLetterStr.length() > 0) {
  310 + unlimitedGuaranteeLetterStr.deleteCharAt(unlimitedGuaranteeLetterStr.length() - 1);
  311 + }
  312 + getFundCoordinationBo.setUnlimitedGuaranteeLetter(unlimitedGuaranteeLetterStr.toString());
  313 + //总计应收款
  314 + if (totalAccountsReceivable.compareTo(BigDecimal.ZERO) > 0) {
  315 + getFundCoordinationBo.setTotalAccountsReceivable(totalAccountsReceivable.stripTrailingZeros().toPlainString());
  316 + }
  317 + //超期应收款
  318 + StringBuilder overdueReceivablesStr = new StringBuilder();
  319 + if (overdueReceivables.compareTo(BigDecimal.ZERO) > 0) {
  320 + BigDecimal amountInWan = overdueReceivables.divide(BigDecimal.valueOf(10000), 10, RoundingMode.HALF_UP);
  321 + String string = amountInWan.stripTrailingZeros().toPlainString();
  322 + overdueReceivablesStr.append(string).append("万").append("(其中");
  323 + }
  324 + if (firstCoordinate.compareTo(BigDecimal.ZERO) > 0) {
  325 + BigDecimal amountInWan = firstCoordinate.divide(BigDecimal.valueOf(10000), 10, RoundingMode.HALF_UP);
  326 + String string = amountInWan.stripTrailingZeros().toPlainString();
  327 + overdueReceivablesStr.append("一次协调").append(string).append("万,");
  328 + }
  329 + //二次协调
  330 + if (second.compareTo(BigDecimal.ZERO) > 0) {
  331 + BigDecimal amountInWan = second.divide(BigDecimal.valueOf(10000), 10, RoundingMode.HALF_UP);
  332 + String string = amountInWan.stripTrailingZeros().toPlainString();
  333 + overdueReceivablesStr.append("二次协调").append(string).append("万,");
  334 + }
  335 + //清欠
  336 + if (clearDebts.compareTo(BigDecimal.ZERO) > 0) {
  337 + BigDecimal amountInWan = clearDebts.divide(BigDecimal.valueOf(10000), 10, RoundingMode.HALF_UP);
  338 + String string = amountInWan.stripTrailingZeros().toPlainString();
  339 + overdueReceivablesStr.append("清欠").append(string).append("万,");
  340 + }
  341 + if (overdueReceivablesStr.length() > 0) {
  342 + overdueReceivablesStr.deleteCharAt(overdueReceivablesStr.length() - 1);
  343 + overdueReceivablesStr.append(")");
  344 + getFundCoordinationBo.setOverdueReceivables(overdueReceivablesStr.toString());
  345 + }
  346 + //约定内应收款
  347 + if (agreedInternalReceivables.compareTo(BigDecimal.ZERO) > 0) {
  348 + BigDecimal amountInWan = agreedInternalReceivables.divide(BigDecimal.valueOf(10000), 10, RoundingMode.HALF_UP);
  349 + String string = amountInWan.stripTrailingZeros().toPlainString();
  350 + getFundCoordinationBo.setAgreedInternalReceivables(string + "万");
  351 + }
244 352 getFundCoordinationBo.setFundOrderingUnitList(fundOrderingUnitList);
245 353 data.add(getFundCoordinationBo);
246 354
... ...
... ... @@ -102,6 +102,21 @@ public class FundCoordination extends BaseEntity implements BaseDto {
102 102 private BigDecimal orderQuantity;
103 103
104 104 /**
  105 + * 总计应收款
  106 + */
  107 + private String totalAccountsReceivable;
  108 +
  109 + /**
  110 + * 超期应收款
  111 + */
  112 + private String overdueReceivables;
  113 +
  114 + /**
  115 + * 约定内应收款
  116 + */
  117 + private String agreedInternalReceivables;
  118 +
  119 + /**
105 120 * 协调事由需求说明
106 121 */
107 122 private String requirementSpecification;
... ...
... ... @@ -97,6 +97,25 @@ public class ReceiptLedgerInfoServiceImpl extends BaseMpServiceImpl<ReceiptLedge
97 97 }
98 98
99 99 @Override
  100 + public List<ReceiptLedgerInfo> queryByCustomerShortName(String customerShortName) {
  101 + List<ReceiptLedgerInfo> infoList = getBaseMapper().queryByCustomerShortName(customerShortName);
  102 + if (CollectionUtils.isEmpty(infoList)) {
  103 + return Collections.emptyList();
  104 + }
  105 + // 获取客户类型(数据字典)
  106 + List<SysDataDicItem> enterpriseTypeList = sysDataDicItemService.findByDicCode("ENTERPRISE_TYPE");
  107 + Map<String, String> enterpriseTypeMap = enterpriseTypeList.stream()
  108 + .collect(Collectors.toMap(SysDataDicItem::getCode, SysDataDicItem::getName, (v1, v2) -> v1));
  109 + for (ReceiptLedgerInfo info : infoList) {
  110 + String customerType = info.getCustomerType();
  111 + String enterpriseType = enterpriseTypeMap.get(customerType);
  112 +
  113 + info.setCustomerType(enterpriseType);
  114 + }
  115 + return infoList;
  116 + }
  117 +
  118 + @Override
100 119 public ReceiptLedgerInfo findById(String id) {
101 120 QueryReceiptLedgerInfoVo ledgerInfoVo = new QueryReceiptLedgerInfoVo();
102 121 ledgerInfoVo.setId(id);
... ...
... ... @@ -25,6 +25,14 @@ public interface ReceiptLedgerInfoMapper extends BaseMapper<ReceiptLedgerInfo> {
25 25 */
26 26 List<ReceiptLedgerInfo> query(@Param("vo") QueryReceiptLedgerInfoVo vo);
27 27
  28 + /**
  29 + * 查询列表
  30 + *
  31 + * @param customerShortName 查询条件
  32 + * @return List<ReceiptLedgerInfo>
  33 + */
  34 + List<ReceiptLedgerInfo> queryByCustomerShortName(@Param("customerShortName") String customerShortName);
  35 +
28 36
29 37 /**
30 38 * 批量新增
... ...
... ... @@ -32,6 +32,14 @@ public interface ReceiptLedgerInfoService extends BaseMpService<ReceiptLedgerInf
32 32 List<ReceiptLedgerInfo> query(QueryReceiptLedgerInfoVo vo);
33 33
34 34 /**
  35 + * 查询列表
  36 + *
  37 + * @param customerShortName 查询条件
  38 + * @return List<ReceiptLedgerInfo>
  39 + */
  40 + List<ReceiptLedgerInfo> queryByCustomerShortName(String customerShortName);
  41 +
  42 + /**
35 43 * 根据ID查询
36 44 *
37 45 * @param id 主键ID
... ...
... ... @@ -6,10 +6,12 @@ import javax.validation.constraints.NotBlank;
6 6 import java.time.LocalDate;
7 7 import com.lframework.starter.web.core.vo.BaseVo;
8 8 import javax.validation.constraints.NotNull;
  9 +import com.lframework.xingyun.sc.vo.ledger.rel.CreateFundOrderingUnitVo;
9 10 import io.swagger.annotations.ApiModelProperty;
10 11 import com.lframework.starter.web.core.components.validation.TypeMismatch;
11 12 import org.hibernate.validator.constraints.Length;
12 13 import java.io.Serializable;
  14 +import java.util.List;
13 15 import lombok.Data;
14 16
15 17 @Data
... ... @@ -102,10 +104,37 @@ public class CreateFundCoordinationVo implements BaseVo, Serializable {
102 104 private BigDecimal orderQuantity;
103 105
104 106 /**
  107 + * 总计应收款
  108 + */
  109 + @ApiModelProperty("总计应收款")
  110 + @Length(message = "总计应收款最多允许100个字符!")
  111 + private String totalAccountsReceivable;
  112 +
  113 + /**
  114 + * 超期应收款
  115 + */
  116 + @ApiModelProperty("超期应收款")
  117 + @Length(message = "超期应收款最多允许100个字符!")
  118 + private String overdueReceivables;
  119 +
  120 + /**
  121 + * 约定内应收款
  122 + */
  123 + @ApiModelProperty("约定内应收款")
  124 + @Length(message = "约定内应收款最多允许100个字符!")
  125 + private String agreedInternalReceivables;
  126 +
  127 + /**
105 128 * 协调事由需求说明
106 129 */
107 130 @ApiModelProperty("协调事由需求说明")
108 131 @Length(message = "协调事由需求说明最多允许65,535个字符!")
109 132 private String requirementSpecification;
110 133
  134 + /**
  135 + * 协调事由需求说明
  136 + */
  137 + @ApiModelProperty("协调事由需求说明")
  138 + private List<CreateFundOrderingUnitVo> fundOrderingUnitList;
  139 +
111 140 }
... ...
1 1 package com.lframework.xingyun.sc.vo.ledger.fund;
2 2
  3 +import com.lframework.xingyun.sc.vo.ledger.rel.UpdateFundOrderingUnitVo;
3 4 import lombok.Data;
4 5 import com.lframework.starter.web.core.components.validation.IsNumberPrecision;
5 6 import java.math.BigDecimal;
... ... @@ -10,6 +11,7 @@ import com.lframework.starter.web.core.components.validation.TypeMismatch;
10 11 import io.swagger.annotations.ApiModelProperty;
11 12 import org.hibernate.validator.constraints.Length;
12 13 import java.io.Serializable;
  14 +import java.util.List;
13 15
14 16 @Data
15 17 public class UpdateFundCoordinationVo implements BaseVo, Serializable {
... ... @@ -92,10 +94,37 @@ public class UpdateFundCoordinationVo implements BaseVo, Serializable {
92 94 private BigDecimal orderQuantity;
93 95
94 96 /**
  97 + * 总计应收款
  98 + */
  99 + @ApiModelProperty("总计应收款")
  100 + @Length(message = "总计应收款最多允许100个字符!")
  101 + private String totalAccountsReceivable;
  102 +
  103 + /**
  104 + * 超期应收款
  105 + */
  106 + @ApiModelProperty("超期应收款")
  107 + @Length(message = "超期应收款最多允许100个字符!")
  108 + private String overdueReceivables;
  109 +
  110 + /**
  111 + * 约定内应收款
  112 + */
  113 + @ApiModelProperty("约定内应收款")
  114 + @Length(message = "约定内应收款最多允许100个字符!")
  115 + private String agreedInternalReceivables;
  116 +
  117 + /**
95 118 * 协调事由需求说明
96 119 */
97 120 @ApiModelProperty("协调事由需求说明")
98 121 @Length(message = "协调事由需求说明最多允许65,535个字符!")
99 122 private String requirementSpecification;
100 123
  124 + /**
  125 + * 协调事由需求说明
  126 + */
  127 + @ApiModelProperty("协调事由需求说明")
  128 + private List<UpdateFundOrderingUnitVo> fundOrderingUnitList;
  129 +
101 130 }
... ...
... ... @@ -73,7 +73,4 @@ public class QueryReceiptLedgerInfoVo extends PageVo implements BaseVo, Serializ
73 73 @ApiModelProperty("年份")
74 74 private Integer createYear;
75 75
76   - @ApiModelProperty("是否需要查询期末应收大于0")
77   - private boolean includeEndAccountReceivable;
78   -
79 76 }
... ...
... ... @@ -2,9 +2,12 @@ package com.lframework.xingyun.sc.vo.ledger.rel;
2 2
3 3 import javax.validation.constraints.NotBlank;
4 4 import com.lframework.starter.web.core.vo.BaseVo;
  5 +import com.lframework.xingyun.sc.vo.ledger.detail.CreateFundOrderingUnitDetailVo;
5 6 import io.swagger.annotations.ApiModelProperty;
6 7 import org.hibernate.validator.constraints.Length;
7 8 import java.io.Serializable;
  9 +import java.util.List;
  10 +
8 11 import lombok.Data;
9 12
10 13 @Data
... ... @@ -41,4 +44,7 @@ public class CreateFundOrderingUnitVo implements BaseVo, Serializable {
41 44 @Length(message = "备注最多允许65,535个字符!")
42 45 private String remark;
43 46
  47 + @ApiModelProperty("资金协调手续订货单位应收款明细")
  48 + private List<CreateFundOrderingUnitDetailVo> fundOrderingUnitDetailList;
  49 +
44 50 }
... ...
1 1 package com.lframework.xingyun.sc.vo.ledger.rel;
2 2
  3 +import com.lframework.xingyun.sc.vo.ledger.detail.UpdateFundOrderingUnitDetailVo;
3 4 import lombok.Data;
4 5 import javax.validation.constraints.NotBlank;
5 6 import com.lframework.starter.web.core.vo.BaseVo;
6 7 import io.swagger.annotations.ApiModelProperty;
7 8 import org.hibernate.validator.constraints.Length;
8 9 import java.io.Serializable;
  10 +import java.util.List;
9 11
10 12 @Data
11 13 public class UpdateFundOrderingUnitVo implements BaseVo, Serializable {
... ... @@ -40,4 +42,7 @@ public class UpdateFundOrderingUnitVo implements BaseVo, Serializable {
40 42 @Length(message = "备注最多允许65,535个字符!")
41 43 private String remark;
42 44
  45 + @ApiModelProperty("资金协调手续订货单位应收款明细")
  46 + private List<UpdateFundOrderingUnitDetailVo> fundOrderingUnitDetailList;
  47 +
43 48 }
... ...
... ... @@ -18,6 +18,9 @@
18 18 <result column="credit_limit" property="creditLimit"/>
19 19 <result column="order_date" property="orderDate"/>
20 20 <result column="order_quantity" property="orderQuantity"/>
  21 + <result column="total_accounts_receivable" property="totalAccountsReceivable"/>
  22 + <result column="overdue_receivables" property="overdueReceivables"/>
  23 + <result column="agreed_internal_receivables" property="agreedInternalReceivables"/>
21 24 <result column="requirement_specification" property="requirementSpecification"/>
22 25 <result column="office_clerk" property="officeClerk"/>
23 26 <result column="office_clerk_opinion" property="officeClerkOpinion"/>
... ... @@ -62,6 +65,9 @@
62 65 tb.credit_limit,
63 66 tb.order_date,
64 67 tb.order_quantity,
  68 + tb.total_accounts_receivable,
  69 + tb.overdue_receivables,
  70 + tb.agreed_internal_receivables,
65 71 tb.requirement_specification,
66 72 tb.office_clerk,
67 73 tb.office_clerk_opinion,
... ...
... ... @@ -120,8 +120,16 @@
120 120 <if test="vo.deptName != null and vo.deptName != ''">
121 121 AND d.name LIKE CONCAT('%', #{vo.deptName}, '%')
122 122 </if>
123   - <if test="vo.includeEndAccountReceivable == true">
124   - AND tb.end_account_receivable >0
  123 + </where>
  124 + </select>
  125 +
  126 + <select id="queryByCustomerShortName" resultMap="ReceiptLedgerInfo">
  127 + <include refid="ReceiptLedgerInfo_sql"/>
  128 + <where>
  129 + AND tb.del_flag = false
  130 + AND tb.end_account_receivable >0
  131 + <if test="customerShortName != null and customerShortName != ''">
  132 + AND cs.short_name = #{customerShortName}
125 133 </if>
126 134 </where>
127 135 </select>
... ...