From 2a5312a4d8893af88cf9848d3e51ccbe72a4d5d0 Mon Sep 17 00:00:00 2001 From: liuyaxin Date: Wed, 17 Jun 2026 15:26:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zhaocai/pojo/entity/BillCode.java | 61 ++++++ .../pojo/entity/ProcurementPlanMaterial.java | 176 ++++++++++++++++++ .../controller/UserDeptController.java | 77 ++++++++ .../zhaocai/mapper/BillCodeMapper.java | 38 ++++ .../mapper/ProcurementPlanMaterialMapper.java | 56 ++++++ .../mapper/ProcurementPlanMaterialMapper.xml | 58 ++++++ .../zhaocai/service/IBillCodeService.java | 46 +++++ .../IProcurementPlanMaterialService.java | 56 ++++++ .../service/impl/BillCodeServiceImpl.java | 79 ++++++++ .../ProcurementPlanMaterialServiceImpl.java | 55 ++++++ 10 files changed, 702 insertions(+) create mode 100644 blade-service-api/blade-zhaocai-api/src/main/java/org/springblade/zhaocai/pojo/entity/BillCode.java create mode 100644 blade-service-api/blade-zhaocai-api/src/main/java/org/springblade/zhaocai/pojo/entity/ProcurementPlanMaterial.java create mode 100644 blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/controller/UserDeptController.java create mode 100644 blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/BillCodeMapper.java create mode 100644 blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/ProcurementPlanMaterialMapper.java create mode 100644 blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/ProcurementPlanMaterialMapper.xml create mode 100644 blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/IBillCodeService.java create mode 100644 blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/IProcurementPlanMaterialService.java create mode 100644 blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/impl/BillCodeServiceImpl.java create mode 100644 blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/impl/ProcurementPlanMaterialServiceImpl.java diff --git a/blade-service-api/blade-zhaocai-api/src/main/java/org/springblade/zhaocai/pojo/entity/BillCode.java b/blade-service-api/blade-zhaocai-api/src/main/java/org/springblade/zhaocai/pojo/entity/BillCode.java new file mode 100644 index 0000000..678898b --- /dev/null +++ b/blade-service-api/blade-zhaocai-api/src/main/java/org/springblade/zhaocai/pojo/entity/BillCode.java @@ -0,0 +1,61 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *

+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *

+ * 1. This software is for development use only under a valid license + * from BladeX. + *

+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *

+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *

+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *

+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *

+ * Author: Chill Zhuang (bladejava@qq.com) + */ +package org.springblade.zhaocai.pojo.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.io.Serial; + +/** + * 单据号码实体类 + * + * @author Chill + */ +@Data +@TableName("zc_bill_code") +@EqualsAndHashCode(callSuper = true) +public class BillCode extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 单据号 + */ + @Schema(description = "单据号") + private String billCode; + + /** + * 单据类型 + */ + @Schema(description = "单据类型") + private String billType; + +} diff --git a/blade-service-api/blade-zhaocai-api/src/main/java/org/springblade/zhaocai/pojo/entity/ProcurementPlanMaterial.java b/blade-service-api/blade-zhaocai-api/src/main/java/org/springblade/zhaocai/pojo/entity/ProcurementPlanMaterial.java new file mode 100644 index 0000000..1ed0221 --- /dev/null +++ b/blade-service-api/blade-zhaocai-api/src/main/java/org/springblade/zhaocai/pojo/entity/ProcurementPlanMaterial.java @@ -0,0 +1,176 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *

+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *

+ * 1. This software is for development use only under a valid license + * from BladeX. + *

+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *

+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *

+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *

+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *

+ * Author: Chill Zhuang (bladejava@qq.com) + */ +package org.springblade.zhaocai.pojo.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serial; +import java.math.BigDecimal; +import java.time.LocalDate; + +/** + * 年度招采计划物料明细实体类 + * + * @author Chill + */ +@Data +@TableName("zc_procurement_plan_material") +@EqualsAndHashCode(callSuper = true) +public class ProcurementPlanMaterial extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主表ID + */ + @JsonSerialize(using = ToStringSerializer.class) + @Schema(description = "主表ID") + private Long planId; + + /** + * 项目明细ID + */ + @JsonSerialize(using = ToStringSerializer.class) + @Schema(description = "项目明细ID") + private Long projectId; + + /** + * 序号 + */ + @Schema(description = "序号") + private Integer sortNo; + + /** + * 物料名称 + */ + @Schema(description = "物料名称") + private String materialName; + + /** + * 物料编码 + */ + @Schema(description = "物料编码") + private String materialCode; + + /** + * 规格型号 + */ + @Schema(description = "规格型号") + private String specification; + + /** + * 品牌 + */ + @Schema(description = "品牌") + private String brand; + + /** + * 计量单位 + */ + @Schema(description = "计量单位") + private String unit; + + /** + * 参考价 + */ + @Schema(description = "参考价") + private BigDecimal referencePrice; + + /** + * 预计数量 + */ + @Schema(description = "预计数量") + private Integer quantity; + + /** + * 预估金额(元) + */ + @Schema(description = "预估金额(元)") + private BigDecimal estimatedAmount; + + /** + * 对接人 + */ + @Schema(description = "对接人") + private String contactPerson; + + /** + * 对接人ID + */ + @JsonSerialize(using = ToStringSerializer.class) + @Schema(description = "对接人ID") + private Long contactPersonId; + + /** + * 计划申请日期 + */ + @Schema(description = "计划申请日期") + private LocalDate applyDate; + + /** + * 期望使用/完成日期 + */ + @Schema(description = "期望使用/完成日期") + private LocalDate expectDate; + + /** + * 去年总量 + */ + @Schema(description = "去年总量") + private Integer lastYearTotal; + + /** + * 去年均价 + */ + @Schema(description = "去年均价") + private BigDecimal lastYearAvgPrice; + + /** + * 去年总金额 + */ + @Schema(description = "去年总金额") + private BigDecimal lastYearTotalAmount; + + /** + * 需求简介 + */ + @Schema(description = "需求简介") + private String requirementIntro; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + +} diff --git a/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/controller/UserDeptController.java b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/controller/UserDeptController.java new file mode 100644 index 0000000..9a8a02b --- /dev/null +++ b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/controller/UserDeptController.java @@ -0,0 +1,77 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *

