Explorar o código

后:合同导入的二级单位匹配

dubch %!s(int64=4) %!d(string=hai) anos
pai
achega
422f856f78

+ 1 - 1
src/dashoo.cn/backend/api/controllers/oilcontract/contract.go

@@ -1131,7 +1131,7 @@ func (this *OilContractController) ImportExcel() {
 				con.SupplierId = supp.Id
 			}
 			var org organize.Base_Organize
-			svc.GetEntityByWhere("Base_Organize", "FullName = '"+sheet.Rows[i].Cells[5].String()+"'", &org)
+			svc.GetEntityByWhere("Base_Organize", "ParentId in (100000004,100000005,100000009) and FullName = '"+sheet.Rows[i].Cells[5].String()+"'", &org)
 			if org.Id > 0 {
 				con.SecondUnit = org.Id
 				con.SecondUnitName = org.Fullname