Jelajahi Sumber

删除不需要的代码类

yaoyu 1 tahun lalu
induk
melakukan
c6586e6bd7

+ 0 - 9
pu/META-INF/thopenapi.upm

@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding='gb2312'?>
-<module name="pu">
-    <public>
- 	    <component remote="true" singleton="true" tx="NONE">
-            <interface>nc.itf.pu.service.IInvoiceOCRMaintain</interface>
-            <implementation>nc.impl.pu.service.InvoiceOCRMaintainImpl</implementation>
-        </component>
-    </public>
-</module>

+ 0 - 25
pu/pu/src/client/nc/ui/pu/m25/config/poInvoice_addaction.xml

@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-	<bean id="ActionExt_mediator" class="nc.ui.uif2.uiextend.ActionExtPreprocessor"
-		init-method="process">
-		<property name="actionExtList">
-			<list>
-				<bean class="nc.ui.uif2.uiextend.ActionExtInfo">
-					<property name="action" ref="ViewAtacmtsAction"></property> <!-- 扩展按钮 -->
-					<property name="targetAction" ref="invoicePrintMenuAction"></property> <!-- 目标按钮 -->
-					<property name="actionContainer" ref="actionsOfCard"></property> <!-- 按钮容器,列表界面按钮 -->
-					<property name="extType" value="INSERT_EXTTYPE"></property> <!-- 插入按钮 -->
-					<property name="position" value="AFTER_POSITION"></property> <!-- 在目标按钮前面 -->
-					<property name="uistate" value="NOTEDIT_STATE"></property> <!-- 非编辑态 -->
-				</bean>
-			</list>
-		</property>
-	</bean>
-
-	<bean id="ViewAtacmtsAction" class="nc.ui.pubapp.uif2app.actions.ViewAtacmtsAction">
-		<property name="model" ref="manageAppModel"></property>
-	</bean>
-
-</beans>

+ 0 - 94
pu/pu/src/client/nc/ui/pubapp/uif2app/actions/ViewAtacmtsAction.java

@@ -1,94 +0,0 @@
-package nc.ui.pubapp.uif2app.actions;
-
-import java.awt.BorderLayout;
-import java.awt.event.ActionEvent;
-
-import nc.bs.pub.filesystem.IFileSystemActionConst;
-import nc.desktop.ui.WorkbenchEnvironment;
-import nc.ui.pub.beans.MessageDialog;
-import nc.ui.pub.beans.UIDialog;
-import nc.ui.pub.bill.BillCardPanel;
-import nc.ui.pub.filesystem.FileManageUI;
-import nc.ui.pub.filesystem.FileManageUIFactory;
-import nc.ui.pub.filesystem.TestFileManageUI;
-import nc.ui.pub.filesystem.ThFileManageUI;
-import nc.ui.uif2.editor.BillForm;
-import nc.ui.uif2.model.AbstractAppModel;
-import nc.ui.uif2.model.AbstractUIAppModel;
-import nc.vo.bd.meta.IBDObject;
-import nc.vo.pu.m25.entity.InvoiceVO;
-import nc.vo.uap.rbac.FuncSubInfo;
-import nc.vo.uap.rbac.profile.FunctionPermProfileManager;
-
-public class ViewAtacmtsAction extends FileDocManageAction implements IFileSystemActionConst{
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 7709321055117240146L;
-	private AbstractUIAppModel model;
-	public BillForm editor;
-	
-	public BillForm getEditor() {
-		return editor;
-	}
-
-	public void setEditor(BillForm editor) {
-		this.editor = editor;
-	}
-	
-	public AbstractUIAppModel getModel() {
-	  return model;
-   }
- 
-
-    public void setModel(AbstractUIAppModel model) {
-	  this.model = model;
-    }
-	
-	public ViewAtacmtsAction(){
-		super();
-		this.setBtnName("·¢Æ±²é¿´");
-		this.setCode("viewatmsaction");
-	
-	}
-	
-	public void doAction(ActionEvent e) throws Exception {	
-		  // TODO Auto-generated method stub
-	    Object selectedData = this.model.getSelectedData();
-//	    BillCardPanel cpanel=editor.getBillCardPanel();
-	    InvoiceVO aggvo= (InvoiceVO) selectedData;
-	    String rootPath="";
-	    Object objrootPath =  aggvo.getParentVO().getVdef17();
-	    if(null!=objrootPath){
-	    	rootPath=objrootPath.toString();
-	    }
-	    String userCode =
-	          WorkbenchEnvironment.getInstance().getLoginUser().getUser_code();
-
-	      String funcode = this.model.getContext().getNodeCode();
-	      String pk_group = this.model.getContext().getPk_group();
-	      FuncSubInfo funcsubinfo = FunctionPermProfileManager.getInstance().getProfile(userCode).getFuncSubInfo(funcode);
-	      TestFileManageUI ui = new TestFileManageUI(objrootPath.toString(),editor);
-		  setActionPermission(ui,funcsubinfo);
-		      ui.setTreeRootVisible(false);
-	      UIDialog dlg =
-	          new UIDialog(this.model.getContext().getEntranceUI(),"´«ORC·¢Æ±");
-	      dlg.getContentPane().setLayout(new BorderLayout());
-	      dlg.getContentPane().add(ui, BorderLayout.CENTER);
-	      dlg.setResizable(true);
-	      dlg.setSize(600, 400);
-	      dlg.showModal();
-		
-	}
-	
-	 @SuppressWarnings("unused")
-	 private static void setActionPermission(TestFileManageUI fui,FuncSubInfo funcsubinfo){		
-	 	    fui.setUploadFileEnable(funcsubinfo.isValidButton(UPLOAD));
-	 		fui.setCreateNewFolderEnable(funcsubinfo.isValidButton(UPLOAD));
-	 		fui.setDownloadFileEnable(funcsubinfo.isValidButton(DOWNLOAD));
-	 		fui.setShowFileEnable(funcsubinfo.isValidButton(BROWSE));
-	 		fui.setDeleteNodeEnable(funcsubinfo.isValidButton(DELETE));
-	 		fui.setRenameNodeEnable(funcsubinfo.isValidButton(RENAME));
-	 	}
-}