+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *

+ * 1. This software is for development use only under a valid license + * from BladeX. + *

+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *

+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *

+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *

+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *

+ * Author: Chill Zhuang (bladejava@qq.com) + */ +package org.springblade.zhaocai.controller; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.AllArgsConstructor; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; +import org.springblade.core.tool.api.R; +import org.springblade.system.feign.ISysClient; +import org.springblade.system.pojo.entity.Dept; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 当前登录用户部门公司查询控制器 + * + * @author Chill + */ +@NonDS +@RestController +@RequestMapping("current-user") +@AllArgsConstructor +@PreAuth(menu = "procurement-plan") +@Tag(name = "当前用户信息", description = "当前登录用户部门公司查询接口") +public class UserDeptController extends BladeController { + + private final ISysClient sysClient; + + /** + * 获取当前登录用户所属公司 + */ + @GetMapping("/company") + @ApiOperationSupport(order = 1) + @Operation(summary = "获取当前登录用户所属公司", description = "根据当前登录用户部门ID向上查找dept_category=1的公司") + public R getCurrentUserCompany() { + return sysClient.getCurrentUserCompany(); + } + + /** + * 获取当前登录用户所属部门 + */ + @GetMapping("/dept") + @ApiOperationSupport(order = 2) + @Operation(summary = "获取当前登录用户所属部门", description = "根据当前登录用户部门ID查找dept_category=2的部门") + public R getCurrentUserDept() { + return sysClient.getCurrentUserDept(); + } + +} diff --git a/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/BillCodeMapper.java b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/BillCodeMapper.java new file mode 100644 index 0000000..4dd6f83 --- /dev/null +++ b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/BillCodeMapper.java @@ -0,0 +1,38 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *

+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *

+ * 1. This software is for development use only under a valid license + * from BladeX. + *

+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *

+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *

+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *

+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *

+ * Author: Chill Zhuang (bladejava@qq.com) + */ +package org.springblade.zhaocai.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springblade.zhaocai.pojo.entity.BillCode; + +/** + * 单据号码 Mapper 接口 + * + * @author Chill + */ +public interface BillCodeMapper extends BaseMapper { + +} diff --git a/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/ProcurementPlanMaterialMapper.java b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/ProcurementPlanMaterialMapper.java new file mode 100644 index 0000000..ac141b7 --- /dev/null +++ b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/ProcurementPlanMaterialMapper.java @@ -0,0 +1,56 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *

+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *

+ * 1. This software is for development use only under a valid license + * from BladeX. + *

+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *

+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *

+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *

+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *

+ * Author: Chill Zhuang (bladejava@qq.com) + */ +package org.springblade.zhaocai.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springblade.zhaocai.pojo.entity.ProcurementPlanMaterial; + +import java.util.List; + +/** + * 年度招采计划物料明细 Mapper 接口 + * + * @author Chill + */ +public interface ProcurementPlanMaterialMapper extends BaseMapper { + + /** + * 根据项目明细ID查询物料明细列表 + * + * @param projectId 项目明细ID + * @return 物料明细列表 + */ + List selectByProjectId(Long projectId); + + /** + * 根据主表ID删除物料明细 + * + * @param planId 主表ID + * @return 影响行数 + */ + int deleteByPlanId(Long planId); + +} diff --git a/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/ProcurementPlanMaterialMapper.xml b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/ProcurementPlanMaterialMapper.xml new file mode 100644 index 0000000..bbd6148 --- /dev/null +++ b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/mapper/ProcurementPlanMaterialMapper.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + id, tenant_id, create_user, create_time, update_user, update_time, status, is_deleted, + plan_id, project_id, sort_no, material_name, material_code, specification, brand, unit, + reference_price, quantity, estimated_amount, contact_person, contact_person_id, apply_date, + expect_date, last_year_total, last_year_avg_price, last_year_total_amount, requirement_intro, remark + + + + + + delete from zc_procurement_plan_material where plan_id = #{planId} + + + diff --git a/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/IBillCodeService.java b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/IBillCodeService.java new file mode 100644 index 0000000..4807811 --- /dev/null +++ b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/IBillCodeService.java @@ -0,0 +1,46 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *

