|
|
@@ -1,14 +1,15 @@
|
|
|
package lims
|
|
|
|
|
|
import (
|
|
|
-"dashoo.cn/business2/userRole"
|
|
|
-"dashoo.cn/backend/api/business/baseUser"
|
|
|
-"dashoo.cn/backend/api/business/limsreportelecpumpwell"
|
|
|
-. "dashoo.cn/backend/api/controllers"
|
|
|
-"dashoo.cn/utils"
|
|
|
-"encoding/json"
|
|
|
-"strings"
|
|
|
-"time"
|
|
|
+ "dashoo.cn/backend/api/business/baseUser"
|
|
|
+ svccustomer "dashoo.cn/backend/api/business/customer"
|
|
|
+ "dashoo.cn/backend/api/business/limsreportelecpumpwell"
|
|
|
+ . "dashoo.cn/backend/api/controllers"
|
|
|
+ "dashoo.cn/business2/userRole"
|
|
|
+ "dashoo.cn/utils"
|
|
|
+ "encoding/json"
|
|
|
+ "strings"
|
|
|
+ "time"
|
|
|
)
|
|
|
|
|
|
type LimsReportElecPumpWellController struct {
|
|
|
@@ -85,232 +86,186 @@ func (this *LimsReportElecPumpWellController) GetEntityList() {
|
|
|
where = where + " and Id like '%" + Id + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if EId != "" {
|
|
|
where = where + " and EId like '%" + EId + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if TaskBalanceId != "" {
|
|
|
where = where + " and TaskBalanceId like '%" + TaskBalanceId + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if DataEntryId != "" {
|
|
|
where = where + " and DataEntryId like '%" + DataEntryId + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if TestDepartId != "" {
|
|
|
where = where + " and TestDepartId like '%" + TestDepartId + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if PositionCheckId != "" {
|
|
|
where = where + " and PositionCheckId like '%" + PositionCheckId + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if TestDepart != "" {
|
|
|
where = where + " and TestDepart like '%" + TestDepart + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if PositionCheck != "" {
|
|
|
where = where + " and PositionCheck like '%" + PositionCheck + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if WellNumber != "" {
|
|
|
where = where + " and WellNumber like '%" + WellNumber + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if CheckDate != "" {
|
|
|
where = where + " and CheckDate like '%" + CheckDate + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if PumpModel != "" {
|
|
|
where = where + " and PumpModel like '%" + PumpModel + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if RatedPower != "" {
|
|
|
where = where + " and RatedPower like '%" + RatedPower + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if RatedDischarge != "" {
|
|
|
where = where + " and RatedDischarge like '%" + RatedDischarge + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if RatedLift != "" {
|
|
|
where = where + " and RatedLift like '%" + RatedLift + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if RatedVoltage != "" {
|
|
|
where = where + " and RatedVoltage like '%" + RatedVoltage + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if RatedCurrent != "" {
|
|
|
where = where + " and RatedCurrent like '%" + RatedCurrent + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if PumpDepth != "" {
|
|
|
where = where + " and PumpDepth like '%" + PumpDepth + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if Manufacturer != "" {
|
|
|
where = where + " and Manufacturer like '%" + Manufacturer + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if AvgVoltage != "" {
|
|
|
where = where + " and AvgVoltage like '%" + AvgVoltage + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if AvgCurrent != "" {
|
|
|
where = where + " and AvgCurrent like '%" + AvgCurrent + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if AvgActivePower != "" {
|
|
|
where = where + " and AvgActivePower like '%" + AvgActivePower + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if AvgReactivePower != "" {
|
|
|
where = where + " and AvgReactivePower like '%" + AvgReactivePower + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if AvgPowerFactor != "" {
|
|
|
where = where + " and AvgPowerFactor like '%" + AvgPowerFactor + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if BackPressure != "" {
|
|
|
where = where + " and BackPressure like '%" + BackPressure + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if OilPressure != "" {
|
|
|
where = where + " and OilPressure like '%" + OilPressure + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if CasingPressure != "" {
|
|
|
where = where + " and CasingPressure like '%" + CasingPressure + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if ProducedFluidVolume != "" {
|
|
|
where = where + " and ProducedFluidVolume like '%" + ProducedFluidVolume + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if WaterContent != "" {
|
|
|
where = where + " and WaterContent like '%" + WaterContent + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if CrudeOilDensity != "" {
|
|
|
where = where + " and CrudeOilDensity like '%" + CrudeOilDensity + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if WorkingFluidLevel != "" {
|
|
|
where = where + " and WorkingFluidLevel like '%" + WorkingFluidLevel + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if SuctionDepth != "" {
|
|
|
where = where + " and SuctionDepth like '%" + SuctionDepth + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if StraightOrslope != "" {
|
|
|
where = where + " and StraightOrslope like '%" + StraightOrslope + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if OilFieldType != "" {
|
|
|
where = where + " and OilFieldType like '%" + OilFieldType + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if Standard != "" {
|
|
|
where = where + " and Standard like '%" + Standard + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if MonitoringInstrument != "" {
|
|
|
where = where + " and MonitoringInstrument like '%" + MonitoringInstrument + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if Temperature != "" {
|
|
|
where = where + " and Temperature like '%" + Temperature + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if Humidity != "" {
|
|
|
where = where + " and Humidity like '%" + Humidity + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if BeforeCheck != "" {
|
|
|
where = where + " and BeforeCheck like '%" + BeforeCheck + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if AfterCheck != "" {
|
|
|
where = where + " and AfterCheck like '%" + AfterCheck + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if Remark != "" {
|
|
|
where = where + " and Remark like '%" + Remark + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if CreateUserId != "" {
|
|
|
where = where + " and CreateUserId like '%" + CreateUserId + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if CreateOn != "" {
|
|
|
where = where + " and CreateOn like '%" + CreateOn + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if CreateBy != "" {
|
|
|
where = where + " and CreateBy like '%" + CreateBy + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if ModifiedOn != "" {
|
|
|
where = where + " and ModifiedOn like '%" + ModifiedOn + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if ModifiedUserId != "" {
|
|
|
where = where + " and ModifiedUserId like '%" + ModifiedUserId + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if ModifiedBy != "" {
|
|
|
where = where + " and ModifiedBy like '%" + ModifiedBy + "%'"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if CreateOn != "" {
|
|
|
dates := strings.Split(CreateOn, ",")
|
|
|
if len(dates) == 2 {
|
|
|
@@ -340,15 +295,15 @@ func (this *LimsReportElecPumpWellController) GetDictList() {
|
|
|
dictList := make(map[string]interface{})
|
|
|
//dictSvc := items.GetItemsService(utils.DBE)
|
|
|
userSvc := baseUser.GetBaseUserService(utils.DBE)
|
|
|
- //customerSvc := svccustomer.GetCustomerService(utils.DBE)
|
|
|
+ customerSvc := svccustomer.GetCustomerService(utils.DBE)
|
|
|
//dictList["WellNo"] = dictSvc.GetKeyValueItems("WellNo", this.User.AccCode)
|
|
|
var userEntity userRole.Base_User
|
|
|
userSvc.GetEntityById(this.User.Id, &userEntity)
|
|
|
dictList["Supervisers"] = userSvc.GetUserListByDepartmentId(this.User.AccCode, userEntity.Departmentid)
|
|
|
|
|
|
- //var dictCustomer []svccustomer.Customer
|
|
|
- //customerSvc.GetEntitysByWhere(this.User.AccCode + CustomerName, "", &dictCustomer)
|
|
|
- //dictList["EntrustCorp"] = &dictCustomer
|
|
|
+ var dictCustomer []svccustomer.Customer
|
|
|
+ customerSvc.GetEntitysByWhere(this.User.AccCode+CustomerName, "", &dictCustomer)
|
|
|
+ dictList["EntrustCorp"] = &dictCustomer
|
|
|
|
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = dictList
|
|
|
@@ -530,8 +485,6 @@ func (this *LimsReportElecPumpWellController) UpdateEntity() {
|
|
|
"ModifiedUserId",
|
|
|
|
|
|
"ModifiedBy",
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
err := svc.UpdateEntityBytbl(this.User.AccCode+LimsReportElecPumpWellName, id, &model, cols)
|
|
|
if err == nil {
|