| | |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.omd.data.LinkObject; |
| | | import com.vci.server.base.persistence.dao.HibernateSessionFactory; |
| | | import com.vci.server.base.utility.LogRecordUtil; |
| | | import com.vci.server.bof.server.ServiceFacadeExecuteHelper; |
| | | import com.vci.server.bof.service.BOFactoryServices; |
| | | import com.vci.server.bof.service.LOFactoryService; |
| | |
| | | LinkObject[] createLOs = params.getCreateLos(); |
| | | LinkObject[] updateLOs = params.getUpdateLos(); |
| | | boolean rs = false; |
| | | VCIInvocationInfo info = HibernateSessionFactory.getVciSessionInfo(); |
| | | String ip = "127.0.0.1"; |
| | | if(info!=null){ |
| | | ip = info.clientIPInfo == null||"".equals(info.clientIPInfo) ?"127.0.0.1":info.clientIPInfo; |
| | | } |
| | | // VCIInvocationInfo info = HibernateSessionFactory.getVciSessionInfo(); |
| | | // String ip = "127.0.0.1"; |
| | | // if(info!=null){ |
| | | // ip = info.clientIPInfo == null||"".equals(info.clientIPInfo) ?"127.0.0.1":info.clientIPInfo; |
| | | // } |
| | | if(deleteLOs != null && deleteLOs.length > 0) { |
| | | LOFactoryService services = LOFactoryService.getInstance(); |
| | | rs = services.batchDeleteLinkObject(deleteLOs); |
| | |
| | | BOFactoryServices services = BOFactoryServices.getInstance(); |
| | | rs = services.batchDeleteBusinessObject(deleteBOs, 1); |
| | | if (!rs) { |
| | | batchFailRecordLog(deleteBOs, ip, "删除"); |
| | | LogRecordUtil.batchWriteLog(deleteBOs, "删除", "操作失败"); |
| | | return rs; |
| | | } |
| | | batchRecordLog(deleteBOs, ip, "删除"); |
| | | LogRecordUtil.batchWriteLog(deleteBOs, "删除"); |
| | | } |
| | | if((createBOs != null && createBOs.length > 0) || |
| | | (createLOs != null && createLOs.length > 0)) { |
| | |
| | | BOFactoryServices services = BOFactoryServices.getInstance(); |
| | | rs = services.batchCreateBusinessObjectWithLink(createBOs, createLOs, ts); |
| | | if (!rs) { |
| | | batchFailRecordLog(createBOs, ip, "创建"); |
| | | LogRecordUtil.batchWriteLog(createBOs, "创建", "操作失败"); |
| | | return rs; |
| | | } |
| | | batchRecordLog(createBOs, ip, "创建"); |
| | | LogRecordUtil.batchWriteLog(createBOs, "创建"); |
| | | } |
| | | if(updateBOs != null && updateBOs.length > 0) { |
| | | BOFactoryServices services = BOFactoryServices.getInstance(); |
| | | rs = services.batchUpdateBusinessObject(updateBOs); |
| | | if (!rs) { |
| | | batchFailRecordLog(updateBOs, ip, "更新"); |
| | | LogRecordUtil.batchWriteLog(updateBOs, "更新", "操作失败"); |
| | | return rs; |
| | | } |
| | | batchRecordLog(updateBOs, ip, "更新"); |
| | | LogRecordUtil.batchWriteLog(updateBOs, "更新"); |
| | | } |
| | | if(updateLOs != null && updateLOs.length > 0) { |
| | | LOFactoryService services = LOFactoryService.getInstance(); |