+ 0 - 114
pu/pu/src/private/nc/impl/pu/service/InvoiceOCRMaintainImpl.java

@@ -1,114 +0,0 @@
-package nc.impl.pu.service;
-
-import java.io.File;
-
-
-import org.jeecg.common.util.HttpHelper;
-
-import com.alibaba.fastjson.JSONObject;
-
-import nc.bs.framework.common.NCLocator;
-import nc.itf.pu.service.IInvoiceOCRMaintain;
-import nc.itf.uap.IUAPQueryBS;
-import nc.jdbc.framework.processor.ColumnProcessor;
-import nc.log.NcLog;
-import nc.vo.pubapp.pattern.exception.ExceptionUtils;
-
-public class InvoiceOCRMaintainImpl implements IInvoiceOCRMaintain{
-	
-	
-	private String url = "https://api.mypiaojia.com/api/invoiceApi/";
-	private String url2 = "https://up.mypiaojia.com/api/invoiceApi/";
-
-	
-	@Override
-	public JSONObject startInvoiceOCR(File file) {
-		try {
-			NcLog.info("流程开始");
-			//获取发票云token
-			JSONObject tokenjb = getOCRToken();
-			NcLog.info("获取发票云token:"+tokenjb.toString());
-			String token = tokenjb.getString("data");
-			//上传发票到发票云系统
-			JSONObject uploadjb = uploadInvoice(token, file);
-			NcLog.info("上传发票到发票云:"+uploadjb.toString());
-			//进行orc识别
-			JSONObject scanjb = scanInvoice(token,uploadjb);
-			NcLog.info("发票云OCR识别:"+scanjb.toString());
-			
-			return scanjb;
-			
-		} catch (Exception e) {
-			ExceptionUtils.wrappBusinessException(e.getMessage());
-			NcLog.info("流程失败:"+e.getMessage());
-		}
-		return null;
-	}
-	
-	
-	/**
-	 * 获取发票云token
-	 * @return token
-	 * @throws Exception
-	 */
-	private JSONObject getOCRToken() throws Exception{
-		String sql = "select defaultvalue from pub_sysinittemp where  initcode ='fptoken'";
-		IUAPQueryBS iUAPQueryBS= (IUAPQueryBS) NCLocator.getInstance().lookup(IUAPQueryBS.class.getName());
-		JSONObject jsonobject = JSONObject.parseObject(iUAPQueryBS.executeQuery(sql, new ColumnProcessor()).toString());
-		JSONObject responseMsg = HttpHelper.httpTokenPost(url+"token/buildToken", jsonobject.getString("appId"), jsonobject.getString("cid"), jsonobject.getString("secret"));
-		if(responseMsg.get("data") != null) {
-			return responseMsg;		
-		}else {
-			throw new Exception("获取发票云token失败:"+responseMsg.getJSONObject("res_base").getString("message"));
-		}
-
-	}
-	
-	/**
-	 * 上传发票到发票云系统
-	 * @param token
-	 * @param file
-	 * @return
-	 * @throws Exception
-	 */
-	private JSONObject uploadInvoice(String token, File file) throws Exception {
-		NcLog.info("上传发票到发票云系统开始");
-		JSONObject responseMsg = HttpHelper.httpFilePost(url2+"file/uploadFileSpilit",token, file);
-		if(responseMsg.get("data") != null) {
-			return responseMsg;
-		}else {
-			throw new Exception("上传发票到发票云系统失败:"+responseMsg.getJSONObject("res_base").getString("message"));
-		}
-	}
-	
-	
-	/**
-	 * 进行orc识别
-	 * @param token
-	 * @param uploadjb   上传发票到发票云系统时返回的数据
-	 * @return
-	 * @throws Exception
-	 */
-	private JSONObject scanInvoice(String token,JSONObject uploadjb) throws Exception {
-		 JSONObject jsonobject = new JSONObject();
-         jsonobject.put("image_index", uploadjb.getJSONObject("data").getString("id"));
-         jsonobject.put("fileTypeStr", uploadjb.getJSONObject("data").getString("fileType"));
-         jsonobject.put("flag", "13");
-         jsonobject.put("is_save", "0");
-         jsonobject.put("is_sync", "1");
-         jsonobject.put("ocrMap","");
-         jsonobject.put("operate_type",0);
-         JSONObject responseMsg = HttpHelper.httpPost(url+"invoice/ocr", token, jsonobject);
-         if(responseMsg.get("data") != null) {
- 			return responseMsg;
- 		}else {
- 			throw new Exception("发票orc识别失败:"+responseMsg.getJSONObject("actionMsg").getString("message"));
- 		}
-	}
-	
-	
-	//删除发票云系统发票
-
-	
-	//修改发票云发票状态
-}

+ 0 - 12
pu/pu/src/public/nc/itf/pu/service/IInvoiceOCRMaintain.java

@@ -1,12 +0,0 @@
-package nc.itf.pu.service;
-
-import java.io.File;
-
-import com.alibaba.fastjson.JSONObject;
-
-
-public interface IInvoiceOCRMaintain {
-	
-	//¿ªÊ¼·¢Æ±ÔÆOCRʶ±ð
-	JSONObject startInvoiceOCR(File file);
-}