优化
This commit is contained in:
@ -180,8 +180,11 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
|
||||
bgtMessageCountVO.setTaskMessageCount(map.getOrDefault(BgtMessageType.TASK.getCode(), 0L).intValue());
|
||||
bgtMessageCountVO.setSettlementMessageCount(map.getOrDefault(BgtMessageType.SETTLEMENT.getCode(), 0L).intValue());
|
||||
bgtMessageCountVO.setOtherMessageCount(map.getOrDefault(BgtMessageType.OTHER.getCode(), 0L).intValue());
|
||||
List<BgtMessage> handleList = bgtMessages.stream().filter(bgtMessage -> OPERATION_NEED.equals(bgtMessage.getIsOperation())).collect(Collectors.toList());
|
||||
bgtMessageCountVO.setHandleMessageCount(handleList.size());
|
||||
|
||||
Integer handle = baseMapper.selectCount(Wrappers.<BgtMessage>lambdaQuery()
|
||||
.eq(BgtMessage::getRecipientId, SecurityUtils.getAppUserId())
|
||||
.eq(BgtMessage::getIsOperation, OPERATION_NEED));
|
||||
bgtMessageCountVO.setHandleMessageCount(handle);
|
||||
return bgtMessageCountVO;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ public interface IAnnexService extends IServicePlus<Annex> {
|
||||
/**
|
||||
* 根据务工者唯一标识+招工标识+附件类型 删除文件
|
||||
*/
|
||||
void deleteByUserIdAndRecruitIdAndType(Long userId,Long recruitId,String type);
|
||||
void deleteByUserIdAndRecruitIdAndType(List<Long> userIds,Long recruitId,String type);
|
||||
|
||||
/**
|
||||
* 检查入场材料
|
||||
|
@ -158,8 +158,8 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByUserIdAndRecruitIdAndType(Long userId, Long recruitId, String type) {
|
||||
baseMapper.delete(Wrappers.<Annex>lambdaQuery().eq(Annex::getUserId,userId)
|
||||
public void deleteByUserIdAndRecruitIdAndType(List<Long> userIds, Long recruitId, String type) {
|
||||
baseMapper.delete(Wrappers.<Annex>lambdaQuery().in(Annex::getUserId,userIds)
|
||||
.eq(Annex::getRecruitId,recruitId).eq(Annex::getAnnexType,type).eq(Annex::getUserType,WGZ));
|
||||
}
|
||||
|
||||
|
@ -208,6 +208,7 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
|
||||
List<BgtDayAttendanceCountVO> countVOS = attendanceService.countDayByTaskId(id, startTime, date);
|
||||
// 补充缺失的天数
|
||||
List<BgtDayAttendanceCountVO> bgtDayAttendanceCountVOS = DataUtil.fillMissingDates(countVOS, startTime, date);
|
||||
appTaskDetailVO.setCountVOS(bgtDayAttendanceCountVOS);
|
||||
//查询当天的总人数
|
||||
Integer totalNum = attendanceService.dayTotalNum(id, date);
|
||||
appTaskDetailVO.setTotalNum(totalNum);
|
||||
|
@ -42,6 +42,8 @@ import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.DecimalFormat;
|
||||
import java.time.*;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
@ -470,6 +472,12 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
if(CollectionUtil.isNotEmpty(countVOS)){
|
||||
bgtAttendanceVO.setReportToDutyNum(countVOS.get(0).getReportToDutyNum());
|
||||
}
|
||||
//今日到岗率
|
||||
if(bgtAttendanceVO.getReportToDutyNum()!=0){
|
||||
int rate = new BigDecimal(totalNum).divide(new BigDecimal(bgtAttendanceVO.getReportToDutyNum()), 2, RoundingMode.HALF_UP)
|
||||
.multiply(new BigDecimal(100)).intValue();
|
||||
bgtAttendanceVO.setReportToDutyRate(rate);
|
||||
}
|
||||
|
||||
//缺勤人数
|
||||
bgtAttendanceVO.setAbsenceDutyNum(totalNum-bgtAttendanceVO.getReportToDutyNum());
|
||||
@ -738,7 +746,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
} else if (clockInTime == null && clockOutTime == null) {
|
||||
recordVO.setDay(0D);
|
||||
} else {
|
||||
recordVO.setDay(0.5D);
|
||||
recordVO.setDay(1D);
|
||||
records.add(recordVO);
|
||||
}
|
||||
//统计迟到天数
|
||||
|
@ -364,7 +364,7 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
||||
public Boolean appUpdate(BgtDailyClockUpdateDTO dto) {
|
||||
|
||||
WgzDailyClock dailyClock = getById(dto.getId());
|
||||
if(dailyClock.getAuditorUserId() == null){
|
||||
if(dailyClock == null){
|
||||
throw new RuntimeException("日报数据不存在!");
|
||||
}
|
||||
BeanUtil.copyProperties(dto,dailyClock);
|
||||
@ -372,7 +372,7 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
||||
dailyClock.setAuditorTime(LocalDateTime.now());
|
||||
|
||||
//补卡需要发消息
|
||||
if("1".equals(dailyClock.getStatus())){
|
||||
if("1".equals(dailyClock.getStatus()) && AuditStatus.getAudit().contains(dto.getAuditorType())){
|
||||
|
||||
BgtProjectRecruit recruit = iBgtProjectRecruitService.getById(dailyClock.getRecruitId());
|
||||
HashMap<String, String> mp = new HashMap<>();
|
||||
|
@ -600,7 +600,7 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.getOneByUserIdAndRecruitId(userId, recruitId);
|
||||
vo.setEntryTime(recruitApply.getEntryTime());
|
||||
vo.setLeaveTime(recruitApply.getLeaveTime());
|
||||
vo.setWorkingState(recruitApply.getStatus());
|
||||
vo.setWorkingState(recruitApply.getStatus().equals("5")?"1":"2");
|
||||
|
||||
//出勤天数
|
||||
//总天数
|
||||
|
Reference in New Issue
Block a user