|
|
@@ -24,7 +24,7 @@ func GetLimsReportScrewPumpService(xormEngine *xorm.Engine) *LimsReportScrewPump
|
|
|
/**
|
|
|
* 生成报告
|
|
|
*/
|
|
|
-func (s *LimsReportScrewPumpService) DataToExcelReport(entrustMainEntity limsentrust.LimsEntrustMain, dateentryname string, createreportname string,tablename string, seqStr string, retUrl string, entrustId string, dataentryIds string) (reportUrl string, err error) {
|
|
|
+func (s *LimsReportScrewPumpService) DataToExcelReport(entrustMainEntity limsentrust.LimsEntrustMain, dateentryname string, createreportname string,tablename string, seqStr string, seqStrJS string, retUrl string, entrustId string, dataentryIds string) (reportUrl string, err error) {
|
|
|
var reportList []LimsReportScrewPump
|
|
|
s.GetEntitysByOrderbyWhere(tablename, "DataEntryId in ("+dataentryIds+")", "DataEntryId", &reportList)
|
|
|
//模板下载到服务器
|
|
|
@@ -73,21 +73,21 @@ func (s *LimsReportScrewPumpService) DataToExcelReport(entrustMainEntity limsent
|
|
|
datamap["po"] = po
|
|
|
datamap["pt"] = pt
|
|
|
datamap["q"] = q
|
|
|
- datamap["pdr"] = pdr
|
|
|
+ datamap["pdr1"] = pdr
|
|
|
datamap["cosphi"] = cosphi
|
|
|
- datamap["lb"] = lb
|
|
|
+ datamap["lb1"] = lb
|
|
|
datamap["h"] = cosphi
|
|
|
datamap["etaxt"] = etaxt
|
|
|
|
|
|
if (etaxt >= limitval1) {
|
|
|
- datamap["result1"] = "合格"
|
|
|
+ datamap["res1"] = "合格"
|
|
|
} else {
|
|
|
- datamap["result1"] = "不合格"
|
|
|
+ datamap["res1"] = "不合格"
|
|
|
}
|
|
|
if (cosphi >= limitval2) {
|
|
|
- datamap["result2"] = "合格"
|
|
|
+ datamap["res2"] = "合格"
|
|
|
} else {
|
|
|
- datamap["result2"] = "不合格"
|
|
|
+ datamap["res2"] = "不合格"
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -96,12 +96,16 @@ func (s *LimsReportScrewPumpService) DataToExcelReport(entrustMainEntity limsent
|
|
|
datamap["jcnum"] = reportList[0].CreateOn.Format("2006-01-02")
|
|
|
datamap["jcdate"] = reportList[0].CreateOn.Format("2006年01月02日")
|
|
|
datamap["spec"] = reportList[0].PumpModel
|
|
|
- //datamap["number"] = reportList[0].DeviceName
|
|
|
+ datamap["number"] = reportList[0].PumpModel
|
|
|
datamap["place"] = reportList[0].PositionCheck
|
|
|
datamap["instr"] = reportList[0].MonitoringInstrument
|
|
|
- datamap["evalva1"] = 35
|
|
|
- datamap["limitval1"] = limitval1
|
|
|
- datamap["limitval2"] = limitval2
|
|
|
+ //datamap["evalva1"] = 35
|
|
|
+ //datamap["limitval1"] = limitval1
|
|
|
+ //datamap["limitval2"] = limitval2
|
|
|
+
|
|
|
+ datamap["seqStrJS"] = seqStrJS
|
|
|
+ datamap["djqe"] = reportList[0].MotorRatedPower
|
|
|
+
|
|
|
reportUrl = svcActiviti.FillWordTemplate(datamap, templateUrl, fileName)
|
|
|
|
|
|
return reportUrl, err
|