Commit 00c9462570d6f4ef4c042917e7617cf523e35d6a

Authored by 杨鸣坤
2 parents 9240405f c85e23ea

Merge remote-tracking branch 'origin/master_0929' into master_0929

@@ -175,9 +175,15 @@ public class GetDraftRequestCarTicketBo extends BaseBo<DraftRequestCarTicket> { @@ -175,9 +175,15 @@ public class GetDraftRequestCarTicketBo extends BaseBo<DraftRequestCarTicket> {
175 /** 175 /**
176 * 是否展示审核按钮 176 * 是否展示审核按钮
177 */ 177 */
178 - @TableField(exist = false) 178 + @ApiModelProperty("是否展示审核按钮")
179 private boolean showExamine; 179 private boolean showExamine;
180 180
  181 + /**
  182 + * 来源
  183 + */
  184 + @ApiModelProperty("来源")
  185 + private String source;
  186 +
181 public GetDraftRequestCarTicketBo() { 187 public GetDraftRequestCarTicketBo() {
182 188
183 } 189 }
@@ -154,6 +154,11 @@ public class DraftRequestCarTicket extends BaseEntity implements BaseDto { @@ -154,6 +154,11 @@ public class DraftRequestCarTicket extends BaseEntity implements BaseDto {
154 private String status; 154 private String status;
155 155
156 /** 156 /**
  157 + * 来源
  158 + */
  159 + private String source;
  160 +
  161 + /**
157 * 是否展示审核按钮 162 * 是否展示审核按钮
158 */ 163 */
159 @TableField(exist = false) 164 @TableField(exist = false)
@@ -19,6 +19,7 @@ import com.lframework.xingyun.sc.service.customer.CustomerCreditService; @@ -19,6 +19,7 @@ import com.lframework.xingyun.sc.service.customer.CustomerCreditService;
19 import com.lframework.xingyun.sc.service.customer.CustomerDevelopPlanService; 19 import com.lframework.xingyun.sc.service.customer.CustomerDevelopPlanService;
20 import com.lframework.xingyun.sc.service.order.*; 20 import com.lframework.xingyun.sc.service.order.*;
21 import com.lframework.xingyun.sc.service.purchase.ReplenishmentOrderService; 21 import com.lframework.xingyun.sc.service.purchase.ReplenishmentOrderService;
  22 +import com.lframework.xingyun.sc.service.shipments.car.CarRequestPlanService;
22 import com.lframework.xingyun.sc.service.shipments.car.RequestCarTicketService; 23 import com.lframework.xingyun.sc.service.shipments.car.RequestCarTicketService;
23 import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService; 24 import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService;
24 import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentDetailService; 25 import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentDetailService;
@@ -27,6 +28,8 @@ import com.lframework.xingyun.sc.vo.customer.credit.QueryCorePersonnelHistoryVo; @@ -27,6 +28,8 @@ import com.lframework.xingyun.sc.vo.customer.credit.QueryCorePersonnelHistoryVo;
27 import com.lframework.xingyun.sc.vo.customer.credit.UpdateCustomerCreditVo; 28 import com.lframework.xingyun.sc.vo.customer.credit.UpdateCustomerCreditVo;
28 import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderLineVo; 29 import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderLineVo;
29 import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderRevokeLineVo; 30 import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderRevokeLineVo;
  31 +import com.lframework.xingyun.sc.vo.shipments.car.CreateCarRequestPlanVo;
  32 +import com.lframework.xingyun.sc.vo.shipments.car.CreateRequestCarTicketVo;
30 import com.lframework.xingyun.sc.vo.shipments.delay.QueryDelayedShipmentDetailVo; 33 import com.lframework.xingyun.sc.vo.shipments.delay.QueryDelayedShipmentDetailVo;
31 import lombok.extern.slf4j.Slf4j; 34 import lombok.extern.slf4j.Slf4j;
32 import org.apache.commons.collections.CollectionUtils; 35 import org.apache.commons.collections.CollectionUtils;
@@ -39,6 +42,7 @@ import org.springframework.stereotype.Component; @@ -39,6 +42,7 @@ import org.springframework.stereotype.Component;
39 42
40 import javax.annotation.Resource; 43 import javax.annotation.Resource;
41 import java.math.BigDecimal; 44 import java.math.BigDecimal;
  45 +import java.time.LocalDate;
42 import java.util.ArrayList; 46 import java.util.ArrayList;
43 import java.util.List; 47 import java.util.List;
44 import java.util.Map; 48 import java.util.Map;
@@ -86,6 +90,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic @@ -86,6 +90,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic
86 private DelayedShipmentService delayedShipmentService; 90 private DelayedShipmentService delayedShipmentService;
87 @Resource 91 @Resource
88 private DelayedShipmentDetailService delayedShipmentDetailService; 92 private DelayedShipmentDetailService delayedShipmentDetailService;
  93 + @Resource
  94 + private CarRequestPlanService carRequestPlanService;
89 95
90 96
91 97
@@ -439,6 +445,18 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic @@ -439,6 +445,18 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic
439 draftRequestCarTicketService.updateStatus(businessId, "PASS"); 445 draftRequestCarTicketService.updateStatus(businessId, "PASS");
440 //更新外办审核人 446 //更新外办审核人
441 draftRequestCarTicketService.updateExamineUser(businessId, SecurityUtil.getCurrentUser().getId(), null, null); 447 draftRequestCarTicketService.updateExamineUser(businessId, SecurityUtil.getCurrentUser().getId(), null, null);
  448 + //如果是发货计划生成的草稿要车单-需要生成要车单和要车计划
  449 + DraftRequestCarTicket draftRequestCarTicket = draftRequestCarTicketService.findById(businessId);
  450 + if (StringUtils.isNotEmpty(draftRequestCarTicket.getSource()) && "SHIPMENTSPLAN".equals(draftRequestCarTicket.getSource())) {
  451 + // 生成要车计划
  452 + CreateCarRequestPlanVo planCreateVo = new CreateCarRequestPlanVo();
  453 + planCreateVo.setRequestCarDate(LocalDate.now());
  454 + planCreateVo.setWorkshopId(draftRequestCarTicket.getWorkshopId());
  455 + String requestCarPlanId = carRequestPlanService.create(planCreateVo);
  456 + // 生成要车单
  457 + CreateRequestCarTicketVo ticketCreateVo = packRequestCarTicket(draftRequestCarTicket,requestCarPlanId);
  458 + requestCarTicketService.create(ticketCreateVo);
  459 + }
442 } else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus) 460 } else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus)
443 || FlowInstanceStatus.REFUSE.getCode().equals(flowStatus) 461 || FlowInstanceStatus.REFUSE.getCode().equals(flowStatus)
444 || FlowInstanceStatus.TERMINATION.getCode().equals(flowStatus)) { 462 || FlowInstanceStatus.TERMINATION.getCode().equals(flowStatus)) {
@@ -448,6 +466,35 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic @@ -448,6 +466,35 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic
448 } 466 }
449 } 467 }
450 468
  469 + /**
  470 + * 封装要车单数据
  471 + *
  472 + * @param draftRequestCarTicket 草稿要车单
  473 + * @return CreateRequestCarTicketVo
  474 + */
  475 + private CreateRequestCarTicketVo packRequestCarTicket(DraftRequestCarTicket draftRequestCarTicket, String requestCarPlanId) {
  476 + CreateRequestCarTicketVo ticketVo = new CreateRequestCarTicketVo();
  477 + PurchaseOrderInfo orderInfo = purchaseOrderInfoService.findById(draftRequestCarTicket.getId());
  478 + ticketVo.setDraftId(draftRequestCarTicket.getId());
  479 + ticketVo.setPlanId(requestCarPlanId);
  480 + ticketVo.setPurchaseOrderId(draftRequestCarTicket.getPurchaseOrderId());
  481 + ticketVo.setRequestCarDate(LocalDate.now());
  482 + ticketVo.setDeptId(draftRequestCarTicket.getDeptId());
  483 + ticketVo.setDeliveryDate(draftRequestCarTicket.getDeliveryDate());
  484 + ticketVo.setWorkshopId(draftRequestCarTicket.getWorkshopId());
  485 + ticketVo.setOrderNo(draftRequestCarTicket.getOrderNo());
  486 + ticketVo.setOrderingUnit(draftRequestCarTicket.getOrderingUnit());
  487 + if (orderInfo.getTotalQuantity() != null) {
  488 + BigDecimal result = orderInfo.getTotalQuantity().divide(new BigDecimal(1000), 4, BigDecimal.ROUND_HALF_UP);
  489 + ticketVo.setQuantity(result);
  490 + }
  491 + //外办审核人(草稿要车单审核人)
  492 + ticketVo.setExternalAuditor(SecurityUtil.getCurrentUser().getId());
  493 + //经营办审核人(发货计划提交人)
  494 + ticketVo.setBusinessOfficeAuditor(draftRequestCarTicket.getBusinessOfficeAuditor());
  495 + return ticketVo;
  496 + }
  497 +
