|
|
@@ -30,8 +30,6 @@ import com.xzjmyk.pm.activity.ui.erp.model.oa.Approval;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.model.oa.ApprovalRecord;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.presenter.imp.IApproval;
|
|
|
|
|
|
-import org.jivesoftware.smack.util.StringUtils;
|
|
|
-
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
@@ -91,7 +89,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
// String imid = intent.getStringExtra("imid");
|
|
|
title = intent.getStringExtra("title");
|
|
|
master = intent.getStringExtra("master");
|
|
|
- if (StringUtils.isEmpty(master)) master = CommonUtil.getMaster();
|
|
|
+ if (StringUtil.isEmpty(master)) master = CommonUtil.getMaster();
|
|
|
if (id != -1) {
|
|
|
initLoad(id);
|
|
|
} else {
|
|
|
@@ -103,12 +101,12 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
}
|
|
|
|
|
|
public boolean isApprovaling() {
|
|
|
- if (StringUtils.isEmpty(title)) return false;
|
|
|
+ if (StringUtil.isEmpty(title)) return false;
|
|
|
return title.equals(StringUtil.getMessage(R.string.title_approval));
|
|
|
}
|
|
|
|
|
|
public boolean isApprovaled() {
|
|
|
- if (StringUtils.isEmpty(title)) return false;
|
|
|
+ if (StringUtil.isEmpty(title)) return false;
|
|
|
return title.equals(StringUtil.getMessage(R.string.task_confimed));
|
|
|
}
|
|
|
|
|
|
@@ -139,8 +137,8 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
}
|
|
|
|
|
|
public String getUrl(String baseUrl, String title) {
|
|
|
- String endStatus = (StringUtils.isEmpty(title) || title.equals(StringUtil.getMessage(R.string.title_approval)) ? "" : "%26_do=1");
|
|
|
- if (StringUtils.isEmpty(baseUrl) || endStatus.contains("26_do=1")) {
|
|
|
+ String endStatus = (StringUtil.isEmpty(title) || title.equals(StringUtil.getMessage(R.string.title_approval)) ? "" : "%26_do=1");
|
|
|
+ if (StringUtil.isEmpty(baseUrl) || endStatus.contains("26_do=1")) {
|
|
|
baseUrl = "jsps/mobile/process.jsp?nodeId=";
|
|
|
}
|
|
|
return baseUrl + record.nodeId + endStatus;
|
|
|
@@ -190,7 +188,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
*/
|
|
|
/*变更处理人 submiting*/
|
|
|
public void updateAssignee(String emCode, String nodeLog) {
|
|
|
- if (StringUtils.isEmpty(nodeLog)) {
|
|
|
+ if (StringUtil.isEmpty(nodeLog)) {
|
|
|
iApproval.showToast(R.string.approval_opinion_error, R.color.load_submit);
|
|
|
return;
|
|
|
}
|
|
|
@@ -198,7 +196,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
iApproval.showToast(R.string.submit_cannot_submit_again, R.color.load_submit);
|
|
|
return;
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(emCode)) {
|
|
|
+ if (StringUtil.isEmpty(emCode)) {
|
|
|
loadNextProcess();
|
|
|
return;
|
|
|
}
|
|
|
@@ -267,7 +265,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
param.put("master", master);
|
|
|
param.put("processInstanceId", record.processInstanceId);
|
|
|
String form = JSONUtil.map2JSON(formStore);
|
|
|
- param.put("formStore", StringUtils.isEmpty(form) ? "{}" : form);
|
|
|
+ param.put("formStore", StringUtil.isEmpty(form) ? "{}" : form);
|
|
|
param.put("param", JSONUtil.map2JSON(params));
|
|
|
Bundle bundle = new Bundle();
|
|
|
bundle.putString("nodeLog", nodeLog);
|
|
|
@@ -354,7 +352,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
|
|
|
/*不同意 submiting*/
|
|
|
public void disAgree(String nodeLog, String backTaskName) {
|
|
|
- if (StringUtils.isEmpty(nodeLog)) {
|
|
|
+ if (StringUtil.isEmpty(nodeLog)) {
|
|
|
iApproval.showToast(R.string.approval_opinion_error, R.color.load_submit);
|
|
|
return;
|
|
|
}
|
|
|
@@ -368,7 +366,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
param.put("nodeLog", nodeLog);
|
|
|
param.put("master", master);
|
|
|
param.put("result", false);
|
|
|
- if (StringUtils.isEmpty(backTaskName)) backTaskName = "RECORDER";
|
|
|
+ if (StringUtil.isEmpty(backTaskName)) backTaskName = "RECORDER";
|
|
|
param.put("backTaskName", backTaskName);//jn_name
|
|
|
param.put("attachs", "");//附件id
|
|
|
param.put("_noc", 1);//权限管控
|
|
|
@@ -506,7 +504,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
|
|
|
/*获取附件 */
|
|
|
private void loadFilePaths(String attachs) {
|
|
|
- if (StringUtils.isEmpty(attachs) || "null".equals(attachs)) {
|
|
|
+ if (StringUtil.isEmpty(attachs) || "null".equals(attachs)) {
|
|
|
return;
|
|
|
}
|
|
|
iApproval.showLoading();
|
|
|
@@ -536,7 +534,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
try {
|
|
|
if (!isJSON) {
|
|
|
LogUtil.i("!isJSON");
|
|
|
- iApproval.showToast(StringUtils.isEmpty(message) ? "程序错误" : message, R.color.load_submit);
|
|
|
+ iApproval.showToast(StringUtil.isEmpty(message) ? "程序错误" : message, R.color.load_submit);
|
|
|
return;
|
|
|
}
|
|
|
hander(what, JSON.parseObject(message), bundle);
|
|
|
@@ -564,8 +562,8 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
break;
|
|
|
}
|
|
|
String errorKey = "exceptionInfo";
|
|
|
- if (JSONUtil.validate(message) && !StringUtils.isEmpty(JSONUtil.getText(parseObject(message), errorKey))) {
|
|
|
- LogUtil.i("new JsonValidator().validate(message) && !StringUtils.isEmpty(JSONUtil.getText(parseObject(message), errorKey)");
|
|
|
+ if (JSONUtil.validate(message) && !StringUtil.isEmpty(JSONUtil.getText(parseObject(message), errorKey))) {
|
|
|
+ LogUtil.i("new JsonValidator().validate(message) && !StringUtil.isEmpty(JSONUtil.getText(parseObject(message), errorKey)");
|
|
|
String remain = JSONUtil.getText(parseObject(message), errorKey);
|
|
|
LogUtil.i("remain=" + remain);
|
|
|
iApproval.showToast(remain, R.color.load_submit);
|
|
|
@@ -677,7 +675,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
if (o != null && o.containsKey("JP_CANDIDATES")) {
|
|
|
data = o.getJSONArray("JP_CANDIDATES");
|
|
|
}
|
|
|
- if (!StringUtils.isEmpty(noid) && data != null && data.size() > 0) {
|
|
|
+ if (!StringUtil.isEmpty(noid) && data != null && data.size() > 0) {
|
|
|
record.chcheNode = noid;
|
|
|
iApproval.sendToSelect(data);
|
|
|
} else {
|
|
|
@@ -707,18 +705,18 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
if (keyValue != 0) {
|
|
|
record.id = keyValue;
|
|
|
}
|
|
|
- if (!StringUtils.isEmpty(record.title)) {
|
|
|
- if (!StringUtils.isEmpty(recordName)) {
|
|
|
+ if (!StringUtil.isEmpty(record.title)) {
|
|
|
+ if (!StringUtil.isEmpty(recordName)) {
|
|
|
record.title = recordName + " " + record.title;
|
|
|
}
|
|
|
}
|
|
|
- if (!StringUtils.isEmpty(caller)) {
|
|
|
+ if (!StringUtil.isEmpty(caller)) {
|
|
|
record.caller = caller;
|
|
|
}
|
|
|
- if (!StringUtils.isEmpty(nodeName)) {
|
|
|
+ if (!StringUtil.isEmpty(nodeName)) {
|
|
|
record.nodeName = nodeName;
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(record.imid)) {
|
|
|
+ if (StringUtil.isEmpty(record.imid)) {
|
|
|
record.imid = String.valueOf(getImByCode(launcherCode));
|
|
|
}
|
|
|
}
|
|
|
@@ -843,7 +841,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
boolean showAble = data != null && data.containsKey(valueKey);
|
|
|
String values = JSONUtil.getText(data, valueKey);
|
|
|
String newValues = JSONUtil.getText(changeData, valueKey);
|
|
|
- if (showAble && !StringUtils.isEmpty(newValues) && !newValues.equals(values)) {
|
|
|
+ if (showAble && !StringUtil.isEmpty(newValues) && !newValues.equals(values)) {
|
|
|
approval.setOldValues(values);
|
|
|
} else {
|
|
|
newValues = values;
|
|
|
@@ -859,7 +857,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
continue;
|
|
|
}
|
|
|
//获取Id
|
|
|
- if (!StringUtils.isEmpty(caption) && (caption.equals("ID") || caption.equals("id"))) {
|
|
|
+ if (!StringUtil.isEmpty(caption) && (caption.equals("ID") || caption.equals("id"))) {
|
|
|
idTag = valueKey;
|
|
|
id = JSONUtil.getInt(data, valueKey);
|
|
|
}
|
|
|
@@ -889,14 +887,14 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
JSONObject object = combostore.getJSONObject(j);
|
|
|
String value = JSONUtil.getText(object, "DLC_VALUE");
|
|
|
String display = JSONUtil.getText(object, "DLC_DISPLAY");
|
|
|
- if (!StringUtils.isEmpty(value) || !StringUtils.isEmpty(display))
|
|
|
+ if (!StringUtil.isEmpty(value) || !StringUtil.isEmpty(display))
|
|
|
approval.getDatas().add(new Approval.Data(display, value));
|
|
|
}
|
|
|
}
|
|
|
boolean mergeAble = appwidth == 1 || (approval.isDftypeEQ("MT"));
|
|
|
approval.data2Values();
|
|
|
approval.setMustInput(true);
|
|
|
- if (!StringUtils.isEmpty(record.needInputKeys)
|
|
|
+ if (!StringUtil.isEmpty(record.needInputKeys)
|
|
|
&& ("," + record.needInputKeys + ",").contains("," + valueKey + ",")) {
|
|
|
approval.setNeerInput(true);
|
|
|
if (approval.getDatas().size() <= 0) {
|
|
|
@@ -911,14 +909,14 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
}
|
|
|
if (!isApprovaling())
|
|
|
approval.setNeerInput(false);
|
|
|
- if ((!approval.isNeerInput() && StringUtils.isEmpty(approval.getValues())) || !showAble || approval.getValues().equals("null") || !showAble || approval.getValues().equals("(null)")) {
|
|
|
+ if ((!approval.isNeerInput() && StringUtil.isEmpty(approval.getValues())) || !showAble || approval.getValues().equals("null") || !showAble || approval.getValues().equals("(null)")) {
|
|
|
continue;//如果不是要输入的对象,同时显示值为空,需要隐藏去
|
|
|
}
|
|
|
if (mergeAble) {
|
|
|
String valueTagKey = JSONUtil.getText(config, "FD_LOGICTYPE", "DG_LOGICTYPE");//获取第二个值的key
|
|
|
- if (!StringUtils.isEmpty(valueTagKey)) {
|
|
|
+ if (!StringUtil.isEmpty(valueTagKey)) {
|
|
|
String valueTag = JSONUtil.getText(data, valueTagKey);
|
|
|
- if (!StringUtils.isEmpty(valueTag)) {
|
|
|
+ if (!StringUtil.isEmpty(valueTag)) {
|
|
|
merged.append("," + valueTagKey + ",");
|
|
|
approval.addValues("/" + valueTag);
|
|
|
}
|
|
|
@@ -983,19 +981,19 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
result = setNodeStatus(result);
|
|
|
approval.setCaption(manName);
|
|
|
approval.setDfType(emCode);
|
|
|
- if (!StringUtils.isEmpty(dealTime)) {
|
|
|
+ if (!StringUtil.isEmpty(dealTime)) {
|
|
|
approval.setValues(DateFormatUtil.long2Str(TimeUtils.f_str_2_long(dealTime), "MM-dd HH:mm"));
|
|
|
}
|
|
|
StringBuilder resultBuilder = new StringBuilder();
|
|
|
- if (!StringUtils.isEmpty(result)) {
|
|
|
+ if (!StringUtil.isEmpty(result)) {
|
|
|
resultBuilder.append(result);
|
|
|
}
|
|
|
- if (!StringUtils.isEmpty(description)) {
|
|
|
+ if (!StringUtil.isEmpty(description)) {
|
|
|
resultBuilder.append("(" + description + ")");
|
|
|
}
|
|
|
approval.setIdKey(resultBuilder.toString());
|
|
|
approval.setValuesKey(nodeName);
|
|
|
- if (!StringUtils.isEmpty(emCode)) {
|
|
|
+ if (!StringUtil.isEmpty(emCode)) {
|
|
|
int imId = getImByCode(emCode);
|
|
|
approval.setId(imId);
|
|
|
}
|
|
|
@@ -1023,7 +1021,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
JSONArray processs = JSONUtil.getJSONArray(object, "processs");
|
|
|
JSONArray datas = JSONUtil.getJSONArray(object, "data");
|
|
|
List<Approval> approvals = getNodDatas(datas);
|
|
|
- if (bundle != null && !StringUtils.isEmpty(bundle.getString("historyNode"))) {
|
|
|
+ if (bundle != null && !StringUtil.isEmpty(bundle.getString("historyNode"))) {
|
|
|
historyNodes = handlerHistorySetuptask(JSON.parseObject(bundle.getString("historyNode")));
|
|
|
}
|
|
|
if ((isApprovaled() || ListUtils.isEmpty(approvals)) && !ListUtils.isEmpty(historyNodes)) {
|
|
|
@@ -1058,13 +1056,13 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
String emcode = null;
|
|
|
if (a.getDfType().contains(",")) {
|
|
|
String[] emcodes = a.getDfType().split(",");
|
|
|
- if (!StringUtils.isEmpty(emcodes[0])) {
|
|
|
+ if (!StringUtil.isEmpty(emcodes[0])) {
|
|
|
emcode = emcodes[0];
|
|
|
}
|
|
|
} else {
|
|
|
emcode = a.getDfType();
|
|
|
}
|
|
|
- if (!StringUtils.isEmpty(emcode)) {
|
|
|
+ if (!StringUtil.isEmpty(emcode)) {
|
|
|
int imId = getImByCode(emcode);
|
|
|
a.setId(imId);
|
|
|
}
|
|
|
@@ -1101,9 +1099,9 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
|
|
|
private void handerTitle(int reId) {
|
|
|
Approval approval = new Approval(Approval.TITLE);
|
|
|
- if (!StringUtils.isEmpty(record.title))
|
|
|
+ if (!StringUtil.isEmpty(record.title))
|
|
|
approval.setCaption(record.title);
|
|
|
- if (!StringUtils.isEmpty(record.imid))
|
|
|
+ if (!StringUtil.isEmpty(record.imid))
|
|
|
approval.setIdKey(record.imid);
|
|
|
if (reId > 0)
|
|
|
approval.setId(reId);
|
|
|
@@ -1151,7 +1149,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
}
|
|
|
|
|
|
private boolean equalsOne(String text, String... str) {
|
|
|
- if (StringUtils.isEmpty(text) || str == null || str.length <= 0) return false;
|
|
|
+ if (StringUtil.isEmpty(text) || str == null || str.length <= 0) return false;
|
|
|
for (String s : str) {
|
|
|
if (text.equals(s)) return true;
|
|
|
}
|
|
|
@@ -1213,7 +1211,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
} else if (status.equals("同意")) {
|
|
|
a.setIdKey(hanEnd ? "待审批" : "已审批");
|
|
|
}
|
|
|
- if (!hanEnd && !StringUtils.isEmpty(nodeDescription)) {
|
|
|
+ if (!hanEnd && !StringUtil.isEmpty(nodeDescription)) {
|
|
|
a.setIdKey(a.getIdKey() + "(" + nodeDescription + ")");
|
|
|
}
|
|
|
}
|
|
|
@@ -1238,7 +1236,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
String emCode = JSONUtil.getText(object, "JP_NODEDEALMAN");//节点处理人编号
|
|
|
String manName = JSONUtil.getText(object, "JP_NODEDEALMANNAME");
|
|
|
Approval approval = new Approval(Approval.NODES);
|
|
|
- approval.setCaption(StringUtils.isEmpty(manName) ? nodeName : manName);
|
|
|
+ approval.setCaption(StringUtil.isEmpty(manName) ? nodeName : manName);
|
|
|
approval.setDfType(emCode);
|
|
|
approval.setValuesKey(nodeName);
|
|
|
approvals.add(approval);
|
|
|
@@ -1248,7 +1246,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
|
|
|
|
|
|
private List<Approval> getSetuptaskByData(String data) {
|
|
|
- if (!StringUtils.isEmpty(data)) {
|
|
|
+ if (!StringUtil.isEmpty(data)) {
|
|
|
//需要把该数据填充到对应上面
|
|
|
String[] datas = data.split(";");
|
|
|
List<Approval> itemSetuptasks = new ArrayList<>();
|
|
|
@@ -1259,7 +1257,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
if (description.contains("(")) {
|
|
|
String caption = description.substring(0, description.indexOf("("));
|
|
|
String values = StringUtil.getFirstBrackets(description);
|
|
|
- if (!StringUtils.isEmpty(caption) && !StringUtils.isEmpty(values)) {
|
|
|
+ if (!StringUtil.isEmpty(caption) && !StringUtil.isEmpty(values)) {
|
|
|
approval = new Approval(Approval.SETUPTASK);
|
|
|
approval.setNeerInput(false);
|
|
|
approval.setCaption(caption);
|
|
|
@@ -1283,7 +1281,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
if (!ListUtils.isEmpty(arrayCS)) {
|
|
|
String data = JSONUtil.getText(object, "data");
|
|
|
String[] datas = null;
|
|
|
- if (!StringUtils.isEmpty(data)) {
|
|
|
+ if (!StringUtil.isEmpty(data)) {
|
|
|
//需要把该数据填充到对应上面
|
|
|
datas = data.split(";");
|
|
|
}
|
|
|
@@ -1327,18 +1325,18 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
* ..$Y表示该字段为必填字段,
|
|
|
*/
|
|
|
private Approval getItemBySetupTask(String cs, String[] datas) {
|
|
|
- if (!StringUtils.isEmpty(cs)) {
|
|
|
+ if (!StringUtil.isEmpty(cs)) {
|
|
|
Approval approval = new Approval(Approval.POINTS);
|
|
|
String[] css = cs.split("\\^");
|
|
|
- if (!StringUtils.isEmpty(css[0])) {
|
|
|
+ if (!StringUtil.isEmpty(css[0])) {
|
|
|
approval.setCaption(css[0]);
|
|
|
String tag = css[1];
|
|
|
- if (!StringUtils.isEmpty(tag)) {
|
|
|
+ if (!StringUtil.isEmpty(tag)) {
|
|
|
String[] tags = tag.split("\\$");
|
|
|
approval.setDfType(tags[0]);
|
|
|
String neer = tags[1];
|
|
|
String data = StringUtil.getLastBracket(neer);
|
|
|
- if (StringUtils.isEmpty(data)) {
|
|
|
+ if (StringUtil.isEmpty(data)) {
|
|
|
data = "是;否";
|
|
|
}
|
|
|
String[] combostore = data.split(";");
|
|
|
@@ -1348,7 +1346,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
approval.getDatas().add(new Approval.Data(v, v));
|
|
|
}
|
|
|
}
|
|
|
- if (!StringUtils.isEmpty(neer)) {
|
|
|
+ if (!StringUtil.isEmpty(neer)) {
|
|
|
approval.setMustInput(neer.startsWith("Y"));
|
|
|
if (neer.contains("@A")) {
|
|
|
approval.setDfType("@A");
|
|
|
@@ -1359,7 +1357,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
for (String data : datas) {
|
|
|
if (data.startsWith(approval.getCaption())) {
|
|
|
String values = StringUtil.getFirstBrackets(data);
|
|
|
- if (!StringUtils.isEmpty(values)
|
|
|
+ if (!StringUtil.isEmpty(values)
|
|
|
&& !values.equals("null")
|
|
|
&& !values.equals("(null)")
|
|
|
&& !values.equals("(null")) {
|
|
|
@@ -1369,7 +1367,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
}
|
|
|
}
|
|
|
approval.setNeerInput(isApprovaling());
|
|
|
- if (!approval.isNeerInput() && StringUtils.isEmpty(approval.getValues())) {
|
|
|
+ if (!approval.isNeerInput() && StringUtil.isEmpty(approval.getValues())) {
|
|
|
return null;
|
|
|
}
|
|
|
return approval;
|
|
|
@@ -1381,7 +1379,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
private int getImByCode(String emCode) {
|
|
|
DBManager manager = DBManager.getInstance();
|
|
|
String whichsys = CommonUtil.getMaster();
|
|
|
- if (StringUtils.isEmpty(emCode) || StringUtils.isEmpty(whichsys)) return 0;
|
|
|
+ if (StringUtil.isEmpty(emCode) || StringUtil.isEmpty(whichsys)) return 0;
|
|
|
String[] selectionArgs = {emCode, whichsys};
|
|
|
String selection = "em_code=? and whichsys=?";
|
|
|
EmployeesEntity employeesEntity = manager.selectForEmployee(selectionArgs, selection);
|
|
|
@@ -1409,13 +1407,13 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
if (!ListUtils.isEmpty(approvals)) {
|
|
|
for (Approval approval : approvals) {
|
|
|
if (approval.getType() == Approval.POINTS) {
|
|
|
- if (approval.isMustInput() && StringUtils.isEmpty(approval.getValues())) {
|
|
|
+ if (approval.isMustInput() && StringUtil.isEmpty(approval.getValues())) {
|
|
|
String message = StringUtil.getMessage(R.string.approval_points) + " " + approval.getCaption() + " " + StringUtil.getMessage(R.string.is_must_input);
|
|
|
iApproval.showToast(message, R.color.load_submit);
|
|
|
return false;
|
|
|
}
|
|
|
- if (!StringUtils.isEmpty(approval.getCaption())
|
|
|
- && !StringUtils.isEmpty(approval.getValues()) && customDes != null) {
|
|
|
+ if (!StringUtil.isEmpty(approval.getCaption())
|
|
|
+ && !StringUtil.isEmpty(approval.getValues()) && customDes != null) {
|
|
|
if (approval.getValues().contains("@")) {
|
|
|
String message = StringUtil.getMessage(R.string.approval_points) + " " + approval.getCaption() + " 带有特殊字符";
|
|
|
iApproval.showToast(message, R.color.load_submit);
|
|
|
@@ -1472,11 +1470,11 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
Map<String, Object> formstore = new HashMap<>();
|
|
|
for (Approval approval : approvals) {
|
|
|
if (approval.isNeerInput()) {
|
|
|
- if (StringUtils.isEmpty(approval.getValues())) {
|
|
|
+ if (StringUtil.isEmpty(approval.getValues())) {
|
|
|
String message = StringUtil.getMessage(R.string.must_input_key) + " " + approval.getCaption() + " " + StringUtil.getMessage(R.string.is_must_input);
|
|
|
iApproval.showToast(message);
|
|
|
return null;
|
|
|
- } else if (StringUtils.isEmpty(approval.getValues())) {
|
|
|
+ } else if (StringUtil.isEmpty(approval.getValues())) {
|
|
|
String message = StringUtil.getMessage(R.string.must_input_key) + " " + approval.getCaption() + " " + StringUtil.getMessage(R.string.limit_unno_zijie);
|
|
|
iApproval.showToast(message);
|
|
|
return null;
|
|
|
@@ -1486,7 +1484,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
isputed = false;
|
|
|
if (data.display.equals(approval.getValues())) {
|
|
|
formstore.put(approval.getValuesKey(),
|
|
|
- StringUtils.isEmpty(data.value) ? approval.getValues() : data.value);
|
|
|
+ StringUtil.isEmpty(data.value) ? approval.getValues() : data.value);
|
|
|
isputed = true;
|
|
|
break;
|
|
|
}
|
|
|
@@ -1496,7 +1494,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (!StringUtils.isEmpty(approval.getIdKey()) && approval.getId() > 0) {
|
|
|
+ if (!StringUtil.isEmpty(approval.getIdKey()) && approval.getId() > 0) {
|
|
|
formstore.put(approval.getIdKey(), approval.getId());
|
|
|
}
|
|
|
}
|
|
|
@@ -1515,7 +1513,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
|
|
|
OAHttpHelper.getInstance().post(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
- if (!loading && ApprovaPresenter.this.titleApproval != null && !StringUtils.isEmpty(titleApproval.getCaption()) && isApprovaling()) {
|
|
|
+ if (!loading && ApprovaPresenter.this.titleApproval != null && !StringUtil.isEmpty(titleApproval.getCaption()) && isApprovaling()) {
|
|
|
iApproval.showOpinion();
|
|
|
}
|
|
|
iApproval.showModels(approvals, historyNodes);
|