Browse Source

tijiao

v2_dev
超级管理员 2 years ago
parent
commit
0fc8189057
  1. 2
      api/version1/administrativeorganization/govcont.go
  2. 2
      api/version1/personnelapi/staff.go
  3. 1
      main.go
  4. 4
      middleware/snowflake/type.go
  5. 4
      overall/overallhandle/overall_handle.go

2
api/version1/administrativeorganization/govcont.go

@ -571,7 +571,7 @@ func (o *OrganizationApi) GovThreeAboutMan(c *gin.Context) {
} }
synPro.Wait() synPro.Wait()
// fmt.Printf("%v\n", len(allOrgAndPeople.OrgAndPeopleList)) // fmt.Printf("%v\n", len(allOrgAndPeople.OrgAndPeopleList))
for oi, _ := range allOrgAndPeople.OrgAndPeopleList { for oi := range allOrgAndPeople.OrgAndPeopleList {
allOrgAndPeople.OrgAndPeopleList[oi].Identify = oi + 1 allOrgAndPeople.OrgAndPeopleList[oi].Identify = oi + 1
} }

2
api/version1/personnelapi/staff.go

@ -1779,7 +1779,7 @@ func (s *StaffApi) GetPeopleDataIntegrity(c *gin.Context) {
scoreVal = scoreVal + 30 scoreVal = scoreVal + 30
} else { } else {
scoreVal = scoreVal + (mainScore/12)*30 scoreVal = scoreVal + (mainScore/12)*30
fmt.Printf("main----121--->%v-------->%v\n", mainScore, (mainScore / 12)) fmt.Printf("main----121--->%v-------->%v\n", mainScore, mainScore/12)
} }
fmt.Printf("main----12--->%v-------->%v\n", mainScore, scoreVal) fmt.Printf("main----12--->%v-------->%v\n", mainScore, scoreVal)

1
main.go

@ -17,4 +17,5 @@ func main() {
//启动定时任务 //启动定时任务
scheduledtask.TimeTask() scheduledtask.TimeTask()
app.RunItem() app.RunItem()
} }

4
middleware/snowflake/type.go

@ -8,8 +8,8 @@ const (
numberBits uint8 = 12 numberBits uint8 = 12
workerMax int64 = -1 ^ (-1 << workerBits) workerMax int64 = -1 ^ (-1 << workerBits)
numberMax int64 = -1 ^ (-1 << numberBits) numberMax int64 = -1 ^ (-1 << numberBits)
timeShift uint8 = workerBits + numberBits timeShift = workerBits + numberBits
workerShift uint8 = numberBits workerShift = numberBits
startTime int64 = 1655827200000 // 如果在程序跑了一段时间修改了epoch这个值 可能会导致生成相同的ID startTime int64 = 1655827200000 // 如果在程序跑了一段时间修改了epoch这个值 可能会导致生成相同的ID
) )

4
overall/overallhandle/overall_handle.go

@ -220,7 +220,7 @@ func ChineseFirstWordCapitalize(wordStr string) (firstWord string) {
@parentId 上级 @parentId 上级
*/ */
func GetGovFirstWords(govName, abbreviation, govClass, parentId string) (firstWord string) { func GetGovFirstWords(govName, abbreviation, govClass, parentId string) (firstWord string) {
var lev int = 0 var lev = 0
overall.CONSTANT_DB_HR.Model(&models.AdministrativeOrganizationType{}).Select("`level`").Where("`id` = ?", govClass).First(&lev) overall.CONSTANT_DB_HR.Model(&models.AdministrativeOrganizationType{}).Select("`level`").Where("`id` = ?", govClass).First(&lev)
if lev <= 2 { if lev <= 2 {
if abbreviation != "" { if abbreviation != "" {
@ -1282,7 +1282,7 @@ func DateToTimeStampOld(dataStr string) (timeStamp int64) {
// 时间计算(年、季、月、周、日、时、分、秒) // 时间计算(年、季、月、周、日、时、分、秒)
func ComputingTime(timeStamp int64, timeType int) (timeDataInt int64) { func ComputingTime(timeStamp int64, timeType int) (timeDataInt int64) {
var timeData string = "1" var timeData = "1"
switch timeType { switch timeType {
case 1: case 1:
timeData = time.Unix(timeStamp, 0).Format("2006") //年 timeData = time.Unix(timeStamp, 0).Format("2006") //年

Loading…
Cancel
Save