451 private void handleDelayedShipmentData(String flowStatus, String businessId) { 498 private void handleDelayedShipmentData(String flowStatus, String businessId) {
452 if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus) 499 if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus)
453 || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) { 500 || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) {
@@ -33,6 +33,7 @@ import com.lframework.xingyun.sc.vo.shipments.car.CreateCarRequestPlanVo; @@ -33,6 +33,7 @@ import com.lframework.xingyun.sc.vo.shipments.car.CreateCarRequestPlanVo;
33 import com.lframework.xingyun.sc.vo.shipments.car.CreateDraftRequestCarTicketVo; 33 import com.lframework.xingyun.sc.vo.shipments.car.CreateDraftRequestCarTicketVo;
34 import com.lframework.xingyun.sc.vo.shipments.car.CreateRequestCarTicketVo; 34 import com.lframework.xingyun.sc.vo.shipments.car.CreateRequestCarTicketVo;
35 import com.lframework.xingyun.sc.vo.shipments.order.*; 35 import com.lframework.xingyun.sc.vo.shipments.order.*;
  36 +import com.lframework.xingyun.sc.vo.shipments.plan.QueryShipmentsPlanDetailVo;
36 import lombok.extern.slf4j.Slf4j; 37 import lombok.extern.slf4j.Slf4j;
37 import org.apache.commons.collections4.CollectionUtils; 38 import org.apache.commons.collections4.CollectionUtils;
38 import org.apache.commons.lang3.StringUtils; 39 import org.apache.commons.lang3.StringUtils;
@@ -260,7 +261,9 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr @@ -260,7 +261,9 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr
260 if (CollectionUtils.isEmpty(planDetailIds)) { 261 if (CollectionUtils.isEmpty(planDetailIds)) {
261 throw new DefaultClientException("发货明细id不能为空!"); 262 throw new DefaultClientException("发货明细id不能为空!");
262 } 263 }
263 - List<ShipmentsPlanDetail> detailList = shipmentsPlanDetailService.listByIds(planDetailIds); 264 + QueryShipmentsPlanDetailVo planDetailVo = new QueryShipmentsPlanDetailVo();
  265 + planDetailVo.setIds(planDetailIds);
  266 + List<ShipmentsPlanDetail> detailList = shipmentsPlanDetailService.query(planDetailVo);
264 if (CollectionUtils.isEmpty(detailList)) { 267 if (CollectionUtils.isEmpty(detailList)) {
265 throw new DefaultClientException("发货明细数据不存在!"); 268 throw new DefaultClientException("发货明细数据不存在!");
266 } 269 }
@@ -526,7 +529,8 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr @@ -526,7 +529,8 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr
526 planCreateVo.setWorkshopId(orderInfo.getWorkshopId()); 529 planCreateVo.setWorkshopId(orderInfo.getWorkshopId());
527 String requestCarPlanId = carRequestPlanService.create(planCreateVo); 530 String requestCarPlanId = carRequestPlanService.create(planCreateVo);
528 // 生成要车单 531 // 生成要车单
529 - CreateRequestCarTicketVo ticketCreateVo = packRequestCarTicket(orderInfo, requestCarPlanId, draftTicket.getId(), plan.getTomoPreShipDate()); 532 + CreateRequestCarTicketVo ticketCreateVo = packRequestCarTicket(orderInfo, requestCarPlanId,
  533 + draftTicket.getId(), plan.getTomoPreShipDate(), draftTicket.getExternalAuditor());
530 requestCarTicketService.create(ticketCreateVo); 534 requestCarTicketService.create(ticketCreateVo);
531 } else { 535 } else {
532 throw new DefaultClientException("请先补充草稿要车单数据!"); 536 throw new DefaultClientException("请先补充草稿要车单数据!");
@@ -554,6 +558,10 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr @@ -554,6 +558,10 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr
554 BigDecimal result = orderInfo.getTotalQuantity().divide(new BigDecimal(1000), 4, BigDecimal.ROUND_HALF_UP); 558 BigDecimal result = orderInfo.getTotalQuantity().divide(new BigDecimal(1000), 4, BigDecimal.ROUND_HALF_UP);
555 draftTicketVo.setQuantity(result); 559 draftTicketVo.setQuantity(result);
556 } 560 }
  561 + //经营办审核人(发货计划提交人)
  562 + draftTicketVo.setBusinessOfficeAuditor(SecurityUtil.getCurrentUser().getId());
  563 + //发货计划
  564 + draftTicketVo.setSource("SHIPMENTSPLAN");
