|
@@ -21,7 +21,6 @@ import com.jeeplus.modules.utils.SftpClientUtil;
|
|
|
import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
|
|
|
import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
|
|
|
import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
|
|
|
-import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -76,15 +75,27 @@ public class ProjectPlanService extends CrudService<ProjectPlanDao, ProjectPlanI
|
|
|
//项目计划信息
|
|
|
String start = null;
|
|
|
String end=null;
|
|
|
+ Iterator<ProjectPlanInfo> projectPlanInfoIterator = projectRecords.getProjectPlanList().iterator();
|
|
|
+ System.out.println("-----------开始------------------");
|
|
|
+ while(projectPlanInfoIterator.hasNext()){
|
|
|
+
|
|
|
+ //取得上传文件
|
|
|
+ ProjectPlanInfo projectPlanInfo = projectPlanInfoIterator.next();
|
|
|
+ if (projectPlanInfo.getId() == null){
|
|
|
+ projectPlanInfoIterator.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
for (int i=0;i<projectRecords.getProjectPlanList().size();i++){
|
|
|
if (projectRecords.getProjectPlanList().get(i).getId() == null){
|
|
|
continue;
|
|
|
}
|
|
|
- if (projectRecords.getProjectPlanList().size()==2){
|
|
|
+ if (projectRecords.getProjectPlanList().size()==1){
|
|
|
start=projectRecords.getProjectPlanList().get(i).getBeginDate();
|
|
|
end=projectRecords.getProjectPlanList().get(i).getEndDate();
|
|
|
}else{
|
|
|
- if (i==1){
|
|
|
+ if (i==0){
|
|
|
start=projectRecords.getProjectPlanList().get(i).getBeginDate();
|
|
|
}else if((i+1)==projectRecords.getProjectPlanList().size()){
|
|
|
end=projectRecords.getProjectPlanList().get(i).getEndDate();
|
|
@@ -132,19 +143,19 @@ public class ProjectPlanService extends CrudService<ProjectPlanDao, ProjectPlanI
|
|
|
}
|
|
|
}
|
|
|
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");//日期格式
|
|
|
- Date startDate=null;
|
|
|
- Date endDate=null;
|
|
|
- if (projectRecords.getStartDate()!=null){
|
|
|
+ Date startDate=projectRecords.getStartDate();
|
|
|
+ Date endDate=projectRecords.getEndingDate();
|
|
|
+ /*if (projectRecords.getStartDate()!=null){
|
|
|
startDate=new Date(projectRecords.getStartDate().toString());
|
|
|
}else if (projectRecords.getEndingDate()!=null){
|
|
|
endDate=new Date(projectRecords.getEndingDate().toString());
|
|
|
- }
|
|
|
+ }*/
|
|
|
RuralProjectRecords ruralProjectRecords=new RuralProjectRecords();
|
|
|
ruralProjectRecords.setId(projectRecords.getId());
|
|
|
ruralProjectRecords.setStartDate(format.parse(start));
|
|
|
ruralProjectRecords.setEndingDate(format.parse(end));
|
|
|
if (startDate!=null && endDate!=null){
|
|
|
- if (!start.equals(format.format(startDate).toString()) || !end.equals(format.format(endDate).toString())){
|
|
|
+ if (!start.equals(format.format(startDate)) || !end.equals(format.format(endDate))){
|
|
|
ruralProjectRecordsService.updateDate(ruralProjectRecords);
|
|
|
}
|
|
|
}else{
|