Commit 746b9bcfa58693bd8184949a34809d2465b723a5

Authored by 房远帅
1 parent 92a6ffe7

资金协调手续:新增、列表、详情接口

Showing 22 changed files with 455 additions and 69 deletions
... ... @@ -6,8 +6,9 @@ import com.lframework.starter.common.constants.StringPool;
6 6 import java.time.LocalDate;
7 7 import java.util.List;
8 8 import com.lframework.starter.web.core.bo.BaseBo;
9   -import com.lframework.xingyun.sc.bo.ledger.rel.GetFundOrderingUnitBo;
10 9 import com.lframework.xingyun.sc.entity.FundCoordination;
  10 +import com.lframework.xingyun.sc.entity.FundOrderingUnit;
  11 +import com.lframework.xingyun.sc.entity.PendingDeliveryOrder;
11 12 import io.swagger.annotations.ApiModelProperty;
12 13
13 14 import lombok.Data;
... ... @@ -62,12 +63,6 @@ public class GetFundCoordinationBo extends BaseBo<FundCoordination> {
62 63 private String orderingUnitName;
63 64
64 65 /**
65   - * 客户简称ID
66   - */
67   - @ApiModelProperty("客户简称ID")
68   - private String customerShortId;
69   -
70   - /**
71 66 * 客户简称名称
72 67 */
73 68 @ApiModelProperty("客户简称名称")
... ... @@ -141,10 +136,34 @@ public class GetFundCoordinationBo extends BaseBo<FundCoordination> {
141 136 private String requirementSpecification;
142 137
143 138 /**
144   - * 协调事由需求说明
  139 + * 申请发货量(吨)
145 140 */
146   - @ApiModelProperty("协调事由需求说明")
147   - private List<GetFundOrderingUnitBo> fundOrderingUnitList;
  141 + @ApiModelProperty("申请发货量")
  142 + private String requestedShipmentQuantity;
  143 +
  144 + /**
  145 + * 贸易类型:外贸: OUTSIDE 内贸:INSIDE
  146 + */
  147 + @ApiModelProperty("贸易类型")
  148 + private String type;
  149 +
  150 + /**
  151 + * 订货单位关联记录
  152 + */
  153 + @ApiModelProperty("订货单位关联记录")
  154 + private List<FundOrderingUnit> fundOrderingUnitList;
  155 +
  156 + /**
  157 + * 待交付订单量
  158 + */
  159 + @ApiModelProperty("待交付订单量")
  160 + private List<PendingDeliveryOrder> pendingDeliveryOrderList;
  161 +
  162 + /**
  163 + * 是否能审核
  164 + */
  165 + @ApiModelProperty("是否能审核")
  166 + private boolean showExamine;
148 167
149 168 public GetFundCoordinationBo() {
150 169
... ...
... ... @@ -60,12 +60,6 @@ public class QueryFundCoordinationBo extends BaseBo<FundCoordination> {
60 60 private String orderingUnitName;
61 61
62 62 /**
63   - * 客户简称ID
64   - */
65   - @ApiModelProperty("客户简称ID")
66   - private String customerShortId;
67   -
68   - /**
69 63 * 客户类型
70 64 */
71 65 @ApiModelProperty("客户类型")
... ... @@ -132,6 +126,18 @@ public class QueryFundCoordinationBo extends BaseBo<FundCoordination> {
132 126 @ApiModelProperty("协调事由需求说明")
133 127 private String requirementSpecification;
134 128
  129 + /**
  130 + * 申请发货量(吨)
  131 + */
  132 + @ApiModelProperty("申请发货量")
  133 + private String requestedShipmentQuantity;
  134 +
  135 + /**
  136 + * 贸易类型:外贸: OUTSIDE 内贸:INSIDE
  137 + */
  138 + @ApiModelProperty("贸易类型")
  139 + private String type;
  140 +
135 141 public QueryFundCoordinationBo() {
136 142
137 143 }
... ...
... ... @@ -279,6 +279,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> {
279 279 private BigDecimal totalQuantity;
280 280
281 281 /**
  282 + * 已发货数量(吨)
  283 + */
  284 + @TableField(exist = false)
  285 + private String dispatchedQuantity;
  286 +
  287 + /**
282 288 * 包装费
283 289 */
284 290 @ApiModelProperty("包装费")
... ... @@ -308,6 +314,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> {
308 314 @ApiModelProperty("交货日期")
309 315 private LocalDate deliveryDate;
310 316
  317 + /**
  318 + * 是否冻结
  319 + */
  320 + @ApiModelProperty("是否冻结")
  321 + private boolean freeze;
  322 +
311 323
312 324 public GetPurchaseOrderInfoBo() {
313 325
... ...
1 1 package com.lframework.xingyun.sc.controller.ledger;
2 2
  3 +import com.lframework.starter.bpm.dto.FlowTaskDto;
  4 +import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper;
  5 +import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo;
3 6 import com.lframework.starter.web.core.annotations.security.HasPermission;
4 7 import com.lframework.starter.web.core.components.security.SecurityUtil;
5 8 import com.lframework.starter.web.core.controller.DefaultBaseController;
... ... @@ -16,26 +19,27 @@ import com.lframework.starter.web.inner.service.system.SysDataDicItemService;
16 19 import com.lframework.starter.web.inner.service.system.SysDeptService;
17 20 import com.lframework.starter.web.inner.service.system.SysUserService;
18 21 import com.lframework.starter.web.inner.vo.system.user.QuerySysUserVo;
19   -import com.lframework.xingyun.sc.bo.ledger.detail.GetFundOrderingUnitDetailBo;
20 22 import com.lframework.xingyun.sc.bo.ledger.fund.GetFundCoordinationBo;
21 23 import com.lframework.xingyun.sc.bo.ledger.fund.QueryFundCoordinationBo;
22   -import com.lframework.xingyun.sc.bo.ledger.rel.GetFundOrderingUnitBo;
23   -import com.lframework.xingyun.sc.entity.FundCoordination;
24   -import com.lframework.xingyun.sc.entity.ReceiptLedgerInfo;
25   -import com.lframework.xingyun.sc.entity.UnlimitedGuaranteeLetter;
26   -import com.lframework.xingyun.sc.service.ledger.FundCoordinationService;
27   -import com.lframework.xingyun.sc.service.ledger.ReceiptLedgerInfoService;
28   -import com.lframework.xingyun.sc.service.ledger.UnlimitedGuaranteeLetterService;
  24 +import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderInfoBo;
  25 +import com.lframework.xingyun.sc.entity.*;
  26 +import com.lframework.xingyun.sc.service.ledger.*;
  27 +import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService;
  28 +import com.lframework.xingyun.sc.vo.ledger.detail.QueryFundOrderingUnitDetailVo;
29 29 import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo;
30 30 import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo;
31 31 import com.lframework.xingyun.sc.vo.ledger.fund.UpdateFundCoordinationVo;
32 32 import com.lframework.xingyun.sc.vo.ledger.guarantee.QueryUnlimitedGuaranteeLetterVo;
  33 +import com.lframework.xingyun.sc.vo.ledger.pending.QueryPendingDeliveryOrderVo;
  34 +import com.lframework.xingyun.sc.vo.ledger.rel.QueryFundOrderingUnitVo;
  35 +import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderInfoVo;
33 36 import io.swagger.annotations.ApiImplicitParam;
34 37 import com.lframework.starter.web.core.components.resp.InvokeResultBuilder;
35 38 import com.lframework.starter.common.exceptions.impl.DefaultClientException;
36 39 import io.swagger.annotations.ApiOperation;
37 40 import com.lframework.starter.common.utils.CollectionUtil;
38 41 import io.swagger.annotations.Api;
  42 +import org.apache.commons.collections.CollectionUtils;
39 43 import org.springframework.web.bind.annotation.DeleteMapping;
40 44 import org.springframework.beans.factory.annotation.Autowired;
41 45 import org.springframework.validation.annotation.Validated;
... ... @@ -73,6 +77,16 @@ public class FundCoordinationController extends DefaultBaseController {
73 77 private SysDataDicItemService sysDataDicItemService;
74 78 @Resource
75 79 private UnlimitedGuaranteeLetterService unlimitedGuaranteeLetterService;
  80 + @Resource
  81 + private PurchaseOrderInfoService purchaseOrderInfoService;
  82 + @Resource
  83 + private FundOrderingUnitService fundOrderingUnitService;
  84 + @Resource
  85 + private FundOrderingUnitDetailService fundOrderingUnitDetailService;
  86 + @Resource
  87 + private PendingDeliveryOrderService pendingDeliveryOrderService;
  88 + @Resource
  89 + private FlowTaskWrapperMapper flowTaskWrapperMapper;
76 90
77 91 /**
78 92 * 查询列表
... ... @@ -108,7 +122,7 @@ public class FundCoordinationController extends DefaultBaseController {
108 122 throw new DefaultClientException("资金协调手续不存在!");
109 123 }
110 124
111   - GetFundCoordinationBo result = new GetFundCoordinationBo(data);
  125 + GetFundCoordinationBo result = packFundCoordinationData(data);
112 126
113 127 return InvokeResultBuilder.success(result);
114 128 }
... ... @@ -188,7 +202,6 @@ public class FundCoordinationController extends DefaultBaseController {
188 202 // SysDataDicItem type = sysDataDicItemService.findByCode("ENTERPRISE_TYPE", receiptLedgerInfo.getCustomerType());
189 203 // getFundCoordinationBo.setCustomerTypeName(type == null ? "" : type.getName());
190 204 //客户简称
191   - getFundCoordinationBo.setCustomerShortId(receiptLedgerInfo.getCustomerShortId());
192 205 getFundCoordinationBo.setCustomerShortName(receiptLedgerInfo.getCustomerShortName());
193 206 //授权额度
194 207 if (receiptLedgerInfo.getQuota() != null) {
... ... @@ -202,7 +215,7 @@ public class FundCoordinationController extends DefaultBaseController {
202 215 //无限担保书
203 216 StringBuilder unlimitedGuaranteeLetterStr = new StringBuilder();
204 217 //订货单位集合
205   - List<GetFundOrderingUnitBo> fundOrderingUnitList = new ArrayList<>();
  218 + List<FundOrderingUnit> fundOrderingUnitList = new ArrayList<>();
206 219 //总计应收款
207 220 BigDecimal totalAccountsReceivable = BigDecimal.ZERO;
208 221 //超期应收款
... ... @@ -228,17 +241,17 @@ public class FundCoordinationController extends DefaultBaseController {
228 241 } else {
229 242 unlimitedGuaranteeLetterStr.append("有").append(",");
230 243 }
231   - GetFundOrderingUnitBo bo = new GetFundOrderingUnitBo();
232   - bo.setOrderingUnit(customerId);
233   - bo.setOrderingUnitName(receiptList.get(0).getCustomerName());
  244 + FundOrderingUnit fundOrderingUnit = new FundOrderingUnit();
  245 + fundOrderingUnit.setOrderingUnit(customerId);
  246 + fundOrderingUnit.setOrderingUnitName(receiptList.get(0).getCustomerName());
234 247 System.out.println("Customer ID: " + customerId);
235 248 //订货单位应收款明细
236   - List<GetFundOrderingUnitDetailBo> fundOrderingUnitDetailList = new ArrayList<>();
  249 + List<FundOrderingUnitDetail> fundOrderingUnitDetailList = new ArrayList<>();
237 250 for (ReceiptLedgerInfo receipt : receiptList) {
238   - GetFundOrderingUnitDetailBo bo1 = new GetFundOrderingUnitDetailBo();
239   - bo1.setDeliveryDate(receipt.getShipmentDate());
  251 + FundOrderingUnitDetail fundOrderingUnitDetail = new FundOrderingUnitDetail();
  252 + fundOrderingUnitDetail.setDeliveryDate(receipt.getShipmentDate());
240 253 if (receipt.getStartAccountReceivable() != null) {
241   - bo1.setAccountsReceivable(receipt.getStartAccountReceivable().stripTrailingZeros().toPlainString());
  254 + fundOrderingUnitDetail.setAccountsReceivable(receipt.getStartAccountReceivable().stripTrailingZeros().toPlainString());
242 255 }
243 256 SysDataDicItem sysDataDicItem = sysDataDicItemService.findByCode("DEBT_STATUS", receipt.getDebtStatus());
244 257 if (sysDataDicItem != null && sysDataDicItem.getCode().equals("FIRST_COORDINATE")) {
... ... @@ -283,23 +296,23 @@ public class FundCoordinationController extends DefaultBaseController {
283 296 || sysDataDicItem.getCode().equals("SECOND_COORDINATE") || sysDataDicItem.getCode().equals("CLEAR_DEBTS")))) {
284 297 continue;
285 298 }
286   - bo1.setStatus(sysDataDicItem.getName());
287   - bo1.setDueDate(receipt.getProcessedDate());
288   - if (bo1.getDueDate() != null) {
289   - long daysBetween = ChronoUnit.DAYS.between(bo1.getDueDate(), LocalDate.now());
290   - bo1.setTimeout(String.valueOf(daysBetween));
  299 + fundOrderingUnitDetail.setStatus(sysDataDicItem.getName());
  300 + fundOrderingUnitDetail.setDueDate(receipt.getProcessedDate());
  301 + if (fundOrderingUnitDetail.getDueDate() != null) {
  302 + long daysBetween = ChronoUnit.DAYS.between(fundOrderingUnitDetail.getDueDate(), LocalDate.now());
  303 + fundOrderingUnitDetail.setTimeout(String.valueOf(daysBetween));
291 304 }
292 305 //协调办理日期
293 306 if (receipt.getCoordinateDate() != null && !receipt.getCoordinateDate().isBefore(LocalDate.now())) {
294   - bo1.setCoordinateHandleDate(receipt.getCoordinateDate());
  307 + fundOrderingUnitDetail.setCoordinateHandleDate(receipt.getCoordinateDate());
295 308 }
296 309 if (receipt.getCoordinateDate() != null && !receipt.getCoordinateDate().isBefore(LocalDate.now())
297   - && bo1.getDueDate() != null) {
  310 + && fundOrderingUnitDetail.getDueDate() != null) {
298 311 //实际超时(协调办理日期-应办理日期)
299   - long daysBetween = ChronoUnit.DAYS.between(bo1.getDueDate(), receipt.getCoordinateDate());
300   - bo1.setActualTimeout(String.valueOf(daysBetween));
  312 + long daysBetween = ChronoUnit.DAYS.between(fundOrderingUnitDetail.getDueDate(), receipt.getCoordinateDate());
  313 + fundOrderingUnitDetail.setActualTimeout(String.valueOf(daysBetween));
301 314 }
302   - fundOrderingUnitDetailList.add(bo1);
  315 + fundOrderingUnitDetailList.add(fundOrderingUnitDetail);
303 316 }
304 317 //排序
305 318 fundOrderingUnitDetailList.sort((a, b) -> {
... ... @@ -307,8 +320,8 @@ public class FundCoordinationController extends DefaultBaseController {
307 320 Long bVal = b.getTimeout() == null ? null : Long.valueOf(b.getTimeout());
308 321 return Comparator.<Long>reverseOrder().compare(aVal, bVal);
309 322 });
310   - bo.setFundOrderingUnitDetailList(fundOrderingUnitDetailList);
311   - fundOrderingUnitList.add(bo);
  323 + fundOrderingUnit.setFundOrderingUnitDetailList(fundOrderingUnitDetailList);
  324 + fundOrderingUnitList.add(fundOrderingUnit);
312 325 }
313 326 //订货单位名称
314 327 if (customerNameStr.length() > 0) {
... ... @@ -364,4 +377,65 @@ public class FundCoordinationController extends DefaultBaseController {
364 377
365 378 return InvokeResultBuilder.success(data);
366 379 }
  380 +
  381 +
  382 + /**
  383 + * 查询冻结的订货单列表
  384 + */
  385 + @ApiOperation("查询冻结的订货单列表")
  386 + @GetMapping("/queryFreeze")
  387 + public InvokeResult<PageResult<GetPurchaseOrderInfoBo>> queryFreeze(@Valid QueryPurchaseOrderInfoVo vo) {
  388 +
  389 + PageResult<PurchaseOrderInfo> pageResult = purchaseOrderInfoService.queryFreeze(getPageIndex(vo), getPageSize(vo), vo);
  390 +
  391 + List<PurchaseOrderInfo> datas = pageResult.getDatas();
  392 + List<GetPurchaseOrderInfoBo> results = null;
  393 +
  394 + if (!CollectionUtil.isEmpty(datas)) {
  395 + results = datas.stream().map(GetPurchaseOrderInfoBo::new).collect(Collectors.toList());
  396 + }
  397 +
  398 + return InvokeResultBuilder.success(PageResultUtil.rebuild(pageResult, results));
  399 + }
  400 +
  401 + /**
  402 + * 封装客户资信数据
  403 + *
  404 + * @param fundCoordination 数据实体
  405 + * @return GetFundCoordinationBo
  406 + */
  407 + private GetFundCoordinationBo packFundCoordinationData(FundCoordination fundCoordination) {
  408 + // 处理关联数据
  409 + GetFundCoordinationBo data = new GetFundCoordinationBo(fundCoordination);
  410 + //获取订货单位关联记录
  411 + QueryFundOrderingUnitVo vo = new QueryFundOrderingUnitVo();
  412 + vo.setFundId(fundCoordination.getId());
  413 + List<FundOrderingUnit> fundOrderingUnitList = fundOrderingUnitService.query(vo);
  414 + if (CollectionUtils.isNotEmpty(fundOrderingUnitList)) {
  415 + for (FundOrderingUnit fundOrderingUnit : fundOrderingUnitList) {
  416 + //资金协调手续订货单位应收款明细
  417 + QueryFundOrderingUnitDetailVo vo1 = new QueryFundOrderingUnitDetailVo();
  418 + vo1.setFundOrderingUnitId(fundOrderingUnit.getId());
  419 + List<FundOrderingUnitDetail> fundOrderingUnitDetailList = fundOrderingUnitDetailService.query(vo1);
  420 + if (CollectionUtils.isNotEmpty(fundOrderingUnitDetailList)) {
  421 + fundOrderingUnit.setFundOrderingUnitDetailList(fundOrderingUnitDetailList);
  422 + }
  423 + }
  424 + data.setFundOrderingUnitList(fundOrderingUnitList);
  425 + }
  426 + //待交付订单量
  427 + QueryPendingDeliveryOrderVo vo2 = new QueryPendingDeliveryOrderVo();
  428 + vo2.setFundId(fundCoordination.getId());
  429 + List<PendingDeliveryOrder> pendingDeliveryOrderList = pendingDeliveryOrderService.query(vo2);
  430 + if (CollectionUtils.isNotEmpty(pendingDeliveryOrderList)) {
  431 + data.setPendingDeliveryOrderList(pendingDeliveryOrderList);
  432 + }
  433 + // 获取当前人员的待办任务数据
  434 + List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId());
  435 + if (CollectionUtils.isNotEmpty(flowTaskList)) {
  436 + List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList());
  437 + data.setShowExamine(businessIds.contains(fundCoordination.getId()));
  438 + }
  439 + return data;
  440 + }
367 441 }
... ...
... ... @@ -61,14 +61,8 @@ public class FundCoordination extends BaseEntity implements BaseDto {
61 61 private String orderingUnitName;
62 62
63 63 /**
64   - * 客户简称ID
65   - */
66   - private String customerShortId;
67   -
68   - /**
69 64 * 客户简称
70 65 */
71   - @TableField(exist = false)
72 66 private String customerShortName;
73 67
74 68 /**
... ... @@ -122,6 +116,16 @@ public class FundCoordination extends BaseEntity implements BaseDto {
122 116 private String requirementSpecification;
123 117
124 118 /**
  119 + * 申请发货量(吨)
  120 + */
  121 + private String requestedShipmentQuantity;
  122 +
  123 + /**
  124 + * 贸易类型:外贸: OUTSIDE 内贸:INSIDE
  125 + */
  126 + private String type;
  127 +
  128 + /**
125 129 * 办事处内勤ID
126 130 */
127 131 private String officeClerk;
... ...
... ... @@ -3,6 +3,7 @@ package com.lframework.xingyun.sc.entity;
3 3 import com.baomidou.mybatisplus.annotation.TableName;
4 4 import com.lframework.starter.web.core.dto.BaseDto;
5 5 import java.time.LocalDateTime;
  6 +import java.util.List;
6 7 import com.baomidou.mybatisplus.annotation.FieldFill;
7 8 import com.lframework.starter.web.core.entity.BaseEntity;
8 9 import com.baomidou.mybatisplus.annotation.TableField;
... ... @@ -48,6 +49,12 @@ public class FundOrderingUnit extends BaseEntity implements BaseDto {
48 49 private String remark;
49 50
50 51 /**
  52 + * 资金协调手续订货单位应收款明细
  53 + */
  54 + @TableField(exist = false)
  55 + private List<FundOrderingUnitDetail> fundOrderingUnitDetailList;
  56 +
  57 + /**
51 58 * 创建人ID
52 59 */
53 60 @TableField(fill = FieldFill.INSERT)
... ...
... ... @@ -254,6 +254,12 @@ public class PurchaseOrderInfo extends BaseEntity implements BaseDto {
254 254 private BigDecimal totalQuantity;
255 255
256 256 /**
  257 + * 已发货数量(吨)
  258 + */
  259 + @TableField(exist = false)
  260 + private String dispatchedQuantity;
  261 +
  262 + /**
257 263 * 包装费
258 264 */
259 265 private String packagingFee;
... ... @@ -264,6 +270,11 @@ public class PurchaseOrderInfo extends BaseEntity implements BaseDto {
264 270 private String contractCreateById;
265 271
266 272 /**
  273 + * 是否冻结
  274 + */
  275 + private boolean freeze;
  276 +
  277 + /**
267 278 * 下单人(非持久化字段)
268 279 */
269 280 @TableField(exist = false)
... ...
... ... @@ -3,6 +3,7 @@ package com.lframework.xingyun.sc.impl.ledger;
3 3 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
4 4 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
5 5 import com.github.pagehelper.PageInfo;
  6 +import com.lframework.starter.common.utils.CollectionUtil;
6 7 import com.lframework.starter.web.core.impl.BaseMpServiceImpl;
7 8 import com.lframework.starter.web.core.utils.PageResultUtil;
8 9 import com.lframework.starter.web.core.utils.OpLogUtil;
... ... @@ -19,17 +20,26 @@ import com.lframework.starter.common.utils.Assert;
19 20 import com.lframework.xingyun.sc.entity.FundCoordination;
20 21 import com.lframework.xingyun.sc.mappers.FundCoordinationMapper;
21 22 import com.lframework.xingyun.sc.service.ledger.FundCoordinationService;
  23 +import com.lframework.xingyun.sc.service.ledger.FundOrderingUnitService;
  24 +import com.lframework.xingyun.sc.service.ledger.PendingDeliveryOrderService;
22 25 import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo;
23 26 import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo;
24 27 import com.lframework.xingyun.sc.vo.ledger.fund.UpdateFundCoordinationVo;
  28 +import com.lframework.xingyun.sc.vo.ledger.pending.CreatePendingDeliveryOrderVo;
  29 +import com.lframework.xingyun.sc.vo.ledger.rel.CreateFundOrderingUnitVo;
25 30 import org.springframework.transaction.annotation.Transactional;
26 31 import org.springframework.stereotype.Service;
27   -
  32 +import javax.annotation.Resource;
28 33 import java.util.List;
29 34
30 35 @Service
31 36 public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinationMapper, FundCoordination> implements FundCoordinationService {
32 37
  38 + @Resource
  39 + private FundOrderingUnitService fundOrderingUnitService;
  40 + @Resource
  41 + private PendingDeliveryOrderService pendingDeliveryOrderService;
  42 +
33 43 @Override
34 44 public PageResult<FundCoordination> query(Integer pageIndex, Integer pageSize, QueryFundCoordinationVo vo) {
35 45
... ... @@ -72,7 +82,7 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat
72 82 if (!StringUtil.isBlank(vo.getOrderingUnitName())) {
73 83 data.setOrderingUnitName(vo.getOrderingUnitName());
74 84 }
75   - data.setCustomerShortId(vo.getCustomerShortId());
  85 + data.setCustomerShortName(vo.getCustomerShortName());
76 86 if (!StringUtil.isBlank(vo.getCustomerType())) {
77 87 data.setCustomerType(vo.getCustomerType());
78 88 }
... ... @@ -94,15 +104,40 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat
94 104 if (!StringUtil.isBlank(vo.getRequirementSpecification())) {
95 105 data.setRequirementSpecification(vo.getRequirementSpecification());
96 106 }
  107 + if (!StringUtil.isBlank(vo.getRequestedShipmentQuantity())) {
  108 + data.setRequestedShipmentQuantity(vo.getRequestedShipmentQuantity());
  109 + }
  110 + if (!StringUtil.isBlank(vo.getType())) {
  111 + data.setType(vo.getType());
  112 + }
97 113
98 114 getBaseMapper().insert(data);
99 115
  116 + //新增协调事由需求说明
  117 + List<CreateFundOrderingUnitVo> fundOrderingUnitList = vo.getFundOrderingUnitList();
  118 + if (CollectionUtil.isNotEmpty(fundOrderingUnitList)) {
  119 + for (CreateFundOrderingUnitVo createFundOrderingUnitVo : fundOrderingUnitList) {
  120 + createFundOrderingUnitVo.setFundId(data.getId());
  121 + fundOrderingUnitService.create(createFundOrderingUnitVo);
  122 + }
  123 + }
  124 + //新增待交付订单量
  125 + List<CreatePendingDeliveryOrderVo> pendingDeliveryOrderList = vo.getPendingDeliveryOrderList();
  126 + if (CollectionUtil.isNotEmpty(pendingDeliveryOrderList)) {
  127 + pendingDeliveryOrderList.forEach(pendingDeliveryOrder ->
  128 + pendingDeliveryOrder.setFundId(data.getId())
  129 + );
  130 + pendingDeliveryOrderService.batchAdd(pendingDeliveryOrderList);
  131 + }
100 132 OpLogUtil.setVariable("id", data.getId());
101 133 OpLogUtil.setExtra(vo);
102 134
103 135 return data.getId();
104 136 }
105 137
  138 + /**
  139 + * 没有修改:方法不全后续使用要完善
  140 + */
106 141 @OpLog(type = OtherOpLogType.class, name = "修改资金协调手续,ID:{}", params = {"#id"})
107 142 @Transactional(rollbackFor = Exception.class)
108 143 @Override
... ... @@ -117,7 +152,7 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat
117 152 .set(FundCoordination::getFundResponsiblePerson, StringUtil.isBlank(vo.getFundResponsiblePerson()) ? null : vo.getFundResponsiblePerson())
118 153 .set(FundCoordination::getDeptAndRole, StringUtil.isBlank(vo.getDeptAndRole()) ? null : vo.getDeptAndRole())
119 154 .set(FundCoordination::getOrderingUnitName, StringUtil.isBlank(vo.getOrderingUnitName()) ? null : vo.getOrderingUnitName())
120   - .set(FundCoordination::getCustomerShortId, vo.getCustomerShortId())
  155 + .set(FundCoordination::getCustomerShortName, vo.getCustomerShortName())
121 156 .set(FundCoordination::getCustomerType, StringUtil.isBlank(vo.getCustomerType()) ? null : vo.getCustomerType())
122 157 .set(FundCoordination::getUnlimitedGuaranteeLetter, StringUtil.isBlank(vo.getUnlimitedGuaranteeLetter()) ? null : vo.getUnlimitedGuaranteeLetter())
123 158 .set(FundCoordination::getSettlementPeriod, StringUtil.isBlank(vo.getSettlementPeriod()) ? null : vo.getSettlementPeriod())
... ... @@ -125,6 +160,8 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat
125 160 .set(FundCoordination::getOrderDate, vo.getOrderDate() == null ? null : vo.getOrderDate())
126 161 .set(FundCoordination::getOrderQuantity, vo.getOrderQuantity() == null ? null : vo.getOrderQuantity())
127 162 .set(FundCoordination::getRequirementSpecification, StringUtil.isBlank(vo.getRequirementSpecification()) ? null : vo.getRequirementSpecification())
  163 + .set(FundCoordination::getRequestedShipmentQuantity, StringUtil.isBlank(vo.getRequestedShipmentQuantity()) ? null : vo.getRequestedShipmentQuantity())
  164 + .set(FundCoordination::getType, StringUtil.isBlank(vo.getType()) ? null : vo.getType())
128 165 .eq(FundCoordination::getId, vo.getId());
129 166
130 167 getBaseMapper().update(updateWrapper);
... ...
... ... @@ -3,6 +3,7 @@ package com.lframework.xingyun.sc.impl.ledger;
3 3 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
4 4 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
5 5 import com.github.pagehelper.PageInfo;
  6 +import com.lframework.starter.web.core.components.security.SecurityUtil;
6 7 import com.lframework.starter.web.core.impl.BaseMpServiceImpl;
7 8 import com.lframework.starter.web.core.utils.PageResultUtil;
8 9 import com.lframework.starter.web.core.components.resp.PageResult;
... ... @@ -22,9 +23,11 @@ import com.lframework.xingyun.sc.service.ledger.FundOrderingUnitDetailService;
22 23 import com.lframework.xingyun.sc.vo.ledger.detail.CreateFundOrderingUnitDetailVo;
23 24 import com.lframework.xingyun.sc.vo.ledger.detail.QueryFundOrderingUnitDetailVo;
24 25 import com.lframework.xingyun.sc.vo.ledger.detail.UpdateFundOrderingUnitDetailVo;
  26 +import org.apache.commons.collections4.CollectionUtils;
25 27 import org.springframework.transaction.annotation.Transactional;
26 28 import org.springframework.stereotype.Service;
27   -
  29 +import java.time.LocalDateTime;
  30 +import java.util.ArrayList;
28 31 import java.util.List;
29 32
30 33 @Service
... ... @@ -124,6 +127,34 @@ public class FundOrderingUnitDetailServiceImpl extends BaseMpServiceImpl<FundOrd
124 127 }
125 128
126 129 @Override
  130 + public void batchAdd(List<CreateFundOrderingUnitDetailVo> createFundOrderingUnitDetailVoList) {
  131 + if (CollectionUtils.isEmpty(createFundOrderingUnitDetailVoList)) {
  132 + return;
  133 + }
  134 + String userId = SecurityUtil.getCurrentUser().getId();
  135 + List<FundOrderingUnitDetail> fundOrderingUnitDetailList = new ArrayList<>();
  136 + for (CreateFundOrderingUnitDetailVo vo : createFundOrderingUnitDetailVoList) {
  137 + FundOrderingUnitDetail fundOrderingUnitDetail = new FundOrderingUnitDetail();
  138 + fundOrderingUnitDetail.setFundOrderingUnitId(vo.getFundOrderingUnitId());
  139 + fundOrderingUnitDetail.setDeliveryDate(vo.getDeliveryDate());
  140 + fundOrderingUnitDetail.setAccountsReceivable(vo.getAccountsReceivable());
  141 + fundOrderingUnitDetail.setStatus(vo.getStatus());
  142 + fundOrderingUnitDetail.setDueDate(vo.getDueDate());
  143 + fundOrderingUnitDetail.setTimeout(vo.getTimeout());
  144 + fundOrderingUnitDetail.setCoordinateHandleDate(vo.getCoordinateHandleDate());
  145 + fundOrderingUnitDetail.setActualTimeout(vo.getActualTimeout());
  146 + fundOrderingUnitDetail.setRemark(vo.getRemark());
  147 + fundOrderingUnitDetail.setId(IdUtil.getId());
  148 + fundOrderingUnitDetail.setCreateById(userId);
  149 + fundOrderingUnitDetail.setUpdateById(userId);
  150 + fundOrderingUnitDetail.setCreateTime(LocalDateTime.now());
  151 + fundOrderingUnitDetail.setUpdateTime(LocalDateTime.now());
  152 + fundOrderingUnitDetailList.add(fundOrderingUnitDetail);
  153 + }
  154 + getBaseMapper().batchAdd(fundOrderingUnitDetailList);
  155 + }
  156 +
  157 + @Override
127 158 public void cleanCacheByKey(Serializable key) {
128 159
129 160 }
... ...
... ... @@ -17,18 +17,25 @@ import com.lframework.starter.common.utils.Assert;
17 17 import com.lframework.starter.web.inner.components.oplog.OtherOpLogType;
18 18 import com.lframework.xingyun.sc.entity.FundOrderingUnit;
19 19 import com.lframework.xingyun.sc.mappers.FundOrderingUnitMapper;
  20 +import com.lframework.xingyun.sc.service.ledger.FundOrderingUnitDetailService;
20 21 import com.lframework.xingyun.sc.service.ledger.FundOrderingUnitService;
  22 +import com.lframework.xingyun.sc.vo.ledger.detail.CreateFundOrderingUnitDetailVo;
21 23 import com.lframework.xingyun.sc.vo.ledger.rel.CreateFundOrderingUnitVo;
22 24 import com.lframework.xingyun.sc.vo.ledger.rel.QueryFundOrderingUnitVo;
23 25 import com.lframework.xingyun.sc.vo.ledger.rel.UpdateFundOrderingUnitVo;
  26 +import org.apache.commons.collections.CollectionUtils;
24 27 import org.springframework.transaction.annotation.Transactional;
25 28 import org.springframework.stereotype.Service;
  29 +import javax.annotation.Resource;
26 30 import java.io.Serializable;
27 31 import java.util.List;
28 32
29 33 @Service
30 34 public class FundOrderingUnitServiceImpl extends BaseMpServiceImpl<FundOrderingUnitMapper, FundOrderingUnit> implements FundOrderingUnitService {
31 35
  36 + @Resource
  37 + private FundOrderingUnitDetailService fundOrderingUnitDetailService;
  38 +
32 39 @Override
33 40 public PageResult<FundOrderingUnit> query(Integer pageIndex, Integer pageSize, QueryFundOrderingUnitVo vo) {
34 41
... ... @@ -72,6 +79,18 @@ public class FundOrderingUnitServiceImpl extends BaseMpServiceImpl<FundOrderingU
72 79 }
73 80
74 81 getBaseMapper().insert(data);
  82 + //新增 资金协调手续订货单位应收款明细
  83 + List<CreateFundOrderingUnitDetailVo> fundOrderingUnitDetailList = vo.getFundOrderingUnitDetailList();
  84 + if (CollectionUtils.isNotEmpty(fundOrderingUnitDetailList)) {
  85 + if (fundOrderingUnitDetailList.stream()
  86 + .anyMatch(detail -> detail.getCoordinateHandleDate() == null)) {
  87 + throw new DefaultClientException("协调办理日期不能为空!");
  88 + }
  89 + fundOrderingUnitDetailList.forEach(detail ->
  90 + detail.setFundOrderingUnitId(data.getId())
  91 + );
  92 + fundOrderingUnitDetailService.batchAdd(fundOrderingUnitDetailList);
  93 + }
75 94
76 95 OpLogUtil.setVariable("id", data.getId());
77 96 OpLogUtil.setExtra(vo);
... ...
... ... @@ -45,6 +45,7 @@ import org.springframework.stereotype.Service;
45 45
46 46 import javax.annotation.Resource;
47 47 import java.math.BigDecimal;
  48 +import java.math.RoundingMode;
48 49 import java.util.*;
49 50 import java.util.function.Function;
50 51 import java.util.stream.Collectors;
... ... @@ -573,6 +574,50 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde
573 574 }
574 575
575 576 @Override
  577 + public PageResult<PurchaseOrderInfo> queryFreeze(Integer pageIndex, Integer pageSize, QueryPurchaseOrderInfoVo vo) {
  578 +
  579 + Assert.greaterThanZero(pageIndex);
  580 + Assert.greaterThanZero(pageSize);
  581 + vo.setFreeze(true);
  582 + PageHelperUtil.startPage(pageIndex, pageSize);
  583 + List<PurchaseOrderInfo> datas = getBaseMapper().query(vo);
  584 + if (CollectionUtils.isNotEmpty(datas)) {
  585 + List<String> ids = datas.stream()
  586 + .map(PurchaseOrderInfo::getId)
  587 + .collect(Collectors.toList());
  588 + //数据封装
  589 + List<PurchaseOrderLine> purchaseOrderLineList = purchaseOrderLineService.listDispatchedByOrderIds(ids);
  590 + Map<String, BigDecimal> result = purchaseOrderLineList.stream()
  591 + .filter(Objects::nonNull)
  592 + .filter(line -> line.getQuantity() != null && line.getPurchaseOrderId() != null)
  593 + .collect(Collectors.groupingBy(
  594 + PurchaseOrderLine::getPurchaseOrderId,
  595 + Collectors.reducing(BigDecimal.ZERO, PurchaseOrderLine::getQuantity, BigDecimal::add)
  596 + ));
  597 +
  598 + for (PurchaseOrderInfo info : datas) {
  599 + BigDecimal totalQuantity = info.getTotalQuantity();
  600 + if (totalQuantity == null) {
  601 + info.setTotalQuantity(BigDecimal.ZERO);
  602 + } else {
  603 + BigDecimal divided = totalQuantity.divide(BigDecimal.valueOf(1000), 10, RoundingMode.HALF_UP);
  604 + String formatted = divided.stripTrailingZeros().toPlainString();
  605 + info.setTotalQuantity(new BigDecimal(formatted));
  606 + }
  607 + BigDecimal quantity = result.get(info.getId());
  608 + if (quantity == null) {
  609 + info.setDispatchedQuantity("0");
  610 + continue;
  611 + }
  612 + BigDecimal divided = quantity.divide(BigDecimal.valueOf(1000), 10, RoundingMode.HALF_UP);
  613 + String formatted = divided.stripTrailingZeros().toPlainString();
  614 + info.setDispatchedQuantity(formatted);
  615 + }
  616 + }
  617 + return PageResultUtil.convert(new PageInfo<>(datas));
  618 + }
  619 +
  620 + @Override
576 621 public void cleanCacheByKey(Serializable key) {
577 622
578 623 }
... ...
... ... @@ -351,6 +351,24 @@ public class PurchaseOrderLineServiceImpl extends BaseMpServiceImpl<PurchaseOrde
351 351 }
352 352
353 353 @Override
  354 + public List<PurchaseOrderLine> listDispatchedByOrderIds(List<String> orderIds) {
  355 + if (CollectionUtils.isEmpty(orderIds)) {
  356 + return new ArrayList<>();
  357 + }
  358 + // 已发货(填写实发数并已到发货日期)
  359 + LambdaQueryWrapper<PurchaseOrderLine> queryWrapper = Wrappers.lambdaQuery(PurchaseOrderLine.class);
  360 + queryWrapper.eq(PurchaseOrderLine::getDelFlag, Boolean.FALSE)
  361 + .in(PurchaseOrderLine::getPurchaseOrderId, orderIds);
  362 + queryWrapper.eq(PurchaseOrderLine::getShipment, Boolean.TRUE);
  363 + queryWrapper.le(PurchaseOrderLine::getDeliveryDate, LocalDate.now());
  364 +
  365 + // 只查询 quantity > 0 的记录
  366 + queryWrapper.gt(PurchaseOrderLine::getQuantity, BigDecimal.ZERO);
  367 +
  368 + return getBaseMapper().selectList(queryWrapper);
  369 + }
  370 +
  371 + @Override
354 372 public void cleanCacheByKey(Serializable key) {
355 373
356 374 }
... ...
... ... @@ -21,4 +21,6 @@ public interface FundOrderingUnitDetailMapper extends BaseMapper<FundOrderingUni
21 21 * @return
22 22 */
23 23 List<FundOrderingUnitDetail> query(@Param("vo") QueryFundOrderingUnitDetailVo vo);
  24 +
  25 + void batchAdd(@Param("list") List<FundOrderingUnitDetail> list);
24 26 }
... ...
... ... @@ -52,4 +52,9 @@ public interface FundOrderingUnitDetailService extends BaseMpService<FundOrderin
52 52 * @return
53 53 */
54 54 void deleteById(String id);
  55 +
  56 + /**
  57 + * 批量新增
  58 + */
  59 + void batchAdd(List<CreateFundOrderingUnitDetailVo> createFundOrderingUnitDetailVoList);
55 60 }
... ...
... ... @@ -132,4 +132,11 @@ public interface PurchaseOrderInfoService extends BaseMpService<PurchaseOrderInf
132 132 * @return List<PurchaseOrderInfo>
133 133 */
134 134 List<PurchaseOrderInfo> listByCustomerIds(List<String> customerIds);
  135 +
  136 + /**
  137 + * 查询需要解冻列表
  138 + *
  139 + * @return
  140 + */
  141 + PageResult<PurchaseOrderInfo> queryFreeze(Integer pageIndex, Integer pageSize, QueryPurchaseOrderInfoVo vo);
135 142 }
... ...
... ... @@ -138,4 +138,12 @@ public interface PurchaseOrderLineService extends BaseMpService<PurchaseOrderLin
138 138 * @param ids 主键ID集合
139 139 */
140 140 void dispatched(List<String> ids);
  141 +
  142 + /**
  143 + * 获取已发货的订货单物料
  144 + *
  145 + * @param orderIds 订货单ids
  146 + * @return 已发货的订货单物料
  147 + */
  148 + List<PurchaseOrderLine> listDispatchedByOrderIds(List<String> orderIds);
141 149 }
... ...
... ... @@ -6,6 +6,9 @@ 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 +
  10 +import com.lframework.xingyun.sc.bo.ledger.pending.GetPendingDeliveryOrderBo;
  11 +import com.lframework.xingyun.sc.vo.ledger.pending.CreatePendingDeliveryOrderVo;
9 12 import com.lframework.xingyun.sc.vo.ledger.rel.CreateFundOrderingUnitVo;
10 13 import io.swagger.annotations.ApiModelProperty;
11 14 import com.lframework.starter.web.core.components.validation.TypeMismatch;
... ... @@ -55,10 +58,10 @@ public class CreateFundCoordinationVo implements BaseVo, Serializable {
55 58 /**
56 59 * 客户简称ID
57 60 */
58   - @ApiModelProperty(value = "客户简称ID", required = true)
59   - @NotBlank(message = "请输入客户简称ID!")
60   - @Length(message = "客户简称ID最多允许32个字符!")
61   - private String customerShortId;
  61 + @ApiModelProperty(value = "客户简称", required = true)
  62 + @NotBlank(message = "请输入客户简称!")
  63 + @Length(message = "客户简称最多允许100个字符!")
  64 + private String customerShortName;
62 65
63 66 /**
64 67 * 客户类型
... ... @@ -132,9 +135,27 @@ public class CreateFundCoordinationVo implements BaseVo, Serializable {
132 135 private String requirementSpecification;
133 136
134 137 /**
  138 + * 申请发货量(吨)
  139 + */
  140 + @ApiModelProperty("申请发货量")
  141 + private String requestedShipmentQuantity;
  142 +
  143 + /**
  144 + * 贸易类型:外贸: OUTSIDE 内贸:INSIDE
  145 + */
  146 + @ApiModelProperty("贸易类型")
  147 + private String type;
  148 +
  149 + /**
135 150 * 协调事由需求说明
136 151 */
137 152 @ApiModelProperty("协调事由需求说明")
138 153 private List<CreateFundOrderingUnitVo> fundOrderingUnitList;
139 154
  155 + /**
  156 + * 待交付订单量
  157 + */
  158 + @ApiModelProperty("待交付订单量")
  159 + private List<CreatePendingDeliveryOrderVo> pendingDeliveryOrderList;
  160 +
140 161 }
... ...
... ... @@ -45,10 +45,10 @@ public class UpdateFundCoordinationVo implements BaseVo, Serializable {
45 45 /**
46 46 * 客户简称ID
47 47 */
48   - @ApiModelProperty(value = "客户简称ID", required = true)
49   - @NotBlank(message = "请输入客户简称ID!")
50   - @Length(message = "客户简称ID最多允许32个字符!")
51   - private String customerShortId;
  48 + @ApiModelProperty(value = "客户简称", required = true)
  49 + @NotBlank(message = "请输入客户简称!")
  50 + @Length(message = "客户简称最多允许100个字符!")
  51 + private String customerShortName;
52 52
53 53 /**
54 54 * 客户类型
... ... @@ -122,6 +122,18 @@ public class UpdateFundCoordinationVo implements BaseVo, Serializable {
122 122 private String requirementSpecification;
123 123
124 124 /**
  125 + * 申请发货量(吨)
  126 + */
  127 + @ApiModelProperty("申请发货量")
  128 + private String requestedShipmentQuantity;
  129 +
  130 + /**
  131 + * 贸易类型:外贸: OUTSIDE 内贸:INSIDE
  132 + */
  133 + @ApiModelProperty("贸易类型")
  134 + private String type;
  135 +
  136 + /**
125 137 * 协调事由需求说明
126 138 */
127 139 @ApiModelProperty("协调事由需求说明")
... ...
... ... @@ -110,4 +110,10 @@ public class QueryPurchaseOrderInfoVo extends PageVo implements BaseVo, Serializ
110 110
111 111 @ApiModelProperty("合同")
112 112 private String contractId;
  113 +
  114 + /**
  115 + * 是否冻结
  116 + */
  117 + @ApiModelProperty("是否冻结")
  118 + private boolean freeze;
113 119 }
... ...
... ... @@ -10,7 +10,6 @@
10 10 <result column="dept_and_role" property="deptAndRole"/>
11 11 <result column="application_date" property="applicationDate"/>
12 12 <result column="ordering_unit_name" property="orderingUnitName"/>
13   - <result column="customer_short_id" property="customerShortId"/>
14 13 <result column="customer_short_name" property="customerShortName"/>
15 14 <result column="customer_type" property="customerType"/>
16 15 <result column="unlimited_guarantee_letter" property="unlimitedGuaranteeLetter"/>
... ... @@ -57,8 +56,7 @@
57 56 tb.dept_and_role,
58 57 tb.application_date,
59 58 tb.ordering_unit_name,
60   - tb.customer_short_id,
61   - cs.short_name AS customer_short_name,
  59 + tb.customer_short_name,
62 60 tb.customer_type,
63 61 tb.unlimited_guarantee_letter,
64 62 tb.settlement_period,
... ... @@ -94,7 +92,6 @@
94 92 tb.create_time,
95 93 tb.update_time
96 94 FROM fund_coordination AS tb
97   - left join base_data_customer_short cs on cs.id = tb.customer_short_id
98 95 left join sys_user u on u.id = tb.applicant
99 96 </sql>
100 97
... ... @@ -113,7 +110,7 @@
113 110 AND tb.ordering_unit_name LIKE CONCAT('%', #{vo.orderingUnitName}, '%')
114 111 </if>
115 112 <if test="vo.shortName != null and vo.shortName != ''">
116   - AND cs.short_name LIKE CONCAT('%', #{vo.shortName}, '%')
  113 + AND tb.customer_short_name LIKE CONCAT('%', #{vo.shortName}, '%')
117 114 </if>
118 115 </where>
119 116 ORDER BY tb.create_time DESC
... ...
... ... @@ -51,4 +51,45 @@
51 51 </where>
52 52 ORDER BY tb.actual_timeout DESC
53 53 </select>
  54 +
  55 + <insert id="batchAdd">
  56 + INSERT INTO fund_ordering_unit_detail (
  57 + id,
  58 + fund_ordering_unit_id,
  59 + delivery_date,
  60 + accounts_receivable,
  61 + status,
  62 + due_date,
  63 + timeout,
  64 + coordinate_handle_date,
  65 + actual_timeout,
  66 + remark,
  67 + create_by_id,
  68 + create_by,
  69 + update_by_id,
  70 + update_by,
  71 + create_time,
  72 + update_time
  73 + ) VALUES
  74 + <foreach collection="list" item="item" separator=",">
  75 + (
  76 + #{item.id},
  77 + #{item.fundOrderingUnitId},
  78 + #{item.deliveryDate},
  79 + #{item.accountsReceivable},
  80 + #{item.status},
  81 + #{item.dueDate},
  82 + #{item.timeout},
  83 + #{item.coordinateHandleDate},
  84 + #{item.actualTimeout},
  85 + #{item.remark},
  86 + #{item.createById},
  87 + #{item.createBy},
  88 + #{item.updateById},
  89 + #{item.updateBy},
  90 + #{item.createTime},
  91 + #{item.updateTime}
  92 + )
  93 + </foreach>
  94 + </insert>
54 95 </mapper>
... ...
... ... @@ -99,6 +99,7 @@
99 99 tb.packaging_fee,
100 100 tb.contract_create_by_id,
101 101 su.name as contract_create_by_name,
  102 + tb.freeze,
102 103 tb.create_by_id,
103 104 tb.create_by,
104 105 tb.update_by_id,
... ... @@ -153,6 +154,9 @@
153 154 <if test="vo.type != null and vo.type != ''">
154 155 AND tb.type = #{vo.type}
155 156 </if>
  157 + <if test="vo.freeze != null and vo.freeze != ''">
  158 + AND tb.freeze = #{vo.freeze}
  159 + </if>
156 160 <if test="vo.orderingUnitNameOrOrderNo != null and vo.orderingUnitNameOrOrderNo != ''">
157 161 AND (cu.name LIKE CONCAT('%', #{vo.orderingUnitNameOrOrderNo},'%')
158 162 or tb.order_no LIKE CONCAT('%', #{vo.orderingUnitNameOrOrderNo},'%'))
... ...