557 return draftTicketVo; 565 return draftTicketVo;
558 } 566 }
559 567
@@ -561,12 +569,13 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr @@ -561,12 +569,13 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr
561 * 封装要车单数据 569 * 封装要车单数据
562 * 570 *
563 * @param orderInfo 订货单数据 571 * @param orderInfo 订货单数据
564 - * @return CreateRequestCarTicketVo 572 + * @return CreateRequestCarTicketVo
565 */ 573 */
566 - private CreateRequestCarTicketVo packRequestCarTicket(PurchaseOrderInfo orderInfo, String planId, String draftId, LocalDate shipmentsDate) { 574 + private CreateRequestCarTicketVo packRequestCarTicket(PurchaseOrderInfo orderInfo, String planId, String draftId,
  575 + LocalDate shipmentsDate, String externalAuditor) {
567 CreateRequestCarTicketVo ticketVo = new CreateRequestCarTicketVo(); 576 CreateRequestCarTicketVo ticketVo = new CreateRequestCarTicketVo();
568 ticketVo.setDraftId(draftId); 577 ticketVo.setDraftId(draftId);
569 - ticketVo.setPlanId(draftId); 578 + ticketVo.setPlanId(planId);
570 ticketVo.setPurchaseOrderId(orderInfo.getId()); 579 ticketVo.setPurchaseOrderId(orderInfo.getId());
571 ticketVo.setRequestCarDate(LocalDate.now()); 580 ticketVo.setRequestCarDate(LocalDate.now());
572 ticketVo.setDeptId(orderInfo.getDeptId()); 581 ticketVo.setDeptId(orderInfo.getDeptId());
@@ -578,6 +587,10 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr @@ -578,6 +587,10 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr
578 BigDecimal result = orderInfo.getTotalQuantity().divide(new BigDecimal(1000), 4, BigDecimal.ROUND_HALF_UP); 587 BigDecimal result = orderInfo.getTotalQuantity().divide(new BigDecimal(1000), 4, BigDecimal.ROUND_HALF_UP);
579 ticketVo.setQuantity(result); 588 ticketVo.setQuantity(result);
580 } 589 }
  590 + //外办审核人(草稿要车单审核人)
  591 + ticketVo.setExternalAuditor(externalAuditor);
  592 + //经营办审核人(发货计划提交人)
  593 + ticketVo.setBusinessOfficeAuditor(SecurityUtil.getCurrentUser().getId());
