Commit fe2a47c3 by huluobin

update

parent 9a52ca8c
......@@ -60,13 +60,13 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
@Override
public void applyTakeLeave(ApplyTakeLeaveCommand cmd) {
if (cmd.getStartTime().compareTo(cmd.getEndTime()) <= 0) {
throw new RRException("申请时间有误");
if (cmd.getStartTime().compareTo(cmd.getEndTime()) >= 0) {
throw new RRException("申请时间有误" );
}
List<TakeLeaveEvent> appliedList = takeLeaveEventRepository.appliedList(cmd.getApplyTechnicianId(), cmd.getStartTime().getTime(), cmd.getEndTime().getTime());
if (ListUtil.isNotEmpty(appliedList)) {
throw new RRException("重复时间提交");
throw new RRException("重复时间提交" );
}
TakeLeaveEvent takeLeaveEvent = applyTakeLeaveCommandAssembler.apply(cmd);
......@@ -96,7 +96,7 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
log.info("申请时间:{}", takeLeaveEvent.getTimeLength());
log.info("选择的时间{},", overTimeRecordLogList.stream().map(OverTimeRecordLog::getLengthTime).reduce(BigDecimal.ZERO, BigDecimal::add));
throw new RRException(500, "调休时间有误");
throw new RRException(500, "调休时间有误" );
}
overTimeRecordLogList.forEach(overTimeRecordLog -> {
......@@ -106,7 +106,7 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
overtimeRecord.setLeftTimeLength(overtimeRecord.getLeftTimeLength().subtract(overTimeRecordLog.getLengthTime()));
//检查调休时间和加班时间匹配
if (overtimeRecord.getLeftTimeLength().compareTo(BigDecimal.ZERO) < 0) {
throw new RRException(500, "超出加班时间");
throw new RRException(500, "超出加班时间" );
}
if (overtimeRecord.getLeftTimeLength().compareTo(BigDecimal.ZERO) == 0) {
//不能调休
......@@ -123,12 +123,12 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
takeLeaveEvent.setApplyStoreTechnician(storeTechnicianRepository.selectById(cmd.getApplyTechnicianId()));
Message message = Message.builder()
.content("请假审核通知")
.content("请假审核通知" )
.isRead(0)
.paramJson(JsonUtilByFsJson.beanToJson(takeLeaveEvent))
.technicianId(takeLeaveEvent.getDealingTechnicianId())
.time(new Date())
.title("请假审核")
.title("请假审核" )
.type(1)
.tab(2)
.build();
......@@ -142,7 +142,7 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
TakeLeaveEvent takeLeaveEvent = takeLeaveEventRepository.selectById(cmd.getTakeLeaveEventId());
if (!takeLeaveEvent.getStatus().equals(TakeLeaveEvent.STATUS_UN_APPROVAL)) {
throw new RRException(500, "审批状态异常");
throw new RRException(500, "审批状态异常" );
}
//加班申请通过 添加加班记录
......@@ -190,17 +190,17 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
takeLeaveEvent.setApplyStoreTechnician(storeTechnician);
Message message = Message.builder()
.content("请假申请通过了")
.content("请假申请通过了" )
.isRead(0)
.paramJson(JsonUtilByFsJson.beanToJson(takeLeaveEvent))
.technicianId(takeLeaveEvent.getApplyTechnicianId())
.time(new Date())
.title("请假申请")
.title("请假申请" )
.type(3)
.tab(2)
.build();
if (cmd.getApproval().equals(TakeLeaveEvent.STATUS_APPROVAL_REFUSE)) {
message.setContent("请假申请被拒绝了");
message.setContent("请假申请被拒绝了" );
}
messageMapper.insert(message);
}
......
# 微信小程序相关配置
# 微信小程序相关配置
wechat:
#公众号
mp-app-id: wx7d344dc5ffd20745
......
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