1.0.14 合同添加字段

dev
yinq 2 months ago
parent 8ee37e6d4a
commit b1dc619e33

@ -4,6 +4,8 @@ import org.dromara.common.tenant.core.TenantEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -73,7 +75,7 @@ public class ErpContractInfo extends TenantEntity {
/**
*
*/
private Long totalPrice;
private BigDecimal totalPrice;
/**
*
@ -163,7 +165,7 @@ public class ErpContractInfo extends TenantEntity {
/**
* ()
*/
private Long taxRate;
private BigDecimal taxRate;
/**
*
@ -186,4 +188,23 @@ public class ErpContractInfo extends TenantEntity {
*/
@TableField(exist = false)
private List<ErpContractMaterial> contractMaterialList;
/**
*
*/
@TableField(exist = false)
private String oneCustomerName;
/**
*
*/
@TableField(exist = false)
private String twoCustomerName;
/**
*
*/
@TableField(exist = false)
private String deptName;
}

@ -1,5 +1,6 @@
package org.dromara.oa.erp.domain.bo;
import com.baomidou.mybatisplus.annotation.TableField;
import org.dromara.oa.erp.domain.ErpContractInfo;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.EditGroup;
@ -7,6 +8,8 @@ import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@ -73,7 +76,7 @@ public class ErpContractInfoBo extends BaseEntity {
/**
*
*/
private Long totalPrice;
private BigDecimal totalPrice;
/**
*
@ -163,7 +166,7 @@ public class ErpContractInfoBo extends BaseEntity {
/**
* ()
*/
private Long taxRate;
private BigDecimal taxRate;
/**
*
@ -180,4 +183,19 @@ public class ErpContractInfoBo extends BaseEntity {
*/
private List<ErpContractMaterial> contractMaterialList;
/**
*
*/
private String oneCustomerName;
/**
*
*/
private String twoCustomerName;
/**
*
*/
private String deptName;
}

@ -1,5 +1,6 @@
package org.dromara.oa.erp.domain.vo;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.oa.erp.domain.ErpContractInfo;
@ -93,7 +94,7 @@ public class ErpContractInfoVo implements Serializable {
*
*/
@ExcelProperty(value = "合同总价")
private Long totalPrice;
private BigDecimal totalPrice;
/**
*
@ -203,7 +204,7 @@ public class ErpContractInfoVo implements Serializable {
* ()
*/
@ExcelProperty(value = "合同税率(预留)")
private Long taxRate;
private BigDecimal taxRate;
/**
*
@ -222,4 +223,22 @@ public class ErpContractInfoVo implements Serializable {
* List
*/
private List<ErpContractMaterial> contractMaterialList;
/**
*
*/
@ExcelProperty(value = "甲方公司名称")
private String oneCustomerName;
/**
*
*/
@ExcelProperty(value = "乙方公司名称")
private String twoCustomerName;
/**
*
*/
private String deptName;
}

@ -60,7 +60,7 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
@Override
public TableDataInfo<ErpContractInfoVo> queryPageList(ErpContractInfoBo bo, PageQuery pageQuery) {
MPJLambdaWrapper<ErpContractInfo> lqw = buildQueryWrapper(bo);
Page<ErpContractInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
Page<ErpContractInfoVo> result = baseMapper.selectCustomErpContractInfoVoList(pageQuery.build(), lqw);
return TableDataInfo.build(result);
}
@ -73,7 +73,7 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
@Override
public List<ErpContractInfoVo> queryList(ErpContractInfoBo bo) {
MPJLambdaWrapper<ErpContractInfo> lqw = buildQueryWrapper(bo);
return baseMapper.selectVoList(lqw);
return baseMapper.selectCustomErpContractInfoVoList(lqw);
}
private MPJLambdaWrapper<ErpContractInfo> buildQueryWrapper(ErpContractInfoBo bo) {
@ -159,7 +159,7 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
*
*/
private void validEntityBeforeSave(ErpContractInfo entity) {
// 注释掉物料列表的强制校验,允许空物料列表
// 物料列表的强制校验
// if (entity.getContractMaterialList() == null || entity.getContractMaterialList().isEmpty()) {
// throw new ServiceException("请填写合同物料!");
// }

@ -7,44 +7,50 @@
</resultMap>
<select id="selectCustomErpContractInfoVoList" resultMap="ErpContractInfoResult">
select contract_id,
tenant_id,
contract_flag,
contract_code,
contract_name,
contract_category,
contract_type,
business_direction,
contract_dept_id,
contract_date,
total_price,
one_customer_id,
one_represent,
one_date,
two_customer_id,
two_represent,
two_date,
contract_status,
flow_status,
template_id,
oss_id,
payment_method,
signature_appendix,
internal_contract_code,
external_contract_code,
order_contract_code,
project_contract_code,
warranty_period,
tax_rate,
remark,
active_flag,
del_flag,
create_dept,
create_by,
create_time,
update_by,
update_time
select t.contract_id,
t.tenant_id,
t.contract_flag,
t.contract_code,
t.contract_name,
t.contract_category,
t.contract_type,
t.business_direction,
t.contract_dept_id,
t.contract_date,
t.total_price,
t.one_customer_id,
t.one_represent,
t.one_date,
t.two_customer_id,
t.two_represent,
t.two_date,
t.contract_status,
t.flow_status,
t.template_id,
t.oss_id,
t.payment_method,
t.signature_appendix,
t.internal_contract_code,
t.external_contract_code,
t.order_contract_code,
t.project_contract_code,
t.warranty_period,
t.tax_rate,
t.remark,
t.active_flag,
t.del_flag,
t.create_dept,
t.create_by,
t.create_time,
t.update_by,
t.update_time,
c1.customer_name oneCustomerName,
c2.customer_name twoCustomerName,
d.dept_name
from erp_contract_info t
left join crm_customer_info c1 on t.one_customer_id = c1.customer_id
left join crm_customer_info c2 on t.two_customer_id = c2.customer_id
left join sys_dept d on d.dept_id = t.contract_dept_id
${ew.getCustomSqlSegment}
</select>

Loading…
Cancel
Save