581 return ticketVo; 594 return ticketVo;
582 } 595 }
583 } 596 }
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; @@ -4,6 +4,7 @@ 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.common.utils.CollectionUtil;
  7 +import com.lframework.starter.web.core.components.security.SecurityUtil;
7 import com.lframework.starter.web.core.impl.BaseMpServiceImpl; 8 import com.lframework.starter.web.core.impl.BaseMpServiceImpl;
8 import com.lframework.starter.web.core.utils.PageResultUtil; 9 import com.lframework.starter.web.core.utils.PageResultUtil;
9 import com.lframework.starter.web.core.components.resp.PageResult; 10 import com.lframework.starter.web.core.components.resp.PageResult;
@@ -18,22 +19,26 @@ import com.lframework.starter.web.core.utils.PageHelperUtil; @@ -18,22 +19,26 @@ import com.lframework.starter.web.core.utils.PageHelperUtil;
18 import com.lframework.starter.common.utils.Assert; 19 import com.lframework.starter.common.utils.Assert;
19 import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; 20 import com.lframework.starter.web.inner.components.oplog.OtherOpLogType;
20 import com.lframework.xingyun.sc.entity.CarRequestPlan; 21 import com.lframework.xingyun.sc.entity.CarRequestPlan;
  22 +import com.lframework.xingyun.sc.entity.RequestCarTicket;
