Index: ssts-web/src/test/java/test/forgon/disinfectsystem/application/TestRecyclingApplication.java =================================================================== diff -u -r14101 -r14491 --- ssts-web/src/test/java/test/forgon/disinfectsystem/application/TestRecyclingApplication.java (.../TestRecyclingApplication.java) (revision 14101) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/application/TestRecyclingApplication.java (.../TestRecyclingApplication.java) (revision 14491) @@ -1447,7 +1447,7 @@ recyclingApplicationManager.saveRecyclingApplication(application, newTousseItemVoList, true); } catch (RecyclingRecordException e){ - msg = e.getMsg(); + msg = e.getMessage(); } assertNull(msg); items = application.getApplicationItems(); @@ -1471,7 +1471,7 @@ recyclingApplicationManager.saveRecyclingApplication(application, newTousseItemVoList, true); } catch (RecyclingRecordException e){ - msg = e.getMsg(); + msg = e.getMessage(); } assertNull(msg); @@ -1531,7 +1531,7 @@ recyclingApplicationManager.saveRecyclingApplication(application, newTousseItemVoList, true); } catch (RecyclingRecordException e){ - msg = e.getMsg(); + msg = e.getMessage(); } assertNull(msg); @@ -1556,7 +1556,7 @@ recyclingApplicationManager.saveRecyclingApplication(application, newTousseItemVoList, true); } catch (RecyclingRecordException e){ - msg = e.getMsg(); + msg = e.getMessage(); } assertNull(msg); Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java =================================================================== diff -u -r14407 -r14491 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 14407) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 14491) @@ -62,6 +62,7 @@ import com.forgon.disinfectsystem.entity.recyclingerror.RecyclingError; import com.forgon.disinfectsystem.entity.recyclingrecord.RecyclingRecord; import com.forgon.disinfectsystem.entity.tousseitem.TousseItem; +import com.forgon.disinfectsystem.exception.RecyclingRecordException; import com.forgon.disinfectsystem.idcarddefinition.service.IDCardDefinitionManager; import com.forgon.disinfectsystem.idcardinstance.util.IDCardInstanceUtils; import com.forgon.disinfectsystem.recyclingapplication.service.InvoicePlanManager; @@ -439,15 +440,15 @@ recyclingRecord.setRecyclingUser(recyclingRecord .getOperator()); } - System.out.println(params.toString()); +// System.out.println(params.toString()); // 一条回收记录只能有一个对应的回收申请单/器械包申请单 if (recyclingRecord.getId() == null && application != null && application.getRecyclingRecord(objectDao) != null) { message = "当前申请单已回收,不能重复回收!"; }else{ try { recyclingRecordManager.saveOrUpdate(recyclingRecord,params); - } catch (Exception e) { + } catch (Exception e){ success = false; message = e.getMessage(); } @@ -714,6 +715,7 @@ List recyclingApplications = null; boolean isOneLevelSupply = false; boolean isTousseNeedMaintain = false; + boolean isIDCardInstance = false; String errorMessage = null; Long idCardUseAmount = null; if (StringUtils.isNotBlank(barcode)) { @@ -775,6 +777,7 @@ user = (User) barcodeDevice; } else if (barcodeDevice instanceof IDCardInstance) { IDCardInstance idCardInstance = (IDCardInstance) barcodeDevice; + isIDCardInstance = true; // 是否已经废弃 try { if (!idCardInstance.isCanUse(objectDao, true)) { @@ -880,6 +883,7 @@ map.put("application", recyclingApplications); map.put("errorMessage", errorMessage); map.put("idCardUseAmount", idCardUseAmount); + map.put("isIDCardInstance", isIDCardInstance); map.put("isTousseNeedMaintain", isTousseNeedMaintain); try { JSONObject jsonObject = JSONObject.fromObject(map, config); Index: ssts-web/src/test/java/test/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerTests.java =================================================================== diff -u -r14407 -r14491 --- ssts-web/src/test/java/test/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerTests.java (.../RecyclingRecordManagerTests.java) (revision 14407) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerTests.java (.../RecyclingRecordManagerTests.java) (revision 14491) @@ -265,7 +265,7 @@ try { recyclingRecordManager.saveOrUpdate(recyclingRecord, params3); } catch (RecyclingRecordException e) { - msg = e.getMsg(); + msg = e.getMessage(); } objectDao.flush(); assertEquals("Test开口包已发货,不能保存。", msg); Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/exception/RecyclingRecordException.java =================================================================== diff -u -r12331 -r14491 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/exception/RecyclingRecordException.java (.../RecyclingRecordException.java) (revision 12331) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/exception/RecyclingRecordException.java (.../RecyclingRecordException.java) (revision 14491) @@ -11,22 +11,12 @@ private static final long serialVersionUID = -5357808966535311231L; - private String msg; - public RecyclingRecordException() { System.out.println("自定义异常"); } public RecyclingRecordException(String msg) { - this.msg = msg; + super(msg); } - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - } Index: ssts-web/src/main/java/com/forgon/disinfectsystem/borrowrecord/action/BorrowRecordAction.java =================================================================== diff -u -r14346 -r14491 --- ssts-web/src/main/java/com/forgon/disinfectsystem/borrowrecord/action/BorrowRecordAction.java (.../BorrowRecordAction.java) (revision 14346) +++ ssts-web/src/main/java/com/forgon/disinfectsystem/borrowrecord/action/BorrowRecordAction.java (.../BorrowRecordAction.java) (revision 14491) @@ -100,7 +100,7 @@ try { message = borrowRecordManager.saveOrUpdate(borrowRecord, items); } catch (RecyclingRecordException e1) { - message = e1.getMsg(); + message = e1.getMessage(); } StrutsResponseUtils.output(JSONUtil.buildJsonObject(true, message)); Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js =================================================================== diff -u -r14442 -r14491 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 14442) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 14491) @@ -826,25 +826,38 @@ addBasketElement(msg); } }else if(msg.tousseInstance != null){ - if(msg.tousseInstance.tousseFixedBarcode == true && msg.tousseInstance.unTraceableTousse == true){ - var ti = msg.tousseInstance; + if(!msg.isIDCardInstance){ + + var ti = msg.tousseInstance; var td = ti.tousseDefinition; - var toussItem = { - row: $("#tousseItemTable tbody tr").length, - tousseItemId: '', - tousseName: td.name, - tousseDefinitionID: td.id, - applicationAmount: 0, - recycleAmount: 1, - loadedAmount: 0, - isCleanedEntirely: td.isCleanedEntirely, - tousseType: td.tousseType, - isThereIdentificationCard: '否', - isApplyEntireTousse: td.isApplyEntireTousse, - urgentAmount : 0 - }; - addToussItem(toussItem); - }else{ + + var isExist = false; + $('#tousseItemTable').children().first().children().each(function(i,element){ + if($('#tousseName'+i).val() == td.name && $('#deleted'+i).val() == '0'){ + $('#recycleAmount'+i).val(parseInt($('#recycleAmount'+i).val()) + 1); + isExist = true; + } + }); + + if(!isExist){ + var toussItem = { + row: $("#tousseItemTable tbody tr").length, + tousseItemId: '', + tousseName: td.name, + tousseDefinitionID: td.id, + applicationAmount: 0, + recycleAmount: 1, + loadedAmount: 0, + isCleanedEntirely: td.isCleanedEntirely, + tousseType: td.tousseType, + isThereIdentificationCard: '否', + isApplyEntireTousse: td.isApplyEntireTousse, + urgentAmount : 0 + }; + addToussItem(toussItem); + } + }else{ + if($('#depart').attr('value') == ''){ $('#depart').val(msg.tousseInstance.locationForDisplay) $('#departCode').val(msg.tousseInstance.location) @@ -1006,8 +1019,7 @@ }); } } - } - + } checkLoadedAmount(); }else if(msg.user != null){ userNameByBarcode = msg.user.fullName; Index: ssts-web/src/test/java/test/forgon/disinfectsystem/packing/PackingTaskTests.java =================================================================== diff -u -r14108 -r14491 --- ssts-web/src/test/java/test/forgon/disinfectsystem/packing/PackingTaskTests.java (.../PackingTaskTests.java) (revision 14108) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/packing/PackingTaskTests.java (.../PackingTaskTests.java) (revision 14491) @@ -221,7 +221,7 @@ try { recyclingRecordManager.saveOrUpdate(record, params3); } catch (RecyclingRecordException e) { - msg3 = e.getMsg(); + msg3 = e.getMessage(); } PackingTask task3 = packingManager.getUnfinishedTask(record.getId(), "019000001", td_Test开胸包.getId(), PackingTask.TASK_RECYCLINGRECORD); @@ -281,7 +281,7 @@ recyclingApplicationManager.saveRecyclingApplication(application, applyItemVos2, true); } catch (RecyclingRecordException e) { - msg = e.getMsg(); + msg = e.getMessage(); } AssertJUnit.assertEquals("Test治疗巾已经装配,不能修改申请单。", msg); Index: ssts-web/src/test/java/test/forgon/disinfectsystem/recyclingrecord/service/DeleteRecyclingRecordItemTests.java =================================================================== diff -u -r14107 -r14491 --- ssts-web/src/test/java/test/forgon/disinfectsystem/recyclingrecord/service/DeleteRecyclingRecordItemTests.java (.../DeleteRecyclingRecordItemTests.java) (revision 14107) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/recyclingrecord/service/DeleteRecyclingRecordItemTests.java (.../DeleteRecyclingRecordItemTests.java) (revision 14491) @@ -305,7 +305,7 @@ try { recyclingRecordManager.saveOrUpdate(recyclingRecord, params2); }catch (RecyclingRecordException e) { - msg = e.getMsg(); + msg = e.getMessage(); } assertEquals("Test开胸包已装配,不能修改!", msg); } Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/RecyclingApplicationAction.java =================================================================== diff -u -r14423 -r14491 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/RecyclingApplicationAction.java (.../RecyclingApplicationAction.java) (revision 14423) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/RecyclingApplicationAction.java (.../RecyclingApplicationAction.java) (revision 14491) @@ -357,7 +357,7 @@ } } catch(RecyclingRecordException e){ - message = e.getMsg(); + message = e.getMessage(); } outPrint(response, message);