|
|
@@ -1,6 +1,5 @@
|
|
|
package platform.modules.government.service;
|
|
|
|
|
|
-import com.aliyuncs.exceptions.ClientException;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
|
|
@@ -15,7 +14,6 @@ import platform.common.base.service.DictionaryItemService;
|
|
|
import platform.common.exception.BaseException;
|
|
|
import platform.common.util.*;
|
|
|
import platform.common.util.word.ExportWord;
|
|
|
-import platform.modules.build.entity.BuildingInfo;
|
|
|
import platform.modules.company.dto.LandSupplyApprovalDto;
|
|
|
import platform.modules.government.dao.IndustrialLandSupplyDetailDao;
|
|
|
import platform.modules.government.dto.IndustrialLandSupplyDto;
|
|
|
@@ -55,6 +53,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
@Autowired
|
|
|
private IndustrialLandSupplyDistributionService industrialLandSupplyDistributionService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IndustrialLandSupplyConfigService industrialLandSupplyConfigService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ApprovalService approvalService;
|
|
|
|
|
|
@@ -76,6 +77,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
@Autowired
|
|
|
private DictionaryItemService dictionaryItemService;
|
|
|
|
|
|
+ private static String FEEDBACK_TIME = "1";
|
|
|
+
|
|
|
+ private static String SUMMARY_TIME = "2";
|
|
|
+
|
|
|
+ private static String DISTRIBUTE_TIME = "3";
|
|
|
+
|
|
|
+ private static String JOINT_TRIAL_TIME = "4";
|
|
|
+
|
|
|
/**
|
|
|
* @Author: huZhiHao
|
|
|
* @Description: 分页查询
|
|
|
@@ -335,6 +344,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
if (department != null) {
|
|
|
landSupplyConsultation.setDepartment_name(department.getName());
|
|
|
}
|
|
|
+ int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(FEEDBACK_TIME));
|
|
|
+ landSupplyConsultation.setRemain_time(DateUtil.getTimeDiffStr(landSupplyConsultation.getConsultation_time(), days));
|
|
|
}
|
|
|
entity.setConsultationList(industrialLandSupplyConsultationList);
|
|
|
//分发列表
|
|
|
@@ -371,8 +382,34 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
landSupplyDistribution.setDepartment_name(department.getName());
|
|
|
}
|
|
|
}
|
|
|
+ int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(DISTRIBUTE_TIME));
|
|
|
+ landSupplyDistribution.setRemain_time(DateUtil.getTimeDiffStr(landSupplyDistribution.getDistribute_time(), days));
|
|
|
}
|
|
|
entity.setDistributionList(industrialLandSupplyDistributionList);
|
|
|
+
|
|
|
+ //汇总剩余时间
|
|
|
+ //获取最后一次进入待汇总的时间作为节点
|
|
|
+ Approval approval = new Approval();
|
|
|
+ approval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUMMARY);
|
|
|
+ approval.setApply_id(Integer.parseInt(id));
|
|
|
+ List<Approval> approvalList = approvalService.findListByWhere(approval);
|
|
|
+ if (!CollectionUtils.isEmpty(approvalList)) {
|
|
|
+ Approval approve = approvalList.get(approvalList.size() - 1);
|
|
|
+ int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(SUMMARY_TIME));
|
|
|
+ entity.setSummary_remain_time(DateUtil.getTimeDiffStr(approve.getCreate_time(), days));
|
|
|
+ }
|
|
|
+
|
|
|
+ //会审剩余时间
|
|
|
+ approval = new Approval();
|
|
|
+ approval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.LAND_SUPPLY_PENDIND_SUMMARY);
|
|
|
+ approval.setApply_id(Integer.parseInt(id));
|
|
|
+ approvalList = approvalService.findListByWhere(approval);
|
|
|
+ if (!CollectionUtils.isEmpty(approvalList)) {
|
|
|
+ Approval approve = approvalList.get(approvalList.size() - 1);
|
|
|
+ int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(JOINT_TRIAL_TIME));
|
|
|
+ entity.setJoint_trial_remain_time(DateUtil.getTimeDiffStr(approve.getCreate_time(), days));
|
|
|
+ }
|
|
|
+
|
|
|
//获取商务和商务分管领导审批意见
|
|
|
// Group group = null;
|
|
|
// List<Approval> approvals = null;
|
|
|
@@ -2802,7 +2839,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
list.add(tempList);
|
|
|
tempList = new ArrayList<Object>();
|
|
|
tempList.add("日期");
|
|
|
- tempList.add(DateUtil.getCurrentDateString("yyyy-MM-yy"));
|
|
|
+ String time = DateUtil.getCurrentDateString("yyyy-MM-yy");
|
|
|
+ tempList.add(time);
|
|
|
list.add(tempList);
|
|
|
|
|
|
Map<String, Object> dataList = new HashMap<String, Object>();
|
|
|
@@ -2811,7 +2849,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
|
|
|
response.reset();
|
|
|
response.setContentType("application/octet-stream; charset=utf-8");
|
|
|
- response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("苏州国家高新区产业用地预审办文单.docx", "UTF-8"));
|
|
|
+ response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("苏州国家高新区产业用地预审办文单" + "-" + time + ".docx", "UTF-8"));
|
|
|
|
|
|
ew.exportCheckWord(dataList, document, response);
|
|
|
}
|