|
|
@@ -148,6 +148,7 @@ func (this *OilContractSumScoreController) GetComputeEntityList() {
|
|
|
asc := false
|
|
|
Order := this.GetString("Order")
|
|
|
Prop := this.GetString("Prop")
|
|
|
+ Year := this.GetString("Year", "")
|
|
|
if Order != "" && Prop != "" {
|
|
|
orderby = Prop
|
|
|
if Order == "asc" {
|
|
|
@@ -189,10 +190,15 @@ func (this *OilContractSumScoreController) GetComputeEntityList() {
|
|
|
having = "ROUND(sum(case when items.ParentId = 0 AND items.Type = 1 then items.Score else 0 end)/sum(case when items.SequenceNo in ('1') AND items.Type = 1 then 1 else 0 end),2) < " + pass + " "
|
|
|
}
|
|
|
// 今年的汇总
|
|
|
- year := strconv.Itoa(time.Now().Year())
|
|
|
+ year := ""
|
|
|
+ if Year != "" {
|
|
|
+ year = Year
|
|
|
+ } else {
|
|
|
+ year = strconv.Itoa(time.Now().Year())
|
|
|
+ }
|
|
|
month := "01"
|
|
|
day := "01"
|
|
|
- where = where + " and review.CreateOn>='" + year + "-" + month + "-" + day + "' "
|
|
|
+ where = where + " and review.CreateOn>='" + year + "-" + month + "-" + day + "' and review.CreateOn <= '" + year + "-12-31 23:59:59' "
|
|
|
|
|
|
//if CreateOn != "" {
|
|
|
// dates := strings.Split(CreateOn, ",")
|
|
|
@@ -225,16 +231,22 @@ func (this *OilContractSumScoreController) GetComputeEntityList() {
|
|
|
func (this *OilContractSumScoreController) GetComputeEntity() {
|
|
|
Id := this.Ctx.Input.Param(":id")
|
|
|
ContractClass := this.GetString("ContractClass", "01")
|
|
|
+ Year := this.GetString("Year", "")
|
|
|
where := " contract.SupplierId = " + Id
|
|
|
where = where + " and review.Status='8' "
|
|
|
if ContractClass != "" {
|
|
|
where = where + " and contract.ContractClass = '" + ContractClass + "'"
|
|
|
}
|
|
|
// 今年的汇总
|
|
|
- year := strconv.Itoa(time.Now().Year())
|
|
|
+ year := ""
|
|
|
+ if Year != "" {
|
|
|
+ year = Year
|
|
|
+ } else {
|
|
|
+ year = strconv.Itoa(time.Now().Year())
|
|
|
+ }
|
|
|
month := "01"
|
|
|
day := "01"
|
|
|
- where = where + " and review.CreateOn>='" + year + "-" + month + "-" + day + "' "
|
|
|
+ where = where + " and review.CreateOn>='" + year + "-" + month + "-" + day + "' and review.CreateOn <= '" + year + "-12-31 23:59:59' "
|
|
|
svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
|
|
|
var entity contractSumScore.OilContractComputeSumScoreVo
|
|
|
entity = svc.GetComputeEntityBytbl(where)
|