Merge remote-tracking branch 'origin/dev' into test
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package com.zt.plat.module.contractorder.enums.entrustorder;
|
||||
|
||||
import com.zt.plat.framework.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* contract-order 错误码枚举类
|
||||
*
|
||||
* contract-order 系统,使用 1-xxx-xxx-xxx 段
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
|
||||
// ========== 合同模块 1-027-000-000 ==========
|
||||
ErrorCode ENTRUST_ORDER_DETAIL_NOT_EXISTS = new ErrorCode(1_027_000_888, "委托加工订单明细不存在");
|
||||
ErrorCode ENTRUST_ORDER_NOT_EXISTS = new ErrorCode(1_027_000_889, "委托加工订单不存在");
|
||||
}
|
||||
@@ -680,7 +680,7 @@ public class ContractApiImpl implements ContractApi {
|
||||
|
||||
@Override
|
||||
public CommonResult<SalesOrdDtlDTO> getSalesOrderDetailById(Long id) {
|
||||
SalesOrderDetailDO salesOrderDetailDO = SpringUtil.getBean(SalesOrderDetailMapper.class).selectOne(SalesOrderDetailDO::getId, id);
|
||||
SalesOrderDetailDO salesOrderDetailDO = SpringUtil.getBean(SalesOrderDetailMapper.class).selectOne(SalesOrderDetailDO::getId, id,SalesOrderDetailDO::getIsEnable,1);
|
||||
SalesOrdDtlDTO salesOrdDtlDTO = BeanUtils.toBean(salesOrderDetailDO, SalesOrdDtlDTO.class);
|
||||
salesOrdDtlDTO.setUnit(salesOrderDetailDO.getUnt());
|
||||
return success(salesOrdDtlDTO);
|
||||
@@ -688,19 +688,20 @@ public class ContractApiImpl implements ContractApi {
|
||||
|
||||
@Override
|
||||
public CommonResult<List<SalesOrdDtlDTO>> getSalesOrderDetailByIds(List<Long> ids) {
|
||||
List<SalesOrderDetailDO> salesOrderDetailDOS = SpringUtil.getBean(SalesOrderDetailMapper.class).selectList(SalesOrderDetailDO::getId, ids);
|
||||
List<SalesOrderDetailDO> salesOrderDetailDOS = SpringUtil.getBean(SalesOrderDetailMapper.class).selectList(SalesOrderDetailDO::getId, ids,SalesOrderDetailDO::getIsEnable,1);
|
||||
return success(BeanUtils.toBean(salesOrderDetailDOS, SalesOrdDtlDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PrchOrdDtlDTO> getPoOrderDetailById(Long id) {
|
||||
PrchOrdDtlDO prchOrdDtlDO = SpringUtil.getBean(PrchOrdDtlMapper.class).selectById(id);
|
||||
PrchOrdDtlDO prchOrdDtlDO = SpringUtil.getBean(PrchOrdDtlMapper.class).selectOne(PrchOrdDtlDO::getId,id,PrchOrdDtlDO::getIsEnb,1);
|
||||
|
||||
return success(BeanUtils.toBean(prchOrdDtlDO, PrchOrdDtlDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<PrchOrdDtlDTO>> getPoOrderDetailByIds(List<Long> ids) {
|
||||
List<PrchOrdDtlDO> prchOrdDtlDOS = SpringUtil.getBean(PrchOrdDtlMapper.class).selectList(PrchOrdDtlDO::getId, ids);
|
||||
List<PrchOrdDtlDO> prchOrdDtlDOS = SpringUtil.getBean(PrchOrdDtlMapper.class).selectList(PrchOrdDtlDO::getId, ids,PrchOrdDtlDO::getIsEnb,1);
|
||||
return success(BeanUtils.toBean(prchOrdDtlDOS, PrchOrdDtlDTO.class));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,13 +174,13 @@ public class OrderApiImpl implements OrderApi {
|
||||
|
||||
@Override
|
||||
public CommonResult<List<SalesOrdDtlDTO>> getSalesOrderDetailsByOrderIds(List<Long> ids) {
|
||||
List<SalesOrderDetailDO> salesOrderDetailDOS = SpringUtil.getBean(SalesOrderDetailMapper.class).selectList(SalesOrderDetailDO::getId, ids);
|
||||
List<SalesOrderDetailDO> salesOrderDetailDOS = SpringUtil.getBean(SalesOrderDetailMapper.class).selectList(SalesOrderDetailDO::getId, ids, SalesOrderDetailDO::getIsEnable, 1);
|
||||
return success(BeanUtils.toBean(salesOrderDetailDOS, SalesOrdDtlDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<SalesOrdDtlDTO> getSalesOrderDetailsByOrderId(Long id) {
|
||||
SalesOrderDetailDO salesOrderDetailDOS = SpringUtil.getBean(SalesOrderDetailMapper.class).selectOne(SalesOrderDetailDO::getOrderId, id);
|
||||
SalesOrderDetailDO salesOrderDetailDOS = SpringUtil.getBean(SalesOrderDetailMapper.class).selectOne(SalesOrderDetailDO::getOrderId, id, SalesOrderDetailDO::getIsEnable, 1);
|
||||
return success(BeanUtils.toBean(salesOrderDetailDOS, SalesOrdDtlDTO.class));
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ public class OrderApiImpl implements OrderApi {
|
||||
}
|
||||
|
||||
private List<SalesOrderDO> getOrderByIds(List<Long> ids) {
|
||||
return SpringUtil.getBean(SalesOrderMapper.class).selectByIds(ids); // 采购订单与销售订单的
|
||||
return SpringUtil.getBean(SalesOrderMapper.class).selectList(SalesOrderDO::getId,ids); // 采购订单与销售订单的
|
||||
}
|
||||
|
||||
private List<OrderDTO> getPoOrdByIds(List<Long> ids) {
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.entrustorder;
|
||||
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderDetailPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderDetailRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderDetailSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.entrustorder.EntrustOrderDetailDO;
|
||||
import com.zt.plat.module.contractorder.service.entrustorder.EntrustOrderDetailService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 委托加工订单明细")
|
||||
@RestController
|
||||
@RequestMapping("/bse/entrust-order-detail")
|
||||
@Validated
|
||||
public class EntrustOrderDetailController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private EntrustOrderDetailService entrustOrderDetailService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建委托加工订单明细")
|
||||
@PreAuthorize("@ss.hasPermission('bse:entrust-order-detail:create')")
|
||||
public CommonResult<EntrustOrderDetailRespVO> createEntrustOrderDetail(@Valid @RequestBody EntrustOrderDetailSaveReqVO createReqVO) {
|
||||
return success(entrustOrderDetailService.createEntrustOrderDetail(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新委托加工订单明细")
|
||||
@PreAuthorize("@ss.hasPermission('bse:entrust-order-detail:update')")
|
||||
public CommonResult<Boolean> updateEntrustOrderDetail(@Valid @RequestBody EntrustOrderDetailSaveReqVO updateReqVO) {
|
||||
entrustOrderDetailService.updateEntrustOrderDetail(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除委托加工订单明细")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('bse:entrust-order-detail:delete')")
|
||||
public CommonResult<Boolean> deleteEntrustOrderDetail(@RequestParam("id") Long id) {
|
||||
entrustOrderDetailService.deleteEntrustOrderDetail(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除委托加工订单明细")
|
||||
@PreAuthorize("@ss.hasPermission('bse:entrust-order-detail:delete')")
|
||||
public CommonResult<Boolean> deleteEntrustOrderDetailList(@RequestBody BatchDeleteReqVO req) {
|
||||
entrustOrderDetailService.deleteEntrustOrderDetailListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得委托加工订单明细")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('bse:entrust-order-detail:query')")
|
||||
public CommonResult<EntrustOrderDetailRespVO> getEntrustOrderDetail(@RequestParam("id") Long id) {
|
||||
EntrustOrderDetailDO entrustOrderDetail = entrustOrderDetailService.getEntrustOrderDetail(id);
|
||||
return success(BeanUtils.toBean(entrustOrderDetail, EntrustOrderDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得委托加工订单明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('bse:entrust-order-detail:query')")
|
||||
public CommonResult<PageResult<EntrustOrderDetailRespVO>> getEntrustOrderDetailPage(@Valid EntrustOrderDetailPageReqVO pageReqVO) {
|
||||
PageResult<EntrustOrderDetailDO> pageResult = entrustOrderDetailService.getEntrustOrderDetailPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, EntrustOrderDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出委托加工订单明细 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('bse:entrust-order-detail:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportEntrustOrderDetailExcel(@Valid EntrustOrderDetailPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<EntrustOrderDetailDO> list = entrustOrderDetailService.getEntrustOrderDetailPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "委托加工订单明细.xls", "数据", EntrustOrderDetailRespVO.class,
|
||||
BeanUtils.toBean(list, EntrustOrderDetailRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.entrustorder;
|
||||
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderOrderPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderOrderRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderOrderSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.DownOrUpOrderReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.DownOrUpOrderRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.LinkOrderReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderRespVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.entrustorder.EntrustOrderOrderDO;
|
||||
import com.zt.plat.module.contractorder.service.entrustorder.EntrustOrderOrderService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 采购订单")
|
||||
@RestController
|
||||
@RequestMapping("/bse/purchase-order")
|
||||
@Validated
|
||||
public class EntrustOrderOrderController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private EntrustOrderOrderService entrustOrderOrderService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建采购订单")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:create')")
|
||||
public CommonResult<EntrustOrderOrderRespVO> createEntrustOrderOrder(@Valid @RequestBody EntrustOrderOrderSaveReqVO createReqVO) {
|
||||
return success(entrustOrderOrderService.createEntrustOrderOrder(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新采购订单")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:update')")
|
||||
public CommonResult<Boolean> updateEntrustOrderOrder(@Valid @RequestBody EntrustOrderOrderSaveReqVO updateReqVO) {
|
||||
entrustOrderOrderService.updateEntrustOrderOrder(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除采购订单")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:delete')")
|
||||
public CommonResult<Boolean> deleteEntrustOrderOrder(@RequestParam("id") Long id) {
|
||||
entrustOrderOrderService.deleteEntrustOrderOrder(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除采购订单")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:delete')")
|
||||
public CommonResult<Boolean> deleteEntrustOrderOrderList(@RequestBody BatchDeleteReqVO req) {
|
||||
entrustOrderOrderService.deleteEntrustOrderOrderListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得采购订单")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:query')")
|
||||
public CommonResult<EntrustOrderOrderRespVO> getEntrustOrderOrder(@RequestParam("id") Long id) {
|
||||
EntrustOrderOrderDO EntrustOrderOrder = entrustOrderOrderService.getEntrustOrderOrder(id);
|
||||
return success(BeanUtils.toBean(EntrustOrderOrder, EntrustOrderOrderRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得采购订单分页")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:query')")
|
||||
public CommonResult<PageResult<EntrustOrderOrderRespVO>> getEntrustOrderOrderPage(@Valid EntrustOrderOrderPageReqVO pageReqVO) {
|
||||
PageResult<EntrustOrderOrderDO> pageResult = entrustOrderOrderService.getEntrustOrderOrderPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, EntrustOrderOrderRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出采购订单 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportEntrustOrderOrderExcel(@Valid EntrustOrderOrderPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<EntrustOrderOrderDO> list = entrustOrderOrderService.getEntrustOrderOrderPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "采购订单.xls", "数据", EntrustOrderOrderRespVO.class,
|
||||
BeanUtils.toBean(list, EntrustOrderOrderRespVO.class));
|
||||
}
|
||||
//关联订单
|
||||
//关联订单
|
||||
@PostMapping("/link-order")
|
||||
@Operation(summary = "关联订单")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('base:purchase-order:update','purchase:order:list:OrderList:edit')")
|
||||
public CommonResult<Boolean> linkOrder(@RequestBody @Validated LinkOrderReqVO req) {
|
||||
return success(entrustOrderOrderService.linkOrder(req));
|
||||
}
|
||||
|
||||
@PostMapping("/order-by-order-id-and-type")
|
||||
@Operation(summary = "根据订单id和方式获取上或下游订单")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('base:purchase-order:query')")
|
||||
public CommonResult<List<DownOrUpOrderRespVO>> getOrderByOrderIdAndType(@RequestBody DownOrUpOrderReqVO reqVO) {
|
||||
return success( entrustOrderOrderService.getOrderByOrderIdAndType(reqVO));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/bound-order")
|
||||
@Operation(summary = "获取已绑定的订单")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('base:purchase-order:query')")
|
||||
public CommonResult<List<EntrustOrderOrderRespVO>> boundOrder(@RequestBody DownOrUpOrderReqVO reqVO) {
|
||||
return success(entrustOrderOrderService.getBindOrderByOrder(reqVO));
|
||||
}
|
||||
|
||||
//关闭订单
|
||||
@PostMapping("/close-order")
|
||||
@Operation(summary = "关闭订单")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('base:purchase-order:update')")
|
||||
public CommonResult<Boolean> closeOrder(@RequestParam("id") Long id) {
|
||||
return success(entrustOrderOrderService.closeOrder(id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.entrustorder.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 委托加工订单明细分页 Request VO")
|
||||
@Data
|
||||
public class EntrustOrderDetailPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "收货工厂名称", example = "赵六")
|
||||
private String receiveFactoryName;
|
||||
|
||||
@Schema(description = "收货工厂编码")
|
||||
private String receiveFactoryNumber;
|
||||
|
||||
@Schema(description = "收货库位名称", example = "张三")
|
||||
private String receiveWarehouseName;
|
||||
|
||||
@Schema(description = "收货库位编码")
|
||||
private String receiveWarehouseNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "赵六")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "计量单位")
|
||||
private String uom;
|
||||
|
||||
@Schema(description = "暂估数量")
|
||||
private BigDecimal forecastQuantity;
|
||||
|
||||
@Schema(description = "含税单价", example = "24704")
|
||||
private BigDecimal inTaxUnitPrice;
|
||||
|
||||
@Schema(description = "交货起始日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] deliveryCargoBeginDate;
|
||||
|
||||
@Schema(description = "交货截止日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] deliveryCargoEndDate;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private Boolean isEnable;
|
||||
|
||||
@Schema(description = "短文本")
|
||||
private String shortText;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.entrustorder.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 委托加工订单明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EntrustOrderDetailRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8625")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "收货工厂名称", example = "赵六")
|
||||
@ExcelProperty("收货工厂名称")
|
||||
private String receiveFactoryName;
|
||||
|
||||
@Schema(description = "收货工厂编码")
|
||||
@ExcelProperty("收货工厂编码")
|
||||
private String receiveFactoryNumber;
|
||||
|
||||
@Schema(description = "收货库位名称", example = "张三")
|
||||
@ExcelProperty("收货库位名称")
|
||||
private String receiveWarehouseName;
|
||||
|
||||
@Schema(description = "收货库位编码")
|
||||
@ExcelProperty("收货库位编码")
|
||||
private String receiveWarehouseNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "赵六")
|
||||
@ExcelProperty("物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@ExcelProperty("物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "计量单位")
|
||||
@ExcelProperty("计量单位")
|
||||
private String uom;
|
||||
|
||||
@Schema(description = "暂估数量")
|
||||
@ExcelProperty("暂估数量")
|
||||
private BigDecimal forecastQuantity;
|
||||
|
||||
@Schema(description = "含税单价", example = "24704")
|
||||
@ExcelProperty("含税单价")
|
||||
private BigDecimal inTaxUnitPrice;
|
||||
|
||||
@Schema(description = "交货起始日期")
|
||||
@ExcelProperty("交货起始日期")
|
||||
private LocalDateTime deliveryCargoBeginDate;
|
||||
|
||||
@Schema(description = "交货截止日期")
|
||||
@ExcelProperty("交货截止日期")
|
||||
private LocalDateTime deliveryCargoEndDate;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
@ExcelProperty("是否启用")
|
||||
private Boolean isEnable;
|
||||
|
||||
@Schema(description = "短文本")
|
||||
@ExcelProperty("短文本")
|
||||
private String shortText;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.entrustorder.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 委托加工订单明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class EntrustOrderDetailSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8625")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "收货工厂名称", example = "赵六")
|
||||
private String receiveFactoryName;
|
||||
|
||||
@Schema(description = "收货工厂编码")
|
||||
private String receiveFactoryNumber;
|
||||
|
||||
@Schema(description = "收货库位名称", example = "张三")
|
||||
private String receiveWarehouseName;
|
||||
|
||||
@Schema(description = "收货库位编码")
|
||||
private String receiveWarehouseNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "赵六")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "计量单位")
|
||||
private String uom;
|
||||
|
||||
@Schema(description = "暂估数量")
|
||||
private BigDecimal forecastQuantity;
|
||||
|
||||
@Schema(description = "含税单价", example = "24704")
|
||||
private BigDecimal inTaxUnitPrice;
|
||||
|
||||
@Schema(description = "交货起始日期")
|
||||
private LocalDateTime deliveryCargoBeginDate;
|
||||
|
||||
@Schema(description = "交货截止日期")
|
||||
private LocalDateTime deliveryCargoEndDate;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private Boolean isEnable;
|
||||
|
||||
@Schema(description = "短文本")
|
||||
private String shortText;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.entrustorder.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 采购订单分页 Request VO")
|
||||
@Data
|
||||
public class EntrustOrderOrderPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "ERP订单号")
|
||||
private String orderSAPNumber;
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private String systemOrderNumber;
|
||||
|
||||
@Schema(description = "公司编码;推送ERP(必须)")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "客商编码;推送ERP(必须)")
|
||||
private String supplierNumber;
|
||||
|
||||
@Schema(description = "客商名称", example = "芋艿")
|
||||
private String supplierName;
|
||||
|
||||
@Schema(description = "订单类型(字典:PRCH_ORD_TP);推送ERP(必须)", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "凭证日期;推送ERP(必须)")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] voucherDate;
|
||||
|
||||
@Schema(description = "采购组织编码;推送ERP(必须)")
|
||||
private String purchaseOrganizationCustomsDeclaration;
|
||||
|
||||
@Schema(description = "收货工厂名称", example = "芋艿")
|
||||
private String receiveFactoryName;
|
||||
|
||||
@Schema(description = "收货工厂编码;推送ERP(必须)")
|
||||
private String receiveFactoryNumber;
|
||||
|
||||
@Schema(description = "收货库位名称", example = "王五")
|
||||
private String receiveWarehouseName;
|
||||
|
||||
@Schema(description = "收货库位编码;推送ERP")
|
||||
private String receiveWarehouseNumber;
|
||||
|
||||
@Schema(description = "采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)")
|
||||
private String purchaseGroup;
|
||||
|
||||
@Schema(description = "货币码(字典:CUR);推送ERP(必须)")
|
||||
private String currencyNumber;
|
||||
|
||||
@Schema(description = "汇率;推送ERP")
|
||||
private BigDecimal exchangeRate;
|
||||
|
||||
@Schema(description = "合同纸质合同号;推送ERP(必须)")
|
||||
private String paperContractNumber;
|
||||
|
||||
@Schema(description = "小协议号;推送ERP")
|
||||
private String agreementNumber;
|
||||
|
||||
@Schema(description = "备注;推送ERP")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "代理方编码;推送ERP")
|
||||
private String agentNumber;
|
||||
|
||||
@Schema(description = "代理方名称", example = "张三")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "订单编码")
|
||||
private String orderNumber;
|
||||
|
||||
@Schema(description = "系统合同编号")
|
||||
private String contractNumber;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "王五")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "合同名称", example = "赵六")
|
||||
private String contractName;
|
||||
|
||||
@Schema(description = "小户头号")
|
||||
private String tenantNumber;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "ERP公司编号")
|
||||
private String erpPurchaseCompanyNumber;
|
||||
|
||||
@Schema(description = "ERP公司名称", example = "王五")
|
||||
private String erpPurchaseCompanyName;
|
||||
|
||||
@Schema(description = "ERP客商公司编码")
|
||||
private String erpSalesCompanyNumber;
|
||||
|
||||
@Schema(description = "ERP客商公司名称", example = "芋艿")
|
||||
private String erpSalesCompanyName;
|
||||
|
||||
@Schema(description = "采购组织名称", example = "赵六")
|
||||
private String purchaseOrganizationName;
|
||||
|
||||
@Schema(description = "ERP状态(字典: ERP_REQ_STS)", example = "2")
|
||||
private String erpStatus;
|
||||
|
||||
@Schema(description = "请求ERP失败原因")
|
||||
private String cause;
|
||||
|
||||
@Schema(description = "订单状态(字典:PRCH_ORD_STS)", example = "2")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "采购组名称", example = "张三")
|
||||
private String purchaseGroupName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.entrustorder.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 采购订单 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EntrustOrderOrderRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6074")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "ERP订单号")
|
||||
@ExcelProperty("ERP订单号")
|
||||
private String orderSAPNumber;
|
||||
|
||||
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("订单号")
|
||||
private String systemOrderNumber;
|
||||
|
||||
@Schema(description = "公司编码;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("公司编码;推送ERP(必须)")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "客商编码;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("客商编码;推送ERP(必须)")
|
||||
private String supplierNumber;
|
||||
|
||||
@Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("客商名称")
|
||||
private String supplierName;
|
||||
|
||||
@Schema(description = "订单类型(字典:PRCH_ORD_TP);推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("订单类型(字典:PRCH_ORD_TP);推送ERP(必须)")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "凭证日期;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("凭证日期;推送ERP(必须)")
|
||||
private LocalDateTime voucherDate;
|
||||
|
||||
@Schema(description = "采购组织编码;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("采购组织编码;推送ERP(必须)")
|
||||
private String purchaseOrganizationCustomsDeclaration;
|
||||
|
||||
@Schema(description = "收货工厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("收货工厂名称")
|
||||
private String receiveFactoryName;
|
||||
|
||||
@Schema(description = "收货工厂编码;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("收货工厂编码;推送ERP(必须)")
|
||||
private String receiveFactoryNumber;
|
||||
|
||||
@Schema(description = "收货库位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("收货库位名称")
|
||||
private String receiveWarehouseName;
|
||||
|
||||
@Schema(description = "收货库位编码;推送ERP", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("收货库位编码;推送ERP")
|
||||
private String receiveWarehouseNumber;
|
||||
|
||||
@Schema(description = "采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)")
|
||||
private String purchaseGroup;
|
||||
|
||||
@Schema(description = "货币码(字典:CUR);推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("货币码(字典:CUR);推送ERP(必须)")
|
||||
private String currencyNumber;
|
||||
|
||||
@Schema(description = "汇率;推送ERP")
|
||||
@ExcelProperty("汇率;推送ERP")
|
||||
private BigDecimal exchangeRate;
|
||||
|
||||
@Schema(description = "合同纸质合同号;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同纸质合同号;推送ERP(必须)")
|
||||
private String paperContractNumber;
|
||||
|
||||
@Schema(description = "小协议号;推送ERP")
|
||||
@ExcelProperty("小协议号;推送ERP")
|
||||
private String agreementNumber;
|
||||
|
||||
@Schema(description = "备注;推送ERP")
|
||||
@ExcelProperty("备注;推送ERP")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "代理方编码;推送ERP")
|
||||
@ExcelProperty("代理方编码;推送ERP")
|
||||
private String agentNumber;
|
||||
|
||||
@Schema(description = "代理方名称", example = "张三")
|
||||
@ExcelProperty("代理方名称")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "订单编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("订单编码")
|
||||
private String orderNumber;
|
||||
|
||||
@Schema(description = "系统合同编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("系统合同编号")
|
||||
private String contractNumber;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@ExcelProperty("物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "王五")
|
||||
@ExcelProperty("物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "合同名称", example = "赵六")
|
||||
@ExcelProperty("合同名称")
|
||||
private String contractName;
|
||||
|
||||
@Schema(description = "小户头号")
|
||||
@ExcelProperty("小户头号")
|
||||
private String tenantNumber;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "ERP公司编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("ERP公司编号")
|
||||
private String erpPurchaseCompanyNumber;
|
||||
|
||||
@Schema(description = "ERP公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("ERP公司名称")
|
||||
private String erpPurchaseCompanyName;
|
||||
|
||||
@Schema(description = "ERP客商公司编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("ERP客商公司编码")
|
||||
private String erpSalesCompanyNumber;
|
||||
|
||||
@Schema(description = "ERP客商公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("ERP客商公司名称")
|
||||
private String erpSalesCompanyName;
|
||||
|
||||
@Schema(description = "采购组织名称", example = "赵六")
|
||||
@ExcelProperty("采购组织名称")
|
||||
private String purchaseOrganizationName;
|
||||
|
||||
@Schema(description = "ERP状态(字典: ERP_REQ_STS)", example = "2")
|
||||
@ExcelProperty("ERP状态(字典: ERP_REQ_STS)")
|
||||
private String erpStatus;
|
||||
|
||||
@Schema(description = "请求ERP失败原因")
|
||||
@ExcelProperty("请求ERP失败原因")
|
||||
private String cause;
|
||||
|
||||
@Schema(description = "订单状态(字典:PRCH_ORD_STS)", example = "2")
|
||||
@ExcelProperty("订单状态(字典:PRCH_ORD_STS)")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "采购组名称", example = "张三")
|
||||
@ExcelProperty("采购组名称")
|
||||
private String purchaseGroupName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.entrustorder.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 采购订单新增/修改 Request VO")
|
||||
@Data
|
||||
public class EntrustOrderOrderSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6074")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "ERP订单号")
|
||||
private String orderSAPNumber;
|
||||
|
||||
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "订单号不能为空")
|
||||
private String systemOrderNumber;
|
||||
|
||||
@Schema(description = "公司编码;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "公司编码;推送ERP(必须)不能为空")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "客商编码;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "客商编码;推送ERP(必须)不能为空")
|
||||
private String supplierNumber;
|
||||
|
||||
@Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "客商名称不能为空")
|
||||
private String supplierName;
|
||||
|
||||
@Schema(description = "订单类型(字典:PRCH_ORD_TP);推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "订单类型(字典:PRCH_ORD_TP);推送ERP(必须)不能为空")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "凭证日期;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "凭证日期;推送ERP(必须)不能为空")
|
||||
private LocalDateTime voucherDate;
|
||||
|
||||
@Schema(description = "采购组织编码;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "采购组织编码;推送ERP(必须)不能为空")
|
||||
private String purchaseOrganizationCustomsDeclaration;
|
||||
|
||||
@Schema(description = "收货工厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "收货工厂名称不能为空")
|
||||
private String receiveFactoryName;
|
||||
|
||||
@Schema(description = "收货工厂编码;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "收货工厂编码;推送ERP(必须)不能为空")
|
||||
private String receiveFactoryNumber;
|
||||
|
||||
@Schema(description = "收货库位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "收货库位名称不能为空")
|
||||
private String receiveWarehouseName;
|
||||
|
||||
@Schema(description = "收货库位编码;推送ERP", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "收货库位编码;推送ERP不能为空")
|
||||
private String receiveWarehouseNumber;
|
||||
|
||||
@Schema(description = "采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)不能为空")
|
||||
private String purchaseGroup;
|
||||
|
||||
@Schema(description = "货币码(字典:CUR);推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "货币码(字典:CUR);推送ERP(必须)不能为空")
|
||||
private String currencyNumber;
|
||||
|
||||
@Schema(description = "汇率;推送ERP")
|
||||
private BigDecimal exchangeRate;
|
||||
|
||||
@Schema(description = "合同纸质合同号;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "合同纸质合同号;推送ERP(必须)不能为空")
|
||||
private String paperContractNumber;
|
||||
|
||||
@Schema(description = "小协议号;推送ERP")
|
||||
private String agreementNumber;
|
||||
|
||||
@Schema(description = "备注;推送ERP")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "代理方编码;推送ERP")
|
||||
private String agentNumber;
|
||||
|
||||
@Schema(description = "代理方名称", example = "张三")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "订单编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "订单编码不能为空")
|
||||
private String orderNumber;
|
||||
|
||||
@Schema(description = "系统合同编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "系统合同编号不能为空")
|
||||
private String contractNumber;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "王五")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "合同名称", example = "赵六")
|
||||
private String contractName;
|
||||
|
||||
@Schema(description = "小户头号")
|
||||
private String tenantNumber;
|
||||
|
||||
@Schema(description = "ERP公司编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "ERP公司编号不能为空")
|
||||
private String erpPurchaseCompanyNumber;
|
||||
|
||||
@Schema(description = "ERP公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "ERP公司名称不能为空")
|
||||
private String erpPurchaseCompanyName;
|
||||
|
||||
@Schema(description = "ERP客商公司编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "ERP客商公司编码不能为空")
|
||||
private String erpSalesCompanyNumber;
|
||||
|
||||
@Schema(description = "ERP客商公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "ERP客商公司名称不能为空")
|
||||
private String erpSalesCompanyName;
|
||||
|
||||
@Schema(description = "采购组织名称", example = "赵六")
|
||||
private String purchaseOrganizationName;
|
||||
|
||||
@Schema(description = "ERP状态(字典: ERP_REQ_STS)", example = "2")
|
||||
private String erpStatus;
|
||||
|
||||
@Schema(description = "请求ERP失败原因")
|
||||
private String cause;
|
||||
|
||||
@Schema(description = "订单状态(字典:PRCH_ORD_STS)", example = "2")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "采购组名称", example = "张三")
|
||||
private String purchaseGroupName;
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.entrustorder;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 委托加工订单明细 DO
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@TableName("bse_entt_ord_dtl")
|
||||
@KeySequence("bse_entt_ord_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class EntrustOrderDetailDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 收货工厂名称
|
||||
*/
|
||||
@TableField("RCV_FACT_NAME")
|
||||
private String receiveFactoryName;
|
||||
/**
|
||||
* 收货工厂编码
|
||||
*/
|
||||
@TableField("RCV_FACT_NUM")
|
||||
private String receiveFactoryNumber;
|
||||
/**
|
||||
* 收货库位名称
|
||||
*/
|
||||
@TableField("RCV_WRH_NAME")
|
||||
private String receiveWarehouseName;
|
||||
/**
|
||||
* 收货库位编码
|
||||
*/
|
||||
@TableField("RCV_WRH_NUM")
|
||||
private String receiveWarehouseNumber;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField("MTRL_NAME")
|
||||
private String materialName;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@TableField("MTRL_NUM")
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
@TableField("UOM")
|
||||
private String uom;
|
||||
/**
|
||||
* 暂估数量
|
||||
*/
|
||||
@TableField("FRCST_QTY")
|
||||
private BigDecimal forecastQuantity;
|
||||
/**
|
||||
* 含税单价
|
||||
*/
|
||||
@TableField("IN_TAX_UPRC")
|
||||
private BigDecimal inTaxUnitPrice;
|
||||
/**
|
||||
* 交货起始日期
|
||||
*/
|
||||
@TableField("DLVY_CGO_BGN_DT")
|
||||
private LocalDateTime deliveryCargoBeginDate;
|
||||
/**
|
||||
* 交货截止日期
|
||||
*/
|
||||
@TableField("DLVY_CGO_END_DT")
|
||||
private LocalDateTime deliveryCargoEndDate;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@TableField("IS_ENB")
|
||||
private Boolean isEnable;
|
||||
/**
|
||||
* 短文本
|
||||
*/
|
||||
@TableField("SHRT_TXT")
|
||||
private String shortText;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.entrustorder;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 采购订单 DO
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@TableName("bse_prch_ord")
|
||||
@KeySequence("bse_prch_ord_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class EntrustOrderOrderDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* ERP订单号
|
||||
*/
|
||||
@TableField("ORD_SAP_NUM")
|
||||
private String orderSAPNumber;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@TableField("SYS_ORD_NUM")
|
||||
private String systemOrderNumber;
|
||||
/**
|
||||
* 公司编码;推送ERP(必须)
|
||||
*/
|
||||
@TableField("CPN_NUM")
|
||||
private String companyNumber;
|
||||
/**
|
||||
* 客商编码;推送ERP(必须)
|
||||
*/
|
||||
@TableField("SPLR_NUM")
|
||||
private String supplierNumber;
|
||||
/**
|
||||
* 客商名称
|
||||
*/
|
||||
@TableField("SPLR_NAME")
|
||||
private String supplierName;
|
||||
/**
|
||||
* 订单类型(字典:PRCH_ORD_TP);推送ERP(必须)
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
/**
|
||||
* 凭证日期;推送ERP(必须)
|
||||
*/
|
||||
@TableField("VCHR_DT")
|
||||
private LocalDateTime voucherDate;
|
||||
/**
|
||||
* 采购组织编码;推送ERP(必须)
|
||||
*/
|
||||
@TableField("PRCH_ORGZ_CD")
|
||||
private String purchaseOrganizationCustomsDeclaration;
|
||||
/**
|
||||
* 收货工厂名称
|
||||
*/
|
||||
@TableField("RCV_FACT_NAME")
|
||||
private String receiveFactoryName;
|
||||
/**
|
||||
* 收货工厂编码;推送ERP(必须)
|
||||
*/
|
||||
@TableField("RCV_FACT_NUM")
|
||||
private String receiveFactoryNumber;
|
||||
/**
|
||||
* 收货库位名称
|
||||
*/
|
||||
@TableField("RCV_WRH_NAME")
|
||||
private String receiveWarehouseName;
|
||||
/**
|
||||
* 收货库位编码;推送ERP
|
||||
*/
|
||||
@TableField("RCV_WRH_NUM")
|
||||
private String receiveWarehouseNumber;
|
||||
/**
|
||||
* 采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)
|
||||
*/
|
||||
@TableField("PRCH_GRP")
|
||||
private String purchaseGroup;
|
||||
/**
|
||||
* 货币码(字典:CUR);推送ERP(必须)
|
||||
*/
|
||||
@TableField("CUR_NUM")
|
||||
private String currencyNumber;
|
||||
/**
|
||||
* 汇率;推送ERP
|
||||
*/
|
||||
@TableField("EXCH_RTE")
|
||||
private BigDecimal exchangeRate;
|
||||
/**
|
||||
* 合同纸质合同号;推送ERP(必须)
|
||||
*/
|
||||
@TableField("PPR_CTRT_NUM")
|
||||
private String paperContractNumber;
|
||||
/**
|
||||
* 小协议号;推送ERP
|
||||
*/
|
||||
@TableField("AGR_NUM")
|
||||
private String agreementNumber;
|
||||
/**
|
||||
* 备注;推送ERP
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
/**
|
||||
* 代理方编码;推送ERP
|
||||
*/
|
||||
@TableField("AGT_NUM")
|
||||
private String agentNumber;
|
||||
/**
|
||||
* 代理方名称
|
||||
*/
|
||||
@TableField("AGT_NAME")
|
||||
private String agentName;
|
||||
/**
|
||||
* 订单编码
|
||||
*/
|
||||
@TableField("ORD_NUM")
|
||||
private String orderNumber;
|
||||
/**
|
||||
* 系统合同编号
|
||||
*/
|
||||
@TableField("CTRT_NUM")
|
||||
private String contractNumber;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@TableField("MTRL_NUM")
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField("MTRL_NAME")
|
||||
private String materialName;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@TableField("CTRT_NAME")
|
||||
private String contractName;
|
||||
/**
|
||||
* 小户头号
|
||||
*/
|
||||
@TableField("TNT_NUM")
|
||||
private String tenantNumber;
|
||||
/**
|
||||
* ERP公司编号
|
||||
*/
|
||||
@TableField("ERP_PRCH_CPN_NUM")
|
||||
private String erpPurchaseCompanyNumber;
|
||||
/**
|
||||
* ERP公司名称
|
||||
*/
|
||||
@TableField("ERP_PRCH_CPN_NAME")
|
||||
private String erpPurchaseCompanyName;
|
||||
/**
|
||||
* ERP客商公司编码
|
||||
*/
|
||||
@TableField("ERP_SALE_CPN_NUM")
|
||||
private String erpSalesCompanyNumber;
|
||||
/**
|
||||
* ERP客商公司名称
|
||||
*/
|
||||
@TableField("ERP_SALE_CPN_NAME")
|
||||
private String erpSalesCompanyName;
|
||||
/**
|
||||
* 采购组织名称
|
||||
*/
|
||||
@TableField("PRCH_ORGZ_NAME")
|
||||
private String purchaseOrganizationName;
|
||||
/**
|
||||
* ERP状态(字典: ERP_REQ_STS)
|
||||
*/
|
||||
@TableField("ERP_STS")
|
||||
private String erpStatus;
|
||||
/**
|
||||
* 请求ERP失败原因
|
||||
*/
|
||||
@TableField("CAUS")
|
||||
private String cause;
|
||||
/**
|
||||
* 订单状态(字典:PRCH_ORD_STS)
|
||||
*/
|
||||
@TableField("STS")
|
||||
private String status;
|
||||
/**
|
||||
* 采购组名称
|
||||
*/
|
||||
@TableField("PRCH_GRP_NAME")
|
||||
private String purchaseGroupName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.entrustorder;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderDetailPageReqVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.entrustorder.EntrustOrderDetailDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 委托加工订单明细 Mapper
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@Mapper
|
||||
public interface EntrustOrderDetailMapper extends BaseMapperX<EntrustOrderDetailDO> {
|
||||
|
||||
default PageResult<EntrustOrderDetailDO> selectPage(EntrustOrderDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<EntrustOrderDetailDO>()
|
||||
.likeIfPresent(EntrustOrderDetailDO::getReceiveFactoryName, reqVO.getReceiveFactoryName())
|
||||
.eqIfPresent(EntrustOrderDetailDO::getReceiveFactoryNumber, reqVO.getReceiveFactoryNumber())
|
||||
.likeIfPresent(EntrustOrderDetailDO::getReceiveWarehouseName, reqVO.getReceiveWarehouseName())
|
||||
.eqIfPresent(EntrustOrderDetailDO::getReceiveWarehouseNumber, reqVO.getReceiveWarehouseNumber())
|
||||
.likeIfPresent(EntrustOrderDetailDO::getMaterialName, reqVO.getMaterialName())
|
||||
.eqIfPresent(EntrustOrderDetailDO::getMaterialNumber, reqVO.getMaterialNumber())
|
||||
.eqIfPresent(EntrustOrderDetailDO::getUom, reqVO.getUom())
|
||||
.eqIfPresent(EntrustOrderDetailDO::getForecastQuantity, reqVO.getForecastQuantity())
|
||||
.eqIfPresent(EntrustOrderDetailDO::getInTaxUnitPrice, reqVO.getInTaxUnitPrice())
|
||||
.betweenIfPresent(EntrustOrderDetailDO::getDeliveryCargoBeginDate, reqVO.getDeliveryCargoBeginDate())
|
||||
.betweenIfPresent(EntrustOrderDetailDO::getDeliveryCargoEndDate, reqVO.getDeliveryCargoEndDate())
|
||||
.eqIfPresent(EntrustOrderDetailDO::getIsEnable, reqVO.getIsEnable())
|
||||
.eqIfPresent(EntrustOrderDetailDO::getShortText, reqVO.getShortText())
|
||||
.betweenIfPresent(EntrustOrderDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(EntrustOrderDetailDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.entrustorder;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderOrderPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderOrderSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderPageReqVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.entrustorder.EntrustOrderOrderDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* Mapper
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@Mapper
|
||||
public interface EntrustOrderOrderMapper extends BaseMapperX<EntrustOrderOrderDO> {
|
||||
|
||||
default PageResult<EntrustOrderOrderDO> selectPage(EntrustOrderOrderPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<EntrustOrderOrderDO>()
|
||||
.eqIfPresent(EntrustOrderOrderDO::getOrderSAPNumber, reqVO.getOrderSAPNumber())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getSystemOrderNumber, reqVO.getSystemOrderNumber())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getCompanyNumber, reqVO.getCompanyNumber())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getSupplierNumber, reqVO.getSupplierNumber())
|
||||
.likeIfPresent(EntrustOrderOrderDO::getSupplierName, reqVO.getSupplierName())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getType, reqVO.getType())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getVoucherDate, reqVO.getVoucherDate())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getPurchaseOrganizationCustomsDeclaration, reqVO.getPurchaseOrganizationCustomsDeclaration())
|
||||
.likeIfPresent(EntrustOrderOrderDO::getReceiveFactoryName, reqVO.getReceiveFactoryName())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getReceiveFactoryNumber, reqVO.getReceiveFactoryNumber())
|
||||
.likeIfPresent(EntrustOrderOrderDO::getReceiveWarehouseName, reqVO.getReceiveWarehouseName())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getReceiveWarehouseNumber, reqVO.getReceiveWarehouseNumber())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getPurchaseGroup, reqVO.getPurchaseGroup())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getCurrencyNumber, reqVO.getCurrencyNumber())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getExchangeRate, reqVO.getExchangeRate())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getPaperContractNumber, reqVO.getPaperContractNumber())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getAgreementNumber, reqVO.getAgreementNumber())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getAgentNumber, reqVO.getAgentNumber())
|
||||
.likeIfPresent(EntrustOrderOrderDO::getAgentName, reqVO.getAgentName())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getOrderNumber, reqVO.getOrderNumber())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getContractNumber, reqVO.getContractNumber())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getMaterialNumber, reqVO.getMaterialNumber())
|
||||
.likeIfPresent(EntrustOrderOrderDO::getMaterialName, reqVO.getMaterialName())
|
||||
.likeIfPresent(EntrustOrderOrderDO::getContractName, reqVO.getContractName())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getTenantNumber, reqVO.getTenantNumber())
|
||||
.betweenIfPresent(EntrustOrderOrderDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getErpPurchaseCompanyNumber, reqVO.getErpPurchaseCompanyNumber())
|
||||
.likeIfPresent(EntrustOrderOrderDO::getErpPurchaseCompanyName, reqVO.getErpPurchaseCompanyName())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getErpSalesCompanyNumber, reqVO.getErpSalesCompanyNumber())
|
||||
.likeIfPresent(EntrustOrderOrderDO::getErpSalesCompanyName, reqVO.getErpSalesCompanyName())
|
||||
.likeIfPresent(EntrustOrderOrderDO::getPurchaseOrganizationName, reqVO.getPurchaseOrganizationName())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getErpStatus, reqVO.getErpStatus())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getCause, reqVO.getCause())
|
||||
.eqIfPresent(EntrustOrderOrderDO::getStatus, reqVO.getStatus())
|
||||
.likeIfPresent(EntrustOrderOrderDO::getPurchaseGroupName, reqVO.getPurchaseGroupName())
|
||||
.orderByDesc(EntrustOrderOrderDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.zt.plat.module.contractorder.service.entrustorder;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderDetailPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderDetailRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderDetailSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.entrustorder.EntrustOrderDetailDO;
|
||||
import jakarta.validation.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 委托加工订单明细 Service 接口
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
public interface EntrustOrderDetailService {
|
||||
|
||||
/**
|
||||
* 创建委托加工订单明细
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
EntrustOrderDetailRespVO createEntrustOrderDetail(@Valid EntrustOrderDetailSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新委托加工订单明细
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateEntrustOrderDetail(@Valid EntrustOrderDetailSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除委托加工订单明细
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteEntrustOrderDetail(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除委托加工订单明细
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteEntrustOrderDetailListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得委托加工订单明细
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 委托加工订单明细
|
||||
*/
|
||||
EntrustOrderDetailDO getEntrustOrderDetail(Long id);
|
||||
|
||||
/**
|
||||
* 获得委托加工订单明细分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 委托加工订单明细分页
|
||||
*/
|
||||
PageResult<EntrustOrderDetailDO> getEntrustOrderDetailPage(EntrustOrderDetailPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.zt.plat.module.contractorder.service.entrustorder;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderDetailPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderDetailRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderDetailSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.entrustorder.EntrustOrderDetailDO;
|
||||
import com.zt.plat.module.contractorder.dal.mysql.entrustorder.EntrustOrderDetailMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
|
||||
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.contractorder.enums.entrustorder.ErrorCodeConstants.ENTRUST_ORDER_DETAIL_NOT_EXISTS;
|
||||
|
||||
|
||||
/**
|
||||
* 委托加工订单明细 Service 实现类
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class EntrustOrderDetailServiceImpl implements EntrustOrderDetailService {
|
||||
|
||||
@Resource
|
||||
private EntrustOrderDetailMapper entrustOrderDetailMapper;
|
||||
|
||||
@Override
|
||||
public EntrustOrderDetailRespVO createEntrustOrderDetail(EntrustOrderDetailSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
EntrustOrderDetailDO entrustOrderDetail = BeanUtils.toBean(createReqVO, EntrustOrderDetailDO.class);
|
||||
entrustOrderDetailMapper.insert(entrustOrderDetail);
|
||||
// 返回
|
||||
return BeanUtils.toBean(entrustOrderDetail, EntrustOrderDetailRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntrustOrderDetail(EntrustOrderDetailSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateEntrustOrderDetailExists(updateReqVO.getId());
|
||||
// 更新
|
||||
EntrustOrderDetailDO updateObj = BeanUtils.toBean(updateReqVO, EntrustOrderDetailDO.class);
|
||||
entrustOrderDetailMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteEntrustOrderDetail(Long id) {
|
||||
// 校验存在
|
||||
validateEntrustOrderDetailExists(id);
|
||||
// 删除
|
||||
entrustOrderDetailMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteEntrustOrderDetailListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateEntrustOrderDetailExists(ids);
|
||||
// 删除
|
||||
entrustOrderDetailMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateEntrustOrderDetailExists(List<Long> ids) {
|
||||
List<EntrustOrderDetailDO> list = entrustOrderDetailMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(ENTRUST_ORDER_DETAIL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateEntrustOrderDetailExists(Long id) {
|
||||
if (entrustOrderDetailMapper.selectById(id) == null) {
|
||||
throw exception(ENTRUST_ORDER_DETAIL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntrustOrderDetailDO getEntrustOrderDetail(Long id) {
|
||||
return entrustOrderDetailMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<EntrustOrderDetailDO> getEntrustOrderDetailPage(EntrustOrderDetailPageReqVO pageReqVO) {
|
||||
return entrustOrderDetailMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.zt.plat.module.contractorder.service.entrustorder;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderOrderPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderOrderRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderOrderSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.DownOrUpOrderReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.DownOrUpOrderRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.LinkOrderReqVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.entrustorder.EntrustOrderOrderDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购订单 Service 接口
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
public interface EntrustOrderOrderService {
|
||||
|
||||
/**
|
||||
* 创建采购订单
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
EntrustOrderOrderRespVO createEntrustOrderOrder(@Valid EntrustOrderOrderSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新采购订单
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateEntrustOrderOrder(@Valid EntrustOrderOrderSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除采购订单
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteEntrustOrderOrder(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除采购订单
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteEntrustOrderOrderListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得采购订单
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 采购订单
|
||||
*/
|
||||
EntrustOrderOrderDO getEntrustOrderOrder(Long id);
|
||||
|
||||
/**
|
||||
* 获得采购订单分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 采购订单分页
|
||||
*/
|
||||
PageResult<EntrustOrderOrderDO> getEntrustOrderOrderPage(EntrustOrderOrderPageReqVO pageReqVO);
|
||||
/**
|
||||
* 关联订单
|
||||
*
|
||||
* @param req 关联订单请求
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean linkOrder(LinkOrderReqVO req);
|
||||
/**
|
||||
* 获取上或下游订单
|
||||
*
|
||||
* @param reqVO 查询条件
|
||||
* @return 上或下游订单
|
||||
*/
|
||||
List<DownOrUpOrderRespVO> getOrderByOrderIdAndType(DownOrUpOrderReqVO reqVO);
|
||||
/**
|
||||
* 获取关联订单
|
||||
*
|
||||
* @param reqVO 查询条件
|
||||
* @return 关联订单
|
||||
*/
|
||||
List<EntrustOrderOrderRespVO> getBindOrderByOrder(DownOrUpOrderReqVO reqVO);
|
||||
/**
|
||||
* 关闭订单
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean closeOrder(Long id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.zt.plat.module.contractorder.service.entrustorder;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.ContractRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderOrderPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderOrderRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.entrustorder.vo.EntrustOrderOrderSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.DownOrUpOrderReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.DownOrUpOrderRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.LinkOrderReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderRespVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.SystemRelativityDO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.entrustorder.EntrustOrderOrderDO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import com.zt.plat.module.contractorder.dal.mysql.contract.SystemRelativityMapper;
|
||||
import com.zt.plat.module.contractorder.dal.mysql.entrustorder.EntrustOrderOrderMapper;
|
||||
import com.zt.plat.module.contractorder.enums.contract.DictEnum;
|
||||
import com.zt.plat.module.contractorder.service.contract.ContractService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.contractorder.enums.ErrorCodeConstants.CONTRACT_ORDER_EXISTS;
|
||||
import static com.zt.plat.module.contractorder.enums.entrustorder.ErrorCodeConstants.ENTRUST_ORDER_NOT_EXISTS;
|
||||
import static com.zt.plat.module.contractorder.enums.purchaseorder.ErrorCodeConstants.PURCHASE_ORDER_NOT_EXISTS;
|
||||
|
||||
|
||||
/**
|
||||
* 采购订单 Service 实现类
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class EntrustOrderOrderServiceImplImpl implements EntrustOrderOrderService {
|
||||
|
||||
@Resource
|
||||
private EntrustOrderOrderMapper entrustOrderOrderMapper;
|
||||
|
||||
@Resource
|
||||
private SystemRelativityMapper systemRelativityMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private ContractService contractService;
|
||||
|
||||
@Override
|
||||
public EntrustOrderOrderRespVO createEntrustOrderOrder(EntrustOrderOrderSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
EntrustOrderOrderDO EntrustOrderOrder = BeanUtils.toBean(createReqVO, EntrustOrderOrderDO.class);
|
||||
entrustOrderOrderMapper.insert(EntrustOrderOrder);
|
||||
// 返回
|
||||
return BeanUtils.toBean(EntrustOrderOrder, EntrustOrderOrderRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntrustOrderOrder(EntrustOrderOrderSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateEntrustOrderOrderExists(updateReqVO.getId());
|
||||
// 更新
|
||||
EntrustOrderOrderDO updateObj = BeanUtils.toBean(updateReqVO, EntrustOrderOrderDO.class);
|
||||
entrustOrderOrderMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteEntrustOrderOrder(Long id) {
|
||||
// 校验存在
|
||||
validateEntrustOrderOrderExists(id);
|
||||
// 删除
|
||||
entrustOrderOrderMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteEntrustOrderOrderListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateEntrustOrderOrderExists(ids);
|
||||
// 删除
|
||||
entrustOrderOrderMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateEntrustOrderOrderExists(List<Long> ids) {
|
||||
List<EntrustOrderOrderDO> list = entrustOrderOrderMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(ENTRUST_ORDER_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateEntrustOrderOrderExists(Long id) {
|
||||
if (entrustOrderOrderMapper.selectById(id) == null) {
|
||||
throw exception(ENTRUST_ORDER_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntrustOrderOrderDO getEntrustOrderOrder(Long id) {
|
||||
return entrustOrderOrderMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<EntrustOrderOrderDO> getEntrustOrderOrderPage(EntrustOrderOrderPageReqVO pageReqVO) {
|
||||
return entrustOrderOrderMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean linkOrder(LinkOrderReqVO req) {
|
||||
SystemRelativityDO saveDO = new SystemRelativityDO();
|
||||
saveDO.setStatus(DictEnum.BSE_SYS_REL_TP_ORDER.getCode());
|
||||
saveDO.setUpId(req.getUpOrderId());
|
||||
saveDO.setDownId(req.getDownOrderId());
|
||||
//判断订单有没有关联过
|
||||
if (systemRelativityMapper.selectCount(new LambdaQueryWrapper<SystemRelativityDO>().eq(SystemRelativityDO::getUpId, saveDO.getUpId()).eq(SystemRelativityDO::getDownId, saveDO.getDownId())) > 0) {
|
||||
throw exception(CONTRACT_ORDER_EXISTS);
|
||||
}
|
||||
return systemRelativityMapper.insert(saveDO) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DownOrUpOrderRespVO> getOrderByOrderIdAndType(DownOrUpOrderReqVO reqVO) {
|
||||
EntrustOrderOrderDO entrustOrderOrderDO = entrustOrderOrderMapper.selectById(reqVO.getOrderId());
|
||||
if (entrustOrderOrderDO == null) {
|
||||
throw exception(PURCHASE_ORDER_NOT_EXISTS);
|
||||
}
|
||||
String contractNumber = entrustOrderOrderDO.getContractNumber();// 合同号
|
||||
ContractRespVO contractRespVO = contractService.getBySystemContractNumber(contractNumber);
|
||||
|
||||
ContractRespVO upRelation = null;
|
||||
if ("up".equals(reqVO.getOrderType())) {
|
||||
log.info("获取上游订单");
|
||||
//上游
|
||||
upRelation = contractService.getUpRelation(contractRespVO.getId());
|
||||
} else {
|
||||
//下游
|
||||
log.info("获取下游订单");
|
||||
upRelation = contractService.getDownRelation(contractRespVO.getId());
|
||||
}
|
||||
List<DownOrUpOrderRespVO> orderList = new ArrayList<>();
|
||||
if (upRelation != null) {
|
||||
String systemContractNumber = upRelation.getSystemContractNumber();
|
||||
|
||||
List<EntrustOrderOrderDO> entrustOrderOrderDOS = entrustOrderOrderMapper.selectList(new LambdaQueryWrapper<EntrustOrderOrderDO>().eq(EntrustOrderOrderDO::getContractNumber, systemContractNumber));
|
||||
entrustOrderOrderDOS.forEach(p -> {
|
||||
DownOrUpOrderRespVO downOrUpOrderRespVO = new DownOrUpOrderRespVO();
|
||||
downOrUpOrderRespVO.setOrderId(String.valueOf(p.getId()));
|
||||
downOrUpOrderRespVO.setOrderNo(p.getSystemOrderNumber());
|
||||
downOrUpOrderRespVO.setOrderType(reqVO.getOrderType());
|
||||
downOrUpOrderRespVO.setContractId(String.valueOf(p.getId()));
|
||||
downOrUpOrderRespVO.setContractName(p.getContractName());
|
||||
downOrUpOrderRespVO.setContractNumber(p.getContractNumber());
|
||||
downOrUpOrderRespVO.setOrder(BeanUtils.toBean(p, PurchaseOrderRespVO.class));
|
||||
orderList.add(downOrUpOrderRespVO);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
return orderList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EntrustOrderOrderRespVO> getBindOrderByOrder(DownOrUpOrderReqVO reqVO) {
|
||||
List<EntrustOrderOrderRespVO> orderList = new ArrayList<>();
|
||||
if ("up".equals(reqVO.getOrderType())) {
|
||||
log.info("获取上游订单");
|
||||
//上游
|
||||
List<SystemRelativityDO> systemRelativityDOS = systemRelativityMapper.selectList(new LambdaQueryWrapper<SystemRelativityDO>().eq(SystemRelativityDO::getDownId, reqVO.getOrderId()));
|
||||
if (!systemRelativityDOS.isEmpty()) {
|
||||
List<EntrustOrderOrderDO> entrustOrderOrderDOS = entrustOrderOrderMapper.selectByIds(systemRelativityDOS.stream().map(SystemRelativityDO::getUpId).toList());
|
||||
orderList = BeanUtils.toBean(entrustOrderOrderDOS, EntrustOrderOrderRespVO.class);
|
||||
}
|
||||
} else {
|
||||
//下游
|
||||
log.info("获取下游订单");
|
||||
List<SystemRelativityDO> systemRelativityDOS = systemRelativityMapper.selectList(new LambdaQueryWrapper<SystemRelativityDO>().eq(SystemRelativityDO::getUpId, reqVO.getOrderId()));
|
||||
if (!systemRelativityDOS.isEmpty()) {
|
||||
List<EntrustOrderOrderDO> purchaseOrderDOS = entrustOrderOrderMapper.selectByIds(systemRelativityDOS.stream().map(SystemRelativityDO::getDownId).toList());
|
||||
orderList = BeanUtils.toBean(purchaseOrderDOS, EntrustOrderOrderRespVO.class);
|
||||
}
|
||||
}
|
||||
return orderList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean closeOrder(Long id) {
|
||||
EntrustOrderOrderDO updateObj = new EntrustOrderOrderDO();
|
||||
updateObj.setStatus("closed");
|
||||
return entrustOrderOrderMapper.updateById(updateObj) > 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -67,9 +67,17 @@ public class PrchOrdDtlServiceImpl implements PrchOrdDtlService {
|
||||
}
|
||||
|
||||
private void setElemInfo(PrchOrdDtlDO prchOrdDtl) {
|
||||
if (prchOrdDtl.getElemAbbr() == null){
|
||||
return;
|
||||
}
|
||||
ElementDO elementBySymbol = elementService.getElementBySymbol(prchOrdDtl.getElemAbbr());
|
||||
if (elementBySymbol != null){
|
||||
prchOrdDtl.setElemName(elementBySymbol.getName());
|
||||
prchOrdDtl.setElemCdg(elementBySymbol.getCoding());
|
||||
}else {
|
||||
log.warn("元素【{}】不存在,订单ID【{}】", prchOrdDtl.getElemAbbr(), prchOrdDtl.getOrdId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PrchOrdDtlD
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.salesorder.SalesOrderDetailDO;
|
||||
import com.zt.plat.module.contractorder.dal.mysql.salesorder.SalesOrderDetailMapper;
|
||||
import com.zt.plat.module.receivedeliver.api.bill.BillMainApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -38,6 +39,7 @@ import static com.zt.plat.module.contractorder.enums.salesorder.ErrorCodeConstan
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class SalesOrderDetailServiceImpl implements SalesOrderDetailService {
|
||||
|
||||
@Resource
|
||||
@@ -61,10 +63,16 @@ public class SalesOrderDetailServiceImpl implements SalesOrderDetailService {
|
||||
}
|
||||
|
||||
private void setElemInfo(SalesOrderDetailDO salesOrderDetail) {
|
||||
if (salesOrderDetail.getElementAbbreviation() == null) {
|
||||
return;
|
||||
}
|
||||
ElementDO elementBySymbol = elementService.getElementBySymbol(salesOrderDetail.getElementAbbreviation());
|
||||
if (elementBySymbol!=null){
|
||||
salesOrderDetail.setElementName(elementBySymbol.getName());
|
||||
salesOrderDetail.setElementNumber(elementBySymbol.getCoding());
|
||||
|
||||
}else {
|
||||
log.warn("元素编号【{}】不存在,订单号【{}】", salesOrderDetail.getElementAbbreviation(), salesOrderDetail.getOrderId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.bse.dal.dao.entrustorderdetail.EntrustOrderDetailMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user