|
@@ -337,7 +337,7 @@ func FindNumber(moudle string) string {
|
|
}
|
|
}
|
|
|
|
|
|
// 人员查询
|
|
// 人员查询
|
|
-func GetAllocation(proportion1, proportion3 float64, deptCount1, deptCount3 int64, administrators1, administrators3 map[string]interface{}, creatorTime string) map[string]interface{} {
|
|
|
|
|
|
+func GetAllocation(proportion1, proportion3 float64, deptCount1, deptCount3 int64, administrators1, administrators3 map[string]interface{}) map[string]interface{} {
|
|
log.Println("分配比例查询", cfg.AllocationTime, cfg.AllocationRatio, proportion1, proportion3, deptCount1, deptCount3)
|
|
log.Println("分配比例查询", cfg.AllocationTime, cfg.AllocationRatio, proportion1, proportion3, deptCount1, deptCount3)
|
|
if deptCount1 == 0 {
|
|
if deptCount1 == 0 {
|
|
return administrators1
|
|
return administrators1
|
|
@@ -349,7 +349,7 @@ func GetAllocation(proportion1, proportion3 float64, deptCount1, deptCount3 int6
|
|
if cfg.AllocationRatio == 0 {
|
|
if cfg.AllocationRatio == 0 {
|
|
//重新计算
|
|
//重新计算
|
|
cfg.AllocationRatio = math.Round(proportion1 / proportion3)
|
|
cfg.AllocationRatio = math.Round(proportion1 / proportion3)
|
|
- cfg.AllocationTime = creatorTime
|
|
|
|
|
|
+ cfg.AllocationTime = time.Now().Format(date.Date_Full_Layout)
|
|
common.WriteSysConfig(&cfg)
|
|
common.WriteSysConfig(&cfg)
|
|
log.Println("新增计算比例", cfg.AllocationRatio)
|
|
log.Println("新增计算比例", cfg.AllocationRatio)
|
|
return administrators1
|
|
return administrators1
|
|
@@ -357,7 +357,7 @@ func GetAllocation(proportion1, proportion3 float64, deptCount1, deptCount3 int6
|
|
if nowAllocationRatio == cfg.AllocationRatio {
|
|
if nowAllocationRatio == cfg.AllocationRatio {
|
|
//重新计算
|
|
//重新计算
|
|
cfg.AllocationRatio = math.Round(proportion1 / proportion3)
|
|
cfg.AllocationRatio = math.Round(proportion1 / proportion3)
|
|
- cfg.AllocationTime = creatorTime
|
|
|
|
|
|
+ cfg.AllocationTime = time.Now().Format(date.Date_Full_Layout)
|
|
common.WriteSysConfig(&cfg)
|
|
common.WriteSysConfig(&cfg)
|
|
return administrators1
|
|
return administrators1
|
|
}
|
|
}
|
|
@@ -475,7 +475,7 @@ FROM
|
|
deptCount1 := CalculateProportion(1)
|
|
deptCount1 := CalculateProportion(1)
|
|
//三部查询
|
|
//三部查询
|
|
deptCount3 := CalculateProportion(3)
|
|
deptCount3 := CalculateProportion(3)
|
|
- return true, GetAllocation(proportion1, proportion3, deptCount1, deptCount3, administrators1, administrators3, creatorTime), allData
|
|
|
|
|
|
+ return true, GetAllocation(proportion1, proportion3, deptCount1, deptCount3, administrators1, administrators3), allData
|
|
}
|
|
}
|
|
|
|
|
|
func CalculateProportion(deptNumb int64) int64 {
|
|
func CalculateProportion(deptNumb int64) int64 {
|