Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/dataindex/DataIndex.java =================================================================== diff -u -r37710 -r38126 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/dataindex/DataIndex.java (.../DataIndex.java) (revision 37710) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/dataindex/DataIndex.java (.../DataIndex.java) (revision 38126) @@ -366,7 +366,7 @@ case "清洗数量": - String selectUserNameSql = ",case when (cb.personInCharge is null or cb.personInCharge = '') then wr.operator else cb.personInCharge end userName "; + String selectUserNameSql = ",case when (wr.washPersonInCharge is null or wr.washPersonInCharge = '') then wr.operator else wr.washPersonInCharge end userName "; String selectTousseTypeSql = ",td.tousseType tousseType "; String selectTousseNameSql = ",ci.tousseNameForMaterial tousseName "; String amountSelectSql = null; @@ -492,7 +492,7 @@ + "%s %s ", getDatePeriodSelectSql(obj.monthlyStr), getAmountSelectSql(obj, "wrm.amount"), - obj.selectUserName ? ",wr.operator userName " : "", + obj.selectUserName ? ",case when (wr.washPersonInCharge is null or wr.washPersonInCharge = '') then wr.operator else wr.washPersonInCharge end userName " : "", obj.selectTousseType ? ",'材料' tousseType " : "", obj.selectTousseName ? ",md.name tousseName " : "", obj.extraSelectColumns, @@ -1472,7 +1472,7 @@ + "and ci.itemType = '材料' " + "and wdr.endDate %s %s %s and %s %s %s and wdr.washMaterialAmount <> 0 %s %s %s %s %s %s ", obj.queryIntegral?",sum(ci.tousseAmountForMaterial*(case when tdc.integral is null then 1 else tdc.integral end)) integral":"", - obj.selectUserName?",case when (min(cb.personInCharge) is null or min(cb.personInCharge) = '') then min(wdr.operator) else min(cb.personInCharge) end userName":"", + obj.selectUserName?", case when (min(wdr.washPersonInCharge) is null or min(wdr.washPersonInCharge) = '' ) then min(wdr.operator) else min(wdr.washPersonInCharge) end userName":"", obj.selectTousseType ? ",min(td.tousseType) tousseType" : "", obj.selectTousseName ? ",min(td.name) tousseName" : "", obj.extraSelectColumns, @@ -1497,7 +1497,7 @@ + "and wdr.endDate %s %s %s and %s %s %s and ci.itemtype != '材料' and wdr.washMaterialAmount <> 0 %s %s %s %s %s %s ", sum, obj.queryIntegral?",(ci.amount-case when numOfUnwashedStops is null then 0 else numOfUnwashedStops end)*(case when tdc.integral is null then 1 else tdc.integral end) integral":"", - obj.selectUserName?",case when (cb.personInCharge is null or cb.personInCharge = '') then wdr.operator else cb.personInCharge end userName":"", + obj.selectUserName?", case when (wdr.washPersonInCharge is null or wdr.washPersonInCharge = '') then wdr.operator else wdr.washPersonInCharge end userName":"", obj.selectTousseType ? ",ci.itemType tousseType" : "", obj.selectTousseName ? ",td.name tousseName" : "", obj.extraSelectColumns,