|
@@ -85,9 +85,6 @@ public class ObjectInstanceUpdateService extends BaseService {
|
|
|
response.setFail("id is required");
|
|
|
return response;
|
|
|
}
|
|
|
- if ("Eq44030500190026e03ce3554a66ad66269a85106482".equals(id)) {
|
|
|
- log.info("id = {}", id);
|
|
|
- }
|
|
|
String classCode = super.getInfoCodeValue(orgParam.groupCode, orgParam.projectId, id, RwdConstants.OBJECT_CLASSCODE);
|
|
|
if (classCode == null) {
|
|
|
response.setFail("object[" + id + "] not exists");
|
|
@@ -198,12 +195,44 @@ public class ObjectInstanceUpdateService extends BaseService {
|
|
|
InfoCodeParser parser = infoCodeParserFactory.getParser(funcidDefModel.getDataType());
|
|
|
ParserContext parserContext = new ParserContext(funcidDefModel, source);
|
|
|
parser.checkValue(parserContext);
|
|
|
- Object value = parserContext.getValue();
|
|
|
- if (value != null) {
|
|
|
- if (entity.getInfos() == null) {
|
|
|
- entity.setInfos(JsonNodeFactory.instance.objectNode());
|
|
|
+ Boolean isMultiple = funcidDefModel.getIsMultiple();
|
|
|
+ Boolean isRegion = funcidDefModel.getIsRegion();
|
|
|
+ if (isMultiple && isRegion) {
|
|
|
+ // 复数区间
|
|
|
+ List value = parserContext.getRegionArray();
|
|
|
+ if (value != null) {
|
|
|
+ if (entity.getInfos() == null) {
|
|
|
+ entity.setInfos(JsonNodeFactory.instance.objectNode());
|
|
|
+ }
|
|
|
+ entity.getInfos().putPOJO(code, value);
|
|
|
+ }
|
|
|
+ } else if (isMultiple && !isRegion) {
|
|
|
+ // 复数非区间
|
|
|
+ List value = parserContext.getArrayValue();
|
|
|
+ if (value != null) {
|
|
|
+ if (entity.getInfos() == null) {
|
|
|
+ entity.setInfos(JsonNodeFactory.instance.objectNode());
|
|
|
+ }
|
|
|
+ entity.getInfos().putPOJO(code, value);
|
|
|
+ }
|
|
|
+ } else if (!isMultiple && isRegion) {
|
|
|
+ // 单数 区间
|
|
|
+ Object value = parserContext.getRegionValue();
|
|
|
+ if (value != null) {
|
|
|
+ if (entity.getInfos() == null) {
|
|
|
+ entity.setInfos(JsonNodeFactory.instance.objectNode());
|
|
|
+ }
|
|
|
+ entity.getInfos().putPOJO(code, value);
|
|
|
+ }
|
|
|
+ } else if (!isMultiple && !isRegion) {
|
|
|
+ // 单数 非区间
|
|
|
+ Object value = parserContext.getValue();
|
|
|
+ if (value != null) {
|
|
|
+ if (entity.getInfos() == null) {
|
|
|
+ entity.setInfos(JsonNodeFactory.instance.objectNode());
|
|
|
+ }
|
|
|
+ entity.getInfos().putPOJO(code, value);
|
|
|
}
|
|
|
- entity.getInfos().putPOJO(code, value);
|
|
|
}
|
|
|
} else {
|
|
|
// 动态点
|