优化代码
parent
be4a123349
commit
64b5153563
|
@ -11,8 +11,7 @@ public enum ProcessStatus implements Enumerable<String> {
|
|||
draft("草稿"),
|
||||
to_be_audit("待审核"),
|
||||
audit_passed("审核通过"),
|
||||
audit_not_passed("审核不通过"),
|
||||
completed("完成");
|
||||
audit_not_passed("审核不通过");
|
||||
|
||||
private final String description;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import javax.persistence.Id;
|
|||
import javax.persistence.Table;
|
||||
|
||||
import cn.palmte.work.model.enums.ProcurementMode;
|
||||
import cn.palmte.work.model.process.form.SaleContractProcessForm;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
@ -35,4 +36,13 @@ public class ProcurementContract {
|
|||
private String paymentTerms;
|
||||
|
||||
private Integer processId;
|
||||
|
||||
public static ProcurementContract from(SaleContractProcessForm form) {
|
||||
ProcurementContract contract = new ProcurementContract();
|
||||
contract.setMode(form.getProcurementMode());
|
||||
contract.setPaymentTerms(form.getPaymentTerms());
|
||||
contract.setSupplierName(form.getSupplierName());
|
||||
return contract;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -50,6 +50,9 @@ public class ProjectProcess {
|
|||
// 申请人
|
||||
private String applyPersonName;
|
||||
|
||||
// 申请人 ID
|
||||
private Integer applyPersonId;
|
||||
|
||||
// 申请部门
|
||||
private String applyDept;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import javax.persistence.GenerationType;
|
|||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import cn.palmte.work.model.process.form.SaleContractProcessForm;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
@ -37,4 +38,12 @@ public class SaleContract {
|
|||
|
||||
private Integer processId;
|
||||
|
||||
public static SaleContract from(SaleContractProcessForm form) {
|
||||
SaleContract contract = new SaleContract();
|
||||
contract.setClientName(form.getClientName());
|
||||
contract.setPaymentTerms(form.getPaymentTerms());
|
||||
contract.setApplyPersonPhone(form.getApplyPersonPhone());
|
||||
return contract;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ public class ProcessQueryForm {
|
|||
private String projectTitle;
|
||||
private String applyPersonName;
|
||||
|
||||
private String contractNo;
|
||||
|
||||
private ProcessType processType;
|
||||
private ProcessStatus processStatus;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import javax.validation.constraints.NotNull;
|
|||
|
||||
import cn.palmte.work.model.enums.ProcessStatus;
|
||||
import cn.palmte.work.model.enums.ProcessType;
|
||||
import cn.palmte.work.model.enums.ProcurementMode;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
@ -71,4 +72,8 @@ public class SaleContractProcessForm {
|
|||
|
||||
private List<SaleContractDetailForm> incomeDetails;
|
||||
|
||||
private ProcurementMode procurementMode;
|
||||
|
||||
private String supplierName;
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ create table project_process
|
|||
apply_dept varchar(255) null comment '申请部门',
|
||||
apply_dept_leader_name varchar(255) null comment '申请人领导',
|
||||
apply_person_name varchar(255) null comment '申请人姓名',
|
||||
apply_person_id int null comment '申请人ID',
|
||||
contract_name varchar(255) null comment '合同名称',
|
||||
contract_no varchar(255) null comment '合同编号',
|
||||
project_id int null comment '项目ID',
|
||||
|
@ -27,7 +28,7 @@ create table project_process
|
|||
);
|
||||
|
||||
alter table project_process
|
||||
modify last_update_at datetime default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP comment '最后更新时间';
|
||||
add apply_person_id int null comment '申请人ID';
|
||||
|
||||
# 采购合同
|
||||
create table procurement_contract
|
||||
|
|
Loading…
Reference in New Issue