Index: forgon-core/src/main/java/com/forgon/workflow/action/WorkFlowAction.java =================================================================== diff -u -r22243 -r22282 --- forgon-core/src/main/java/com/forgon/workflow/action/WorkFlowAction.java (.../WorkFlowAction.java) (revision 22243) +++ forgon-core/src/main/java/com/forgon/workflow/action/WorkFlowAction.java (.../WorkFlowAction.java) (revision 22282) @@ -13,6 +13,7 @@ import net.sf.json.JSONArray; import net.sf.json.JSONObject; +import net.sf.json.util.JSONUtils; import org.apache.commons.lang.StringUtils; import org.apache.struts2.convention.annotation.Action; @@ -91,6 +92,26 @@ } /** + * 搜索某种单类型的第一个审批节点的处理人(目前没调用,先放着别删). + */ + public void searchFirstNodeDefinitionHandler(){ + String formType = StrutsParamUtils.getPraramValue("formType", ""); + JSONObject result = new JSONObject(); + try { + if(StringUtils.isNotBlank(formType)){ + JSONArray data = workFlowManager.getAllUserByformType(formType); + if (data != null) { + result.put("totalCount", data.size()); + result.put("data", data); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + StrutsResponseUtils.output(result); + } + + /** * 判断当前流程是否被申请单使用 * @param nodeDefinitionName 节点名字 * @param id 流程id Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/expensivegoodsapplication/service/ExpensiveGoodsApplicationManagerImpl.java =================================================================== diff -u -r22243 -r22282 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/expensivegoodsapplication/service/ExpensiveGoodsApplicationManagerImpl.java (.../ExpensiveGoodsApplicationManagerImpl.java) (revision 22243) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/expensivegoodsapplication/service/ExpensiveGoodsApplicationManagerImpl.java (.../ExpensiveGoodsApplicationManagerImpl.java) (revision 22282) @@ -175,8 +175,9 @@ /** * 通过申请单创建代办任务(适合申请单提交完成创建此单的第一条待审批任务). - * @param invoicePlan 申请单对象 - * @param invoicePlan 审批节点对象 + * @param invoicePlan 申请单对象 + * @param nodeDefinition 审批节点对象 + * @param userID 指定的第一个节点执行人 */ private void createWorkFlowApprovalTask(InvoicePlan invoicePlan, NodeDefinition nodeDefinition, Long userID) { if (nodeDefinition != null) { Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/vo/ReturnGoodVo.java =================================================================== diff -u -r18645 -r22282 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/vo/ReturnGoodVo.java (.../ReturnGoodVo.java) (revision 18645) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/vo/ReturnGoodVo.java (.../ReturnGoodVo.java) (revision 22282) @@ -42,6 +42,10 @@ // this.actualAllReturnTousses = actualAllReturnTousses; // } + /** + * 叠加实际归还的物品. + * @param actualReturnTousses 此次叠加的物品 + */ public void addActualReturnTousses(Map actualReturnTousses){ if(MapUtils.isNotEmpty(actualReturnTousses)){ actualAllReturnTousses.putAll(actualReturnTousses); Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/expensiveGoodsApplication/expensiveGoodsApplicationForm.js =================================================================== diff -u -r22243 -r22282 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/expensiveGoodsApplication/expensiveGoodsApplicationForm.js (.../expensiveGoodsApplicationForm.js) (revision 22243) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/expensiveGoodsApplication/expensiveGoodsApplicationForm.js (.../expensiveGoodsApplicationForm.js) (revision 22282) @@ -7,26 +7,6 @@ var chooseNextOneWindowObj = null; /** - * 结算科室的store - */ -var settleAccountsDepartmentStore = new Ext4.data.Store({ - autoLoad: true, //先加载一下 - proxy : { - type : 'ajax', - url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getSettleAccountsDepartJson.do', - reader : { - type : 'json', - totalProperty : 'totalCount', - root : 'data' - } - }, - fields : [ - {name : 'departmentCode',mapping : 'id'}, - {name : 'departmentName',mapping : 'name'} - ] -}); - -/** * 添加或者修改高值耗材申请单. * @param id 高值耗材申请单id */ @@ -35,7 +15,6 @@ * 申请科室的store */ var applyDepartmentStore = new Ext4.data.Store({ - autoLoad: true, pageSize: 100, proxy : { type : 'ajax', @@ -53,10 +32,28 @@ }); /** + * 结算科室的store + */ + var settleAccountsDepartmentStore = new Ext4.data.Store({ + proxy : { + type : 'ajax', + url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getSettleAccountsDepartJson.do', + reader : { + type : 'json', + totalProperty : 'totalCount', + root : 'data' + } + }, + fields : [ + {name : 'departmentCode',mapping : 'id'}, + {name : 'departmentName',mapping : 'name'} + ] + }); + + /** * 处理科室的store */ var handleDepartmentStore = new Ext4.data.Store({ - autoLoad: true, //先加载一下 proxy : { type : 'ajax', url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!searchExpensiveGoodsHandleDepartment.do', @@ -752,14 +749,19 @@ success : function(form, action) { var data = action.result.data; var committedStatus = data.committedStatus; - var depart = formObj.getForm().findField('depart').getValue(); - var settleAccountsDepart = top.Ext4.getCmp('settleAccountsDepart').getValue(); - var handleDepart = top.Ext4.getCmp('handleDepart').getValue(); + var depart = data.depart; + var departCoding = data.departCoding; + var settleAccountsDepart = data.settleAccountsDepart; + var settleAccountsDepartCoding = data.settleAccountsDepartCoding; + var handleDepart = data.handleDepart; + //1、设置“申请科室”、“结算科室”、“处理科室”、“手术时间”combo的显示值 - top.Ext4.getCmp('department').setRawValue(depart); - top.Ext4.getCmp('settleAccountsDepartment').setRawValue(settleAccountsDepart); - top.Ext4.getCmp('handleDepartment').setRawValue(handleDepart); + setDepartment(applyDepartmentStore, departCoding, depart); + setSettleAccountsDepartmentByApplyDepartment(settleAccountsDepartmentStore, settleAccountsDepartCoding, settleAccountsDepart); + handleDepartmentStore.load({ + params: {spell: handleDepart} + }); var operationTime = data.operationTime; if(operationTime){ top.Ext4.getCmp("operationTime").setValue(operationTime); @@ -787,11 +789,8 @@ top.Ext4.getCmp('applicantCode').setValue(userCode); getServerTime('yyyy-MM-dd HH:mm',top.Ext4,'applicationTimeStr'); - //2、设置默认的“申请科室”、“结算科室”、“处理科室” - formObj.getForm().findField('depart').setValue(currentOrgUnitName); - formObj.getForm().findField('departCoding').setValue(dirOrgCode); - top.Ext4.getCmp('department').setRawValue(currentOrgUnitName); + setDepartment(applyDepartmentStore, dirOrgCode, currentOrgUnitName); setSettleAccountsDepartmentByApplyDepartment(settleAccountsDepartmentStore, dirOrgCode, currentOrgUnitName); handleDepartmentStore.load(); } @@ -1110,17 +1109,39 @@ /** + * 设置申请科室. + * @param applyDepartmentStore 结算科室的store + * @param departmentCode 申请科室编码 + * @param departmentName 申请科室名称 + */ +function setDepartment(applyDepartmentStore, departmentCode, departmentName) { + applyDepartmentStore.load({ + params: {spell: departmentName}, + callback: function(records, operation, success) { + if (records && records.length > 0 && records[0].data.departmentCode == departmentCode) { + top.Ext4.getCmp("depart").setValue(departmentName); //科室名称 + top.Ext4.getCmp("departCoding").setValue(departmentCode); //科室编码 + top.Ext4.getCmp('department').setValue(departmentCode); //科室的combo(主要用于显示) + } + } + }); +} + +/** * 根据申请科室设置结算科室. * @param settleAccountsDepartmentStore 结算科室的store * @param departmentCode 申请科室编码 * @param departmentName 申请科室名称 */ function setSettleAccountsDepartmentByApplyDepartment(settleAccountsDepartmentStore, departmentCode, departmentName) { - var index = settleAccountsDepartmentStore.find('departmentCode', departmentCode); - if (index != -1) { - top.Ext4.getCmp('settleAccountsDepart').setValue(departmentName); - top.Ext4.getCmp('settleAccountsDepartCoding').setValue(departmentCode); - - top.Ext4.getCmp('settleAccountsDepartment').setValue(departmentCode); - } + settleAccountsDepartmentStore.load({ + params: {spell: departmentName}, + callback: function(records, operation, success) { + if (records && records.length > 0 && records[0].data.departmentCode == departmentCode) { + top.Ext4.getCmp("settleAccountsDepart").setValue(departmentName); //科室名称 + top.Ext4.getCmp("settleAccountsDepartCoding").setValue(departmentCode); //科室编码 + top.Ext4.getCmp('settleAccountsDepartment').setValue(departmentCode); //科室的combo(主要用于显示) + } + } + }); } Index: forgon-core/src/main/java/com/forgon/workflow/service/WorkFlowManager.java =================================================================== diff -u -r22243 -r22282 --- forgon-core/src/main/java/com/forgon/workflow/service/WorkFlowManager.java (.../WorkFlowManager.java) (revision 22243) +++ forgon-core/src/main/java/com/forgon/workflow/service/WorkFlowManager.java (.../WorkFlowManager.java) (revision 22282) @@ -94,7 +94,7 @@ public JSONArray loadNodeDefinitionList(Long workFlowId); /** - * 根据工单类型获取工作流的第一个节点 + * 根据工单类型获取工作流的第一个节点的全部处理人(用户+角色),如果第一个节点是需要通知起单人,则取当前登陆用户 * @param formType 工单类型 * @return */ Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/RecyclingApplicationAction.java =================================================================== diff -u -r22241 -r22282 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/RecyclingApplicationAction.java (.../RecyclingApplicationAction.java) (revision 22241) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/RecyclingApplicationAction.java (.../RecyclingApplicationAction.java) (revision 22282) @@ -440,7 +440,11 @@ return null; } - // 取物品名称及数量 + /** + * 取物品名称及数量. + * @param vos + * @return + */ private Map convertVosToMap(Collection vos) { Map applyTousses = new HashMap<>(); for (TousseItemVo vo : vos) {