2
3
Quellcode durchsuchen

后:上报情况取旅行中和履行完毕的数据

dubch vor 4 Jahren
Ursprung
Commit
d8b1126a22

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

@@ -36,7 +36,7 @@ func (s *OilContractService) GetHandOnStatisticsList(queryParam HandOnStatistics
 		" FROM OilContract a " +
 		" LEFT JOIN OilContractReview b ON a.Id = b.ContractId " +
 		" LEFT JOIN Base_Organize c on SecondUnit = c.Id"
-	sql += " WHERE a.ImportStatus > 0 and a.Status = 2 "
+	sql += " WHERE a.ImportStatus > 0 and a.Status in (2,3) "
 	if queryParam.YearNum > 0 {
 		sql += " AND " + strconv.Itoa(queryParam.YearNum) + " BETWEEN YEAR(a.StartDate) AND YEAR(a.EndDate)"
 	}

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

@@ -1849,7 +1849,7 @@ func (this *OilContractController) YearList() {
 func (this *OilContractController) GetNeedEvaList() {
 	var list []contract.OilContract
 	// TODO 加年度
-	sql := ` select a.* from OilContract a left join OilContractReview b on b.ContractId=a.Id where a.ImportStatus > 0 and a.Status = 2 and a.SecondUnit=` + strconv.Itoa(this.User.UnitId) + ` and (b.Status < 0 or b.Status is NULL)  `
+	sql := ` select a.* from OilContract a left join OilContractReview b on b.ContractId=a.Id where a.ImportStatus > 0 and a.Status in (2,3) and a.SecondUnit=` + strconv.Itoa(this.User.UnitId) + ` and (b.Status < 0 or b.Status is NULL)  `
 	utils.DBE.Sql(sql).Find(&list)
 
 	var dataInfo DataInfo