+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *

+ * 1. This software is for development use only under a valid license + * from BladeX. + *

+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *

+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *

+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *

+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *

+ * Author: Chill Zhuang (bladejava@qq.com) + */ +package org.springblade.zhaocai.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.springblade.zhaocai.pojo.entity.BillCode; + +/** + * 单据号码服务类 + * + * @author Chill + */ +public interface IBillCodeService extends IService { + + /** + * 生成唯一单据号 + * + * @param billType 单据类型 + * @return 单据号 + */ + String generateBillCode(String billType); + +} diff --git a/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/IProcurementPlanMaterialService.java b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/IProcurementPlanMaterialService.java new file mode 100644 index 0000000..005aca7 --- /dev/null +++ b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/IProcurementPlanMaterialService.java @@ -0,0 +1,56 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *

+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *

+ * 1. This software is for development use only under a valid license + * from BladeX. + *

+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *

+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *

+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *

+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *

+ * Author: Chill Zhuang (bladejava@qq.com) + */ +package org.springblade.zhaocai.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.springblade.zhaocai.pojo.entity.ProcurementPlanMaterial; + +import java.util.List; + +/** + * 年度招采计划物料明细服务类 + * + * @author Chill + */ +public interface IProcurementPlanMaterialService extends IService { + + /** + * 根据项目明细ID查询物料明细列表 + * + * @param projectId 项目明细ID + * @return 物料明细列表 + */ + List listByProjectId(Long projectId); + + /** + * 根据主表ID删除物料明细 + * + * @param planId 主表ID + * @return 是否成功 + */ + boolean removeByPlanId(Long planId); + +} diff --git a/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/impl/BillCodeServiceImpl.java b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/impl/BillCodeServiceImpl.java new file mode 100644 index 0000000..bf5840b --- /dev/null +++ b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/impl/BillCodeServiceImpl.java @@ -0,0 +1,79 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *

+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *

+ * 1. This software is for development use only under a valid license + * from BladeX. + *

+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *

+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *

+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *

+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *

+ * Author: Chill Zhuang (bladejava@qq.com) + */ +package org.springblade.zhaocai.service.impl; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.zhaocai.mapper.BillCodeMapper; +import org.springblade.zhaocai.pojo.entity.BillCode; +import org.springblade.zhaocai.service.IBillCodeService; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.concurrent.ThreadLocalRandom; + +/** + * 单据号码服务实现类 + * + * @author Chill + */ +@Service +public class BillCodeServiceImpl extends ServiceImpl implements IBillCodeService { + + /** + * 最大重试次数 + */ + private static final int MAX_RETRY = 10; + + /** + * 单据号前缀 + */ + private static final String BILL_NO_PREFIX = "NDZC"; + + @Override + public String generateBillCode(String billType) { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm"); + for (int i = 0; i < MAX_RETRY; i++) { + String dateStr = dateFormat.format(new Date()); + String randomStr = String.format("%03d", ThreadLocalRandom.current().nextInt(0, 1000)); + String candidate = BILL_NO_PREFIX + dateStr + randomStr; + if (baseMapper.selectCount(Wrappers.lambdaQuery() + .eq(BillCode::getBillCode, candidate)) == 0) { + BillCode billCode = new BillCode(); + billCode.setBillCode(candidate); + billCode.setBillType(billType); + billCode.setCreateTime(DateUtil.now()); + baseMapper.insert(billCode); + return candidate; + } + } + throw new ServiceException("单据号生成失败,请重试"); + } + +} diff --git a/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/impl/ProcurementPlanMaterialServiceImpl.java b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/impl/ProcurementPlanMaterialServiceImpl.java new file mode 100644 index 0000000..4f19ef1 --- /dev/null +++ b/blade-service/blade-zhaocai/src/main/java/org/springblade/zhaocai/service/impl/ProcurementPlanMaterialServiceImpl.java @@ -0,0 +1,55 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *

+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *

+ * 1. This software is for development use only under a valid license + * from BladeX. + *

+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *

+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *

+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *

+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *

+ * Author: Chill Zhuang (bladejava@qq.com) + */ +package org.springblade.zhaocai.service.impl; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springblade.zhaocai.mapper.ProcurementPlanMaterialMapper; +import org.springblade.zhaocai.pojo.entity.ProcurementPlanMaterial; +import org.springblade.zhaocai.service.IProcurementPlanMaterialService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 年度招采计划物料明细服务实现类 + * + * @author Chill + */ +@Service +public class ProcurementPlanMaterialServiceImpl extends ServiceImpl implements IProcurementPlanMaterialService { + + @Override + public List listByProjectId(Long projectId) { + return baseMapper.selectByProjectId(projectId); + } + + @Override + public boolean removeByPlanId(Long planId) { + return baseMapper.deleteByPlanId(planId) >= 0; + } + +}