|
@@ -627,7 +627,7 @@ public class CwReimbursementInfoService {
|
|
//文件类型处理
|
|
//文件类型处理
|
|
List<String> strings = Arrays.asList(amountInfo.getName().split("\\."));
|
|
List<String> strings = Arrays.asList(amountInfo.getName().split("\\."));
|
|
if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
|
|
if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
|
|
- reimbursementAmountInfo.setFileType(strings.get(1));
|
|
|
|
|
|
+ reimbursementAmountInfo.setFileType(strings.get(strings.size() - 1));
|
|
}
|
|
}
|
|
reimbursementAmountInfo.setAttachmentName(amountInfo.getName());
|
|
reimbursementAmountInfo.setAttachmentName(amountInfo.getName());
|
|
reimbursementAmountInfo.setAttachmentFlag("invoiceReimbursement");
|
|
reimbursementAmountInfo.setAttachmentFlag("invoiceReimbursement");
|
|
@@ -680,7 +680,7 @@ public class CwReimbursementInfoService {
|
|
//文件类型处理
|
|
//文件类型处理
|
|
List<String> strings = Arrays.asList(dto.getName().split("\\."));
|
|
List<String> strings = Arrays.asList(dto.getName().split("\\."));
|
|
if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
|
|
if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
|
|
- i.setType(strings.get(1));
|
|
|
|
|
|
+ i.setType(strings.get(strings.size() - 1));
|
|
}
|
|
}
|
|
i.setAttachmentId(id);
|
|
i.setAttachmentId(id);
|
|
i.setAttachmentName(dto.getName());
|
|
i.setAttachmentName(dto.getName());
|
|
@@ -879,7 +879,7 @@ public class CwReimbursementInfoService {
|
|
//文件类型处理
|
|
//文件类型处理
|
|
List<String> strings = Arrays.asList(amountInfo.getName().split("\\."));
|
|
List<String> strings = Arrays.asList(amountInfo.getName().split("\\."));
|
|
if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
|
|
if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
|
|
- reimbursementAmountInfo.setFileType(strings.get(1));
|
|
|
|
|
|
+ reimbursementAmountInfo.setFileType(strings.get(strings.size() - 1));
|
|
}
|
|
}
|
|
reimbursementAmountInfo.setAttachmentName(amountInfo.getName());
|
|
reimbursementAmountInfo.setAttachmentName(amountInfo.getName());
|
|
reimbursementAmountInfo.setAttachmentFlag("invoiceReimbursement");
|
|
reimbursementAmountInfo.setAttachmentFlag("invoiceReimbursement");
|
|
@@ -951,7 +951,7 @@ public class CwReimbursementInfoService {
|
|
//文件类型处理
|
|
//文件类型处理
|
|
List<String> strings = Arrays.asList(dto.getName().split("\\."));
|
|
List<String> strings = Arrays.asList(dto.getName().split("\\."));
|
|
if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
|
|
if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
|
|
- i.setType(strings.get(1));
|
|
|
|
|
|
+ i.setType(strings.get(strings.size() - 1));
|
|
}
|
|
}
|
|
i.setAttachmentId(id);
|
|
i.setAttachmentId(id);
|
|
i.setAttachmentName(dto.getName());
|
|
i.setAttachmentName(dto.getName());
|
|
@@ -1156,16 +1156,24 @@ public class CwReimbursementInfoService {
|
|
BeanUtils.copyProperties(invoiceReimbursement, ccpmReimAmountAndFileDto);
|
|
BeanUtils.copyProperties(invoiceReimbursement, ccpmReimAmountAndFileDto);
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
// 将字符串转换为 LocalDate
|
|
// 将字符串转换为 LocalDate
|
|
- LocalDate invoiceDate = LocalDate.parse(invoiceReimbursement.getInvoiceDate(), formatter);
|
|
|
|
- if (ObjectUtil.isNotEmpty(invoiceDate)){
|
|
|
|
- String year = String.valueOf(invoiceDate.getYear());
|
|
|
|
- String month = String.valueOf(invoiceDate.getMonthValue());
|
|
|
|
- String day = String.valueOf(invoiceDate.getDayOfMonth());
|
|
|
|
- // 设置到 ccpmReimAmountAndFileDto 中
|
|
|
|
- ccpmReimAmountAndFileDto.setInvoiceDate(year + "-" + month + "-" + day);
|
|
|
|
- }else {
|
|
|
|
- ccpmReimAmountAndFileDto.setInvoiceDate("");
|
|
|
|
|
|
+ String dateStr = invoiceReimbursement.getInvoiceDate();
|
|
|
|
+ LocalDate invoiceDate = null;
|
|
|
|
+ if (dateStr != null && !dateStr.trim().isEmpty()) {
|
|
|
|
+ invoiceDate = LocalDate.parse(dateStr, formatter);
|
|
|
|
+ if (ObjectUtil.isNotEmpty(invoiceDate)){
|
|
|
|
+ String year = String.valueOf(invoiceDate.getYear());
|
|
|
|
+ String month = String.valueOf(invoiceDate.getMonthValue());
|
|
|
|
+ String day = String.valueOf(invoiceDate.getDayOfMonth());
|
|
|
|
+ // 设置到 ccpmReimAmountAndFileDto 中
|
|
|
|
+ ccpmReimAmountAndFileDto.setInvoiceDate(year + "-" + month + "-" + day);
|
|
|
|
+ }else {
|
|
|
|
+ ccpmReimAmountAndFileDto.setInvoiceDate("");
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ ccpmReimAmountAndFileDto.setInvoiceDate(null);
|
|
}
|
|
}
|
|
|
|
+ //LocalDate invoiceDate = LocalDate.parse(invoiceReimbursement.getInvoiceDate(), formatter);
|
|
|
|
+
|
|
ccpmReimAmountAndFileDto.setId(i.getId());
|
|
ccpmReimAmountAndFileDto.setId(i.getId());
|
|
ccpmReimAmountAndFileDto.setCreateBy(SpringUtil.getBean(IUserApi.class).getById(i.getBy()));
|
|
ccpmReimAmountAndFileDto.setCreateBy(SpringUtil.getBean(IUserApi.class).getById(i.getBy()));
|
|
invoiceReimbursementFiles.add(ccpmReimAmountAndFileDto);
|
|
invoiceReimbursementFiles.add(ccpmReimAmountAndFileDto);
|
|
@@ -1793,7 +1801,7 @@ public class CwReimbursementInfoService {
|
|
//文件类型处理
|
|
//文件类型处理
|
|
List<String> strings = Arrays.asList(amountInfo.getName().split("\\."));
|
|
List<String> strings = Arrays.asList(amountInfo.getName().split("\\."));
|
|
if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
|
|
if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
|
|
- reimbursementAmountInfo.setFileType(strings.get(1));
|
|
|
|
|
|
+ reimbursementAmountInfo.setFileType(strings.get(strings.size() - 1));
|
|
}
|
|
}
|
|
reimbursementAmountInfo.setAttachmentName(amountInfo.getName());
|
|
reimbursementAmountInfo.setAttachmentName(amountInfo.getName());
|
|
reimbursementAmountInfo.setAttachmentFlag("invoiceReimbursement");
|
|
reimbursementAmountInfo.setAttachmentFlag("invoiceReimbursement");
|