|
@@ -319,6 +319,29 @@ public class CwReimbursementInfoService {
|
|
// 保存基础表信息主键值
|
|
// 保存基础表信息主键值
|
|
detailInfo.setInfoId(id);
|
|
detailInfo.setInfoId(id);
|
|
detailInfoMapper.insert(detailInfo);
|
|
detailInfoMapper.insert(detailInfo);
|
|
|
|
+ //保存数电发票信息
|
|
|
|
+ if (StringUtils.isNotBlank(detailInfo.getReimbursementType())&&"1".equals(detailInfo.getReimbursementType())&& StringUtils.isNotBlank(detailInfo.getFileName())){
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursements())) {
|
|
|
|
+ for (CwReimbursementAmountInfo amountInfo : dto.getInvoiceReimbursements()) {
|
|
|
|
+ if (amountInfo.getNumber().equals(detailInfo.getInvoiceNumber())){
|
|
|
|
+ //电子发票报销 发票信息
|
|
|
|
+ amountInfo.setReimbursementType("1");
|
|
|
|
+ // 生成id
|
|
|
|
+ String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
+ amountInfo.setId(amountId);
|
|
|
|
+ amountInfo.setCreateById(userDTO.getId());
|
|
|
|
+ amountInfo.setCreateTime(new Date());
|
|
|
|
+ amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
+ amountInfo.setUpdateTime(new Date());
|
|
|
|
+ amountInfo.setDelFlag(0);
|
|
|
|
+ // 保存基础表信息主键值
|
|
|
|
+ amountInfo.setInfoId(id);
|
|
|
|
+ amountInfoMapper.insert(amountInfo);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 保存合同详情列表信息
|
|
// 保存合同详情列表信息
|
|
@@ -335,6 +358,30 @@ public class CwReimbursementInfoService {
|
|
// 保存基础表信息主键值
|
|
// 保存基础表信息主键值
|
|
detailInfo.setInfoId(id);
|
|
detailInfo.setInfoId(id);
|
|
cwReimbursementDetailInfoReportMapper.insert(detailInfo);
|
|
cwReimbursementDetailInfoReportMapper.insert(detailInfo);
|
|
|
|
+ //保存数电发票信息
|
|
|
|
+ if (StringUtils.isNotBlank(detailInfo.getReimbursementType())&&"1".equals(detailInfo.getReimbursementType())&& StringUtils.isNotBlank(detailInfo.getFileName())){
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursements())) {
|
|
|
|
+ for (CwReimbursementAmountInfo amountInfo : dto.getInvoiceReimbursements()) {
|
|
|
|
+ if (amountInfo.getNumber().equals(detailInfo.getInvoiceNumber())){
|
|
|
|
+ //电子发票报销 发票信息
|
|
|
|
+ amountInfo.setReimbursementType("1");
|
|
|
|
+ // 生成id
|
|
|
|
+ String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
+ amountInfo.setId(amountId);
|
|
|
|
+ amountInfo.setCreateById(userDTO.getId());
|
|
|
|
+ amountInfo.setCreateTime(new Date());
|
|
|
|
+ amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
+ amountInfo.setUpdateTime(new Date());
|
|
|
|
+ amountInfo.setDelFlag(0);
|
|
|
|
+ // 保存基础表信息主键值
|
|
|
|
+ amountInfo.setInfoId(id);
|
|
|
|
+ amountInfoMapper.insert(amountInfo);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 保存其他报销详情列表信息
|
|
// 保存其他报销详情列表信息
|
|
@@ -343,6 +390,30 @@ public class CwReimbursementInfoService {
|
|
// 保存基础表信息主键值
|
|
// 保存基础表信息主键值
|
|
detailInfo.setInfoId(id);
|
|
detailInfo.setInfoId(id);
|
|
cwReimbursementDetailInfoOtherMapper.insert(detailInfo);
|
|
cwReimbursementDetailInfoOtherMapper.insert(detailInfo);
|
|
|
|
+ //保存数电发票信息
|
|
|
|
+ if (StringUtils.isNotBlank(detailInfo.getReimbursementType())&&"1".equals(detailInfo.getReimbursementType())&& StringUtils.isNotBlank(detailInfo.getFileName())){
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursements())) {
|
|
|
|
+ for (CwReimbursementAmountInfo amountInfo : dto.getInvoiceReimbursements()) {
|
|
|
|
+ if (amountInfo.getNumber().equals(detailInfo.getInvoiceNumber())){
|
|
|
|
+ //电子发票报销 发票信息
|
|
|
|
+ amountInfo.setReimbursementType("1");
|
|
|
|
+ // 生成id
|
|
|
|
+ String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
+ amountInfo.setId(amountId);
|
|
|
|
+ amountInfo.setCreateById(userDTO.getId());
|
|
|
|
+ amountInfo.setCreateTime(new Date());
|
|
|
|
+ amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
+ amountInfo.setUpdateTime(new Date());
|
|
|
|
+ amountInfo.setDelFlag(0);
|
|
|
|
+ // 保存基础表信息主键值
|
|
|
|
+ amountInfo.setInfoId(id);
|
|
|
|
+ amountInfoMapper.insert(amountInfo);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 保存采购报销详情列表信息
|
|
// 保存采购报销详情列表信息
|
|
@@ -363,63 +434,53 @@ public class CwReimbursementInfoService {
|
|
humanReimbursementDetailInfoProcuredMapper.insert(detailInfo);
|
|
humanReimbursementDetailInfoProcuredMapper.insert(detailInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(StringUtils.isNotBlank(dto.getReimbursementType())){
|
|
|
|
- if("0".equals(dto.getReimbursementType())){
|
|
|
|
- // 保存专用发票列表信息
|
|
|
|
- if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
|
|
|
|
- for (CwReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
|
|
|
|
- //普通报销 发票信息
|
|
|
|
- amountInfo.setReimbursementType("0");
|
|
|
|
- // 生成id
|
|
|
|
- String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
- amountInfo.setId(amountId);
|
|
|
|
- amountInfo.setCreateById(userDTO.getId());
|
|
|
|
- amountInfo.setCreateTime(new Date());
|
|
|
|
- amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
- amountInfo.setUpdateTime(new Date());
|
|
|
|
- amountInfo.setDelFlag(0);
|
|
|
|
- // 保存基础表信息主键值
|
|
|
|
- amountInfo.setInfoId(id);
|
|
|
|
- amountInfoMapper.insert(amountInfo);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //清除电子发票信息
|
|
|
|
- // 删除合同列表
|
|
|
|
- LambdaQueryWrapper<CwReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
|
|
|
|
- deleteInfo.eq(CwReimbursementAmountInfo::getInfoId, dto.getId());
|
|
|
|
- deleteInfo.ne(CwReimbursementAmountInfo::getReimbursementType, "0");
|
|
|
|
- amountInfoMapper.delete(deleteInfo);
|
|
|
|
- }else if("1".equals(dto.getReimbursementType())){
|
|
|
|
- // 保存电子发票列表信息
|
|
|
|
- if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursements())) {
|
|
|
|
- for (CwReimbursementAmountInfo amountInfo : dto.getInvoiceReimbursements()) {
|
|
|
|
- //电子发票报销 发票信息
|
|
|
|
- amountInfo.setReimbursementType("1");
|
|
|
|
- // 生成id
|
|
|
|
- String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
- amountInfo.setId(amountId);
|
|
|
|
- amountInfo.setCreateById(userDTO.getId());
|
|
|
|
- amountInfo.setCreateTime(new Date());
|
|
|
|
- amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
- amountInfo.setUpdateTime(new Date());
|
|
|
|
- amountInfo.setDelFlag(0);
|
|
|
|
- // 保存基础表信息主键值
|
|
|
|
- amountInfo.setInfoId(id);
|
|
|
|
- amountInfoMapper.insert(amountInfo);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //清除专用发票信息
|
|
|
|
- LambdaQueryWrapper<CwReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
|
|
|
|
- deleteInfo.eq(CwReimbursementAmountInfo::getInfoId, dto.getId());
|
|
|
|
- deleteInfo.ne(CwReimbursementAmountInfo::getReimbursementType, "1");
|
|
|
|
- amountInfoMapper.delete(deleteInfo);
|
|
|
|
-
|
|
|
|
- // 保存电子发票附件列表信息
|
|
|
|
- if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursementFiles())) {
|
|
|
|
- infoService.saveFiles(dto.getInvoiceReimbursementFiles(), userDTO, id,"invoiceReimbursement");
|
|
|
|
- }
|
|
|
|
|
|
+ // 保存专用发票列表信息
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
|
|
|
|
+ for (CwReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
|
|
|
|
+ //普通报销 发票信息
|
|
|
|
+ amountInfo.setReimbursementType("0");
|
|
|
|
+ // 生成id
|
|
|
|
+ String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
+ amountInfo.setId(amountId);
|
|
|
|
+ amountInfo.setCreateById(userDTO.getId());
|
|
|
|
+ amountInfo.setCreateTime(new Date());
|
|
|
|
+ amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
+ amountInfo.setUpdateTime(new Date());
|
|
|
|
+ amountInfo.setDelFlag(0);
|
|
|
|
+ // 保存基础表信息主键值
|
|
|
|
+ amountInfo.setInfoId(id);
|
|
|
|
+ amountInfoMapper.insert(amountInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+// if(StringUtils.isNotBlank(dto.getReimbursementType())){
|
|
|
|
+// if("0".equals(dto.getReimbursementType())){
|
|
|
|
+//
|
|
|
|
+//
|
|
|
|
+// //清除电子发票信息
|
|
|
|
+// // 删除合同列表
|
|
|
|
+// LambdaQueryWrapper<CwReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
|
|
|
|
+// deleteInfo.eq(CwReimbursementAmountInfo::getInfoId, dto.getId());
|
|
|
|
+// deleteInfo.ne(CwReimbursementAmountInfo::getReimbursementType, "0");
|
|
|
|
+// amountInfoMapper.delete(deleteInfo);
|
|
|
|
+// }else if("1".equals(dto.getReimbursementType())){
|
|
|
|
+// // 保存电子发票列表信息
|
|
|
|
+//
|
|
|
|
+// //清除专用发票信息
|
|
|
|
+// LambdaQueryWrapper<CwReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
|
|
|
|
+// deleteInfo.eq(CwReimbursementAmountInfo::getInfoId, dto.getId());
|
|
|
|
+// deleteInfo.ne(CwReimbursementAmountInfo::getReimbursementType, "1");
|
|
|
|
+// amountInfoMapper.delete(deleteInfo);
|
|
|
|
+//
|
|
|
|
+// // 保存电子发票附件列表信息
|
|
|
|
+// if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursementFiles())) {
|
|
|
|
+// infoService.saveFiles(dto.getInvoiceReimbursementFiles(), userDTO, id,"invoiceReimbursement");
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+ // 保存电子发票附件列表信息
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursementFiles())) {
|
|
|
|
+ infoService.saveFiles(dto.getInvoiceReimbursementFiles(), userDTO, id,"invoiceReimbursement");
|
|
|
|
+ }
|
|
// 保存附件列表信息
|
|
// 保存附件列表信息
|
|
if (CollectionUtils.isNotEmpty(dto.getFiles())) {
|
|
if (CollectionUtils.isNotEmpty(dto.getFiles())) {
|
|
infoService.saveFiles(dto.getFiles(), userDTO, id);
|
|
infoService.saveFiles(dto.getFiles(), userDTO, id);
|
|
@@ -461,6 +522,12 @@ public class CwReimbursementInfoService {
|
|
humanDetailWrapperProcured.eq(HumanReimbursementDetailInfoProcured::getInfoId, dto.getId());
|
|
humanDetailWrapperProcured.eq(HumanReimbursementDetailInfoProcured::getInfoId, dto.getId());
|
|
humanReimbursementDetailInfoProcuredMapper.delete(humanDetailWrapperProcured);
|
|
humanReimbursementDetailInfoProcuredMapper.delete(humanDetailWrapperProcured);
|
|
|
|
|
|
|
|
+ // 修改专用发票信息列表
|
|
|
|
+ // 删除原有数据
|
|
|
|
+ LambdaQueryWrapper<CwReimbursementAmountInfo> amountWrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ amountWrapper.eq(CwReimbursementAmountInfo::getInfoId, dto.getId());
|
|
|
|
+ amountInfoMapper.delete(amountWrapper);
|
|
|
|
+
|
|
// 保存项目详情列表信息
|
|
// 保存项目详情列表信息
|
|
if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
|
|
if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
|
|
for (CwReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
|
|
for (CwReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
|
|
@@ -468,6 +535,30 @@ public class CwReimbursementInfoService {
|
|
detailInfo.setInfoId(dto.getId());
|
|
detailInfo.setInfoId(dto.getId());
|
|
detailInfo.setId("");
|
|
detailInfo.setId("");
|
|
detailInfoMapper.insert(detailInfo);
|
|
detailInfoMapper.insert(detailInfo);
|
|
|
|
+ //保存数电发票信息
|
|
|
|
+ if (StringUtils.isNotBlank(detailInfo.getReimbursementType())&&"1".equals(detailInfo.getReimbursementType())&& StringUtils.isNotBlank(detailInfo.getFileName())){
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursements())) {
|
|
|
|
+ for (CwReimbursementAmountInfo amountInfo : dto.getInvoiceReimbursements()) {
|
|
|
|
+ if (amountInfo.getNumber().equals(detailInfo.getInvoiceNumber())){
|
|
|
|
+ //电子发票报销 发票信息
|
|
|
|
+ amountInfo.setReimbursementType("1");
|
|
|
|
+ // 生成id
|
|
|
|
+ String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
+ amountInfo.setId(amountId);
|
|
|
|
+ amountInfo.setCreateById(userDTO.getId());
|
|
|
|
+ amountInfo.setCreateTime(new Date());
|
|
|
|
+ amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
+ amountInfo.setUpdateTime(new Date());
|
|
|
|
+ amountInfo.setDelFlag(0);
|
|
|
|
+ // 保存基础表信息主键值
|
|
|
|
+ amountInfo.setInfoId(dto.getId());
|
|
|
|
+ amountInfoMapper.insert(amountInfo);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 保存合同详情列表信息
|
|
// 保存合同详情列表信息
|
|
@@ -486,6 +577,30 @@ public class CwReimbursementInfoService {
|
|
detailInfo.setInfoId(dto.getId());
|
|
detailInfo.setInfoId(dto.getId());
|
|
detailInfo.setId("");
|
|
detailInfo.setId("");
|
|
cwReimbursementDetailInfoReportMapper.insert(detailInfo);
|
|
cwReimbursementDetailInfoReportMapper.insert(detailInfo);
|
|
|
|
+ //保存数电发票信息
|
|
|
|
+ if (StringUtils.isNotBlank(detailInfo.getReimbursementType())&&"1".equals(detailInfo.getReimbursementType())&& StringUtils.isNotBlank(detailInfo.getFileName())){
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursements())) {
|
|
|
|
+ for (CwReimbursementAmountInfo amountInfo : dto.getInvoiceReimbursements()) {
|
|
|
|
+ if (amountInfo.getNumber().equals(detailInfo.getInvoiceNumber())){
|
|
|
|
+ //电子发票报销 发票信息
|
|
|
|
+ amountInfo.setReimbursementType("1");
|
|
|
|
+ // 生成id
|
|
|
|
+ String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
+ amountInfo.setId(amountId);
|
|
|
|
+ amountInfo.setCreateById(userDTO.getId());
|
|
|
|
+ amountInfo.setCreateTime(new Date());
|
|
|
|
+ amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
+ amountInfo.setUpdateTime(new Date());
|
|
|
|
+ amountInfo.setDelFlag(0);
|
|
|
|
+ // 保存基础表信息主键值
|
|
|
|
+ amountInfo.setInfoId(dto.getId());
|
|
|
|
+ amountInfoMapper.insert(amountInfo);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 保存其他报销详情列表信息
|
|
// 保存其他报销详情列表信息
|
|
@@ -495,6 +610,30 @@ public class CwReimbursementInfoService {
|
|
detailInfo.setInfoId(dto.getId());
|
|
detailInfo.setInfoId(dto.getId());
|
|
detailInfo.setId("");
|
|
detailInfo.setId("");
|
|
cwReimbursementDetailInfoOtherMapper.insert(detailInfo);
|
|
cwReimbursementDetailInfoOtherMapper.insert(detailInfo);
|
|
|
|
+ //保存数电发票信息
|
|
|
|
+ if (StringUtils.isNotBlank(detailInfo.getReimbursementType())&&"1".equals(detailInfo.getReimbursementType())&& StringUtils.isNotBlank(detailInfo.getFileName())){
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursements())) {
|
|
|
|
+ for (CwReimbursementAmountInfo amountInfo : dto.getInvoiceReimbursements()) {
|
|
|
|
+ if (amountInfo.getNumber().equals(detailInfo.getInvoiceNumber())){
|
|
|
|
+ //电子发票报销 发票信息
|
|
|
|
+ amountInfo.setReimbursementType("1");
|
|
|
|
+ // 生成id
|
|
|
|
+ String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
+ amountInfo.setId(amountId);
|
|
|
|
+ amountInfo.setCreateById(userDTO.getId());
|
|
|
|
+ amountInfo.setCreateTime(new Date());
|
|
|
|
+ amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
+ amountInfo.setUpdateTime(new Date());
|
|
|
|
+ amountInfo.setDelFlag(0);
|
|
|
|
+ // 保存基础表信息主键值
|
|
|
|
+ amountInfo.setInfoId(dto.getId());
|
|
|
|
+ amountInfoMapper.insert(amountInfo);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 保存采购报销详情列表信息
|
|
// 保存采购报销详情列表信息
|
|
@@ -516,69 +655,66 @@ public class CwReimbursementInfoService {
|
|
humanReimbursementDetailInfoProcuredMapper.insert(detailInfo);
|
|
humanReimbursementDetailInfoProcuredMapper.insert(detailInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // 修改专用发票信息列表
|
|
|
|
- // 删除原有数据
|
|
|
|
- LambdaQueryWrapper<CwReimbursementAmountInfo> amountWrapper = new LambdaQueryWrapper<>();
|
|
|
|
- amountWrapper.eq(CwReimbursementAmountInfo::getInfoId, dto.getId());
|
|
|
|
- amountInfoMapper.delete(amountWrapper);
|
|
|
|
- if(StringUtils.isNotBlank(dto.getReimbursementType())){
|
|
|
|
- if("0".equals(dto.getReimbursementType())){
|
|
|
|
- // 保存专用发票列表信息
|
|
|
|
- if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
|
|
|
|
- for (CwReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
|
|
|
|
- //普通报销 发票信息
|
|
|
|
- amountInfo.setReimbursementType("0");
|
|
|
|
- // 生成id
|
|
|
|
- String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
- amountInfo.setId(amountId);
|
|
|
|
- amountInfo.setCreateById(userDTO.getId());
|
|
|
|
- amountInfo.setCreateTime(new Date());
|
|
|
|
- amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
- amountInfo.setUpdateTime(new Date());
|
|
|
|
- amountInfo.setDelFlag(0);
|
|
|
|
- // 保存基础表信息主键值
|
|
|
|
- amountInfo.setInfoId(dto.getId());
|
|
|
|
- amountInfoMapper.insert(amountInfo);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //清除电子发票信息
|
|
|
|
- // 删除合同列表
|
|
|
|
- LambdaQueryWrapper<CwReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
|
|
|
|
- deleteInfo.eq(CwReimbursementAmountInfo::getInfoId, dto.getId());
|
|
|
|
- deleteInfo.ne(CwReimbursementAmountInfo::getReimbursementType, "0");
|
|
|
|
- amountInfoMapper.delete(deleteInfo);
|
|
|
|
- }else if("1".equals(dto.getReimbursementType())){
|
|
|
|
- // 保存电子发票列表信息
|
|
|
|
- if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursements())) {
|
|
|
|
- for (CwReimbursementAmountInfo amountInfo : dto.getInvoiceReimbursements()) {
|
|
|
|
- //电子发票报销 发票信息
|
|
|
|
- amountInfo.setReimbursementType("1");
|
|
|
|
- // 生成id
|
|
|
|
- String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
- amountInfo.setId(amountId);
|
|
|
|
- amountInfo.setCreateById(userDTO.getId());
|
|
|
|
- amountInfo.setCreateTime(new Date());
|
|
|
|
- amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
- amountInfo.setUpdateTime(new Date());
|
|
|
|
- amountInfo.setDelFlag(0);
|
|
|
|
- // 保存基础表信息主键值
|
|
|
|
- amountInfo.setInfoId(dto.getId());
|
|
|
|
- amountInfoMapper.insert(amountInfo);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //清除专用发票信息
|
|
|
|
- LambdaQueryWrapper<CwReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
|
|
|
|
- deleteInfo.eq(CwReimbursementAmountInfo::getInfoId, dto.getId());
|
|
|
|
- deleteInfo.ne(CwReimbursementAmountInfo::getReimbursementType, "1");
|
|
|
|
- amountInfoMapper.delete(deleteInfo);
|
|
|
|
-
|
|
|
|
- // 保存电子发票附件列表信息
|
|
|
|
- if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursementFiles())) {
|
|
|
|
- infoService.updateFiles(dto.getInvoiceReimbursementFiles(), userDTO, dto.getId(),"invoiceReimbursement");
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ // 保存专用发票列表信息
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
|
|
|
|
+ for (CwReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
|
|
|
|
+ //普通报销 发票信息
|
|
|
|
+ amountInfo.setReimbursementType("0");
|
|
|
|
+ // 生成id
|
|
|
|
+ String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
+ amountInfo.setId(amountId);
|
|
|
|
+ amountInfo.setCreateById(userDTO.getId());
|
|
|
|
+ amountInfo.setCreateTime(new Date());
|
|
|
|
+ amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
+ amountInfo.setUpdateTime(new Date());
|
|
|
|
+ amountInfo.setDelFlag(0);
|
|
|
|
+ // 保存基础表信息主键值
|
|
|
|
+ amountInfo.setInfoId(dto.getId());
|
|
|
|
+ amountInfoMapper.insert(amountInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+// if(StringUtils.isNotBlank(dto.getReimbursementType())){
|
|
|
|
+// if("0".equals(dto.getReimbursementType())){
|
|
|
|
+//
|
|
|
|
+// //清除电子发票信息
|
|
|
|
+// // 删除合同列表
|
|
|
|
+// LambdaQueryWrapper<CwReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
|
|
|
|
+// deleteInfo.eq(CwReimbursementAmountInfo::getInfoId, dto.getId());
|
|
|
|
+// deleteInfo.ne(CwReimbursementAmountInfo::getReimbursementType, "0");
|
|
|
|
+// amountInfoMapper.delete(deleteInfo);
|
|
|
|
+// }else if("1".equals(dto.getReimbursementType())){
|
|
|
|
+// // 保存电子发票列表信息
|
|
|
|
+// if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursements())) {
|
|
|
|
+// for (CwReimbursementAmountInfo amountInfo : dto.getInvoiceReimbursements()) {
|
|
|
|
+// //电子发票报销 发票信息
|
|
|
|
+// amountInfo.setReimbursementType("1");
|
|
|
|
+// // 生成id
|
|
|
|
+// String amountId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
+// amountInfo.setId(amountId);
|
|
|
|
+// amountInfo.setCreateById(userDTO.getId());
|
|
|
|
+// amountInfo.setCreateTime(new Date());
|
|
|
|
+// amountInfo.setUpdateById(userDTO.getId());
|
|
|
|
+// amountInfo.setUpdateTime(new Date());
|
|
|
|
+// amountInfo.setDelFlag(0);
|
|
|
|
+// // 保存基础表信息主键值
|
|
|
|
+// amountInfo.setInfoId(dto.getId());
|
|
|
|
+// amountInfoMapper.insert(amountInfo);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// //清除专用发票信息
|
|
|
|
+// LambdaQueryWrapper<CwReimbursementAmountInfo> deleteInfo = new LambdaQueryWrapper<>();
|
|
|
|
+// deleteInfo.eq(CwReimbursementAmountInfo::getInfoId, dto.getId());
|
|
|
|
+// deleteInfo.ne(CwReimbursementAmountInfo::getReimbursementType, "1");
|
|
|
|
+// amountInfoMapper.delete(deleteInfo);
|
|
|
|
+//
|
|
|
|
+//
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+ // 保存电子发票附件列表信息
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dto.getInvoiceReimbursementFiles())) {
|
|
|
|
+ infoService.updateFiles(dto.getInvoiceReimbursementFiles(), userDTO, dto.getId(),"invoiceReimbursement");
|
|
|
|
+ }
|
|
/*if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
|
|
/*if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
|
|
for (CwReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
|
|
for (CwReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
|
|
// 生成id
|
|
// 生成id
|