Index: ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseInstanceManagerImpl.java =================================================================== diff -u -r37503 -r37510 --- ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseInstanceManagerImpl.java (.../TousseInstanceManagerImpl.java) (revision 37503) +++ ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseInstanceManagerImpl.java (.../TousseInstanceManagerImpl.java) (revision 37510) @@ -5027,6 +5027,7 @@ tousseOperation.setTousseInstanceId(tousseInstance.getId()); tousseOperation.setReturnByTousseOperationId(lastTousseOperation.getId()); + tousseOperation.setRemark(tousseOperationVo.getRemark()); objectDao.saveOrUpdate(tousseOperation); lastTousseOperation.setReturnTousseOperationId(tousseOperation.getId()); @@ -5204,6 +5205,7 @@ //设置“后续操作的预计时间”GDSRMYY-578 setNextOperationLimitTime(tousseOperation, supplyRoomConfig); tousseOperation.setTousseOperationRecordId(tousseOperationVo.getTousseOperationRecordId()); + tousseOperation.setRemark(tousseOperationVo.getRemark()); //src if(StringUtils.isBlank(tousseInstance.getStatus2())){ // 第一次流转 @@ -5315,7 +5317,7 @@ } //保存签收的流转记录,并修改包实例的流转信息 - TousseOperation tousseOperation = tousseOperationSign_internal(tousseInstance, tousseOperationVo.getOperator(), destDepart, destDepartCoding, destLocation, destLocationType, destOperationRoomId, destWareHouseId, tousseOperationVo.getOperationTime(), null, TousseOperation.OPERATION_TYPE_MANUAL); + TousseOperation tousseOperation = tousseOperationSign_internal(tousseInstance, tousseOperationVo.getOperator(), destDepart, destDepartCoding, destLocation, destLocationType, destOperationRoomId, destWareHouseId, tousseOperationVo.getOperationTime(), tousseOperationVo.getRemark(), TousseOperation.OPERATION_TYPE_MANUAL); tousseOperation.setTousseOperationRecordId(tousseOperationVo.getTousseOperationRecordId()); //设置“后续操作的预计时间”GDSRMYY-578 setNextOperationLimitTime(tousseOperation, supplyRoomConfig); @@ -5406,6 +5408,7 @@ tousseOperationVo.setRecipient(JSONUtil.optString(params, "recipient", "")); tousseOperationVo.setOperation(JSONUtil.optString(params, "operation", TousseOperation.OPERATION_INVOICE)); tousseOperationVo.setOperationTime(new Date()); + tousseOperationVo.setRemark(JSONUtil.optString(params, "remark", null)); Long destId = JSONUtil.optLong(params, "destId", null); if (tousseOperationVo.operationInvoice() && StringUtils.isBlank(tousseOperationVo.getDestLocationType())) { @@ -11011,6 +11014,7 @@ tousseOperationRecord.setOperation(tousseOperationVo.getOperation()); tousseOperationRecord.setOperationTime(tousseOperationVo.getOperationTime()); tousseOperationRecord.setOperator(tousseOperationVo.getOperator()); + tousseOperationRecord.setRemark(tousseOperationVo.getRemark()); objectDao.saveOrUpdate(tousseOperationRecord); return tousseOperationRecord; } @@ -13707,16 +13711,20 @@ if(!DatabaseUtil.isPoIdValid(recordId)){ return null; } - + Map tousseOperationRecordDetailVoMap = new HashMap(); List detailList = new ArrayList(); String sql = String.format("select bd.barcode, ti.tousseName, ope.destLocation, ope.operator " + + ", lastOpe.destLocation lastDestLocation, lastOpe.operator lastOperator " + "from %s ope " + "join %s ti on ti.id = ope.tousseInstanceId " + "join %s bd on bd.id = ti.id " - + "where ope.tousseOperationRecordId = %s ", + + "left join %s lastOpe on lastOpe.tousseInstanceId = ti.id and lastOpe.id > ope.id " + + "where ope.tousseOperationRecordId = %s " + + "order by ope.id, lastOpe.id ", TousseOperation.class.getSimpleName(), TousseInstance.class.getSimpleName(), BarcodeDevice.class.getSimpleName(), + TousseOperation.class.getSimpleName(), recordId); ResultSet rs = null; try { @@ -13727,12 +13735,24 @@ String destLocation = rs.getString("destLocation"); String operator = rs.getString("operator"); - TousseOperationRecordDetailVo detailVo = new TousseOperationRecordDetailVo(); + String lastDestLocation = rs.getString("lastDestLocation"); + String lastOperator = rs.getString("lastOperator"); + + TousseOperationRecordDetailVo detailVo = tousseOperationRecordDetailVoMap.get(barcode); + if(detailVo == null){ + detailVo = new TousseOperationRecordDetailVo(); + detailList.add(detailVo); + } detailVo.setBarcode(barcode); detailVo.setTousseName(tousseName); detailVo.setDestLocation(destLocation); detailVo.setOperator(operator); - detailList.add(detailVo); + if(StringUtils.isNotBlank(lastDestLocation) + && StringUtils.isNotBlank(lastOperator)){ + detailVo.setDestLocation(lastDestLocation); + detailVo.setOperator(lastOperator); + } + tousseOperationRecordDetailVoMap.put(barcode, detailVo); } } catch (Exception e) { e.printStackTrace();