You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.3 KiB
Java
56 lines
2.3 KiB
Java
package com.engine.jucailinkq.attendance.workflow.action;
|
|
|
|
import com.engine.jucailinkq.common.util.CommonUtil;
|
|
import com.engine.jucailinkq.common.util.DateUtil;
|
|
import com.engine.jucailinkq.common.util.Utils;
|
|
import com.google.common.collect.Lists;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import weaver.conn.RecordSet;
|
|
import weaver.interfaces.workflow.action.Action;
|
|
import weaver.soa.workflow.request.RequestInfo;
|
|
|
|
import java.util.*;
|
|
|
|
/**
|
|
* 补打卡流程归档action
|
|
*/
|
|
@Slf4j
|
|
public class MakeUpClockArchivingAction implements Action {
|
|
|
|
@Override
|
|
public String execute(RequestInfo requestInfo) {
|
|
log.debug("**********MakeUpClockArchivingAction import data start**********");
|
|
// 流程表单主表数据
|
|
HashMap<String,String> mainTableData = CommonUtil.getMainTableInfo(requestInfo);
|
|
// 流程表单明细表数据
|
|
List<Map<String, String>> detailTableData = CommonUtil.getDetailTableInfo(requestInfo,0);
|
|
log.info("detailTableData : [{}]", detailTableData);
|
|
//补打卡人员
|
|
String userId = mainTableData.get("bdkry");
|
|
|
|
List<List> lists = Lists.newArrayList();
|
|
//记录需要更改出勤结果数据状态的人员、日期信息
|
|
List<Map<String, String>> empDateList = new ArrayList<>();
|
|
Map<String, String> empDateItem;
|
|
for (Map<String, String> detailTable:detailTableData){
|
|
//收集需要更改出勤结果数据状态的人员、日期信息
|
|
empDateItem = new HashMap<>();
|
|
empDateItem.put("empId", detailTable.get("bdkr"));
|
|
empDateItem.put("cqDate", detailTable.get("bdkrq"));
|
|
empDateList.add(empDateItem);
|
|
}
|
|
|
|
//更新出勤结果中的数据状态
|
|
String sjztUpdateResult = CommonUtil.updateAttendanceResultInfoStatus(empDateList, "0");
|
|
if (!"".equals(sjztUpdateResult)) {
|
|
log.error("更新出勤结果中的数据状态失败:" + sjztUpdateResult);
|
|
requestInfo.getRequestManager().setMessageid("11111" + requestInfo.getRequestid() + "22222");
|
|
requestInfo.getRequestManager().setMessagecontent("更新出勤结果中的数据状态失败:" + sjztUpdateResult);
|
|
return Action.FAILURE_AND_CONTINUE;
|
|
}
|
|
log.debug("**********MakeUpClockArchivingAction import data end**********");
|
|
|
|
return Action.SUCCESS;
|
|
}
|
|
}
|