| | |
| | | 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[] deleteLOs = params.getDeleteLos(); |
| | | LinkObject[] createLOs = params.getCreateLos(); |
| | | 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, "增加"); |
| | | } |
| | | return rs; |
| | | } |