21 import com.lframework.xingyun.sc.mappers.CarRequestPlanMapper; 23 import com.lframework.xingyun.sc.mappers.CarRequestPlanMapper;
22 import com.lframework.xingyun.sc.service.shipments.car.CarRequestPlanService; 24 import com.lframework.xingyun.sc.service.shipments.car.CarRequestPlanService;
  25 +import com.lframework.xingyun.sc.service.shipments.car.RequestCarTicketService;
23 import com.lframework.xingyun.sc.vo.shipments.car.CreateCarRequestPlanVo; 26 import com.lframework.xingyun.sc.vo.shipments.car.CreateCarRequestPlanVo;
24 import com.lframework.xingyun.sc.vo.shipments.car.QueryCarRequestPlanVo; 27 import com.lframework.xingyun.sc.vo.shipments.car.QueryCarRequestPlanVo;
  28 +import com.lframework.xingyun.sc.vo.shipments.car.QueryRequestCarTicketVo;
25 import com.lframework.xingyun.sc.vo.shipments.car.UpdateCarRequestPlanVo; 29 import com.lframework.xingyun.sc.vo.shipments.car.UpdateCarRequestPlanVo;
26 import org.springframework.transaction.annotation.Transactional; 30 import org.springframework.transaction.annotation.Transactional;
27 import org.springframework.stereotype.Service; 31 import org.springframework.stereotype.Service;
28 -  
29 -import java.text.SimpleDateFormat; 32 +import javax.annotation.Resource;
30 import java.time.LocalDate; 33 import java.time.LocalDate;
31 import java.time.format.DateTimeFormatter; 34 import java.time.format.DateTimeFormatter;
32 -import java.util.Date;  
33 import java.util.List; 35 import java.util.List;
  36 +import java.util.stream.Collectors;
34 37
35 @Service 38 @Service
36 public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanMapper, CarRequestPlan> implements CarRequestPlanService { 39 public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanMapper, CarRequestPlan> implements CarRequestPlanService {
  40 + @Resource
  41 + private RequestCarTicketService requestCarTicketService;
37 42
38 @Override 43 @Override
39 public PageResult<CarRequestPlan> query(Integer pageIndex, Integer pageSize, QueryCarRequestPlanVo vo) { 44 public PageResult<CarRequestPlan> query(Integer pageIndex, Integer pageSize, QueryCarRequestPlanVo vo) {
@@ -115,6 +120,18 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM @@ -115,6 +120,18 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM
115 120
116 getBaseMapper().update(updateWrapper); 121 getBaseMapper().update(updateWrapper);
117 122
  123 + //更新要车单运作科审核人
  124 + QueryRequestCarTicketVo vo1 = new QueryRequestCarTicketVo();
  125 + vo1.setPlanId(vo.getId());
  126 + List<RequestCarTicket> query = requestCarTicketService.query(vo1);
  127 + if (CollectionUtil.isNotEmpty(query)) {
  128 + List<String> ids = query.stream()
  129 + .map(RequestCarTicket::getId)
  130 + .collect(Collectors.toList());
  131 + String currentUserId = SecurityUtil.getCurrentUser().getId();
  132 + requestCarTicketService.updateExamineUserBatch(ids, null, null, currentUserId);
  133 + }
  134 +
118 OpLogUtil.setVariable("id", data.getId()); 135 OpLogUtil.setVariable("id", data.getId());
119 OpLogUtil.setExtra(vo); 136 OpLogUtil.setExtra(vo);
120 } 137 }
@@ -157,6 +157,9 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq @@ -157,6 +157,9 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq
157 } else { 157 } else {
158 data.setStatus("AUDIT"); 158 data.setStatus("AUDIT");
159 } 159 }
  160 + if (!StringUtil.isBlank(vo.getSource())) {
  161 + data.setSource(vo.getSource());
  162 + }
