11-27-完善开票单位改为部门公司
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user