美之高考勤假期规则 假期规则批处理增加人员安全级别

美之高考勤假期
Chengliang 8 months ago
parent 7ea9cec0df
commit 090070d828

@ -0,0 +1,46 @@
package com.engine.kq.bean;
/**
* ----
*/
public class KQChildrenBean {
private String id;
private String birthday;
private String title;
private String resourceid;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getResourceid() {
return resourceid;
}
public void setResourceid(String resourceid) {
this.resourceid = resourceid;
}
}

File diff suppressed because it is too large Load Diff

@ -111,6 +111,10 @@ public class AddLeaveRulesCmd extends AbstractCommonCommand<Map<String, Object>>
/*应用范围为人员时选择的人员ID*/ /*应用范围为人员时选择的人员ID*/
String scopeValueMember = Util.null2String(params.get("scopeValueMember")); String scopeValueMember = Util.null2String(params.get("scopeValueMember"));
/*todo 美之高二开 安全级别最小和最大值*/
String minLevel = Util.null2String(params.get("secLevel"));
String maxLevel = Util.null2String(params.get("secLevelto"));
if(scopeType == 2) { if(scopeType == 2) {
scopeValue = scopeValueDepartment; scopeValue = scopeValueDepartment;
} else if(scopeType == 3) { } else if(scopeType == 3) {
@ -271,63 +275,64 @@ public class AddLeaveRulesCmd extends AbstractCommonCommand<Map<String, Object>>
} }
} }
String searchSql = "select * from kq_LeaveRulesDetail where (isDelete is null or isDelete<>1) and ruleId=?"; //todo 美之高去除标准校验 同一应用维度下不可重复创建规则
RecordSet recordSet = new RecordSet(); // String searchSql = "select * from kq_LeaveRulesDetail where (isDelete is null or isDelete<>1) and ruleId=?";
recordSet.executeQuery(searchSql, ruleId); RecordSet recordSet = new RecordSet();
while (recordSet.next()) { // recordSet.executeQuery(searchSql, ruleId);
int scopeTypeTemp = Util.getIntValue(recordSet.getString("scopeType"), 0); // while (recordSet.next()) {
String scopeValueTemp = recordSet.getString("scopeValue"); // int scopeTypeTemp = Util.getIntValue(recordSet.getString("scopeType"), 0);
// String scopeValueTemp = recordSet.getString("scopeValue");
if (scopeType == 0 && scopeTypeTemp == 0) { //
resultMap.put("status", "-1"); // if (scopeType == 0 && scopeTypeTemp == 0) {
resultMap.put("message", SystemEnv.getHtmlLabelName(505667, user.getLanguage()));//该假期类型下已经新建过总部的假期规则,请勿重复新建 // resultMap.put("status", "-1");
return resultMap; // resultMap.put("message", SystemEnv.getHtmlLabelName(505667, user.getLanguage()));//该假期类型下已经新建过总部的假期规则,请勿重复新建
} // return resultMap;
if (scopeType == 1 && scopeTypeTemp == 1) { // }
List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ","); // if (scopeType == 1 && scopeTypeTemp == 1) {
List<String> scopeValueList = Util.TokenizerString(scopeValue, ","); // List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ",");
for (String temp : scopeValueList) // List<String> scopeValueList = Util.TokenizerString(scopeValue, ",");
if (scopeValueTempList.contains(temp)) { // for (String temp : scopeValueList)
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo(); // if (scopeValueTempList.contains(temp)) {
String subcomName = subCompanyComInfo.getSubCompanyname(temp); // SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
// String subcomName = subCompanyComInfo.getSubCompanyname(temp);
resultMap.put("status", "-1"); //
resultMap.put("message", SystemEnv.getHtmlLabelName(505668, user.getLanguage()).replace("$", subcomName));//该假期类型下已经新建过分部的假期规则,请勿重复新建 // resultMap.put("status", "-1");
return resultMap; // resultMap.put("message", SystemEnv.getHtmlLabelName(505668, user.getLanguage()).replace("$", subcomName));//该假期类型下已经新建过分部的假期规则,请勿重复新建
} // return resultMap;
} // }
if (scopeType == 2 && scopeTypeTemp == 2) { // }
List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ","); // if (scopeType == 2 && scopeTypeTemp == 2) {
List<String> scopeValueList = Util.TokenizerString(scopeValue, ","); // List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ",");
for (String temp : scopeValueList) // List<String> scopeValueList = Util.TokenizerString(scopeValue, ",");
if (scopeValueTempList.contains(temp)) { // for (String temp : scopeValueList)
DepartmentComInfo comInfo = new DepartmentComInfo(); // if (scopeValueTempList.contains(temp)) {
String name = comInfo.getDepartmentname(temp); // DepartmentComInfo comInfo = new DepartmentComInfo();
// String name = comInfo.getDepartmentname(temp);
resultMap.put("status", "-1"); //
resultMap.put("message", SystemEnv.getHtmlLabelName(534890, user.getLanguage()).replace("$", name));//该假期类型下已经新建过部门的假期规则,请勿重复新建 // resultMap.put("status", "-1");
return resultMap; // resultMap.put("message", SystemEnv.getHtmlLabelName(534890, user.getLanguage()).replace("$", name));//该假期类型下已经新建过部门的假期规则,请勿重复新建
} // return resultMap;
} // }
if (scopeType == 3 && scopeTypeTemp == 3) { // }
List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ","); // if (scopeType == 3 && scopeTypeTemp == 3) {
List<String> scopeValueList = Util.TokenizerString(scopeValue, ","); // List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ",");
for (String temp : scopeValueList) // List<String> scopeValueList = Util.TokenizerString(scopeValue, ",");
if (scopeValueTempList.contains(temp)) { // for (String temp : scopeValueList)
ResourceComInfo comInfo = new ResourceComInfo(); // if (scopeValueTempList.contains(temp)) {
String name = comInfo.getLastname(temp); // ResourceComInfo comInfo = new ResourceComInfo();
// String name = comInfo.getLastname(temp);
resultMap.put("status", "-1"); //
resultMap.put("message", SystemEnv.getHtmlLabelName(534891, user.getLanguage()).replace("$", name));//该假期类型下已经新建过人员的假期规则,请勿重复新建 // resultMap.put("status", "-1");
return resultMap; // resultMap.put("message", SystemEnv.getHtmlLabelName(534891, user.getLanguage()).replace("$", name));//该假期类型下已经新建过人员的假期规则,请勿重复新建
} // return resultMap;
} // }
} // }
// }
boolean flag = false;//数据是否插入成功 boolean flag = false;//数据是否插入成功
String sql = "insert into kq_LeaveRulesDetail(ruleId,ruleName,scopeType,scopeValue," + String sql = "insert into kq_LeaveRulesDetail(ruleId,ruleName,scopeType,scopeValue," +
"distributionMode,annualAmount,legalKey,welfareKey,priority,validityRule,effectiveDays,effectiveMonths,expirationMonth,expirationDay,extensionEnable,extendedDays,releaseRule,calcMethod,convertMode,excludeSubAccount,beforeFormal,severalChildren,yearsOld,isprovince,carryOver,carryOverDays,deductorder,isDelete) values(?,?,?,?, ?,?,?,?, ?,?,?,?, ?,?,?,?, ?,?,?,?, ?,?,?,?,?,?,?,0)"; "distributionMode,annualAmount,legalKey,welfareKey,priority,validityRule,effectiveDays,effectiveMonths,expirationMonth,expirationDay,extensionEnable,extendedDays,releaseRule,calcMethod,convertMode,excludeSubAccount,beforeFormal,severalChildren,yearsOld,isprovince,carryOver,carryOverDays,deductorder,isDelete,minLevel,maxLevel) values(?,?,?,?, ?,?,?,?, ?,?,?,?, ?,?,?,?, ?,?,?,?, ?,?,?,?,?,?,?,0,?,?)";
flag = recordSet.executeUpdate(sql, ruleId, ruleName, scopeType, scopeValue, flag = recordSet.executeUpdate(sql, ruleId, ruleName, scopeType, scopeValue,
distributionMode, annualAmount, legalKey, welfareKey, priority, validityRule, effectiveDays, effectiveMonths, expirationMonth, expirationDay, extensionEnable, extendedDays, releaseRule, calcMethod, convertMode, excludeSubAccount, beforeFormal,severalChildren,yearsOld,isprovince,carryOver,carryOverDays,deductorder); distributionMode, annualAmount, legalKey, welfareKey, priority, validityRule, effectiveDays, effectiveMonths, expirationMonth, expirationDay, extensionEnable, extendedDays, releaseRule, calcMethod, convertMode, excludeSubAccount, beforeFormal,severalChildren,yearsOld,isprovince,carryOver,carryOverDays,deductorder,minLevel,maxLevel);
if (!flag) { if (!flag) {
resultMap.put("sign", "-1"); resultMap.put("sign", "-1");
resultMap.put("message", SystemEnv.getHtmlLabelName(84544, user.getLanguage()));//保存失败 resultMap.put("message", SystemEnv.getHtmlLabelName(84544, user.getLanguage()));//保存失败

@ -112,6 +112,10 @@ public class EditLeaveRulesCmd extends AbstractCommonCommand<Map<String, Object>
/*应用范围为人员时选择的人员ID*/ /*应用范围为人员时选择的人员ID*/
String scopeValueMember = Util.null2String(params.get("scopeValueMember")); String scopeValueMember = Util.null2String(params.get("scopeValueMember"));
/*todo 美之高二开 安全级别最小和最大值*/
String minLevel = Util.null2String(params.get("secLevel"));
String maxLevel = Util.null2String(params.get("secLevelto"));
if(scopeType == 2) { if(scopeType == 2) {
scopeValue = scopeValueDepartment; scopeValue = scopeValueDepartment;
} else if(scopeType == 3) { } else if(scopeType == 3) {
@ -271,63 +275,64 @@ public class EditLeaveRulesCmd extends AbstractCommonCommand<Map<String, Object>
} }
} }
String searchSql = "select * from kq_LeaveRulesDetail where (isDelete is null or isDelete<>1) and ruleId=? and id<>?"; //todo 美之高去除标准校验 同一应用维度下不可重复创建规则
//String searchSql = "select * from kq_LeaveRulesDetail where (isDelete is null or isDelete<>1) and ruleId=? and id<>?";
RecordSet recordSet = new RecordSet(); RecordSet recordSet = new RecordSet();
recordSet.executeQuery(searchSql, ruleId, ruleDetailId); // recordSet.executeQuery(searchSql, ruleId, ruleDetailId);
while (recordSet.next()) { // while (recordSet.next()) {
int scopeTypeTemp = Util.getIntValue(recordSet.getString("scopeType"), 0); // int scopeTypeTemp = Util.getIntValue(recordSet.getString("scopeType"), 0);
String scopeValueTemp = recordSet.getString("scopeValue"); // String scopeValueTemp = recordSet.getString("scopeValue");
//
if (scopeType == 0 && scopeTypeTemp == 0) { // if (scopeType == 0 && scopeTypeTemp == 0) {
resultMap.put("status", "-1"); // resultMap.put("status", "-1");
resultMap.put("message", SystemEnv.getHtmlLabelName(505667, user.getLanguage()));//该假期类型下已经新建过总部的假期规则,请勿重复新建 // resultMap.put("message", SystemEnv.getHtmlLabelName(505667, user.getLanguage()));//该假期类型下已经新建过总部的假期规则,请勿重复新建
return resultMap; // return resultMap;
} // }
if (scopeType == 1 && scopeTypeTemp == 1) { // if (scopeType == 1 && scopeTypeTemp == 1) {
List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ","); // List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ",");
List<String> scopeValueList = Util.TokenizerString(scopeValue, ","); // List<String> scopeValueList = Util.TokenizerString(scopeValue, ",");
for (String temp : scopeValueList) // for (String temp : scopeValueList)
if (scopeValueTempList.contains(temp)) { // if (scopeValueTempList.contains(temp)) {
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo(); // SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
String subcomName = subCompanyComInfo.getSubCompanyname(temp); // String subcomName = subCompanyComInfo.getSubCompanyname(temp);
//
resultMap.put("status", "-1"); // resultMap.put("status", "-1");
resultMap.put("message", SystemEnv.getHtmlLabelName(505668, user.getLanguage()).replace("$", subcomName));//该假期类型下已经新建过分部的假期规则,请勿重复新建 // resultMap.put("message", SystemEnv.getHtmlLabelName(505668, user.getLanguage()).replace("$", subcomName));//该假期类型下已经新建过分部的假期规则,请勿重复新建
return resultMap; // return resultMap;
} // }
} // }
if (scopeType == 2 && scopeTypeTemp == 2) { // if (scopeType == 2 && scopeTypeTemp == 2) {
List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ","); // List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ",");
List<String> scopeValueList = Util.TokenizerString(scopeValue, ","); // List<String> scopeValueList = Util.TokenizerString(scopeValue, ",");
for (String temp : scopeValueList) // for (String temp : scopeValueList)
if (scopeValueTempList.contains(temp)) { // if (scopeValueTempList.contains(temp)) {
DepartmentComInfo comInfo = new DepartmentComInfo(); // DepartmentComInfo comInfo = new DepartmentComInfo();
String name = comInfo.getDepartmentname(temp); // String name = comInfo.getDepartmentname(temp);
//
resultMap.put("status", "-1"); // resultMap.put("status", "-1");
resultMap.put("message", SystemEnv.getHtmlLabelName(534890, user.getLanguage()).replace("$", name));//该假期类型下已经新建过部门的假期规则,请勿重复新建 // resultMap.put("message", SystemEnv.getHtmlLabelName(534890, user.getLanguage()).replace("$", name));//该假期类型下已经新建过部门的假期规则,请勿重复新建
return resultMap; // return resultMap;
} // }
} // }
if (scopeType == 3 && scopeTypeTemp == 3) { // if (scopeType == 3 && scopeTypeTemp == 3) {
List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ","); // List<String> scopeValueTempList = Util.TokenizerString(scopeValueTemp, ",");
List<String> scopeValueList = Util.TokenizerString(scopeValue, ","); // List<String> scopeValueList = Util.TokenizerString(scopeValue, ",");
for (String temp : scopeValueList) // for (String temp : scopeValueList)
if (scopeValueTempList.contains(temp)) { // if (scopeValueTempList.contains(temp)) {
ResourceComInfo comInfo = new ResourceComInfo(); // ResourceComInfo comInfo = new ResourceComInfo();
String name = comInfo.getLastname(temp); // String name = comInfo.getLastname(temp);
//
resultMap.put("status", "-1"); // resultMap.put("status", "-1");
resultMap.put("message", SystemEnv.getHtmlLabelName(534891, user.getLanguage()).replace("$", name));//该假期类型下已经新建过人员的假期规则,请勿重复新建 // resultMap.put("message", SystemEnv.getHtmlLabelName(534891, user.getLanguage()).replace("$", name));//该假期类型下已经新建过人员的假期规则,请勿重复新建
return resultMap; // return resultMap;
} // }
} // }
} // }
boolean flag = false;//数据是否更新成功 boolean flag = false;//数据是否更新成功
String sql = "update kq_LeaveRulesDetail set ruleId=?,ruleName=?,scopeType=?,scopeValue=?," + String sql = "update kq_LeaveRulesDetail set ruleId=?,ruleName=?,scopeType=?,scopeValue=?," +
"distributionMode=?,annualAmount=?,legalKey=?,welfareKey=?,priority=?,validityRule=?,effectiveDays=?,effectiveMonths=?,expirationMonth=?,expirationDay=?,extensionEnable=?,extendedDays=?,releaseRule=?,calcMethod=?,convertMode=?,excludeSubAccount=?,beforeFormal=?,severalChildren=?,yearsOld=?,isprovince=? ,carryOver=?,carryOverDays=?,deductorder=? where id=?"; "distributionMode=?,annualAmount=?,legalKey=?,welfareKey=?,priority=?,validityRule=?,effectiveDays=?,effectiveMonths=?,expirationMonth=?,expirationDay=?,extensionEnable=?,extendedDays=?,releaseRule=?,calcMethod=?,convertMode=?,excludeSubAccount=?,beforeFormal=?,severalChildren=?,yearsOld=?,isprovince=? ,carryOver=?,carryOverDays=?,deductorder=?,minLevel=?,maxLevel=? where id=?";
flag = recordSet.executeUpdate(sql, ruleId, ruleName, scopeType, scopeValue, flag = recordSet.executeUpdate(sql, ruleId, ruleName, scopeType, scopeValue,
distributionMode, annualAmount, legalKey, welfareKey, priority, validityRule, effectiveDays, effectiveMonths, expirationMonth, expirationDay, extensionEnable, extendedDays, releaseRule, calcMethod, convertMode, excludeSubAccount, beforeFormal,severalChildren,yearsOld,isprovince,carryOver,carryOverDays,deductorder,ruleDetailId); distributionMode, annualAmount, legalKey, welfareKey, priority, validityRule, effectiveDays, effectiveMonths, expirationMonth, expirationDay, extensionEnable, extendedDays, releaseRule, calcMethod, convertMode, excludeSubAccount, beforeFormal,severalChildren,yearsOld,isprovince,carryOver,carryOverDays,deductorder,minLevel,maxLevel,ruleDetailId);
if (!flag) { if (!flag) {
resultMap.put("sign", "-1"); resultMap.put("sign", "-1");
resultMap.put("message", SystemEnv.getHtmlLabelName(84544, user.getLanguage()));//保存失败 resultMap.put("message", SystemEnv.getHtmlLabelName(84544, user.getLanguage()));//保存失败

@ -75,6 +75,12 @@ public class GetLeaveRulesFormCmd extends AbstractCommonCommand<Map<String, Obje
/*应用范围为分部时选择的分部ID*/ /*应用范围为分部时选择的分部ID*/
String scopeValue = ""; String scopeValue = "";
/*最小安全级别*/
String minLevel = "";
/*最大安全级别*/
String maxLevel = "";
/*余额发放方式1-手动发放、2-按司龄自动发放、3-按工龄自动发放、4-每年自动发放固定天数、5-加班时长自动计入余额、6-按工龄+司龄自动发放*/ /*余额发放方式1-手动发放、2-按司龄自动发放、3-按工龄自动发放、4-每年自动发放固定天数、5-加班时长自动计入余额、6-按工龄+司龄自动发放*/
int distributionMode = 1; int distributionMode = 1;
@ -169,6 +175,8 @@ public class GetLeaveRulesFormCmd extends AbstractCommonCommand<Map<String, Obje
isEdit = true; isEdit = true;
ruleName = recordSet.getString("ruleName"); ruleName = recordSet.getString("ruleName");
minLevel = recordSet.getString("minLevel");
maxLevel = recordSet.getString("maxLevel");
ruleId = recordSet.getString("ruleId"); ruleId = recordSet.getString("ruleId");
scopeType = recordSet.getInt("scopeType"); scopeType = recordSet.getInt("scopeType");
scopeValue = recordSet.getString("scopeValue"); scopeValue = recordSet.getString("scopeValue");
@ -505,24 +513,24 @@ public class GetLeaveRulesFormCmd extends AbstractCommonCommand<Map<String, Obje
// todo 美之高二开新加人员安全级别 // todo 美之高二开新加人员安全级别
hrmFieldBean = new HrmFieldBean(); hrmFieldBean = new HrmFieldBean();
hrmFieldBean.setFieldname("personLeavel"); hrmFieldBean.setFieldname("secLevel");
hrmFieldBean.setFieldlabel("-114855"); hrmFieldBean.setFieldlabel("683");
hrmFieldBean.setFieldhtmltype("5"); hrmFieldBean.setFieldhtmltype("1");
hrmFieldBean.setType("1"); hrmFieldBean.setType("2");
hrmFieldBean.setIsScope(true);
hrmFieldBean.setFieldvalue("2");
hrmFieldBean.setIsFormField(true); hrmFieldBean.setIsFormField(true);
hrmFieldBean.setViewAttr(3); hrmFieldBean.setViewAttr(3);
searchConditionItem = hrmFieldSearchConditionComInfo.getSearchConditionItem(hrmFieldBean, user); searchConditionItem = hrmFieldSearchConditionComInfo.getSearchConditionItem(hrmFieldBean, user);
List<SearchConditionOption> optionsList1 = new ArrayList<>();
// 建模表构建人员级别下拉框 searchConditionItem.setViewAttr(3);
optionsList1.add(new SearchConditionOption("1", "集团领导", true)); searchConditionItem.setRules("required");
optionsList1.add(new SearchConditionOption("2","高管级", true)); if (isEdit) {
optionsList1.add(new SearchConditionOption("3", "职员级", true)); searchConditionItem.setStartValue(minLevel);
searchConditionItem.setEndValue(maxLevel);
}
searchConditionItem.setOptions(optionsList1);
searchConditionItem.setRules("required|string"); searchConditionItem.setValue(new Integer[]{0,100});
itemList.add(searchConditionItem); itemList.add(searchConditionItem);
/****************************************************发放规则****************************************************/ /****************************************************发放规则****************************************************/

@ -0,0 +1,19 @@
package com.engine.kq.jucailin.util;
import java.sql.Date;
import java.sql.Timestamp;
public class KQDateUtil {
public static Date getUpdateDate(){
Long now = System.currentTimeMillis();
Date date = new Date(now);
return date;
}
public static Timestamp getUpdateTimeStamp(){
Long now = System.currentTimeMillis();
Timestamp timestamp = new Timestamp(now);
return timestamp;
}
}
Loading…
Cancel
Save