| | |
| | | private InoutReportManager inoutReportManager; |
| | | @Resource |
| | | private InoutManager inoutManager; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // ${dorado.getDataProvider("inoutDataPR#triggerRecordStatus1").getResult()} |
| | | @DataProvider |
| | | public List<DicTrigger> triggerRecordStatus1() { |
| | | List<DicTrigger> list = new ArrayList<DicTrigger>(); |
| | | list.add(new DicTrigger(InoutConstant.RECORD_STATUS_DEL, "作废单")); |
| | | list.add(new DicTrigger(InoutConstant.RECORD_STATUS_NORMAL, "正常单")); |
| | | return list; |
| | | } |
| | | |
| | | // ${dorado.getDataProvider("inoutDataPR#triggerResult").getResult()} |
| | | @DataProvider |
| | | public List<DicTrigger> triggerResult() { |
| | | List<DicTrigger> list = new ArrayList<DicTrigger>(); |
| | | list.add(new DicTrigger(InoutConstant.RESULT_1, "合格")); |
| | | list.add(new DicTrigger(InoutConstant.RESULT_0, "不合格")); |
| | | return list; |
| | | } |
| | | |
| | | // ${dorado.getDataProvider("inoutDataPR#triggerSampleType").getResult()} |
| | | @DataProvider |
| | | public List<DicTrigger> triggerSampleType() { |
| | | List<DicTrigger> list = new ArrayList<DicTrigger>(); |
| | | list.add(new DicTrigger(InoutConstant.SAMPLE_TYPE_MANUAL, "人工")); |
| | | list.add(new DicTrigger(InoutConstant.SAMPLE_TYPE_AUTOMATIC, "自动")); |
| | | list.add(new DicTrigger(InoutConstant.SAMPLE_TYPE_RANDOM, "智能随机")); |
| | | return list; |
| | | } |
| | | |
| | |
| | | */ |
| | | @DataResolver |
| | | public String saveInoutData(InoutData data) throws Exception { |
| | | |
| | | //将DoradoEntity 转换为普通Entity |
| | | InoutData newData = new InoutData(); |
| | | BeanUtils.copyProperties(data,newData); |
| | | |
| | | if (StringUtils.isEmpty(newData.getId())) { |
| | | return inoutManager.addInoutData(newData); |
| | | if (StringUtils.isEmpty(data.getId())) { |
| | | return inoutManager.addInoutData(data); |
| | | } else { |
| | | return inoutManager.updateInoutData(newData); |
| | | return inoutManager.updateInoutData(data); |
| | | } |
| | | } |
| | | |