Showing
16 changed files
with
176 additions
and
10 deletions
| @@ -1033,6 +1033,7 @@ CREATE TABLE `fund_coordination` ( | @@ -1033,6 +1033,7 @@ CREATE TABLE `fund_coordination` ( | ||
| 1033 | `marketing_center_supervisor_opinion` text DEFAULT NULL COMMENT '营销中心主管审核意见', | 1033 | `marketing_center_supervisor_opinion` text DEFAULT NULL COMMENT '营销中心主管审核意见', |
| 1034 | `general_manager` varchar(32) DEFAULT NULL COMMENT '总经理ID', | 1034 | `general_manager` varchar(32) DEFAULT NULL COMMENT '总经理ID', |
| 1035 | `general_manager_opinion` text DEFAULT NULL COMMENT '总经理审核意见', | 1035 | `general_manager_opinion` text DEFAULT NULL COMMENT '总经理审核意见', |
| 1036 | + `status` varchar(50) DEFAULT NULL COMMENT '审核状态', | ||
| 1036 | `create_by_id` varchar(32) NOT NULL COMMENT '创建人ID', | 1037 | `create_by_id` varchar(32) NOT NULL COMMENT '创建人ID', |
| 1037 | `create_by` varchar(20) NOT NULL COMMENT '创建人', | 1038 | `create_by` varchar(20) NOT NULL COMMENT '创建人', |
| 1038 | `update_by_id` varchar(32) NOT NULL COMMENT '更新人ID', | 1039 | `update_by_id` varchar(32) NOT NULL COMMENT '更新人ID', |
| @@ -1060,6 +1061,7 @@ CREATE TABLE `fund_ordering_unit` ( | @@ -1060,6 +1061,7 @@ CREATE TABLE `fund_ordering_unit` ( | ||
| 1060 | CREATE TABLE `fund_ordering_unit_detail`( | 1061 | CREATE TABLE `fund_ordering_unit_detail`( |
| 1061 | `id` varchar(32) NOT NULL COMMENT 'ID', | 1062 | `id` varchar(32) NOT NULL COMMENT 'ID', |
| 1062 | `fund_ordering_unit_id` varchar(32) DEFAULT NULL COMMENT '资金协调手续订货单位关联表ID', | 1063 | `fund_ordering_unit_id` varchar(32) DEFAULT NULL COMMENT '资金协调手续订货单位关联表ID', |
| 1064 | + `ledger_id` varchar(32) DEFAULT NULL COMMENT '应收款台账明细ID', | ||
| 1063 | `delivery_date` date DEFAULT NULL COMMENT '发货日期', | 1065 | `delivery_date` date DEFAULT NULL COMMENT '发货日期', |
| 1064 | `accounts_receivable` varchar(50) DEFAULT NULL COMMENT '应收款(元)', | 1066 | `accounts_receivable` varchar(50) DEFAULT NULL COMMENT '应收款(元)', |
| 1065 | `status` varchar(20) DEFAULT NULL COMMENT '当前欠款状态', | 1067 | `status` varchar(20) DEFAULT NULL COMMENT '当前欠款状态', |
| @@ -165,6 +165,12 @@ public class GetFundCoordinationBo extends BaseBo<FundCoordination> { | @@ -165,6 +165,12 @@ public class GetFundCoordinationBo extends BaseBo<FundCoordination> { | ||
| 165 | @ApiModelProperty("是否能审核") | 165 | @ApiModelProperty("是否能审核") |
| 166 | private boolean showExamine; | 166 | private boolean showExamine; |
| 167 | 167 | ||
| 168 | + /** | ||
| 169 | + * 审核状态 | ||
| 170 | + */ | ||
| 171 | + @ApiModelProperty("审核状态") | ||
| 172 | + private String status; | ||
| 173 | + | ||
| 168 | public GetFundCoordinationBo() { | 174 | public GetFundCoordinationBo() { |
| 169 | 175 | ||
| 170 | } | 176 | } |
| @@ -138,6 +138,18 @@ public class QueryFundCoordinationBo extends BaseBo<FundCoordination> { | @@ -138,6 +138,18 @@ public class QueryFundCoordinationBo extends BaseBo<FundCoordination> { | ||
| 138 | @ApiModelProperty("贸易类型") | 138 | @ApiModelProperty("贸易类型") |
| 139 | private String type; | 139 | private String type; |
| 140 | 140 | ||
| 141 | + /** | ||
| 142 | + * 是否能审核 | ||
| 143 | + */ | ||
| 144 | + @ApiModelProperty("是否能审核") | ||
| 145 | + private boolean showExamine; | ||
| 146 | + | ||
| 147 | + /** | ||
| 148 | + * 审核状态 | ||
| 149 | + */ | ||
| 150 | + @ApiModelProperty("审核状态") | ||
| 151 | + private String status; | ||
| 152 | + | ||
| 141 | public QueryFundCoordinationBo() { | 153 | public QueryFundCoordinationBo() { |
| 142 | 154 | ||
| 143 | } | 155 | } |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/ledger/FundCoordinationController.java
| @@ -249,6 +249,7 @@ public class FundCoordinationController extends DefaultBaseController { | @@ -249,6 +249,7 @@ public class FundCoordinationController extends DefaultBaseController { | ||
| 249 | List<FundOrderingUnitDetail> fundOrderingUnitDetailList = new ArrayList<>(); | 249 | List<FundOrderingUnitDetail> fundOrderingUnitDetailList = new ArrayList<>(); |
| 250 | for (ReceiptLedgerInfo receipt : receiptList) { | 250 | for (ReceiptLedgerInfo receipt : receiptList) { |
| 251 | FundOrderingUnitDetail fundOrderingUnitDetail = new FundOrderingUnitDetail(); | 251 | FundOrderingUnitDetail fundOrderingUnitDetail = new FundOrderingUnitDetail(); |
| 252 | + fundOrderingUnitDetail.setLedgerId(receipt.getId()); | ||
| 252 | fundOrderingUnitDetail.setDeliveryDate(receipt.getShipmentDate()); | 253 | fundOrderingUnitDetail.setDeliveryDate(receipt.getShipmentDate()); |
| 253 | if (receipt.getStartAccountReceivable() != null) { | 254 | if (receipt.getStartAccountReceivable() != null) { |
| 254 | fundOrderingUnitDetail.setAccountsReceivable(receipt.getStartAccountReceivable().stripTrailingZeros().toPlainString()); | 255 | fundOrderingUnitDetail.setAccountsReceivable(receipt.getStartAccountReceivable().stripTrailingZeros().toPlainString()); |
| @@ -221,6 +221,12 @@ public class FundCoordination extends BaseEntity implements BaseDto { | @@ -221,6 +221,12 @@ public class FundCoordination extends BaseEntity implements BaseDto { | ||
| 221 | private String status; | 221 | private String status; |
| 222 | 222 | ||
| 223 | /** | 223 | /** |
| 224 | + * 是否能审核 | ||
| 225 | + */ | ||
| 226 | + @TableField(exist = false) | ||
| 227 | + private boolean showExamine; | ||
| 228 | + | ||
| 229 | + /** | ||
| 224 | * 办事处code | 230 | * 办事处code |
| 225 | */ | 231 | */ |
| 226 | @TableField(exist = false) | 232 | @TableField(exist = false) |
| @@ -34,6 +34,11 @@ public class FundOrderingUnitDetail extends BaseEntity implements BaseDto { | @@ -34,6 +34,11 @@ public class FundOrderingUnitDetail extends BaseEntity implements BaseDto { | ||
| 34 | private String fundOrderingUnitId; | 34 | private String fundOrderingUnitId; |
| 35 | 35 | ||
| 36 | /** | 36 | /** |
| 37 | + * 应收款台账ID | ||
| 38 | + */ | ||
| 39 | + private String ledgerId; | ||
| 40 | + | ||
| 41 | + /** | ||
| 37 | * 发货日期 | 42 | * 发货日期 |
| 38 | */ | 43 | */ |
| 39 | private LocalDate deliveryDate; | 44 | private LocalDate deliveryDate; |
| @@ -3,8 +3,10 @@ package com.lframework.xingyun.sc.impl.ledger; | @@ -3,8 +3,10 @@ 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.bpm.dto.FlowTaskDto; | ||
| 6 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | 7 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; |
| 7 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; | 8 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; |
| 9 | +import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; | ||
| 8 | import com.lframework.starter.common.utils.CollectionUtil; | 10 | import com.lframework.starter.common.utils.CollectionUtil; |
| 9 | import com.lframework.starter.web.core.components.security.SecurityUtil; | 11 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| 10 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; | 12 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; |
| @@ -20,20 +22,17 @@ import com.lframework.starter.web.core.components.resp.PageResult; | @@ -20,20 +22,17 @@ import com.lframework.starter.web.core.components.resp.PageResult; | ||
| 20 | import com.lframework.starter.common.utils.StringUtil; | 22 | import com.lframework.starter.common.utils.StringUtil; |
| 21 | import com.lframework.starter.common.utils.ObjectUtil; | 23 | import com.lframework.starter.common.utils.ObjectUtil; |
| 22 | import com.lframework.starter.common.utils.Assert; | 24 | import com.lframework.starter.common.utils.Assert; |
| 23 | -import com.lframework.xingyun.sc.entity.FundCoordination; | ||
| 24 | -import com.lframework.xingyun.sc.entity.FundOrderingUnit; | ||
| 25 | -import com.lframework.xingyun.sc.entity.FundOrderingUnitDetail; | 25 | +import com.lframework.xingyun.sc.entity.*; |
| 26 | import com.lframework.xingyun.sc.handlers.TransactorHandler; | 26 | import com.lframework.xingyun.sc.handlers.TransactorHandler; |
| 27 | import com.lframework.xingyun.sc.mappers.FundCoordinationMapper; | 27 | import com.lframework.xingyun.sc.mappers.FundCoordinationMapper; |
| 28 | -import com.lframework.xingyun.sc.service.ledger.FundCoordinationService; | ||
| 29 | -import com.lframework.xingyun.sc.service.ledger.FundOrderingUnitDetailService; | ||
| 30 | -import com.lframework.xingyun.sc.service.ledger.FundOrderingUnitService; | ||
| 31 | -import com.lframework.xingyun.sc.service.ledger.PendingDeliveryOrderService; | 28 | +import com.lframework.xingyun.sc.service.ledger.*; |
| 29 | +import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | ||
| 32 | import com.lframework.xingyun.sc.vo.ledger.detail.QueryFundOrderingUnitDetailVo; | 30 | import com.lframework.xingyun.sc.vo.ledger.detail.QueryFundOrderingUnitDetailVo; |
| 33 | import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo; | 31 | import com.lframework.xingyun.sc.vo.ledger.fund.CreateFundCoordinationVo; |
| 34 | import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo; | 32 | import com.lframework.xingyun.sc.vo.ledger.fund.QueryFundCoordinationVo; |
| 35 | import com.lframework.xingyun.sc.vo.ledger.fund.UpdateFundCoordinationVo; | 33 | import com.lframework.xingyun.sc.vo.ledger.fund.UpdateFundCoordinationVo; |
| 36 | import com.lframework.xingyun.sc.vo.ledger.pending.CreatePendingDeliveryOrderVo; | 34 | import com.lframework.xingyun.sc.vo.ledger.pending.CreatePendingDeliveryOrderVo; |
| 35 | +import com.lframework.xingyun.sc.vo.ledger.pending.QueryPendingDeliveryOrderVo; | ||
| 37 | import com.lframework.xingyun.sc.vo.ledger.rel.CreateFundOrderingUnitVo; | 36 | import com.lframework.xingyun.sc.vo.ledger.rel.CreateFundOrderingUnitVo; |
| 38 | import com.lframework.xingyun.sc.vo.ledger.rel.QueryFundOrderingUnitVo; | 37 | import com.lframework.xingyun.sc.vo.ledger.rel.QueryFundOrderingUnitVo; |
| 39 | import org.apache.commons.collections.CollectionUtils; | 38 | import org.apache.commons.collections.CollectionUtils; |
| @@ -41,6 +40,7 @@ import org.springframework.transaction.annotation.Transactional; | @@ -41,6 +40,7 @@ import org.springframework.transaction.annotation.Transactional; | ||
| 41 | import org.springframework.stereotype.Service; | 40 | import org.springframework.stereotype.Service; |
| 42 | import javax.annotation.Resource; | 41 | import javax.annotation.Resource; |
| 43 | import java.util.List; | 42 | import java.util.List; |
| 43 | +import java.util.stream.Collectors; | ||
| 44 | 44 | ||
| 45 | @Service | 45 | @Service |
| 46 | public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinationMapper, FundCoordination> implements FundCoordinationService { | 46 | public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinationMapper, FundCoordination> implements FundCoordinationService { |
| @@ -56,6 +56,12 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | @@ -56,6 +56,12 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | ||
| 56 | private FlowInstanceWrapperService flowInstanceWrapperService; | 56 | private FlowInstanceWrapperService flowInstanceWrapperService; |
| 57 | @Resource | 57 | @Resource |
| 58 | private FundOrderingUnitDetailService fundOrderingUnitDetailService; | 58 | private FundOrderingUnitDetailService fundOrderingUnitDetailService; |
| 59 | + @Resource | ||
| 60 | + private ReceiptLedgerInfoService receiptLedgerInfoService; | ||
| 61 | + @Resource | ||
| 62 | + private PurchaseOrderInfoService purchaseOrderInfoService; | ||
| 63 | + @Resource | ||
| 64 | + private FlowTaskWrapperMapper flowTaskWrapperMapper; | ||
| 59 | 65 | ||
| 60 | 66 | ||
| 61 | @Override | 67 | @Override |
| @@ -66,6 +72,21 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | @@ -66,6 +72,21 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | ||
| 66 | 72 | ||
| 67 | PageHelperUtil.startPage(pageIndex, pageSize); | 73 | PageHelperUtil.startPage(pageIndex, pageSize); |
| 68 | List<FundCoordination> datas = this.query(vo); | 74 | List<FundCoordination> datas = this.query(vo); |
| 75 | + if (CollectionUtils.isNotEmpty(datas)) { | ||
| 76 | + // 获取当前人员的待办任务数据 | ||
| 77 | + List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | ||
| 78 | + if (CollectionUtils.isEmpty(flowTaskList)) { | ||
| 79 | + return PageResultUtil.convert(new PageInfo<>(datas)); | ||
| 80 | + } | ||
| 81 | + List<String> ids = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | ||
| 82 | + for (FundCoordination fundCoordination : datas) { | ||
| 83 | + if (ids.contains(fundCoordination.getId())) { | ||
| 84 | + fundCoordination.setShowExamine(true); | ||
| 85 | + } else { | ||
| 86 | + fundCoordination.setShowExamine(false); | ||
| 87 | + } | ||
| 88 | + } | ||
| 89 | + } | ||
| 69 | 90 | ||
| 70 | return PageResultUtil.convert(new PageInfo<>(datas)); | 91 | return PageResultUtil.convert(new PageInfo<>(datas)); |
| 71 | } | 92 | } |
| @@ -236,19 +257,30 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | @@ -236,19 +257,30 @@ public class FundCoordinationServiceImpl extends BaseMpServiceImpl<FundCoordinat | ||
| 236 | QueryFundOrderingUnitVo vo = new QueryFundOrderingUnitVo(); | 257 | QueryFundOrderingUnitVo vo = new QueryFundOrderingUnitVo(); |
| 237 | vo.setFundId(id); | 258 | vo.setFundId(id); |
| 238 | List<FundOrderingUnit> fundOrderingUnitList = fundOrderingUnitService.query(vo); | 259 | List<FundOrderingUnit> fundOrderingUnitList = fundOrderingUnitService.query(vo); |
| 239 | - if (CollectionUtil.isNotEmpty(fundOrderingUnitList)){ | 260 | + if (CollectionUtil.isNotEmpty(fundOrderingUnitList)) { |
| 240 | for (FundOrderingUnit fundOrderingUnit : fundOrderingUnitList) { | 261 | for (FundOrderingUnit fundOrderingUnit : fundOrderingUnitList) { |
| 241 | //资金协调手续订货单位应收款明细 | 262 | //资金协调手续订货单位应收款明细 |
| 242 | QueryFundOrderingUnitDetailVo vo1 = new QueryFundOrderingUnitDetailVo(); | 263 | QueryFundOrderingUnitDetailVo vo1 = new QueryFundOrderingUnitDetailVo(); |
| 243 | vo1.setFundOrderingUnitId(fundOrderingUnit.getId()); | 264 | vo1.setFundOrderingUnitId(fundOrderingUnit.getId()); |
| 244 | List<FundOrderingUnitDetail> fundOrderingUnitDetailList = fundOrderingUnitDetailService.query(vo1); | 265 | List<FundOrderingUnitDetail> fundOrderingUnitDetailList = fundOrderingUnitDetailService.query(vo1); |
| 245 | if (CollectionUtils.isNotEmpty(fundOrderingUnitDetailList)) { | 266 | if (CollectionUtils.isNotEmpty(fundOrderingUnitDetailList)) { |
| 246 | - //更新应收款台账的协调办理日期 | ||
| 247 | - | 267 | + //更新应收款台账的协调办理日期 |
| 268 | + for (FundOrderingUnitDetail detail : fundOrderingUnitDetailList) { | ||
| 269 | + receiptLedgerInfoService.updateCoordinateDate(detail.getLedgerId(), | ||
| 270 | + detail.getCoordinateHandleDate(), detail.getStatus()); | ||
| 271 | + } | ||
| 248 | } | 272 | } |
| 249 | } | 273 | } |
| 250 | } | 274 | } |
| 251 | //解封订货单 | 275 | //解封订货单 |
| 276 | + QueryPendingDeliveryOrderVo vo2 = new QueryPendingDeliveryOrderVo(); | ||
| 277 | + vo2.setFundId(id); | ||
| 278 | + List<PendingDeliveryOrder> pendingDeliveryOrderList = pendingDeliveryOrderService.query(vo2); | ||
| 279 | + if (CollectionUtils.isNotEmpty(pendingDeliveryOrderList)) { | ||
| 280 | + List<String> purchaseOrderIdList = pendingDeliveryOrderList | ||
| 281 | + .stream().map(PendingDeliveryOrder::getPurchaseOrderId).collect(Collectors.toList()); | ||
| 282 | + purchaseOrderInfoService.batchUnblock(purchaseOrderIdList); | ||
| 283 | + } | ||
| 252 | } | 284 | } |
| 253 | 285 | ||
| 254 | 286 |
| @@ -65,6 +65,7 @@ public class FundOrderingUnitDetailServiceImpl extends BaseMpServiceImpl<FundOrd | @@ -65,6 +65,7 @@ public class FundOrderingUnitDetailServiceImpl extends BaseMpServiceImpl<FundOrd | ||
| 65 | FundOrderingUnitDetail data = new FundOrderingUnitDetail(); | 65 | FundOrderingUnitDetail data = new FundOrderingUnitDetail(); |
| 66 | data.setId(IdUtil.getId()); | 66 | data.setId(IdUtil.getId()); |
| 67 | data.setFundOrderingUnitId(vo.getFundOrderingUnitId()); | 67 | data.setFundOrderingUnitId(vo.getFundOrderingUnitId()); |
| 68 | + data.setLedgerId(vo.getLedgerId()); | ||
| 68 | if (vo.getDeliveryDate() != null) { | 69 | if (vo.getDeliveryDate() != null) { |
| 69 | data.setDeliveryDate(vo.getDeliveryDate()); | 70 | data.setDeliveryDate(vo.getDeliveryDate()); |
| 70 | } | 71 | } |
| @@ -136,6 +137,7 @@ public class FundOrderingUnitDetailServiceImpl extends BaseMpServiceImpl<FundOrd | @@ -136,6 +137,7 @@ public class FundOrderingUnitDetailServiceImpl extends BaseMpServiceImpl<FundOrd | ||
| 136 | for (CreateFundOrderingUnitDetailVo vo : createFundOrderingUnitDetailVoList) { | 137 | for (CreateFundOrderingUnitDetailVo vo : createFundOrderingUnitDetailVoList) { |
| 137 | FundOrderingUnitDetail fundOrderingUnitDetail = new FundOrderingUnitDetail(); | 138 | FundOrderingUnitDetail fundOrderingUnitDetail = new FundOrderingUnitDetail(); |
| 138 | fundOrderingUnitDetail.setFundOrderingUnitId(vo.getFundOrderingUnitId()); | 139 | fundOrderingUnitDetail.setFundOrderingUnitId(vo.getFundOrderingUnitId()); |
| 140 | + fundOrderingUnitDetail.setLedgerId(vo.getLedgerId()); | ||
| 139 | fundOrderingUnitDetail.setDeliveryDate(vo.getDeliveryDate()); | 141 | fundOrderingUnitDetail.setDeliveryDate(vo.getDeliveryDate()); |
| 140 | fundOrderingUnitDetail.setAccountsReceivable(vo.getAccountsReceivable()); | 142 | fundOrderingUnitDetail.setAccountsReceivable(vo.getAccountsReceivable()); |
| 141 | fundOrderingUnitDetail.setStatus(vo.getStatus()); | 143 | fundOrderingUnitDetail.setStatus(vo.getStatus()); |
| @@ -537,4 +537,53 @@ public class ReceiptLedgerInfoServiceImpl extends BaseMpServiceImpl<ReceiptLedge | @@ -537,4 +537,53 @@ public class ReceiptLedgerInfoServiceImpl extends BaseMpServiceImpl<ReceiptLedge | ||
| 537 | } | 537 | } |
| 538 | return targetValue; | 538 | return targetValue; |
| 539 | } | 539 | } |
| 540 | + | ||
| 541 | + @OpLog(type = OtherOpLogType.class, name = "修改应收款台账明细,ID:{}", params = {"#id"}) | ||
| 542 | + @Transactional(rollbackFor = Exception.class) | ||
| 543 | + @Override | ||
| 544 | + public void updateCoordinateDate(String id, LocalDate coordinateDate, String debtStatus) { | ||
| 545 | + ReceiptLedgerInfo data = getBaseMapper().selectById(id); | ||
| 546 | + if (ObjectUtil.isNull(data)) { | ||
| 547 | + throw new DefaultClientException("应收款台账明细不存在!"); | ||
| 548 | + } | ||
| 549 | + if ("一次协调".equals(debtStatus)) { | ||
| 550 | + LambdaUpdateWrapper<ReceiptLedgerInfo> updateWrapper = Wrappers.lambdaUpdate(ReceiptLedgerInfo.class) | ||
| 551 | + .set(ReceiptLedgerInfo::getCoordinateDate, coordinateDate) | ||
| 552 | + .eq(ReceiptLedgerInfo::getId, id); | ||
| 553 | + | ||
| 554 | + getBaseMapper().update(updateWrapper); | ||
| 555 | + } else if ("二次协调".equals(debtStatus)) { | ||
| 556 | + LambdaUpdateWrapper<ReceiptLedgerInfo> updateWrapper = Wrappers.lambdaUpdate(ReceiptLedgerInfo.class) | ||
| 557 | + .set(ReceiptLedgerInfo::getCoordinateDate, coordinateDate) | ||
| 558 | + .set(ReceiptLedgerInfo::getSecondCoordinateDate, coordinateDate) | ||
| 559 | + .eq(ReceiptLedgerInfo::getId, id); | ||
| 560 | + | ||
| 561 | + getBaseMapper().update(updateWrapper); | ||
| 562 | + } else if ("清欠".equals(debtStatus)) { | ||
| 563 | + if (data.getThirdCoordinateDate() == null) { | ||
| 564 | + LambdaUpdateWrapper<ReceiptLedgerInfo> updateWrapper = Wrappers.lambdaUpdate(ReceiptLedgerInfo.class) | ||
| 565 | + .set(ReceiptLedgerInfo::getCoordinateDate, coordinateDate) | ||
| 566 | + .set(ReceiptLedgerInfo::getThirdCoordinateDate, coordinateDate) | ||
| 567 | + .eq(ReceiptLedgerInfo::getId, id); | ||
| 568 | + | ||
| 569 | + getBaseMapper().update(updateWrapper); | ||
| 570 | + } else if (data.getFourthCoordinateDate() == null) { | ||
| 571 | + LambdaUpdateWrapper<ReceiptLedgerInfo> updateWrapper = Wrappers.lambdaUpdate(ReceiptLedgerInfo.class) | ||
| 572 | + .set(ReceiptLedgerInfo::getCoordinateDate, coordinateDate) | ||
| 573 | + .set(ReceiptLedgerInfo::getFourthCoordinateDate, coordinateDate) | ||
| 574 | + .eq(ReceiptLedgerInfo::getId, id); | ||
| 575 | + | ||
| 576 | + getBaseMapper().update(updateWrapper); | ||
| 577 | + } else if (data.getFifthCoordinateDate() == null) { | ||
| 578 | + LambdaUpdateWrapper<ReceiptLedgerInfo> updateWrapper = Wrappers.lambdaUpdate(ReceiptLedgerInfo.class) | ||
| 579 | + .set(ReceiptLedgerInfo::getCoordinateDate, coordinateDate) | ||
| 580 | + .set(ReceiptLedgerInfo::getFifthCoordinateDate, coordinateDate) | ||
| 581 | + .eq(ReceiptLedgerInfo::getId, id); | ||
| 582 | + | ||
| 583 | + getBaseMapper().update(updateWrapper); | ||
| 584 | + } | ||
| 585 | + } | ||
| 586 | + OpLogUtil.setVariable("id", data.getId()); | ||
| 587 | + OpLogUtil.setExtra(data.getId()); | ||
| 588 | + } | ||
| 540 | } | 589 | } |
| @@ -618,6 +618,17 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | @@ -618,6 +618,17 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | ||
| 618 | } | 618 | } |
| 619 | 619 | ||
| 620 | @Override | 620 | @Override |
| 621 | + public void batchUnblock(List<String> ids) { | ||
| 622 | + if (CollectionUtils.isEmpty(ids)) { | ||
| 623 | + return; | ||
| 624 | + } | ||
| 625 | + LambdaUpdateWrapper<PurchaseOrderInfo> updateWrapper = Wrappers.lambdaUpdate(PurchaseOrderInfo.class); | ||
| 626 | + updateWrapper.set(PurchaseOrderInfo::isFreeze, false) | ||
| 627 | + .in(PurchaseOrderInfo::getId, ids); | ||
| 628 | + getBaseMapper().update(updateWrapper); | ||
| 629 | + } | ||
| 630 | + | ||
| 631 | + @Override | ||
| 621 | public void cleanCacheByKey(Serializable key) { | 632 | public void cleanCacheByKey(Serializable key) { |
| 622 | 633 | ||
| 623 | } | 634 | } |
| @@ -7,6 +7,7 @@ import com.lframework.xingyun.sc.entity.ReceiptLedgerInfo; | @@ -7,6 +7,7 @@ import com.lframework.xingyun.sc.entity.ReceiptLedgerInfo; | ||
| 7 | import com.lframework.starter.web.core.service.BaseMpService; | 7 | import com.lframework.starter.web.core.service.BaseMpService; |
| 8 | import com.lframework.starter.web.core.components.resp.PageResult; | 8 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 9 | 9 | ||
| 10 | +import java.time.LocalDate; | ||
| 10 | import java.util.List; | 11 | import java.util.List; |
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| @@ -95,4 +96,13 @@ public interface ReceiptLedgerInfoService extends BaseMpService<ReceiptLedgerInf | @@ -95,4 +96,13 @@ public interface ReceiptLedgerInfoService extends BaseMpService<ReceiptLedgerInf | ||
| 95 | * @return PageResult<ReceiptLedgerReportBo> | 96 | * @return PageResult<ReceiptLedgerReportBo> |
| 96 | */ | 97 | */ |
| 97 | PageResult<ReceiptLedgerReportBo> report(Integer pageIndex, Integer pageSize, ReceiptLedgerReportVo vo); | 98 | PageResult<ReceiptLedgerReportBo> report(Integer pageIndex, Integer pageSize, ReceiptLedgerReportVo vo); |
| 99 | + | ||
| 100 | + /** | ||
| 101 | + * 更新协调办理日期 | ||
| 102 | + * | ||
| 103 | + * @param id 主键 | ||
| 104 | + * @param coordinateDate 协调办事日期 | ||
| 105 | + * @param debtStatus 清欠状态 | ||
| 106 | + */ | ||
| 107 | + void updateCoordinateDate(String id, LocalDate coordinateDate, String debtStatus); | ||
| 98 | } | 108 | } |
| @@ -139,4 +139,11 @@ public interface PurchaseOrderInfoService extends BaseMpService<PurchaseOrderInf | @@ -139,4 +139,11 @@ public interface PurchaseOrderInfoService extends BaseMpService<PurchaseOrderInf | ||
| 139 | * @return | 139 | * @return |
| 140 | */ | 140 | */ |
| 141 | PageResult<PurchaseOrderInfo> queryFreeze(Integer pageIndex, Integer pageSize, QueryPurchaseOrderInfoVo vo); | 141 | PageResult<PurchaseOrderInfo> queryFreeze(Integer pageIndex, Integer pageSize, QueryPurchaseOrderInfoVo vo); |
| 142 | + | ||
| 143 | + /** | ||
| 144 | + * 批量解封 | ||
| 145 | + * | ||
| 146 | + * @param ids | ||
| 147 | + */ | ||
| 148 | + void batchUnblock(List<String> ids); | ||
| 142 | } | 149 | } |
| @@ -23,6 +23,14 @@ public class CreateFundOrderingUnitDetailVo implements BaseVo, Serializable { | @@ -23,6 +23,14 @@ public class CreateFundOrderingUnitDetailVo implements BaseVo, Serializable { | ||
| 23 | private String fundOrderingUnitId; | 23 | private String fundOrderingUnitId; |
| 24 | 24 | ||
| 25 | /** | 25 | /** |
| 26 | + * 应收款台账ID | ||
| 27 | + */ | ||
| 28 | + @ApiModelProperty(value = "应收款台账ID", required = true) | ||
| 29 | + @NotBlank(message = "请输入应收款台账ID!") | ||
| 30 | + @Length(message = "应收款台账ID最多允许32个字符!") | ||
| 31 | + private String ledgerId; | ||
| 32 | + | ||
| 33 | + /** | ||
| 26 | * 发货日期 | 34 | * 发货日期 |
| 27 | */ | 35 | */ |
| 28 | @ApiModelProperty("发货日期") | 36 | @ApiModelProperty("发货日期") |
| @@ -39,4 +39,10 @@ public class QueryFundCoordinationVo extends PageVo implements BaseVo, Serializa | @@ -39,4 +39,10 @@ public class QueryFundCoordinationVo extends PageVo implements BaseVo, Serializa | ||
| 39 | @ApiModelProperty("客户简称") | 39 | @ApiModelProperty("客户简称") |
| 40 | private String shortName; | 40 | private String shortName; |
| 41 | 41 | ||
| 42 | + /** | ||
| 43 | + * 审核状态 | ||
| 44 | + */ | ||
| 45 | + @ApiModelProperty("审核状态") | ||
| 46 | + private String status; | ||
| 47 | + | ||
| 42 | } | 48 | } |
| @@ -39,6 +39,7 @@ | @@ -39,6 +39,7 @@ | ||
| 39 | <result column="marketing_center_supervisor_opinion" property="marketingCenterSupervisorOpinion"/> | 39 | <result column="marketing_center_supervisor_opinion" property="marketingCenterSupervisorOpinion"/> |
| 40 | <result column="general_manager" property="generalManager"/> | 40 | <result column="general_manager" property="generalManager"/> |
| 41 | <result column="general_manager_opinion" property="generalManagerOpinion"/> | 41 | <result column="general_manager_opinion" property="generalManagerOpinion"/> |
| 42 | + <result column="status" property="status"/> | ||
| 42 | <result column="create_by_id" property="createById"/> | 43 | <result column="create_by_id" property="createById"/> |
| 43 | <result column="create_by" property="createBy"/> | 44 | <result column="create_by" property="createBy"/> |
| 44 | <result column="update_by_id" property="updateById"/> | 45 | <result column="update_by_id" property="updateById"/> |
| @@ -85,6 +86,7 @@ | @@ -85,6 +86,7 @@ | ||
| 85 | tb.marketing_center_supervisor_opinion, | 86 | tb.marketing_center_supervisor_opinion, |
| 86 | tb.general_manager, | 87 | tb.general_manager, |
| 87 | tb.general_manager_opinion, | 88 | tb.general_manager_opinion, |
| 89 | + tb.status, | ||
| 88 | tb.create_by_id, | 90 | tb.create_by_id, |
| 89 | tb.create_by, | 91 | tb.create_by, |
| 90 | tb.update_by_id, | 92 | tb.update_by_id, |
| @@ -112,6 +114,9 @@ | @@ -112,6 +114,9 @@ | ||
| 112 | <if test="vo.shortName != null and vo.shortName != ''"> | 114 | <if test="vo.shortName != null and vo.shortName != ''"> |
| 113 | AND tb.customer_short_name LIKE CONCAT('%', #{vo.shortName}, '%') | 115 | AND tb.customer_short_name LIKE CONCAT('%', #{vo.shortName}, '%') |
| 114 | </if> | 116 | </if> |
| 117 | + <if test="vo.status != null and vo.status != ''"> | ||
| 118 | + AND tb.status = #{vo.status} | ||
| 119 | + </if> | ||
| 115 | </where> | 120 | </where> |
| 116 | ORDER BY tb.create_time DESC | 121 | ORDER BY tb.create_time DESC |
| 117 | </select> | 122 | </select> |
| @@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
| 5 | <resultMap id="FundOrderingUnitDetail" type="com.lframework.xingyun.sc.entity.FundOrderingUnitDetail"> | 5 | <resultMap id="FundOrderingUnitDetail" type="com.lframework.xingyun.sc.entity.FundOrderingUnitDetail"> |
| 6 | <id column="id" property="id"/> | 6 | <id column="id" property="id"/> |
| 7 | <result column="fund_ordering_unit_id" property="fundOrderingUnitId"/> | 7 | <result column="fund_ordering_unit_id" property="fundOrderingUnitId"/> |
| 8 | + <result column="ledger_id" property="ledgerId"/> | ||
| 8 | <result column="delivery_date" property="deliveryDate"/> | 9 | <result column="delivery_date" property="deliveryDate"/> |
| 9 | <result column="accounts_receivable" property="accountsReceivable"/> | 10 | <result column="accounts_receivable" property="accountsReceivable"/> |
| 10 | <result column="status" property="status"/> | 11 | <result column="status" property="status"/> |
| @@ -25,6 +26,7 @@ | @@ -25,6 +26,7 @@ | ||
| 25 | SELECT | 26 | SELECT |
| 26 | tb.id, | 27 | tb.id, |
| 27 | tb.fund_ordering_unit_id, | 28 | tb.fund_ordering_unit_id, |
| 29 | + tb.ledger_id, | ||
| 28 | tb.delivery_date, | 30 | tb.delivery_date, |
| 29 | tb.accounts_receivable, | 31 | tb.accounts_receivable, |
| 30 | tb.status, | 32 | tb.status, |
| @@ -56,6 +58,7 @@ | @@ -56,6 +58,7 @@ | ||
| 56 | INSERT INTO fund_ordering_unit_detail ( | 58 | INSERT INTO fund_ordering_unit_detail ( |
| 57 | id, | 59 | id, |
| 58 | fund_ordering_unit_id, | 60 | fund_ordering_unit_id, |
| 61 | + ledger_id, | ||
| 59 | delivery_date, | 62 | delivery_date, |
| 60 | accounts_receivable, | 63 | accounts_receivable, |
| 61 | status, | 64 | status, |
| @@ -75,6 +78,7 @@ | @@ -75,6 +78,7 @@ | ||
| 75 | ( | 78 | ( |
| 76 | #{item.id}, | 79 | #{item.id}, |
| 77 | #{item.fundOrderingUnitId}, | 80 | #{item.fundOrderingUnitId}, |
| 81 | + #{item.ledgerId}, | ||
| 78 | #{item.deliveryDate}, | 82 | #{item.deliveryDate}, |
| 79 | #{item.accountsReceivable}, | 83 | #{item.accountsReceivable}, |
| 80 | #{item.status}, | 84 | #{item.status}, |