|
@@ -9,6 +9,8 @@ import com.yh.saas.plugin.yiliangyiyun.entity.ClockInfo;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.ClockInfoMapper;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.ClockInfoMapper;
|
|
import com.yh.saas.plugin.yiliangyiyun.service.IClockInfoService;
|
|
import com.yh.saas.plugin.yiliangyiyun.service.IClockInfoService;
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
@@ -24,7 +26,8 @@ import java.util.*;
|
|
*/
|
|
*/
|
|
@Service
|
|
@Service
|
|
public class ClockInfoServiceImpl extends ServiceImpl<ClockInfoMapper, ClockInfo> implements IClockInfoService {
|
|
public class ClockInfoServiceImpl extends ServiceImpl<ClockInfoMapper, ClockInfo> implements IClockInfoService {
|
|
-
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IClockInfoService clockInfoService;
|
|
/**
|
|
/**
|
|
* 添加打卡信息
|
|
* 添加打卡信息
|
|
*
|
|
*
|
|
@@ -126,6 +129,45 @@ public class ClockInfoServiceImpl extends ServiceImpl<ClockInfoMapper, ClockInfo
|
|
return page;
|
|
return page;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 考勤记录(PC)
|
|
|
|
+ * @param clockInfo
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public Page<ClockInfo> selectClockInfoPc(ClockInfo clockInfo) {
|
|
|
|
+ Map<String, Object> pageView = new HashMap<>();
|
|
|
|
+ pageView.put("startRecord", (clockInfo.getCurrentPage() - 1)
|
|
|
|
+ * clockInfo.getPageSize());
|
|
|
|
+ // 公司ID
|
|
|
|
+ pageView.put("compId", clockInfo.getCompId());
|
|
|
|
+ pageView.put("pageSize", clockInfo.getPageSize());
|
|
|
|
+ pageView.put("currentPage", clockInfo.getCurrentPage());
|
|
|
|
+ pageView.put("searchKeyWord", clockInfo.getSearchKeyWord());
|
|
|
|
+ pageView.put("startDate", clockInfo.getStartDate());
|
|
|
|
+ pageView.put("endDate", clockInfo.getEndDate());
|
|
|
|
+ // 查询总数
|
|
|
|
+ Integer dataCount = baseMapper.getCountByConditionPc(pageView);
|
|
|
|
+ List<ClockInfo> dataList = baseMapper.getListByConditionPc(pageView);
|
|
|
|
+ if (!CollectionUtils.isEmpty(dataList)) {
|
|
|
|
+ for (ClockInfo clockInfo1 : dataList) {
|
|
|
|
+ List<ClockInfo> clockInfoList = clockInfoService.selectList(new EntityWrapper<ClockInfo>()
|
|
|
|
+ .eq("comp_id",clockInfo1.getCompId())
|
|
|
|
+ .eq("common_id",clockInfo1.getCommonId())
|
|
|
|
+ .eq("delete_flag","0"));
|
|
|
|
+ if(CollectionUtils.isNotEmpty(clockInfoList)){
|
|
|
|
+ clockInfo1.setClockInfoList(clockInfoList);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ Page<ClockInfo> page = new Page<>();
|
|
|
|
+ page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
|
|
|
|
+ page.setTotal(dataCount == null ? 0 : dataCount);
|
|
|
|
+ page.setCurrent(clockInfo.getCurrentPage());
|
|
|
|
+ page.setSize(clockInfo.getPageSize());
|
|
|
|
+ return page;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 添加补卡信息
|
|
* 添加补卡信息
|
|
*
|
|
*
|