新美光考勤关账功能 第一次验证通过

新美光HR项目
Chengliang 2 weeks ago
parent 52473e77f4
commit 28051ff61f

@ -208,7 +208,7 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
}
String sqlFrom = " from hrmresource a, kq_format_total b where a.id= b.resourceid and b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"'";
String sqlWhere = rightSql;
String groupBy = " group by a.id,a.lastname,a.workcode,a.dsporder,b.resourceid,a.subcompanyid1,a.departmentid,a.jobtitle ";
String groupBy = " group by a.id,a.lastname,a.workcode,a.dsporder,b.resourceid,a.subcompanyid1,a.departmentid,a.jobtitle,b.groupid ";
List<List> paramLists = new ArrayList<>();
List<Object> paramList = null;
if(subCompanyId.length()>0){
@ -409,9 +409,10 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
}else if("kqGroup".equals(fieldName)){
//QC3685035 考勤月度报表增加所属所属考勤组
KQGroupComInfo kqGroupComInfo = new KQGroupComInfo();
// KQGroupMemberComInfo kqGroupMemberComInfo = new KQGroupMemberComInfo();
// String groupId = kqGroupMemberComInfo.getKQGroupId(id, toDate);
fieldValue = kqGroupComInfo.getGroupname(Util.null2String(rs.getString("groupid")));
KQGroupMemberComInfo kqGroupMemberComInfo = new KQGroupMemberComInfo();
String groupId = kqGroupMemberComInfo.getKQGroupId(id, toDate);
fieldValue = kqGroupComInfo.getGroupname(groupId);
// fieldValue = kqGroupComInfo.getGroupname(Util.null2String(rs.getString("groupid")));
}else if("absenteeismDays".equals(fieldName)){
//QC3685035 考勤月度报表增加缺勤天数
List<KqFormatTotal> kqFormatTotalList = KqCalulateUtil.abnormalAttendance(id, fromDate, toDate);

@ -36,17 +36,25 @@ public class KqCloseAccountServiceImpl extends Service implements KqCloseAccount
public List<PAResponseEntity> closeAccount(Map<String, Object> param) {
String billid = Util.null2String(param.get("billid"));
String subCompanyIds = Util.null2String(param.get("gzfb"));
String departmentIds = Util.null2String(param.get("gzbm"));
String startDate = Util.null2String(param.get("ksrq"));
String endDate = Util.null2String(param.get("jsrq"));
RecordSet rs = new RecordSet();
String subCompanyIds = "";
String departmentIds = "";
String startDate = "";
String endDate = "";
//0 发起 1 归档
String type = Util.null2String(param.get("type"));
rs.executeQuery("select gzfb,gzbm,ksrq,jsrq from uf_kqgzjl where id = ?",billid);
if (rs.next()) {
subCompanyIds = Util.null2String(rs.getString("gzfb"));
departmentIds = Util.null2String(rs.getString("gzbm"));
startDate = Util.null2String(rs.getString("ksrq"));
endDate = Util.null2String(rs.getString("jsrq"));
}
String currentTime = TimeUtil.getCurrentTimeString();
String lastname = user.getLastname();
List<PAResponseEntity> paResponseEntities = new ArrayList<>();
RecordSet rs = new RecordSet();
List<KqCloseSet> workflowList = getWorkflowList();
List<Integer> workflowIds = workflowList.stream()
.map(KqCloseSet::getWorkflowId)
@ -136,13 +144,13 @@ public class KqCloseAccountServiceImpl extends Service implements KqCloseAccount
if(!subCompanyIds.isEmpty()) {
//like
sql += " and gzfb is not null and gzfb in ("+subCompanyIds+")";
sql += " and gzfb is not null and (','||gzfb||',' like '%,"+subCompanyIds+",%')";
rs.executeQuery(sql,endDate,startDate);
result = rs.getCounts()>0;
}
if (!departmentIds.isEmpty() && !result) {
sql1 += " and gzbm is not null and gzbm in ("+departmentIds+")";
sql1 += " and gzbm is not null and (','||gzbm||',' like '%,"+departmentIds+",%')";
rs.executeQuery(sql1,endDate,startDate);
result = rs.getCounts()>0;
}

Loading…
Cancel
Save