Compare commits

...

4 Commits
dev ... dev-ld

Author SHA1 Message Date
李栋 22dd9bf7f0 外出出差流程action-待验证 1 year ago
李栋 6f11b1d9ba 报错 1 year ago
李栋 b295881e65 外出出差action 1 year ago
李栋 43ddb23ff1 暂存 1 year ago

@ -943,7 +943,8 @@ public class KQFormatData extends BaseBean {
boolean isondutyfreecheck =false;
boolean isoffdutyfreecheck =false;
Map<String, String> model_ShiftRule = kqFormatShiftRule.getModel_ShiftRule(i, workTime.getSerialId());
// Map<String, String> model_ShiftRule = kqFormatShiftRule.getModel_ShiftRule(i, workTime.getSerialId());
Map<String, String> model_ShiftRule = new HashMap<>();
Iterator iter = model_ShiftRule.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry) iter.next();

@ -50,7 +50,7 @@ public class PunchOutButtonCmd extends AbstractCommonCommand<Map<String, Object>
public Map<String, Object> execute(CommandContext commandContext) {
Map<String, Object> retmap = new HashMap<String, Object>();
try{
bb.writeLog("PunchOutButtonCmd-start");
insertSign(retmap);
}catch (Exception e) {

@ -185,19 +185,19 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
}else {
forgotBeginWorkCheck_field = " isnull(b.forgotBeginWorkCheck,0) ";
}
String backFields = " (select zm.cccb from uf_cbxxjlb zm where zm.xm = a.id and zm.rq = b.kqdate) as mealAllowance," +
" (select zm.zdcb from uf_cbxxjlb zm where zm.xm = a.id and zm.rq = b.kqdate) as statAllowance," +
" (select zm.jmybcb from uf_cbxxjlb zm where zm.xm = a.id and zm.rq = b.kqdate) as nightAllowance," +
" (select zm.hrzdcb from uf_cbxxjlb zm where zm.xm = a.id and zm.rq = b.kqdate) as otherStatAllowance," +
" (select zm.ybbz from uf_cbxxjlb zm where zm.xm = a.id and zm.rq = b.kqdate) as nightShiftSubsidy," +
String backFields = " zm.cccb as mealAllowance," +
" zm.zdcb as statAllowance," +
" zm.jmybcb as nightAllowance," +
" zm.hrzdcb as otherStatAllowance," +
" zm.ybbz as nightShiftSubsidy, "+
" a.id,a.lastname,a.subcompanyid1 as subcompanyid,a.departmentid, a.workcode,b.jobtitle,a.dsporder," +
" b.kqdate, b.workdays,b.workMins,b.serialid, b.attendancedays,FLOOR( b.attendanceMins / 30 ) * 30 AS attendanceMins ,b.beLate," +
" b.beLateMins,b.graveBeLate,b.graveBeLateMins,b.leaveEearly,b.leaveEarlyMins,b.graveLeaveEarly," +
" b.graveLeaveEarlyMins,b.absenteeism,b.signdays,b.signmins, "+
" b.absenteeismMins ,(b.forgotCheck+"+forgotBeginWorkCheck_field+") forgotCheck,zeropoint ";
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 sqlFrom = " from hrmresource a, kq_format_total b,uf_cbxxjlb zm " +
"where a.id= b.resourceid and b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"' and zm.xm=a.id and zm.rq = b.kqdate ";
String sqlWhere = rightSql;
if(subCompanyId.length()>0){
sqlWhere +=" and a.subcompanyid1 in("+subCompanyId+") ";
}
@ -541,7 +541,7 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
fieldValue = Util.null2String(rs.getString(fieldName));
fieldValue = getFieldValueByUnitType(fieldValue,kqReportFieldComInfo.getUnittype(fieldid));
}
if(!fieldName.equals("leave")) {
fieldValue = Util.formatMultiLang(fieldValue, "" + user.getLanguage());
data.add(fieldValue);

@ -583,7 +583,8 @@ public class ExportExcelCmd extends AbstractCommonCommand<Map<String, Object>> {
String fileName = SystemEnv.getHtmlLabelName(390351, user.getLanguage())+" "+fromDate+" "+toDate;
workbook.put("fileName", fileName);
ExcelUtil ExcelUtil = new ExcelUtil();
Map<String, Object> exportMap = ExcelUtil.export(workbook, request, response,true);
// Map<String, Object> exportMap = ExcelUtil.export(workbook, request, response,true);
Map<String, Object> exportMap = new HashMap<>();
retmap.putAll(exportMap);
retmap.put("status", "1");
} catch (Exception e) {

@ -11,14 +11,18 @@ import weaver.interfaces.workflow.action.Action;
import weaver.soa.workflow.request.Property;
import weaver.soa.workflow.request.RequestInfo;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class OutSignSyncAction implements Action {
BaseBean bb = new BaseBean();
@Override
public String execute(RequestInfo requestInfo) {
bb.writeLog("OutSignSyncAction-start");
String startDate = "";
String endDate = "";
String resourceid = "";
@ -61,7 +65,7 @@ public class OutSignSyncAction implements Action {
"from mobile_sign a " +
"left join uf_outsigntype c " +
"on c.outsignid = a.id " +
"where operate_date > '" + startDate + "' and operate_date < '" + endDate + "' and operate in (?) ";
"where operate_date > '" + startDate + "' and operate_date < '" + endDate + "' and operater in (?) ";
rs.executeQuery(acqOutSignSql, resourceid);
while (rs.next()) {
String signinfo = Util.null2String(rs.getString("signinfo"));
@ -69,7 +73,7 @@ public class OutSignSyncAction implements Action {
}
for (String inf : infos) {
if (inf != null ) {
if (inf != null) {
Map<String, Object> in = mapStringToMap(inf);
String userId = Util.null2String(in.get("userId"));
String userType = Util.null2String(in.get("userType"));
@ -87,25 +91,25 @@ public class OutSignSyncAction implements Action {
String deviceInfo = Util.null2String(in.get("deviceInfo"));
String belongdateIsNull = Util.null2String(in.get("belongdateIsNull"));
String punchSql = "insert into HrmScheduleSign(userId,userType,signType,signDate,signTime,clientAddress,isInCom,timeZone,belongdate,signfrom,longitude,latitude,addr,deviceInfo,isdev) "+
String punchSql = "insert into HrmScheduleSign(userId,userType,signType,signDate,signTime,clientAddress,isInCom,timeZone,belongdate,signfrom,longitude,latitude,addr,deviceInfo,isdev) " +
" values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
boolean isok = rs.executeUpdate(punchSql,resourceid,userType,signType,signDate,signTime,clientAddress,isInCom,
timeZone,belongdate,signfrom,longitude,latitude,address,deviceInfo,"1");
boolean isok = rs.executeUpdate(punchSql, resourceid, userType, signType, signDate, signTime, clientAddress, isInCom,
timeZone, belongdate, signfrom, longitude, latitude, address, deviceInfo, "1");
bb.writeLog("isok: " + isok);
//同步更新考勤数据到考勤报表
if("true".equals(belongdateIsNull)){
if ("true".equals(belongdateIsNull)) {
//外勤签到没有归属日期,遇到跨天班次打卡可能归属前一天,需要格式化前一天考勤
bb.writeLog("PunchOutButtonCmd:userId:"+userId+":belongdate:"+ DateUtil.getYesterday());
new KQFormatBiz().formatDate(""+userId,DateUtil.getYesterday());
bb.writeLog("PunchOutButtonCmd:userId:" + userId + ":belongdate:" + DateUtil.getYesterday());
new KQFormatBiz().formatDate("" + userId, DateUtil.getYesterday());
}
bb.writeLog("PunchOutButtonCmd:userId:"+userId+":belongdate:"+(belongdate.length() == 0 ? DateUtil.getCurrentDate() : belongdate));
if(belongdate.length()==0){
bb.writeLog("PunchOutButtonCmd:userId:" + userId + ":belongdate:" + (belongdate.length() == 0 ? DateUtil.getCurrentDate() : belongdate));
if (belongdate.length() == 0) {
//外勤签到没有归属日期,遇到跨天班次打卡可能归属前一天,需要格式化前一天考勤
new KQFormatBiz().formatDate(""+userId,DateUtil.getYesterday());
new KQFormatBiz().formatDate("" + userId, DateUtil.getYesterday());
}
new KQFormatBiz().formatDate(""+userId,(belongdate.length() == 0 ? DateUtil.getCurrentDate() : belongdate));
new KQFormatBiz().formatDate("" + userId, (belongdate.length() == 0 ? DateUtil.getCurrentDate() : belongdate));
//外勤签到转的考勤 处理加班规则
SplitActionUtil.pushOverTimeTasksAll(belongdate,belongdate,""+userId);
SplitActionUtil.pushOverTimeTasksAll(belongdate, belongdate, "" + userId);
}
}
@ -118,10 +122,10 @@ public class OutSignSyncAction implements Action {
return Action.SUCCESS;
}
public static Map<String,Object> mapStringToMap(String str){
str = str.substring(1, str.length()-1);
public static Map<String, Object> mapStringToMap(String str) {
str = str.substring(1, str.length() - 1);
String[] strs = str.split(",");
Map<String,Object> map = new HashMap<>();
Map<String, Object> map = new HashMap<>();
for (String string : strs) {
String key = string.split("=")[0];
String value = string.split("=")[1];

@ -1,10 +1,7 @@
package weaver.interfaces.hostar.job;
import com.engine.hostar.util.HostarUtil;
import com.engine.kq.biz.KQGroupMemberComInfo;
import com.engine.kq.biz.KQHolidaySetBiz;
import com.engine.kq.biz.KQOvertimeRulesBiz;
import jdk.management.resource.ResourceId;
import org.apache.commons.lang3.StringUtils;
import org.apache.tools.ant.util.DateUtils;
import weaver.conn.RecordSet;

Loading…
Cancel
Save