Quellcode durchsuchen

update 结算单结束时间

master
dengbiao vor 1 Monat
Ursprung
Commit
dfe1a291d3
2 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  1. +3
    -3
      app/task/svc/svc_agent_settlement_state.go
  2. +3
    -3
      app/task/svc/svc_medium_settlement_state.go

+ 3
- 3
app/task/svc/svc_agent_settlement_state.go Datei anzeigen

@@ -46,7 +46,7 @@ func AgentSettlementState(eg *xorm.Engine) {
//1、查询"日结"结算单 agent_settlement 数据
_, err := eg.Where("kind = ?", 1).And("start_date != ?", today).Update(&model2.AgentSettlement{
State: 1, //结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)
EndDate: today,
EndDate: now.AddDate(0, 0, -1).Format("2006-01-02"),
})
if err != nil {
fmt.Println("err>>>>>>>", err.Error())
@@ -58,7 +58,7 @@ func AgentSettlementState(eg *xorm.Engine) {
if weekday == time.Monday {
_, err = eg.Where("kind = ?", 2).And("start_date != ?", today).Update(&model2.AgentSettlement{
State: 1, //结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)
EndDate: today,
EndDate: now.AddDate(0, 0, -1).Format("2006-01-02"),
})
if err != nil {
fmt.Println("err>>>>>>>", err.Error())
@@ -70,7 +70,7 @@ func AgentSettlementState(eg *xorm.Engine) {
if now.Day() == 1 {
_, err = eg.Where("kind = ?", 3).And("start_date != ?", today).Update(&model2.AgentSettlement{
State: 1, //结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)
EndDate: today,
EndDate: now.AddDate(0, 0, -1).Format("2006-01-02"),
})
if err != nil {
fmt.Println("err>>>>>>>", err.Error())


+ 3
- 3
app/task/svc/svc_medium_settlement_state.go Datei anzeigen

@@ -46,7 +46,7 @@ func MediumSettlementState(eg *xorm.Engine) {
//1、查询"日结"结算单 medium_settlement 数据
_, err := eg.Where("kind = ?", 1).And("start_date != ?", today).Update(&model2.MediumSettlement{
State: 1, //结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)
EndDate: today,
EndDate: now.AddDate(0, 0, -1).Format("2006-01-02"),
})
if err != nil {
fmt.Println("err>>>>>>>", err.Error())
@@ -58,7 +58,7 @@ func MediumSettlementState(eg *xorm.Engine) {
if weekday == time.Monday {
_, err = eg.Where("kind = ?", 2).And("start_date != ?", today).Update(&model2.MediumSettlement{
State: 1, //结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)
EndDate: today,
EndDate: now.AddDate(0, 0, -1).Format("2006-01-02"),
})
if err != nil {
fmt.Println("err>>>>>>>", err.Error())
@@ -70,7 +70,7 @@ func MediumSettlementState(eg *xorm.Engine) {
if now.Day() == 1 {
_, err = eg.Where("kind = ?", 3).And("start_date != ?", today).Update(&model2.MediumSettlement{
State: 1, //结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)
EndDate: today,
EndDate: now.AddDate(0, 0, -1).Format("2006-01-02"),
})
if err != nil {
fmt.Println("err>>>>>>>", err.Error())


Laden…
Abbrechen
Speichern