|
@ -194,30 +194,36 @@ public class AttendanceRulesServiceImpl implements AttendanceRulesService {
|
194
|
194
|
attendanceRuleDto.setPlanCycleType(workTaskSpecPlan.getPlanCycleType());
|
195
|
195
|
attendanceRuleDto.setPlanMemo(workTaskSpecPlan.getPlanMemo());
|
196
|
196
|
attendanceRuleDto.setWorkTaskSpecPlanId(workTaskSpecPlan.getWorkTaskSpecPlanId());
|
197
|
|
|
|
197
|
Map monthStartMap = new HashMap();
|
|
198
|
Map monthEndMap = new HashMap();
|
198
|
199
|
if(!workTaskSpecPlan.getPlanCycleType().equals(WorkTaskSpecPlan.PLAN_CYCLE_TYPE_NATURE_MONTH)){
|
199
|
200
|
String beginTime =DateUtil.formatDate(workTaskSpecPlan.getBeginTime(),DateUtil.NORM_YYYY_MM_PATTERN);
|
200
|
201
|
String endTime =DateUtil.formatDate(workTaskSpecPlan.getEndTime(),DateUtil.NORM_YYYY_MM_PATTERN);
|
201
|
202
|
String beginDay =DateUtil.formatDate(workTaskSpecPlan.getBeginTime(),DateUtil.NORM_DAY_PATTERN);
|
202
|
203
|
String endDay =DateUtil.formatDate(workTaskSpecPlan.getEndTime(),DateUtil.NORM_DAY_PATTERN);
|
203
|
|
Map monthStartMap = new HashMap();
|
204
|
|
Map monthEndMap = new HashMap();
|
205
|
204
|
if(beginTime.equals(DateUtil.getThisMonth())){
|
206
|
|
monthStartMap.put("type","0");//本月类型
|
|
205
|
monthStartMap.put("type",0);//本月类型
|
207
|
206
|
}else{
|
208
|
|
monthStartMap.put("type","-1");//上个月类型
|
|
207
|
monthStartMap.put("type",-1);//上个月类型
|
209
|
208
|
}
|
210
|
|
monthStartMap.put("day",beginDay);
|
|
209
|
monthStartMap.put("day",Integer.parseInt(beginDay));
|
211
|
210
|
if(endTime.equals(DateUtil.getNextMonth())){
|
212
|
|
monthEndMap.put("type","1");//下个月类型
|
|
211
|
monthEndMap.put("type",1);//下个月类型
|
213
|
212
|
}else{
|
214
|
|
monthEndMap.put("type","0");//本月类型
|
|
213
|
monthEndMap.put("type",0);//本月类型
|
215
|
214
|
}
|
216
|
|
monthEndMap.put("day",endDay);
|
217
|
|
attendanceRuleDto.setMonthStart(monthStartMap);
|
218
|
|
attendanceRuleDto.setMonthEnd(monthEndMap);
|
|
215
|
monthEndMap.put("day",Integer.parseInt(endDay));
|
|
216
|
}else{
|
|
217
|
//自然月返回本月第一天和本月最后一天
|
|
218
|
monthStartMap.put("type",0);
|
|
219
|
monthStartMap.put("day",1);
|
|
220
|
monthEndMap.put("type",0);
|
|
221
|
monthEndMap.put("day",DateUtil.getThisMonthLastDay(DateUtil.NORM_DAY_PATTERN));
|
|
222
|
|
219
|
223
|
}
|
220
|
224
|
|
|
225
|
attendanceRuleDto.setMonthStart(monthStartMap);
|
|
226
|
attendanceRuleDto.setMonthEnd(monthEndMap);
|
221
|
227
|
workTaskSpecPlan.setBeginTime(workTaskSpecPlan.getBeginTime());
|
222
|
228
|
workTaskSpecPlan.setEndTime(workTaskSpecPlan.getEndTime());
|
223
|
229
|
attendanceRuleDto.setName(attendanceTaskSpec.getName());
|