160 163
161 getBaseMapper().insert(data); 164 getBaseMapper().insert(data);
162 165
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; @@ -4,6 +4,7 @@ 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.service.FlowInstanceWrapperService; 6 import com.lframework.starter.bpm.service.FlowInstanceWrapperService;
  7 +import com.lframework.starter.common.utils.CollectionUtil;
7 import com.lframework.starter.web.core.impl.BaseMpServiceImpl; 8 import com.lframework.starter.web.core.impl.BaseMpServiceImpl;
8 import com.lframework.starter.web.core.utils.PageResultUtil; 9 import com.lframework.starter.web.core.utils.PageResultUtil;
9 import com.lframework.starter.web.core.components.resp.PageResult; 10 import com.lframework.starter.web.core.components.resp.PageResult;
@@ -197,19 +198,15 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic @@ -197,19 +198,15 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic
197 OpLogUtil.setExtra(id); 198 OpLogUtil.setExtra(id);
198 } 199 }
199 200
200 - @OpLog(type = OtherOpLogType.class, name = "更新要车单审核人,ID:{}", params = {"#id"}) 201 + @OpLog(type = OtherOpLogType.class, name = "批量更新要车单审核人,ID:{}", params = {"#id"})
201 @Transactional(rollbackFor = Exception.class) 202 @Transactional(rollbackFor = Exception.class)
202 @Override 203 @Override
203 - public void updateExamineUser(String id, String externalAuditor, String businessOfficeAuditor, String operationsDepartmentAuditor) {  
204 - if (StringUtils.isBlank(id)) { 204 + public void updateExamineUserBatch(List<String> ids, String externalAuditor, String businessOfficeAuditor, String operationsDepartmentAuditor) {
  205 + if (CollectionUtil.isEmpty(ids)) {
205 return; 206 return;
206 } 207 }
207 - RequestCarTicket data = getBaseMapper().findById(id);  
208 - if (ObjectUtil.isNull(data)) {  
209 - throw new DefaultClientException("要车单不存在!");  
210 - }  
211 LambdaUpdateWrapper<RequestCarTicket> updateWrapper = Wrappers.lambdaUpdate(RequestCarTicket.class) 208 LambdaUpdateWrapper<RequestCarTicket> updateWrapper = Wrappers.lambdaUpdate(RequestCarTicket.class)
212 - .eq(RequestCarTicket::getId, id); 209 + .in(RequestCarTicket::getId, ids);
213 if (externalAuditor != null) { 210 if (externalAuditor != null) {
214 updateWrapper.set(RequestCarTicket::getExternalAuditor, externalAuditor); 211 updateWrapper.set(RequestCarTicket::getExternalAuditor, externalAuditor);
215 } 212 }
@@ -222,8 +219,8 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic @@ -222,8 +219,8 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic
222 219
223 getBaseMapper().update(updateWrapper); 220 getBaseMapper().update(updateWrapper);
224 221
225 - OpLogUtil.setVariable("id", data.getId());  
226 - OpLogUtil.setExtra(id); 222 + OpLogUtil.setVariable("id", ids);
  223 + OpLogUtil.setExtra(ids);
227 } 224 }
228 225
229 @OpLog(type = OtherOpLogType.class, name = "删除要车单表,ID:{}", params = {"#id"}) 226 @OpLog(type = OtherOpLogType.class, name = "删除要车单表,ID:{}", params = {"#id"})
@@ -57,12 +57,12 @@ public interface RequestCarTicketService extends BaseMpService<RequestCarTicket> @@ -57,12 +57,12 @@ public interface RequestCarTicketService extends BaseMpService<RequestCarTicket>
57 /** 57 /**
58 * 更新审核人 58 * 更新审核人
59 * 59 *
60 - * @param id 主键  
61 - * @param externalAuditor 外办审核人  
62 - * @param businessOfficeAuditor 经营办审核人 60 + * @param ids 主键集合
  61 + * @param externalAuditor 外办审核人
  62 + * @param businessOfficeAuditor 经营办审核人
63 * @param operationsDepartmentAuditor 运作科审核人 63 * @param operationsDepartmentAuditor 运作科审核人
64 */ 64 */
65 - void updateExamineUser(String id, String externalAuditor, String businessOfficeAuditor, String operationsDepartmentAuditor); 65 + void updateExamineUserBatch(List<String> ids, String externalAuditor, String businessOfficeAuditor, String operationsDepartmentAuditor);
66 66
67 /** 67 /**
68 * 根据ID删除 68 * 根据ID删除
@@ -130,4 +130,10 @@ public class CreateDraftRequestCarTicketVo implements BaseVo, Serializable { @@ -130,4 +130,10 @@ public class CreateDraftRequestCarTicketVo implements BaseVo, Serializable {
130 @ApiModelProperty("审核状态") 130 @ApiModelProperty("审核状态")
131 private String status; 131 private String status;
132 132
  133 + /**
  134 + * 来源
  135 + */
  136 + @ApiModelProperty("来源")
  137 + private String source;
  138 +
