Browse Source

修复:指定值班bug+交接班bug

zhongwei
ty 9 months ago
parent
commit
a37ef37e35
  1. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

@ -271,7 +271,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
}); });
//获取接班人班组组长 //获取接班人班组组长
Long managerId; Long managerId;
if (Func.isNotEmpty(dutyMain.getDutyGroupId())) { if (Func.isNotEmpty(carryDutyMain.getDutyGroupId())) {
ImsDutyGroupEntity groupEntity = imsDutyGroupService.getById(carryDutyMain.getDutyGroupId()); ImsDutyGroupEntity groupEntity = imsDutyGroupService.getById(carryDutyMain.getDutyGroupId());
ImsDutyGroupPEntity groupPEntity = imsDutyGroupPService.getOne(new LambdaQueryWrapper<ImsDutyGroupPEntity>() {{ ImsDutyGroupPEntity groupPEntity = imsDutyGroupPService.getOne(new LambdaQueryWrapper<ImsDutyGroupPEntity>() {{
eq(ImsDutyGroupPEntity::getGroupId, groupEntity.getId()); eq(ImsDutyGroupPEntity::getGroupId, groupEntity.getId());
@ -854,8 +854,8 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
ImsDutyMainEntity entity = new ImsDutyMainEntity(); ImsDutyMainEntity entity = new ImsDutyMainEntity();
entity.setId(id); entity.setId(id);
entity.setDutyDate(DateUtil.parse(date, DateUtil.PATTERN_DATE)); entity.setDutyDate(DateUtil.parse(date, DateUtil.PATTERN_DATE));
String format1 = DateUtil.format(new Date(), DateUtil.PATTERN_DATE); // String format1 = DateUtil.format(new Date(), DateUtil.PATTERN_DATE);
Date parse = DateUtil.parse(format1, DateUtil.PATTERN_DATE); // Date parse = DateUtil.parse(format1, DateUtil.PATTERN_DATE);
ImsDutyMainEntity mainEntityById = imsDutyMainService.getById(id); ImsDutyMainEntity mainEntityById = imsDutyMainService.getById(id);
ImsDutyClassEntity classEntity = imsDutyClassService.getOne(new LambdaQueryWrapper<ImsDutyClassEntity>() {{ ImsDutyClassEntity classEntity = imsDutyClassService.getOne(new LambdaQueryWrapper<ImsDutyClassEntity>() {{
eq(ImsDutyClassEntity::getId, mainEntityById.getClassId()); eq(ImsDutyClassEntity::getId, mainEntityById.getClassId());
@ -863,7 +863,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
}}); }});
String dutyTime = DateUtil.format(mainEntityById.getDutyDate(), DateUtil.PATTERN_DATE) + " " +DateUtil.format(classEntity.getStartTime(), DateUtil.PATTERN_TIME); String dutyTime = DateUtil.format(mainEntityById.getDutyDate(), DateUtil.PATTERN_DATE) + " " +DateUtil.format(classEntity.getStartTime(), DateUtil.PATTERN_TIME);
Date dutyDate = DateUtil.parse(dutyTime, PATTERN_DATETIME); Date dutyDate = DateUtil.parse(dutyTime, PATTERN_DATETIME);
if (dutyDate.getTime() > parse.getTime()) { if (dutyDate.getTime() > new Date().getTime()) {
return R.fail("指定的值班开始时间不能晚于当前时间"); return R.fail("指定的值班开始时间不能晚于当前时间");
} }

Loading…
Cancel
Save