11-27-完善开票单位改为部门公司

This commit is contained in:
2025-11-27 11:14:31 +08:00
parent b51a3ccf28
commit c9c81bb761

View File

@ -186,15 +186,15 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
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());
}
}
// 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;
if (!flag) {