12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- package com.kingdee.eas.custom.shuiyou.six.osf;
- import com.alibaba.fastjson.JSON;
- import com.kingdee.bos.BOSException;
- import com.kingdee.bos.Context;
- import com.kingdee.eas.base.permission.UserInfo;
- import com.kingdee.eas.custom.shuiyou.interfacelog.LogInfoInfo;
- import com.kingdee.eas.custom.shuiyou.vo.SixTConfirmInfo;
- import com.kingdee.eas.custom.shuiyou.uitls.ISYUtilsFacade;
- import com.kingdee.eas.custom.shuiyou.uitls.SYUtilsFacadeFactory;
- import java.io.FileInputStream;
- import java.io.IOException;
- import java.sql.Timestamp;
- import java.util.Date;
- import java.util.Optional;
- import java.util.Properties;
- /**
- * description: SixtyThousandConfirmService <br>
- * date: 2024/8/21 17:30 <br>
- * author: lhbj <br>
- * version: 1.0 <br>
- */
- public class SixtyThousandConfirmService {
- /**
- * 4.2.5.2扣除名单确认
- * * @param errorInfo 错误信息
- * * @param interfaceAddress 接口地址
- * * @param interfaceName 接口名
- * * @param inParameter 入参
- * * @param outParameter 回参
- * * @param entrance 入口
- * * @throws BOSException
- * * @throws EASBizException
- *
- * @return
- */
- public LogInfoInfo sixTConfirm(Context context, SixTConfirmInfo six) {
- LogInfoInfo info = new LogInfoInfo();
- try {
- Properties propt = new Properties();
- propt.load(new FileInputStream(System.getProperty("EAS_HOME") + "/server/properties/sy/syConfig.properties"));
- String ip = propt.getProperty("ip");
- String url = ip + "/gateway/iit/deductionAmount/confirmPreDeduct";
- info.setInterfaceAddress(url);
- String param = JSON.toJSONString(six);
- info.setInParameter(param);
- ISYUtilsFacade syu = SYUtilsFacadeFactory.getLocalInstance(context);
- String result = syu.post(url,param);
- Optional<String> op = Optional.of(result);
- String resp = op.get();
- // info.setEntrance("人员报税信息/人员确认名单/确认人员名单");
- // if (sYResponse.isSuccessful()) {
- // info.setStatus("成功");
- // info.setOutParameter(resp);
- // } else {
- // info.setStatus("失败");
- // info.setErrorInfo(resp);
- // }
- }catch (IOException | BOSException e){
- e.printStackTrace();
- }finally {
- info.setInterfaceName("4.2.5.2扣除名单确认");
- UserInfo userInfo = (UserInfo)context.get("UserInfo");
- info.setCreator(userInfo);
- Date date = new Date();
- Timestamp timestamp = new Timestamp(date.getTime());
- info.setCreateTime(timestamp);
- info.setLastUpdateTime(timestamp);
- info.setLastUpdateUser(userInfo);
- info.setBizDate(date);
- }
- return info;
- }
- }
|