11-26-承包合同开票单位改为部门公司
This commit is contained in:
@ -110,7 +110,7 @@ public class XzdContractDetailsBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 开票单位
|
* 开票单位
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "开票单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
// @NotNull(message = "开票单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private Long invoicingUnit;
|
private Long invoicingUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -147,7 +147,7 @@ public class XzdContractDetailsVo implements Serializable {
|
|||||||
private BigDecimal contractAmount;
|
private BigDecimal contractAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开票单位(供应商)
|
* 开票单位(供应商,现改为部门公司)
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "开票单位")
|
@ExcelProperty(value = "开票单位")
|
||||||
private Long invoicingUnit;
|
private Long invoicingUnit;
|
||||||
@ -155,7 +155,7 @@ public class XzdContractDetailsVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 开票单位名称
|
* 开票单位名称
|
||||||
*/
|
*/
|
||||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "invoicingUnit")
|
// @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "invoicingUnit")
|
||||||
private String invoicingUnitName;
|
private String invoicingUnitName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -185,6 +185,17 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
|||||||
add.setContractCode(banBen);
|
add.setContractCode(banBen);
|
||||||
add.setHtzt("正常");
|
add.setHtzt("正常");
|
||||||
|
|
||||||
|
//开票单位(部门) 要获取到顶级(公司)
|
||||||
|
if (bo.getInvoicingUnit() != null) {
|
||||||
|
SysDeptVo sysDeptVo = sysDeptService.selectDeptById(bo.getInvoicingUnit());
|
||||||
|
while (sysDeptVo != null && sysDeptVo.getParentId() != 100){
|
||||||
|
sysDeptVo = sysDeptService.selectDeptById(sysDeptVo.getParentId());
|
||||||
|
}
|
||||||
|
if (sysDeptVo != null) {
|
||||||
|
add.setInvoicingUnit(sysDeptVo.getDeptId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
return false;
|
return false;
|
||||||
@ -565,6 +576,11 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
|||||||
info.setContractAmount(changeVo.getPostChangeTotalCost());
|
info.setContractAmount(changeVo.getPostChangeTotalCost());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取开票单位(部门公司)
|
||||||
|
SysDeptVo sysDeptVo = sysDeptService.selectDeptById(info.getInvoicingUnit());
|
||||||
|
if (sysDeptVo != null){
|
||||||
|
info.setInvoicingUnitName(sysDeptVo.getDeptName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user