|
|
|
@ -513,7 +513,7 @@ func (a *ApiMethod) CustomerFormEditData(c *gin.Context) { |
|
|
|
masterUnitList[v.Name] = v |
|
|
|
} |
|
|
|
uuid, _ := strconv.ParseInt(mapData["formId"].(string), 10, 64) |
|
|
|
masrWriteMap := MakeFormMapData(uuid, userCont.Key, userCont.AdminOrg, cureeTime, masterField, masterUnitList, 2) |
|
|
|
masrWriteMap := MakeFormMapData(uuid, userCont.Key, userCont.AdminOrg, userCont.Position, cureeTime, masterField, masterUnitList, 2) |
|
|
|
|
|
|
|
//判断是否
|
|
|
|
if len(sunFieldAry) > 0 { |
|
|
|
@ -523,7 +523,7 @@ func (a *ApiMethod) CustomerFormEditData(c *gin.Context) { |
|
|
|
for _, v := range formUnitCont.SunFormInfo { |
|
|
|
sunTypeAry[v.TableName] = v.UbitInfo |
|
|
|
} |
|
|
|
err = EditWriteSunDatabase(uuid, userCont.Key, userCont.AdminOrg, cureeTime, formCont.TableKey, masrWriteMap, sunFieldAry, sunTypeAry) |
|
|
|
err = EditWriteSunDatabase(uuid, userCont.Key, userCont.AdminOrg, userCont.Position, cureeTime, formCont.TableKey, masrWriteMap, sunFieldAry, sunTypeAry) |
|
|
|
} else { |
|
|
|
|
|
|
|
err = overall.CONSTANT_DB_CustomerForm.Table(formCont.TableKey).Where("`masters_key` = ?", uuid).Updates(masrWriteMap).Error |
|
|
|
@ -1017,7 +1017,7 @@ func CustomerFormCallBackVal(val map[string]interface{}, valClass map[string]cus |
|
|
|
|
|
|
|
# |
|
|
|
*/ |
|
|
|
func EditWriteSunDatabase(uuid, creater, createrOrgId, createrTime int64, masterTableName string, masterDataCont, sunDataList map[string]interface{}, sunTable map[string]map[string]customerform.MasterStruct) (err error) { |
|
|
|
func EditWriteSunDatabase(uuid, creater, createrOrgId, createrPositon, createrTime int64, masterTableName string, masterDataCont, sunDataList map[string]interface{}, sunTable map[string]map[string]customerform.MasterStruct) (err error) { |
|
|
|
if len(masterDataCont) > 0 { |
|
|
|
if len(sunDataList) > 0 { |
|
|
|
sunMasterMap := publicmethod.MapOut[string]() |
|
|
|
@ -1035,7 +1035,7 @@ func EditWriteSunDatabase(uuid, creater, createrOrgId, createrTime int64, master |
|
|
|
for _, sv := range s { //拆分子表
|
|
|
|
if sdf, isOk := sv.(map[string]interface{}); isOk { |
|
|
|
if sunTableType, sunIsOk := sunTable[k]; sunIsOk { |
|
|
|
masterWriteVal := MakeFormMapData(uuid, creater, createrOrgId, createrTime, sdf, sunTableType, 2) //转换数据表值
|
|
|
|
masterWriteVal := MakeFormMapData(uuid, creater, createrOrgId, createrPositon, createrTime, sdf, sunTableType, 2) //转换数据表值
|
|
|
|
if len(masterWriteVal) > 0 { |
|
|
|
sunCont = append(sunCont, masterWriteVal) |
|
|
|
} |
|
|
|
@ -1214,7 +1214,7 @@ func (a *ApiMethod) NewCustomerFormEditData(c *gin.Context) { |
|
|
|
masterUnitList[v.Name] = v |
|
|
|
} |
|
|
|
uuid, _ := strconv.ParseInt(mapData["flowKey"].(string), 10, 64) |
|
|
|
masrWriteMap := MakeFormMapData(uuid, userCont.Key, userCont.AdminOrg, cureeTime, masterField, masterUnitList, 2) |
|
|
|
masrWriteMap := MakeFormMapData(uuid, userCont.Key, userCont.AdminOrg, userCont.Position, cureeTime, masterField, masterUnitList, 2) |
|
|
|
|
|
|
|
//判断是否
|
|
|
|
if len(sunFieldAry) > 0 { |
|
|
|
@ -1224,7 +1224,7 @@ func (a *ApiMethod) NewCustomerFormEditData(c *gin.Context) { |
|
|
|
for _, v := range formUnitCont.SunFormInfo { |
|
|
|
sunTypeAry[v.TableName] = v.UbitInfo |
|
|
|
} |
|
|
|
err = EditWriteSunDatabase(uuid, userCont.Key, userCont.AdminOrg, cureeTime, formCont.TableKey, masrWriteMap, sunFieldAry, sunTypeAry) |
|
|
|
err = EditWriteSunDatabase(uuid, userCont.Key, userCont.AdminOrg, userCont.Position, cureeTime, formCont.TableKey, masrWriteMap, sunFieldAry, sunTypeAry) |
|
|
|
} else { |
|
|
|
|
|
|
|
err = overall.CONSTANT_DB_CustomerForm.Table(formCont.TableKey).Where("`masters_key` = ?", uuid).Updates(masrWriteMap).Error |
|
|
|
|