Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25f44dfe7a | ||
|
|
72c1c0f393 | ||
|
|
e2a66f7cd5 |
@ -69,12 +69,12 @@ public interface LauncherConstant {
|
|||||||
/**
|
/**
|
||||||
* nacos prod 地址
|
* nacos prod 地址
|
||||||
*/
|
*/
|
||||||
String NACOS_PROD_ADDR = "127.0.0.1:8848";
|
String NACOS_PROD_ADDR = "172.30.0.48:8848";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nacos test 地址
|
* nacos test 地址
|
||||||
*/
|
*/
|
||||||
String NACOS_TEST_ADDR = "127.0.0.1:8848";
|
String NACOS_TEST_ADDR = "172.19.2.126:30848";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sentinel dev 地址
|
* sentinel dev 地址
|
||||||
|
|||||||
@ -6,7 +6,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 127.0.0.1:8848
|
||||||
namespace: public
|
namespace:
|
||||||
group: DEFAULT_GROUP
|
group: DEFAULT_GROUP
|
||||||
username: nacos
|
username: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
|
|||||||
@ -1,61 +0,0 @@
|
|||||||
/**
|
|
||||||
* BladeX Commercial License Agreement
|
|
||||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
|
||||||
* <p>
|
|
||||||
* Use of this software is governed by the Commercial License Agreement
|
|
||||||
* obtained after purchasing a license from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 1. This software is for development use only under a valid license
|
|
||||||
* from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 2. Redistribution of this software's source code to any third party
|
|
||||||
* without a commercial license is strictly prohibited.
|
|
||||||
* <p>
|
|
||||||
* 3. Licensees may copyright their own code but cannot use segments
|
|
||||||
* from this software for such purposes. Copyright of this software
|
|
||||||
* remains with BladeX.
|
|
||||||
* <p>
|
|
||||||
* Using this software signifies agreement to this License, and the software
|
|
||||||
* must not be used for illegal purposes.
|
|
||||||
* <p>
|
|
||||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
|
||||||
* not liable for any claims arising from secondary or illegal development.
|
|
||||||
* <p>
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -29,21 +29,21 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springblade.core.tenant.mp.TenantEntity;
|
import org.springblade.core.mp.base.BaseEntity;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年度招采计划实体类
|
* 招采计划实体类
|
||||||
*
|
*
|
||||||
* @author Chill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName("zc_procurement_plan")
|
@TableName("blade_procurement_plan")
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class ProcurementPlan extends TenantEntity {
|
public class ProcurementPlan extends BaseEntity {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -85,21 +85,21 @@ public class ProcurementPlan extends TenantEntity {
|
|||||||
private String year;
|
private String year;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需求部门
|
* 所属部门
|
||||||
*/
|
*/
|
||||||
@Schema(description = "需求部门")
|
@Schema(description = "所属部门")
|
||||||
private String dept;
|
private String dept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需求公司
|
* 申请信息中的所属公司
|
||||||
*/
|
*/
|
||||||
@Schema(description = "需求公司")
|
@Schema(description = "申请所属公司")
|
||||||
private String applyCompany;
|
private String applyCompany;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年度预估总金额(万元)
|
* 预估总金额(万元)
|
||||||
*/
|
*/
|
||||||
@Schema(description = "年度预估总金额(万元)")
|
@Schema(description = "预估总金额(万元)")
|
||||||
private BigDecimal estimatedAmount;
|
private BigDecimal estimatedAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -114,16 +114,4 @@ public class ProcurementPlan extends TenantEntity {
|
|||||||
@Schema(description = "备注")
|
@Schema(description = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程当前节点
|
|
||||||
*/
|
|
||||||
@Schema(description = "流程当前节点")
|
|
||||||
private String flowStatus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程实例ID
|
|
||||||
*/
|
|
||||||
@Schema(description = "流程实例ID")
|
|
||||||
private String processInstanceId;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,21 +31,20 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springblade.core.tenant.mp.TenantEntity;
|
import org.springblade.core.mp.base.BaseEntity;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年度招采计划项目明细实体类
|
* 招采计划明细实体类
|
||||||
*
|
*
|
||||||
* @author Chill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName("zc_procurement_plan_project")
|
@TableName("blade_procurement_plan_detail")
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class ProcurementPlanDetail extends TenantEntity {
|
public class ProcurementPlanDetail extends BaseEntity {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -64,10 +63,16 @@ public class ProcurementPlanDetail extends TenantEntity {
|
|||||||
private String year;
|
private String year;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计划号
|
* 计划
|
||||||
*/
|
*/
|
||||||
@Schema(description = "计划号")
|
@Schema(description = "计划")
|
||||||
private String planNo;
|
private String plan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "计划类型")
|
||||||
|
private String planType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 序号
|
* 序号
|
||||||
@ -93,13 +98,6 @@ public class ProcurementPlanDetail extends TenantEntity {
|
|||||||
@Schema(description = "项目对接人")
|
@Schema(description = "项目对接人")
|
||||||
private String contactPerson;
|
private String contactPerson;
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目对接人ID
|
|
||||||
*/
|
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
|
||||||
@Schema(description = "项目对接人ID")
|
|
||||||
private Long contactPersonId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计划申请日期
|
* 计划申请日期
|
||||||
*/
|
*/
|
||||||
@ -119,39 +117,9 @@ public class ProcurementPlanDetail extends TenantEntity {
|
|||||||
private String projectAttr;
|
private String projectAttr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购需求
|
* 采购物料明细
|
||||||
*/
|
*/
|
||||||
@Schema(description = "采购需求")
|
@Schema(description = "采购物料明细")
|
||||||
private String purchaseRequirement;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预算金额(万元)
|
|
||||||
*/
|
|
||||||
@Schema(description = "预算金额(万元)")
|
|
||||||
private BigDecimal budgetAmount;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 招标方式
|
|
||||||
*/
|
|
||||||
@Schema(description = "招标方式")
|
|
||||||
private String biddingMethod;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目简介
|
|
||||||
*/
|
|
||||||
@Schema(description = "项目简介")
|
|
||||||
private String projectIntro;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 物料明细冗余汇总
|
|
||||||
*/
|
|
||||||
@Schema(description = "物料明细冗余汇总")
|
|
||||||
private String materialDetail;
|
private String materialDetail;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,176 +0,0 @@
|
|||||||
/**
|
|
||||||
* BladeX Commercial License Agreement
|
|
||||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
|
||||||
* <p>
|
|
||||||
* Use of this software is governed by the Commercial License Agreement
|
|
||||||
* obtained after purchasing a license from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 1. This software is for development use only under a valid license
|
|
||||||
* from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 2. Redistribution of this software's source code to any third party
|
|
||||||
* without a commercial license is strictly prohibited.
|
|
||||||
* <p>
|
|
||||||
* 3. Licensees may copyright their own code but cannot use segments
|
|
||||||
* from this software for such purposes. Copyright of this software
|
|
||||||
* remains with BladeX.
|
|
||||||
* <p>
|
|
||||||
* Using this software signifies agreement to this License, and the software
|
|
||||||
* must not be used for illegal purposes.
|
|
||||||
* <p>
|
|
||||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
|
||||||
* not liable for any claims arising from secondary or illegal development.
|
|
||||||
* <p>
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -31,10 +31,9 @@ import lombok.EqualsAndHashCode;
|
|||||||
import org.springblade.zhaocai.pojo.entity.ProcurementPlanDetail;
|
import org.springblade.zhaocai.pojo.entity.ProcurementPlanDetail;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年度招采计划项目明细视图对象
|
* 招采计划明细视图对象
|
||||||
*
|
*
|
||||||
* @author Chill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@ -45,10 +44,4 @@ public class ProcurementPlanDetailVO extends ProcurementPlanDetail {
|
|||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
|
||||||
* 物料明细列表
|
|
||||||
*/
|
|
||||||
@Schema(description = "物料明细列表")
|
|
||||||
private List<ProcurementPlanMaterialVO> materialList;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,46 +0,0 @@
|
|||||||
/**
|
|
||||||
* BladeX Commercial License Agreement
|
|
||||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
|
||||||
* <p>
|
|
||||||
* Use of this software is governed by the Commercial License Agreement
|
|
||||||
* obtained after purchasing a license from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 1. This software is for development use only under a valid license
|
|
||||||
* from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 2. Redistribution of this software's source code to any third party
|
|
||||||
* without a commercial license is strictly prohibited.
|
|
||||||
* <p>
|
|
||||||
* 3. Licensees may copyright their own code but cannot use segments
|
|
||||||
* from this software for such purposes. Copyright of this software
|
|
||||||
* remains with BladeX.
|
|
||||||
* <p>
|
|
||||||
* Using this software signifies agreement to this License, and the software
|
|
||||||
* must not be used for illegal purposes.
|
|
||||||
* <p>
|
|
||||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
|
||||||
* not liable for any claims arising from secondary or illegal development.
|
|
||||||
* <p>
|
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
|
||||||
*/
|
|
||||||
package org.springblade.zhaocai.pojo.vo;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import org.springblade.zhaocai.pojo.entity.ProcurementPlanMaterial;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 年度招采计划物料明细视图对象
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class ProcurementPlanMaterialVO extends ProcurementPlanMaterial {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package org.springblade.zhaocai.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ZcProcessTaskQueryVO {
|
||||||
|
/**
|
||||||
|
* 关键字
|
||||||
|
*/
|
||||||
|
private String keyWord;
|
||||||
|
/**
|
||||||
|
* 流程名称
|
||||||
|
*/
|
||||||
|
private String processName;
|
||||||
|
/**
|
||||||
|
* 流程Key
|
||||||
|
*/
|
||||||
|
private String processId;
|
||||||
|
|
||||||
|
private String userCode;
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
package org.springblade.zhaocai.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ZcProcessTaskVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 实例code
|
||||||
|
*/
|
||||||
|
private String instanceCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程名称
|
||||||
|
*/
|
||||||
|
private String processName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String tCreateUser;
|
||||||
|
/**
|
||||||
|
* 创建人编号
|
||||||
|
*/
|
||||||
|
private String tCreateUserAccount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 到达时间
|
||||||
|
*/
|
||||||
|
private Date tArrivalTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交时间
|
||||||
|
*/
|
||||||
|
private Date tSubmitTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前审批节点
|
||||||
|
*/
|
||||||
|
private String currentApprovalNode;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批表单地址
|
||||||
|
*/
|
||||||
|
private String approvalFormUrl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务id
|
||||||
|
*/
|
||||||
|
private String taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String processKey = "assign_task";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点key
|
||||||
|
*/
|
||||||
|
private String stepKey;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阅知状态(待阅、已阅)
|
||||||
|
*/
|
||||||
|
private String pendingSubStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.springblade.zhaocai.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class zcInitiateProcessVO {
|
||||||
|
/**
|
||||||
|
* 流程名
|
||||||
|
*/
|
||||||
|
private String processName;
|
||||||
|
/**
|
||||||
|
* 流程id
|
||||||
|
*/
|
||||||
|
private String processId;
|
||||||
|
}
|
||||||
@ -36,11 +36,6 @@
|
|||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<artifactId>blade-zhaocai-api</artifactId>
|
<artifactId>blade-zhaocai-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- 系统服务api,用于Feign调用blade-system -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springblade</groupId>
|
|
||||||
<artifactId>blade-system-api</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!-- 测试依赖 -->
|
<!-- 测试依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
@ -53,10 +48,6 @@
|
|||||||
<artifactId>blade-core-auto</artifactId>
|
<artifactId>blade-core-auto</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.springblade</groupId>
|
|
||||||
<artifactId>blade-core-tool</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@ -37,49 +37,33 @@ import lombok.AllArgsConstructor;
|
|||||||
import org.springblade.core.boot.ctrl.BladeController;
|
import org.springblade.core.boot.ctrl.BladeController;
|
||||||
import org.springblade.core.mp.support.Condition;
|
import org.springblade.core.mp.support.Condition;
|
||||||
import org.springblade.core.mp.support.Query;
|
import org.springblade.core.mp.support.Query;
|
||||||
import org.springblade.core.secure.annotation.PreAuth;
|
|
||||||
import org.springblade.core.tenant.annotation.NonDS;
|
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
import org.springblade.core.tool.utils.Func;
|
import org.springblade.core.tool.utils.Func;
|
||||||
import org.springblade.zhaocai.pojo.entity.ProcurementPlan;
|
import org.springblade.zhaocai.pojo.entity.ProcurementPlan;
|
||||||
import org.springblade.zhaocai.pojo.vo.ProcurementPlanVO;
|
import org.springblade.zhaocai.pojo.vo.ProcurementPlanVO;
|
||||||
import org.springblade.zhaocai.service.IBillCodeService;
|
|
||||||
import org.springblade.zhaocai.service.IProcurementPlanService;
|
import org.springblade.zhaocai.service.IProcurementPlanService;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年度招采计划控制器
|
* 招采计划控制器
|
||||||
*
|
*
|
||||||
* @author Chill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@NonDS
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("procurement-plan")
|
@RequestMapping("procurement-plan")
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@PreAuth(menu = "procurement-plan")
|
@Tag(name = "招采计划", description = "招采计划接口")
|
||||||
@Tag(name = "年度招采计划", description = "年度招采计划接口")
|
|
||||||
public class ProcurementPlanController extends BladeController {
|
public class ProcurementPlanController extends BladeController {
|
||||||
|
|
||||||
private final IProcurementPlanService procurementPlanService;
|
private final IProcurementPlanService procurementPlanService;
|
||||||
private final IBillCodeService billCodeService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成单据号
|
|
||||||
*/
|
|
||||||
@GetMapping("/bill-no")
|
|
||||||
@ApiOperationSupport(order = 1)
|
|
||||||
@Operation(summary = "生成单据号", description = "生成唯一单据号")
|
|
||||||
public R<String> generateBillNo() {
|
|
||||||
return R.data(billCodeService.generateBillCode("PROCUREMENT_PLAN"));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 详情(含明细)
|
* 详情(含明细)
|
||||||
*/
|
*/
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
@ApiOperationSupport(order = 2)
|
@ApiOperationSupport(order = 1)
|
||||||
@Operation(summary = "详情", description = "传入id")
|
@Operation(summary = "详情", description = "传入id")
|
||||||
public R<ProcurementPlanVO> detail(@Parameter(name = "id", description = "主键", in = ParameterIn.QUERY, schema = @Schema(type = "integer")) @RequestParam Long id) {
|
public R<ProcurementPlanVO> detail(@Parameter(name = "id", description = "主键", in = ParameterIn.QUERY, schema = @Schema(type = "integer")) @RequestParam Long id) {
|
||||||
ProcurementPlanVO detail = procurementPlanService.detail(id);
|
ProcurementPlanVO detail = procurementPlanService.detail(id);
|
||||||
@ -95,7 +79,7 @@ public class ProcurementPlanController extends BladeController {
|
|||||||
@Parameter(name = "billNo", description = "单据号", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
|
@Parameter(name = "billNo", description = "单据号", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
|
||||||
@Parameter(name = "year", description = "年度", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
|
@Parameter(name = "year", description = "年度", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
|
||||||
})
|
})
|
||||||
@ApiOperationSupport(order = 3)
|
@ApiOperationSupport(order = 2)
|
||||||
@Operation(summary = "分页", description = "传入procurementPlan")
|
@Operation(summary = "分页", description = "传入procurementPlan")
|
||||||
public R<IPage<ProcurementPlan>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> procurementPlan, Query query) {
|
public R<IPage<ProcurementPlan>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> procurementPlan, Query query) {
|
||||||
IPage<ProcurementPlan> pages = procurementPlanService.page(Condition.getPage(query), Condition.getQueryWrapper(procurementPlan, ProcurementPlan.class));
|
IPage<ProcurementPlan> pages = procurementPlanService.page(Condition.getPage(query), Condition.getQueryWrapper(procurementPlan, ProcurementPlan.class));
|
||||||
@ -106,7 +90,7 @@ public class ProcurementPlanController extends BladeController {
|
|||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
@ApiOperationSupport(order = 4)
|
@ApiOperationSupport(order = 3)
|
||||||
@Operation(summary = "新增", description = "传入procurementPlan")
|
@Operation(summary = "新增", description = "传入procurementPlan")
|
||||||
public R save(@RequestBody ProcurementPlanVO procurementPlanVO) {
|
public R save(@RequestBody ProcurementPlanVO procurementPlanVO) {
|
||||||
return R.status(procurementPlanService.submit(procurementPlanVO));
|
return R.status(procurementPlanService.submit(procurementPlanVO));
|
||||||
@ -116,7 +100,7 @@ public class ProcurementPlanController extends BladeController {
|
|||||||
* 修改
|
* 修改
|
||||||
*/
|
*/
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 4)
|
||||||
@Operation(summary = "修改", description = "传入procurementPlan")
|
@Operation(summary = "修改", description = "传入procurementPlan")
|
||||||
public R update(@RequestBody ProcurementPlanVO procurementPlanVO) {
|
public R update(@RequestBody ProcurementPlanVO procurementPlanVO) {
|
||||||
return R.status(procurementPlanService.submit(procurementPlanVO));
|
return R.status(procurementPlanService.submit(procurementPlanVO));
|
||||||
@ -126,7 +110,7 @@ public class ProcurementPlanController extends BladeController {
|
|||||||
* 新增或修改
|
* 新增或修改
|
||||||
*/
|
*/
|
||||||
@PostMapping("/submit")
|
@PostMapping("/submit")
|
||||||
@ApiOperationSupport(order = 6)
|
@ApiOperationSupport(order = 5)
|
||||||
@Operation(summary = "新增或修改", description = "传入procurementPlan")
|
@Operation(summary = "新增或修改", description = "传入procurementPlan")
|
||||||
public R submit(@RequestBody ProcurementPlanVO procurementPlanVO) {
|
public R submit(@RequestBody ProcurementPlanVO procurementPlanVO) {
|
||||||
return R.status(procurementPlanService.submit(procurementPlanVO));
|
return R.status(procurementPlanService.submit(procurementPlanVO));
|
||||||
@ -136,7 +120,7 @@ public class ProcurementPlanController extends BladeController {
|
|||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
@PostMapping("/remove")
|
@PostMapping("/remove")
|
||||||
@ApiOperationSupport(order = 7)
|
@ApiOperationSupport(order = 6)
|
||||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||||
public R remove(@Parameter(name = "ids", description = "主键集合", in = ParameterIn.QUERY, schema = @Schema(type = "string")) @RequestParam String ids) {
|
public R remove(@Parameter(name = "ids", description = "主键集合", in = ParameterIn.QUERY, schema = @Schema(type = "string")) @RequestParam String ids) {
|
||||||
boolean temp = procurementPlanService.deleteLogic(Func.toLongList(ids));
|
boolean temp = procurementPlanService.deleteLogic(Func.toLongList(ids));
|
||||||
|
|||||||
@ -1,77 +0,0 @@
|
|||||||
/**
|
|
||||||
* BladeX Commercial License Agreement
|
|
||||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
|
||||||
* <p>
|
|
||||||
* Use of this software is governed by the Commercial License Agreement
|
|
||||||
* obtained after purchasing a license from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 1. This software is for development use only under a valid license
|
|
||||||
* from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 2. Redistribution of this software's source code to any third party
|
|
||||||
* without a commercial license is strictly prohibited.
|
|
||||||
* <p>
|
|
||||||
* 3. Licensees may copyright their own code but cannot use segments
|
|
||||||
* from this software for such purposes. Copyright of this software
|
|
||||||
* remains with BladeX.
|
|
||||||
* <p>
|
|
||||||
* Using this software signifies agreement to this License, and the software
|
|
||||||
* must not be used for illegal purposes.
|
|
||||||
* <p>
|
|
||||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
|
||||||
* not liable for any claims arising from secondary or illegal development.
|
|
||||||
* <p>
|
|
||||||
* 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<Dept> getCurrentUserCompany() {
|
|
||||||
return sysClient.getCurrentUserCompany();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当前登录用户所属部门
|
|
||||||
*/
|
|
||||||
@GetMapping("/dept")
|
|
||||||
@ApiOperationSupport(order = 2)
|
|
||||||
@Operation(summary = "获取当前登录用户所属部门", description = "根据当前登录用户部门ID查找dept_category=2的部门")
|
|
||||||
public R<Dept> getCurrentUserDept() {
|
|
||||||
return sysClient.getCurrentUserDept();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
package org.springblade.zhaocai.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.springblade.core.tool.api.R;
|
||||||
|
import org.springblade.zhaocai.pojo.vo.*;
|
||||||
|
import org.springblade.zhaocai.service.IZcProcessService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zcProcess")
|
||||||
|
public class ZcProcessController {
|
||||||
|
@Autowired
|
||||||
|
private IZcProcessService zcProcessService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发起模块
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/initiateProcess")
|
||||||
|
public R initiateProcess()
|
||||||
|
{
|
||||||
|
List<zcInitiateProcessVO> list=zcProcessService.initiateProcess();
|
||||||
|
return R.data(list);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取待办列表
|
||||||
|
*
|
||||||
|
* @param ZcProcessTaskQueryVO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getPageList")
|
||||||
|
public R getTodoPageList(ZcProcessTaskQueryVO ZcProcessTaskQueryVO,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
Page<ZcProcessTaskVO> page = new Page<ZcProcessTaskVO>(pageNo, pageSize);
|
||||||
|
page = zcProcessService.selectPageList(ZcProcessTaskQueryVO, page);
|
||||||
|
return R.data(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取已办列表
|
||||||
|
*
|
||||||
|
* @param ZcProcessTaskQueryVO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getDonePageList")
|
||||||
|
public R getDonePageList(ZcProcessTaskQueryVO ZcProcessTaskQueryVO,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
Page<ZcProcessTaskVO> page = new Page<ZcProcessTaskVO>(pageNo, pageSize);
|
||||||
|
page = zcProcessService.selectDonePageList(ZcProcessTaskQueryVO, page);
|
||||||
|
return R.data(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取已申请列表
|
||||||
|
*
|
||||||
|
* @param ZcProcessTaskQueryVO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getAppliedPageList")
|
||||||
|
public R getAppliedPageList(ZcProcessTaskQueryVO ZcProcessTaskQueryVO,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
Page<ZcProcessTaskVO> page = new Page<ZcProcessTaskVO>(pageNo, pageSize);
|
||||||
|
page = zcProcessService.selectAppliedPageList(ZcProcessTaskQueryVO, page);
|
||||||
|
return R.data(page);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,38 +0,0 @@
|
|||||||
/**
|
|
||||||
* BladeX Commercial License Agreement
|
|
||||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
|
||||||
* <p>
|
|
||||||
* Use of this software is governed by the Commercial License Agreement
|
|
||||||
* obtained after purchasing a license from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 1. This software is for development use only under a valid license
|
|
||||||
* from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 2. Redistribution of this software's source code to any third party
|
|
||||||
* without a commercial license is strictly prohibited.
|
|
||||||
* <p>
|
|
||||||
* 3. Licensees may copyright their own code but cannot use segments
|
|
||||||
* from this software for such purposes. Copyright of this software
|
|
||||||
* remains with BladeX.
|
|
||||||
* <p>
|
|
||||||
* Using this software signifies agreement to this License, and the software
|
|
||||||
* must not be used for illegal purposes.
|
|
||||||
* <p>
|
|
||||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
|
||||||
* not liable for any claims arising from secondary or illegal development.
|
|
||||||
* <p>
|
|
||||||
* 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<BillCode> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -14,20 +14,15 @@
|
|||||||
<result column="is_deleted" property="isDeleted"/>
|
<result column="is_deleted" property="isDeleted"/>
|
||||||
<result column="plan_id" property="planId"/>
|
<result column="plan_id" property="planId"/>
|
||||||
<result column="year" property="year"/>
|
<result column="year" property="year"/>
|
||||||
<result column="plan_no" property="planNo"/>
|
<result column="plan" property="plan"/>
|
||||||
|
<result column="plan_type" property="planType"/>
|
||||||
<result column="sort_no" property="sortNo"/>
|
<result column="sort_no" property="sortNo"/>
|
||||||
<result column="project_name" property="projectName"/>
|
<result column="project_name" property="projectName"/>
|
||||||
<result column="project_type" property="projectType"/>
|
<result column="project_type" property="projectType"/>
|
||||||
<result column="contact_person" property="contactPerson"/>
|
<result column="contact_person" property="contactPerson"/>
|
||||||
<result column="contact_person_id" property="contactPersonId"/>
|
|
||||||
<result column="apply_date" property="applyDate"/>
|
<result column="apply_date" property="applyDate"/>
|
||||||
<result column="expect_date" property="expectDate"/>
|
<result column="expect_date" property="expectDate"/>
|
||||||
<result column="project_attr" property="projectAttr"/>
|
<result column="project_attr" property="projectAttr"/>
|
||||||
<result column="purchase_requirement" property="purchaseRequirement"/>
|
|
||||||
<result column="budget_amount" property="budgetAmount"/>
|
|
||||||
<result column="bidding_method" property="biddingMethod"/>
|
|
||||||
<result column="project_intro" property="projectIntro"/>
|
|
||||||
<result column="remark" property="remark"/>
|
|
||||||
<result column="material_detail" property="materialDetail"/>
|
<result column="material_detail" property="materialDetail"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@ -35,21 +30,20 @@
|
|||||||
<sql id="baseColumnList">
|
<sql id="baseColumnList">
|
||||||
select
|
select
|
||||||
id, tenant_id, create_user, create_time, update_user, update_time, status, is_deleted,
|
id, tenant_id, create_user, create_time, update_user, update_time, status, is_deleted,
|
||||||
plan_id, year, plan_no, sort_no, project_name, project_type, contact_person, contact_person_id,
|
plan_id, year, plan, plan_type, sort_no, project_name, project_type, contact_person,
|
||||||
apply_date, expect_date, project_attr, purchase_requirement, budget_amount, bidding_method,
|
apply_date, expect_date, project_attr, material_detail
|
||||||
project_intro, remark, material_detail
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectByPlanId" resultMap="procurementPlanDetailResultMap">
|
<select id="selectByPlanId" resultMap="procurementPlanDetailResultMap">
|
||||||
<include refid="baseColumnList"/>
|
<include refid="baseColumnList"/>
|
||||||
from zc_procurement_plan_project
|
from blade_procurement_plan_detail
|
||||||
where plan_id = #{planId}
|
where plan_id = #{planId}
|
||||||
and is_deleted = 0
|
and is_deleted = 0
|
||||||
order by sort_no asc
|
order by sort_no asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteByPlanId">
|
<delete id="deleteByPlanId">
|
||||||
delete from zc_procurement_plan_project where plan_id = #{planId}
|
delete from blade_procurement_plan_detail where plan_id = #{planId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -24,21 +24,18 @@
|
|||||||
<result column="estimated_amount" property="estimatedAmount"/>
|
<result column="estimated_amount" property="estimatedAmount"/>
|
||||||
<result column="amount_upper" property="amountUpper"/>
|
<result column="amount_upper" property="amountUpper"/>
|
||||||
<result column="remark" property="remark"/>
|
<result column="remark" property="remark"/>
|
||||||
<result column="flow_status" property="flowStatus"/>
|
|
||||||
<result column="process_instance_id" property="processInstanceId"/>
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="baseColumnList">
|
<sql id="baseColumnList">
|
||||||
select
|
select
|
||||||
id, tenant_id, create_user, create_dept, create_time, update_user, update_time, status, is_deleted,
|
id, tenant_id, create_user, create_dept, create_time, update_user, update_time, status, is_deleted,
|
||||||
applicant, apply_time, phone, company, bill_no, year, dept, apply_company, estimated_amount, amount_upper,
|
applicant, apply_time, phone, company, bill_no, year, dept, apply_company, estimated_amount, amount_upper, remark
|
||||||
remark, flow_status, process_instance_id
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectProcurementPlanPage" resultMap="procurementPlanResultMap">
|
<select id="selectProcurementPlanPage" resultMap="procurementPlanResultMap">
|
||||||
<include refid="baseColumnList"/>
|
<include refid="baseColumnList"/>
|
||||||
from zc_procurement_plan
|
from blade_procurement_plan
|
||||||
where is_deleted = 0
|
where is_deleted = 0
|
||||||
<if test="procurementPlan.applicant != null and procurementPlan.applicant != ''">
|
<if test="procurementPlan.applicant != null and procurementPlan.applicant != ''">
|
||||||
and applicant like concat('%', #{procurementPlan.applicant}, '%')
|
and applicant like concat('%', #{procurementPlan.applicant}, '%')
|
||||||
|
|||||||
@ -1,56 +0,0 @@
|
|||||||
/**
|
|
||||||
* BladeX Commercial License Agreement
|
|
||||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
|
||||||
* <p>
|
|
||||||
* Use of this software is governed by the Commercial License Agreement
|
|
||||||
* obtained after purchasing a license from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 1. This software is for development use only under a valid license
|
|
||||||
* from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 2. Redistribution of this software's source code to any third party
|
|
||||||
* without a commercial license is strictly prohibited.
|
|
||||||
* <p>
|
|
||||||
* 3. Licensees may copyright their own code but cannot use segments
|
|
||||||
* from this software for such purposes. Copyright of this software
|
|
||||||
* remains with BladeX.
|
|
||||||
* <p>
|
|
||||||
* Using this software signifies agreement to this License, and the software
|
|
||||||
* must not be used for illegal purposes.
|
|
||||||
* <p>
|
|
||||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
|
||||||
* not liable for any claims arising from secondary or illegal development.
|
|
||||||
* <p>
|
|
||||||
* 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<ProcurementPlanMaterial> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据项目明细ID查询物料明细列表
|
|
||||||
*
|
|
||||||
* @param projectId 项目明细ID
|
|
||||||
* @return 物料明细列表
|
|
||||||
*/
|
|
||||||
List<ProcurementPlanMaterial> selectByProjectId(Long projectId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据主表ID删除物料明细
|
|
||||||
*
|
|
||||||
* @param planId 主表ID
|
|
||||||
* @return 影响行数
|
|
||||||
*/
|
|
||||||
int deleteByPlanId(Long planId);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
<?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="org.springblade.zhaocai.mapper.ProcurementPlanMaterialMapper">
|
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
|
||||||
<resultMap id="procurementPlanMaterialResultMap" type="org.springblade.zhaocai.pojo.entity.ProcurementPlanMaterial">
|
|
||||||
<result column="id" property="id"/>
|
|
||||||
<result column="tenant_id" property="tenantId"/>
|
|
||||||
<result column="create_user" property="createUser"/>
|
|
||||||
<result column="create_time" property="createTime"/>
|
|
||||||
<result column="update_user" property="updateUser"/>
|
|
||||||
<result column="update_time" property="updateTime"/>
|
|
||||||
<result column="status" property="status"/>
|
|
||||||
<result column="is_deleted" property="isDeleted"/>
|
|
||||||
<result column="plan_id" property="planId"/>
|
|
||||||
<result column="project_id" property="projectId"/>
|
|
||||||
<result column="sort_no" property="sortNo"/>
|
|
||||||
<result column="material_name" property="materialName"/>
|
|
||||||
<result column="material_code" property="materialCode"/>
|
|
||||||
<result column="specification" property="specification"/>
|
|
||||||
<result column="brand" property="brand"/>
|
|
||||||
<result column="unit" property="unit"/>
|
|
||||||
<result column="reference_price" property="referencePrice"/>
|
|
||||||
<result column="quantity" property="quantity"/>
|
|
||||||
<result column="estimated_amount" property="estimatedAmount"/>
|
|
||||||
<result column="contact_person" property="contactPerson"/>
|
|
||||||
<result column="contact_person_id" property="contactPersonId"/>
|
|
||||||
<result column="apply_date" property="applyDate"/>
|
|
||||||
<result column="expect_date" property="expectDate"/>
|
|
||||||
<result column="last_year_total" property="lastYearTotal"/>
|
|
||||||
<result column="last_year_avg_price" property="lastYearAvgPrice"/>
|
|
||||||
<result column="last_year_total_amount" property="lastYearTotalAmount"/>
|
|
||||||
<result column="requirement_intro" property="requirementIntro"/>
|
|
||||||
<result column="remark" property="remark"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
|
||||||
<sql id="baseColumnList">
|
|
||||||
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
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectByProjectId" resultMap="procurementPlanMaterialResultMap">
|
|
||||||
<include refid="baseColumnList"/>
|
|
||||||
from zc_procurement_plan_material
|
|
||||||
where project_id = #{projectId}
|
|
||||||
and is_deleted = 0
|
|
||||||
order by sort_no asc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteByPlanId">
|
|
||||||
delete from zc_procurement_plan_material where plan_id = #{planId}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package org.springblade.zhaocai.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.springblade.zhaocai.pojo.vo.ZcProcessTaskQueryVO;
|
||||||
|
import org.springblade.zhaocai.pojo.vo.ZcProcessTaskVO;
|
||||||
|
import org.springblade.zhaocai.pojo.vo.zcInitiateProcessVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ZcProcessMapper extends BaseMapper<ZcProcessTaskQueryVO> {
|
||||||
|
|
||||||
|
@Select("select process_name as processName,process_id as processId from ctp_proclass_link where system_code='zhaocai' and class_id='9999999999999999999'")
|
||||||
|
List<zcInitiateProcessVO> initiateProcess();
|
||||||
|
/**
|
||||||
|
* 查询待办任务
|
||||||
|
* @param zcProcessQueryTask
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<ZcProcessTaskVO> selectPageList(Page<ZcProcessTaskVO> page, @Param("ZcProcessTaskQueryVO") ZcProcessTaskQueryVO zcProcessQueryTask);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询已办任务列表
|
||||||
|
* @param zcProcessQueryTask
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<ZcProcessTaskVO> selectDonePageList(Page<ZcProcessTaskVO> page,@Param("ZcProcessTaskQueryVO")ZcProcessTaskQueryVO zcProcessQueryTask);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询已申请列表
|
||||||
|
* @param zcProcessQueryTask
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<ZcProcessTaskVO> selectAppliedPageList(Page<ZcProcessTaskVO> page,@Param("ZcProcessTaskQueryVO")ZcProcessTaskQueryVO zcProcessQueryTask);
|
||||||
|
}
|
||||||
@ -0,0 +1,124 @@
|
|||||||
|
<?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="org.springblade.zhaocai.mapper.ZcProcessMapper">
|
||||||
|
|
||||||
|
<!--我的代办-->
|
||||||
|
<select id="selectPageList" resultType="org.springblade.zhaocai.pojo.vo.ZcProcessTaskVO">
|
||||||
|
SELECT
|
||||||
|
ct.cid as id,
|
||||||
|
ci.status,
|
||||||
|
ct.pending_step_name as currentApprovalNode,
|
||||||
|
ci.instance_code as instanceCode,
|
||||||
|
ci.initiator_name as tCreateUser,
|
||||||
|
ci.initiator as tCreateUserAccount,
|
||||||
|
ct.pending_code as taskId,
|
||||||
|
ct.pending_step_key as stepKey,
|
||||||
|
ct.pending_start_Time as tArrivalTime,
|
||||||
|
ct.pending_sub_status as pendingSubStatus,
|
||||||
|
(select ac.deal_time from t_elcap_approval_comment ac where ac.instance_code = ci.instance_code order by ac.deal_time desc limit 1) as tArrivalTime
|
||||||
|
FROM ctp_task ct
|
||||||
|
LEFT JOIN ctp_instance ci ON ci.instance_code = ct.pending_instance_code
|
||||||
|
left join ctp_initiate cinit on cinit.process_key = ci.process_code
|
||||||
|
left join ctp_proclass_link cpl on cpl.process_id = cinit.initiate_id
|
||||||
|
WHERE
|
||||||
|
cpl.system_code = 'zhaocai'
|
||||||
|
and ct.pending_user_code = #{zcProcessQueryTask.userCode}
|
||||||
|
and ct.pending_status = '0'
|
||||||
|
AND ct.`pending_type` in ('0','1','10')
|
||||||
|
order by ct.pending_start_time desc
|
||||||
|
</select>
|
||||||
|
<!-- 我的已办-->
|
||||||
|
<select id="selectDonePageList" resultType="org.springblade.zhaocai.pojo.vo.ZcProcessTaskVO">
|
||||||
|
SELECT
|
||||||
|
CURRENT_STEP.current_pending_user_name AS currentApprovalUser,
|
||||||
|
t.pending_start_time AS tSubmitTime,
|
||||||
|
t.pending_code AS taskId,
|
||||||
|
i.`status`,
|
||||||
|
CURRENT_STEP.current_pending_step_key AS currentApprovalNode,
|
||||||
|
t.pending_step_name AS doneApprovalNode,
|
||||||
|
t.pending_step_key AS stepKey,
|
||||||
|
-- CURRENT_STEP.step_key AS stepKey,
|
||||||
|
i.instance_code AS instanceCode,
|
||||||
|
i.initiator_name AS tCreateUser,
|
||||||
|
i.start_time AS tCreateTime
|
||||||
|
FROM
|
||||||
|
ctp_instance i
|
||||||
|
left join ctp_initiate cinit on cinit.process_key = i.process_code
|
||||||
|
left join ctp_proclass_link cpl on cpl.process_id = cinit.initiate_id
|
||||||
|
LEFT JOIN ctp_task t ON t.pending_instance_code = i.instance_code
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
pending_instance_code,
|
||||||
|
MAX(pending_step_name) AS current_pending_step_key,
|
||||||
|
pending_step_key AS step_key,
|
||||||
|
GROUP_CONCAT(pending_user_name SEPARATOR ',') AS current_pending_user_name
|
||||||
|
FROM
|
||||||
|
ctp_task
|
||||||
|
WHERE
|
||||||
|
pending_step_type IN ('0', '1')
|
||||||
|
AND pending_type IN ('0', '1', '10')
|
||||||
|
AND pending_status = '0'
|
||||||
|
GROUP BY
|
||||||
|
pending_step_key,
|
||||||
|
pending_instance_code
|
||||||
|
) AS CURRENT_STEP ON CURRENT_STEP.pending_instance_code = t.pending_instance_code
|
||||||
|
|
||||||
|
WHERE
|
||||||
|
t.pending_user_code = #{zcProcessQueryTask.userCode}
|
||||||
|
AND t.pending_status = '1'
|
||||||
|
AND t.pending_type IN ('0', '1', '2', '10')
|
||||||
|
AND t.pending_step_type != '0'
|
||||||
|
AND cpl.system_code = 'zhaocai'
|
||||||
|
|
||||||
|
order by t.pending_start_time desc
|
||||||
|
</select>
|
||||||
|
<!-- 已申请-->
|
||||||
|
<select id="selectAppliedPageList" resultType="org.springblade.zhaocai.pojo.vo.ZcProcessTaskVO">
|
||||||
|
SELECT
|
||||||
|
instance.STATUS AS STATUS,
|
||||||
|
instance.instance_code AS instanceCode,
|
||||||
|
instance.initiator_name AS tCreateUser,
|
||||||
|
instance.start_time AS tCreateTime,
|
||||||
|
TASKS_IN_PROGRESS.taskId AS taskId,
|
||||||
|
TASKS_IN_PROGRESS.step_key AS stepKey,
|
||||||
|
|
||||||
|
CASE
|
||||||
|
WHEN instance.STATUS = 1 THEN
|
||||||
|
instance.current_step
|
||||||
|
ELSE
|
||||||
|
TASKS_IN_PROGRESS.pending_step_name
|
||||||
|
END AS currentApprovalNode,
|
||||||
|
|
||||||
|
TASKS_IN_PROGRESS.pending_user_name AS currentApprovalUser
|
||||||
|
FROM
|
||||||
|
ctp_instance AS instance
|
||||||
|
left join ctp_initiate cinit on cinit.process_key = instance.process_code
|
||||||
|
left join ctp_proclass_link cpl on cpl.process_id = cinit.initiate_id
|
||||||
|
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
pending_instance_code,
|
||||||
|
MAX(pending_step_name) AS pending_step_name,
|
||||||
|
MAX(pending_code) AS taskId,
|
||||||
|
pending_step_key AS step_key,
|
||||||
|
GROUP_CONCAT(pending_user_name SEPARATOR ',') AS pending_user_name
|
||||||
|
FROM
|
||||||
|
ctp_task
|
||||||
|
WHERE
|
||||||
|
pending_step_type IN ('0', '1')
|
||||||
|
AND pending_type IN ('0', '1', '10')
|
||||||
|
AND pending_status = '0'
|
||||||
|
GROUP BY
|
||||||
|
pending_step_key,
|
||||||
|
pending_instance_code
|
||||||
|
) AS TASKS_IN_PROGRESS
|
||||||
|
ON TASKS_IN_PROGRESS.pending_instance_code = instance.instance_code
|
||||||
|
|
||||||
|
WHERE
|
||||||
|
cpl.system_code = 'zhaocai'
|
||||||
|
AND initiator = #{zcProcessQueryTask.userCode}
|
||||||
|
|
||||||
|
order by instance.start_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -1,46 +0,0 @@
|
|||||||
/**
|
|
||||||
* BladeX Commercial License Agreement
|
|
||||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
|
||||||
* <p>
|
|
||||||
* Use of this software is governed by the Commercial License Agreement
|
|
||||||
* obtained after purchasing a license from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 1. This software is for development use only under a valid license
|
|
||||||
* from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 2. Redistribution of this software's source code to any third party
|
|
||||||
* without a commercial license is strictly prohibited.
|
|
||||||
* <p>
|
|
||||||
* 3. Licensees may copyright their own code but cannot use segments
|
|
||||||
* from this software for such purposes. Copyright of this software
|
|
||||||
* remains with BladeX.
|
|
||||||
* <p>
|
|
||||||
* Using this software signifies agreement to this License, and the software
|
|
||||||
* must not be used for illegal purposes.
|
|
||||||
* <p>
|
|
||||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
|
||||||
* not liable for any claims arising from secondary or illegal development.
|
|
||||||
* <p>
|
|
||||||
* 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<BillCode> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成唯一单据号
|
|
||||||
*
|
|
||||||
* @param billType 单据类型
|
|
||||||
* @return 单据号
|
|
||||||
*/
|
|
||||||
String generateBillCode(String billType);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
/**
|
|
||||||
* BladeX Commercial License Agreement
|
|
||||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
|
||||||
* <p>
|
|
||||||
* Use of this software is governed by the Commercial License Agreement
|
|
||||||
* obtained after purchasing a license from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 1. This software is for development use only under a valid license
|
|
||||||
* from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 2. Redistribution of this software's source code to any third party
|
|
||||||
* without a commercial license is strictly prohibited.
|
|
||||||
* <p>
|
|
||||||
* 3. Licensees may copyright their own code but cannot use segments
|
|
||||||
* from this software for such purposes. Copyright of this software
|
|
||||||
* remains with BladeX.
|
|
||||||
* <p>
|
|
||||||
* Using this software signifies agreement to this License, and the software
|
|
||||||
* must not be used for illegal purposes.
|
|
||||||
* <p>
|
|
||||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
|
||||||
* not liable for any claims arising from secondary or illegal development.
|
|
||||||
* <p>
|
|
||||||
* 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<ProcurementPlanMaterial> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据项目明细ID查询物料明细列表
|
|
||||||
*
|
|
||||||
* @param projectId 项目明细ID
|
|
||||||
* @return 物料明细列表
|
|
||||||
*/
|
|
||||||
List<ProcurementPlanMaterial> listByProjectId(Long projectId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据主表ID删除物料明细
|
|
||||||
*
|
|
||||||
* @param planId 主表ID
|
|
||||||
* @return 是否成功
|
|
||||||
*/
|
|
||||||
boolean removeByPlanId(Long planId);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
package org.springblade.zhaocai.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.springblade.zhaocai.pojo.vo.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IZcProcessService extends IService<ZcProcessTaskQueryVO> {
|
||||||
|
|
||||||
|
List<zcInitiateProcessVO> initiateProcess();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询待办列表
|
||||||
|
* @param zcProcessTask
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<ZcProcessTaskVO> selectPageList(ZcProcessTaskQueryVO zcProcessTask, Page<ZcProcessTaskVO> page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询已办列表
|
||||||
|
* @param zcProcessTask
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<ZcProcessTaskVO> selectDonePageList(ZcProcessTaskQueryVO zcProcessTask, Page<ZcProcessTaskVO> page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询已申请列表
|
||||||
|
* @param zcProcessTask
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<ZcProcessTaskVO> selectAppliedPageList(ZcProcessTaskQueryVO zcProcessTask, Page<ZcProcessTaskVO> page);
|
||||||
|
}
|
||||||
@ -1,79 +0,0 @@
|
|||||||
/**
|
|
||||||
* BladeX Commercial License Agreement
|
|
||||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
|
||||||
* <p>
|
|
||||||
* Use of this software is governed by the Commercial License Agreement
|
|
||||||
* obtained after purchasing a license from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 1. This software is for development use only under a valid license
|
|
||||||
* from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 2. Redistribution of this software's source code to any third party
|
|
||||||
* without a commercial license is strictly prohibited.
|
|
||||||
* <p>
|
|
||||||
* 3. Licensees may copyright their own code but cannot use segments
|
|
||||||
* from this software for such purposes. Copyright of this software
|
|
||||||
* remains with BladeX.
|
|
||||||
* <p>
|
|
||||||
* Using this software signifies agreement to this License, and the software
|
|
||||||
* must not be used for illegal purposes.
|
|
||||||
* <p>
|
|
||||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
|
||||||
* not liable for any claims arising from secondary or illegal development.
|
|
||||||
* <p>
|
|
||||||
* 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<BillCodeMapper, BillCode> 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.<BillCode>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("单据号生成失败,请重试");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
/**
|
|
||||||
* BladeX Commercial License Agreement
|
|
||||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
|
||||||
* <p>
|
|
||||||
* Use of this software is governed by the Commercial License Agreement
|
|
||||||
* obtained after purchasing a license from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 1. This software is for development use only under a valid license
|
|
||||||
* from BladeX.
|
|
||||||
* <p>
|
|
||||||
* 2. Redistribution of this software's source code to any third party
|
|
||||||
* without a commercial license is strictly prohibited.
|
|
||||||
* <p>
|
|
||||||
* 3. Licensees may copyright their own code but cannot use segments
|
|
||||||
* from this software for such purposes. Copyright of this software
|
|
||||||
* remains with BladeX.
|
|
||||||
* <p>
|
|
||||||
* Using this software signifies agreement to this License, and the software
|
|
||||||
* must not be used for illegal purposes.
|
|
||||||
* <p>
|
|
||||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
|
||||||
* not liable for any claims arising from secondary or illegal development.
|
|
||||||
* <p>
|
|
||||||
* 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<ProcurementPlanMaterialMapper, ProcurementPlanMaterial> implements IProcurementPlanMaterialService {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ProcurementPlanMaterial> listByProjectId(Long projectId) {
|
|
||||||
return baseMapper.selectByProjectId(projectId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean removeByPlanId(Long planId) {
|
|
||||||
return baseMapper.deleteByPlanId(planId) >= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -32,25 +32,17 @@ import org.springblade.core.tool.utils.Func;
|
|||||||
import org.springblade.zhaocai.mapper.ProcurementPlanMapper;
|
import org.springblade.zhaocai.mapper.ProcurementPlanMapper;
|
||||||
import org.springblade.zhaocai.pojo.entity.ProcurementPlan;
|
import org.springblade.zhaocai.pojo.entity.ProcurementPlan;
|
||||||
import org.springblade.zhaocai.pojo.entity.ProcurementPlanDetail;
|
import org.springblade.zhaocai.pojo.entity.ProcurementPlanDetail;
|
||||||
import org.springblade.zhaocai.pojo.entity.ProcurementPlanMaterial;
|
|
||||||
import org.springblade.zhaocai.pojo.vo.ProcurementPlanDetailVO;
|
import org.springblade.zhaocai.pojo.vo.ProcurementPlanDetailVO;
|
||||||
import org.springblade.zhaocai.pojo.vo.ProcurementPlanMaterialVO;
|
|
||||||
import org.springblade.zhaocai.pojo.vo.ProcurementPlanVO;
|
import org.springblade.zhaocai.pojo.vo.ProcurementPlanVO;
|
||||||
import org.springblade.zhaocai.service.IBillCodeService;
|
|
||||||
import org.springblade.zhaocai.service.IProcurementPlanDetailService;
|
import org.springblade.zhaocai.service.IProcurementPlanDetailService;
|
||||||
import org.springblade.zhaocai.service.IProcurementPlanMaterialService;
|
|
||||||
import org.springblade.zhaocai.service.IProcurementPlanService;
|
import org.springblade.zhaocai.service.IProcurementPlanService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年度招采计划服务实现类
|
* 招采计划服务实现类
|
||||||
*
|
*
|
||||||
* @author Chill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@ -59,8 +51,6 @@ import java.util.stream.Collectors;
|
|||||||
public class ProcurementPlanServiceImpl extends BaseServiceImpl<ProcurementPlanMapper, ProcurementPlan> implements IProcurementPlanService {
|
public class ProcurementPlanServiceImpl extends BaseServiceImpl<ProcurementPlanMapper, ProcurementPlan> implements IProcurementPlanService {
|
||||||
|
|
||||||
private final IProcurementPlanDetailService procurementPlanDetailService;
|
private final IProcurementPlanDetailService procurementPlanDetailService;
|
||||||
private final IProcurementPlanMaterialService procurementPlanMaterialService;
|
|
||||||
private final IBillCodeService billCodeService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<ProcurementPlan> selectProcurementPlanPage(IPage<ProcurementPlan> page, ProcurementPlan procurementPlan) {
|
public IPage<ProcurementPlan> selectProcurementPlanPage(IPage<ProcurementPlan> page, ProcurementPlan procurementPlan) {
|
||||||
@ -79,170 +69,34 @@ public class ProcurementPlanServiceImpl extends BaseServiceImpl<ProcurementPlanM
|
|||||||
vo.setDetailList(detailList.stream().map(detail -> {
|
vo.setDetailList(detailList.stream().map(detail -> {
|
||||||
ProcurementPlanDetailVO detailVO = new ProcurementPlanDetailVO();
|
ProcurementPlanDetailVO detailVO = new ProcurementPlanDetailVO();
|
||||||
Func.copy(detail, detailVO);
|
Func.copy(detail, detailVO);
|
||||||
List<ProcurementPlanMaterial> materialList = procurementPlanMaterialService.listByProjectId(detail.getId());
|
|
||||||
detailVO.setMaterialList(materialList.stream().map(material -> {
|
|
||||||
ProcurementPlanMaterialVO materialVO = new ProcurementPlanMaterialVO();
|
|
||||||
Func.copy(material, materialVO);
|
|
||||||
return materialVO;
|
|
||||||
}).collect(Collectors.toList()));
|
|
||||||
return detailVO;
|
return detailVO;
|
||||||
}).collect(Collectors.toList()));
|
}).toList());
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean submit(ProcurementPlanVO procurementPlanVO) {
|
public boolean submit(ProcurementPlanVO procurementPlanVO) {
|
||||||
// 新建时生成单据号
|
|
||||||
if (procurementPlanVO.getId() == null && !StringUtils.hasText(procurementPlanVO.getBillNo())) {
|
|
||||||
String billNo = billCodeService.generateBillCode("PROCUREMENT_PLAN");
|
|
||||||
procurementPlanVO.setBillNo(billNo);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 自动计算项目属性、招标方式、主表金额
|
|
||||||
this.calculateDetail(procurementPlanVO);
|
|
||||||
|
|
||||||
// 保存主表
|
// 保存主表
|
||||||
boolean result = saveOrUpdate(procurementPlanVO);
|
boolean result = saveOrUpdate(procurementPlanVO);
|
||||||
Long planId = procurementPlanVO.getId();
|
Long planId = procurementPlanVO.getId();
|
||||||
|
// 删除旧明细
|
||||||
// 删除旧项目明细和物料明细
|
|
||||||
procurementPlanDetailService.removeByPlanId(planId);
|
procurementPlanDetailService.removeByPlanId(planId);
|
||||||
procurementPlanMaterialService.removeByPlanId(planId);
|
// 保存新明细
|
||||||
|
|
||||||
// 保存项目明细及物料明细
|
|
||||||
List<ProcurementPlanDetailVO> detailVOList = procurementPlanVO.getDetailList();
|
List<ProcurementPlanDetailVO> detailVOList = procurementPlanVO.getDetailList();
|
||||||
if (Func.isNotEmpty(detailVOList)) {
|
if (Func.isNotEmpty(detailVOList)) {
|
||||||
for (int i = 0; i < detailVOList.size(); i++) {
|
List<ProcurementPlanDetail> detailList = detailVOList.stream().map(detailVO -> {
|
||||||
ProcurementPlanDetailVO detailVO = detailVOList.get(i);
|
|
||||||
ProcurementPlanDetail detail = new ProcurementPlanDetail();
|
ProcurementPlanDetail detail = new ProcurementPlanDetail();
|
||||||
Func.copy(detailVO, detail);
|
Func.copy(detailVO, detail);
|
||||||
detail.setPlanId(planId);
|
detail.setPlanId(planId);
|
||||||
detail.setSortNo(i + 1);
|
return detail;
|
||||||
procurementPlanDetailService.save(detail);
|
}).toList();
|
||||||
Long detailId = detail.getId();
|
for (int i = 0; i < detailList.size(); i++) {
|
||||||
|
detailList.get(i).setSortNo(i + 1);
|
||||||
// 保存物料明细
|
|
||||||
List<ProcurementPlanMaterialVO> materialVOList = detailVO.getMaterialList();
|
|
||||||
if (Func.isNotEmpty(materialVOList)) {
|
|
||||||
List<ProcurementPlanMaterial> materialList = new ArrayList<>();
|
|
||||||
for (int j = 0; j < materialVOList.size(); j++) {
|
|
||||||
ProcurementPlanMaterialVO materialVO = materialVOList.get(j);
|
|
||||||
ProcurementPlanMaterial material = new ProcurementPlanMaterial();
|
|
||||||
Func.copy(materialVO, material);
|
|
||||||
material.setPlanId(planId);
|
|
||||||
material.setProjectId(detailId);
|
|
||||||
material.setSortNo(j + 1);
|
|
||||||
materialList.add(material);
|
|
||||||
}
|
|
||||||
procurementPlanMaterialService.saveBatch(materialList);
|
|
||||||
// 冗余汇总
|
|
||||||
detail.setMaterialDetail(buildMaterialSummary(materialList));
|
|
||||||
procurementPlanDetailService.updateById(detail);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
procurementPlanDetailService.saveBatch(detailList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 接入 blade-flow 流程引擎
|
|
||||||
// R<BladeFlow> result = flowClient.startProcessInstanceById(
|
|
||||||
// processDefinitionId,
|
|
||||||
// FlowUtil.getBusinessKey("zc_procurement_plan", String.valueOf(planId)),
|
|
||||||
// variables
|
|
||||||
// );
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算项目明细的项目属性、招标方式,并汇总主表金额
|
|
||||||
*/
|
|
||||||
private void calculateDetail(ProcurementPlanVO procurementPlanVO) {
|
|
||||||
List<ProcurementPlanDetailVO> detailVOList = procurementPlanVO.getDetailList();
|
|
||||||
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
||||||
if (Func.isNotEmpty(detailVOList)) {
|
|
||||||
for (ProcurementPlanDetailVO detailVO : detailVOList) {
|
|
||||||
String projectType = detailVO.getProjectType();
|
|
||||||
BigDecimal budgetAmount = detailVO.getBudgetAmount() == null ? BigDecimal.ZERO : detailVO.getBudgetAmount();
|
|
||||||
String projectAttr = calculateProjectAttr(projectType, budgetAmount);
|
|
||||||
String biddingMethod = calculateBiddingMethod(projectType, budgetAmount);
|
|
||||||
detailVO.setProjectAttr(projectAttr);
|
|
||||||
detailVO.setBiddingMethod(biddingMethod);
|
|
||||||
totalAmount = totalAmount.add(budgetAmount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
procurementPlanVO.setEstimatedAmount(totalAmount);
|
|
||||||
procurementPlanVO.setAmountUpper(digitUppercase(totalAmount));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算项目属性
|
|
||||||
*/
|
|
||||||
private String calculateProjectAttr(String projectType, BigDecimal budgetAmount) {
|
|
||||||
boolean isEngineering = "工程类".equals(projectType);
|
|
||||||
if ((isEngineering && budgetAmount.compareTo(new BigDecimal("100")) >= 0)
|
|
||||||
|| (!isEngineering && budgetAmount.compareTo(new BigDecimal("50")) >= 0)) {
|
|
||||||
return "一类项目";
|
|
||||||
}
|
|
||||||
if ((isEngineering && budgetAmount.compareTo(new BigDecimal("50")) >= 0)
|
|
||||||
|| (!isEngineering && budgetAmount.compareTo(new BigDecimal("10")) >= 0)) {
|
|
||||||
return "二类项目";
|
|
||||||
}
|
|
||||||
return "三类项目";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算招标方式
|
|
||||||
*/
|
|
||||||
private String calculateBiddingMethod(String projectType, BigDecimal budgetAmount) {
|
|
||||||
String projectAttr = calculateProjectAttr(projectType, budgetAmount);
|
|
||||||
if ("一类项目".equals(projectAttr) || "二类项目".equals(projectAttr)) {
|
|
||||||
return "招标";
|
|
||||||
}
|
|
||||||
return "比价";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 构建物料明细冗余汇总
|
|
||||||
*/
|
|
||||||
private String buildMaterialSummary(List<ProcurementPlanMaterial> materialList) {
|
|
||||||
return materialList.stream()
|
|
||||||
.map(material -> material.getMaterialName() + " x " + material.getQuantity())
|
|
||||||
.collect(Collectors.joining(", "));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 金额大写转换
|
|
||||||
*/
|
|
||||||
private String digitUppercase(BigDecimal amount) {
|
|
||||||
if (amount == null || amount.compareTo(BigDecimal.ZERO) == 0) {
|
|
||||||
return "零元整";
|
|
||||||
}
|
|
||||||
String[] fraction = {"角", "分"};
|
|
||||||
String[] digit = {"零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"};
|
|
||||||
String[][] unit = {{"元", "万", "亿"}, {"", "拾", "佰", "仟"}};
|
|
||||||
double n = amount.doubleValue();
|
|
||||||
String head = n < 0 ? "欠" : "";
|
|
||||||
n = Math.abs(n);
|
|
||||||
StringBuilder s = new StringBuilder();
|
|
||||||
for (int i = 0; i < fraction.length; i++) {
|
|
||||||
s.append((digit[(int) (Math.floor(n * 10 * Math.pow(10, i)) % 10)] + fraction[i]).replaceAll("零.", ""));
|
|
||||||
}
|
|
||||||
if (s.length() == 0) {
|
|
||||||
s.append("整");
|
|
||||||
}
|
|
||||||
n = Math.floor(n);
|
|
||||||
for (int i = 0; i < unit[0].length && n > 0; i++) {
|
|
||||||
StringBuilder p = new StringBuilder();
|
|
||||||
for (int j = 0; j < unit[1].length && n > 0; j++) {
|
|
||||||
p.insert(0, digit[(int) (n % 10)] + unit[1][j]);
|
|
||||||
n = Math.floor(n / 10);
|
|
||||||
}
|
|
||||||
s.insert(0, p.toString().replaceAll("(零.)*零$", "").replaceAll("^$", "零") + unit[0][i]);
|
|
||||||
}
|
|
||||||
return head + s.toString()
|
|
||||||
.replaceAll("(零.)*零元", "元")
|
|
||||||
.replaceAll("(零.)+", "零")
|
|
||||||
.replaceAll("^整$", "零元整");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,58 @@
|
|||||||
|
package org.springblade.zhaocai.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springblade.core.secure.BladeUser;
|
||||||
|
import org.springblade.core.secure.utils.AuthUtil;
|
||||||
|
import org.springblade.zhaocai.mapper.ZcProcessMapper;
|
||||||
|
import org.springblade.zhaocai.pojo.vo.ZcProcessTaskQueryVO;
|
||||||
|
import org.springblade.zhaocai.pojo.vo.ZcProcessTaskVO;
|
||||||
|
import org.springblade.zhaocai.pojo.vo.zcInitiateProcessVO;
|
||||||
|
import org.springblade.zhaocai.service.IZcProcessService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@DS("flow-db")
|
||||||
|
public class ZcProcessServiceImpl extends ServiceImpl<ZcProcessMapper, ZcProcessTaskQueryVO> implements IZcProcessService {
|
||||||
|
@Autowired
|
||||||
|
private ZcProcessMapper zcProcessMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<zcInitiateProcessVO> initiateProcess() {
|
||||||
|
return zcProcessMapper.initiateProcess();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<ZcProcessTaskVO> selectPageList(ZcProcessTaskQueryVO zcProcessQueryTask, Page<ZcProcessTaskVO> page) {
|
||||||
|
BladeUser user = AuthUtil.getUser();
|
||||||
|
//System.out.println("user=====>" + JSONObject.toJSONString(user));
|
||||||
|
if(user != null){
|
||||||
|
zcProcessQueryTask.setUserCode(user.getAccount());
|
||||||
|
}
|
||||||
|
return zcProcessMapper.selectPageList(page,zcProcessQueryTask);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<ZcProcessTaskVO> selectDonePageList(ZcProcessTaskQueryVO zcProcessQueryTask, Page<ZcProcessTaskVO> page) {
|
||||||
|
BladeUser user = AuthUtil.getUser();
|
||||||
|
//System.out.println("user=====>" + JSONObject.toJSONString(user));
|
||||||
|
if(user != null){
|
||||||
|
zcProcessQueryTask.setUserCode(user.getAccount());
|
||||||
|
}
|
||||||
|
return zcProcessMapper.selectDonePageList(page,zcProcessQueryTask);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<ZcProcessTaskVO> selectAppliedPageList(ZcProcessTaskQueryVO zcProcessQueryTask, Page<ZcProcessTaskVO> page) {
|
||||||
|
BladeUser user = AuthUtil.getUser();
|
||||||
|
//System.out.println("user=====>" + JSONObject.toJSONString(user));
|
||||||
|
if(user != null){
|
||||||
|
zcProcessQueryTask.setUserCode(user.getAccount());
|
||||||
|
}
|
||||||
|
return zcProcessMapper.selectAppliedPageList(page,zcProcessQueryTask);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,7 +7,7 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
#主数据源信息
|
#主数据源信息
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://localhost:3306/bladex_zhaocai?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://172.16.92.89:3306/bladex_zhaocai?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||||||
username: root
|
username: root
|
||||||
password: Aa123456
|
password: Aa123456
|
||||||
#动态数据源信息
|
#动态数据源信息
|
||||||
@ -23,6 +23,6 @@ spring:
|
|||||||
#独立校验配置
|
#独立校验配置
|
||||||
validation-query: select 1
|
validation-query: select 1
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://localhost:3306/bladex_zhaocai?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://172.16.92.89:3306/bladex_zhaocai?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||||||
username: root
|
username: root
|
||||||
password: Aa123456
|
password: Aa123456
|
||||||
|
|||||||
@ -3,7 +3,7 @@ spring:
|
|||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
##redis 单机环境配置
|
##redis 单机环境配置
|
||||||
host: 127.0.0.1
|
host: 172.16.92.89
|
||||||
port: 6379
|
port: 6379
|
||||||
password:
|
password:
|
||||||
database: 0
|
database: 0
|
||||||
|
|||||||
@ -3,35 +3,11 @@
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for zc_bill_code
|
-- Table structure for blade_procurement_plan
|
||||||
-- 单据号码表,用于保证单据号唯一性
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `zc_bill_code`;
|
DROP TABLE IF EXISTS `blade_procurement_plan`;
|
||||||
|
|
||||||
CREATE TABLE `zc_bill_code` (
|
CREATE TABLE `blade_procurement_plan` (
|
||||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
|
||||||
`bill_code` varchar(64) NOT NULL COMMENT '单据号',
|
|
||||||
`bill_type` varchar(64) DEFAULT NULL COMMENT '单据类型',
|
|
||||||
`status` int(2) DEFAULT '1' COMMENT '状态',
|
|
||||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
|
||||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
|
||||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
|
||||||
`update_user` bigint(20) DEFAULT NULL COMMENT '更新人',
|
|
||||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
|
||||||
`is_deleted` int(2) DEFAULT '0' COMMENT '是否已删除',
|
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
|
||||||
UNIQUE KEY `uk_bill_code` (`bill_code`) USING BTREE,
|
|
||||||
KEY `idx_bill_type` (`bill_type`) USING BTREE
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='单据号码表';
|
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- Table structure for zc_procurement_plan
|
|
||||||
-- 年度招采计划主表
|
|
||||||
-- ----------------------------
|
|
||||||
DROP TABLE IF EXISTS `zc_procurement_plan`;
|
|
||||||
|
|
||||||
CREATE TABLE `zc_procurement_plan` (
|
|
||||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||||
`applicant` varchar(64) DEFAULT NULL COMMENT '申请人',
|
`applicant` varchar(64) DEFAULT NULL COMMENT '申请人',
|
||||||
@ -40,13 +16,11 @@ CREATE TABLE `zc_procurement_plan` (
|
|||||||
`company` varchar(128) DEFAULT NULL COMMENT '所属公司',
|
`company` varchar(128) DEFAULT NULL COMMENT '所属公司',
|
||||||
`bill_no` varchar(64) DEFAULT NULL COMMENT '单据号',
|
`bill_no` varchar(64) DEFAULT NULL COMMENT '单据号',
|
||||||
`year` varchar(4) DEFAULT NULL COMMENT '年度',
|
`year` varchar(4) DEFAULT NULL COMMENT '年度',
|
||||||
`dept` varchar(128) DEFAULT NULL COMMENT '需求部门',
|
`dept` varchar(128) DEFAULT NULL COMMENT '所属部门',
|
||||||
`apply_company` varchar(128) DEFAULT NULL COMMENT '需求公司',
|
`apply_company` varchar(128) DEFAULT NULL COMMENT '申请所属公司',
|
||||||
`estimated_amount` decimal(18,2) DEFAULT '0.00' COMMENT '年度预估总金额(万元)',
|
`estimated_amount` decimal(18,2) DEFAULT '0.00' COMMENT '预估总金额(万元)',
|
||||||
`amount_upper` varchar(256) DEFAULT NULL COMMENT '预估总金额大写',
|
`amount_upper` varchar(256) DEFAULT NULL COMMENT '预估总金额大写',
|
||||||
`remark` text COMMENT '备注',
|
`remark` text COMMENT '备注',
|
||||||
`flow_status` varchar(64) DEFAULT NULL COMMENT '流程当前节点',
|
|
||||||
`process_instance_id` varchar(64) DEFAULT NULL COMMENT '流程实例ID',
|
|
||||||
`status` int(2) DEFAULT '1' COMMENT '状态',
|
`status` int(2) DEFAULT '1' COMMENT '状态',
|
||||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||||
@ -58,35 +32,29 @@ CREATE TABLE `zc_procurement_plan` (
|
|||||||
UNIQUE KEY `uk_bill_no` (`bill_no`) USING BTREE,
|
UNIQUE KEY `uk_bill_no` (`bill_no`) USING BTREE,
|
||||||
KEY `idx_year` (`year`) USING BTREE,
|
KEY `idx_year` (`year`) USING BTREE,
|
||||||
KEY `idx_applicant` (`applicant`) USING BTREE
|
KEY `idx_applicant` (`applicant`) USING BTREE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='年度招采计划主表';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='招采计划主表';
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for zc_procurement_plan_project
|
-- Table structure for blade_procurement_plan_detail
|
||||||
-- 年度招采计划项目明细表
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `zc_procurement_plan_project`;
|
DROP TABLE IF EXISTS `blade_procurement_plan_detail`;
|
||||||
|
|
||||||
CREATE TABLE `zc_procurement_plan_project` (
|
CREATE TABLE `blade_procurement_plan_detail` (
|
||||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||||
`plan_id` bigint(20) NOT NULL COMMENT '主表ID',
|
`plan_id` bigint(20) NOT NULL COMMENT '主表ID',
|
||||||
`year` varchar(4) DEFAULT NULL COMMENT '年度',
|
`year` varchar(4) DEFAULT NULL COMMENT '年度',
|
||||||
`plan_no` varchar(64) DEFAULT NULL COMMENT '计划号',
|
`plan` varchar(128) DEFAULT NULL COMMENT '计划',
|
||||||
|
`plan_type` varchar(64) DEFAULT NULL COMMENT '计划类型',
|
||||||
`sort_no` int(11) DEFAULT '0' COMMENT '序号',
|
`sort_no` int(11) DEFAULT '0' COMMENT '序号',
|
||||||
`project_name` varchar(100) DEFAULT NULL COMMENT '项目名称',
|
`project_name` varchar(256) DEFAULT NULL COMMENT '项目名称',
|
||||||
`project_type` varchar(64) DEFAULT NULL COMMENT '项目类型',
|
`project_type` varchar(64) DEFAULT NULL COMMENT '项目类型',
|
||||||
`contact_person` varchar(64) DEFAULT NULL COMMENT '项目对接人',
|
`contact_person` varchar(64) DEFAULT NULL COMMENT '项目对接人',
|
||||||
`contact_person_id` bigint(20) DEFAULT NULL COMMENT '项目对接人ID',
|
|
||||||
`apply_date` date DEFAULT NULL COMMENT '计划申请日期',
|
`apply_date` date DEFAULT NULL COMMENT '计划申请日期',
|
||||||
`expect_date` date DEFAULT NULL COMMENT '期望使用/完成日期',
|
`expect_date` date DEFAULT NULL COMMENT '期望使用/完成日期',
|
||||||
`project_attr` varchar(64) DEFAULT NULL COMMENT '项目属性',
|
`project_attr` varchar(64) DEFAULT NULL COMMENT '项目属性',
|
||||||
`purchase_requirement` varchar(512) DEFAULT NULL COMMENT '采购需求',
|
`material_detail` varchar(512) DEFAULT NULL COMMENT '采购物料明细',
|
||||||
`budget_amount` decimal(18,2) DEFAULT '0.00' COMMENT '预算金额(万元)',
|
|
||||||
`bidding_method` varchar(64) DEFAULT NULL COMMENT '招标方式',
|
|
||||||
`project_intro` text COMMENT '项目简介',
|
|
||||||
`remark` text COMMENT '备注',
|
|
||||||
`material_detail` text COMMENT '物料明细冗余汇总',
|
|
||||||
`status` int(2) DEFAULT '1' COMMENT '状态',
|
`status` int(2) DEFAULT '1' COMMENT '状态',
|
||||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
@ -95,47 +63,5 @@ CREATE TABLE `zc_procurement_plan_project` (
|
|||||||
`is_deleted` int(2) DEFAULT '0' COMMENT '是否已删除',
|
`is_deleted` int(2) DEFAULT '0' COMMENT '是否已删除',
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
KEY `idx_plan_id` (`plan_id`) USING BTREE,
|
KEY `idx_plan_id` (`plan_id`) USING BTREE,
|
||||||
KEY `idx_plan_no` (`plan_no`) USING BTREE,
|
|
||||||
KEY `idx_year` (`year`) USING BTREE
|
KEY `idx_year` (`year`) USING BTREE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='年度招采计划项目明细表';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='招采计划明细表';
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- Table structure for zc_procurement_plan_material
|
|
||||||
-- 年度招采计划物料明细表
|
|
||||||
-- ----------------------------
|
|
||||||
DROP TABLE IF EXISTS `zc_procurement_plan_material`;
|
|
||||||
|
|
||||||
CREATE TABLE `zc_procurement_plan_material` (
|
|
||||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
|
||||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
|
||||||
`plan_id` bigint(20) NOT NULL COMMENT '主表ID',
|
|
||||||
`project_id` bigint(20) NOT NULL COMMENT '项目明细ID',
|
|
||||||
`sort_no` int(11) DEFAULT '0' COMMENT '序号',
|
|
||||||
`material_name` varchar(100) DEFAULT NULL COMMENT '物料名称',
|
|
||||||
`material_code` varchar(64) DEFAULT NULL COMMENT '物料编码',
|
|
||||||
`specification` varchar(256) DEFAULT NULL COMMENT '规格型号',
|
|
||||||
`brand` varchar(128) DEFAULT NULL COMMENT '品牌',
|
|
||||||
`unit` varchar(64) DEFAULT NULL COMMENT '计量单位',
|
|
||||||
`reference_price` decimal(18,2) DEFAULT '0.00' COMMENT '参考价',
|
|
||||||
`quantity` int(11) DEFAULT '0' COMMENT '预计数量',
|
|
||||||
`estimated_amount` decimal(18,2) DEFAULT '0.00' COMMENT '预估金额(元)',
|
|
||||||
`contact_person` varchar(64) DEFAULT NULL COMMENT '对接人',
|
|
||||||
`contact_person_id` bigint(20) DEFAULT NULL COMMENT '对接人ID',
|
|
||||||
`apply_date` date DEFAULT NULL COMMENT '计划申请日期',
|
|
||||||
`expect_date` date DEFAULT NULL COMMENT '期望使用/完成日期',
|
|
||||||
`last_year_total` int(11) DEFAULT '0' COMMENT '去年总量',
|
|
||||||
`last_year_avg_price` decimal(18,2) DEFAULT '0.00' COMMENT '去年均价',
|
|
||||||
`last_year_total_amount` decimal(18,2) DEFAULT '0.00' COMMENT '去年总金额',
|
|
||||||
`requirement_intro` text COMMENT '需求简介',
|
|
||||||
`remark` text COMMENT '备注',
|
|
||||||
`status` int(2) DEFAULT '1' COMMENT '状态',
|
|
||||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
|
||||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
|
||||||
`update_user` bigint(20) DEFAULT NULL COMMENT '更新人',
|
|
||||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
|
||||||
`is_deleted` int(2) DEFAULT '0' COMMENT '是否已删除',
|
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
|
||||||
KEY `idx_plan_id` (`plan_id`) USING BTREE,
|
|
||||||
KEY `idx_project_id` (`project_id`) USING BTREE
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='年度招采计划物料明细表';
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user