Commit 55489fa962fd7af34ecd68a1f2eeb804f6c2091e
1 parent
7daf9de0
1:订货单、撤销单、规格变更单查询接口增加合同类型方便前端判断单位是元还是美元 2:合同锁规可以编辑备注 3:订单明细报表赋值订单类型 经销标准合同-经销 经销…
…库存、外贸库存合同-库存已锁价、库存未锁价 经销未锁规、外贸未锁规合同-未锁规、已锁规 加工标准合同-加工 外贸标准合同-外贸
Showing
12 changed files
with
118 additions
and
4 deletions
| @@ -409,7 +409,7 @@ CREATE TABLE IF NOT EXISTS `tbl_purchase_order_revoke_line` | @@ -409,7 +409,7 @@ CREATE TABLE IF NOT EXISTS `tbl_purchase_order_revoke_line` | ||
| 409 | `length_tol_neg` decimal(10, 4) DEFAULT NULL COMMENT '长度公差负', | 409 | `length_tol_neg` decimal(10, 4) DEFAULT NULL COMMENT '长度公差负', |
| 410 | `status` varchar(50) DEFAULT NULL COMMENT '状态', | 410 | `status` varchar(50) DEFAULT NULL COMMENT '状态', |
| 411 | `quantity` decimal(15, 4) NOT NULL COMMENT '原数量kg', | 411 | `quantity` decimal(15, 4) NOT NULL COMMENT '原数量kg', |
| 412 | - `sales_price` decimal(15, 4) NOT NULL COMMENT '销售价格', | 412 | + `sales_price` decimal(15, 4) DEFAULT NULL COMMENT '销售价格', |
| 413 | `delivery_date` date DEFAULT NULL COMMENT '发货日期', | 413 | `delivery_date` date DEFAULT NULL COMMENT '发货日期', |
| 414 | `revoke_quantity` decimal(15, 4) DEFAULT NULL COMMENT '撤销数量', | 414 | `revoke_quantity` decimal(15, 4) DEFAULT NULL COMMENT '撤销数量', |
| 415 | `show_order` int DEFAULT '0' COMMENT '排序', | 415 | `show_order` int DEFAULT '0' COMMENT '排序', |
| @@ -145,6 +145,12 @@ public class GetPurchaseOrderRevokeBo extends BaseBo<PurchaseOrderRevoke> { | @@ -145,6 +145,12 @@ public class GetPurchaseOrderRevokeBo extends BaseBo<PurchaseOrderRevoke> { | ||
| 145 | @ApiModelProperty("订货单撤销表物料行") | 145 | @ApiModelProperty("订货单撤销表物料行") |
| 146 | private List<PurchaseOrderRevokeLine> purchaseOrderRevokeLineList; | 146 | private List<PurchaseOrderRevokeLine> purchaseOrderRevokeLineList; |
| 147 | 147 | ||
| 148 | + /** | ||
| 149 | + * 合同类型 | ||
| 150 | + */ | ||
| 151 | + @ApiModelProperty("合同类型") | ||
| 152 | + private String contractType; | ||
| 153 | + | ||
| 148 | public GetPurchaseOrderRevokeBo() { | 154 | public GetPurchaseOrderRevokeBo() { |
| 149 | 155 | ||
| 150 | } | 156 | } |
| @@ -260,6 +260,12 @@ public class OrderChangeRecordBo extends BaseBo<OrderInfoChangeRecord> { | @@ -260,6 +260,12 @@ public class OrderChangeRecordBo extends BaseBo<OrderInfoChangeRecord> { | ||
| 260 | @ApiModelProperty("是否是变更发起人") | 260 | @ApiModelProperty("是否是变更发起人") |
| 261 | private Boolean changeCreateBy; | 261 | private Boolean changeCreateBy; |
| 262 | 262 | ||
| 263 | + /** | ||
| 264 | + * 合同类型 | ||
| 265 | + */ | ||
| 266 | + @ApiModelProperty("合同类型") | ||
| 267 | + private String contractType; | ||
| 268 | + | ||
| 263 | 269 | ||
| 264 | public OrderChangeRecordBo() { | 270 | public OrderChangeRecordBo() { |
| 265 | 271 |
| @@ -152,6 +152,12 @@ public class GetReplenishmentOrderBo extends BaseBo<ReplenishmentOrder> { | @@ -152,6 +152,12 @@ public class GetReplenishmentOrderBo extends BaseBo<ReplenishmentOrder> { | ||
| 152 | @ApiModelProperty("补货单物料行") | 152 | @ApiModelProperty("补货单物料行") |
| 153 | private List<GetReplenishmentOrderLineBo> replenishmentOrderLineList; | 153 | private List<GetReplenishmentOrderLineBo> replenishmentOrderLineList; |
| 154 | 154 | ||
| 155 | + /** | ||
| 156 | + * 合同类型 | ||
| 157 | + */ | ||
| 158 | + @ApiModelProperty("合同类型") | ||
| 159 | + private String contractType; | ||
| 160 | + | ||
| 155 | public GetReplenishmentOrderBo() { | 161 | public GetReplenishmentOrderBo() { |
| 156 | 162 | ||
| 157 | } | 163 | } |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/order/OrderChangeRecordController.java
| @@ -5,9 +5,13 @@ import com.lframework.starter.web.core.annotations.security.HasPermission; | @@ -5,9 +5,13 @@ import com.lframework.starter.web.core.annotations.security.HasPermission; | ||
| 5 | import com.lframework.starter.web.core.controller.DefaultBaseController; | 5 | import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 6 | import com.lframework.starter.web.core.utils.JsonUtil; | 6 | import com.lframework.starter.web.core.utils.JsonUtil; |
| 7 | import com.lframework.xingyun.sc.bo.order.change.OrderChangeRecordBo; | 7 | import com.lframework.xingyun.sc.bo.order.change.OrderChangeRecordBo; |
| 8 | +import com.lframework.xingyun.sc.entity.ContractDistributorStandard; | ||
| 8 | import com.lframework.xingyun.sc.entity.OrderInfoChangeRecord; | 9 | import com.lframework.xingyun.sc.entity.OrderInfoChangeRecord; |
| 10 | +import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; | ||
| 9 | import com.lframework.xingyun.sc.entity.PurchaseOrderLine; | 11 | import com.lframework.xingyun.sc.entity.PurchaseOrderLine; |
| 10 | import com.lframework.xingyun.sc.enums.OrderSpecChangeStatus; | 12 | import com.lframework.xingyun.sc.enums.OrderSpecChangeStatus; |
| 13 | +import com.lframework.xingyun.sc.service.contract.ContractDistributorStandardService; | ||
| 14 | +import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | ||
| 11 | import com.lframework.xingyun.sc.utils.ExcelUtil; | 15 | import com.lframework.xingyun.sc.utils.ExcelUtil; |
| 12 | import com.lframework.xingyun.sc.utils.LatexFormulaExcelExporterUtil; | 16 | import com.lframework.xingyun.sc.utils.LatexFormulaExcelExporterUtil; |
| 13 | import com.lframework.xingyun.sc.utils.ResponseUtil; | 17 | import com.lframework.xingyun.sc.utils.ResponseUtil; |
| @@ -60,6 +64,10 @@ public class OrderChangeRecordController extends DefaultBaseController { | @@ -60,6 +64,10 @@ public class OrderChangeRecordController extends DefaultBaseController { | ||
| 60 | 64 | ||
| 61 | @Resource | 65 | @Resource |
| 62 | private OrderChangeRecordService orderChangeRecordService; | 66 | private OrderChangeRecordService orderChangeRecordService; |
| 67 | + @Resource | ||
| 68 | + private PurchaseOrderInfoService purchaseOrderInfoService; | ||
| 69 | + @Resource | ||
| 70 | + private ContractDistributorStandardService contractDistributorStandardService; | ||
| 63 | 71 | ||
| 64 | /** | 72 | /** |
| 65 | * 查询列表 | 73 | * 查询列表 |
| @@ -90,6 +98,16 @@ public class OrderChangeRecordController extends DefaultBaseController { | @@ -90,6 +98,16 @@ public class OrderChangeRecordController extends DefaultBaseController { | ||
| 90 | throw new DefaultClientException("订货单变更记录不存在!"); | 98 | throw new DefaultClientException("订货单变更记录不存在!"); |
| 91 | } | 99 | } |
| 92 | OrderChangeRecordBo result = new OrderChangeRecordBo(data); | 100 | OrderChangeRecordBo result = new OrderChangeRecordBo(data); |
| 101 | + PurchaseOrderInfo purchaseOrderInfo = purchaseOrderInfoService.findById(result.getOrderId()); | ||
| 102 | + if (purchaseOrderInfo != null) { | ||
| 103 | + String contractId = purchaseOrderInfo.getContractId(); | ||
| 104 | + if (StringUtils.isNotEmpty(contractId)) { | ||
| 105 | + ContractDistributorStandard contractDistributorStandard = contractDistributorStandardService.findById(contractId); | ||
| 106 | + if (contractDistributorStandard != null) { | ||
| 107 | + result.setContractType(contractDistributorStandard.getType()); | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + } | ||
| 93 | 111 | ||
| 94 | return InvokeResultBuilder.success(result); | 112 | return InvokeResultBuilder.success(result); |
| 95 | } | 113 | } |
| @@ -16,6 +16,7 @@ import javax.validation.constraints.NotBlank; | @@ -16,6 +16,7 @@ import javax.validation.constraints.NotBlank; | ||
| 16 | import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderInfoBo; | 16 | import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderInfoBo; |
| 17 | import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderRevokeBo; | 17 | import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderRevokeBo; |
| 18 | import com.lframework.xingyun.sc.entity.*; | 18 | import com.lframework.xingyun.sc.entity.*; |
| 19 | +import com.lframework.xingyun.sc.service.contract.ContractDistributorStandardService; | ||
| 19 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | 20 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| 20 | import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService; | 21 | import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService; |
| 21 | import com.lframework.xingyun.sc.service.order.PurchaseOrderRevokeLineService; | 22 | import com.lframework.xingyun.sc.service.order.PurchaseOrderRevokeLineService; |
| @@ -28,6 +29,7 @@ import io.swagger.annotations.ApiOperation; | @@ -28,6 +29,7 @@ import io.swagger.annotations.ApiOperation; | ||
| 28 | import com.lframework.starter.common.utils.CollectionUtil; | 29 | import com.lframework.starter.common.utils.CollectionUtil; |
| 29 | import io.swagger.annotations.Api; | 30 | import io.swagger.annotations.Api; |
| 30 | import org.apache.commons.collections.CollectionUtils; | 31 | import org.apache.commons.collections.CollectionUtils; |
| 32 | +import org.apache.commons.lang3.StringUtils; | ||
| 31 | import org.springframework.web.bind.annotation.DeleteMapping; | 33 | import org.springframework.web.bind.annotation.DeleteMapping; |
| 32 | import org.springframework.beans.factory.annotation.Autowired; | 34 | import org.springframework.beans.factory.annotation.Autowired; |
| 33 | import org.springframework.validation.annotation.Validated; | 35 | import org.springframework.validation.annotation.Validated; |
| @@ -58,6 +60,8 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | @@ -58,6 +60,8 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | ||
| 58 | private PurchaseOrderRevokeLineService purchaseOrderRevokeLineService; | 60 | private PurchaseOrderRevokeLineService purchaseOrderRevokeLineService; |
| 59 | @Resource | 61 | @Resource |
| 60 | private FlowTaskWrapperMapper flowTaskWrapperMapper; | 62 | private FlowTaskWrapperMapper flowTaskWrapperMapper; |
| 63 | + @Resource | ||
| 64 | + private ContractDistributorStandardService contractDistributorStandardService; | ||
| 61 | 65 | ||
| 62 | /** | 66 | /** |
| 63 | * 查询列表 | 67 | * 查询列表 |
| @@ -124,6 +128,16 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | @@ -124,6 +128,16 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | ||
| 124 | if (CollectionUtil.isNotEmpty(query)) { | 128 | if (CollectionUtil.isNotEmpty(query)) { |
| 125 | result.setPurchaseOrderRevokeLineList(query); | 129 | result.setPurchaseOrderRevokeLineList(query); |
| 126 | } | 130 | } |
| 131 | + PurchaseOrderInfo purchaseOrderInfo = purchaseOrderInfoService.findById(data.getPurchaseOrderId()); | ||
| 132 | + if (purchaseOrderInfo != null) { | ||
| 133 | + String contractId = purchaseOrderInfo.getContractId(); | ||
| 134 | + if (StringUtils.isNotEmpty(contractId)) { | ||
| 135 | + ContractDistributorStandard contractDistributorStandard = contractDistributorStandardService.findById(contractId); | ||
| 136 | + if (contractDistributorStandard != null) { | ||
| 137 | + result.setContractType(contractDistributorStandard.getType()); | ||
| 138 | + } | ||
| 139 | + } | ||
| 140 | + } | ||
| 127 | 141 | ||
| 128 | return InvokeResultBuilder.success(result); | 142 | return InvokeResultBuilder.success(result); |
| 129 | } | 143 | } |
| @@ -26,9 +26,11 @@ import com.lframework.xingyun.basedata.vo.customer.QueryCustomerVo; | @@ -26,9 +26,11 @@ import com.lframework.xingyun.basedata.vo.customer.QueryCustomerVo; | ||
| 26 | import com.lframework.xingyun.sc.bo.purchase.GetReplenishmentOrderBo; | 26 | import com.lframework.xingyun.sc.bo.purchase.GetReplenishmentOrderBo; |
| 27 | import com.lframework.xingyun.sc.bo.purchase.GetReplenishmentOrderLineBo; | 27 | import com.lframework.xingyun.sc.bo.purchase.GetReplenishmentOrderLineBo; |
| 28 | import com.lframework.xingyun.sc.bo.purchase.QueryReplenishmentOrderBo; | 28 | import com.lframework.xingyun.sc.bo.purchase.QueryReplenishmentOrderBo; |
| 29 | +import com.lframework.xingyun.sc.entity.ContractDistributorStandard; | ||
| 29 | import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; | 30 | import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; |
| 30 | import com.lframework.xingyun.sc.entity.ReplenishmentOrder; | 31 | import com.lframework.xingyun.sc.entity.ReplenishmentOrder; |
| 31 | import com.lframework.xingyun.sc.entity.ReplenishmentOrderLine; | 32 | import com.lframework.xingyun.sc.entity.ReplenishmentOrderLine; |
| 33 | +import com.lframework.xingyun.sc.service.contract.ContractDistributorStandardService; | ||
| 32 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | 34 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| 33 | import com.lframework.xingyun.sc.service.purchase.ReplenishmentOrderLineService; | 35 | import com.lframework.xingyun.sc.service.purchase.ReplenishmentOrderLineService; |
| 34 | import com.lframework.xingyun.sc.service.purchase.ReplenishmentOrderService; | 36 | import com.lframework.xingyun.sc.service.purchase.ReplenishmentOrderService; |
| @@ -77,6 +79,8 @@ public class ReplenishmentOrderController extends DefaultBaseController { | @@ -77,6 +79,8 @@ public class ReplenishmentOrderController extends DefaultBaseController { | ||
| 77 | private ReplenishmentOrderLineService replenishmentOrderLineService; | 79 | private ReplenishmentOrderLineService replenishmentOrderLineService; |
| 78 | @Resource | 80 | @Resource |
| 79 | private FlowTaskWrapperMapper flowTaskWrapperMapper; | 81 | private FlowTaskWrapperMapper flowTaskWrapperMapper; |
| 82 | + @Resource | ||
| 83 | + private ContractDistributorStandardService contractDistributorStandardService; | ||
| 80 | 84 | ||
| 81 | 85 | ||
| 82 | public static final String AUDIT_STATUS_DIC_CODE = "AUDIT_STATUS"; // 审核状态 | 86 | public static final String AUDIT_STATUS_DIC_CODE = "AUDIT_STATUS"; // 审核状态 |
| @@ -195,6 +199,13 @@ public class ReplenishmentOrderController extends DefaultBaseController { | @@ -195,6 +199,13 @@ public class ReplenishmentOrderController extends DefaultBaseController { | ||
| 195 | result.setStatusName(sysDataDicItem == null ? "" : sysDataDicItem.getName()); | 199 | result.setStatusName(sysDataDicItem == null ? "" : sysDataDicItem.getName()); |
| 196 | PurchaseOrderInfo purchaseOrderInfo = purchaseOrderInfoService.findById(data.getPurchaseOrderId()); | 200 | PurchaseOrderInfo purchaseOrderInfo = purchaseOrderInfoService.findById(data.getPurchaseOrderId()); |
| 197 | result.setPurchaseOrderName(purchaseOrderInfo == null ? "" : purchaseOrderInfo.getOrderNo()); | 201 | result.setPurchaseOrderName(purchaseOrderInfo == null ? "" : purchaseOrderInfo.getOrderNo()); |
| 202 | + String contractId = purchaseOrderInfo.getContractId(); | ||
| 203 | + if (StringUtils.isNotEmpty(contractId)) { | ||
| 204 | + ContractDistributorStandard contractDistributorStandard = contractDistributorStandardService.findById(contractId); | ||
| 205 | + if (contractDistributorStandard != null) { | ||
| 206 | + result.setContractType(contractDistributorStandard.getType()); | ||
| 207 | + } | ||
| 208 | + } | ||
| 198 | 209 | ||
| 199 | Wrapper<ReplenishmentOrderLine> lineWrapper = Wrappers.lambdaQuery(ReplenishmentOrderLine.class) | 210 | Wrapper<ReplenishmentOrderLine> lineWrapper = Wrappers.lambdaQuery(ReplenishmentOrderLine.class) |
| 200 | .eq(ReplenishmentOrderLine::getReplenishmentOrderId, id) | 211 | .eq(ReplenishmentOrderLine::getReplenishmentOrderId, id) |
| @@ -1455,6 +1455,7 @@ public class ContractDistributorStandardServiceImpl extends | @@ -1455,6 +1455,7 @@ public class ContractDistributorStandardServiceImpl extends | ||
| 1455 | data.setPerformance(vo.getPerformance()); | 1455 | data.setPerformance(vo.getPerformance()); |
| 1456 | data.setComponent(vo.getComponent()); | 1456 | data.setComponent(vo.getComponent()); |
| 1457 | data.setPackaging(vo.getPackaging()); | 1457 | data.setPackaging(vo.getPackaging()); |
| 1458 | + data.setRemarks(vo.getRemarks()); | ||
| 1458 | // data.setStandardizedAt(LocalDateTime.now()); | 1459 | // data.setStandardizedAt(LocalDateTime.now()); |
| 1459 | getBaseMapper().insert(data); | 1460 | getBaseMapper().insert(data); |
| 1460 | 1461 |
| @@ -36,6 +36,7 @@ import com.lframework.xingyun.sc.service.customer.CustomerCreditService; | @@ -36,6 +36,7 @@ import com.lframework.xingyun.sc.service.customer.CustomerCreditService; | ||
| 36 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | 36 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| 37 | import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService; | 37 | import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService; |
| 38 | import com.lframework.xingyun.sc.service.statistics.OrderDetailReportService; | 38 | import com.lframework.xingyun.sc.service.statistics.OrderDetailReportService; |
| 39 | +import com.lframework.xingyun.sc.utils.OrderDetailReportUtil; | ||
| 39 | import com.lframework.xingyun.sc.vo.order.CreatePurchaseOrderLineVo; | 40 | import com.lframework.xingyun.sc.vo.order.CreatePurchaseOrderLineVo; |
| 40 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderInfoVo; | 41 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderInfoVo; |
| 41 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderLineVo; | 42 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderLineVo; |
| @@ -586,7 +587,8 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | @@ -586,7 +587,8 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | ||
| 586 | vo.setQuality(line.getQuality()); | 587 | vo.setQuality(line.getQuality()); |
| 587 | vo.setContractType(orderDetailReport.getContractType()); | 588 | vo.setContractType(orderDetailReport.getContractType()); |
| 588 | vo.setStockUpCompanyName(orderInfo.getStockUpCompanyName()); | 589 | vo.setStockUpCompanyName(orderInfo.getStockUpCompanyName()); |
| 589 | - //vo.setOrderType(); | 590 | + vo.setType(orderInfo.getType()); |
| 591 | + vo.setOrderType(OrderDetailReportUtil.buildOrderType(type, orderInfo.getType())); | ||
| 590 | vo.setShowOrder(2); | 592 | vo.setShowOrder(2); |
| 591 | vo.setCreateById(contractCreateById); | 593 | vo.setCreateById(contractCreateById); |
| 592 | orderDetailReportService.create(vo); | 594 | orderDetailReportService.create(vo); |
| @@ -38,6 +38,7 @@ import com.lframework.xingyun.sc.service.customer.CustomerCreditService; | @@ -38,6 +38,7 @@ import com.lframework.xingyun.sc.service.customer.CustomerCreditService; | ||
| 38 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | 38 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| 39 | import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService; | 39 | import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService; |
| 40 | import com.lframework.xingyun.sc.service.statistics.OrderDetailReportService; | 40 | import com.lframework.xingyun.sc.service.statistics.OrderDetailReportService; |
| 41 | +import com.lframework.xingyun.sc.utils.OrderDetailReportUtil; | ||
| 41 | import com.lframework.xingyun.sc.vo.customer.credit.QueryCustomerCreditVo; | 42 | import com.lframework.xingyun.sc.vo.customer.credit.QueryCustomerCreditVo; |
| 42 | import com.lframework.xingyun.sc.vo.order.*; | 43 | import com.lframework.xingyun.sc.vo.order.*; |
| 43 | import com.lframework.xingyun.sc.vo.statistics.orderDetail.CreateOrderDetailReportVo; | 44 | import com.lframework.xingyun.sc.vo.statistics.orderDetail.CreateOrderDetailReportVo; |
| @@ -416,7 +417,7 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | @@ -416,7 +417,7 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | ||
| 416 | } | 417 | } |
| 417 | } | 418 | } |
| 418 | vo.setStockUpCompanyName(purchaseOrderInfo.getStockUpCompanyName()); | 419 | vo.setStockUpCompanyName(purchaseOrderInfo.getStockUpCompanyName()); |
| 419 | -// vo.setOrderType(); | 420 | + vo.setOrderType(OrderDetailReportUtil.buildOrderType(type, purchaseOrderInfo.getType())); |
| 420 | vo.setShowOrder(0); | 421 | vo.setShowOrder(0); |
| 421 | vo.setType(purchaseOrderInfo.getType()); | 422 | vo.setType(purchaseOrderInfo.getType()); |
| 422 | vo.setCreateById(purchaseOrderInfo.getContractCreateById()); | 423 | vo.setCreateById(purchaseOrderInfo.getContractCreateById()); |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/statistics/OrderDetailReportServiceImpl.java
| @@ -26,6 +26,7 @@ import com.lframework.xingyun.sc.service.customer.CustomerCreditService; | @@ -26,6 +26,7 @@ import com.lframework.xingyun.sc.service.customer.CustomerCreditService; | ||
| 26 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | 26 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| 27 | import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService; | 27 | import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService; |
| 28 | import com.lframework.xingyun.sc.service.statistics.OrderDetailReportService; | 28 | import com.lframework.xingyun.sc.service.statistics.OrderDetailReportService; |
| 29 | +import com.lframework.xingyun.sc.utils.OrderDetailReportUtil; | ||
| 29 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderInfoVo; | 30 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderInfoVo; |
| 30 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderLineVo; | 31 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderLineVo; |
| 31 | import com.lframework.xingyun.sc.vo.statistics.orderDetail.CreateOrderDetailReportVo; | 32 | import com.lframework.xingyun.sc.vo.statistics.orderDetail.CreateOrderDetailReportVo; |
| @@ -408,7 +409,7 @@ public class OrderDetailReportServiceImpl extends BaseMpServiceImpl<OrderDetailR | @@ -408,7 +409,7 @@ public class OrderDetailReportServiceImpl extends BaseMpServiceImpl<OrderDetailR | ||
| 408 | } | 409 | } |
| 409 | } | 410 | } |
| 410 | vo.setStockUpCompanyName(purchaseOrderInfo.getStockUpCompanyName()); | 411 | vo.setStockUpCompanyName(purchaseOrderInfo.getStockUpCompanyName()); |
| 411 | - //vo.setOrderType(); | 412 | + vo.setOrderType(OrderDetailReportUtil.buildOrderType(type, purchaseOrderInfo.getType())); |
| 412 | vo.setShowOrder(0); | 413 | vo.setShowOrder(0); |
| 413 | vo.setType(purchaseOrderInfo.getType()); | 414 | vo.setType(purchaseOrderInfo.getType()); |
| 414 | vo.setCreateById(purchaseOrderInfo.getContractCreateById()); | 415 | vo.setCreateById(purchaseOrderInfo.getContractCreateById()); |
| 1 | +package com.lframework.xingyun.sc.utils; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * 订单明细报表工具类。 | ||
| 5 | + */ | ||
| 6 | +public final class OrderDetailReportUtil { | ||
| 7 | + | ||
| 8 | + private OrderDetailReportUtil() { | ||
| 9 | + } | ||
| 10 | + | ||
| 11 | + /** | ||
| 12 | + * 根据合同类型和订货单类型构建订单类型展示值。 | ||
| 13 | + * | ||
| 14 | + * @param contractType 合同类型 | ||
| 15 | + * @param purchaseOrderType 订货单类型 | ||
| 16 | + * @return 订单类型展示值 | ||
| 17 | + */ | ||
| 18 | + public static String buildOrderType(String contractType, String purchaseOrderType) { | ||
| 19 | + if ("DISTRIB_STD".equals(contractType)) { | ||
| 20 | + return "经销"; | ||
| 21 | + } | ||
| 22 | + if ("INTL_STD_CONTRACT".equals(contractType)) { | ||
| 23 | + return "外贸"; | ||
| 24 | + } | ||
| 25 | + if ("PROCESS_STD_AGMT".equals(contractType)) { | ||
| 26 | + return "加工"; | ||
| 27 | + } | ||
| 28 | + if ("DIST_STOCK_CONTRACT".equals(contractType) || "INTL_INVENTORY_AGMT".equals(contractType)) { | ||
| 29 | + if ("NO_PRODUCTION".equals(purchaseOrderType)) { | ||
| 30 | + return "库存已锁价"; | ||
| 31 | + } | ||
| 32 | + if ("PRODUCTION".equals(purchaseOrderType)) { | ||
| 33 | + return "库存未锁价"; | ||
| 34 | + } | ||
| 35 | + return "库存"; | ||
| 36 | + } | ||
| 37 | + if ("DRAFT_DIST_AGMT".equals(contractType) || "INTL_OPEN_SPEC_AGMT".equals(contractType)) { | ||
| 38 | + if ("NO_PRODUCTION".equals(purchaseOrderType)) { | ||
| 39 | + return "未锁规"; | ||
| 40 | + } | ||
| 41 | + if ("PRODUCTION".equals(purchaseOrderType)) { | ||
| 42 | + return "已锁规"; | ||
| 43 | + } | ||
| 44 | + return "未锁规"; | ||
| 45 | + } | ||
| 46 | + return ""; | ||
| 47 | + } | ||
| 48 | +} |