Merge branch 'refs/heads/dev' into test
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
package com.zt.plat.module.contractorder.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.contractorder.api.dto.ContractFormulaRespDTO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.contractorder.api.dto.PrchOrdDtlDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.PurchaseOrderWithDetailsDTO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderDetailsRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderWithDetailsVO;
|
||||
import com.zt.plat.module.contractorder.api.dto.contract.ContractRespDTO;
|
||||
import com.zt.plat.module.contractorder.service.contract.ContractService;
|
||||
import com.zt.plat.module.contractorder.service.purchaseorder.PurchaseOrderService;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -9,6 +14,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
@@ -24,7 +30,7 @@ public class ContractApiImpl implements ContractApi {
|
||||
private PurchaseOrderService purchaseOrderService;
|
||||
|
||||
@Override
|
||||
public List<ContractFormulaRespDTO> getFormulas(String contractPaperNumber) {
|
||||
public ContractRespDTO getContractByPaperNumber(String contractPaperNumber) {
|
||||
return contractService.getFormulasByPaperNumber(contractPaperNumber);
|
||||
}
|
||||
|
||||
@@ -32,4 +38,23 @@ public class ContractApiImpl implements ContractApi {
|
||||
public CommonResult<Boolean> updateOrderStatus(Long orderId, String status) {
|
||||
return success(purchaseOrderService.updateOrderStatus(orderId, status));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<PurchaseOrderWithDetailsDTO>> getOrderByOrderNo(List<String> orderNoS) {
|
||||
List<PurchaseOrderWithDetailsDTO> purchaseOrderWithDetailsDTOS = new ArrayList<>();
|
||||
List<PurchaseOrderDetailsRespVO> purchaseOrderWithDetailsVOS = purchaseOrderService.getOrderByOrderNo(orderNoS);
|
||||
purchaseOrderWithDetailsVOS.forEach(purchaseOrderWithDetailsVO -> {
|
||||
if (purchaseOrderWithDetailsVO!= null) {
|
||||
PurchaseOrderWithDetailsDTO purchaseOrderWithDetailsDTO = BeanUtils.toBean(purchaseOrderWithDetailsVO,
|
||||
PurchaseOrderWithDetailsDTO.class);
|
||||
if (purchaseOrderWithDetailsVO.getOrderDetails().isEmpty()) {
|
||||
purchaseOrderWithDetailsDTO.setOrderDetails(new ArrayList<>());
|
||||
} else {
|
||||
purchaseOrderWithDetailsDTO.setOrderDetails(BeanUtils.toBean(purchaseOrderWithDetailsVO.getOrderDetails(), PrchOrdDtlDTO.class));
|
||||
}
|
||||
purchaseOrderWithDetailsDTOS.add(purchaseOrderWithDetailsDTO);
|
||||
}
|
||||
});
|
||||
return success(purchaseOrderWithDetailsDTOS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.purchaseorder;
|
||||
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.api.ContractApiImpl;
|
||||
import com.zt.plat.module.contractorder.api.dto.PurchaseOrderWithDetailsDTO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.*;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import com.zt.plat.module.contractorder.service.purchaseorder.PurchaseOrderService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -43,6 +43,9 @@ public class PurchaseOrderController implements BusinessControllerMarker {
|
||||
|
||||
@Resource
|
||||
private PurchaseOrderService purchaseOrderService;
|
||||
@Resource
|
||||
private ContractApiImpl contractApi;
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建采购订单")
|
||||
@@ -117,10 +120,24 @@ public class PurchaseOrderController implements BusinessControllerMarker {
|
||||
}
|
||||
|
||||
//提交ERP订单
|
||||
@PostMapping("/submit-erp")
|
||||
@Operation(summary = "提交ERP订单", description = "bse:purchase-order:update')")
|
||||
public CommonResult<?> submitErp(@RequestBody List<Long> ids) {
|
||||
return success( purchaseOrderService.submitErp(ids));
|
||||
@PostMapping("/submit-erp061")
|
||||
@Operation(summary = "推送ERP订单", description = "061')")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:update')")
|
||||
public CommonResult<?> submitErp061(@RequestBody @Validated @NotNull(message = "采购订单id不能为空") List<Long> ids) {
|
||||
return success( purchaseOrderService.submitErp061(ids));
|
||||
}
|
||||
@PostMapping("/submit-erp062")
|
||||
@Operation(summary = "推送ERP订单", description = "062当每次调更新接口后都需要调此接口")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:update')")
|
||||
public CommonResult<?> submitErp062(@RequestParam @Validated @NotNull(message = "采购订单id不能为空") Long id) {
|
||||
return success( purchaseOrderService.submitErp062(id));
|
||||
}
|
||||
|
||||
//通过订单号查询订单信息
|
||||
@PostMapping("/get-order-by-order-no")
|
||||
@Operation(summary = "通过订单号查询订单信息")
|
||||
public CommonResult<List<PurchaseOrderDetailsRespVO>> getOrderByOrderNo(@RequestBody @Validated @NotEmpty(message = "采购订单不能为空") List<String> orderNos){
|
||||
return success(purchaseOrderService.getOrderByOrderNo(orderNos));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -124,4 +124,7 @@ public class PurchaseOrderPageReqVO extends PageParam {
|
||||
@Schema(description = "采购组名称", example = "张三")
|
||||
private String purchaseGroupName;
|
||||
|
||||
@Schema(description = "物料类型(字典:MTRL_TP)", example = "2")
|
||||
private String mtrlTp;
|
||||
|
||||
}
|
||||
|
||||
@@ -164,5 +164,7 @@ public class PurchaseOrderRespVO {
|
||||
@Schema(description = "订单明细")
|
||||
@ExcelProperty("订单明细")
|
||||
private List<PrchOrdDtlRespVO> prchOrdDtlRespVOS;
|
||||
|
||||
@Schema(description = "物料类型(字典:MTRL_TP)", example = "2")
|
||||
@ExcelProperty("物料类型(字典:MTRL_TP)")
|
||||
private String mtrlTp;
|
||||
}
|
||||
|
||||
@@ -167,4 +167,7 @@ public class PurchaseOrderSaveReqVO {
|
||||
@Schema(description = "是否提交审核,value为0或1")
|
||||
@ExcelProperty("是否提交审核")
|
||||
private int isPush;
|
||||
@Schema(description = "物料类别(字典:MTRL_TP)", example = "1")
|
||||
@ExcelProperty("物料类别")
|
||||
private String mtrlTp;
|
||||
}
|
||||
|
||||
@@ -271,4 +271,11 @@ public class PrchOrdDtlDO extends BusinessBaseDO {
|
||||
@TableField("ELEM_CDG")
|
||||
private String elemCdg;
|
||||
|
||||
/**
|
||||
* 物料字典
|
||||
*
|
||||
*/
|
||||
@TableField("MTRL_TP")
|
||||
private String mtrlTp;
|
||||
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ public interface PurchaseOrderMapper extends BaseMapperX<PurchaseOrderDO> {
|
||||
.likeIfPresent(PurchaseOrderDO::getPurchaseGroupName, reqVO.getPurchaseGroupName())
|
||||
.orderByDesc(PurchaseOrderDO::getId));
|
||||
}
|
||||
|
||||
List<PurchaseOrderWithDetailsVO> selectOrderById(@Param("ids") List<Long> id);
|
||||
List<PurchaseOrderWithDetailsVO> selectOrderByOrderNos(@Param("orderNos") List<String> orderNos);
|
||||
List<PurchaseOrderWithDetailsVO> selectOrderByIds(@Param("ids") List<Long> id);
|
||||
PurchaseOrderDO selectByOrderId(@Param("orderId") Long orderId);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zt.plat.module.contractorder.service.contract;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.contractorder.api.dto.ContractFormulaRespDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.contract.ContractRespDTO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.*;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractMainDO;
|
||||
import jakarta.validation.Valid;
|
||||
@@ -88,12 +88,12 @@ public interface ContractService {
|
||||
List<FormulaRespVO> getFormulas(FormulasQueryReqVO queryReqVO);
|
||||
|
||||
/**
|
||||
* 通过合同编号获取对应的结算条款数据
|
||||
* 通过合同编号获取对应的合同信息
|
||||
*
|
||||
* @param contractPaperNumber 合同编号
|
||||
* @return 结算条款数据
|
||||
*/
|
||||
List<ContractFormulaRespDTO> getFormulasByPaperNumber(String contractPaperNumber);
|
||||
ContractRespDTO getFormulasByPaperNumber(String contractPaperNumber);
|
||||
|
||||
/**
|
||||
* 提交ERP
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user