采购计划-2
This commit is contained in:
1 parent
22de433d1d
commit
6f57d7d8f9
17 files changed
+714
-53
No files matched your search
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.bsd.pjcloud.supermarket.dto.puchase;
|
||||
package com.bsd.pjcloud.supermarket.dto.cgplan;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
+17
-45
@@ -1,4 +1,4 @@
|
||||
package com.bsd.pjcloud.supermarket.dto.puchase;
|
||||
package com.bsd.pjcloud.supermarket.dto.cgplan;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
@@ -24,28 +24,16 @@ public class ErpPurchaseSaveDTO {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编号
|
||||
* 采购计划编号
|
||||
*/
|
||||
@Schema(description="单据编号")
|
||||
private String orderCode;
|
||||
@Schema(description="采购计划编号")
|
||||
private String planCode;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
* 采购计划单据日期
|
||||
*/
|
||||
@Schema(description="单据日期")
|
||||
private LocalDate orderDate;
|
||||
|
||||
/**
|
||||
* 单据类型(字典inventory_type)
|
||||
*/
|
||||
@Schema(description="单据类型(字典inventory_type)")
|
||||
private String inventoryType;
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
@Schema(description="商品id")
|
||||
private Long erpSpuId;
|
||||
@Schema(description="采购计划单据日期")
|
||||
private LocalDate planDate;
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
@@ -90,35 +78,17 @@ public class ErpPurchaseSaveDTO {
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 出入库数量
|
||||
* 累计进货数量
|
||||
*/
|
||||
@Schema(description="出入库数量")
|
||||
private Integer quantity;
|
||||
@Schema(description="累计进货数量")
|
||||
private Integer totalNumber;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
* 累计总金额
|
||||
*/
|
||||
@Schema(description="单价")
|
||||
private Integer unitPrice;
|
||||
|
||||
/**
|
||||
* 总金额
|
||||
*/
|
||||
@Schema(description="总金额")
|
||||
@Schema(description="累计总金额")
|
||||
private Integer totalAmount;
|
||||
|
||||
/**
|
||||
* 税率%
|
||||
*/
|
||||
@Schema(description="税率%")
|
||||
private Integer taxRate;
|
||||
|
||||
/**
|
||||
* 税前金额
|
||||
*/
|
||||
@Schema(description="税前金额")
|
||||
private Integer taxAmount;
|
||||
|
||||
/**
|
||||
* 货商
|
||||
*/
|
||||
@@ -138,10 +108,12 @@ public class ErpPurchaseSaveDTO {
|
||||
private String orderNumber;
|
||||
|
||||
/**
|
||||
* 订单类型(1入库 2出库)
|
||||
* 创建人
|
||||
*/
|
||||
@Schema(description="订单类型(1入库 2出库)")
|
||||
private String orderType;
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
package com.bsd.pjcloud.supermarket.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.supermarket.constant.OrderTypeEnum;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgplan.ErpPurchaseDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgplan.ErpPurchaseSaveDTO;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpCgPlanEntity;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpInventoryRecordsEntity;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpCgPlanService;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpSpuService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 采购计划
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-02-11 15:45:28
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/smErpCgPlan" )
|
||||
@Tag(description = "smErpCgPlan" , name = "采购计划管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class SmErpCgPlanController {
|
||||
|
||||
private final SmErpCgPlanService smErpCgPlanService;
|
||||
|
||||
private final SmErpSpuService smErpSpuService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param smErpCgPlan 采购计划
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlan_view')" )
|
||||
public R getSmErpCgPlanPage(@ParameterObject Page page, @ParameterObject SmErpCgPlanEntity smErpCgPlan) {
|
||||
LambdaQueryWrapper<SmErpCgPlanEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.like(StrUtil.isNotBlank(smErpCgPlan.getPlanCode()),SmErpCgPlanEntity::getPlanCode,smErpCgPlan.getPlanCode());
|
||||
wrapper.eq(Objects.nonNull(smErpCgPlan.getPlanDate()),SmErpCgPlanEntity::getPlanDate,smErpCgPlan.getPlanDate());
|
||||
wrapper.eq(Objects.nonNull(smErpCgPlan.getHandlerUserId()),SmErpCgPlanEntity::getHandlerUserId,smErpCgPlan.getHandlerUserId());
|
||||
wrapper.eq(StrUtil.isNotBlank(smErpCgPlan.getCheckStatus()),SmErpCgPlanEntity::getCheckStatus,smErpCgPlan.getCheckStatus());
|
||||
return R.ok(smErpCgPlanService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 采购计划选择商品分页数据
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/erpSpuPage" )
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpInventoryRecords_view')" )
|
||||
public R getErpSpuPage(@ParameterObject Page page, @ParameterObject ErpPurchaseDTO erpPurchaseDTO) {
|
||||
return R.ok(smErpSpuService.getErpSpuPage(page, erpPurchaseDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购计划
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增采购计划" , description = "新增采购计划" )
|
||||
@SysLog("新增采购计划" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlan_add')" )
|
||||
public R save(@RequestBody ErpPurchaseSaveDTO erpPurchaseSaveDTO) {
|
||||
return R.ok(smErpCgPlanService.saveCgplan(erpPurchaseSaveDTO));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询采购计划
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlan_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(smErpCgPlanService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购计划
|
||||
* @param smErpCgPlan 采购计划
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改采购计划" , description = "修改采购计划" )
|
||||
@SysLog("修改采购计划" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlan_edit')" )
|
||||
public R updateById(@RequestBody SmErpCgPlanEntity smErpCgPlan) {
|
||||
return R.ok(smErpCgPlanService.updateById(smErpCgPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除采购计划
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除采购计划" , description = "通过id删除采购计划" )
|
||||
@SysLog("通过id删除采购计划" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlan_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(smErpCgPlanService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param smErpCgPlan 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlan_export')" )
|
||||
public List<SmErpCgPlanEntity> export(SmErpCgPlanEntity smErpCgPlan,Long[] ids) {
|
||||
return smErpCgPlanService.list(Wrappers.lambdaQuery(smErpCgPlan).in(ArrayUtil.isNotEmpty(ids), SmErpCgPlanEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
package com.bsd.pjcloud.supermarket.controller;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpCgPlanItemEntity;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpCgPlanItemService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 采购计划-item
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-02-11 17:11:41
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/smErpCgPlanItem" )
|
||||
@Tag(description = "smErpCgPlanItem" , name = "采购计划-item管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class SmErpCgPlanItemController {
|
||||
|
||||
private final SmErpCgPlanItemService smErpCgPlanItemService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param smErpCgPlanItem 采购计划-item
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlanItem_view')" )
|
||||
public R getSmErpCgPlanItemPage(@ParameterObject Page page, @ParameterObject SmErpCgPlanItemEntity smErpCgPlanItem) {
|
||||
LambdaQueryWrapper<SmErpCgPlanItemEntity> wrapper = Wrappers.lambdaQuery();
|
||||
return R.ok(smErpCgPlanItemService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询采购计划-item
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlanItem_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(smErpCgPlanItemService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购计划-item
|
||||
* @param smErpCgPlanItem 采购计划-item
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增采购计划-item" , description = "新增采购计划-item" )
|
||||
@SysLog("新增采购计划-item" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlanItem_add')" )
|
||||
public R save(@RequestBody SmErpCgPlanItemEntity smErpCgPlanItem) {
|
||||
return R.ok(smErpCgPlanItemService.save(smErpCgPlanItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购计划-item
|
||||
* @param smErpCgPlanItem 采购计划-item
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改采购计划-item" , description = "修改采购计划-item" )
|
||||
@SysLog("修改采购计划-item" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlanItem_edit')" )
|
||||
public R updateById(@RequestBody SmErpCgPlanItemEntity smErpCgPlanItem) {
|
||||
return R.ok(smErpCgPlanItemService.updateById(smErpCgPlanItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除采购计划-item
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除采购计划-item" , description = "通过id删除采购计划-item" )
|
||||
@SysLog("通过id删除采购计划-item" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlanItem_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(smErpCgPlanItemService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param smErpCgPlanItem 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlanItem_export')" )
|
||||
public List<SmErpCgPlanItemEntity> export(SmErpCgPlanItemEntity smErpCgPlanItem,Long[] ids) {
|
||||
return smErpCgPlanItemService.list(Wrappers.lambdaQuery(smErpCgPlanItem).in(ArrayUtil.isNotEmpty(ids), SmErpCgPlanItemEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+2
-5
@@ -2,8 +2,6 @@ package com.bsd.pjcloud.supermarket.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
@@ -11,8 +9,8 @@ import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.supermarket.constant.OrderTypeEnum;
|
||||
import com.bsd.pjcloud.supermarket.dto.puchase.ErpPurchaseDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.puchase.ErpPurchaseSaveDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgplan.ErpPurchaseDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgplan.ErpPurchaseSaveDTO;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpInventoryRecordsEntity;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpInventoryRecordsService;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpSpuService;
|
||||
@@ -26,7 +24,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 采购计划
|
||||
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
package com.bsd.pjcloud.supermarket.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 采购计划
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-02-11 15:45:28
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("sm_erp_cg_plan")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "采购计划")
|
||||
public class SmErpCgPlanEntity extends Model<SmErpCgPlanEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 采购计划编号
|
||||
*/
|
||||
@Schema(description="采购计划编号")
|
||||
private String planCode;
|
||||
|
||||
/**
|
||||
* 采购计划单据日期
|
||||
*/
|
||||
@Schema(description="采购计划单据日期")
|
||||
private LocalDate planDate;
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
@Schema(description="仓库id")
|
||||
private String warehouseId;
|
||||
|
||||
/**
|
||||
* 经办人id
|
||||
*/
|
||||
@Schema(description="经办人id")
|
||||
private Long handlerUserId;
|
||||
|
||||
/**
|
||||
* 审批状态
|
||||
*/
|
||||
@Schema(description="审批状态")
|
||||
private String checkStatus;
|
||||
|
||||
/**
|
||||
* 审批人id
|
||||
*/
|
||||
@Schema(description="审批人id")
|
||||
private String checkUserId;
|
||||
|
||||
/**
|
||||
* 审核日期
|
||||
*/
|
||||
@Schema(description="审核日期")
|
||||
private LocalDateTime checkTime;
|
||||
|
||||
/**
|
||||
* 商户编号
|
||||
*/
|
||||
@Schema(description="商户编号")
|
||||
private Long merchantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 出入库数量
|
||||
*/
|
||||
@Schema(description="出入库数量")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* 累计进货数量
|
||||
*/
|
||||
@Schema(description="累计进货数量")
|
||||
private Integer totalNumber;
|
||||
|
||||
/**
|
||||
* 累计总金额
|
||||
*/
|
||||
@Schema(description="累计总金额")
|
||||
private Integer totalAmount;
|
||||
|
||||
/**
|
||||
* 货商
|
||||
*/
|
||||
@Schema(description="货商")
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description="备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@Schema(description="订单编号")
|
||||
private String orderNumber;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="是否删除")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.bsd.pjcloud.supermarket.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 采购计划-item
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-02-11 17:11:41
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("sm_erp_cg_plan_item")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "采购计划-item")
|
||||
public class SmErpCgPlanItemEntity extends Model<SmErpCgPlanItemEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 采购id
|
||||
*/
|
||||
@Schema(description="采购id")
|
||||
private String planId;
|
||||
|
||||
/**
|
||||
* 库存商品id
|
||||
*/
|
||||
@Schema(description="库存商品id")
|
||||
private Long erpSpuId;
|
||||
|
||||
/**
|
||||
* 商户编号
|
||||
*/
|
||||
@Schema(description="商户编号")
|
||||
private Long merchantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@Schema(description="数量")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* 进价
|
||||
*/
|
||||
@Schema(description="进价")
|
||||
private Integer unitPrice;
|
||||
|
||||
/**
|
||||
* 累计总金额
|
||||
*/
|
||||
@Schema(description="累计总金额")
|
||||
private Integer totalAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description="备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 包装单位id
|
||||
*/
|
||||
@Schema(description="包装单位id")
|
||||
private Long unitId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="是否删除")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.supermarket.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpCgPlanItemEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface SmErpCgPlanItemMapper extends PjcloudBaseMapper<SmErpCgPlanItemEntity> {
|
||||
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.supermarket.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpCgPlanEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface SmErpCgPlanMapper extends PjcloudBaseMapper<SmErpCgPlanEntity> {
|
||||
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.supermarket.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpCgPlanItemEntity;
|
||||
|
||||
public interface SmErpCgPlanItemService extends IService<SmErpCgPlanItemEntity> {
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.bsd.pjcloud.supermarket.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgplan.ErpPurchaseSaveDTO;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpCgPlanEntity;
|
||||
|
||||
public interface SmErpCgPlanService extends IService<SmErpCgPlanEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 新增采购计划
|
||||
* @param erpPurchaseSaveDTO
|
||||
* @return
|
||||
*/
|
||||
Object saveCgplan(ErpPurchaseSaveDTO erpPurchaseSaveDTO);
|
||||
}
|
||||
+1
-1
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.supermarket.dto.SupermarketSpuQueryDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.SupermarketSpuUpdateStockReqDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.puchase.ErpPurchaseDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgplan.ErpPurchaseDTO;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpSpuEntity;
|
||||
import com.bsd.pjcloud.supermarket.vo.purchase.ErpSpuWithUnitPageVo;
|
||||
import com.bsd.pjcloud.supermarket.vo.sm.smspu.SmErpPageScopeVo;
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.bsd.pjcloud.supermarket.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpCgPlanItemEntity;
|
||||
import com.bsd.pjcloud.supermarket.mapper.SmErpCgPlanItemMapper;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpCgPlanItemService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 采购计划-item
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-02-11 17:11:41
|
||||
*/
|
||||
@Service
|
||||
public class SmErpCgPlanItemServiceImpl extends ServiceImpl<SmErpCgPlanItemMapper, SmErpCgPlanItemEntity> implements SmErpCgPlanItemService {
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.bsd.pjcloud.supermarket.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgplan.ErpPurchaseSaveDTO;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpCgPlanEntity;
|
||||
import com.bsd.pjcloud.supermarket.mapper.SmErpCgPlanMapper;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpCgPlanService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 采购计划
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-02-11 15:45:28
|
||||
*/
|
||||
@Service
|
||||
public class SmErpCgPlanServiceImpl extends ServiceImpl<SmErpCgPlanMapper, SmErpCgPlanEntity> implements SmErpCgPlanService {
|
||||
@Override
|
||||
public Object saveCgplan(ErpPurchaseSaveDTO erpPurchaseSaveDTO) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -8,7 +8,7 @@ import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.supermarket.dto.SupermarketSpuQueryDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.SupermarketSpuUpdateStockReqDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.puchase.ErpPurchaseDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgplan.ErpPurchaseDTO;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpAuxiliaryCodeEntity;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpSpuEntity;
|
||||
import com.bsd.pjcloud.supermarket.entity.SmErpStockEntity;
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?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.bsd.pjcloud.supermarket.mapper.SmErpCgPlanItemMapper">
|
||||
|
||||
<resultMap id="smErpCgPlanItemMap" type="com.bsd.pjcloud.supermarket.entity.SmErpCgPlanItemEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="planId" column="plan_id"/>
|
||||
<result property="erpSpuId" column="erp_spu_id"/>
|
||||
<result property="merchantId" column="merchant_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="unitPrice" column="unit_price"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="unitId" column="unit_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<?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.bsd.pjcloud.supermarket.mapper.SmErpCgPlanMapper">
|
||||
|
||||
<resultMap id="smErpCgPlanMap" type="com.bsd.pjcloud.supermarket.entity.SmErpCgPlanEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="planCode" column="plan_code"/>
|
||||
<result property="planDate" column="plan_date"/>
|
||||
<result property="warehouseId" column="warehouse_id"/>
|
||||
<result property="handlerUserId" column="handler_user_id"/>
|
||||
<result property="checkStatus" column="check_status"/>
|
||||
<result property="checkUserId" column="check_user_id"/>
|
||||
<result property="checkTime" column="check_time"/>
|
||||
<result property="merchantId" column="merchant_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="totalNumber" column="total_number"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="orderNumber" column="order_number"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user