|
|
@@ -1295,13 +1295,15 @@ public class FormExecuteServiceImpl implements IFormExecuteService {
|
|
|
|
|
|
//主表如果有审计字段 默认填充值
|
|
|
putAuditEntityUpdateData(entity, columns);
|
|
|
- Map<String, Object> objectMap = SqlRunnerAdapter.db().dynamicSelectOne(tableName, where);
|
|
|
+ Entity findwhere = Entity.create(tableName);
|
|
|
+ findwhere.putAll(where);
|
|
|
+ findwhere.putAll(entity);
|
|
|
+ Map<String, Object> objectMap = SqlRunnerAdapter.db().dynamicSelectOne(tableName, findwhere);
|
|
|
Boolean isUpdate = false;
|
|
|
- for (String key : toSaveFormData.keySet()) {
|
|
|
- if(!Objects.equals(entity.get(key), objectMap.get(key))){
|
|
|
- isUpdate = true;
|
|
|
- };
|
|
|
+ if(objectMap == null){
|
|
|
+ isUpdate = true;
|
|
|
}
|
|
|
+
|
|
|
Boolean result = null;
|
|
|
if(isUpdate){
|
|
|
result = SqlRunnerAdapter.db().dynamicUpdate(tableName, entity, where);
|