action 增加enableField字段值wei

This commit is contained in:
Harryxzy 2024-11-19 13:35:25 +08:00
parent 27b4e4c8fd
commit 94c8d82f08
20 changed files with 345 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import com.engine.salary.enums.salaryarchive.SalaryArchiveListTypeEnum;
import com.engine.salary.service.SalaryArchiveExcelService; import com.engine.salary.service.SalaryArchiveExcelService;
import com.engine.salary.service.impl.SalaryArchiveExcelServiceImpl; import com.engine.salary.service.impl.SalaryArchiveExcelServiceImpl;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -45,6 +46,17 @@ public class BatEditSalaryExcelAction implements Action {
this.operatorField = operatorField; this.operatorField = operatorField;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -53,6 +65,11 @@ public class BatEditSalaryExcelAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
String docId = fieldMap.get(batSalaryExcelField); String docId = fieldMap.get(batSalaryExcelField);
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();

View File

@ -7,6 +7,7 @@ import com.engine.salary.enums.salaryarchive.SalaryArchiveListTypeEnum;
import com.engine.salary.service.SalaryArchiveExcelService; import com.engine.salary.service.SalaryArchiveExcelService;
import com.engine.salary.service.impl.SalaryArchiveExcelServiceImpl; import com.engine.salary.service.impl.SalaryArchiveExcelServiceImpl;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -46,6 +47,17 @@ public class CheckBatEditSalaryExcelAction implements Action {
this.operatorField = operatorField; this.operatorField = operatorField;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -53,6 +65,11 @@ public class CheckBatEditSalaryExcelAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
String docId = fieldMap.get(batSalaryExcelField); String docId = fieldMap.get(batSalaryExcelField);
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();

View File

@ -7,6 +7,7 @@ import com.engine.salary.service.impl.SISchemeServiceImpl;
import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryEntityUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -42,6 +43,17 @@ public class CheckEditSIArchiveAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -49,6 +61,11 @@ public class CheckEditSIArchiveAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -6,6 +6,7 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.wrapper.SalaryArchiveWrapper; import com.engine.salary.wrapper.SalaryArchiveWrapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -38,6 +39,17 @@ public class CheckEditSalaryAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -46,7 +58,11 @@ public class CheckEditSalaryAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -60,6 +60,17 @@ public class CheckInitSalaryAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -68,6 +79,11 @@ public class CheckInitSalaryAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();

View File

@ -9,6 +9,7 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.db.MapperProxyFactory;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -49,6 +50,17 @@ public class CheckStayAddToPaySIArchiveAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -57,6 +69,12 @@ public class CheckStayAddToPaySIArchiveAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -9,6 +9,7 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.db.MapperProxyFactory;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -49,6 +50,17 @@ public class CheckStayDelToStopSIArchiveAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -57,6 +69,11 @@ public class CheckStayDelToStopSIArchiveAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -54,6 +54,17 @@ public class CheckStopSalaryAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -62,6 +73,11 @@ public class CheckStopSalaryAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -11,6 +11,7 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.db.MapperProxyFactory;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -18,7 +19,10 @@ import weaver.interfaces.workflow.action.Action;
import weaver.soa.workflow.request.Property; import weaver.soa.workflow.request.Property;
import weaver.soa.workflow.request.RequestInfo; import weaver.soa.workflow.request.RequestInfo;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -47,6 +51,17 @@ public class CopyToPaySIArchiveAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -54,6 +69,11 @@ public class CopyToPaySIArchiveAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -7,6 +7,7 @@ import com.engine.salary.service.impl.SISchemeServiceImpl;
import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryEntityUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -41,6 +42,17 @@ public class EditSIArchiveAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -48,6 +60,11 @@ public class EditSIArchiveAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -6,6 +6,7 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.wrapper.SalaryArchiveWrapper; import com.engine.salary.wrapper.SalaryArchiveWrapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -38,6 +39,17 @@ public class EditSalaryAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -46,7 +58,11 @@ public class EditSalaryAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -15,6 +15,7 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.db.MapperProxyFactory;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -59,6 +60,17 @@ public class EditToPaySIArchiveAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -66,6 +78,11 @@ public class EditToPaySIArchiveAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -15,6 +15,7 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.db.MapperProxyFactory;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -59,6 +60,17 @@ public class EditToStopSIArchiveAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -66,6 +78,11 @@ public class EditToStopSIArchiveAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -63,6 +63,17 @@ public class InitSalaryAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -70,6 +81,11 @@ public class InitSalaryAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -70,6 +70,17 @@ public class RehireAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -78,6 +89,12 @@ public class RehireAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -65,12 +65,30 @@ public class SendSalaryAction implements Action {
*/ */
private String sendBy; private String sendBy;
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
Property[] properties = requestInfo.getMainTableInfo().getProperty(); Property[] properties = requestInfo.getMainTableInfo().getProperty();
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
String idStr = fieldMap.get(idFieldName); String idStr = fieldMap.get(idFieldName);
if (StringUtils.isBlank(idStr)) { if (StringUtils.isBlank(idStr)) {
requestInfo.getRequestManager().setMessage("核算记录id或工资单id不能为空"); requestInfo.getRequestManager().setMessage("核算记录id或工资单id不能为空");

View File

@ -12,6 +12,7 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.db.MapperProxyFactory;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -54,6 +55,17 @@ public class StayAddToPaySIArchiveAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -62,6 +74,11 @@ public class StayAddToPaySIArchiveAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -14,6 +14,7 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.db.MapperProxyFactory;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
@ -55,6 +56,17 @@ public class StayDelToStopSIArchiveAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -63,6 +75,11 @@ public class StayDelToStopSIArchiveAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?";

View File

@ -60,6 +60,17 @@ public class StopSalaryAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
@ -68,6 +79,11 @@ public class StopSalaryAction implements Action {
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue()))); property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();

View File

@ -55,12 +55,32 @@ public class UpdateSISchemeDetailAction implements Action {
this.tableName = tableName; this.tableName = tableName;
} }
// 是否执行action的字段, 0代表不执行其余代表执行
private String enableField;
public String getEnableField() {
return enableField;
}
public void setEnableField(String enableField) {
this.enableField = enableField;
}
@Override @Override
public String execute(RequestInfo requestInfo) { public String execute(RequestInfo requestInfo) {
try { try {
RequestManager requestManager = requestInfo.getRequestManager(); RequestManager requestManager = requestInfo.getRequestManager();
User user = requestManager.getUser(); User user = requestManager.getUser();
Property[] properties = requestInfo.getMainTableInfo().getProperty();
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue())));
String enable = fieldMap.get(enableField);
if (StringUtils.isNotBlank(enable) && enable.equals("0")) {
// 不执行action
return SUCCESS;
}
DetailTable[] detailTables = requestInfo.getDetailTableInfo().getDetailTable(); DetailTable[] detailTables = requestInfo.getDetailTableInfo().getDetailTable();
List<Map<String, String>> detailList = new ArrayList<>(); List<Map<String, String>> detailList = new ArrayList<>();
if (detailTables.length > 0) { if (detailTables.length > 0) {