|
|
|
@ -6,6 +6,7 @@ import apelet.common.generator.utils.OrmGenDataSourceUtil; |
|
|
|
import apelet.common.online.abstractplugin.ExecutePluginParent; |
|
|
|
import apelet.common.online.abstractplugin.ExecutePluginParent; |
|
|
|
import apelet.common.online.model.constant.AttributeEnum; |
|
|
|
import apelet.common.online.model.constant.AttributeEnum; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
@ -98,6 +99,7 @@ public class UnitNameChangeFormInitPlugin extends ExecutePluginParent { |
|
|
|
// 获取源单据ID
|
|
|
|
// 获取源单据ID
|
|
|
|
String sourceBillId = getSourceBillId(objectValue); |
|
|
|
String sourceBillId = getSourceBillId(objectValue); |
|
|
|
String sourceBillNumber = getSourceBillNumber(objectValue); |
|
|
|
String sourceBillNumber = getSourceBillNumber(objectValue); |
|
|
|
|
|
|
|
this.setWidgetAttribute("history",AttributeEnum.VALUE_CHANGE, "0"); |
|
|
|
|
|
|
|
|
|
|
|
// 如果没有源单据ID,说明不是变更操作,正常返回
|
|
|
|
// 如果没有源单据ID,说明不是变更操作,正常返回
|
|
|
|
if (sourceBillId == null || sourceBillId.isEmpty()) { |
|
|
|
if (sourceBillId == null || sourceBillId.isEmpty()) { |
|
|
|
@ -147,6 +149,10 @@ public class UnitNameChangeFormInitPlugin extends ExecutePluginParent { |
|
|
|
if (sourceBillId == null || sourceBillId.trim().isEmpty()) { |
|
|
|
if (sourceBillId == null || sourceBillId.trim().isEmpty()) { |
|
|
|
sourceBillId = objectValue.getString(PARAM_BILL_ID_ALT); |
|
|
|
sourceBillId = objectValue.getString(PARAM_BILL_ID_ALT); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Object idObj = objectValue.get("id"); |
|
|
|
|
|
|
|
if (idObj != null && !Integer.valueOf(0).equals(idObj)) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
return sourceBillId != null && !sourceBillId.trim().isEmpty(); |
|
|
|
return sourceBillId != null && !sourceBillId.trim().isEmpty(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -166,6 +172,7 @@ public class UnitNameChangeFormInitPlugin extends ExecutePluginParent { |
|
|
|
} |
|
|
|
} |
|
|
|
newBill.put(getDbFieldKey(key), entry.getValue()); |
|
|
|
newBill.put(getDbFieldKey(key), entry.getValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
newBill.put("history", "0"); |
|
|
|
|
|
|
|
|
|
|
|
ObjectCollection detailEntry = copyEntryForManualSave(objectValue.getObjectCollection(CHILD_WIDGET_KEY)); |
|
|
|
ObjectCollection detailEntry = copyEntryForManualSave(objectValue.getObjectCollection(CHILD_WIDGET_KEY)); |
|
|
|
if (detailEntry != null && !detailEntry.isEmpty()) { |
|
|
|
if (detailEntry != null && !detailEntry.isEmpty()) { |
|
|
|
|