Showing
22 changed files
with
455 additions
and
69 deletions
| @@ -6,8 +6,9 @@ import com.lframework.starter.common.constants.StringPool; | @@ -6,8 +6,9 @@ import com.lframework.starter.common.constants.StringPool; | ||
| 6 | import java.time.LocalDate; | 6 | import java.time.LocalDate; |
| 7 | import java.util.List; | 7 | import java.util.List; |
| 8 | import com.lframework.starter.web.core.bo.BaseBo; | 8 | import com.lframework.starter.web.core.bo.BaseBo; |
| 9 | -import com.lframework.xingyun.sc.bo.ledger.rel.GetFundOrderingUnitBo; | ||
| 10 | import com.lframework.xingyun.sc.entity.FundCoordination; | 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 | import io.swagger.annotations.ApiModelProperty; | 12 | import io.swagger.annotations.ApiModelProperty; |
| 12 | 13 | ||
| 13 | import lombok.Data; | 14 | import lombok.Data; |
| @@ -62,12 +63,6 @@ public class GetFundCoordinationBo extends BaseBo<FundCoordination> { | @@ -62,12 +63,6 @@ public class GetFundCoordinationBo extends BaseBo<FundCoordination> { | ||
| 62 | private String orderingUnitName; | 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 | @ApiModelProperty("客户简称名称") | 68 | @ApiModelProperty("客户简称名称") |
| @@ -141,10 +136,34 @@ public class GetFundCoordinationBo extends BaseBo<FundCoordination> { | @@ -141,10 +136,34 @@ public class GetFundCoordinationBo extends BaseBo<FundCoordination> { | ||
| 141 | private String requirementSpecification; | 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 | public GetFundCoordinationBo() { | 168 | public GetFundCoordinationBo() { |
| 150 | 169 |
| @@ -60,12 +60,6 @@ public class QueryFundCoordinationBo extends BaseBo<FundCoordination> { | @@ -60,12 +60,6 @@ public class QueryFundCoordinationBo extends BaseBo<FundCoordination> { | ||
| 60 | private String orderingUnitName; | 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 | @ApiModelProperty("客户类型") | 65 | @ApiModelProperty("客户类型") |
| @@ -132,6 +126,18 @@ public class QueryFundCoordinationBo extends BaseBo<FundCoordination> { | @@ -132,6 +126,18 @@ public class QueryFundCoordinationBo extends BaseBo<FundCoordination> { | ||
| 132 | @ApiModelProperty("协调事由需求说明") | 126 | @ApiModelProperty("协调事由需求说明") |
| 133 | private String requirementSpecification; | 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 | public QueryFundCoordinationBo() { | 141 | public QueryFundCoordinationBo() { |
| 136 | 142 | ||
| 137 | } | 143 | } |
| @@ -279,6 +279,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { | @@ -279,6 +279,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { | ||
| 279 | private BigDecimal totalQuantity; | 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 | @ApiModelProperty("包装费") | 290 | @ApiModelProperty("包装费") |
| @@ -308,6 +314,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { | @@ -308,6 +314,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { | ||
| 308 | @ApiModelProperty("交货日期") | 314 | @ApiModelProperty("交货日期") |
| 309 | private LocalDate deliveryDate; | 315 | private LocalDate deliveryDate; |
| 310 | 316 | ||
| 317 | + /** | ||
| 318 | + * 是否冻结 | ||
| 319 | + */ | ||
| 320 | + @ApiModelProperty("是否冻结") | ||
| 321 | + private boolean freeze; | ||
| 322 | + | ||
| 311 | 323 | ||
| 312 | public GetPurchaseOrderInfoBo() { | 324 | public GetPurchaseOrderInfoBo() { |
| 313 | 325 |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/ledger/FundCoordinationController.java
| 1 | package com.lframework.xingyun.sc.controller.ledger; | 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 | import com.lframework.starter.web.core.annotations.security.HasPermission; | 6 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| 4 | import com.lframework.starter.web.core.components.security.SecurityUtil; | 7 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| 5 | import com.lframework.starter.web.core.controller.DefaultBaseController; | 8 | import com.lframework.starter.web.core.controller.DefaultBaseController; |
| @@ -16,26 +19,27 @@ import com.lframework.starter.web.inner.service.system.SysDataDicItemService; | @@ -16,26 +19,27 @@ import com.lframework.starter.web.inner.service.system.SysDataDicItemService; | ||
| 16 | import com.lframework.starter.web.inner.service.system.SysDeptService; | 19 | import com.lframework.starter.web.inner.service.system.SysDeptService; |
| 17 | import com.lframework.starter.web.inner.service.system.SysUserService; | 20 | import com.lframework.starter.web.inner.service.system.SysUserService; |
| 18 | import com.lframework.starter.web.inner.vo.system.user.QuerySysUserVo; | 21 | import com.lframework.starter.web.inner.vo.system.user.QuerySysUserVo; |
| 19 | -import com.lframework.xingyun.sc.bo.ledger.detail.GetFundOrderingUnitDetailBo; | ||
| 20 | import com.lframework.xingyun.sc.bo.ledger.fund.GetFundCoordinationBo; | 22 | import com.lframework.xingyun.sc.bo.ledger.fund.GetFundCoordinationBo; |
| 21 | import com.lframework.xingyun.sc.bo.ledger.fund.QueryFundCoordinationBo; | 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 | import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo; | 29 | import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo; |
| 30 | import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo; | 30 | import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo; |
| 31 | import com.lframework.xingyun.sc.vo.ledger.fund.UpdateFundCoordinationVo; | 31 | import com.lframework.xingyun.sc.vo.ledger.fund.UpdateFundCoordinationVo; |
| 32 | import com.lframework.xingyun.sc.vo.ledger.guarantee.QueryUnlimitedGuaranteeLetterVo; | 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 | import io.swagger.annotations.ApiImplicitParam; | 36 | import io.swagger.annotations.ApiImplicitParam; |
| 34 | import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; | 37 | import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; |
| 35 | import com.lframework.starter.common.exceptions.impl.DefaultClientException; | 38 | import com.lframework.starter.common.exceptions.impl.DefaultClientException; |
| 36 | import io.swagger.annotations.ApiOperation; | 39 | import io.swagger.annotations.ApiOperation; |
| 37 | import com.lframework.starter.common.utils.CollectionUtil; | 40 | import com.lframework.starter.common.utils.CollectionUtil; |
| 38 | import io.swagger.annotations.Api; | 41 | import io.swagger.annotations.Api; |
| 42 | +import org.apache.commons.collections.CollectionUtils; | ||
| 39 | import org.springframework.web.bind.annotation.DeleteMapping; | 43 | import org.springframework.web.bind.annotation.DeleteMapping; |
| 40 | import org.springframework.beans.factory.annotation.Autowired; | 44 | import org.springframework.beans.factory.annotation.Autowired; |
| 41 | import org.springframework.validation.annotation.Validated; | 45 | import org.springframework.validation.annotation.Validated; |
| @@ -73,6 +77,16 @@ public class FundCoordinationController extends DefaultBaseController { | @@ -73,6 +77,16 @@ public class FundCoordinationController extends DefaultBaseController { | ||
| 73 | private SysDataDicItemService sysDataDicItemService; | 77 | private SysDataDicItemService sysDataDicItemService; |
| 74 | @Resource | 78 | @Resource |
| 75 | private UnlimitedGuaranteeLetterService unlimitedGuaranteeLetterService; | 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,7 +122,7 @@ public class FundCoordinationController extends DefaultBaseController { | ||
| 108 | throw new DefaultClientException("资金协调手续不存在!"); | 122 | throw new DefaultClientException("资金协调手续不存在!"); |
| 109 | } | 123 | } |
| 110 | 124 | ||
| 111 | - GetFundCoordinationBo result = new GetFundCoordinationBo(data); | 125 | + GetFundCoordinationBo result = packFundCoordinationData(data); |
| 112 | 126 | ||
| 113 | return InvokeResultBuilder.success(result); | 127 | return InvokeResultBuilder.success(result); |
| 114 | } | 128 | } |
| @@ -188,7 +202,6 @@ public class FundCoordinationController extends DefaultBaseController { | @@ -188,7 +202,6 @@ public class FundCoordinationController extends DefaultBaseController { | ||
| 188 | // SysDataDicItem type = sysDataDicItemService.findByCode("ENTERPRISE_TYPE", receiptLedgerInfo.getCustomerType()); | 202 | // SysDataDicItem type = sysDataDicItemService.findByCode("ENTERPRISE_TYPE", receiptLedgerInfo.getCustomerType()); |
| 189 | // getFundCoordinationBo.setCustomerTypeName(type == null ? "" : type.getName()); | 203 | // getFundCoordinationBo.setCustomerTypeName(type == null ? "" : type.getName()); |
| 190 | //客户简称 | 204 | //客户简称 |
| 191 | - getFundCoordinationBo.setCustomerShortId(receiptLedgerInfo.getCustomerShortId()); | ||
| 192 | getFundCoordinationBo.setCustomerShortName(receiptLedgerInfo.getCustomerShortName()); | 205 | getFundCoordinationBo.setCustomerShortName(receiptLedgerInfo.getCustomerShortName()); |
| 193 | //授权额度 | 206 | //授权额度 |
| 194 | if (receiptLedgerInfo.getQuota() != null) { | 207 | if (receiptLedgerInfo.getQuota() != null) { |
| @@ -202,7 +215,7 @@ public class FundCoordinationController extends DefaultBaseController { | @@ -202,7 +215,7 @@ public class FundCoordinationController extends DefaultBaseController { | ||
| 202 | //无限担保书 | 215 | //无限担保书 |
| 203 | StringBuilder unlimitedGuaranteeLetterStr = new StringBuilder(); | 216 | StringBuilder unlimitedGuaranteeLetterStr = new StringBuilder(); |
| 204 | //订货单位集合 | 217 | //订货单位集合 |
| 205 | - List<GetFundOrderingUnitBo> fundOrderingUnitList = new ArrayList<>(); | 218 | + List<FundOrderingUnit> fundOrderingUnitList = new ArrayList<>(); |
| 206 | //总计应收款 | 219 | //总计应收款 |
| 207 | BigDecimal totalAccountsReceivable = BigDecimal.ZERO; | 220 | BigDecimal totalAccountsReceivable = BigDecimal.ZERO; |
| 208 | //超期应收款 | 221 | //超期应收款 |
| @@ -228,17 +241,17 @@ public class FundCoordinationController extends DefaultBaseController { | @@ -228,17 +241,17 @@ public class FundCoordinationController extends DefaultBaseController { | ||
| 228 | } else { | 241 | } else { |
| 229 | unlimitedGuaranteeLetterStr.append("有").append(","); | 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 | System.out.println("Customer ID: " + customerId); | 247 | System.out.println("Customer ID: " + customerId); |
| 235 | //订货单位应收款明细 | 248 | //订货单位应收款明细 |
| 236 | - List<GetFundOrderingUnitDetailBo> fundOrderingUnitDetailList = new ArrayList<>(); | 249 | + List<FundOrderingUnitDetail> fundOrderingUnitDetailList = new ArrayList<>(); |
| 237 | for (ReceiptLedgerInfo receipt : receiptList) { | 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 | if (receipt.getStartAccountReceivable() != null) { | 253 | if (receipt.getStartAccountReceivable() != null) { |
| 241 | - bo1.setAccountsReceivable(receipt.getStartAccountReceivable().stripTrailingZeros().toPlainString()); | 254 | + fundOrderingUnitDetail.setAccountsReceivable(receipt.getStartAccountReceivable().stripTrailingZeros().toPlainString()); |
| 242 | } | 255 | } |
| 243 | SysDataDicItem sysDataDicItem = sysDataDicItemService.findByCode("DEBT_STATUS", receipt.getDebtStatus()); | 256 | SysDataDicItem sysDataDicItem = sysDataDicItemService.findByCode("DEBT_STATUS", receipt.getDebtStatus()); |
| 244 | if (sysDataDicItem != null && sysDataDicItem.getCode().equals("FIRST_COORDINATE")) { | 257 | if (sysDataDicItem != null && sysDataDicItem.getCode().equals("FIRST_COORDINATE")) { |
| @@ -283,23 +296,23 @@ public class FundCoordinationController extends DefaultBaseController { | @@ -283,23 +296,23 @@ public class FundCoordinationController extends DefaultBaseController { | ||
| 283 | || sysDataDicItem.getCode().equals("SECOND_COORDINATE") || sysDataDicItem.getCode().equals("CLEAR_DEBTS")))) { | 296 | || sysDataDicItem.getCode().equals("SECOND_COORDINATE") || sysDataDicItem.getCode().equals("CLEAR_DEBTS")))) { |
| 284 | continue; | 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 | if (receipt.getCoordinateDate() != null && !receipt.getCoordinateDate().isBefore(LocalDate.now())) { | 306 | if (receipt.getCoordinateDate() != null && !receipt.getCoordinateDate().isBefore(LocalDate.now())) { |
| 294 | - bo1.setCoordinateHandleDate(receipt.getCoordinateDate()); | 307 | + fundOrderingUnitDetail.setCoordinateHandleDate(receipt.getCoordinateDate()); |
| 295 | } | 308 | } |
| 296 | if (receipt.getCoordinateDate() != null && !receipt.getCoordinateDate().isBefore(LocalDate.now()) | 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 | fundOrderingUnitDetailList.sort((a, b) -> { | 318 | fundOrderingUnitDetailList.sort((a, b) -> { |
| @@ -307,8 +320,8 @@ public class FundCoordinationController extends DefaultBaseController { | @@ -307,8 +320,8 @@ public class FundCoordinationController extends DefaultBaseController { | ||
| 307 | Long bVal = b.getTimeout() == null ? null : Long.valueOf(b.getTimeout()); | 320 | Long bVal = b.getTimeout() == null ? null : Long.valueOf(b.getTimeout()); |
| 308 | return Comparator.<Long>reverseOrder().compare(aVal, bVal); | 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 | if (customerNameStr.length() > 0) { | 327 | if (customerNameStr.length() > 0) { |
| @@ -364,4 +377,65 @@ public class FundCoordinationController extends DefaultBaseController { | @@ -364,4 +377,65 @@ public class FundCoordinationController extends DefaultBaseController { | ||
| 364 | 377 | ||
| 365 | return InvokeResultBuilder.success(data); | 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,14 +61,8 @@ public class FundCoordination extends BaseEntity implements BaseDto { | ||
| 61 | private String orderingUnitName; | 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 | private String customerShortName; | 66 | private String customerShortName; |
| 73 | 67 | ||
| 74 | /** | 68 | /** |
| @@ -122,6 +116,16 @@ public class FundCoordination extends BaseEntity implements BaseDto { | @@ -122,6 +116,16 @@ public class FundCoordination extends BaseEntity implements BaseDto { | ||
| 122 | private String requirementSpecification; | 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 | * 办事处内勤ID | 129 | * 办事处内勤ID |
| 126 | */ | 130 | */ |
| 127 | private String officeClerk; | 131 | private String officeClerk; |
| @@ -3,6 +3,7 @@ package com.lframework.xingyun.sc.entity; | @@ -3,6 +3,7 @@ package com.lframework.xingyun.sc.entity; | ||
| 3 | import com.baomidou.mybatisplus.annotation.TableName; | 3 | import com.baomidou.mybatisplus.annotation.TableName; |
| 4 | import com.lframework.starter.web.core.dto.BaseDto; | 4 | import com.lframework.starter.web.core.dto.BaseDto; |
| 5 | import java.time.LocalDateTime; | 5 | import java.time.LocalDateTime; |
| 6 | +import java.util.List; | ||
| 6 | import com.baomidou.mybatisplus.annotation.FieldFill; | 7 | import com.baomidou.mybatisplus.annotation.FieldFill; |
| 7 | import com.lframework.starter.web.core.entity.BaseEntity; | 8 | import com.lframework.starter.web.core.entity.BaseEntity; |
| 8 | import com.baomidou.mybatisplus.annotation.TableField; | 9 | import com.baomidou.mybatisplus.annotation.TableField; |
| @@ -48,6 +49,12 @@ public class FundOrderingUnit extends BaseEntity implements BaseDto { | @@ -48,6 +49,12 @@ public class FundOrderingUnit extends BaseEntity implements BaseDto { | ||
| 48 | private String remark; | 49 | private String remark; |
| 49 | 50 | ||
| 50 | /** | 51 | /** |
| 52 | + * 资金协调手续订货单位应收款明细 | ||
| 53 | + */ | ||
| 54 | + @TableField(exist = false) | ||
| 55 | + private List<FundOrderingUnitDetail> fundOrderingUnitDetailList; | ||
| 56 | + | ||
| 57 | + /** | ||
| 51 | * 创建人ID | 58 | * 创建人ID |
| 52 | */ | 59 | */ |
| 53 | @TableField(fill = FieldFill.INSERT) | 60 | @TableField(fill = FieldFill.INSERT) |
| @@ -254,6 +254,12 @@ public class PurchaseOrderInfo extends BaseEntity implements BaseDto { | @@ -254,6 +254,12 @@ public class PurchaseOrderInfo extends BaseEntity implements BaseDto { | ||
| 254 | private BigDecimal totalQuantity; | 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 | private String packagingFee; | 265 | private String packagingFee; |
| @@ -264,6 +270,11 @@ public class PurchaseOrderInfo extends BaseEntity implements BaseDto { | @@ -264,6 +270,11 @@ public class PurchaseOrderInfo extends BaseEntity implements BaseDto { | ||
| 264 | private String contractCreateById; | 270 | private String contractCreateById; |
| 265 | 271 | ||
| 266 | /** | 272 | /** |
| 273 | + * 是否冻结 | ||
| 274 | + */ | ||
| 275 | + private boolean freeze; | ||
| 276 | + | ||
| 277 | + /** | ||
| 267 | * 下单人(非持久化字段) | 278 | * 下单人(非持久化字段) |
| 268 | */ | 279 | */ |
| 269 | @TableField(exist = false) | 280 | @TableField(exist = false) |
| @@ -3,6 +3,7 @@ package com.lframework.xingyun.sc.impl.ledger; | @@ -3,6 +3,7 @@ package com.lframework.xingyun.sc.impl.ledger; | ||
| 3 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | import com.github.pagehelper.PageInfo; | 5 | import com.github.pagehelper.PageInfo; |
| 6 | +import com.lframework.starter.common.utils.CollectionUtil; | ||
| 6 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; | 7 | 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.PageResultUtil; |
| 8 | import com.lframework.starter.web.core.utils.OpLogUtil; | 9 | import com.lframework.starter.web.core.utils.OpLogUtil; |
| @@ -19,17 +20,26 @@ import com.lframework.starter.common.utils.Assert; | @@ -19,17 +20,26 @@ import com.lframework.starter.common.utils.Assert; | ||
| 19 | import com.lframework.xingyun.sc.entity.FundCoordination; | 20 | import com.lframework.xingyun.sc.entity.FundCoordination; |
| 20 | import com.lframework.xingyun.sc.mappers.FundCoordinationMapper; | 21 | import com.lframework.xingyun.sc.mappers.FundCoordinationMapper; |
| 21 | import com.lframework.xingyun.sc.service.ledger.FundCoordinationService; | 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 | import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo; | 25 | import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo; |
| 23 | import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo; | 26 | import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo; |
| 24 | import com.lframework.xingyun.sc.vo.ledger.fund.UpdateFundCoordinationVo; | 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 | import org.springframework.transaction.annotation.Transactional; | 30 | import org.springframework.transaction.annotation.Transactional; |
| 26 | import org.springframework.stereotype.Service; | 31 | import org.springframework.stereotype.Service; |
| 27 | - | 32 | +import javax.annotation.Resource; |
| 28 | import java.util.List; | 33 | import java.util.List; |
| 29 | 34 | ||
| 30 | @Service | 35 | @Service |
| 31 | public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinationMapper, FundCoordination> implements FundCoordinationService { | 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 | @Override | 43 | @Override |
| 34 | public PageResult<FundCoordination> query(Integer pageIndex, Integer pageSize, QueryFundCoordinationVo vo) { | 44 | public PageResult<FundCoordination> query(Integer pageIndex, Integer pageSize, QueryFundCoordinationVo vo) { |
| 35 | 45 | ||
| @@ -72,7 +82,7 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | @@ -72,7 +82,7 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | ||
| 72 | if (!StringUtil.isBlank(vo.getOrderingUnitName())) { | 82 | if (!StringUtil.isBlank(vo.getOrderingUnitName())) { |
| 73 | data.setOrderingUnitName(vo.getOrderingUnitName()); | 83 | data.setOrderingUnitName(vo.getOrderingUnitName()); |
| 74 | } | 84 | } |
| 75 | - data.setCustomerShortId(vo.getCustomerShortId()); | 85 | + data.setCustomerShortName(vo.getCustomerShortName()); |
| 76 | if (!StringUtil.isBlank(vo.getCustomerType())) { | 86 | if (!StringUtil.isBlank(vo.getCustomerType())) { |
| 77 | data.setCustomerType(vo.getCustomerType()); | 87 | data.setCustomerType(vo.getCustomerType()); |
| 78 | } | 88 | } |
| @@ -94,15 +104,40 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | @@ -94,15 +104,40 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | ||
| 94 | if (!StringUtil.isBlank(vo.getRequirementSpecification())) { | 104 | if (!StringUtil.isBlank(vo.getRequirementSpecification())) { |
| 95 | data.setRequirementSpecification(vo.getRequirementSpecification()); | 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 | getBaseMapper().insert(data); | 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 | OpLogUtil.setVariable("id", data.getId()); | 132 | OpLogUtil.setVariable("id", data.getId()); |
| 101 | OpLogUtil.setExtra(vo); | 133 | OpLogUtil.setExtra(vo); |
| 102 | 134 | ||
| 103 | return data.getId(); | 135 | return data.getId(); |
| 104 | } | 136 | } |
| 105 | 137 | ||
| 138 | + /** | ||
| 139 | + * 没有修改:方法不全后续使用要完善 | ||
| 140 | + */ | ||
| 106 | @OpLog(type = OtherOpLogType.class, name = "修改资金协调手续,ID:{}", params = {"#id"}) | 141 | @OpLog(type = OtherOpLogType.class, name = "修改资金协调手续,ID:{}", params = {"#id"}) |
| 107 | @Transactional(rollbackFor = Exception.class) | 142 | @Transactional(rollbackFor = Exception.class) |
| 108 | @Override | 143 | @Override |
| @@ -117,7 +152,7 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | @@ -117,7 +152,7 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | ||
| 117 | .set(FundCoordination::getFundResponsiblePerson, StringUtil.isBlank(vo.getFundResponsiblePerson()) ? null : vo.getFundResponsiblePerson()) | 152 | .set(FundCoordination::getFundResponsiblePerson, StringUtil.isBlank(vo.getFundResponsiblePerson()) ? null : vo.getFundResponsiblePerson()) |
| 118 | .set(FundCoordination::getDeptAndRole, StringUtil.isBlank(vo.getDeptAndRole()) ? null : vo.getDeptAndRole()) | 153 | .set(FundCoordination::getDeptAndRole, StringUtil.isBlank(vo.getDeptAndRole()) ? null : vo.getDeptAndRole()) |
| 119 | .set(FundCoordination::getOrderingUnitName, StringUtil.isBlank(vo.getOrderingUnitName()) ? null : vo.getOrderingUnitName()) | 154 | .set(FundCoordination::getOrderingUnitName, StringUtil.isBlank(vo.getOrderingUnitName()) ? null : vo.getOrderingUnitName()) |
| 120 | - .set(FundCoordination::getCustomerShortId, vo.getCustomerShortId()) | 155 | + .set(FundCoordination::getCustomerShortName, vo.getCustomerShortName()) |
| 121 | .set(FundCoordination::getCustomerType, StringUtil.isBlank(vo.getCustomerType()) ? null : vo.getCustomerType()) | 156 | .set(FundCoordination::getCustomerType, StringUtil.isBlank(vo.getCustomerType()) ? null : vo.getCustomerType()) |
| 122 | .set(FundCoordination::getUnlimitedGuaranteeLetter, StringUtil.isBlank(vo.getUnlimitedGuaranteeLetter()) ? null : vo.getUnlimitedGuaranteeLetter()) | 157 | .set(FundCoordination::getUnlimitedGuaranteeLetter, StringUtil.isBlank(vo.getUnlimitedGuaranteeLetter()) ? null : vo.getUnlimitedGuaranteeLetter()) |
| 123 | .set(FundCoordination::getSettlementPeriod, StringUtil.isBlank(vo.getSettlementPeriod()) ? null : vo.getSettlementPeriod()) | 158 | .set(FundCoordination::getSettlementPeriod, StringUtil.isBlank(vo.getSettlementPeriod()) ? null : vo.getSettlementPeriod()) |
| @@ -125,6 +160,8 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | @@ -125,6 +160,8 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | ||
| 125 | .set(FundCoordination::getOrderDate, vo.getOrderDate() == null ? null : vo.getOrderDate()) | 160 | .set(FundCoordination::getOrderDate, vo.getOrderDate() == null ? null : vo.getOrderDate()) |
| 126 | .set(FundCoordination::getOrderQuantity, vo.getOrderQuantity() == null ? null : vo.getOrderQuantity()) | 161 | .set(FundCoordination::getOrderQuantity, vo.getOrderQuantity() == null ? null : vo.getOrderQuantity()) |
| 127 | .set(FundCoordination::getRequirementSpecification, StringUtil.isBlank(vo.getRequirementSpecification()) ? null : vo.getRequirementSpecification()) | 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 | .eq(FundCoordination::getId, vo.getId()); | 165 | .eq(FundCoordination::getId, vo.getId()); |
| 129 | 166 | ||
| 130 | getBaseMapper().update(updateWrapper); | 167 | getBaseMapper().update(updateWrapper); |
| @@ -3,6 +3,7 @@ package com.lframework.xingyun.sc.impl.ledger; | @@ -3,6 +3,7 @@ package com.lframework.xingyun.sc.impl.ledger; | ||
| 3 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | import com.github.pagehelper.PageInfo; | 5 | import com.github.pagehelper.PageInfo; |
| 6 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | ||
| 6 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; | 7 | 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.PageResultUtil; |
| 8 | import com.lframework.starter.web.core.components.resp.PageResult; | 9 | import com.lframework.starter.web.core.components.resp.PageResult; |
| @@ -22,9 +23,11 @@ import com.lframework.xingyun.sc.service.ledger.FundOrderingUnitDetailService; | @@ -22,9 +23,11 @@ import com.lframework.xingyun.sc.service.ledger.FundOrderingUnitDetailService; | ||
| 22 | import com.lframework.xingyun.sc.vo.ledger.detail.CreateFundOrderingUnitDetailVo; | 23 | import com.lframework.xingyun.sc.vo.ledger.detail.CreateFundOrderingUnitDetailVo; |
| 23 | import com.lframework.xingyun.sc.vo.ledger.detail.QueryFundOrderingUnitDetailVo; | 24 | import com.lframework.xingyun.sc.vo.ledger.detail.QueryFundOrderingUnitDetailVo; |
| 24 | import com.lframework.xingyun.sc.vo.ledger.detail.UpdateFundOrderingUnitDetailVo; | 25 | import com.lframework.xingyun.sc.vo.ledger.detail.UpdateFundOrderingUnitDetailVo; |
| 26 | +import org.apache.commons.collections4.CollectionUtils; | ||
| 25 | import org.springframework.transaction.annotation.Transactional; | 27 | import org.springframework.transaction.annotation.Transactional; |
| 26 | import org.springframework.stereotype.Service; | 28 | import org.springframework.stereotype.Service; |
| 27 | - | 29 | +import java.time.LocalDateTime; |
| 30 | +import java.util.ArrayList; | ||
| 28 | import java.util.List; | 31 | import java.util.List; |
| 29 | 32 | ||
| 30 | @Service | 33 | @Service |
| @@ -124,6 +127,34 @@ public class FundOrderingUnitDetailServiceImpl extends BaseMpServiceImpl<FundOrd | @@ -124,6 +127,34 @@ public class FundOrderingUnitDetailServiceImpl extends BaseMpServiceImpl<FundOrd | ||
| 124 | } | 127 | } |
| 125 | 128 | ||
| 126 | @Override | 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 | public void cleanCacheByKey(Serializable key) { | 158 | public void cleanCacheByKey(Serializable key) { |
| 128 | 159 | ||
| 129 | } | 160 | } |
| @@ -17,18 +17,25 @@ import com.lframework.starter.common.utils.Assert; | @@ -17,18 +17,25 @@ import com.lframework.starter.common.utils.Assert; | ||
| 17 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | 17 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 18 | import com.lframework.xingyun.sc.entity.FundOrderingUnit; | 18 | import com.lframework.xingyun.sc.entity.FundOrderingUnit; |
| 19 | import com.lframework.xingyun.sc.mappers.FundOrderingUnitMapper; | 19 | import com.lframework.xingyun.sc.mappers.FundOrderingUnitMapper; |
| 20 | +import com.lframework.xingyun.sc.service.ledger.FundOrderingUnitDetailService; | ||
| 20 | import com.lframework.xingyun.sc.service.ledger.FundOrderingUnitService; | 21 | import com.lframework.xingyun.sc.service.ledger.FundOrderingUnitService; |
| 22 | +import com.lframework.xingyun.sc.vo.ledger.detail.CreateFundOrderingUnitDetailVo; | ||
| 21 | import com.lframework.xingyun.sc.vo.ledger.rel.CreateFundOrderingUnitVo; | 23 | import com.lframework.xingyun.sc.vo.ledger.rel.CreateFundOrderingUnitVo; |
| 22 | import com.lframework.xingyun.sc.vo.ledger.rel.QueryFundOrderingUnitVo; | 24 | import com.lframework.xingyun.sc.vo.ledger.rel.QueryFundOrderingUnitVo; |
| 23 | import com.lframework.xingyun.sc.vo.ledger.rel.UpdateFundOrderingUnitVo; | 25 | import com.lframework.xingyun.sc.vo.ledger.rel.UpdateFundOrderingUnitVo; |
| 26 | +import org.apache.commons.collections.CollectionUtils; | ||
| 24 | import org.springframework.transaction.annotation.Transactional; | 27 | import org.springframework.transaction.annotation.Transactional; |
| 25 | import org.springframework.stereotype.Service; | 28 | import org.springframework.stereotype.Service; |
| 29 | +import javax.annotation.Resource; | ||
| 26 | import java.io.Serializable; | 30 | import java.io.Serializable; |
| 27 | import java.util.List; | 31 | import java.util.List; |
| 28 | 32 | ||
| 29 | @Service | 33 | @Service |
| 30 | public class FundOrderingUnitServiceImpl extends BaseMpServiceImpl<FundOrderingUnitMapper, FundOrderingUnit> implements FundOrderingUnitService { | 34 | public class FundOrderingUnitServiceImpl extends BaseMpServiceImpl<FundOrderingUnitMapper, FundOrderingUnit> implements FundOrderingUnitService { |
| 31 | 35 | ||
| 36 | + @Resource | ||
| 37 | + private FundOrderingUnitDetailService fundOrderingUnitDetailService; | ||
| 38 | + | ||
| 32 | @Override | 39 | @Override |
| 33 | public PageResult<FundOrderingUnit> query(Integer pageIndex, Integer pageSize, QueryFundOrderingUnitVo vo) { | 40 | public PageResult<FundOrderingUnit> query(Integer pageIndex, Integer pageSize, QueryFundOrderingUnitVo vo) { |
| 34 | 41 | ||
| @@ -72,6 +79,18 @@ public class FundOrderingUnitServiceImpl extends BaseMpServiceImpl<FundOrderingU | @@ -72,6 +79,18 @@ public class FundOrderingUnitServiceImpl extends BaseMpServiceImpl<FundOrderingU | ||
| 72 | } | 79 | } |
| 73 | 80 | ||
| 74 | getBaseMapper().insert(data); | 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 | OpLogUtil.setVariable("id", data.getId()); | 95 | OpLogUtil.setVariable("id", data.getId()); |
| 77 | OpLogUtil.setExtra(vo); | 96 | OpLogUtil.setExtra(vo); |
| @@ -45,6 +45,7 @@ import org.springframework.stereotype.Service; | @@ -45,6 +45,7 @@ import org.springframework.stereotype.Service; | ||
| 45 | 45 | ||
| 46 | import javax.annotation.Resource; | 46 | import javax.annotation.Resource; |
| 47 | import java.math.BigDecimal; | 47 | import java.math.BigDecimal; |
| 48 | +import java.math.RoundingMode; | ||
| 48 | import java.util.*; | 49 | import java.util.*; |
| 49 | import java.util.function.Function; | 50 | import java.util.function.Function; |
| 50 | import java.util.stream.Collectors; | 51 | import java.util.stream.Collectors; |
| @@ -573,6 +574,50 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | @@ -573,6 +574,50 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | ||
| 573 | } | 574 | } |
| 574 | 575 | ||
| 575 | @Override | 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 | public void cleanCacheByKey(Serializable key) { | 621 | public void cleanCacheByKey(Serializable key) { |
| 577 | 622 | ||
| 578 | } | 623 | } |
| @@ -351,6 +351,24 @@ public class PurchaseOrderLineServiceImpl extends BaseMpServiceImpl<PurchaseOrde | @@ -351,6 +351,24 @@ public class PurchaseOrderLineServiceImpl extends BaseMpServiceImpl<PurchaseOrde | ||
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | @Override | 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 | public void cleanCacheByKey(Serializable key) { | 372 | public void cleanCacheByKey(Serializable key) { |
| 355 | 373 | ||
| 356 | } | 374 | } |
| @@ -21,4 +21,6 @@ public interface FundOrderingUnitDetailMapper extends BaseMapper<FundOrderingUni | @@ -21,4 +21,6 @@ public interface FundOrderingUnitDetailMapper extends BaseMapper<FundOrderingUni | ||
| 21 | * @return | 21 | * @return |
| 22 | */ | 22 | */ |
| 23 | List<FundOrderingUnitDetail> query(@Param("vo") QueryFundOrderingUnitDetailVo vo); | 23 | List<FundOrderingUnitDetail> query(@Param("vo") QueryFundOrderingUnitDetailVo vo); |
| 24 | + | ||
| 25 | + void batchAdd(@Param("list") List<FundOrderingUnitDetail> list); | ||
| 24 | } | 26 | } |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/service/ledger/FundOrderingUnitDetailService.java
| @@ -52,4 +52,9 @@ public interface FundOrderingUnitDetailService extends BaseMpService<FundOrderin | @@ -52,4 +52,9 @@ public interface FundOrderingUnitDetailService extends BaseMpService<FundOrderin | ||
| 52 | * @return | 52 | * @return |
| 53 | */ | 53 | */ |
| 54 | void deleteById(String id); | 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,4 +132,11 @@ public interface PurchaseOrderInfoService extends BaseMpService<PurchaseOrderInf | ||
| 132 | * @return List<PurchaseOrderInfo> | 132 | * @return List<PurchaseOrderInfo> |
| 133 | */ | 133 | */ |
| 134 | List<PurchaseOrderInfo> listByCustomerIds(List<String> customerIds); | 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,4 +138,12 @@ public interface PurchaseOrderLineService extends BaseMpService<PurchaseOrderLin | ||
| 138 | * @param ids 主键ID集合 | 138 | * @param ids 主键ID集合 |
| 139 | */ | 139 | */ |
| 140 | void dispatched(List<String> ids); | 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 +6,9 @@ import javax.validation.constraints.NotBlank; | ||
| 6 | import java.time.LocalDate; | 6 | import java.time.LocalDate; |
| 7 | import com.lframework.starter.web.core.vo.BaseVo; | 7 | import com.lframework.starter.web.core.vo.BaseVo; |
| 8 | import javax.validation.constraints.NotNull; | 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 | import com.lframework.xingyun.sc.vo.ledger.rel.CreateFundOrderingUnitVo; | 12 | import com.lframework.xingyun.sc.vo.ledger.rel.CreateFundOrderingUnitVo; |
| 10 | import io.swagger.annotations.ApiModelProperty; | 13 | import io.swagger.annotations.ApiModelProperty; |
| 11 | import com.lframework.starter.web.core.components.validation.TypeMismatch; | 14 | import com.lframework.starter.web.core.components.validation.TypeMismatch; |
| @@ -55,10 +58,10 @@ public class CreateFundCoordinationVo implements BaseVo, Serializable { | @@ -55,10 +58,10 @@ public class CreateFundCoordinationVo implements BaseVo, Serializable { | ||
| 55 | /** | 58 | /** |
| 56 | * 客户简称ID | 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,9 +135,27 @@ public class CreateFundCoordinationVo implements BaseVo, Serializable { | ||
| 132 | private String requirementSpecification; | 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 | @ApiModelProperty("协调事由需求说明") | 152 | @ApiModelProperty("协调事由需求说明") |
| 138 | private List<CreateFundOrderingUnitVo> fundOrderingUnitList; | 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,10 +45,10 @@ public class UpdateFundCoordinationVo implements BaseVo, Serializable { | ||
| 45 | /** | 45 | /** |
| 46 | * 客户简称ID | 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,6 +122,18 @@ public class UpdateFundCoordinationVo implements BaseVo, Serializable { | ||
| 122 | private String requirementSpecification; | 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 | @ApiModelProperty("协调事由需求说明") | 139 | @ApiModelProperty("协调事由需求说明") |
| @@ -110,4 +110,10 @@ public class QueryPurchaseOrderInfoVo extends PageVo implements BaseVo, Serializ | @@ -110,4 +110,10 @@ public class QueryPurchaseOrderInfoVo extends PageVo implements BaseVo, Serializ | ||
| 110 | 110 | ||
| 111 | @ApiModelProperty("合同") | 111 | @ApiModelProperty("合同") |
| 112 | private String contractId; | 112 | private String contractId; |
| 113 | + | ||
| 114 | + /** | ||
| 115 | + * 是否冻结 | ||
| 116 | + */ | ||
| 117 | + @ApiModelProperty("是否冻结") | ||
| 118 | + private boolean freeze; | ||
| 113 | } | 119 | } |
| @@ -10,7 +10,6 @@ | @@ -10,7 +10,6 @@ | ||
| 10 | <result column="dept_and_role" property="deptAndRole"/> | 10 | <result column="dept_and_role" property="deptAndRole"/> |
| 11 | <result column="application_date" property="applicationDate"/> | 11 | <result column="application_date" property="applicationDate"/> |
| 12 | <result column="ordering_unit_name" property="orderingUnitName"/> | 12 | <result column="ordering_unit_name" property="orderingUnitName"/> |
| 13 | - <result column="customer_short_id" property="customerShortId"/> | ||
| 14 | <result column="customer_short_name" property="customerShortName"/> | 13 | <result column="customer_short_name" property="customerShortName"/> |
| 15 | <result column="customer_type" property="customerType"/> | 14 | <result column="customer_type" property="customerType"/> |
| 16 | <result column="unlimited_guarantee_letter" property="unlimitedGuaranteeLetter"/> | 15 | <result column="unlimited_guarantee_letter" property="unlimitedGuaranteeLetter"/> |
| @@ -57,8 +56,7 @@ | @@ -57,8 +56,7 @@ | ||
| 57 | tb.dept_and_role, | 56 | tb.dept_and_role, |
| 58 | tb.application_date, | 57 | tb.application_date, |
| 59 | tb.ordering_unit_name, | 58 | tb.ordering_unit_name, |
| 60 | - tb.customer_short_id, | ||
| 61 | - cs.short_name AS customer_short_name, | 59 | + tb.customer_short_name, |
| 62 | tb.customer_type, | 60 | tb.customer_type, |
| 63 | tb.unlimited_guarantee_letter, | 61 | tb.unlimited_guarantee_letter, |
| 64 | tb.settlement_period, | 62 | tb.settlement_period, |
| @@ -94,7 +92,6 @@ | @@ -94,7 +92,6 @@ | ||
| 94 | tb.create_time, | 92 | tb.create_time, |
| 95 | tb.update_time | 93 | tb.update_time |
| 96 | FROM fund_coordination AS tb | 94 | FROM fund_coordination AS tb |
| 97 | - left join base_data_customer_short cs on cs.id = tb.customer_short_id | ||
| 98 | left join sys_user u on u.id = tb.applicant | 95 | left join sys_user u on u.id = tb.applicant |
| 99 | </sql> | 96 | </sql> |
| 100 | 97 | ||
| @@ -113,7 +110,7 @@ | @@ -113,7 +110,7 @@ | ||
| 113 | AND tb.ordering_unit_name LIKE CONCAT('%', #{vo.orderingUnitName}, '%') | 110 | AND tb.ordering_unit_name LIKE CONCAT('%', #{vo.orderingUnitName}, '%') |
| 114 | </if> | 111 | </if> |
| 115 | <if test="vo.shortName != null and vo.shortName != ''"> | 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 | </if> | 114 | </if> |
| 118 | </where> | 115 | </where> |
| 119 | ORDER BY tb.create_time DESC | 116 | ORDER BY tb.create_time DESC |
| @@ -51,4 +51,45 @@ | @@ -51,4 +51,45 @@ | ||
| 51 | </where> | 51 | </where> |
| 52 | ORDER BY tb.actual_timeout DESC | 52 | ORDER BY tb.actual_timeout DESC |
| 53 | </select> | 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 | </mapper> | 95 | </mapper> |
| @@ -99,6 +99,7 @@ | @@ -99,6 +99,7 @@ | ||
| 99 | tb.packaging_fee, | 99 | tb.packaging_fee, |
| 100 | tb.contract_create_by_id, | 100 | tb.contract_create_by_id, |
| 101 | su.name as contract_create_by_name, | 101 | su.name as contract_create_by_name, |
| 102 | + tb.freeze, | ||
| 102 | tb.create_by_id, | 103 | tb.create_by_id, |
| 103 | tb.create_by, | 104 | tb.create_by, |
| 104 | tb.update_by_id, | 105 | tb.update_by_id, |
| @@ -153,6 +154,9 @@ | @@ -153,6 +154,9 @@ | ||
| 153 | <if test="vo.type != null and vo.type != ''"> | 154 | <if test="vo.type != null and vo.type != ''"> |
| 154 | AND tb.type = #{vo.type} | 155 | AND tb.type = #{vo.type} |
| 155 | </if> | 156 | </if> |
| 157 | + <if test="vo.freeze != null and vo.freeze != ''"> | ||
| 158 | + AND tb.freeze = #{vo.freeze} | ||
| 159 | + </if> | ||
| 156 | <if test="vo.orderingUnitNameOrOrderNo != null and vo.orderingUnitNameOrOrderNo != ''"> | 160 | <if test="vo.orderingUnitNameOrOrderNo != null and vo.orderingUnitNameOrOrderNo != ''"> |
| 157 | AND (cu.name LIKE CONCAT('%', #{vo.orderingUnitNameOrOrderNo},'%') | 161 | AND (cu.name LIKE CONCAT('%', #{vo.orderingUnitNameOrOrderNo},'%') |
| 158 | or tb.order_no LIKE CONCAT('%', #{vo.orderingUnitNameOrOrderNo},'%')) | 162 | or tb.order_no LIKE CONCAT('%', #{vo.orderingUnitNameOrOrderNo},'%')) |