|
|
@@ -1,6 +1,7 @@
|
|
|
package platform.modules.company.service;
|
|
|
|
|
|
import java.io.File;
|
|
|
+import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
@@ -301,6 +302,39 @@ public class ProjectApplicationService extends BaseService<ProjectApplication> {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public Object getOperationsInfo(Integer companyId, ProjectApplication apply, String applyStartTime) {
|
|
|
+ if (null != apply) {
|
|
|
+ //已经申请的取新数据
|
|
|
+ List<ProjectApplicationOperationsInfo> infos = projectApplicationOperationsInfoService.findOperationsInfoByApply(apply, Constant.DictionaryType.PROJECT_APPLICATION);
|
|
|
+ return infos;
|
|
|
+ } else {
|
|
|
+ List<ProjectApplicationOperationsInfo> operationsInfo = new ArrayList<ProjectApplicationOperationsInfo>();
|
|
|
+ int year = Integer.parseInt(DateUtil.getCurrentDateString("yyyy"));
|
|
|
+ try {
|
|
|
+ year = DateUtil.getYearFromDataString(applyStartTime);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ for (int i = 1; i <= 3; i++) {
|
|
|
+ int dataYear = year - i;
|
|
|
+ ProjectApplicationOperationsInfo info = new ProjectApplicationOperationsInfo();
|
|
|
+ info.setCid(companyId);
|
|
|
+ info.setYear(String.valueOf(dataYear));
|
|
|
+ //企业在数据填报处已经填报的经营信息,带出来
|
|
|
+ CompanyOprationsInfo beforeInfo = companyOprationsInfoService.findCompanyOprationsByCidAndYear(companyId, String.valueOf(dataYear), Constant.DictionaryType.PROJECT_APPLICATION);
|
|
|
+ if (null != beforeInfo) {
|
|
|
+ info.setCurrOperationInfoId(beforeInfo.getId());
|
|
|
+ if (beforeInfo.getOperation_income() != null) {
|
|
|
+ info.setOperation_income(beforeInfo.getOperation_income().toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ operationsInfo.add(info);
|
|
|
+ }
|
|
|
+ return operationsInfo;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void saveMessage(ProjectApplication apply) {
|
|
|
try {
|
|
|
Message messages = new Message();
|
|
|
@@ -1050,7 +1084,7 @@ public class ProjectApplicationService extends BaseService<ProjectApplication> {
|
|
|
*
|
|
|
* @param apply
|
|
|
*/
|
|
|
- private FileDown annexOne(ProjectApplication apply) {
|
|
|
+ public FileDown annexOne(ProjectApplication apply) {
|
|
|
// final String annexName = "2019年苏州高新区工业经济发展专项扶持资金申请资料";
|
|
|
String currentYear = "2022";
|
|
|
try {
|