133 } 139 }
@@ -15,6 +15,12 @@ public class QueryShipmentsPlanDetailVo extends PageVo implements BaseVo, Serial @@ -15,6 +15,12 @@ public class QueryShipmentsPlanDetailVo extends PageVo implements BaseVo, Serial
15 private static final long serialVersionUID = 1L; 15 private static final long serialVersionUID = 1L;
16 16
17 /** 17 /**
  18 + * ID集合
  19 + */
  20 + @ApiModelProperty("ID集合")
  21 + private List<String> ids;
  22 +
  23 + /**
18 * 发货计划ID 24 * 发货计划ID
19 */ 25 */
20 @ApiModelProperty("发货计划ID") 26 @ApiModelProperty("发货计划ID")
@@ -86,6 +86,12 @@ @@ -86,6 +86,12 @@
86 <if test="vo.shipmentsDate != null"> 86 <if test="vo.shipmentsDate != null">
87 AND tb.shipments_date = #{vo.shipmentsDate} 87 AND tb.shipments_date = #{vo.shipmentsDate}
88 </if> 88 </if>
  89 + <if test="vo.ids != null and vo.ids.size() > 0">
  90 + AND tb.id in
  91 + <foreach collection="vo.ids" open="(" separator="," close=")" item="item">
  92 + #{item}
  93 + </foreach>
  94 + </if>
89 <if test="vo.completed != null"> 95 <if test="vo.completed != null">
90 <choose> 96 <choose>
91 <when test="vo.completed == true"> 97 <when test="vo.completed == true">
@@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
27 <result column="operations_department_auditor" property="operationsDepartmentAuditor"/> 27 <result column="operations_department_auditor" property="operationsDepartmentAuditor"/>
28 <result column="operations_department_auditor_name" property="operationsDepartmentAuditorName"/> 28 <result column="operations_department_auditor_name" property="operationsDepartmentAuditorName"/>
29 <result column="status" property="status"/> 29 <result column="status" property="status"/>
  30 + <result column="source" property="source"/>
30 <result column="create_by_id" property="createById"/> 31 <result column="create_by_id" property="createById"/>
31 <result column="create_by" property="createBy"/> 32 <result column="create_by" property="createBy"/>
32 <result column="update_by_id" property="updateById"/> 33 <result column="update_by_id" property="updateById"/>
@@ -61,6 +62,7 @@ @@ -61,6 +62,7 @@
61 tb.operations_department_auditor, 62 tb.operations_department_auditor,
62 su2.name AS operations_department_auditor_name, 63 su2.name AS operations_department_auditor_name,
63 tb.status, 64 tb.status,
  65 + tb.source,
64 tb.create_by_id, 66 tb.create_by_id,
65 tb.create_by, 67 tb.create_by,
66 tb.update_by_id, 68 tb.update_by_id,