|
|
@ -61,6 +61,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.multipart.commons.CommonsMultipartFile; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.validation.constraints.NotNull; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.OutputStream; |
|
|
|
import java.nio.file.Files; |
|
|
@ -464,6 +465,26 @@ public class WorkdiaryServiceRecordServiceImpl extends BaseServiceImpl<Workdiary |
|
|
|
|
|
|
|
row.setApplicantAddress(house.getFullName()); |
|
|
|
} |
|
|
|
|
|
|
|
// 时间转化
|
|
|
|
String serviceTimeStr = row.getServiceTime(); |
|
|
|
String spliter = null; |
|
|
|
if (serviceTimeStr.contains("/")) { |
|
|
|
spliter = "/"; |
|
|
|
} else if (serviceTimeStr.contains("-")) { |
|
|
|
spliter = "-"; |
|
|
|
} else { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "时间格式不正确", "时间格式不正确"); |
|
|
|
} |
|
|
|
|
|
|
|
String[] arr = serviceTimeStr.split(spliter); |
|
|
|
|
|
|
|
String year = String.format("%04d", Integer.valueOf(arr[0])); |
|
|
|
String month = String.format("%02d", Integer.valueOf(arr[1])); |
|
|
|
String day = String.format("%02d", Integer.valueOf(arr[2])); |
|
|
|
|
|
|
|
Date date = DateUtils.parseDate(String.format("%s-%s-%s", year, month, day), DateUtils.DATE_PATTERN); |
|
|
|
|
|
|
|
// 填充到entity
|
|
|
|
WorkdiaryServiceRecordEntity record = new WorkdiaryServiceRecordEntity( |
|
|
|
EpmetRequestHolder.getLoginUserCustomerId(), |
|
|
@ -477,8 +498,8 @@ public class WorkdiaryServiceRecordServiceImpl extends BaseServiceImpl<Workdiary |
|
|
|
row.getApplicantAddress(), |
|
|
|
row.getApplicantMobile(), |
|
|
|
row.getServiceContent(), |
|
|
|
row.getServiceTime(), |
|
|
|
row.getPrincipal(), |
|
|
|
date, |
|
|
|
row.getPrincipalName(), |
|
|
|
row.getRemark()); |
|
|
|
|
|
|
|
diaryRecordList.add(record); |
|
|
|