|
@@ -4,7 +4,9 @@ import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Maps;
|
|
import com.jeeplus.common.service.CrudService;
|
|
import com.jeeplus.common.service.CrudService;
|
|
import com.jeeplus.common.utils.IdGen;
|
|
import com.jeeplus.common.utils.IdGen;
|
|
|
|
+import com.jeeplus.common.utils.ImageUtil;
|
|
import com.jeeplus.common.utils.MyBeanUtils;
|
|
import com.jeeplus.common.utils.MyBeanUtils;
|
|
|
|
+import com.jeeplus.common.utils.ResponseUtil;
|
|
import com.jeeplus.modules.act.entity.Act;
|
|
import com.jeeplus.modules.act.entity.Act;
|
|
import com.jeeplus.modules.act.service.ActTaskService;
|
|
import com.jeeplus.modules.act.service.ActTaskService;
|
|
import com.jeeplus.modules.oa.entity.OaNotify;
|
|
import com.jeeplus.modules.oa.entity.OaNotify;
|
|
@@ -19,10 +21,14 @@ import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
|
|
import com.jeeplus.modules.sys.entity.MainDictDetail;
|
|
import com.jeeplus.modules.sys.entity.MainDictDetail;
|
|
import com.jeeplus.modules.sys.entity.Office;
|
|
import com.jeeplus.modules.sys.entity.Office;
|
|
import com.jeeplus.modules.sys.entity.User;
|
|
import com.jeeplus.modules.sys.entity.User;
|
|
|
|
+import com.jeeplus.modules.sys.entity.Workattachment;
|
|
import com.jeeplus.modules.sys.service.OfficeService;
|
|
import com.jeeplus.modules.sys.service.OfficeService;
|
|
import com.jeeplus.modules.sys.service.UserService;
|
|
import com.jeeplus.modules.sys.service.UserService;
|
|
|
|
+import com.jeeplus.modules.sys.service.WorkattachmentService;
|
|
import com.jeeplus.modules.sys.utils.DictUtils;
|
|
import com.jeeplus.modules.sys.utils.DictUtils;
|
|
import com.jeeplus.modules.sys.utils.UserUtils;
|
|
import com.jeeplus.modules.sys.utils.UserUtils;
|
|
|
|
+import com.jeeplus.modules.tools.utils.TwoDimensionCode;
|
|
|
|
+import com.jeeplus.modules.utils.SftpClientUtil;
|
|
import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
|
|
import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
|
|
import com.jeeplus.modules.workactivity.entity.Activity;
|
|
import com.jeeplus.modules.workactivity.entity.Activity;
|
|
import com.jeeplus.modules.workactivity.entity.WorkActivityProcess;
|
|
import com.jeeplus.modules.workactivity.entity.WorkActivityProcess;
|
|
@@ -45,9 +51,13 @@ import org.apache.commons.lang3.StringEscapeUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.poi.ss.formula.functions.T;
|
|
import org.apache.poi.ss.formula.functions.T;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
+import java.io.File;
|
|
|
|
+import java.math.BigDecimal;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
|
@@ -59,6 +69,10 @@ import java.util.*;
|
|
@Transactional(readOnly = true)
|
|
@Transactional(readOnly = true)
|
|
public class RuralProjectMessageElectronicSealService extends CrudService<RuralProjectMessageElectronicSealDao, ProjectReportSignatureInfo> {
|
|
public class RuralProjectMessageElectronicSealService extends CrudService<RuralProjectMessageElectronicSealDao, ProjectReportSignatureInfo> {
|
|
|
|
|
|
|
|
+ //生产环境域名
|
|
|
|
+ @Value("${serverDomain}")
|
|
|
|
+ private String serverDomain;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private UserService userService;
|
|
private UserService userService;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -87,6 +101,8 @@ public class RuralProjectMessageElectronicSealService extends CrudService<RuralP
|
|
private ActivityService activityService;
|
|
private ActivityService activityService;
|
|
@Autowired
|
|
@Autowired
|
|
private WorkActivityProcessDao workActivityProcessDao;
|
|
private WorkActivityProcessDao workActivityProcessDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkattachmentService workattachmentService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据项目id查询审定单是否存在送审信息
|
|
* 根据项目id查询审定单是否存在送审信息
|
|
@@ -1250,6 +1266,8 @@ public class RuralProjectMessageElectronicSealService extends CrudService<RuralP
|
|
public Map<String,Object> disposeProjectReportdata(ProjectReportData projectReportData){
|
|
public Map<String,Object> disposeProjectReportdata(ProjectReportData projectReportData){
|
|
//获取报告信息
|
|
//获取报告信息
|
|
projectReportData = projectReportDataService.get(projectReportData.getId());
|
|
projectReportData = projectReportDataService.get(projectReportData.getId());
|
|
|
|
+ //查询签章数据信息
|
|
|
|
+ ProjectReportSignatureInfo projectReportSignatureInfo = dao.get(projectReportData.getNumber());
|
|
//获取项目信息
|
|
//获取项目信息
|
|
RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(projectReportData.getProject().getId());
|
|
RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(projectReportData.getProject().getId());
|
|
ruralProjectRecordsService.queryUserNames(ruralProjectRecords);
|
|
ruralProjectRecordsService.queryUserNames(ruralProjectRecords);
|
|
@@ -1353,7 +1371,11 @@ public class RuralProjectMessageElectronicSealService extends CrudService<RuralP
|
|
//如果项目负责人名称为空
|
|
//如果项目负责人名称为空
|
|
if(StringUtils.isBlank(bzshbConsultant.getZixunyuanName())){
|
|
if(StringUtils.isBlank(bzshbConsultant.getZixunyuanName())){
|
|
User user=userService.get(projectReportData.getBzshbUserId());
|
|
User user=userService.get(projectReportData.getBzshbUserId());
|
|
- bzshbConsultant.setZixunyuanName(user.getName());
|
|
|
|
|
|
+ if(null == user){
|
|
|
|
+ bzshbConsultant.setZixunyuanName("");
|
|
|
|
+ }else{
|
|
|
|
+ bzshbConsultant.setZixunyuanName(user.getName());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1393,10 +1415,12 @@ public class RuralProjectMessageElectronicSealService extends CrudService<RuralP
|
|
}
|
|
}
|
|
//约定作业期处理
|
|
//约定作业期处理
|
|
String promiseTime = "";
|
|
String promiseTime = "";
|
|
- if(null!= ruralProjectRecords.getStartDate() && null != ruralProjectRecords.getEndingDate()){
|
|
|
|
- String startDateStr = dateStr(ruralProjectRecords.getStartDate());
|
|
|
|
- String endingDateStr = dateStr(ruralProjectRecords.getEndingDate());
|
|
|
|
|
|
+ if(null != projectReportSignatureInfo && null!= projectReportSignatureInfo.getAgreedStartDate() && null != projectReportSignatureInfo.getAgreedEndDate()){
|
|
|
|
+ String startDateStr = dateStr(projectReportSignatureInfo.getAgreedStartDate());
|
|
|
|
+ String endingDateStr = dateStr(projectReportSignatureInfo.getAgreedEndDate());
|
|
promiseTime = startDateStr + "至" + endingDateStr;
|
|
promiseTime = startDateStr + "至" + endingDateStr;
|
|
|
|
+ }else{
|
|
|
|
+ promiseTime = "";
|
|
}
|
|
}
|
|
|
|
|
|
//freemarker参数值准备
|
|
//freemarker参数值准备
|
|
@@ -1430,70 +1454,521 @@ public class RuralProjectMessageElectronicSealService extends CrudService<RuralP
|
|
//约定作业期
|
|
//约定作业期
|
|
data.put("promiseTime",promiseTime);
|
|
data.put("promiseTime",promiseTime);
|
|
data.put("projectMaster",ruralProjectRecords.getLeaderNameStr());
|
|
data.put("projectMaster",ruralProjectRecords.getLeaderNameStr());
|
|
|
|
+
|
|
//咨询员信息
|
|
//咨询员信息
|
|
- data.put("consultantName0","");
|
|
|
|
- data.put("consultantProfession0","");
|
|
|
|
- data.put("consultantQualification0","");
|
|
|
|
|
|
+ if(null != consultants){
|
|
|
|
+ data.put("consultantName0",consultants.get(0).getZixunyuanName());
|
|
|
|
+ data.put("consultantProfession0",consultants.get(0).getMajor());
|
|
|
|
+ data.put("consultantQualification0",consultants.get(0).getZhucezigezh());
|
|
|
|
+ }
|
|
|
|
+ //根据咨询员id查询咨询员信息以及咨询员的专业和资格
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getConsultant())){
|
|
|
|
+ RuralReportConsultant consultantUserConsultant = new RuralReportConsultant();
|
|
|
|
+ User consultantUser = UserUtils.get(projectReportSignatureInfo.getConsultant());
|
|
|
|
+ data.put("consultantName1",consultantUser.getName());
|
|
|
|
+ data.put("zixunyuanName",consultantUser.getName());
|
|
|
|
+ data.put("consultantProfession1","");
|
|
|
|
+ data.put("consultantQualification1","");
|
|
|
|
+ List<WorkStaffCertificate> certificateByUser = ruralProjectMessageService.getCertificateByUser(consultantUser.getId());
|
|
|
|
+ for (WorkStaffCertificate certificateInfo: certificateByUser) {
|
|
|
|
+ consultantUserConsultant.setZhucezigezhID(certificateInfo.getNum());
|
|
|
|
+ consultantUserConsultant.setZhucezigezhKey(certificateInfo.getName());
|
|
|
|
+ for (MainDictDetail type : certificateMajor) {
|
|
|
|
+ if(certificateInfo.getMajor().equals(type.getValue())){
|
|
|
|
+ data.put("consultantProfession1",type.getLabel());
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
- if(null != projectReportData.getPrincipalDate()){
|
|
|
|
|
|
+ for (MainDictDetail type : certificateType) {
|
|
|
|
+ if(consultantUserConsultant.getZhucezigezhKey().equals(type.getValue())){
|
|
|
|
+ data.put("consultantQualification1",type.getLabel());
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ data.put("zixunyuanName","");
|
|
|
|
+ data.put("consultantName1","");
|
|
|
|
+ data.put("consultantProfession1","");
|
|
|
|
+ data.put("consultantQualification1","");
|
|
|
|
+ }
|
|
|
|
+ //咨询员意见
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getSelfCalibrationOpinion())){
|
|
|
|
+ data.put("auditOpinion",projectReportSignatureInfo.getSelfCalibrationOpinion());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("auditOpinion","");
|
|
|
|
+ }
|
|
|
|
+ //复核日期
|
|
|
|
+ if(null != projectReportSignatureInfo && null != projectReportSignatureInfo.getReviewDate()){
|
|
|
|
+
|
|
|
|
+ data.put("ziDate",dateStr(projectReportSignatureInfo.getReviewDate()));
|
|
|
|
+ data.put("shenDate",dateStr(projectReportSignatureInfo.getReviewDate()));
|
|
|
|
+ }else{
|
|
|
|
+ data.put("ziDate","");
|
|
|
|
+ data.put("shenDate","");
|
|
|
|
+ }
|
|
|
|
+ if(null != projectReportSignatureInfo && null != projectReportSignatureInfo.getReviewDate()){
|
|
|
|
+ data.put("projectMasterRemarks",projectReportSignatureInfo.getReviewOpinion());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("projectMasterRemarks","");
|
|
|
|
+ }
|
|
|
|
+ if(null != currentConsultant && StringUtils.isNotBlank(currentConsultant.getZixunyuanName())){
|
|
//项目负责人
|
|
//项目负责人
|
|
data.put("projectMaster",currentConsultant.getZixunyuanName());
|
|
data.put("projectMaster",currentConsultant.getZixunyuanName());
|
|
- if(StringUtils.isBlank(currentConsultant.getAuditOpinion())){
|
|
|
|
- data.put("projectMasterRemarks","");
|
|
|
|
- }else{
|
|
|
|
- data.put("projectMasterRemarks",currentConsultant.getAuditOpinion());
|
|
|
|
- }
|
|
|
|
- data.put("projectYear","");
|
|
|
|
- data.put("projectMonth","");
|
|
|
|
- data.put("projectDay","");
|
|
|
|
}else{
|
|
}else{
|
|
//项目负责人
|
|
//项目负责人
|
|
data.put("projectMaster","");
|
|
data.put("projectMaster","");
|
|
- data.put("projectMasterRemarks","");
|
|
|
|
- data.put("projectYear","");
|
|
|
|
- data.put("projectMonth","");
|
|
|
|
- data.put("projectDay","");
|
|
|
|
|
|
+ }
|
|
|
|
+ //技术负责人信息
|
|
|
|
+ data.put("technicistName","");
|
|
|
|
+ data.put("technicistRemarks","");
|
|
|
|
+ //项目登记人
|
|
|
|
+ User projectRecordsCreateUser = UserUtils.get(ruralProjectRecords.getCreateBy().getId());
|
|
|
|
+ data.put("projectCreateName",projectRecordsCreateUser.getName());
|
|
|
|
+ data.put("projectType","");
|
|
|
|
+ //工程咨询
|
|
|
|
+ if("1".equals(ruralProjectRecords.getProjectType())){
|
|
|
|
+ mainDictList = DictUtils.getMainDictList("attachment_project_sort");
|
|
|
|
+ //造价审核
|
|
|
|
+ } else if("2".equals(ruralProjectRecords.getProjectType())){
|
|
|
|
+ mainDictList = DictUtils.getMainDictList("attachment_project_sort_cost");
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(ruralProjectRecords.getAttachmentProjectSort())){
|
|
|
|
+ //处理项目类别
|
|
|
|
+ for (MainDictDetail info: mainDictList) {
|
|
|
|
+ if(ruralProjectRecords.getAttachmentProjectSort().equals(info.getValue())){
|
|
|
|
+ data.put("projectType",info.getLabel());
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //咨询报告日期
|
|
|
|
+ if(null != projectReportSignatureInfo && null != projectReportSignatureInfo.getDateOfConsultationReport()){
|
|
|
|
+ data.put("projectReportDate",dateStr(projectReportSignatureInfo.getDateOfConsultationReport()));
|
|
|
|
+ }else{
|
|
|
|
+ data.put("projectReportDate","");
|
|
}
|
|
}
|
|
|
|
|
|
- if(null != projectReportData.getTechnicistDate()){
|
|
|
|
- //技术负责人
|
|
|
|
- if(StringUtils.isBlank(bzshbConsultant.getZixunyuanName())){
|
|
|
|
- data.put("technicistName","");
|
|
|
|
- }else{
|
|
|
|
- data.put("technicistName",bzshbConsultant.getZixunyuanName());
|
|
|
|
|
|
+ //咨询作业期处理
|
|
|
|
+ data.put("consultOperationalPeriod","");
|
|
|
|
+ if(null != projectReportSignatureInfo && null!= projectReportSignatureInfo.getStartDateOfConsultingOperation() && null != projectReportSignatureInfo.getEndDateOfConsultation()){
|
|
|
|
+ String startDateStr = dateStr(projectReportSignatureInfo.getStartDateOfConsultingOperation());
|
|
|
|
+ String endingDateStr = dateStr(projectReportSignatureInfo.getEndDateOfConsultation());
|
|
|
|
+ data.put("consultOperationalPeriod",startDateStr + "至" + endingDateStr);
|
|
|
|
+ }else{
|
|
|
|
+ data.put("consultOperationalPeriod","");
|
|
|
|
+ }
|
|
|
|
+ //项目所在地
|
|
|
|
+ data.put("projectArea",ruralProjectRecords.getProvince() + ruralProjectRecords.getCity() + ruralProjectRecords.getCounty());
|
|
|
|
+ //工程规模、范围和内容
|
|
|
|
+ if(null != projectReportSignatureInfo && null!= projectReportSignatureInfo.getProjectScaleContentScope()){
|
|
|
|
+ data.put("projectScaleScopeDetails",projectReportSignatureInfo.getProjectScaleContentScope());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("projectScaleScopeDetails","");
|
|
|
|
+ }
|
|
|
|
+ //工程主要内容
|
|
|
|
+ if(null != projectReportSignatureInfo && null!= projectReportSignatureInfo.getMainContentsOfProject()){
|
|
|
|
+ data.put("mainContent",projectReportSignatureInfo.getMainContentsOfProject());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("mainContent","");
|
|
|
|
+ }
|
|
|
|
+ //施工单位
|
|
|
|
+ if(null != projectReportSignatureInfo && null!= projectReportSignatureInfo.getConstructionUnit()){
|
|
|
|
+ data.put("constructionOrganization",projectReportSignatureInfo.getConstructionUnit());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("constructionOrganization","");
|
|
|
|
+ }
|
|
|
|
+ //合同签订日期
|
|
|
|
+ if(null != ruralProjectRecords.getWorkContractInfo() && null != ruralProjectRecords.getWorkContractInfo().getContractDate()){
|
|
|
|
+ data.put("contractSignedDate",dateStr(ruralProjectRecords.getWorkContractInfo().getContractDate()));
|
|
|
|
+ }else{
|
|
|
|
+ data.put("contractSignedDate","");
|
|
|
|
+ }
|
|
|
|
+ //合同总价
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getTotalContractPrice())){
|
|
|
|
+ data.put("contractAllMoney",projectReportSignatureInfo.getTotalContractPrice());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("contractAllMoney","");
|
|
|
|
+ }
|
|
|
|
+ //合同开工日期
|
|
|
|
+ if(null != projectReportSignatureInfo && null!= projectReportSignatureInfo.getContractStartDate()){
|
|
|
|
+ data.put("contractBeginDate",dateStr(projectReportSignatureInfo.getContractStartDate()));
|
|
|
|
+ }else{
|
|
|
|
+ data.put("contractBeginDate","");
|
|
|
|
+ }
|
|
|
|
+ //合同竣工日期
|
|
|
|
+ if(null != projectReportSignatureInfo && null!= projectReportSignatureInfo.getContractEndDate()){
|
|
|
|
+ data.put("contractEndDate",dateStr(projectReportSignatureInfo.getContractEndDate()));
|
|
|
|
+ }else{
|
|
|
|
+ data.put("contractEndDate","");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //工期总日历天数
|
|
|
|
+ if(null != projectReportSignatureInfo && null!= projectReportSignatureInfo.getContractStartDate() && null!= projectReportSignatureInfo.getContractEndDate()){
|
|
|
|
+ try {
|
|
|
|
+ String interval = this.getInterval(projectReportSignatureInfo.getContractStartDate(), projectReportSignatureInfo.getContractEndDate());
|
|
|
|
+ data.put("contractDurationDays",interval);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
}
|
|
}
|
|
- if(StringUtils.isBlank(bzshbConsultant.getAuditOpinion())){
|
|
|
|
- data.put("technicistRemarks","");
|
|
|
|
- }else{
|
|
|
|
- data.put("technicistRemarks",bzshbConsultant.getAuditOpinion());
|
|
|
|
|
|
+ }else{
|
|
|
|
+ data.put("contractDurationDays","");
|
|
|
|
+ }
|
|
|
|
+ //实际开工日期
|
|
|
|
+ if(null != projectReportSignatureInfo && null!= projectReportSignatureInfo.getActualStartDate()){
|
|
|
|
+ data.put("contractPracticalBeginDate",dateStr(projectReportSignatureInfo.getActualStartDate()));
|
|
|
|
+ }else{
|
|
|
|
+ data.put("contractPracticalBeginDate","");
|
|
|
|
+ }
|
|
|
|
+ //实际竣工日期
|
|
|
|
+ if(null != projectReportSignatureInfo && null!= projectReportSignatureInfo.getActualEndDate()){
|
|
|
|
+ data.put("contractPracticalEndDate",dateStr(projectReportSignatureInfo.getActualEndDate()));
|
|
|
|
+ }else{
|
|
|
|
+ data.put("contractPracticalEndDate","");
|
|
|
|
+ }
|
|
|
|
+ //验收日期
|
|
|
|
+ if(null != projectReportSignatureInfo && null!= projectReportSignatureInfo.getCompletionAcceptanceDate()){
|
|
|
|
+ data.put("checkAndAcceptDate",dateStr(projectReportSignatureInfo.getCompletionAcceptanceDate()));
|
|
|
|
+ }else{
|
|
|
|
+ data.put("checkAndAcceptDate","");
|
|
|
|
+ }
|
|
|
|
+ //设计单位
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getDesignUnit())){
|
|
|
|
+ data.put("designOrganization",projectReportSignatureInfo.getDesignUnit());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("designOrganization","");
|
|
|
|
+ }
|
|
|
|
+ //监理单位
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getConstructionControlUnit())){
|
|
|
|
+ data.put("supervisionUnit",projectReportSignatureInfo.getConstructionControlUnit());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("supervisionUnit","");
|
|
|
|
+ }
|
|
|
|
+ //跟踪审计单位
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getFollowUpAuditUnit())){
|
|
|
|
+ data.put("followUpAuditUnit",projectReportSignatureInfo.getFollowUpAuditUnit());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("followUpAuditUnit","");
|
|
|
|
+ }
|
|
|
|
+ //工程设计变更单
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getEngineeringDesignChangeOrder())){
|
|
|
|
+ data.put("projectDesignInventory",projectReportSignatureInfo.getEngineeringDesignChangeOrder());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("projectDesignInventory","无");
|
|
|
|
+ }
|
|
|
|
+ //工程量确认单
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getConfirmationSheetOfQuantities())){
|
|
|
|
+ data.put("workAmountVoucher",projectReportSignatureInfo.getConfirmationSheetOfQuantities());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("workAmountVoucher","无");
|
|
|
|
+ }
|
|
|
|
+ //工程签证
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getProjectVisa())){
|
|
|
|
+ data.put("projectVisa",projectReportSignatureInfo.getProjectVisa());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("projectVisa","无");
|
|
|
|
+ }
|
|
|
|
+ //工程材料设备认质认价单
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getQualityPriceConfirmationOfEngineeringMaterials())){
|
|
|
|
+ data.put("equipmentPrice",projectReportSignatureInfo.getQualityPriceConfirmationOfEngineeringMaterials());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("equipmentPrice","无");
|
|
|
|
+ }
|
|
|
|
+ //工程甲供材料设备清单
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getListmaterialsEquipmentByA())){
|
|
|
|
+ data.put("whichMaterialInventory",projectReportSignatureInfo.getListmaterialsEquipmentByA());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("whichMaterialInventory","无");
|
|
|
|
+ }
|
|
|
|
+ //工程索赔奖励及违约费用
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getProjectRewardAndDamages())){
|
|
|
|
+ data.put("claimDefaultPrice",projectReportSignatureInfo.getProjectRewardAndDamages());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("claimDefaultPrice","无");
|
|
|
|
+ }
|
|
|
|
+ //取费
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getCharge())){
|
|
|
|
+ data.put("fee",projectReportSignatureInfo.getCharge());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("fee","");
|
|
|
|
+ }
|
|
|
|
+ //税金
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getTaxes())){
|
|
|
|
+ data.put("taxationExpense",projectReportSignatureInfo.getTaxes());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("taxationExpense","");
|
|
|
|
+ }
|
|
|
|
+ //工期差异原因与责任
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getDurationDifferenceCausesAndResponsibilities())){
|
|
|
|
+ data.put("durationDuty",projectReportSignatureInfo.getDurationDifferenceCausesAndResponsibilities());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("durationDuty","");
|
|
|
|
+ }
|
|
|
|
+ //质量差异原因与责任
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getQualityDifferenceCausesAndResponsibilities())){
|
|
|
|
+ data.put("qualityDuty",projectReportSignatureInfo.getQualityDifferenceCausesAndResponsibilities());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("qualityDuty","");
|
|
|
|
+ }
|
|
|
|
+ //其他内容及费用
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getOtherContentsAndExpenses())){
|
|
|
|
+ data.put("otherDetailsFee",projectReportSignatureInfo.getOtherContentsAndExpenses());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("otherDetailsFee","无");
|
|
|
|
+ }
|
|
|
|
+ //工程造价咨询合同
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getProjectCostConsultingContract())){
|
|
|
|
+ data.put("projectCostContract",projectReportSignatureInfo.getProjectCostConsultingContract());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("projectCostContract","");
|
|
|
|
+ }
|
|
|
|
+ //现行相关预结算计价依据文件
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getSettlementPricingBasisDocument())){
|
|
|
|
+ data.put("accordingToTheFile",projectReportSignatureInfo.getSettlementPricingBasisDocument());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("accordingToTheFile","");
|
|
|
|
+ }
|
|
|
|
+ //合同金额
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getTotalContractPrice())){
|
|
|
|
+ data.put("contractMoney",projectReportSignatureInfo.getTotalContractPrice());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("contractMoney","");
|
|
|
|
+ }
|
|
|
|
+ //送审金额
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getSubmitFee())){
|
|
|
|
+ data.put("submitFee",projectReportSignatureInfo.getSubmitFee());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("submitFee","");
|
|
|
|
+ }
|
|
|
|
+ //审定金额
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getAuthorizeFee())){
|
|
|
|
+ data.put("examineAndApproveFee",projectReportSignatureInfo.getAuthorizeFee());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("examineAndApproveFee","");
|
|
|
|
+ }
|
|
|
|
+ //核减金额 核减金额=送审金额-审定金额
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getSubmitFee()) && StringUtils.isNotBlank(projectReportSignatureInfo.getAuthorizeFee())){
|
|
|
|
+ BigDecimal submitFee=new BigDecimal(projectReportSignatureInfo.getSubmitFee());
|
|
|
|
+ BigDecimal authorizeFee=new BigDecimal(projectReportSignatureInfo.getAuthorizeFee());
|
|
|
|
+ BigDecimal subtract = submitFee.subtract(authorizeFee);
|
|
|
|
+ data.put("decreaseAccountingFee",subtract.toString());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("decreaseAccountingFee","");
|
|
|
|
+ }
|
|
|
|
+ //核减率 核减率=核减金额/送审金额
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getSubmitFee()) && StringUtils.isNotBlank(projectReportSignatureInfo.getAuthorizeFee())){
|
|
|
|
+ BigDecimal submitFee=new BigDecimal(projectReportSignatureInfo.getSubmitFee());
|
|
|
|
+ BigDecimal authorizeFee=new BigDecimal(projectReportSignatureInfo.getAuthorizeFee());
|
|
|
|
+ BigDecimal subtract = submitFee.subtract(authorizeFee);
|
|
|
|
+ BigDecimal divide = subtract.divide(submitFee,2,BigDecimal.ROUND_HALF_UP);
|
|
|
|
+ data.put("decreaseAccountingRate",divide.toString());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("decreaseAccountingRate","");
|
|
|
|
+ }
|
|
|
|
+ //考核费
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getConstructionUnitAssessmentFee())){
|
|
|
|
+ data.put("inspectionFee",projectReportSignatureInfo.getConstructionUnitAssessmentFee());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("inspectionFee","");
|
|
|
|
+ }
|
|
|
|
+ //考核后审定金额
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getAuthorizeFeeDeductAssessmentFee())){
|
|
|
|
+ data.put("examineAndApproveInspectionFee",projectReportSignatureInfo.getAuthorizeFeeDeductAssessmentFee());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("examineAndApproveInspectionFee","");
|
|
|
|
+ }
|
|
|
|
+ if(null != ruralProjectRecords.getWorkContractInfo()){
|
|
|
|
+ if(null != ruralProjectRecords.getWorkContractInfo().getContractTypeDoc()){
|
|
|
|
+ ruralProjectRecords.getWorkContractInfo().setContractType(DictUtils.getMainDictLabel(String.valueOf(ruralProjectRecords.getWorkContractInfo().getContractTypeDoc()),"contract_info_type",""));
|
|
}
|
|
}
|
|
- data.put("technicistYear","");
|
|
|
|
- data.put("technicistMonth","");
|
|
|
|
- data.put("technicistDay","");
|
|
|
|
|
|
+ }
|
|
|
|
+ //合同金额类别
|
|
|
|
+ if(null != ruralProjectRecords.getWorkContractInfo() && null != ruralProjectRecords.getWorkContractInfo().getContractType()){
|
|
|
|
+ data.put("contractType",ruralProjectRecords.getWorkContractInfo().getContractType());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("contractType","");
|
|
|
|
+ }
|
|
|
|
+ //合同名称
|
|
|
|
+ if(null != ruralProjectRecords.getWorkContractInfo() && null != ruralProjectRecords.getWorkContractInfo().getName()){
|
|
|
|
+ data.put("contractName",ruralProjectRecords.getWorkContractInfo().getName());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("contractName","");
|
|
|
|
+ }
|
|
|
|
+ //核减情况说明
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getDescriptionOfDeduction())){
|
|
|
|
+ data.put("decreaseAccountingExplain",projectReportSignatureInfo.getDescriptionOfDeduction());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("decreaseAccountingExplain","");
|
|
|
|
+ }
|
|
|
|
+ //超合同额情况说明
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getDescriptionOfExceedingTheContractAmount())){
|
|
|
|
+ data.put("exceedContractFeeExplain",projectReportSignatureInfo.getDescriptionOfExceedingTheContractAmount());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("exceedContractFeeExplain","");
|
|
|
|
+ }
|
|
|
|
+ //特殊事项说明
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getDescriptionOfSpecialMatters())){
|
|
|
|
+ data.put("specialItemExplain",projectReportSignatureInfo.getDescriptionOfSpecialMatters());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("specialItemExplain","");
|
|
|
|
+ }
|
|
|
|
+ //甲供材料及设备情况
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getMaterialsAndEquipmentByA())){
|
|
|
|
+ data.put("whichMaterialEquipmentCondition",projectReportSignatureInfo.getMaterialsAndEquipmentByA());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("whichMaterialEquipmentCondition","");
|
|
|
|
+ }
|
|
|
|
+ //甲控乙供材情况
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getaMaterialsByB())){
|
|
|
|
+ data.put("bmaterialCondition",projectReportSignatureInfo.getaMaterialsByB());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("bmaterialCondition","无");
|
|
|
|
+ }
|
|
|
|
+ //奖惩费情况
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getRewardAndPunishmentFees())){
|
|
|
|
+ data.put("rewardsAndPunishmentsFee",projectReportSignatureInfo.getRewardAndPunishmentFees());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("rewardsAndPunishmentsFee","无");
|
|
|
|
+ }
|
|
|
|
+ //水电费处理情况
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getWaterAndElectricityFeesHandleSituation())){
|
|
|
|
+ data.put("waterAndElectricity",projectReportSignatureInfo.getWaterAndElectricityFeesHandleSituation());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("waterAndElectricity","");
|
|
|
|
+ }
|
|
|
|
+ //工程质量保修金处理情况
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getConstructionQualityWarrantyDeposit())){
|
|
|
|
+ data.put("warrantyPremium",projectReportSignatureInfo.getConstructionQualityWarrantyDeposit());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("warrantyPremium","");
|
|
|
|
+ }
|
|
|
|
+ //税金差额计算处理情况
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getTaxDifferenceCalculationAndProcessing())){
|
|
|
|
+ data.put("taxationExpenseDifference",projectReportSignatureInfo.getTaxDifferenceCalculationAndProcessing());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("taxationExpenseDifference","");
|
|
|
|
+ }
|
|
|
|
+ //盖章日期
|
|
|
|
+ if(null != projectReportSignatureInfo && null != projectReportSignatureInfo.getStampDate()){
|
|
|
|
+ data.put("stampDate",dateStr(projectReportSignatureInfo.getStampDate()));
|
|
|
|
+ }else{
|
|
|
|
+ data.put("stampDate","");
|
|
|
|
+ }
|
|
|
|
+ //打印数量
|
|
|
|
+ if(null != projectReportSignatureInfo && StringUtils.isNotBlank(projectReportSignatureInfo.getPrintQuantity())){
|
|
|
|
+ data.put("printCount",projectReportSignatureInfo.getPrintQuantity());
|
|
|
|
+ }else{
|
|
|
|
+ data.put("printCount","");
|
|
|
|
+ }
|
|
|
|
+ //报告编制日期
|
|
|
|
+ if(null != projectReportSignatureInfo && null != projectReportSignatureInfo.getReportPreparationDate()){
|
|
|
|
+ data.put("reportStaffingDate",dateStr(projectReportSignatureInfo.getReportPreparationDate()));
|
|
}else{
|
|
}else{
|
|
- //技术负责人
|
|
|
|
- data.put("technicistName","");
|
|
|
|
- data.put("technicistRemarks","");
|
|
|
|
- data.put("technicistYear","");
|
|
|
|
- data.put("technicistMonth","");
|
|
|
|
- data.put("technicistDay","");
|
|
|
|
- }
|
|
|
|
- //获取报告发起时间
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy年 MM月 dd日");
|
|
|
|
- Date ziDate=projectReportData.getCreateDate();
|
|
|
|
- String str = sdf.format(ziDate);
|
|
|
|
- data.put("ziDate",str);
|
|
|
|
- //报告状态
|
|
|
|
- String dataStatus=projectReportData.getStatus();
|
|
|
|
- if (dataStatus.equals("5")){
|
|
|
|
- String ss = sdf.format(projectReportData.getAuditPassDate());
|
|
|
|
- data.put("shenDate",ss);
|
|
|
|
|
|
+ data.put("reportStaffingDate","");
|
|
|
|
+ }
|
|
|
|
+ //开始审核日期
|
|
|
|
+ if(null != projectReportSignatureInfo && null != projectReportSignatureInfo.getStartAuditDate()){
|
|
|
|
+ data.put("auditBeginDate",dateStr(projectReportSignatureInfo.getStartAuditDate()));
|
|
}else{
|
|
}else{
|
|
- data.put("shenDate"," 年 月 日");
|
|
|
|
|
|
+ data.put("auditBeginDate","");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //咨询项目委托方全称
|
|
|
|
+ data.put("entrustingParty","咨询项目委托方全称");
|
|
|
|
+ data.put("querySite","ccpm.xgccpm.com");
|
|
|
|
+
|
|
|
|
+ String querySite = serverDomain+"/ruralProject/ruralProjectRecords/getDownloadProjectView?id="+projectReportData.getProject().getId();
|
|
|
|
+ //生成二维码图片和doc文档 缓存文件的共用名称
|
|
|
|
+ String commonFileName = UUID.randomUUID().toString();
|
|
|
|
+ String tempPath = this.getClass().getResource("/").getPath()+"/temp/";
|
|
|
|
+ File temP = new File(tempPath);
|
|
|
|
+ if(!temP.exists()){
|
|
|
|
+ temP.mkdirs();
|
|
}
|
|
}
|
|
|
|
+ String qrCodePath = tempPath + commonFileName + ".png";
|
|
|
|
+ TwoDimensionCode.encoderQRCode(querySite, qrCodePath, "png");//执行生成二维码
|
|
|
|
+ String imageStr = ImageUtil.getImageStr(qrCodePath);
|
|
|
|
+ data.put("qrcode",imageStr);
|
|
|
|
+
|
|
return data;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 将文件上传到阿里云中
|
|
|
|
+ * @param projectReportData
|
|
|
|
+ */
|
|
|
|
+ @Transactional(readOnly = false)
|
|
|
|
+ public String uploadOss(ProjectReportData projectReportData,File docFile){
|
|
|
|
+ //获取报告信息
|
|
|
|
+ projectReportData = projectReportDataService.get(projectReportData.getId());
|
|
|
|
+ //查询签章数据信息
|
|
|
|
+ ProjectReportSignatureInfo projectReportSignatureInfo = dao.get(projectReportData.getNumber());
|
|
|
|
+ if(null == projectReportSignatureInfo){
|
|
|
|
+ return "该项目未上传报告签章内容信息";
|
|
|
|
+ }
|
|
|
|
+ //获取项目信息
|
|
|
|
+ RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(projectReportData.getProject().getId());
|
|
|
|
+ ruralProjectRecordsService.queryUserNames(ruralProjectRecords);
|
|
|
|
+
|
|
|
|
+ //将file文件上传到阿里云并进行与项目变绑定预留以后的下载
|
|
|
|
+ //File转MultipartFile文件
|
|
|
|
+ SftpClientUtil sftpClientUtil = new SftpClientUtil();
|
|
|
|
+ MultipartFile mFile = sftpClientUtil.transformFile(docFile);
|
|
|
|
+ //文件上传oss
|
|
|
|
+ String uploadPath = null;
|
|
|
|
+ try {
|
|
|
|
+ uploadPath = ResponseUtil.uploadOss(mFile, "reportSignature");
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(uploadPath)){
|
|
|
|
+ //将备考表添加到附件中
|
|
|
|
+ Workattachment workattachment = new Workattachment();
|
|
|
|
+ workattachment.setAttachmentId(projectReportSignatureInfo.getId());
|
|
|
|
+ workattachment.setProjectId(ruralProjectRecords.getId());
|
|
|
|
+ workattachment.setUrl(uploadPath);
|
|
|
|
+ workattachment.setType("docx");
|
|
|
|
+ workattachment.setAttachmentFlag("199");
|
|
|
|
+ workattachment.setAttachmentName(ruralProjectRecords.getProjectName() + "报告签章.docx");
|
|
|
|
+ workattachment.setAttachmentUser(UserUtils.getUser().getId());
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ WorkClientAttachment workClientAttachment = new WorkClientAttachment();
|
|
|
|
+ workClientAttachment.setProjectId(ruralProjectRecords.getId());
|
|
|
|
+ workClientAttachment.setAttachmentId(projectReportSignatureInfo.getId());
|
|
|
|
+ workClientAttachment.setAttachmentName(ruralProjectRecords.getProjectName() + "报告签章.docx");
|
|
|
|
+ //删除原有数据信息
|
|
|
|
+ workattachmentService.deleteByAttachIdAndProject(workClientAttachment);
|
|
|
|
+ //新增新的数据信息
|
|
|
|
+ workattachmentService.insertOnWorkAttachment(workattachment);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ return "";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void getFile(RuralProjectRecords ruralProjectRecords){
|
|
|
|
+ if(StringUtils.isNotBlank(ruralProjectRecords.getId())){
|
|
|
|
+ //获取报告信息
|
|
|
|
+ ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(ruralProjectRecords.getId());
|
|
|
|
+ if(null != projectReportData && StringUtils.isNotBlank(projectReportData.getNumber())){
|
|
|
|
+ //查询签章数据信息
|
|
|
|
+ ProjectReportSignatureInfo projectReportSignatureInfo = dao.get(projectReportData.getNumber());
|
|
|
|
+ if(null != projectReportSignatureInfo){
|
|
|
|
+ //将备考表添加到附件中
|
|
|
|
+ Workattachment workattachment = new Workattachment();
|
|
|
|
+ workattachment.setAttachmentId(projectReportSignatureInfo.getId());
|
|
|
|
+ workattachment.setProjectId(ruralProjectRecords.getId());
|
|
|
|
+ List<Workattachment> list = workattachmentService.findList(workattachment);
|
|
|
|
+ workattachmentService.attachmentManageOnUrl(list);
|
|
|
|
+ if(null != list && list.size()>0){
|
|
|
|
+ ruralProjectRecords.setSignatureDownloadUrl(list.get(0).getTemporaryUrl());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* date转String
|
|
* date转String
|
|
@@ -1508,6 +1983,28 @@ public class RuralProjectMessageElectronicSealService extends CrudService<RuralP
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * 计算两日期相差天数
|
|
|
|
+ * @param begin_date
|
|
|
|
+ * @param end_date
|
|
|
|
+ * @return
|
|
|
|
+ * @throws Exception
|
|
|
|
+ */
|
|
|
|
+ public String getInterval(Date begin_date, Date end_date) throws Exception{
|
|
|
|
+ long day = 0;
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
+ if(begin_date != null){
|
|
|
|
+ String begin = sdf.format(begin_date);
|
|
|
|
+ begin_date = sdf.parse(begin);
|
|
|
|
+ }
|
|
|
|
+ if(end_date!= null){
|
|
|
|
+ String end= sdf.format(end_date);
|
|
|
|
+ end_date= sdf.parse(end);
|
|
|
|
+ }
|
|
|
|
+ day = (end_date.getTime()-begin_date.getTime())/(24*60*60*1000);
|
|
|
|
+ return String.valueOf(day);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
* B类项目批量导入
|
|
* B类项目批量导入
|
|
* @param list
|
|
* @param list
|
|
* @return
|
|
* @return
|