Commit c6dcad00 authored by 李博今's avatar 李博今

dto排序修改

parent 6d46cadf
...@@ -17,6 +17,7 @@ import org.rcisoft.business.bslschedule.entity.ScheduleResult; ...@@ -17,6 +17,7 @@ import org.rcisoft.business.bslschedule.entity.ScheduleResult;
import org.rcisoft.business.bslschedule.util.FindTime; import org.rcisoft.business.bslschedule.util.FindTime;
import org.rcisoft.business.bterm.dao.BTermRepository; import org.rcisoft.business.bterm.dao.BTermRepository;
import org.rcisoft.business.bterm.entity.BTerm; import org.rcisoft.business.bterm.entity.BTerm;
import org.rcisoft.business.bterm.utils.Week;
import org.rcisoft.core.exception.ServiceException; import org.rcisoft.core.exception.ServiceException;
import org.rcisoft.core.result.ResultServiceEnums; import org.rcisoft.core.result.ResultServiceEnums;
import org.rcisoft.core.util.ExcelUtil; import org.rcisoft.core.util.ExcelUtil;
...@@ -158,7 +159,11 @@ public class BSlScheduleServiceImpl implements BSlScheduleService { ...@@ -158,7 +159,11 @@ public class BSlScheduleServiceImpl implements BSlScheduleService {
public ScheduleResult queryMoreBSlSchedules(String week,String termCode1 , String subAgencyId) { public ScheduleResult queryMoreBSlSchedules(String week,String termCode1 , String subAgencyId) {
ScheduleResult scheduleResult = new ScheduleResult(); ScheduleResult scheduleResult = new ScheduleResult();
BTerm bTerm = bTermRepository.queryBtermByCode(termCode1).get(0); BTerm bTerm = bTermRepository.queryBtermByCode(termCode1).get(0);
scheduleResult.setWeekNum(bTerm.getWeek()); if(bTerm.getWeek() == null || bTerm.getWeek().equals("")){
scheduleResult.setWeekNum(String.valueOf(Week.buildList(bTerm.getStartDate(),bTerm.getEndDate()).size() + 1));
}else{
scheduleResult.setWeekNum(bTerm.getWeek());
}
Map<String,Date> map = FindTime.findTime(bTerm.getStartDate(),bTerm.getEndDate()); Map<String,Date> map = FindTime.findTime(bTerm.getStartDate(),bTerm.getEndDate());
Date min = new Date(); Date min = new Date();
//按周获取时间段 //按周获取时间段
......
...@@ -57,6 +57,7 @@ public class BTermServiceImpl implements BTermService { ...@@ -57,6 +57,7 @@ public class BTermServiceImpl implements BTermService {
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public PersistModel persist(BTerm model, String token){ public PersistModel persist(BTerm model, String token){
int line = 0; int line = 0;
model.setWeek(String.valueOf(Week.buildList(model.getStartDate(),model.getEndDate()).size() + 1));
if(model.getBusinessId()!=null) { if(model.getBusinessId()!=null) {
UserUtil.setCurrentMergeOperation(model); UserUtil.setCurrentMergeOperation(model);
line = bTermRepository.updateByPrimaryKeySelective(model); line = bTermRepository.updateByPrimaryKeySelective(model);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment