采购
This commit is contained in:
1 parent
8b2475f7e4
commit
9a6cf85972
10 files changed
+61
-91
No files matched your search
+28
@@ -0,0 +1,28 @@
|
||||
package com.bsd.pjcloud.supermarket.dto.cgdd;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询采购申请单条件
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "分页查询采购申请单条件")
|
||||
public class CGPlanLinkQueryDTO {
|
||||
|
||||
/**
|
||||
* 采购计划编号
|
||||
*/
|
||||
@Schema(description="采购计划编号")
|
||||
private String planCode;
|
||||
|
||||
/**
|
||||
* 采购计划单据日期
|
||||
*/
|
||||
@Schema(description="采购计划单据日期")
|
||||
private LocalDate planDate;
|
||||
}
|
||||
-24
@@ -30,31 +30,12 @@ public class ErpCgPlanEditDTO {
|
||||
@Schema(description="采购计划单据日期")
|
||||
private LocalDate planDate;
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
@Schema(description="仓库id")
|
||||
private String warehouseId;
|
||||
|
||||
/**
|
||||
* 经办人id
|
||||
*/
|
||||
@Schema(description="经办人id")
|
||||
private Long handlerUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 累计进货数量
|
||||
*/
|
||||
@Schema(description="累计进货数量")
|
||||
private Integer totalNumber;
|
||||
|
||||
/**
|
||||
* 累计总金额
|
||||
*/
|
||||
@Schema(description="累计总金额")
|
||||
private Integer totalAmount;
|
||||
|
||||
/**
|
||||
* 货商
|
||||
*/
|
||||
@@ -67,11 +48,6 @@ public class ErpCgPlanEditDTO {
|
||||
@Schema(description="备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@Schema(description="订单编号")
|
||||
private String orderNumber;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
-24
@@ -29,12 +29,6 @@ public class ErpCgPlanSaveDTO {
|
||||
@Schema(description="采购计划单据日期")
|
||||
private LocalDate planDate;
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
@Schema(description="仓库id")
|
||||
private String warehouseId;
|
||||
|
||||
/**
|
||||
* 经办人id
|
||||
*/
|
||||
@@ -42,18 +36,6 @@ public class ErpCgPlanSaveDTO {
|
||||
private Long handlerUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 累计进货数量
|
||||
*/
|
||||
@Schema(description="累计进货数量")
|
||||
private Integer totalNumber;
|
||||
|
||||
/**
|
||||
* 累计总金额
|
||||
*/
|
||||
@Schema(description="累计总金额")
|
||||
private Integer totalAmount;
|
||||
|
||||
/**
|
||||
* 货商
|
||||
*/
|
||||
@@ -66,12 +48,6 @@ public class ErpCgPlanSaveDTO {
|
||||
@Schema(description="备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@Schema(description="订单编号")
|
||||
private String orderNumber;
|
||||
|
||||
|
||||
/**
|
||||
* @Link SmCgPlanSaveItemDTO
|
||||
|
||||
+4
-6
@@ -42,12 +42,6 @@ public class SmErpCgDdEntity extends Model<SmErpCgDdEntity> {
|
||||
@Schema(description="单据日期")
|
||||
private LocalDate dDate;
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
@Schema(description="仓库id")
|
||||
private String warehouseId;
|
||||
|
||||
/**
|
||||
* 经办人id
|
||||
*/
|
||||
@@ -161,4 +155,8 @@ public class SmErpCgDdEntity extends Model<SmErpCgDdEntity> {
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
@Schema(description="关联编码")
|
||||
private String linkCode;
|
||||
}
|
||||
File renamed without changes.
-29
@@ -42,12 +42,6 @@ public class SmErpCgPlanEntity extends Model<SmErpCgPlanEntity> {
|
||||
@Schema(description="采购计划单据日期")
|
||||
private LocalDate planDate;
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
@Schema(description="仓库id")
|
||||
private String warehouseId;
|
||||
|
||||
/**
|
||||
* 经办人id
|
||||
*/
|
||||
@@ -90,35 +84,12 @@ public class SmErpCgPlanEntity extends Model<SmErpCgPlanEntity> {
|
||||
@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;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
|
||||
File renamed without changes.
+28
-2
@@ -2,23 +2,24 @@ package com.bsd.pjcloud.supermarket.controller;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
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;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgdd.CGPlanLinkQueryDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgdd.ErpCgDDEditDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgdd.ErpCgDDSaveDTO;
|
||||
import com.bsd.pjcloud.supermarket.dto.cgplan.ErpCgPlanEditDTO;
|
||||
import com.bsd.pjcloud.supermarket.entity.*;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpCgDdItemService;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpCgDdService;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpCgPlanService;
|
||||
import com.bsd.pjcloud.supermarket.service.SmErpUnitService;
|
||||
import com.bsd.pjcloud.supermarket.vo.cgdd.SmErpCgDdVo;
|
||||
import com.bsd.pjcloud.supermarket.vo.cgdd.SmeErpCgDdItemVo;
|
||||
import com.bsd.pjcloud.supermarket.vo.cgplan.ErpUnitVo;
|
||||
import com.bsd.pjcloud.supermarket.vo.cgplan.SmeErpCgPlanItemVo;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
@@ -30,6 +31,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -51,6 +53,8 @@ public class SmErpCgDdController {
|
||||
|
||||
private final SmErpUnitService smErpUnitService;
|
||||
|
||||
private final SmErpCgPlanService smErpCgPlanService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
@@ -157,4 +161,26 @@ public class SmErpCgDdController {
|
||||
public List<SmErpCgDdEntity> export(SmErpCgDdEntity smErpCgDd,Long[] ids) {
|
||||
return smErpCgDdService.list(Wrappers.lambdaQuery(smErpCgDd).in(ArrayUtil.isNotEmpty(ids), SmErpCgDdEntity::getId, ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param cGPlanLinkQueryDTO 采购计划
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/cgsq/page" )
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpCgPlan_view')" )
|
||||
public R getSmErpCgPlanPage(@ParameterObject Page page, @ParameterObject CGPlanLinkQueryDTO cGPlanLinkQueryDTO) {
|
||||
|
||||
LambdaQueryWrapper<SmErpCgPlanEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.like(StrUtil.isNotBlank(cGPlanLinkQueryDTO.getPlanCode()),SmErpCgPlanEntity::getPlanCode,cGPlanLinkQueryDTO.getPlanCode());
|
||||
wrapper.eq(Objects.nonNull(cGPlanLinkQueryDTO.getPlanDate()),SmErpCgPlanEntity::getPlanDate,cGPlanLinkQueryDTO.getPlanDate());
|
||||
|
||||
//todo 审核成功条件
|
||||
// wrapper.eq(SmErpCgPlanEntity::getCheckStatus,);
|
||||
return R.ok(smErpCgPlanService.page(page, wrapper));
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,6 @@
|
||||
<id property="id" column="id"/>
|
||||
<result property="code" column="code"/>
|
||||
<result property="dDate" column="d_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"/>
|
||||
@@ -26,5 +25,6 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="linkCode" column="link_code"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
-5
@@ -7,7 +7,6 @@
|
||||
<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"/>
|
||||
@@ -15,11 +14,7 @@
|
||||
<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"/>
|
||||
|
||||
Reference in new issue
Block a user