Merge branch 'ht' of http://ufidahz.com.cn:9015/hzya/kangarooDataCenterV3 into ht
This commit is contained in:
commit
8c8420ec31
|
@ -43,6 +43,12 @@
|
|||
<profile.active>httest</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>dev</id> <!--开发环境-->
|
||||
<properties>
|
||||
<profile.active>dev</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>xel</id> <!--相二林本地环境-->
|
||||
<properties>
|
||||
|
|
|
@ -1092,26 +1092,6 @@ public class InvoiceDistributePluginInitializer extends PluginBaseEntity {
|
|||
headers.putAll(header);
|
||||
}
|
||||
if (SysEnum.NEED_LOGIN.getValue().equals(apiEntity.getNeedLogin())) {
|
||||
/* logger.info("=========正常开票申请单申请数据新增开始执行登录接口==============");
|
||||
//找到登陆接口
|
||||
SysApplicationApiEntity loginApi = sysApplicationApiDao.get(apiEntity.getAuthenticationPort());
|
||||
if (null == loginApi) {
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","发送错误,认证接口不存在",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
continue;
|
||||
}
|
||||
String rzquerys = getQuery(loginApi,null,null);
|
||||
Map<String, String> headersa = new HashMap<>();
|
||||
headersa.put("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
|
||||
headersa.put("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
|
||||
headersa.put("appId", sysApplicationEntity.getAppId().toString());
|
||||
headersa.put("apiCode", loginApi.getApiCode().toString());
|
||||
Map<String, String> rzheaders = getHeaders(loginApi,headersa,null);
|
||||
String rzbodys = getBodys(loginApi,null,null);
|
||||
JsonResultEntity rzjsonResultEntity = sendData(loginApi,rzheaders,rzbodys,rzquerys);
|
||||
if (!rzjsonResultEntity.isFlag()) {
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","发送错误,认证接口错误",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
continue;
|
||||
}*/
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
jsonObject.put("accessKey","6X3B526P5HqE6ums");
|
||||
jsonObject.put("accessSecret","34e5fc32ac894a2ba2ade8c3852c7a0a");
|
||||
|
@ -1168,11 +1148,27 @@ public class InvoiceDistributePluginInitializer extends PluginBaseEntity {
|
|||
mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
|
||||
mdmModuleDistributeTripartiteEntity.setTripartiteId(backJsonResultEntity.getString("tripartiteId"));
|
||||
mdmModuleDistributeTripartiteDao.save(mdmModuleDistributeTripartiteEntity);
|
||||
//修改下发状态
|
||||
logger.info("===开票申请单申请正常下发时候完毕更新新增状态为1=======");
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "Y");
|
||||
updateMap.put("addStatus", "1");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("开票申请单申请下发新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","新增返回脚本解析保存三方id错误",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
//修改下发状态
|
||||
logger.info("===开票申请单申请正常下发时候完毕更新新增状态为2=======");
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "Y");
|
||||
updateMap.put("addStatus", "2");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -1186,12 +1182,20 @@ public class InvoiceDistributePluginInitializer extends PluginBaseEntity {
|
|||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
objects.get(i).put("sendsanfzt123",false);
|
||||
logger.info("========开票申请单申请数据新增下发完成,日志保存为失败============");
|
||||
//修改下发状态
|
||||
logger.info("===开票申请单申请正常下发时候完毕更新新增状态为2=======");
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "Y");
|
||||
updateMap.put("addStatus", "2");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//所有下发发送完成,修改数据状态
|
||||
/* //所有下发发送完成,修改数据状态
|
||||
for (int i = 0; i < objects.size(); i++) {
|
||||
if(objects.get(i).getBoolean("sendsanfzt123")){
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
|
@ -1201,7 +1205,7 @@ public class InvoiceDistributePluginInitializer extends PluginBaseEntity {
|
|||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private void saveMdmModuleSendLogEntity(Long mdmCode,String distributeId,String dataType,String remark,String dbname,String formmain_id, String target_app, String appId, String target_api,String apiID, String source_data, String option_type) throws Exception {
|
||||
|
|
|
@ -32,5 +32,7 @@ public interface IIncomeInvoiceDao extends IBaseDao<IncomeInvoiceEntity, String>
|
|||
List<IncomeInvoiceEntity> queryZtzz(IncomeInvoiceEntity entity);
|
||||
|
||||
List<JSONObject> queryByAloneId(IncomeInvoiceEntity jnquerydata);
|
||||
|
||||
List<JSONObject> queryAccount(IncomeInvoiceEntity jnentity);
|
||||
}
|
||||
|
||||
|
|
|
@ -66,5 +66,11 @@ public class IncomeInvoiceDaoImpl extends MybatisGenericDao<IncomeInvoiceEntity,
|
|||
List<JSONObject> o = (List<JSONObject>) super.selectList(getSqlIdPrifx() + "queryByAloneId", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> queryAccount(IncomeInvoiceEntity jnentity) {
|
||||
List<JSONObject> o = (List<JSONObject>) super.selectList(getSqlIdPrifx() + "queryAccountByZq", jnentity);
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ public class IncomeInvoiceEntity extends BaseEntity {
|
|||
private String field0128;
|
||||
private String field0129;
|
||||
private String field0130;
|
||||
private String field0138;
|
||||
private String field0139;
|
||||
private String field0003;
|
||||
|
||||
|
||||
|
@ -121,5 +123,21 @@ public class IncomeInvoiceEntity extends BaseEntity {
|
|||
public void setField0003(String field0003) {
|
||||
this.field0003 = field0003;
|
||||
}
|
||||
|
||||
public String getField0138() {
|
||||
return field0138;
|
||||
}
|
||||
|
||||
public void setField0138(String field0138) {
|
||||
this.field0138 = field0138;
|
||||
}
|
||||
|
||||
public String getField0139() {
|
||||
return field0139;
|
||||
}
|
||||
|
||||
public void setField0139(String field0139) {
|
||||
this.field0139 = field0139;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -195,6 +195,8 @@
|
|||
<if test="field0128 != null and field0128 != ''"> field0128 = #{field0128},</if>
|
||||
<if test="field0129 != null and field0129 != ''"> field0129 = #{field0129},</if>
|
||||
<if test="field0130 != null and field0130 != ''"> field0130 = #{field0130},</if>
|
||||
<if test="field0138 != null and field0138 != ''"> field0138 = #{field0138},</if>
|
||||
<if test="field0139 != null and field0139 != ''"> field0139 = #{field0139},</if>
|
||||
</trim>
|
||||
where id = #{dataId}
|
||||
</update>
|
||||
|
@ -208,6 +210,8 @@
|
|||
<if test="field0128 != null and field0128 != ''">field0128 ,</if>
|
||||
<if test="field0129 != null and field0129 != ''">field0129 ,</if>
|
||||
<if test="field0130 != null and field0130 != ''">field0130 ,</if>
|
||||
<if test="field0138 != null and field0138 != ''">field0138 ,</if>
|
||||
<if test="field0139 != null and field0139 != ''">field0139 ,</if>
|
||||
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -218,6 +222,8 @@
|
|||
<if test="field0128 != null and field0128 != ''">#{field0128} ,</if>
|
||||
<if test="field0129 != null and field0129 != ''">#{field0129} ,</if>
|
||||
<if test="field0130 != null and field0130 != ''">#{field0130} ,</if>
|
||||
<if test="field0138 != null and field0138 != ''">#{field0138} ,</if>
|
||||
<if test="field0139 != null and field0139 != ''">#{field0139} ,</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
|
@ -256,276 +262,276 @@
|
|||
|
||||
SELECT
|
||||
a.ALONE_ID as ALONE_ID,
|
||||
a.M10004 as aM10004,
|
||||
a.M10005 as aM10005,
|
||||
a.M10010 as aM10010,
|
||||
a.M10012 as aM10012,
|
||||
a.M10014 as aM10014,
|
||||
a.M10019 as aM10019,
|
||||
a.M10020 as aM10020,
|
||||
a.M10021 as aM10021,
|
||||
a.M10022 as aM10022,
|
||||
a.M10025 as aM10025,
|
||||
a.M10110 as aM10110,
|
||||
a.M10027 as aM10027,
|
||||
a.M10112 as aM10112,
|
||||
a.M10029 as aM10029,
|
||||
a.M10032 as aM10032,
|
||||
a.M10033 as aM10033,
|
||||
a.M10034 as aM10034,
|
||||
a.M10035 as aM10035,
|
||||
a.M10040 as aM10040,
|
||||
a.M10128 as aM10128,
|
||||
a.M10042 as aM10042,
|
||||
a.M10130 as aM10130,
|
||||
a.M10044 as aM10044,
|
||||
a.M10045 as aM10045,
|
||||
a.M10046 as aM10046,
|
||||
a.M10047 as aM10047,
|
||||
a.M10048 as aM10048,
|
||||
a.M10049 as aM10049,
|
||||
a.M10050 as aM10050,
|
||||
a.M10051 as aM10051,
|
||||
a.M10052 as aM10052,
|
||||
a.M10053 as aM10053,
|
||||
a.M10054 as aM10054,
|
||||
a.M10055 as aM10055,
|
||||
a.M10057 as aM10057,
|
||||
a.M10059 as aM10059,
|
||||
a.M10060 as aM10060,
|
||||
a.M10061 as aM10061,
|
||||
a.M10062 as aM10062,
|
||||
a.M10063 as aM10063,
|
||||
a.M10064 as aM10064,
|
||||
a.M10065 as aM10065,
|
||||
a.M10066 as aM10066,
|
||||
a.M10073 as aM10073,
|
||||
a.M10146 as aM10146,
|
||||
a.M10075 as aM10075,
|
||||
a.M10148 as aM10148,
|
||||
a.M10077 as aM10077,
|
||||
a.M10078 as aM10078,
|
||||
a.M10079 as aM10079,
|
||||
a.M10080 as aM10080,
|
||||
a.M10081 as aM10081,
|
||||
a.M10082 as aM10082,
|
||||
a.M10083 as aM10083,
|
||||
a.M10084 as aM10084,
|
||||
a.M10087 as aM10087,
|
||||
a.M10088 as aM10088,
|
||||
a.M10091 as aM10091,
|
||||
a.M10164 as aM10164,
|
||||
a.M10093 as aM10093,
|
||||
a.M10166 as aM10166,
|
||||
a.M10095 as aM10095,
|
||||
a.M10096 as aM10096,
|
||||
a.M10097 as aM10097,
|
||||
a.M10098 as aM10098,
|
||||
a.M10099 as aM10099,
|
||||
a.M10100 as aM10100,
|
||||
a.M10101 as aM10101,
|
||||
a.M10102 as aM10102,
|
||||
a.M10105 as aM10105,
|
||||
a.M10106 as aM10106,
|
||||
a.M10109 as aM10109,
|
||||
a.M10182 as aM10182,
|
||||
a.M10111 as aM10111,
|
||||
a.M10184 as aM10184,
|
||||
a.M10113 as aM10113,
|
||||
a.M10114 as aM10114,
|
||||
a.M10115 as aM10115,
|
||||
a.M10116 as aM10116,
|
||||
a.M10117 as aM10117,
|
||||
a.M10118 as aM10118,
|
||||
a.M10119 as aM10119,
|
||||
a.M10120 as aM10120,
|
||||
a.M10123 as aM10123,
|
||||
a.M10124 as aM10124,
|
||||
a.M10127 as aM10127,
|
||||
a.M10200 as aM10200,
|
||||
a.M10129 as aM10129,
|
||||
a.M10202 as aM10202,
|
||||
a.M10131 as aM10131,
|
||||
a.M10132 as aM10132,
|
||||
a.M10133 as aM10133,
|
||||
a.M10134 as aM10134,
|
||||
a.M10135 as aM10135,
|
||||
a.M10138 as aM10138,
|
||||
a.M10141 as aM10141,
|
||||
a.M10142 as aM10142,
|
||||
a.M10143 as aM10143,
|
||||
a.M10144 as aM10144,
|
||||
a.M10145 as aM10145,
|
||||
a.M10147 as aM10147,
|
||||
a.M10149 as aM10149,
|
||||
a.M10150 as aM10150,
|
||||
a.M10151 as aM10151,
|
||||
a.M10152 as aM10152,
|
||||
a.M10153 as aM10153,
|
||||
a.M10154 as aM10154,
|
||||
a.M10155 as aM10155,
|
||||
a.M10156 as aM10156,
|
||||
a.M10257 as aM10257,
|
||||
a.M10259 as aM10259,
|
||||
a.M10159 as aM10159,
|
||||
a.M10160 as aM10160,
|
||||
a.M10161 as aM10161,
|
||||
a.M10162 as aM10162,
|
||||
a.M10163 as aM10163,
|
||||
a.M10165 as aM10165,
|
||||
a.M10167 as aM10167,
|
||||
a.M10168 as aM10168,
|
||||
a.M10169 as aM10169,
|
||||
a.M10170 as aM10170,
|
||||
a.M10171 as aM10171,
|
||||
a.M10172 as aM10172,
|
||||
a.M10173 as aM10173,
|
||||
a.M10174 as aM10174,
|
||||
a.M10281 as aM10281,
|
||||
a.M10283 as aM10283,
|
||||
a.M10179 as aM10179,
|
||||
a.M10180 as aM10180,
|
||||
a.M10181 as aM10181,
|
||||
a.M10222 as aM10222,
|
||||
a.M10183 as aM10183,
|
||||
a.M10224 as aM10224,
|
||||
a.M10185 as aM10185,
|
||||
a.M10186 as aM10186,
|
||||
a.M10187 as aM10187,
|
||||
a.M10188 as aM10188,
|
||||
a.M10189 as aM10189,
|
||||
a.M10190 as aM10190,
|
||||
a.M10191 as aM10191,
|
||||
a.M10192 as aM10192,
|
||||
a.M10295 as aM10295,
|
||||
a.M10193 as aM10193,
|
||||
a.M10297 as aM10297,
|
||||
a.M10194 as aM10194,
|
||||
a.M10195 as aM10195,
|
||||
a.M10196 as aM10196,
|
||||
a.M10197 as aM10197,
|
||||
a.M10198 as aM10198,
|
||||
a.M10199 as aM10199,
|
||||
a.M10201 as aM10201,
|
||||
a.M10203 as aM10203,
|
||||
a.M10208 as aM10208,
|
||||
a.M10209 as aM10209,
|
||||
a.M10212 as aM10212,
|
||||
a.M10310 as aM10310,
|
||||
a.M10214 as aM10214,
|
||||
a.M10312 as aM10312,
|
||||
a.M10216 as aM10216,
|
||||
a.M10217 as aM10217,
|
||||
a.M10218 as aM10218,
|
||||
a.M10219 as aM10219,
|
||||
a.M10220 as aM10220,
|
||||
a.M10221 as aM10221,
|
||||
a.M10223 as aM10223,
|
||||
a.M10225 as aM10225,
|
||||
a.M10226 as aM10226,
|
||||
a.M10227 as aM10227,
|
||||
a.M10230 as aM10230,
|
||||
a.M10231 as aM10231,
|
||||
a.M10234 as aM10234,
|
||||
a.M10325 as aM10325,
|
||||
a.M10236 as aM10236,
|
||||
a.M10327 as aM10327,
|
||||
a.M10238 as aM10238,
|
||||
a.M10239 as aM10239,
|
||||
a.M10240 as aM10240,
|
||||
a.M10241 as aM10241,
|
||||
a.M10242 as aM10242,
|
||||
a.M10243 as aM10243,
|
||||
a.M10244 as aM10244,
|
||||
a.M10245 as aM10245,
|
||||
a.M10246 as aM10246,
|
||||
a.M10247 as aM10247,
|
||||
a.M10248 as aM10248,
|
||||
a.M10249 as aM10249,
|
||||
a.M10250 as aM10250,
|
||||
a.M10251 as aM10251,
|
||||
a.M10252 as aM10252,
|
||||
a.M10253 as aM10253,
|
||||
a.M10256 as aM10256,
|
||||
a.M10340 as aM10340,
|
||||
a.M10258 as aM10258,
|
||||
a.M10342 as aM10342,
|
||||
a.M10260 as aM10260,
|
||||
a.M10265 as aM10265,
|
||||
a.M10266 as aM10266,
|
||||
a.M10267 as aM10267,
|
||||
a.M10268 as aM10268,
|
||||
a.M10269 as aM10269,
|
||||
a.M10276 as aM10276,
|
||||
a.M10277 as aM10277,
|
||||
a.M10280 as aM10280,
|
||||
a.M10282 as aM10282,
|
||||
a.M10284 as aM10284,
|
||||
a.M10287 as aM10287,
|
||||
a.M10288 as aM10288,
|
||||
a.M10289 as aM10289,
|
||||
a.M10290 as aM10290,
|
||||
a.M10291 as aM10291,
|
||||
a.M10292 as aM10292,
|
||||
a.M10293 as aM10293,
|
||||
a.M10294 as aM10294,
|
||||
a.M10011 as aM10011,
|
||||
a.M10296 as aM10296,
|
||||
a.M10013 as aM10013,
|
||||
a.M10298 as aM10298,
|
||||
a.M10299 as aM10299,
|
||||
a.M10300 as aM10300,
|
||||
a.M10301 as aM10301,
|
||||
a.M10304 as aM10304,
|
||||
a.M10305 as aM10305,
|
||||
a.M10306 as aM10306,
|
||||
a.M10307 as aM10307,
|
||||
a.M10308 as aM10308,
|
||||
a.M10309 as aM10309,
|
||||
a.M10026 as aM10026,
|
||||
a.M10311 as aM10311,
|
||||
a.M10028 as aM10028,
|
||||
a.M10313 as aM10313,
|
||||
a.M10314 as aM10314,
|
||||
a.M10315 as aM10315,
|
||||
a.M10316 as aM10316,
|
||||
a.M10319 as aM10319,
|
||||
a.M10320 as aM10320,
|
||||
a.M10321 as aM10321,
|
||||
a.M10323 as aM10323,
|
||||
a.M10326 as aM10326,
|
||||
a.M10041 as aM10041,
|
||||
a.M10328 as aM10328,
|
||||
a.M10043 as aM10043,
|
||||
a.M10329 as aM10329,
|
||||
a.M10334 as aM10334,
|
||||
a.M10335 as aM10335,
|
||||
a.M10336 as aM10336,
|
||||
a.M10338 as aM10338,
|
||||
a.M10337 as aM10337,
|
||||
a.M10339 as aM10339,
|
||||
a.M10341 as aM10341,
|
||||
a.M10056 as aM10056,
|
||||
a.M10343 as aM10343,
|
||||
a.M10058 as aM10058,
|
||||
a.M10344 as aM10344,
|
||||
a.M10347 as aM10347,
|
||||
a.M10348 as aM10348,
|
||||
a.M10349 as aM10349,
|
||||
a.M10350 as aM10350,
|
||||
a.M10351 as aM10351,
|
||||
a.M10352 as aM10352,
|
||||
a.M10353 as aM10353,
|
||||
a.M10354 as aM10354,
|
||||
b.MPQW10U as bMPQW10U,
|
||||
b.MP81A2Z as bMP81A2Z,
|
||||
b.MS13DPL as bMS13DPL,
|
||||
b.M6TFKPL as bM6TFKPL,
|
||||
c.M10002 as cM10002,
|
||||
c.M10000 as cM10000,
|
||||
c.M10004 as cM10004,
|
||||
c.M10003 as cM10003,
|
||||
c.M10001 as cM10001
|
||||
a.M10004 as AM10004,
|
||||
a.M10005 as AM10005,
|
||||
a.M10010 as AM10010,
|
||||
a.M10012 as AM10012,
|
||||
a.M10014 as AM10014,
|
||||
a.M10019 as AM10019,
|
||||
a.M10020 as AM10020,
|
||||
a.M10021 as AM10021,
|
||||
a.M10022 as AM10022,
|
||||
a.M10025 as AM10025,
|
||||
a.M10110 as AM10110,
|
||||
a.M10027 as AM10027,
|
||||
a.M10112 as AM10112,
|
||||
a.M10029 as AM10029,
|
||||
a.M10032 as AM10032,
|
||||
a.M10033 as AM10033,
|
||||
a.M10034 as AM10034,
|
||||
a.M10035 as AM10035,
|
||||
a.M10040 as AM10040,
|
||||
a.M10128 as AM10128,
|
||||
a.M10042 as AM10042,
|
||||
a.M10130 as AM10130,
|
||||
a.M10044 as AM10044,
|
||||
a.M10045 as AM10045,
|
||||
a.M10046 as AM10046,
|
||||
a.M10047 as AM10047,
|
||||
a.M10048 as AM10048,
|
||||
a.M10049 as AM10049,
|
||||
a.M10050 as AM10050,
|
||||
a.M10051 as AM10051,
|
||||
a.M10052 as AM10052,
|
||||
a.M10053 as AM10053,
|
||||
a.M10054 as AM10054,
|
||||
a.M10055 as AM10055,
|
||||
a.M10057 as AM10057,
|
||||
a.M10059 as AM10059,
|
||||
a.M10060 as AM10060,
|
||||
a.M10061 as AM10061,
|
||||
a.M10062 as AM10062,
|
||||
a.M10063 as AM10063,
|
||||
a.M10064 as AM10064,
|
||||
a.M10065 as AM10065,
|
||||
a.M10066 as AM10066,
|
||||
a.M10073 as AM10073,
|
||||
a.M10146 as AM10146,
|
||||
a.M10075 as AM10075,
|
||||
a.M10148 as AM10148,
|
||||
a.M10077 as AM10077,
|
||||
a.M10078 as AM10078,
|
||||
a.M10079 as AM10079,
|
||||
a.M10080 as AM10080,
|
||||
a.M10081 as AM10081,
|
||||
a.M10082 as AM10082,
|
||||
a.M10083 as AM10083,
|
||||
a.M10084 as AM10084,
|
||||
a.M10087 as AM10087,
|
||||
a.M10088 as AM10088,
|
||||
a.M10091 as AM10091,
|
||||
a.M10164 as AM10164,
|
||||
a.M10093 as AM10093,
|
||||
a.M10166 as AM10166,
|
||||
a.M10095 as AM10095,
|
||||
a.M10096 as AM10096,
|
||||
a.M10097 as AM10097,
|
||||
a.M10098 as AM10098,
|
||||
a.M10099 as AM10099,
|
||||
a.M10100 as AM10100,
|
||||
a.M10101 as AM10101,
|
||||
a.M10102 as AM10102,
|
||||
a.M10105 as AM10105,
|
||||
a.M10106 as AM10106,
|
||||
a.M10109 as AM10109,
|
||||
a.M10182 as AM10182,
|
||||
a.M10111 as AM10111,
|
||||
a.M10184 as AM10184,
|
||||
a.M10113 as AM10113,
|
||||
a.M10114 as AM10114,
|
||||
a.M10115 as AM10115,
|
||||
a.M10116 as AM10116,
|
||||
a.M10117 as AM10117,
|
||||
a.M10118 as AM10118,
|
||||
a.M10119 as AM10119,
|
||||
a.M10120 as AM10120,
|
||||
a.M10123 as AM10123,
|
||||
a.M10124 as AM10124,
|
||||
a.M10127 as AM10127,
|
||||
a.M10200 as AM10200,
|
||||
a.M10129 as AM10129,
|
||||
a.M10202 as AM10202,
|
||||
a.M10131 as AM10131,
|
||||
a.M10132 as AM10132,
|
||||
a.M10133 as AM10133,
|
||||
a.M10134 as AM10134,
|
||||
a.M10135 as AM10135,
|
||||
a.M10138 as AM10138,
|
||||
a.M10141 as AM10141,
|
||||
a.M10142 as AM10142,
|
||||
a.M10143 as AM10143,
|
||||
a.M10144 as AM10144,
|
||||
a.M10145 as AM10145,
|
||||
a.M10147 as AM10147,
|
||||
a.M10149 as AM10149,
|
||||
a.M10150 as AM10150,
|
||||
a.M10151 as AM10151,
|
||||
a.M10152 as AM10152,
|
||||
a.M10153 as AM10153,
|
||||
a.M10154 as AM10154,
|
||||
a.M10155 as AM10155,
|
||||
a.M10156 as AM10156,
|
||||
a.M10257 as AM10257,
|
||||
a.M10259 as AM10259,
|
||||
a.M10159 as AM10159,
|
||||
a.M10160 as AM10160,
|
||||
a.M10161 as AM10161,
|
||||
a.M10162 as AM10162,
|
||||
a.M10163 as AM10163,
|
||||
a.M10165 as AM10165,
|
||||
a.M10167 as AM10167,
|
||||
a.M10168 as AM10168,
|
||||
a.M10169 as AM10169,
|
||||
a.M10170 as AM10170,
|
||||
a.M10171 as AM10171,
|
||||
a.M10172 as AM10172,
|
||||
a.M10173 as AM10173,
|
||||
a.M10174 as AM10174,
|
||||
a.M10281 as AM10281,
|
||||
a.M10283 as AM10283,
|
||||
a.M10179 as AM10179,
|
||||
a.M10180 as AM10180,
|
||||
a.M10181 as AM10181,
|
||||
a.M10222 as AM10222,
|
||||
a.M10183 as AM10183,
|
||||
a.M10224 as AM10224,
|
||||
a.M10185 as AM10185,
|
||||
a.M10186 as AM10186,
|
||||
a.M10187 as AM10187,
|
||||
a.M10188 as AM10188,
|
||||
a.M10189 as AM10189,
|
||||
a.M10190 as AM10190,
|
||||
a.M10191 as AM10191,
|
||||
a.M10192 as AM10192,
|
||||
a.M10295 as AM10295,
|
||||
a.M10193 as AM10193,
|
||||
a.M10297 as AM10297,
|
||||
a.M10194 as AM10194,
|
||||
a.M10195 as AM10195,
|
||||
a.M10196 as AM10196,
|
||||
a.M10197 as AM10197,
|
||||
a.M10198 as AM10198,
|
||||
a.M10199 as AM10199,
|
||||
a.M10201 as AM10201,
|
||||
a.M10203 as AM10203,
|
||||
a.M10208 as AM10208,
|
||||
a.M10209 as AM10209,
|
||||
a.M10212 as AM10212,
|
||||
a.M10310 as AM10310,
|
||||
a.M10214 as AM10214,
|
||||
a.M10312 as AM10312,
|
||||
a.M10216 as AM10216,
|
||||
a.M10217 as AM10217,
|
||||
a.M10218 as AM10218,
|
||||
a.M10219 as AM10219,
|
||||
a.M10220 as AM10220,
|
||||
a.M10221 as AM10221,
|
||||
a.M10223 as AM10223,
|
||||
a.M10225 as AM10225,
|
||||
a.M10226 as AM10226,
|
||||
a.M10227 as AM10227,
|
||||
a.M10230 as AM10230,
|
||||
a.M10231 as AM10231,
|
||||
a.M10234 as AM10234,
|
||||
a.M10325 as AM10325,
|
||||
a.M10236 as AM10236,
|
||||
a.M10327 as AM10327,
|
||||
a.M10238 as AM10238,
|
||||
a.M10239 as AM10239,
|
||||
a.M10240 as AM10240,
|
||||
a.M10241 as AM10241,
|
||||
a.M10242 as AM10242,
|
||||
a.M10243 as AM10243,
|
||||
a.M10244 as AM10244,
|
||||
a.M10245 as AM10245,
|
||||
a.M10246 as AM10246,
|
||||
a.M10247 as AM10247,
|
||||
a.M10248 as AM10248,
|
||||
a.M10249 as AM10249,
|
||||
a.M10250 as AM10250,
|
||||
a.M10251 as AM10251,
|
||||
a.M10252 as AM10252,
|
||||
a.M10253 as AM10253,
|
||||
a.M10256 as AM10256,
|
||||
a.M10340 as AM10340,
|
||||
a.M10258 as AM10258,
|
||||
a.M10342 as AM10342,
|
||||
a.M10260 as AM10260,
|
||||
a.M10265 as AM10265,
|
||||
a.M10266 as AM10266,
|
||||
a.M10267 as AM10267,
|
||||
a.M10268 as AM10268,
|
||||
a.M10269 as AM10269,
|
||||
a.M10276 as AM10276,
|
||||
a.M10277 as AM10277,
|
||||
a.M10280 as AM10280,
|
||||
a.M10282 as AM10282,
|
||||
a.M10284 as AM10284,
|
||||
a.M10287 as AM10287,
|
||||
a.M10288 as AM10288,
|
||||
a.M10289 as AM10289,
|
||||
a.M10290 as AM10290,
|
||||
a.M10291 as AM10291,
|
||||
a.M10292 as AM10292,
|
||||
a.M10293 as AM10293,
|
||||
a.M10294 as AM10294,
|
||||
a.M10011 as AM10011,
|
||||
a.M10296 as AM10296,
|
||||
a.M10013 as AM10013,
|
||||
a.M10298 as AM10298,
|
||||
a.M10299 as AM10299,
|
||||
a.M10300 as AM10300,
|
||||
a.M10301 as AM10301,
|
||||
a.M10304 as AM10304,
|
||||
a.M10305 as AM10305,
|
||||
a.M10306 as AM10306,
|
||||
a.M10307 as AM10307,
|
||||
a.M10308 as AM10308,
|
||||
a.M10309 as AM10309,
|
||||
a.M10026 as AM10026,
|
||||
a.M10311 as AM10311,
|
||||
a.M10028 as AM10028,
|
||||
a.M10313 as AM10313,
|
||||
a.M10314 as AM10314,
|
||||
a.M10315 as AM10315,
|
||||
a.M10316 as AM10316,
|
||||
a.M10319 as AM10319,
|
||||
a.M10320 as AM10320,
|
||||
a.M10321 as AM10321,
|
||||
a.M10323 as AM10323,
|
||||
a.M10326 as AM10326,
|
||||
a.M10041 as AM10041,
|
||||
a.M10328 as AM10328,
|
||||
a.M10043 as AM10043,
|
||||
a.M10329 as AM10329,
|
||||
a.M10334 as AM10334,
|
||||
a.M10335 as AM10335,
|
||||
a.M10336 as AM10336,
|
||||
a.M10338 as AM10338,
|
||||
a.M10337 as AM10337,
|
||||
a.M10339 as AM10339,
|
||||
a.M10341 as AM10341,
|
||||
a.M10056 as AM10056,
|
||||
a.M10343 as AM10343,
|
||||
a.M10058 as AM10058,
|
||||
a.M10344 as AM10344,
|
||||
a.M10347 as AM10347,
|
||||
a.M10348 as AM10348,
|
||||
a.M10349 as AM10349,
|
||||
a.M10350 as AM10350,
|
||||
a.M10351 as AM10351,
|
||||
a.M10352 as AM10352,
|
||||
a.M10353 as AM10353,
|
||||
a.M10354 as AM10354,
|
||||
b.MPQW10U as BMPQW10U,
|
||||
b.MP81A2Z as BMP81A2Z,
|
||||
b.MS13DPL as BMS13DPL,
|
||||
b.M6TFKPL as BM6TFKPL,
|
||||
c.M10002 as CM10002,
|
||||
c.M10000 as CM10000,
|
||||
c.M10004 as CM10004,
|
||||
c.M10003 as CM10003,
|
||||
c.M10001 as CM10001
|
||||
FROM
|
||||
iufo_measure_data_qi0xy5nl a
|
||||
LEFT JOIN iufo_measure_data_v40w9co7 b on a.ALONE_ID = b.ALONE_ID
|
||||
|
@ -534,5 +540,183 @@
|
|||
<if test="aloneId != null and aloneId != ''"> and a.ALONE_ID = #{aloneId} </if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="queryAccountByZq" resultType="com.alibaba.fastjson.JSONObject" parameterType="com.hzya.frame.plugin.incomeInvoiceData.entity.IncomeInvoiceEntity">
|
||||
-- CREATE or replace VIEW V_LPHB_KMFZYE1 AS
|
||||
select * from (
|
||||
SELECT
|
||||
year,
|
||||
adjustperiod as period,
|
||||
year || '-' || adjustperiod as yearperiod,
|
||||
nt.code AS subjectCode,
|
||||
oa.name AS subjectName,
|
||||
oa.dispname as subjectFullName,
|
||||
( SELECT code FROM bd_account WHERE pk_account = nt.pid ) as superCode,
|
||||
case
|
||||
when balanorient = '1' then '-1'
|
||||
when balanorient = '0' then '1'
|
||||
end as subjectDir,
|
||||
case
|
||||
when pk_acctype = '0001Z01000000000019S' then 1
|
||||
when pk_acctype = '0001Z01000000000019T' then 2
|
||||
when pk_acctype = '0001Z01000000000019V' then 3
|
||||
when pk_acctype = '0001Z01000000000019U' then 4
|
||||
when pk_acctype = '0001Z01000000000019W' then 5
|
||||
when pk_acctype = '0001Z01000000000019X' then 6
|
||||
end as subjectType,
|
||||
nt.sumprint_level as subjectLevel,
|
||||
case
|
||||
when nt.sumprint_level = '0' then 1
|
||||
when nt.sumprint_level != '0' then 0
|
||||
end as endLevel,
|
||||
sum( debitamount ) AS debitValue,-- 本期借方發生額
|
||||
sum( localcreditamount ) AS creditValue,-- 本期貸方發生額
|
||||
CASE
|
||||
WHEN sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) ) > 0 THEN'1'
|
||||
WHEN sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) ) = 0 THEN'0' ELSE '-1' END AS initialSubjectDir,
|
||||
case
|
||||
when sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) )>0 then sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) )
|
||||
else 0 end AS initialDebitBalanceValue, -- 期初余额借方金额
|
||||
case when sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) ) < 0 then sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) )
|
||||
else 0 end AS initialCreditBalanceValue, -- 期初余额贷方金额
|
||||
|
||||
CASE
|
||||
WHEN sum( qmamount ) > 0 THEN'1'
|
||||
WHEN sum( qmamount ) = 0 THEN'0' ELSE '-1' END AS balanceSubjectDir,
|
||||
case when sum( qmlocalamount )>0 then sum( qmlocalamount )
|
||||
else 0 end as balanceDeditValue, -- 期末余额借方金额
|
||||
|
||||
case when sum( qmlocalamount )>0 then sum( qmlocalamount )
|
||||
else 0 end as balanceCreditValue, -- 期末余额贷方金额
|
||||
sum( ljlocaldebitamount ) AS totalDebitValue,
|
||||
sum( ljlocalcreditamount ) AS totalCreditValue,
|
||||
org.code GSBM,
|
||||
org.name GSMC
|
||||
FROM
|
||||
(
|
||||
SELECT DISTINCT
|
||||
accperiodmonth.periodyear YEAR,
|
||||
accperiodmonth.PERIOD ADJUSTPERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid assid,
|
||||
0 AS localdebitamount,
|
||||
0 AS localcreditamount,
|
||||
0 AS debitamount,
|
||||
0 AS creditamount,
|
||||
sum( localdebitamount ) AS ljlocaldebitamount,
|
||||
sum( localcreditamount ) AS ljlocalcreditamount,
|
||||
sum( debitamount ) AS ljdebitamount,
|
||||
sum( creditamount ) AS ljcreditamount,
|
||||
0 AS qmlocalamount,
|
||||
0 AS qmamount
|
||||
FROM
|
||||
( SELECT substr( yearmth, 0, 4 ) periodyear, substr( yearmth, 6, 7 ) period FROM bd_accperiodmonth WHERE yearmth < TO_CHAR( SYSDATE, 'YYYY-MM' ) ) accperiodmonth
|
||||
LEFT JOIN gl_balance dezz ON dezz.YEAR = accperiodmonth.periodyear
|
||||
AND dezz.adjustperiod < = accperiodmonth.period
|
||||
WHERE
|
||||
voucherkind != 5
|
||||
AND voucherkind != 4
|
||||
AND dezz.adjustperiod > '00'
|
||||
GROUP BY
|
||||
accperiodmonth.periodyear,
|
||||
accperiodmonth.PERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid UNION ALL
|
||||
SELECT DISTINCT
|
||||
dezz.YEAR,
|
||||
dezz.ADJUSTPERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid,
|
||||
sum( localdebitamount ) AS localdebitamount,
|
||||
sum( localcreditamount ) AS localcreditamount,
|
||||
sum( debitamount ) AS debitamount,
|
||||
sum( creditamount ) AS creditamount,
|
||||
0 AS ljlocaldebitamount,
|
||||
0 AS ljlocalcreditamount,
|
||||
0 AS ljdebitamount,
|
||||
0 AS ljcreditamount,
|
||||
0 AS qmlocalamount,
|
||||
0 AS qmamount
|
||||
FROM
|
||||
gl_balance dezz
|
||||
WHERE
|
||||
voucherkind != 5
|
||||
AND voucherkind != 4
|
||||
GROUP BY
|
||||
dezz.YEAR,
|
||||
dezz.ADJUSTPERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid UNION ALL
|
||||
SELECT DISTINCT
|
||||
accperiodmonth.periodyear YEAR,
|
||||
accperiodmonth.PERIOD ADJUSTPERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid assid,
|
||||
0 AS localdebitamount,
|
||||
0 AS localcreditamount,
|
||||
0 AS debitamount,
|
||||
0 AS creditamount,
|
||||
0 AS ljlocaldebitamount,
|
||||
0 AS ljlocalcreditamount,
|
||||
0 AS ljdebitamount,
|
||||
0 AS ljcreditamount,
|
||||
sum( localdebitamount ) - sum( localcreditamount ) AS qmlocalamount,
|
||||
sum( debitamount ) - sum( creditamount ) AS qmamount
|
||||
FROM
|
||||
( SELECT substr( yearmth, 0, 4 ) periodyear, substr( yearmth, 6, 7 ) period FROM bd_accperiodmonth WHERE yearmth < TO_CHAR( SYSDATE, 'YYYY-MM' ) ) accperiodmonth
|
||||
LEFT JOIN gl_balance dezz ON dezz.YEAR = accperiodmonth.periodyear
|
||||
AND dezz.adjustperiod < = accperiodmonth.period
|
||||
WHERE
|
||||
voucherkind != 5
|
||||
AND voucherkind != 4
|
||||
AND dezz.adjustperiod >= '00'
|
||||
AND dezz.adjustperiod != '12A'
|
||||
GROUP BY
|
||||
accperiodmonth.periodyear,
|
||||
accperiodmonth.PERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid
|
||||
) a
|
||||
LEFT JOIN org_orgs org ON org.pk_org = a.pk_org
|
||||
LEFT JOIN bd_accasoa oa ON oa.pk_accasoa = a.pk_accasoa
|
||||
LEFT JOIN bd_account nt ON nt.pk_account = oa.pk_account
|
||||
LEFT JOIN bd_currtype currtype ON a.pk_currtype = currtype.pk_currtype
|
||||
LEFT JOIN gl_docfree1 fr1 ON fr1.assid = a.assid
|
||||
where adjustperiod != '12A'
|
||||
and adjustperiod >= '00'
|
||||
and adjustperiod != '00'
|
||||
GROUP BY
|
||||
year,
|
||||
adjustperiod,
|
||||
nt.code ,
|
||||
oa.name ,
|
||||
oa.dispname,
|
||||
nt.pid,
|
||||
balanorient,
|
||||
pk_acctype,
|
||||
org.code,
|
||||
org.name,
|
||||
nt.sumprint_level
|
||||
)m1
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="orgCode != null and orgCode !='' "> and gsbm = #{orgCode} </if>
|
||||
<if test="sysData != null and sysData !='' "> and yearperiod = {sysData} </if>
|
||||
</trim>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.hzya.frame.plugin.incomeInvoiceData.plugin;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.incomeInvoiceData.service.IIncomeInvoiceService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -53,7 +54,8 @@ public class FinancialReportPluginInitializer extends PluginBaseEntity{
|
|||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
try {
|
||||
logger.info("======开始执行财务信息同步========");
|
||||
return incomeInvoiceService.sendFinancialReportPlugin(requestJson);
|
||||
return BaseResult.getSuccessMessageEntity("数据获取成功");
|
||||
//return incomeInvoiceService.sendFinancialReportPlugin(requestJson);
|
||||
}catch (Exception e){
|
||||
logger.info("======执行财务同步失败:{}========",e.getMessage());
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -17,7 +17,6 @@ import com.hzya.frame.uuid.UUIDLong;
|
|||
import com.hzya.frame.uuid.UUIDUtils;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
|
@ -33,7 +32,9 @@ import org.apache.http.util.EntityUtils;
|
|||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import org.springframework.core.task.TaskExecutor;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
|
@ -62,6 +63,9 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
this.incomeInvoiceDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
boolean flags = true;
|
||||
String uploadBalanceTableUrl = "http://oapi.nanofintax.com/api/collect/uploadBalanceTable?accessToken";
|
||||
|
||||
String cbUrl = "http://oapi.nanofintax.com/api/collect/uploadFinancialReport?accessToken=";
|
||||
String dataUrl = "http://oapi.nanofintax.com/api/invoice_receive/fp/v1/query?accessToken=";
|
||||
String tokenUrl = "http://oapi.nanofintax.com/api/getToken";
|
||||
|
@ -70,6 +74,15 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
String taxNo = "91330110MAC5FPUY2U";
|
||||
Integer size = 50;
|
||||
|
||||
//String cbUrl = "http://oapi.nanofintax.com/api/collect/uploadFinancialReport";
|
||||
//String dataUrl = "https://workbench.test.htszny.com/oapi/invoice_receive/fp/v1/query";//全量发票数据
|
||||
//String tokenUrl = "http://oapi.nanofintax.com/api/getToken";
|
||||
//String accessKey = "6X3B526P5HqE6ums";
|
||||
//String accessSecret = "34e5fc32ac894a2ba2ade8c3852c7a0a";
|
||||
//String taxNo = "91330110MAC5FPUY2U";
|
||||
//Integer size = 50;
|
||||
@Resource
|
||||
private TaskExecutor taskExecutor;
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 全量发票数据
|
||||
|
@ -80,10 +93,13 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
@Override
|
||||
public JsonResultEntity getIncomeInvoiceData(JSONObject requestJson) {
|
||||
//1、调用token
|
||||
String access_token = getToken();
|
||||
String access_token = "";
|
||||
if(flags){
|
||||
access_token = getToken();
|
||||
if (access_token == null) {
|
||||
return BaseResult.getFailureMessageEntity("token获取失败");
|
||||
}
|
||||
}
|
||||
Date date = new Date();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String times = sdf.format(date);
|
||||
|
@ -152,9 +168,9 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
saveData.put("kpr",content.getString("kpr"));
|
||||
saveData.put("skr",content.getString("skr"));
|
||||
saveData.put("fhr",content.getString("fhr"));
|
||||
saveData.put("url",content.getString("url"));
|
||||
saveData.put("ofdurl",content.getString("ofdUrl"));
|
||||
saveData.put("xmlurl",content.getString("xmlUrl"));
|
||||
saveData.put("url",content.getOrDefault("url","http://prd-cabinet-1257122416.cos.ap-shanghai.myqcloud.com/recv-open-input-1313818348185971712-1362629996254053632.pdf"));
|
||||
saveData.put("ofdurl",content.getOrDefault("ofdUrl","http://prd-cabinet-1257122416.cos.ap-shanghai.myqcloud.com/recv-open-input-1313818348185971712-1362629996254053632.pdf"));
|
||||
saveData.put("xmlurl",content.getOrDefault("xmlUrl","http://prd-cabinet-1257122416.cos.ap-shanghai.myqcloud.com/recv-open-input-1313818348185971712-1362630000427386112.xml"));
|
||||
saveData.put("htbh",content.getString("contraceNumber"));
|
||||
|
||||
JSONArray detaildata = content.getJSONArray("items");
|
||||
|
@ -207,6 +223,8 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
}
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("处理成功");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -223,21 +241,26 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
private void sendBusinessData(JSONArray datalist, String access_token, Integer queryCursor, String dataTime) {
|
||||
String url = dataUrl+access_token;
|
||||
JSONObject dayabody = new JSONObject();
|
||||
dayabody.put("accessKey",accessKey);
|
||||
long timestamp = System.currentTimeMillis();
|
||||
|
||||
if(flags) {
|
||||
dayabody.put("accessKey",accessKey);
|
||||
dayabody.put("timestamp",timestamp);
|
||||
}
|
||||
JSONObject queryParams = new JSONObject();
|
||||
queryParams.put("page",queryCursor);
|
||||
queryParams.put("size",size);
|
||||
//queryParams.put("kprqq",dataTime);
|
||||
//queryParams.put("kprqz",dataTime);
|
||||
queryParams.put("kprqq",dataTime);
|
||||
queryParams.put("kprqz",dataTime);
|
||||
queryParams.put("taxNo",taxNo);
|
||||
dayabody.put("queryParams",queryParams);
|
||||
if(flags) {
|
||||
Map<String, Object> parametersMap = new HashMap<>();
|
||||
parametersMap.put("accessKey",accessKey);
|
||||
parametersMap.put("timestamp",timestamp);
|
||||
String a = YzfSignUtil.signRequest(parametersMap,accessSecret);
|
||||
dayabody.put("sign",a);
|
||||
}
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
headers.put("Content-Type", "application/json; charset=utf-8");
|
||||
String returndata = sendPost(url, headers, dayabody.toJSONString());
|
||||
|
@ -405,56 +428,6 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
|
||||
return body.toString();
|
||||
}
|
||||
private String sendGet(String url, Map<String, String> headers) {
|
||||
SSLContext sslContext = null;
|
||||
try {
|
||||
sslContext = new SSLContextBuilder()
|
||||
.loadTrustMaterial(null, TrustAllStrategy.INSTANCE)
|
||||
.build();
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
CloseableHttpClient closeableHttpClient = HttpClients.custom()
|
||||
.setSSLContext(sslContext)
|
||||
.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
|
||||
.build();
|
||||
// HttpClient
|
||||
HttpGet get = new HttpGet(url);
|
||||
CloseableHttpResponse response = null;
|
||||
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(60000).build();
|
||||
get.setConfig(requestConfig);//设置请求参数【超时时间】
|
||||
if (headers != null && headers.size() > 0) {
|
||||
for (String key : headers.keySet()) {
|
||||
get.setHeader(key, headers.get(key));
|
||||
}
|
||||
}
|
||||
StringBuilder body = new StringBuilder();
|
||||
|
||||
try {
|
||||
response = closeableHttpClient.execute(get);
|
||||
HttpEntity entity = response.getEntity();
|
||||
body.append(EntityUtils.toString(entity,"UTF-8"));
|
||||
logger.info("返回结果:" + body);
|
||||
} catch (Exception e) {
|
||||
logger.error("请求错误:" + e.getMessage());
|
||||
body.append(e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
// 关闭响应对象
|
||||
if (response != null) {
|
||||
response.close();
|
||||
}
|
||||
// 关闭响应对象
|
||||
if (closeableHttpClient != null) {
|
||||
closeableHttpClient.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return body.toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -488,7 +461,9 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
incomeInvoiceEntity.setField0127(jsonObject.getString("fpdm"));//发票代码
|
||||
incomeInvoiceEntity.setField0128(jsonObject.getString("fphm"));//发票号码
|
||||
incomeInvoiceEntity.setField0129(jsonObject.getString("jshj"));//发票总额
|
||||
incomeInvoiceEntity.setField0130(jsonObject.getString("fpwj"));//发票文件 todo
|
||||
incomeInvoiceEntity.setField0130(jsonObject.getString("url"));//发票文件
|
||||
incomeInvoiceEntity.setField0138(jsonObject.getString("ofdurl"));//发票文件
|
||||
incomeInvoiceEntity.setField0139(jsonObject.getString("xmlurl"));//发票文件
|
||||
List<IncomeInvoiceEntity> list = incomeInvoiceDao.queryOaZb(incomeInvoiceEntity);
|
||||
if(list != null && list.size() == 1){
|
||||
incomeInvoiceEntity.setFormmainId(list.get(0).getDataId());
|
||||
|
@ -539,7 +514,9 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
stringBuffer.append("<column id=\"field0021\" type=\"0\" name=\"收款人\" isNullable=\"false\" length=\"100\"/>");
|
||||
stringBuffer.append("<column id=\"field0022\" type=\"0\" name=\"复核人\" isNullable=\"false\" length=\"100\"/>");
|
||||
stringBuffer.append("<column id=\"field0033\" type=\"0\" name=\"合同编号\" isNullable=\"false\" length=\"100\"/>");
|
||||
stringBuffer.append("<column id=\"field0034\" type=\"0\" name=\"发票文件\" isNullable=\"false\" length=\"20\"/>");
|
||||
stringBuffer.append("<column id=\"field0034\" type=\"0\" name=\"发票文件1\" isNullable=\"false\" length=\"20\"/>");
|
||||
stringBuffer.append("<column id=\"field0035\" type=\"0\" name=\"发票文件2\" isNullable=\"false\" length=\"20\"/>");
|
||||
stringBuffer.append("<column id=\"field0036\" type=\"0\" name=\"发票文件3\" isNullable=\"false\" length=\"20\"/>");
|
||||
stringBuffer.append("</definitions>");
|
||||
stringBuffer.append("<values>");
|
||||
|
||||
|
@ -631,8 +608,19 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
stringBuffer.append(jsonObject.getString("htbm") != null?"<![CDATA["+jsonObject.getString("htbm")+"]]>":"");
|
||||
stringBuffer.append("</value>").append("</column>");
|
||||
|
||||
stringBuffer.append("<column name=\"发票文件\">").append("<value>");
|
||||
stringBuffer.append(jsonObject.getString("fpwj") != null?"<![CDATA["+jsonObject.getString("url")+"]]>":"");
|
||||
stringBuffer.append("<column name=\"发票文件1\">").append("<value>");
|
||||
//stringBuffer.append(jsonObject.getString("url") != null?"<![CDATA["+jsonObject.getString("url")+"]]>":"");
|
||||
stringBuffer.append("");
|
||||
stringBuffer.append("</value>").append("</column>");
|
||||
|
||||
stringBuffer.append("<column name=\"发票文件2\">").append("<value>");
|
||||
//stringBuffer.append(jsonObject.getString("ofdurl") != null?"<![CDATA["+jsonObject.getString("ofdurl")+"]]>":"");
|
||||
stringBuffer.append("");
|
||||
stringBuffer.append("</value>").append("</column>");
|
||||
|
||||
stringBuffer.append("<column name=\"发票文件3\">").append("<value>");
|
||||
//stringBuffer.append(jsonObject.getString("xmlurl") != null?"<![CDATA["+jsonObject.getString("xmlurl")+"]]>":"");
|
||||
stringBuffer.append("");
|
||||
stringBuffer.append("</value>").append("</column>");
|
||||
|
||||
|
||||
|
@ -695,22 +683,36 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
|
||||
JSONObject businessDataStr = jsonStr.getJSONObject("businessDataStr");
|
||||
String eventType = jsonStr.getString("eventType");
|
||||
String ztbm = businessDataStr.getString("ztCode");//账套编码
|
||||
String cjzq = businessDataStr.getString("period");//采集账期
|
||||
String rwbm = businessDataStr.getString("taskNo");//任务编码
|
||||
switch (eventType) {
|
||||
case "onProcessFinished"://流程结束事件,同步物料到U8C
|
||||
JSONObject businessData = businessDataStr.getJSONObject("formmain_0708");
|
||||
if(businessData.getString("field0007") == null){//数据类型
|
||||
if(businessDataStr.getString("dataType") == null){//数据类型
|
||||
return BaseResult.getFailureMessageEntity("数据类型为空");
|
||||
}
|
||||
if(businessData.getString("field0007").equals("1")){//科目余额
|
||||
if(businessDataStr.getString("dataType").equals("1")){//科目余额
|
||||
taskExecutor.execute(() -> sendAccountCodeReport(ztbm,cjzq,rwbm));//科目余额
|
||||
return BaseResult.getSuccessMessageEntity("数据获取成功");
|
||||
}
|
||||
if(businessDataStr.getString("dataType").equals("2")){//财报
|
||||
|
||||
if(ztbm == null || "".equals(ztbm)){
|
||||
return BaseResult.getFailureMessageEntity("账套编码为空");
|
||||
}
|
||||
if(businessData.getString("field0007").equals("2")){//财报
|
||||
return sendFinancialReport(businessData);
|
||||
if(cjzq == null || "".equals(cjzq)){
|
||||
return BaseResult.getFailureMessageEntity("采集账期为空");
|
||||
}
|
||||
if(businessData.getString("field0007").equals("3")){//进项发票
|
||||
if(rwbm == null || "".equals(rwbm)){
|
||||
return BaseResult.getFailureMessageEntity("任务编码为空");
|
||||
}
|
||||
taskExecutor.execute(() -> sendFinancialReport(ztbm,cjzq,rwbm));
|
||||
return BaseResult.getSuccessMessageEntity("数据获取成功");
|
||||
}
|
||||
if(businessDataStr.getString("dataType").equals("3")){//进项发票
|
||||
return BaseResult.getFailureMessageEntity("数据类型错误");
|
||||
}
|
||||
if(businessData.getString("field0007").equals("4")){//销项发票
|
||||
if(businessDataStr.getString("dataType").equals("4")){//销项发票
|
||||
return BaseResult.getFailureMessageEntity("数据类型错误");
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("推送数据成功");
|
||||
|
@ -722,39 +724,77 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 发送财报数据
|
||||
* @Date 5:28 下午 2025/4/22
|
||||
* @param businessData
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
private JsonResultEntity sendFinancialReport(JSONObject businessData) {
|
||||
private JsonResultEntity sendAccountCodeReport(String ztbm, String cjzq, String rwbm) {
|
||||
String access_token = getToken();
|
||||
if (access_token == null) {
|
||||
return BaseResult.getFailureMessageEntity("token获取失败");
|
||||
}
|
||||
String url = uploadBalanceTableUrl+access_token;
|
||||
//通过公司编码、账期查询该单位的科目余额信息下发有度
|
||||
//查询当月帐套组织
|
||||
IncomeInvoiceEntity jnentity = new IncomeInvoiceEntity();
|
||||
jnentity.setDataSourceCode("htBip");
|
||||
jnentity.setSysData(cjzq);
|
||||
jnentity.setOrgCode(ztbm);
|
||||
//查询该账期下的科目余额
|
||||
List<JSONObject> jnlist = incomeInvoiceDao.queryAccount(jnentity);
|
||||
//正常来说数组不存在空的情况 如果为空就直接下发空数组给他们
|
||||
JSONObject sendData = new JSONObject();
|
||||
sendData.put("accessKey",accessKey);
|
||||
long timestamp = System.currentTimeMillis();
|
||||
sendData.put("timestamp",timestamp);
|
||||
sendData.put("taskNo",rwbm);
|
||||
sendData.put("period",cjzq);
|
||||
String a = YzfSignUtil.signRequest(sendData,accessSecret);
|
||||
sendData.put("sign",a);
|
||||
sendData.put("balanceTableList",jnlist);
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
headers.put("Content-Type", "application/json; charset=utf-8");
|
||||
String returndata = sendPost(url, headers, sendData.toJSONString());
|
||||
if (returndata != null && JSONObject.isValidObject(returndata)) {
|
||||
JSONObject dataJson = JSONObject.parseObject(returndata);
|
||||
if(dataJson != null && dataJson.getString("code") != null && "0".equals( dataJson.getString("code"))){
|
||||
JSONObject data = dataJson.getJSONObject("result");
|
||||
if(data != null ){
|
||||
if(data != null && data.getString("resultCode") != null && "0".equals( data.getString("resultCode"))){
|
||||
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("发送失败:"+data.getString("message"));
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("发送失败:"+returndata);
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("发送失败:"+returndata);
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("发送失败:"+returndata);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description
|
||||
* @Date 3:18 下午 2025/4/24
|
||||
* @param ztbm 账套编码
|
||||
* @param cjzq 采集账期
|
||||
* @param rwbm 任务编码
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
private JsonResultEntity sendFinancialReport(String ztbm ,String cjzq,String rwbm) {
|
||||
String access_token = "";
|
||||
if(flags){
|
||||
access_token = getToken();
|
||||
if (access_token == null) {
|
||||
return BaseResult.getFailureMessageEntity("token获取失败");
|
||||
}
|
||||
}
|
||||
|
||||
String url = cbUrl+access_token;
|
||||
String ztbm = businessData.getString("field0005");//账套编码
|
||||
String sh = businessData.getString("field0006");//税号
|
||||
String sjlx = businessData.getString("field0007");//数据类型
|
||||
String cjzq = businessData.getString("field0008");//采集账期
|
||||
String rwbm = businessData.getString("field0009");//任务编码
|
||||
if(ztbm == null || "".equals(ztbm)){
|
||||
return BaseResult.getSuccessMessageEntity("账套编码为空");
|
||||
}
|
||||
if(cjzq == null || "".equals(cjzq)){
|
||||
return BaseResult.getSuccessMessageEntity("采集账期为空");
|
||||
}
|
||||
if(rwbm == null || "".equals(rwbm)){
|
||||
return BaseResult.getSuccessMessageEntity("任务编码为空");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Date date = null;
|
||||
String qncjzq = null;
|
||||
|
||||
IncomeInvoiceEntity dyAloneId = null;
|
||||
JSONObject dydata = null;
|
||||
JSONObject qndata = null;
|
||||
|
@ -774,7 +814,7 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
|
||||
//查询当月帐套组织
|
||||
IncomeInvoiceEntity jnentity = new IncomeInvoiceEntity();
|
||||
jnentity.setDataSourceCode("");
|
||||
jnentity.setDataSourceCode("htBip");
|
||||
jnentity.setSysData(cjzq);
|
||||
jnentity.setOrgCode(ztbm);
|
||||
List<IncomeInvoiceEntity> jnlist = incomeInvoiceDao.queryZtzz(jnentity);
|
||||
|
@ -785,7 +825,7 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
}
|
||||
//查询去年当帐套组织
|
||||
IncomeInvoiceEntity qnentity = new IncomeInvoiceEntity();
|
||||
qnentity.setDataSourceCode("");
|
||||
qnentity.setDataSourceCode("htBip");
|
||||
qnentity.setSysData(qncjzq);
|
||||
qnentity.setOrgCode(ztbm);
|
||||
List<IncomeInvoiceEntity> qnlist = incomeInvoiceDao.queryZtzz(qnentity);
|
||||
|
@ -797,7 +837,7 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
|
||||
//查询当月的财报数据
|
||||
IncomeInvoiceEntity jnquerydata = new IncomeInvoiceEntity();
|
||||
jnquerydata.setDataSourceCode("");
|
||||
jnquerydata.setDataSourceCode("htBip");
|
||||
jnquerydata.setAloneId(dyAloneId.getAloneId());
|
||||
List<JSONObject> dydataList = incomeInvoiceDao.queryByAloneId(jnquerydata);
|
||||
if(dydataList != null && dydataList.size() == 1){
|
||||
|
@ -809,7 +849,7 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
if(qnAloneId != null){
|
||||
//查找去年数据
|
||||
IncomeInvoiceEntity qnquerydata = new IncomeInvoiceEntity();
|
||||
qnquerydata.setDataSourceCode("");
|
||||
qnquerydata.setDataSourceCode("htBip");
|
||||
qnquerydata.setAloneId(qnAloneId.getAloneId());
|
||||
List<JSONObject> qndataList = incomeInvoiceDao.queryByAloneId(qnquerydata);
|
||||
if(qndataList != null && qndataList.size() == 1){
|
||||
|
@ -818,45 +858,167 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
}
|
||||
//拼接数据
|
||||
JSONObject sendData = new JSONObject();
|
||||
sendData.put("accessKey",accessKey);
|
||||
long timestamp = System.currentTimeMillis();
|
||||
|
||||
if(flags){
|
||||
sendData.put("accessKey",accessKey);
|
||||
sendData.put("timestamp",timestamp);
|
||||
}
|
||||
sendData.put("taskNo",rwbm);
|
||||
sendData.put("period",cjzq);
|
||||
|
||||
JSONArray reportList = new JSONArray();
|
||||
|
||||
JSONObject zcfzb = new JSONObject();//资产负债表
|
||||
JSONObject zcfzb = new JSONObject();//资产负债表1:期末余额 2:年初余额
|
||||
zcfzb.put("period",cjzq);
|
||||
zcfzb.put("reportType",1);
|
||||
JSONArray reportSubjects1 = new JSONArray();
|
||||
setDataToArray("subjectName","12312",1,reportSubjects1);
|
||||
setDataToArray("货币资金",dydata.getString("AM10251"),dydata.getString("AM10250"),reportSubjects1);
|
||||
setDataToArray("短期借款",dydata.getString("AM10249"),dydata.getString("AM10248"),reportSubjects1);
|
||||
setDataToArray("交易性金融资产",dydata.getString("BMPQW10U"),dydata.getString("BMP81A2Z"),reportSubjects1);
|
||||
setDataToArray("以公允价值计量且其变动计入当期损益的金融负债",dydata.getString("AM10227"),dydata.getString("AM10226"),reportSubjects1);
|
||||
setDataToArray("应收票据",dydata.getString("AM10189"),dydata.getString("AM10188"),reportSubjects1);
|
||||
setDataToArray("应付票据",dydata.getString("AM10187"),dydata.getString("AM10186"),reportSubjects1);
|
||||
setDataToArray("应收账款",dydata.getString("AM10171"),dydata.getString("AM10170"),reportSubjects1);
|
||||
setDataToArray("应付账款",dydata.getString("AM10169"),dydata.getString("AM10168"),reportSubjects1);
|
||||
setDataToArray("减:坏账准备",dydata.getString("AM10153"),dydata.getString("AM10152"),reportSubjects1);
|
||||
setDataToArray("预收款项",dydata.getString("AM10151"),dydata.getString("AM10150"),reportSubjects1);
|
||||
setDataToArray("预付款项",dydata.getString("AM10135"),dydata.getString("AM10134"),reportSubjects1);
|
||||
setDataToArray("合同负债",dydata.getString("AM10133"),dydata.getString("AM10132"),reportSubjects1);
|
||||
setDataToArray("应收利息",dydata.getString("AM10117"),dydata.getString("AM10116"),reportSubjects1);
|
||||
setDataToArray("应付职工薪酬",dydata.getString("AM10115"),dydata.getString("AM10114"),reportSubjects1);
|
||||
setDataToArray("应收股利",dydata.getString("AM10099"),dydata.getString("AM10098"),reportSubjects1);
|
||||
setDataToArray("应交税费",dydata.getString("AM10097"),dydata.getString("AM10096"),reportSubjects1);
|
||||
setDataToArray("其他应收款",dydata.getString("AM10081"),dydata.getString("AM10080"),reportSubjects1);
|
||||
setDataToArray("应付利息",dydata.getString("AM10079"),dydata.getString("AM10078"),reportSubjects1);
|
||||
setDataToArray("减:坏账准备",dydata.getString("AM10063"),dydata.getString("AM10062"),reportSubjects1);
|
||||
setDataToArray("应付股利",dydata.getString("AM10061"),dydata.getString("AM10060"),reportSubjects1);
|
||||
setDataToArray("存货",dydata.getString("AM10048"),dydata.getString("AM10047"),reportSubjects1);
|
||||
setDataToArray("其他应付款",dydata.getString("AM10046"),dydata.getString("AM10045"),reportSubjects1);
|
||||
setDataToArray("合同资产",dydata.getString("AM10033"),dydata.getString("AM10032"),reportSubjects1);
|
||||
setDataToArray("其他流动资产",dydata.getString("AM10348"),dydata.getString("AM10347"),reportSubjects1);
|
||||
setDataToArray("长期借款",dydata.getString("AM10316"),dydata.getString("AM10315"),reportSubjects1);
|
||||
setDataToArray("应付债券",dydata.getString("AM10301"),dydata.getString("AM10300"),reportSubjects1);
|
||||
setDataToArray("债权投资",dydata.getString("AM10288"),dydata.getString("AM10287"),reportSubjects1);
|
||||
setDataToArray("长期应收款",dydata.getString("AM10268"),dydata.getString("AM10266"),reportSubjects1);
|
||||
setDataToArray("长期股权投资",dydata.getString("AM10246"),dydata.getString("AM10244"),reportSubjects1);
|
||||
setDataToArray("租赁负债",dydata.getString("AM10242"),dydata.getString("AM10241"),reportSubjects1);
|
||||
setDataToArray("长期应付款",dydata.getString("AM10220"),dydata.getString("AM10219"),reportSubjects1);
|
||||
setDataToArray("其他非流动金融资产",dydata.getString("BMS13DPL"),dydata.getString("BM6TFKPL"),reportSubjects1);
|
||||
setDataToArray("专项应付款",dydata.getString("AM10198"),dydata.getString("AM10197"),reportSubjects1);
|
||||
setDataToArray("投资性房地产",dydata.getString("AM10224"),dydata.getString("AM10222"),reportSubjects1);
|
||||
setDataToArray("预计负债",dydata.getString("AM10180"),dydata.getString("AM10179"),reportSubjects1);
|
||||
setDataToArray("递延收益",dydata.getString("AM10162"),dydata.getString("AM10161"),reportSubjects1);
|
||||
setDataToArray("递延所得税负债",dydata.getString("AM10144"),dydata.getString("AM10143"),reportSubjects1);
|
||||
setDataToArray("固定资产",dydata.getString("AM10202"),dydata.getString("AM10200"),reportSubjects1);
|
||||
setDataToArray("减:累计折旧",dydata.getString("AM10184"),dydata.getString("AM10182"),reportSubjects1);
|
||||
setDataToArray("减:固定资产减值准备",dydata.getString("AM10166"),dydata.getString("AM10164"),reportSubjects1);
|
||||
setDataToArray("在建工程",dydata.getString("AM10148"),dydata.getString("AM10146"),reportSubjects1);
|
||||
setDataToArray("实收资本(或股本)",dydata.getString("AM10054"),dydata.getString("AM10053"),reportSubjects1);
|
||||
setDataToArray("工程物资",dydata.getString("AM10130"),dydata.getString("AM10128"),reportSubjects1);
|
||||
setDataToArray("固定资产清理",dydata.getString("AM10112"),dydata.getString("AM10110"),reportSubjects1);
|
||||
setDataToArray("资本公积",dydata.getString("AM10354"),dydata.getString("AM10352"),reportSubjects1);
|
||||
setDataToArray("使用权资产",dydata.getString("AM10058"),dydata.getString("AM10056"),reportSubjects1);
|
||||
setDataToArray("减:库存股",dydata.getString("AM10339"),dydata.getString("AM10337"),reportSubjects1);
|
||||
setDataToArray("减:累计折旧",dydata.getString("AM10043"),dydata.getString("AM10041"),reportSubjects1);
|
||||
setDataToArray("减:使用权资产减值准备",dydata.getString("AM10028"),dydata.getString("AM10026"),reportSubjects1);
|
||||
setDataToArray("盈余公积",dydata.getString("AM10309"),dydata.getString("AM10307"),reportSubjects1);
|
||||
setDataToArray("无形资产",dydata.getString("AM10013"),dydata.getString("AM10011"),reportSubjects1);
|
||||
setDataToArray("未分配利润",dydata.getString("AM10294"),dydata.getString("AM10292"),reportSubjects1);
|
||||
setDataToArray("减:累计摊销",dydata.getString("CM10002"),dydata.getString("CM10000"),reportSubjects1);
|
||||
setDataToArray("减:无形资产减值准备",dydata.getString("AM10342"),dydata.getString("AM10340"),reportSubjects1);
|
||||
setDataToArray("开发支出",dydata.getString("AM10327"),dydata.getString("AM10325"),reportSubjects1);
|
||||
setDataToArray("商誉",dydata.getString("AM10312"),dydata.getString("AM10310"),reportSubjects1);
|
||||
setDataToArray("长期待摊费用",dydata.getString("AM10297"),dydata.getString("AM10295"),reportSubjects1);
|
||||
setDataToArray("递延所得税资产",dydata.getString("AM10283"),dydata.getString("AM10281"),reportSubjects1);
|
||||
setDataToArray("其他非流动资产",dydata.getString("AM10259"),dydata.getString("AM10257"),reportSubjects1);
|
||||
|
||||
|
||||
zcfzb.put("reportSubjects",reportSubjects1);
|
||||
|
||||
JSONObject llb = new JSONObject();//利润表
|
||||
JSONObject llb = new JSONObject();//利润表1:本年累计 2:上年累计
|
||||
llb.put("period",cjzq);
|
||||
llb.put("reportType",2);
|
||||
JSONArray reportSubjects2 = new JSONArray();
|
||||
|
||||
setDataToArray("一、营业收入",dydata.getString("AM10267"),qndata.getString("AM10267"),reportSubjects2);
|
||||
setDataToArray("其中:主营业务收入",dydata.getString("AM10245"),qndata.getString("AM10245"),reportSubjects2);
|
||||
setDataToArray("其他业务收入",dydata.getString("AM10223"),qndata.getString("AM10223"),reportSubjects2);
|
||||
setDataToArray("减:营业成本",dydata.getString("AM10201"),qndata.getString("AM10201"),reportSubjects2);
|
||||
setDataToArray("其中:主营业务成本",dydata.getString("AM10183"),qndata.getString("AM10183"),reportSubjects2);
|
||||
setDataToArray("其他业务成本",dydata.getString("AM10165"),qndata.getString("AM10165"),reportSubjects2);
|
||||
setDataToArray("税金及附加",dydata.getString("AM10147"),qndata.getString("AM10147"),reportSubjects2);
|
||||
setDataToArray("销售费用",dydata.getString("AM10129"),qndata.getString("AM10129"),reportSubjects2);
|
||||
setDataToArray("管理费用",dydata.getString("AM10111"),qndata.getString("AM10111"),reportSubjects2);
|
||||
setDataToArray("财务费用(收益以\"-\"号填列)",dydata.getString("AM10093"),qndata.getString("AM10093"),reportSubjects2);
|
||||
setDataToArray("其中:利息费用",dydata.getString("AM10075"),qndata.getString("AM10075"),reportSubjects2);
|
||||
setDataToArray("利息收入",dydata.getString("AM10057"),qndata.getString("AM10057"),reportSubjects2);
|
||||
setDataToArray("研发费用",dydata.getString("AM10042"),qndata.getString("AM10042"),reportSubjects2);
|
||||
setDataToArray("资产减值损失",dydata.getString("AM10027"),qndata.getString("AM10027"),reportSubjects2);
|
||||
setDataToArray("信用减值损失",dydata.getString("AM10012"),qndata.getString("AM10012"),reportSubjects2);
|
||||
setDataToArray("加:公允价值变动净收益(净损失以\"-\"号填列)",dydata.getString("CM10003"),qndata.getString("CM10003"),reportSubjects2);
|
||||
setDataToArray("投资净收益(净损失以\"-\"号填列)",dydata.getString("AM10343"),qndata.getString("AM10343"),reportSubjects2);
|
||||
setDataToArray("资产处置收益(净损失以\"-\"号填列)",dydata.getString("AM10328"),qndata.getString("AM10328"),reportSubjects2);
|
||||
setDataToArray("其他收益",dydata.getString("AM10313"),qndata.getString("AM10313"),reportSubjects2);
|
||||
setDataToArray("二、营业利润",dydata.getString("AM10298"),qndata.getString("AM10298"),reportSubjects2);
|
||||
setDataToArray("加:营业外收入",dydata.getString("AM10282"),qndata.getString("AM10282"),reportSubjects2);
|
||||
setDataToArray("减:营业外支出",dydata.getString("AM10258"),qndata.getString("AM10258"),reportSubjects2);
|
||||
setDataToArray("三、利润总额(亏损总额以“-”号填列)",dydata.getString("AM10236"),qndata.getString("AM10236"),reportSubjects2);
|
||||
setDataToArray("减:所得税费用",dydata.getString("AM10214"),qndata.getString("AM10214"),reportSubjects2);
|
||||
setDataToArray("四、净利润(净亏损以“-”号填列)",dydata.getString("AM10193"),qndata.getString("AM10193"),reportSubjects2);
|
||||
|
||||
llb.put("reportSubjects",reportSubjects2);
|
||||
|
||||
JSONObject xjll = new JSONObject();//现金流量表
|
||||
JSONObject xjll = new JSONObject();//现金流量表1:本年累计 2:上年累计
|
||||
xjll.put("period",cjzq);
|
||||
xjll.put("reportType",3);
|
||||
JSONArray reportSubjects3 = new JSONArray();
|
||||
setDataToArray("销售商品、提供劳务收到的现金",dydata.getString("AM10240"),qndata.getString("AM10240"),reportSubjects3);
|
||||
setDataToArray("收到的税费返还",dydata.getString("AM10218"),qndata.getString("AM10218"),reportSubjects3);
|
||||
setDataToArray("收到的其他与经营活动有关的现金",dydata.getString("AM10196"),qndata.getString("AM10196"),reportSubjects3);
|
||||
setDataToArray("现金收入小计",dydata.getString("AM10160"),qndata.getString("AM10160"),reportSubjects3);
|
||||
setDataToArray("购买商品、接受劳务支付的现金",dydata.getString("AM10142"),qndata.getString("AM10142"),reportSubjects3);
|
||||
setDataToArray("支付给职工以及为职工支付的现金",dydata.getString("AM10124"),qndata.getString("AM10124"),reportSubjects3);
|
||||
setDataToArray("支付的各项税费",dydata.getString("AM10106"),qndata.getString("AM10106"),reportSubjects3);
|
||||
setDataToArray("支付的其他与经营活动有关的现金",dydata.getString("AM10088"),qndata.getString("AM10088"),reportSubjects3);
|
||||
setDataToArray("现金流出小计",dydata.getString("AM10052"),qndata.getString("AM10052"),reportSubjects3);
|
||||
setDataToArray("经营活动产生的现金流量净额",dydata.getString("AM10022"),qndata.getString("AM10022"),reportSubjects3);
|
||||
setDataToArray("收回投资所收到的现金",dydata.getString("AM10353"),qndata.getString("AM10353"),reportSubjects3);
|
||||
setDataToArray("取得投资收益所收到的现金",dydata.getString("AM10338"),qndata.getString("AM10338"),reportSubjects3);
|
||||
setDataToArray("处置固定资产、无形资产和其他长期资产所收回的现金净额",dydata.getString("AM10323"),qndata.getString("AM10323"),reportSubjects3);
|
||||
setDataToArray("处置子公司及其他营业单位收到的现金净额",dydata.getString("AM10308"),qndata.getString("AM10308"),reportSubjects3);
|
||||
setDataToArray("收到的其他与投资活动有关的现金",dydata.getString("AM10293"),qndata.getString("AM10293"),reportSubjects3);
|
||||
setDataToArray("现金流入小计",dydata.getString("AM10277"),qndata.getString("AM10277"),reportSubjects3);
|
||||
setDataToArray("购建固定资产、无形资产和其他长期资产所支付的现金",dydata.getString("AM10253"),qndata.getString("AM10253"),reportSubjects3);
|
||||
setDataToArray("投资所支付的现金",dydata.getString("AM10231"),qndata.getString("AM10231"),reportSubjects3);
|
||||
setDataToArray("取得子公司及其他营业单位收到的现金净额",dydata.getString("AM10209"),qndata.getString("AM10209"),reportSubjects3);
|
||||
setDataToArray("其他与投资有关",dydata.getString("AM10191"),qndata.getString("AM10191"),reportSubjects3);
|
||||
setDataToArray("现金流出小计",dydata.getString("AM10173"),qndata.getString("AM10173"),reportSubjects3);
|
||||
setDataToArray("投资活动产生的现金流量净额",dydata.getString("AM10155"),qndata.getString("AM10155"),reportSubjects3);
|
||||
setDataToArray("吸收投资所收到的现金",dydata.getString("AM10119"),qndata.getString("AM10119"),reportSubjects3);
|
||||
setDataToArray("子公司吸收少数股东投资收到的现金",dydata.getString("AM10101"),qndata.getString("AM10101"),reportSubjects3);
|
||||
setDataToArray("借贷所收到现金",dydata.getString("AM10083"),qndata.getString("AM10083"),reportSubjects3);
|
||||
setDataToArray("发行债券收到的现金",dydata.getString("AM10065"),qndata.getString("AM10065"),reportSubjects3);
|
||||
setDataToArray("收到的其他与筹资活动有关的现金",dydata.getString("AM10050"),qndata.getString("AM10050"),reportSubjects3);
|
||||
setDataToArray("现金流入小计",dydata.getString("AM10035"),qndata.getString("AM10035"),reportSubjects3);
|
||||
setDataToArray("偿还债务所支付的现金",dydata.getString("AM10020"),qndata.getString("AM10020"),reportSubjects3);
|
||||
setDataToArray("分配股利、利润、偿付利息所支付的现金",dydata.getString("AM10005"),qndata.getString("AM10005"),reportSubjects3);
|
||||
setDataToArray("支付的其他与筹资活动有关的现金",dydata.getString("AM10350"),qndata.getString("AM10350"),reportSubjects3);
|
||||
setDataToArray("现金流出小计",dydata.getString("AM10335"),qndata.getString("AM10335"),reportSubjects3);
|
||||
setDataToArray("筹资活动产生的现金流量净额",dydata.getString("AM10320"),qndata.getString("AM10320"),reportSubjects3);
|
||||
setDataToArray("四、汇率变动对现金流量的影响",dydata.getString("AM10305"),qndata.getString("AM10305"),reportSubjects3);
|
||||
setDataToArray("五、现金及现金等价物净增加额",dydata.getString("AM10290"),qndata.getString("AM10290"),reportSubjects3);
|
||||
|
||||
xjll.put("reportSubjects",reportSubjects3);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
reportList.add(zcfzb);
|
||||
reportList.add(llb);
|
||||
reportList.add(xjll);
|
||||
|
||||
sendData.put("reportList",reportList);
|
||||
if(flags) {
|
||||
String a = YzfSignUtil.signRequest(sendData,accessSecret);
|
||||
sendData.put("sign",a);
|
||||
|
||||
}
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
headers.put("Content-Type", "application/json; charset=utf-8");
|
||||
String returndata = sendPost(url, headers, sendData.toJSONString());
|
||||
|
@ -869,7 +1031,7 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
if(data != null && data.getString("resultCode") != null && "0".equals( data.getString("resultCode"))){
|
||||
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("发送失败:"+returndata);
|
||||
return BaseResult.getFailureMessageEntity("发送失败:"+data.getString("message"));
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("发送失败:"+returndata);
|
||||
|
@ -882,12 +1044,19 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
}
|
||||
}
|
||||
|
||||
private void setDataToArray(String subjectName, String value, Integer valueType, JSONArray reportSubjects) {
|
||||
private void setDataToArray(String subjectName, String value,String value2, JSONArray reportSubjects) {
|
||||
if(value != null && !"".equals(value)){
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("subjectName",subjectName);
|
||||
jsonObject.put("value",new BigDecimal(value));
|
||||
jsonObject.put("valueType",valueType);
|
||||
jsonObject.put("valueType",1);
|
||||
reportSubjects.add(jsonObject);
|
||||
}
|
||||
if(value2 != null && !"".equals(value2)){
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("subjectName",subjectName);
|
||||
jsonObject.put("value",new BigDecimal(value2));
|
||||
jsonObject.put("valueType",2);
|
||||
reportSubjects.add(jsonObject);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -826,7 +826,7 @@ public class ZxBankDistributePluginInitializer extends PluginBaseEntity {
|
|||
/** body */
|
||||
String bodys = doObjects.get(i).toJSONString();
|
||||
if(scriptEntity != null && scriptEntity.getId() != null ){
|
||||
logger.info("=========开始执行正常主数据修改下发脚本,第一次==============");
|
||||
logger.info("=========开始执行正常中信司库付款单修改下发脚本,第一次==============");
|
||||
groovy.put("code",scriptEntity.getScriptCode());
|
||||
groovy.put("className",scriptEntity.getClassName());
|
||||
groovy.put("name",scriptEntity.getScriptName());
|
||||
|
@ -854,7 +854,7 @@ public class ZxBankDistributePluginInitializer extends PluginBaseEntity {
|
|||
headers.putAll(header);
|
||||
}
|
||||
if (SysEnum.NEED_LOGIN.getValue().equals(apiEntity.getNeedLogin())) {
|
||||
logger.info("=========正常主数据修改开始执行登录接口==============");
|
||||
logger.info("=========正常中信司库付款单修改开始执行登录接口==============");
|
||||
//找到登陆接口
|
||||
SysApplicationApiEntity loginApi = sysApplicationApiDao.get(apiEntity.getAuthenticationPort());
|
||||
if (null == loginApi) {
|
||||
|
@ -875,28 +875,42 @@ public class ZxBankDistributePluginInitializer extends PluginBaseEntity {
|
|||
continue;
|
||||
}
|
||||
JSONObject attritube = JSONObject.parseObject(rzjsonResultEntity.getAttribute().toString());
|
||||
logger.info("=======主数据正常修改下发登录返回数据:{}========",attritube.toJSONString());
|
||||
logger.info("=======中信司库付款单正常修改下发登录返回数据:{}========",attritube.toJSONString());
|
||||
querys = getQuery(apiEntity,querys,attritube);
|
||||
headers = getHeaders(apiEntity,headers,attritube);
|
||||
bodys = getBodys(apiEntity,bodys,attritube);
|
||||
}
|
||||
//组装数据发送
|
||||
logger.info("=========开始执行主业务修改数据下发脚本,第二次==============");
|
||||
logger.info("=========开始执行中信司库付款单修改数据下发脚本,第二次==============");
|
||||
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
|
||||
logger.info("=====主数据修改下发返回结果为:{}",JSONObject.parseObject(jsonResultEntity.getAttribute().toString()).toJSONString());
|
||||
logger.info("=====中信司库付款单修改下发返回结果为:{}",JSONObject.parseObject(jsonResultEntity.getAttribute().toString()).toJSONString());
|
||||
if(jsonResultEntity.isFlag()){
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"2");
|
||||
//修改下发状态
|
||||
logger.info("===中信司库付款单正常下发时候完毕更新新增状态为1=======");
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "F");
|
||||
updateMap.put("updateStatus", "1");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
continue;
|
||||
}else {
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"2");
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "F");
|
||||
updateMap.put("updateStatus", "2");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//所有下发发送完成,修改数据状态
|
||||
/*//所有下发发送完成,修改数据状态
|
||||
for (int i = 0; i < objects.size(); i++) {
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
|
@ -904,7 +918,7 @@ public class ZxBankDistributePluginInitializer extends PluginBaseEntity {
|
|||
updateMap.put("updateStatus", "1");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1083,19 +1097,19 @@ public class ZxBankDistributePluginInitializer extends PluginBaseEntity {
|
|||
continue;
|
||||
}
|
||||
JSONObject attritube = JSONObject.parseObject(rzjsonResultEntity.getAttribute().toString());
|
||||
logger.info("=======主数据正常新增下发登录返回数据:{}========",attritube.toJSONString());
|
||||
logger.info("=======中信司库付款单数据正常新增下发登录返回数据:{}========",attritube.toJSONString());
|
||||
querys = getQuery(apiEntity,querys,attritube);
|
||||
headers = getHeaders(apiEntity,headers,attritube);
|
||||
bodys = getBodys(apiEntity,bodys,attritube);
|
||||
}
|
||||
|
||||
//组装数据发送
|
||||
logger.info("=========开始执行主业务新增数据下发脚本,第二次==============");
|
||||
logger.info("=========开始执行中信司库付款单新增数据下发脚本,第二次==============");
|
||||
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
|
||||
logger.info("=====主数据新增下发返回结果为:{}",JSONObject.parseObject(jsonResultEntity.getAttribute().toString()).toJSONString());
|
||||
logger.info("=====中信司库付款单新增下发返回结果为:{}",JSONObject.parseObject(jsonResultEntity.getAttribute().toString()).toJSONString());
|
||||
if(jsonResultEntity.isFlag()){
|
||||
if (scriptEntity != null && scriptEntity.getId() != null && scriptEntity.getBackScriptData() != null ) {
|
||||
logger.info("=========开始执行主数据新增返回脚本==============");
|
||||
logger.info("=========开始执行中信司库付款单新增返回脚本==============");
|
||||
JSONObject backScriptJson = new JSONObject();
|
||||
backScriptJson.put("data", jsonResultEntity.getAttribute());
|
||||
groovy.put("code", scriptEntity.getScriptCode()+"back");
|
||||
|
@ -1124,30 +1138,54 @@ public class ZxBankDistributePluginInitializer extends PluginBaseEntity {
|
|||
mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
|
||||
mdmModuleDistributeTripartiteEntity.setTripartiteId(backJsonResultEntity.getString("tripartiteId"));
|
||||
mdmModuleDistributeTripartiteDao.save(mdmModuleDistributeTripartiteEntity);
|
||||
//修改下发状态
|
||||
logger.info("===中信司库付款单正常下发时候完毕更新新增状态为1=======");
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "Y");
|
||||
updateMap.put("addStatus", "1");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
||||
logger.error("中信司库付款单新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","新增返回脚本解析保存三方id错误",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
//修改下发状态
|
||||
logger.info("===中信司库付款单正常下发时候完毕更新新增状态为2=======");
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "Y");
|
||||
updateMap.put("addStatus", "2");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
objects.get(i).put("sendsanfzt123",true);
|
||||
logger.info("========主数据新增下发完成,日志保存为成功============");
|
||||
logger.info("========中信司库付款单新增下发完成,日志保存为成功============");
|
||||
continue;
|
||||
}else {
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
objects.get(i).put("sendsanfzt123",false);
|
||||
logger.info("========主数据新增下发完成,日志保存为失败============");
|
||||
logger.info("========中信司库付款单新增下发完成,日志保存为失败============");
|
||||
//修改下发状态
|
||||
logger.info("===中信司库付款单正常下发时候完毕更新新增状态为2=======");
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "Y");
|
||||
updateMap.put("addStatus", "2");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//所有下发发送完成,修改数据状态
|
||||
/* //所有下发发送完成,修改数据状态
|
||||
for (int i = 0; i < objects.size(); i++) {
|
||||
if(objects.get(i).getBoolean("sendsanfzt123")){
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
|
@ -1157,7 +1195,7 @@ public class ZxBankDistributePluginInitializer extends PluginBaseEntity {
|
|||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private void saveMdmModuleSendLogEntity(Long mdmCode,String distributeId,String dataType,String remark,String dbname,String formmain_id, String target_app, String appId, String target_api,String apiID, String source_data, String option_type) throws Exception {
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
#######################dev环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: warn
|
||||
encodings: GBK
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /home/webservice/zt/log
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /home/webservice/zt/file
|
||||
# path: D:\webservice\file
|
||||
# pluginpath: D:\webservice\plugin
|
||||
pluginpath: /home/webservice/zt/plugin
|
||||
# tomcatpath: D:\apache-tomcat-9.0.69\webapps\kangarooDataCenter\WEB-INF\classes\
|
||||
tomcatpath: /home/webservice/zt/tomcatV3/webapps/kangarooDataCenterV3/WEB-INF/classes/
|
||||
cbs8:
|
||||
appId: 1P4AGrpz
|
||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||
cbs_public_key: 0469146F06BF3B01236E84632441E826
|
||||
#电子回单下载临时存放位置
|
||||
elec_path: /Users/xiangerlin/Downloads/
|
||||
OA:
|
||||
data_source_code: yc_oa
|
||||
zt:
|
||||
url: http://127.0.0.1:9082/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -1,5 +1,6 @@
|
|||
package com.hzya.frame.execsql.service;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.hzya.frame.datasource.DataSourceUtil;
|
||||
import com.hzya.frame.execsql.entity.ExecSqlEntity;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
|
@ -80,7 +81,7 @@ public class ExecSqlServiceImpl implements IExecSqlService {
|
|||
@Override
|
||||
public int execUpdateSql(String sql, String data_source_code) throws Exception {
|
||||
logger.info("=============进入execUpdateSql方法============");
|
||||
if (ObjectUtils.isEmpty(sql)) {
|
||||
if (StrUtil.isNotEmpty(sql)) {
|
||||
if (sql.contains("where") || sql.contains("WHERE")) {
|
||||
// SqlSession sqlSession = getSqlSession(data_source_code);
|
||||
// SqlSession sqlSession = new DataSourceUtil().getDefaultSqlSession();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -18,11 +18,11 @@
|
|||
<artifactId>base-service</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
||||
<!-- <artifactId>fw-bip</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<artifactId>fw-bip</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
||||
<!-- <artifactId>fw-cbs</artifactId>-->
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>kangarooDataCenterV3</artifactId>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>fw-bip</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>${revision}</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<artifactId>base-service</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql-connector-java}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.hzya.bip</groupId>
|
||||
<artifactId>pubbaseapp_nccloud_rtLevel</artifactId>
|
||||
<version>1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/pubbaseapp_nccloud_rtLevel-1.jar</systemPath>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.bipyonyoulog</groupId>-->
|
||||
<!-- <artifactId>yonyoulog</artifactId>-->
|
||||
<!-- <version>1</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${basedir}/src/main/resources/lib/yonyoulog.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.bcprov</groupId>-->
|
||||
<!-- <artifactId>bcprov</artifactId>-->
|
||||
<!-- <version>1</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${basedir}/src/main/resources/lib/bcprov-jdk15on-1.70.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.DataApiSdk</groupId>-->
|
||||
<!-- <artifactId>DataApiSdk</artifactId>-->
|
||||
<!-- <version>1</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${basedir}/src/main/resources/lib/DataApiSdk-jar-with-dependencies.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.openBasicSDK</groupId>-->
|
||||
<!-- <artifactId>openBasicSDK</artifactId>-->
|
||||
<!-- <version>1</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${basedir}/src/main/resources/lib/openBasicSDK-2.1.230630.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
||||
<classifier>execute</classifier> <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IBipArchivesDao extends IBaseDao<BipArchivesEntity, String> {
|
||||
|
||||
List<BipArchivesEntity> queryArchivesData(BipArchivesEntity archivesEntity);
|
||||
List<BipArchivesEntity> queryArchivesDatays(BipArchivesEntity archivesEntity);
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IBipOrgsDao extends IBaseDao<BipOrgsEntity, String> {
|
||||
|
||||
/**
|
||||
* 查询BIP业务单元
|
||||
* @param BipOrgsEntity
|
||||
* @return
|
||||
*/
|
||||
List<BipOrgsEntity> thirdInterfaceGetOrgs(BipOrgsEntity BipOrgsEntity);
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsDetailsEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IBipOrgsDetailsDao extends IBaseDao<BipOrgsDetailsEntity, String> {
|
||||
|
||||
/**
|
||||
* 查询BIP业务单元银行账户
|
||||
* @param BipOrgsDetailsEntity
|
||||
* @return
|
||||
*/
|
||||
List<BipOrgsDetailsEntity> thirdInterfaceGetOrgsDetails(BipOrgsDetailsEntity BipOrgsDetailsEntity);
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IBipSupplierDao extends IBaseDao<BipSupplierEntity, String> {
|
||||
|
||||
/**
|
||||
* 查询BIP供应商
|
||||
* @param bipSupplierEntity
|
||||
* @return
|
||||
*/
|
||||
List<BipSupplierEntity> thirdInterfaceGetSupplier(BipSupplierEntity bipSupplierEntity);
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierDetailsEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IBipSupplierDetailsDao extends IBaseDao<BipSupplierDetailsEntity, String> {
|
||||
|
||||
/**
|
||||
* 查询BIP供应商明细
|
||||
* @param bipSupplierDetailsEntity
|
||||
* @return
|
||||
*/
|
||||
List<BipSupplierDetailsEntity> thirdInterfaceGetSupplierDetails(BipSupplierDetailsEntity bipSupplierDetailsEntity);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipArchivesDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository("bipArchivesDaoImpl")
|
||||
public class BipArchivesDaoImpl extends MybatisGenericDao<BipArchivesEntity,String> implements IBipArchivesDao {
|
||||
|
||||
@Override
|
||||
public List<BipArchivesEntity> queryArchivesData(BipArchivesEntity entity) {
|
||||
List<BipArchivesEntity> o = super.query(getSqlIdPrifx() + "queryArchivesData", entity);
|
||||
return o;
|
||||
} @Override
|
||||
public List<BipArchivesEntity> queryArchivesDatays(BipArchivesEntity entity) {
|
||||
List<BipArchivesEntity> o = super.query(getSqlIdPrifx() + "queryArchivesDatays", entity);
|
||||
return o;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository("bipOrgsDaoImpl")
|
||||
public class BipOrgsDaoImpl extends MybatisGenericDao<BipOrgsEntity,String> implements IBipOrgsDao {
|
||||
/**
|
||||
* 查询BIP业务单元
|
||||
* @param BipOrgsEntity
|
||||
* @return
|
||||
*/
|
||||
@DS("oracle91")
|
||||
@Override
|
||||
public List<BipOrgsEntity> thirdInterfaceGetOrgs(BipOrgsEntity BipOrgsEntity) {
|
||||
return super.query("com.hzya.frame.bip.v3.v2207.dao.impl.BipOrgsDaoImpl.thirdInterfaceGetOrgs",BipOrgsEntity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsDetailsEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository("bipOrgsDetailsDaoImpl")
|
||||
public class BipOrgsDetailsDaoImpl extends MybatisGenericDao<BipOrgsDetailsEntity,String> implements IBipOrgsDetailsDao {
|
||||
@DS("oracle91")
|
||||
@Override
|
||||
public List<BipOrgsDetailsEntity> thirdInterfaceGetOrgsDetails(BipOrgsDetailsEntity bipOrgsDetailsEntity) {
|
||||
return super.query("com.hzya.frame.bip.v3.v2207.dao.impl.BipOrgsDetailsDaoImpl.thirdInterfaceGetOrgsDetails",bipOrgsDetailsEntity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao.impl;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
import com.hzya.frame.util.HttpUtil;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository("bipSupplierDaoImpl")
|
||||
public class BipSupplierDaoImpl extends MybatisGenericDao<BipSupplierEntity,String> implements IBipSupplierDao {
|
||||
/**
|
||||
* 查询BIP供应商
|
||||
* @param bipSupplierEntity
|
||||
* @return
|
||||
*/
|
||||
@DS("oracle91")
|
||||
@Override
|
||||
public List<BipSupplierEntity> thirdInterfaceGetSupplier(BipSupplierEntity bipSupplierEntity) {
|
||||
return super.query("com.hzya.frame.bip.v3.v2207.dao.impl.BipSupplierDaoImpl.thirdInterfaceGetSupplier",bipSupplierEntity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierDetailsEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository("bipSupplierDetailsDaoImpl")
|
||||
public class BipSupplierDetailsDaoImpl extends MybatisGenericDao<BipSupplierDetailsEntity,String> implements IBipSupplierDetailsDao {
|
||||
@DS("oracle91")
|
||||
@Override
|
||||
public List<BipSupplierDetailsEntity> thirdInterfaceGetSupplierDetails(BipSupplierDetailsEntity bipSupplierDetailsEntity) {
|
||||
return super.query("com.hzya.frame.bip.v3.v2207.dao.impl.BipSupplierDetailsDaoImpl.thirdInterfaceGetSupplierDetails",bipSupplierDetailsEntity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dps.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
|
||||
public interface IPayMentService {
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 获取杭泰OA付款单传递CFS
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/16 11:59
|
||||
* **/
|
||||
String sendOAPayMentToCFS(JSONObject jsonObject, String type);
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 获取CFS登录校验码
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/16 13:37
|
||||
* **/
|
||||
String sendCFSToken(String name, String password);
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 获取杭泰OA报销单传递CFS
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/16 16:17
|
||||
* **/
|
||||
String sendExpenseToCFS(JSONObject jsonObject);
|
||||
|
||||
}
|
|
@ -0,0 +1,389 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dps.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.bip.v3.v2207.dps.service.IPayMentService;
|
||||
import com.hzya.frame.dateutil.DateUtil;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentHelper;
|
||||
import org.dom4j.Element;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xml.sax.InputSource;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import java.io.StringReader;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service(value = "payMentServiceImpl")
|
||||
public class PayMentServiceImpl implements IPayMentService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(PayMentServiceImpl.class);
|
||||
|
||||
private static final String NAME="admin";
|
||||
private static final String PASSWORD="aHRzejg4OA==";
|
||||
private static final String CFSURL="http://101.132.140.208:26883/erp/services/";//测试端口:26893,正式端口:26883
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 杭泰OA付款单传递CFS 注:付款单,资金归集,资金拨付,同名账户划转和借款单都用同一个接口
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/13 10:40
|
||||
* **/
|
||||
public String sendOAPayMentToCFS(JSONObject jsonStr,String type){
|
||||
logger.info("开始执行杭泰OA付款单传递CFS");
|
||||
try {
|
||||
String cfsToken = sendCFSToken(NAME, PASSWORD);
|
||||
if(null!=cfsToken) {
|
||||
String jsonStrObj = jsonStr.getString("jsonStr");
|
||||
JSONObject jsonObjectMain = JSON.parseObject(jsonStrObj);
|
||||
String erpVoucherNo = jsonObjectMain.getString("erpVoucherNo");//OA主键
|
||||
String purpose = jsonObjectMain.getString("purpose");//摘要
|
||||
String isForindividual = "0";//是否对私付款
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
String documentType=null;
|
||||
switch (type){
|
||||
case "pay"://付款单
|
||||
documentType="01";
|
||||
break;
|
||||
case "fundc"://资金归集
|
||||
documentType="02";
|
||||
break;
|
||||
case "funda"://资金拨付
|
||||
documentType="03";
|
||||
break;
|
||||
case "acc"://同名账户划转
|
||||
documentType="04";
|
||||
break;
|
||||
case "loan"://借款单
|
||||
documentType="05";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
JSONArray jsonStrList = jsonObjectMain.getJSONArray("details");
|
||||
if (null != jsonStrList && jsonStrList.size() > 0) {
|
||||
for (Object seeyonEntity : jsonStrList) {
|
||||
JSONObject jsonObjectFormson = JSON.parseObject(JSON.toJSONString(seeyonEntity));
|
||||
String payerAccName = jsonObjectFormson.getString("payerAccName");//转出方账户名(付款账户)
|
||||
String payerAccNo = jsonObjectFormson.getString("payerAccNo");//转出方账号(付款账号)
|
||||
String curCode = jsonObjectFormson.getString("curCode");//付款方币种
|
||||
String payeeAccName = jsonObjectFormson.getString("payeeAccName");//收款人帐户名称
|
||||
String payeeAccNo = jsonObjectFormson.getString("payeeAccNo");//收款方账户号
|
||||
BigDecimal amount = jsonObjectFormson.getBigDecimal("amount");//发生额
|
||||
String payeeBankCode = jsonObjectFormson.getString("payeeBankCode");//联行号
|
||||
String isQuick = jsonObjectFormson.getString("isQuick");//加急标志
|
||||
String payType = jsonObjectFormson.getString("payType");//结算方式
|
||||
String businessType = jsonObjectFormson.getString("businessType");//业务类别
|
||||
stringBuffer.append("<map>\n");
|
||||
stringBuffer.append("<documentType>" + nullConvert(documentType) + "</documentType>\n");
|
||||
stringBuffer.append("<erpVoucherNo>" + nullConvert(erpVoucherNo) + "</erpVoucherNo>\n");
|
||||
//stringBuffer.append("<payerAccName>"+"浙江杭泰数智能源开发有限公司"+"</payerAccName>\n");
|
||||
stringBuffer.append("<payerAccName>"+nullConvert(payerAccName)+"</payerAccName>\n");
|
||||
//stringBuffer.append("<payerAccNo>" +"71010122002702903"+ "</payerAccNo>\n");
|
||||
stringBuffer.append("<payerAccNo>" + nullConvert(payerAccNo) + "</payerAccNo>\n");
|
||||
stringBuffer.append("<curCode>" + nullConvert(curCode) + "</curCode>\n");
|
||||
stringBuffer.append("<payeeAccName>" + nullConvert(payeeAccName) + "</payeeAccName>\n");
|
||||
stringBuffer.append("<payeeAccNo>" + nullConvert(payeeAccNo) + "</payeeAccNo>\n");
|
||||
stringBuffer.append("<amount>" + nullConvert(String.valueOf(amount)) + "</amount>\n");
|
||||
//stringBuffer.append("<payeeBankCode>"+"301331000029"+"</payeeBankCode>\n");
|
||||
stringBuffer.append("<payeeBankCode>"+nullConvert(payeeBankCode)+"</payeeBankCode>\n");
|
||||
stringBuffer.append("<isQuick>" + nullConvert(isQuick) + "</isQuick>\n");
|
||||
stringBuffer.append("<isForindividual>" + nullConvert(isForindividual) + "</isForindividual>\n");
|
||||
stringBuffer.append("<payType>" + nullConvert(payType) + "</payType>\n");
|
||||
stringBuffer.append("<purpose>" + nullConvert(purpose) + "</purpose>\n");
|
||||
stringBuffer.append("<businessType>" + nullConvert(businessType) + "</businessType>\n");
|
||||
stringBuffer.append("<debitByCustomer>" + nullConvert(jsonObjectFormson.getString("debitByCustomer")) + "</debitByCustomer>\n");//借方客商辅助核算编码
|
||||
stringBuffer.append("<debitByBankAcc>" + nullConvert(payeeAccNo) + "</debitByBankAcc>\n");//借方银行账户辅助核算编码
|
||||
stringBuffer.append("<debitByPersonnel>" + nullConvert(jsonObjectFormson.getString("debitByPersonnel")) + "</debitByPersonnel>\n");//借方人员辅助核算编码
|
||||
stringBuffer.append("<creditByCustomer>" + nullConvert(jsonObjectFormson.getString("creditByCustomer")) + "</creditByCustomer>\n");//贷方客商辅助核算编码
|
||||
stringBuffer.append("<creditByBankAcc>" + nullConvert(payerAccNo) + "</creditByBankAcc>\n");//贷方银行辅助核算编码
|
||||
stringBuffer.append("</map>\n");
|
||||
}
|
||||
} else {
|
||||
stringBuffer.append("<map>\n");
|
||||
stringBuffer.append("<erpVoucherNo>" + nullConvert(erpVoucherNo) + "</erpVoucherNo>");
|
||||
stringBuffer.append("<purpose>" + nullConvert(purpose) + "</purpose>");
|
||||
stringBuffer.append("<isForindividual>" + nullConvert(isForindividual) + "</isForindividual>");
|
||||
stringBuffer.append("</map>\n");
|
||||
}
|
||||
String result=null;
|
||||
String xml= requestXML(cfsToken,"BkPaymentMainExchange",stringBuffer,"OA付款单同步发送");
|
||||
String url = "HTSZ_OA_BkPaymentMainWebService?wsdl";
|
||||
switch (type){
|
||||
case "pay"://付款单
|
||||
logger.info("OA付款单发送CFS的请求参数为:{}", xml);
|
||||
result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA付款单发送CFS的返回参数为:{}", result);
|
||||
break;
|
||||
case "fundc"://资金归集
|
||||
logger.info("OA资金归集发送CFS的请求参数为:{}", xml);
|
||||
result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA资金归集发送CFS的返回参数为:{}", result);
|
||||
break;
|
||||
case "funda"://资金调拨
|
||||
logger.info("OA资金拨付发送CFS的请求参数为:{}", xml);
|
||||
result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA资金拨付发送CFS的返回参数为:{}", result);
|
||||
break;
|
||||
case "acc"://同名账户划转
|
||||
logger.info("OA同名账户划转发送CFS的请求参数为:{}", xml);
|
||||
result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA同名账户划转发送CFS的返回参数为:{}", result);
|
||||
break;
|
||||
case "loan"://借款单
|
||||
logger.info("OA借还款发送CFS的请求参数为:{}", xml);
|
||||
result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA借还款发送CFS的返回参数为:{}", result);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return analyzeXML(result,"pay");
|
||||
}else{
|
||||
logger.info("请先登录CFS登录接口获取Token");
|
||||
return null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("杭泰OA付款单传递CFS错误,原因为:{}", e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 获取CFS登录校验码
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/13 15:38
|
||||
* **/
|
||||
public String sendCFSToken(String name,String password) {
|
||||
try {
|
||||
String xml="<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:mdm=\"http://mdmData.server.webservice.banck.com\">\n" +
|
||||
" <soap:Header/>\n" +
|
||||
" <soap:Body>\n" +
|
||||
" <mdm:intoPaymentDataXml>\n" +
|
||||
" <!--Optional:-->\n" +
|
||||
" <mdm:xml>\n" +
|
||||
" <![CDATA[\n" +
|
||||
" <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
"<message>\n" +
|
||||
"<head>\n" +
|
||||
"<transCode>LogOn</transCode>\n" +
|
||||
"<erpTimestamp>"+DateUtil.dateToString(new Date(), "yyyy-MM-dd HH:mm:ss")+"</erpTimestamp>\n" +
|
||||
"<sourcePlat>OA</sourcePlat>\n" +
|
||||
"<desPlat>CFS</desPlat>\n" +
|
||||
"<rmk>OA登录验证发送</rmk>\n" +
|
||||
"</head>\n" +
|
||||
"<body>\n" +
|
||||
"<user>"+name+"</user>\n" +
|
||||
"<password>"+password+"</password>\n" +
|
||||
"</body>\n" +
|
||||
"</message>\n" +
|
||||
" ]]>\n" +
|
||||
" </mdm:xml>\n" +
|
||||
" </mdm:intoPaymentDataXml>\n" +
|
||||
" </soap:Body>\n" +
|
||||
"</soap:Envelope>";
|
||||
logger.info("CFS登录的请求参数为:{}",xml);
|
||||
String url="HTSZ_OA_LogOnWebService?wsdl";
|
||||
String result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("CFS登录的返回参数为:{}",result);
|
||||
return analyzeXML(result,"login");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
logger.info("获取CFS登录失败,原因为:{}",e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 获取杭泰OA报销单传递CFS
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/16 16:17
|
||||
* **/
|
||||
@Override
|
||||
public String sendExpenseToCFS(JSONObject jsonStr) {
|
||||
logger.info("开始执行杭泰OA报销单传递CFS");
|
||||
try {
|
||||
String token = sendCFSToken(NAME, PASSWORD);
|
||||
if(null != token){
|
||||
String jsonStrObj = jsonStr.getString("jsonStr");
|
||||
JSONObject jsonObjectMain = JSON.parseObject(jsonStrObj);
|
||||
String erpVoucherNo = jsonObjectMain.getString("erpVoucherNo");//OA主键
|
||||
String purpose = jsonObjectMain.getString("purpose");//摘要
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
JSONArray jsonStrList = jsonObjectMain.getJSONArray("details");
|
||||
if(null != jsonStrList && jsonStrList.size()>0){
|
||||
for (Object o : jsonStrList) {
|
||||
JSONObject jsonObjectDetails = JSON.parseObject(JSON.toJSONString(o));
|
||||
String payerAccName = jsonObjectDetails.getString("payerAccName");//转出方账户名(付款账户)
|
||||
String payerAccNo = jsonObjectDetails.getString("payerAccNo");//转出方账号(付款账号)
|
||||
String curCode = jsonObjectDetails.getString("curCode");//付款方币种
|
||||
String payeeAccName = jsonObjectDetails.getString("payeeAccName");//收款人帐户名称
|
||||
String payeeAccNo = jsonObjectDetails.getString("payeeAccNo");//收款方账户号
|
||||
BigDecimal amount = jsonObjectDetails.getBigDecimal("amount");//发生额
|
||||
String payeeBankCode = jsonObjectDetails.getString("payeeBankCode");//联行号
|
||||
String isQuick = jsonObjectDetails.getString("isQuick");//加急标志
|
||||
String payType = jsonObjectDetails.getString("payType");//结算方式
|
||||
stringBuffer.append("<map>\n");
|
||||
stringBuffer.append("<erpVoucherNo>" + nullConvert(erpVoucherNo) + "</erpVoucherNo>\n");
|
||||
stringBuffer.append("<payerAccName>" + nullConvert(payerAccName) + "</payerAccName>\n");
|
||||
//stringBuffer.append("<payerAccName>"+"浙江杭泰数智能源开发有限公司"+"</payerAccName>\n");
|
||||
stringBuffer.append("<payerAccNo>" + nullConvert(payerAccNo) + "</payerAccNo>\n");
|
||||
//stringBuffer.append("<payerAccNo>" +"71010122002702903"+ "</payerAccNo>\n");
|
||||
stringBuffer.append("<curCode>" + nullConvert(curCode) + "</curCode>\n");
|
||||
stringBuffer.append("<payeeAccName>" + nullConvert(payeeAccName) + "</payeeAccName>\n");
|
||||
stringBuffer.append("<payeeAccNo>" + nullConvert(payeeAccNo) + "</payeeAccNo>\n");
|
||||
stringBuffer.append("<amount>" + nullConvert(String.valueOf(amount)) + "</amount>\n");
|
||||
stringBuffer.append("<payeeBankCode>" + nullConvert(payeeBankCode) + "</payeeBankCode>\n");
|
||||
//stringBuffer.append("<payeeBankCode>"+"301331000029"+"</payeeBankCode>\n");
|
||||
stringBuffer.append("<isQuick>" + nullConvert(isQuick) + "</isQuick>\n");
|
||||
stringBuffer.append("<payType>" + nullConvert(payType) + "</payType>\n");
|
||||
stringBuffer.append("<purpose>" + nullConvert(purpose) + "</purpose>\n");
|
||||
stringBuffer.append("</map>\n");
|
||||
}
|
||||
} else {
|
||||
stringBuffer.append("<map>\n");
|
||||
stringBuffer.append("<erpVoucherNo>" + erpVoucherNo + "</erpVoucherNo>\n");
|
||||
stringBuffer.append("<purpose>" + purpose + "</purpose>\n");
|
||||
stringBuffer.append("</map>\n");
|
||||
}
|
||||
String xml= requestXML(token,"BkExpenseExchange",stringBuffer,"OA费用报销单同步发送");
|
||||
logger.info("OA报销单发送CFS的请求参数为:{}", xml);
|
||||
String url = "HTSZ_OA_BkExpenseWebService?wsdl";
|
||||
String result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA报销单发送CFS的返回参数为:{}", result);
|
||||
return analyzeXML(result,"pay");
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.info("杭泰OA报销单传递CFS错误,原因为:{}", e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//null转成空字符串
|
||||
private static String nullConvert(String str){
|
||||
if (null == str){
|
||||
return "";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
private String requestXML(String token,String code,StringBuffer stringBuffer,String remark){
|
||||
String xml = "<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:mdm=\"http://mdmData.server.webservice.banck.com\">\n" +
|
||||
" <soap:Header/>\n" +
|
||||
" <soap:Body>\n" +
|
||||
" <mdm:intoPaymentDataXml>\n" +
|
||||
" <!--Optional:-->\n" +
|
||||
" <mdm:xml>\n" +
|
||||
" <![CDATA[\n" +
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
"<message>\n" +
|
||||
"<head>\n" +
|
||||
"<transCode>" + code + "</transCode>\n" +
|
||||
"<erpTimestamp>" + DateUtil.dateToString(new Date(), "yyyy-MM-dd HH:mm:ss") + "</erpTimestamp>\n" +
|
||||
"<sourcePlat>OA</sourcePlat>\n" +
|
||||
"<desPlat>CFS</desPlat>\n" +
|
||||
"<rmk>" + remark + "</rmk>\n" +
|
||||
"<sessionId>" + token + "</sessionId>\n" +
|
||||
"</head>\n" +
|
||||
"<body>\n" +
|
||||
"<list>\n";
|
||||
if (stringBuffer != null) {
|
||||
xml += stringBuffer.toString();
|
||||
xml += "</list>\n" +
|
||||
"</body>\n" +
|
||||
"</message>\n" +
|
||||
" ]]>\n" +
|
||||
" </mdm:xml>\n" +
|
||||
" </mdm:intoPaymentDataXml>\n" +
|
||||
" </soap:Body>\n" +
|
||||
"</soap:Envelope>";
|
||||
} else {
|
||||
xml += "</list>\n" +
|
||||
"</body>\n" +
|
||||
"</message>\n" +
|
||||
"]]>\n" +
|
||||
" </mdm:xml>\n" +
|
||||
" </mdm:intoPaymentDataXml>\n" +
|
||||
" </soap:Body>\n" +
|
||||
"</soap:Envelope>";
|
||||
}
|
||||
return xml;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 解析CFS返回的xml格式
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/19 14:07
|
||||
* **/
|
||||
private static String analyzeXML(String result,String type){
|
||||
try {
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
org.w3c.dom.Document document = builder.parse(new InputSource(new StringReader(result)));
|
||||
org.w3c.dom.Element bodyElement = (org.w3c.dom.Element) document.getElementsByTagName("ns:return").item(0);
|
||||
if (null!=bodyElement) {
|
||||
String textContent = bodyElement.getTextContent();
|
||||
Document documentContext = DocumentHelper.parseText(textContent);
|
||||
Element rootElement = documentContext.getRootElement();
|
||||
Element body = rootElement.element("body");
|
||||
if (null != body) {
|
||||
switch (type) {
|
||||
case "login"://登录
|
||||
Element sessionId = body.element("sessionId");
|
||||
if (null != sessionId) {
|
||||
logger.info("CFS登录的登录校验码为:{}", sessionId.getText());
|
||||
return sessionId.getText();
|
||||
} else {
|
||||
logger.info("CFS登录的登录校验码没有获取到,请重新获取");
|
||||
return null;
|
||||
}
|
||||
case "pay"://付款单和报销单
|
||||
Element list = body.element("list");
|
||||
List<Element> elements = list.elements();
|
||||
String serialNo = null;
|
||||
String statusMsg = null;
|
||||
String erpVoucherNoCfs = null;
|
||||
for (Element element : elements) {
|
||||
serialNo = element.element("serialNo").getText();
|
||||
statusMsg = element.element("statusMsg").getText();
|
||||
erpVoucherNoCfs = element.element("erpVoucherNo").getText();
|
||||
}
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
jsonObject.put("erpVoucherNoCfs",erpVoucherNoCfs);
|
||||
jsonObject.put("statusMsg",statusMsg);
|
||||
jsonObject.put("serialNo",serialNo);
|
||||
//return "当前单据:" + erpVoucherNoCfs + ",传递CFS返回信息:" + statusMsg + ",流水号:" + serialNo;
|
||||
return jsonObject.toJSONString();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.info("解析CFS返回的xml格式错误:{}",e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,194 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dps.task;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.bip.v3.v2207.dps.service.IPayMentService;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
@EnableScheduling
|
||||
@Component
|
||||
public class ElectronicTask {
|
||||
static Logger logger= LoggerFactory.getLogger(ElectronicTask.class);
|
||||
|
||||
@Resource
|
||||
private IPayMentService payMentService;
|
||||
//@Resource
|
||||
//private ISeeYonDao seeYonDao;
|
||||
//@Resource
|
||||
//private ICtpAttachmentDao ctpAttachmentDao;
|
||||
|
||||
|
||||
//@Scheduled(cron = "0 20 10 * * ?")
|
||||
//public void sendElectronicToCFS() {
|
||||
// logger.info("CFS电子回单共享开始执行---------->");
|
||||
// try {
|
||||
// String token = payMentService.sendCFSToken("admin", "aHRzejg4OA==");
|
||||
// if(null!=token) {
|
||||
// List<SeeyonEntity> seeyonEntities = seeYonDao.selectOAListByTypeformmain_0327(new SeeyonEntity());
|
||||
// if (seeyonEntities != null && seeyonEntities.size() > 0) {
|
||||
// for (SeeyonEntity seeyonEntity : seeyonEntities) {
|
||||
// String bankAcc = seeyonEntity.getField0137();//付款账号
|
||||
// //String bankAcc="03005389347";
|
||||
// String erpVoucherNo = seeyonEntity.getId();//OA付款单号
|
||||
// String xml = "<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:mdm=\"http://mdmData.server.webservice.banck.com\">\n" +
|
||||
// " <soap:Header/>\n" +
|
||||
// " <soap:Body>\n" +
|
||||
// " <mdm:intoPaymentDataXml>\n" +
|
||||
// " <!--Optional:-->\n" +
|
||||
// " <mdm:xml>\n" +
|
||||
// " <![CDATA[\n" +
|
||||
// " <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
// "<message>\n" +
|
||||
// "<head>\n" +
|
||||
// "<transCode>BkReceiptQueryExchange</transCode>\n" +
|
||||
// "<erpTimestamp>" + DateUtil.dateToString(new Date(), "yyyy-mm-dd hh:mm:ss") + "</erpTimestamp>\n" +
|
||||
// "<sourcePlat>CFS</sourcePlat>\n" +
|
||||
// "<desPlat>OA</desPlat>\n" +
|
||||
// "<rmk>OA电子回单共享发送</rmk>\n" +
|
||||
// "<sessionId>" + token + "</sessionId>\n" +
|
||||
// "</head>\n" +
|
||||
// "<body>\n" +
|
||||
// "<bankAcc>" + bankAcc + "</bankAcc>\n" +
|
||||
// "<erpVoucherNo>" + erpVoucherNo + "</erpVoucherNo>\n" +
|
||||
// "</body>\n" +
|
||||
// "</message>\n" +
|
||||
// " ]]>\n" +
|
||||
// " </mdm:xml>\n" +
|
||||
// " </mdm:intoPaymentDataXml>\n" +
|
||||
// " </soap:Body>\n" +
|
||||
// "</soap:Envelope>";
|
||||
// logger.info("CFS电子回单共享请求参数为:{}", xml);
|
||||
// String url = "http://101.132.140.208:26893/erp/services/HTSZ_OA_BkReceiptQueryWebService?wsdl";
|
||||
// String result = HttpRequest.post(url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
// logger.info("CFS电子回单共享请求参数为:{}", result);
|
||||
// DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
// DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
// org.w3c.dom.Document document = builder.parse(new InputSource(new StringReader(result)));
|
||||
// org.w3c.dom.Element bodyElement = (org.w3c.dom.Element) document.getElementsByTagName("ns:return").item(0);
|
||||
// if (null != bodyElement) {
|
||||
// String textContent = bodyElement.getTextContent();
|
||||
// Document documentContext = DocumentHelper.parseText(textContent);
|
||||
// Element rootElement = documentContext.getRootElement();
|
||||
// Element body = rootElement.element("body");
|
||||
// if("0000".equalsIgnoreCase(rootElement.element("head").element("returnCode").getText())){
|
||||
// if (null != body) {
|
||||
// Element listElc = body.element("list");
|
||||
// List<Element> elementsElc = listElc.elements();
|
||||
// for (Element element : elementsElc) {
|
||||
// String fielPath = element.element("filePath").getText();//电子回单附件路径
|
||||
// if (fielPath != null && fielPath!="") {
|
||||
// // String fielPath="C:\\Users\\笃曙\\Desktop\\15HZ000342CIBN2023091100066856211000001.pdf";
|
||||
// File file = new File(fielPath);
|
||||
// JSONObject jsonObject = fileUpload(file);
|
||||
// logger.info("上传返回的附件id为:{}", jsonObject.getString("fileUrl"));
|
||||
// if (jsonObject.getString("fileUrl") != null) {
|
||||
// //表单的附件字段=ctpAttachment的Sub_reference,表单的Summary_id=ctpAttachment的att_reference
|
||||
// String sub_reference = String.valueOf(UUIDLong.longUUID());
|
||||
// seeyonEntity.setField0264(sub_reference);
|
||||
// seeYonDao.updateFormformmain_0327(seeyonEntity);
|
||||
// //根据附件id查询附件业务数据
|
||||
// String file_url = jsonObject.getString("fileUrl");
|
||||
// CtpAttachmentEntity ctpAttachmentEntity = new CtpAttachmentEntity();
|
||||
// ctpAttachmentEntity.setFile_url(file_url);
|
||||
// String att_reference = seeyonEntity.getSummary_id();//Summary_id
|
||||
// ctpAttachmentEntity.setSub_reference(sub_reference);
|
||||
// ctpAttachmentEntity.setAtt_reference(att_reference);
|
||||
// List<CtpAttachmentEntity> ctpAttachmentEntities = ctpAttachmentDao.queryCtpAttachment(ctpAttachmentEntity);
|
||||
// //如果没有查询到数据,就新增附件业务,否则更新
|
||||
// if (ctpAttachmentEntities.size() == 0) {
|
||||
// String category = jsonObject.getString("category");
|
||||
// String type = jsonObject.getString("type");
|
||||
// String filename = jsonObject.getString("filename");
|
||||
// String mime_type = jsonObject.getString("mimeType");
|
||||
// String attachment_size = jsonObject.getString("size");
|
||||
// String id = String.valueOf(UUIDLong.longUUID());
|
||||
// ctpAttachmentEntity.setCategory(category);
|
||||
// ctpAttachmentEntity.setFilename(filename);
|
||||
// ctpAttachmentEntity.setType(type);
|
||||
// ctpAttachmentEntity.setMime_type(mime_type);
|
||||
// ctpAttachmentEntity.setAttachment_size(attachment_size);
|
||||
// ctpAttachmentEntity.setId(id);
|
||||
// ctpAttachmentEntity.setCategory("66");
|
||||
// ctpAttachmentEntity.setCreatedate(new Date());
|
||||
// ctpAttachmentDao.saveCtpAttachment(ctpAttachmentEntity);
|
||||
// } else {
|
||||
// if (ctpAttachmentEntities.size() > 1) {
|
||||
// throw new BaseSystemException("OA附件业务表中查到多条记录");
|
||||
// }
|
||||
// //更新数据到OA附件业务表中
|
||||
// ctpAttachmentDao.updateCtpAttachment(ctpAttachmentEntity);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// logger.info("CFS电子回单返回得错误编码:{},以及返回的错误信息:{}",rootElement.element("head").element("returnCode").getText(),rootElement.element("head").element("returnMsg").getText());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }catch (Exception e){
|
||||
// logger.info("CFS电子回单共享错误:{}",e.getMessage());
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
public static JSONObject fileUpload(File file) {
|
||||
if (null != file) {
|
||||
try {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("file", file);
|
||||
String url = "/seeyon/rest/attachment?token=@token@";//如果后面加上applicationCategory=1&extensions=&firstSave=true,附件业务自动生成一条记录
|
||||
url = url.replaceAll("@token@", getToken());
|
||||
String result = HttpUtil.post("http://60.204.152.210" + url, paramMap);
|
||||
if (StrUtil.isNotBlank(result)) {
|
||||
logger.info("附件上传结果"+result);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String atts = jsonObject.get("atts").toString();
|
||||
if (StrUtil.isNotEmpty(atts)) {
|
||||
JSONArray jsonArray = JSONArray.parseArray(atts);
|
||||
JSONObject res = (JSONObject) jsonArray.get(0);
|
||||
/* String fileUrl = res.getString("fileUrl");
|
||||
logger.info("附件id:" + fileUrl);
|
||||
return fileUrl;*/
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.error("附件上传失败"+e.getMessage());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getToken() {
|
||||
//获取oatoken
|
||||
HashMap<String, String> hashMap = new HashMap<>();
|
||||
hashMap.put("userName", "hzyaRest");
|
||||
hashMap.put("password", "a5ce21b8-91db-4cec-b3e3-3e44719655fd");
|
||||
hashMap.put("loginName","bdmanager");
|
||||
String result = HttpUtil.post("http://60.204.152.210" + "/seeyon/rest/token", JSON.toJSONString(hashMap));
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if (null != jsonObject) {
|
||||
logger.info(result);
|
||||
logger.info("======token:{}======" + jsonObject.getString("id"));
|
||||
return jsonObject.getString("id");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,188 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.hzya.frame.uuid.UUIDUtils;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (BdCorp)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-09-06 14:47:18
|
||||
*/
|
||||
public class BipArchivesEntity extends BaseEntity {
|
||||
|
||||
private String archivesType;//类型
|
||||
private String leftCode;//左编码
|
||||
private String rightCode;//右编码
|
||||
|
||||
private String leftAppId;//左应用id
|
||||
private String leftAppCode;//左应用编码
|
||||
private String leftAppName;//左应用名称
|
||||
private String leftApiId;//左接口ID
|
||||
private String leftId;//左id
|
||||
private String leftName;//左名称
|
||||
private String rightAppId;//右应用id
|
||||
private String rightAppCode;//右应用编码
|
||||
private String rightAppName;//右应用名称
|
||||
private String rightApiId;//右接口ID
|
||||
private String rightId;//右id
|
||||
private String rightName;//右名称
|
||||
private String leftOrg;//左公司
|
||||
private String rightOrg;//右公司
|
||||
|
||||
public String getArchivesType() {
|
||||
return archivesType;
|
||||
}
|
||||
|
||||
public void setArchivesType(String archivesType) {
|
||||
this.archivesType = archivesType;
|
||||
}
|
||||
|
||||
public String getLeftCode() {
|
||||
return leftCode;
|
||||
}
|
||||
|
||||
public void setLeftCode(String leftCode) {
|
||||
this.leftCode = leftCode;
|
||||
}
|
||||
|
||||
public String getRightCode() {
|
||||
return rightCode;
|
||||
}
|
||||
|
||||
public void setRightCode(String rightCode) {
|
||||
this.rightCode = rightCode;
|
||||
}
|
||||
|
||||
public String getLeftAppId() {
|
||||
return leftAppId;
|
||||
}
|
||||
|
||||
public void setLeftAppId(String leftAppId) {
|
||||
this.leftAppId = leftAppId;
|
||||
}
|
||||
|
||||
public String getLeftAppCode() {
|
||||
return leftAppCode;
|
||||
}
|
||||
|
||||
public void setLeftAppCode(String leftAppCode) {
|
||||
this.leftAppCode = leftAppCode;
|
||||
}
|
||||
|
||||
public String getLeftAppName() {
|
||||
return leftAppName;
|
||||
}
|
||||
|
||||
public void setLeftAppName(String leftAppName) {
|
||||
this.leftAppName = leftAppName;
|
||||
}
|
||||
|
||||
public String getLeftApiId() {
|
||||
return leftApiId;
|
||||
}
|
||||
|
||||
public void setLeftApiId(String leftApiId) {
|
||||
this.leftApiId = leftApiId;
|
||||
}
|
||||
|
||||
public String getLeftId() {
|
||||
return leftId;
|
||||
}
|
||||
|
||||
public void setLeftId(String leftId) {
|
||||
this.leftId = leftId;
|
||||
}
|
||||
|
||||
public String getLeftName() {
|
||||
return leftName;
|
||||
}
|
||||
|
||||
public void setLeftName(String leftName) {
|
||||
this.leftName = leftName;
|
||||
}
|
||||
|
||||
public String getRightAppId() {
|
||||
return rightAppId;
|
||||
}
|
||||
|
||||
public void setRightAppId(String rightAppId) {
|
||||
this.rightAppId = rightAppId;
|
||||
}
|
||||
|
||||
public String getRightAppCode() {
|
||||
return rightAppCode;
|
||||
}
|
||||
|
||||
public void setRightAppCode(String rightAppCode) {
|
||||
this.rightAppCode = rightAppCode;
|
||||
}
|
||||
|
||||
public String getRightAppName() {
|
||||
return rightAppName;
|
||||
}
|
||||
|
||||
public void setRightAppName(String rightAppName) {
|
||||
this.rightAppName = rightAppName;
|
||||
}
|
||||
|
||||
public String getRightApiId() {
|
||||
return rightApiId;
|
||||
}
|
||||
|
||||
public void setRightApiId(String rightApiId) {
|
||||
this.rightApiId = rightApiId;
|
||||
}
|
||||
|
||||
public String getRightId() {
|
||||
return rightId;
|
||||
}
|
||||
|
||||
public void setRightId(String rightId) {
|
||||
this.rightId = rightId;
|
||||
}
|
||||
|
||||
public String getRightName() {
|
||||
return rightName;
|
||||
}
|
||||
|
||||
public void setRightName(String rightName) {
|
||||
this.rightName = rightName;
|
||||
}
|
||||
|
||||
public String getLeftOrg() {
|
||||
return leftOrg;
|
||||
}
|
||||
|
||||
public void setLeftOrg(String leftOrg) {
|
||||
this.leftOrg = leftOrg;
|
||||
}
|
||||
|
||||
public String getRightOrg() {
|
||||
return rightOrg;
|
||||
}
|
||||
|
||||
public void setRightOrg(String rightOrg) {
|
||||
this.rightOrg = rightOrg;
|
||||
}
|
||||
|
||||
public void setCreate() {
|
||||
this.setId(UUIDUtils.getUUID());
|
||||
this.setSts("Y");
|
||||
this.setCreate_user_id("1");
|
||||
this.setModify_user_id("1");
|
||||
this.setCreate_time(new Date());
|
||||
this.setModify_time(new Date());
|
||||
this.setOrg_id("0");
|
||||
this.setCompanyId("0");
|
||||
}
|
||||
//修改信息
|
||||
public void setUpdate() {
|
||||
this.setModify_user_id("1");
|
||||
this.setModify_time(new Date());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.bip.v3.v2207.dao.impl.BipArchivesDaoImpl">
|
||||
<resultMap id="get-ArchivesEntity-result" type="com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="leftAppId" column="left_app_id" jdbcType="VARCHAR"/>
|
||||
<result property="leftAppCode" column="left_app_code" jdbcType="VARCHAR"/>
|
||||
<result property="leftAppName" column="left_app_name" jdbcType="VARCHAR"/>
|
||||
<result property="leftApiId" column="left_api_id" jdbcType="VARCHAR"/>
|
||||
<result property="leftId" column="left_id" jdbcType="VARCHAR"/>
|
||||
<result property="leftCode" column="left_code" jdbcType="VARCHAR"/>
|
||||
<result property="leftName" column="left_name" jdbcType="VARCHAR"/>
|
||||
<result property="rightAppId" column="right_app_id" jdbcType="VARCHAR"/>
|
||||
<result property="rightAppCode" column="right_app_code" jdbcType="VARCHAR"/>
|
||||
<result property="rightAppName" column="right_app_name" jdbcType="VARCHAR"/>
|
||||
<result property="rightApiId" column="right_api_id" jdbcType="VARCHAR"/>
|
||||
<result property="rightId" column="right_id" jdbcType="VARCHAR"/>
|
||||
<result property="rightCode" column="right_code" jdbcType="VARCHAR"/>
|
||||
<result property="rightName" column="right_name" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="queryArchivesData" resultMap="get-ArchivesEntity-result"
|
||||
parameterType="com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity">
|
||||
select
|
||||
right_code
|
||||
from
|
||||
<choose>
|
||||
<when test="archivesType == '1'.toString()"> sys_personnel_control </when>
|
||||
<when test="archivesType == '2'.toString()"> sys_org_control </when>
|
||||
<when test="archivesType == '6'.toString()"> sys_stock_control </when>
|
||||
<when test="archivesType == '73'.toString()"> sys_merchant_control </when>
|
||||
<when test="archivesType == 'D01'.toString()"> sys_taxrate_control </when>
|
||||
<when test="archivesType == 'jobass'.toString()"> sys_project_control </when>
|
||||
<when test="archivesType == '93'.toString()"> sys_bank_control </when>
|
||||
<when test="archivesType == '96'.toString()"> sys_bankaccount_control </when>
|
||||
<when test="archivesType == '22'.toString()"> sys_assets_control </when>
|
||||
</choose>
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="leftCode != null and leftCode != ''">and left_code = #{leftCode}</if>
|
||||
<if test="leftOrg != null and leftOrg != ''">and left_org = #{leftOrg}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="queryArchivesDatays" resultMap="get-ArchivesEntity-result"
|
||||
parameterType="com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity">
|
||||
select
|
||||
right_code
|
||||
from
|
||||
<choose>
|
||||
<when test="archivesType == '0012'.toString()"> sys_stock_control </when>
|
||||
<when test="archivesType == '0006'.toString()"> sys_stock_control </when>
|
||||
<when test="archivesType == '0004'.toString()"> sys_merchant_control </when>
|
||||
</choose>
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="leftCode != null and leftCode != ''">and left_code = #{leftCode}</if>
|
||||
<if test="leftOrg != null and leftOrg != ''">and left_org = #{leftOrg}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
|
||||
public class BipAss {
|
||||
private String checktypecode;
|
||||
private String checkvaluecode;
|
||||
|
||||
|
||||
public String getChecktypecode() {
|
||||
return checktypecode;
|
||||
}
|
||||
|
||||
public void setChecktypecode(String checktypecode) {
|
||||
this.checktypecode = checktypecode;
|
||||
}
|
||||
|
||||
public String getCheckvaluecode() {
|
||||
return checkvaluecode;
|
||||
}
|
||||
|
||||
public void setCheckvaluecode(String checkvaluecode) {
|
||||
this.checkvaluecode = checkvaluecode;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
|
||||
public class BipCashflow {
|
||||
private String money;
|
||||
private String pk_cashflow;
|
||||
|
||||
public String getMoney() {
|
||||
return money;
|
||||
}
|
||||
|
||||
public void setMoney(String money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public String getPk_cashflow() {
|
||||
return pk_cashflow;
|
||||
}
|
||||
|
||||
public void setPk_cashflow(String pk_cashflow) {
|
||||
this.pk_cashflow = pk_cashflow;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/****
|
||||
* BIP组织账户
|
||||
* @content:
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-10-24 10:03
|
||||
* @param
|
||||
* @return
|
||||
**/
|
||||
public class BipOrgsDetailsEntity extends BaseEntity {
|
||||
|
||||
/*开户行编码*/
|
||||
private String bankCode;
|
||||
/*开户行名称*/
|
||||
private String bankName;
|
||||
/*账户*/
|
||||
private String accnum;
|
||||
/*与组织关联的字段*/
|
||||
private String controlorg;
|
||||
/*联行号*/
|
||||
private String cnapsCode;
|
||||
|
||||
public String getCnapsCode() {
|
||||
return cnapsCode;
|
||||
}
|
||||
|
||||
public void setCnapsCode(String cnapsCode) {
|
||||
this.cnapsCode = cnapsCode;
|
||||
}
|
||||
|
||||
public String getControlorg() {
|
||||
return controlorg;
|
||||
}
|
||||
|
||||
public void setControlorg(String controlorg) {
|
||||
this.controlorg = controlorg;
|
||||
}
|
||||
|
||||
public String getBankCode() {
|
||||
return bankCode;
|
||||
}
|
||||
|
||||
public void setBankCode(String bankCode) {
|
||||
this.bankCode = bankCode;
|
||||
}
|
||||
|
||||
public String getBankName() {
|
||||
return bankName;
|
||||
}
|
||||
|
||||
public void setBankName(String bankName) {
|
||||
this.bankName = bankName;
|
||||
}
|
||||
|
||||
public String getAccnum() {
|
||||
return accnum;
|
||||
}
|
||||
|
||||
public void setAccnum(String accnum) {
|
||||
this.accnum = accnum;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.bip.v3.v2207.dao.impl.BipOrgsDetailsDaoImpl">
|
||||
<resultMap id="get-BipOrgsDetailsEntity-result" type="com.hzya.frame.bip.v3.v2207.entity.BipOrgsDetailsEntity">
|
||||
<result property="bankCode" column="bankCode" />
|
||||
<result property="bankName" column="bankName" />
|
||||
<result property="accnum" column="accnum" />
|
||||
<result property="controlorg" column="controlorg" />
|
||||
<result property="cnapsCode" column="cnapsCode" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="BipOrgsDetailsEntity_Base_Column_List">
|
||||
bankdoc.code as bankCode,bankdoc.name as bankName,bankaccbas.accnum,bankaccbas.controlorg,bankaccbas.combinenum as cnapsCode
|
||||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-BipOrgsDetailsEntity-result">
|
||||
select
|
||||
<include refid="BipOrgsDetailsEntity_Base_Column_List" />
|
||||
from bd_bankaccbas where pk_bankaccbas = #{pk_bankaccbas}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="thirdInterfaceGetOrgsDetails" resultMap="get-BipOrgsDetailsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipOrgsDetailsEntity">
|
||||
select
|
||||
<include refid="BipOrgsDetailsEntity_Base_Column_List" />
|
||||
from bd_bankaccbas bankaccbas
|
||||
left join bd_bankdoc bankdoc on bankdoc.pk_bankdoc=bankaccbas.pk_bankdoc
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="bankCode != null and bankCode !=''">bankdoc.code=#{bankCode}</if>
|
||||
<if test="bankName != null and bankName !='' "> and bankdoc.name = #{bankName}</if>
|
||||
<if test="accnum != null and accnum !='' "> and bankaccbas.accnum = #{accnum}</if>
|
||||
and bankaccbas.dr='0' and bankdoc.dr='0' and bankaccbas.pk_banktype!='0001Z01000000000036S' and bankaccbas.controlorg = #{controlorg}
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* @description: BIP组织 entity
|
||||
* @tableName: org_orgs
|
||||
* @entityName: BipOrgsEntity
|
||||
* @author: gjh
|
||||
* @history: 1.0
|
||||
*/
|
||||
public class BipOrgsEntity extends BaseEntity {
|
||||
/*单位编码*/
|
||||
private String code;
|
||||
/*开户单位*/
|
||||
private String name;
|
||||
/*BIPID*/
|
||||
private String tripartiteId;
|
||||
private String pk_financeorg;
|
||||
private String orgsts;
|
||||
|
||||
public String getOrgsts() {
|
||||
return orgsts;
|
||||
}
|
||||
|
||||
public void setOrgsts(String orgsts) {
|
||||
this.orgsts = orgsts;
|
||||
}
|
||||
|
||||
public String getPk_financeorg() {
|
||||
return pk_financeorg;
|
||||
}
|
||||
|
||||
public void setPk_financeorg(String pk_financeorg) {
|
||||
this.pk_financeorg = pk_financeorg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getTripartiteId() {
|
||||
return tripartiteId;
|
||||
}
|
||||
|
||||
public void setTripartiteId(String tripartiteId) {
|
||||
this.tripartiteId = tripartiteId;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.bip.v3.v2207.dao.impl.BipOrgsDaoImpl">
|
||||
<resultMap id="get-BipOrgsEntity-result" type="com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity">
|
||||
<result property="tripartiteId" column="tripartiteId" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="pk_financeorg" column="pk_financeorg"/>
|
||||
<result property="orgsts" column="orgsts"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="BipOrgsEntity_Base_Column_List">
|
||||
orgs.pk_financeorg as tripartiteId,
|
||||
orgs.name ,
|
||||
orgs.code,
|
||||
max(org_bank.ts)as ts
|
||||
|
||||
</sql>
|
||||
|
||||
<sql id="BipOrgsEntity_Base_Column_List_details">
|
||||
bankdoc.code as bankCode,bankdoc.name as bankName,bankaccbas.accnum,bankaccbas.controlorg
|
||||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-BipOrgsEntity-result">
|
||||
select
|
||||
<include refid="BipOrgsEntity_Base_Column_List" />
|
||||
from org_financeorg where pk_financeorg = #{pk_financeorg}
|
||||
</select>
|
||||
|
||||
<select id="thirdInterfaceGetOrgs" resultMap="get-BipOrgsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity">
|
||||
select
|
||||
<include refid="BipOrgsEntity_Base_Column_List" />
|
||||
FROM
|
||||
org_financeorg orgs
|
||||
left join v_hzya_org_bank org_bank on org_bank.controlorg = orgs.pk_financeorg
|
||||
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''"> orgs.code = #{code}</if>
|
||||
<if test="name != null and name !='' "> and orgs.name = #{name}</if>
|
||||
<if test="pk_financeorg != null and pk_financeorg !='' "> and orgs.pk_financeorg = #{tripartiteId}</if>
|
||||
<if test="orgsts != null and orgsts !='' "> and orgs.ts >'2023-09-30 14:18:39' and orgs.ts > #{orgsts}</if>
|
||||
and orgs.dr='0'
|
||||
</trim>
|
||||
GROUP BY orgs.pk_financeorg ,orgs.name,orgs.code
|
||||
</select>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="thirdInterfaceGetSupplierDetails" resultMap="get-BipOrgsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity">
|
||||
select
|
||||
<include refid="BipOrgsEntity_Base_Column_List_details" />
|
||||
from bd_bankaccbas bankaccbas
|
||||
left join bd_bankdoc bankdoc on bankdoc.pk_bankdoc=bankaccbas.pk_bankdoc
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">bankdoc.code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and bankdoc.name = #{name}</if>
|
||||
<if test="accnum != null and accnum !='' "> and bankaccbas.accnum = #{accnum}</if>
|
||||
<if test="controlorg != null and controlorg !='' "> and bankaccbas.controlorg = #{controlorg}</if>
|
||||
and bankaccbas.dr='0' and bankdoc.dr='0' and bankaccbas.pk_banktype!='0001Z01000000000036S'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<!--<select id="BipOrgsEntity_list_base" resultMap="get-BipOrgsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity">
|
||||
select
|
||||
<include refid="BipOrgsEntity_Base_Column_List" />
|
||||
FROM bd_cust_supplier supplier
|
||||
left join db_customerbank bank ON supplier.code = bank.code
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">supplier.code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and supplier.name = #{name}</if>
|
||||
<if test="taxpayerid != null and taxpayerid !='' "> and supplier.taxpayerid = #{taxpayerid}</if>
|
||||
<if test="def1 != null and def1 !='' "> and bank.def1 = #{def1}</if>
|
||||
<if test="def2 != null and def2 !='' "> and bank.def2 = #{def2}</if>
|
||||
<if test="def3 != null and def3 !='' "> and bank.def3 = #{def3}</if>
|
||||
</trim>
|
||||
</select>-->
|
||||
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<!--<select id="entity_list_like" resultMap="get-BipOrgsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity">
|
||||
select
|
||||
<include refid="BipOrgsEntity_Base_Column_List" />
|
||||
FROM bd_cust_supplier supplier
|
||||
left join db_customerbank bank ON supplier.code = bank.code
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''"> supplier.code like concat('%',#{code},'%')</if>
|
||||
<if test="name != null and name !='' "> and supplier.name like concat('%',#{name},'%')</if>
|
||||
<if test="taxpayerid != null and taxpayerid !='' "> and supplier.taxpayeridlike concat('%',#{taxpayeridlike},'%')</if>
|
||||
<if test="def1 != null and def1 !='' "> and bank.def1 like concat('%',#{def1},'%')</if>
|
||||
<if test="def2 != null and def2 !='' "> and bank.def2 like concat('%',#{def2},'%')</if>
|
||||
<if test="def3 != null and def3 !='' "> and bank.def3 like concat('%',#{def3},'%')</if>
|
||||
</trim>
|
||||
</select>-->
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
public class BipSupplierDetailsEntity extends BaseEntity {
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
/*开户行*/
|
||||
private String splitbank;
|
||||
/*银行账号*/
|
||||
private String bankaccno;
|
||||
/*是否默认*/
|
||||
private String isdefault;
|
||||
/*联行号*/
|
||||
private String combinno;
|
||||
|
||||
private String tripartiteId;
|
||||
|
||||
public String getCombinno() {
|
||||
return combinno;
|
||||
}
|
||||
|
||||
public void setCombinno(String combinno) {
|
||||
this.combinno = combinno;
|
||||
}
|
||||
|
||||
public String getTripartiteId() {
|
||||
return tripartiteId;
|
||||
}
|
||||
|
||||
public void setTripartiteId(String tripartiteId) {
|
||||
this.tripartiteId = tripartiteId;
|
||||
}
|
||||
|
||||
public String getIsdefault() {
|
||||
return isdefault;
|
||||
}
|
||||
|
||||
public void setIsdefault(String isdefault) {
|
||||
this.isdefault = isdefault;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getSplitbank() {
|
||||
return splitbank;
|
||||
}
|
||||
|
||||
public void setSplitbank(String splitbank) {
|
||||
this.splitbank = splitbank;
|
||||
}
|
||||
|
||||
public String getBankaccno() {
|
||||
return bankaccno;
|
||||
}
|
||||
|
||||
public void setBankaccno(String bankaccno) {
|
||||
this.bankaccno = bankaccno;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.bip.v3.v2207.dao.impl.BipSupplierDetailsDaoImpl">
|
||||
<resultMap id="get-BipSupplierDetailsEntity-result" type="com.hzya.frame.bip.v3.v2207.entity.BipSupplierDetailsEntity">
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="splitbank" column="splitbank" />
|
||||
<result property="bankaccno" column="bankaccno" />
|
||||
<result property="tripartiteId" column="tripartiteId"></result>
|
||||
<result property="combinno" column="combinno"></result>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="BipSupplierDetailsEntity_Base_Column_List">
|
||||
splitbank,bankaccno,combinno,name,code
|
||||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-BipSupplierDetailsEntity-result">
|
||||
select
|
||||
<include refid="BipSupplierDetailsEntity_Base_Column_List" />
|
||||
from BD_SUPPLIER where pk_supplier = #{pk_supplier} and sdr='0'
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="thirdInterfaceGetSupplierDetails" resultMap="get-BipSupplierDetailsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipSupplierDetailsEntity">
|
||||
select
|
||||
<include refid="BipSupplierDetailsEntity_Base_Column_List" />
|
||||
FROM db_customerbank
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and name = #{name}</if>
|
||||
<if test="bankaccno != null and bankaccno !='' "> and bankaccno = #{bankaccno}</if>
|
||||
<if test="splitbank != null and splitbank !='' "> and splitbank = #{splitbank}</if>
|
||||
<if test="combinno != null and combinno !='' "> and combinno = #{combinno}</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* @description: BIP供应商 entity
|
||||
* @tableName: BD_SUPPLIER
|
||||
* @entityName: BipSupplierEntity
|
||||
* @author: gjh
|
||||
* @history: 1.0
|
||||
*/
|
||||
public class BipSupplierEntity extends BaseEntity {
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
/*税号*/
|
||||
private String taxpayerid;
|
||||
/*地址*/
|
||||
private String def1;
|
||||
/*电话*/
|
||||
private String def2;
|
||||
/*联系人*/
|
||||
private String def3;
|
||||
private String tripartiteId;
|
||||
|
||||
public String getTripartiteId() {
|
||||
return tripartiteId;
|
||||
}
|
||||
|
||||
public void setTripartiteId(String tripartiteId) {
|
||||
this.tripartiteId = tripartiteId;
|
||||
}
|
||||
|
||||
private String ts;
|
||||
|
||||
public String getTs() {
|
||||
return ts;
|
||||
}
|
||||
|
||||
public void setTs(String ts) {
|
||||
this.ts = ts;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getTaxpayerid() {
|
||||
return taxpayerid;
|
||||
}
|
||||
|
||||
public void setTaxpayerid(String taxpayerid) {
|
||||
this.taxpayerid = taxpayerid;
|
||||
}
|
||||
|
||||
public String getDef1() {
|
||||
return def1;
|
||||
}
|
||||
|
||||
public void setDef1(String def1) {
|
||||
this.def1 = def1;
|
||||
}
|
||||
|
||||
public String getDef2() {
|
||||
return def2;
|
||||
}
|
||||
|
||||
public void setDef2(String def2) {
|
||||
this.def2 = def2;
|
||||
}
|
||||
|
||||
public String getDef3() {
|
||||
return def3;
|
||||
}
|
||||
|
||||
public void setDef3(String def3) {
|
||||
this.def3 = def3;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.bip.v3.v2207.dao.impl.BipSupplierDaoImpl">
|
||||
<resultMap id="get-BipSupplierEntity-result" type="com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity">
|
||||
<result property="taxpayerid" column="taxpayerid" />
|
||||
<result property="def1" column="def1" />
|
||||
<result property="def2" column="def2" />
|
||||
<result property="def3" column="def3" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="ts" column="ts" />
|
||||
<result property="tripartiteId" column="tripartiteId" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="BipSupplierEntity_Base_Column_List">
|
||||
supplier.code,supplier.name,supplier.taxpayerid,bank.def1,bank.def2,bank.def3,supplier.ts, supplier.pk_cust_sup as tripartiteId
|
||||
</sql>
|
||||
|
||||
<sql id="BipSupplierEntity_Base_Column_List_details">
|
||||
splitbank,bankaccno,name,code
|
||||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-BipSupplierEntity-result">
|
||||
select
|
||||
<include refid="BipSupplierEntity_Base_Column_List" />
|
||||
from BD_SUPPLIER where pk_supplier = #{pk_supplier} and sdr='0'
|
||||
</select>
|
||||
|
||||
<select id="thirdInterfaceGetSupplier" resultMap="get-BipSupplierEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity">
|
||||
select
|
||||
<include refid="BipSupplierEntity_Base_Column_List" />
|
||||
FROM bd_cust_supplier supplier
|
||||
left join db_customerbank bank ON supplier.code = bank.code
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">supplier.code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and supplier.name = #{name}</if>
|
||||
<if test="taxpayerid != null and taxpayerid !='' "> and supplier.taxpayerid = #{taxpayerid}</if>
|
||||
<if test="def1 != null and def1 !='' "> and bank.def1 = #{def1}</if>
|
||||
<if test="def2 != null and def2 !='' "> and bank.def2 = #{def2}</if>
|
||||
<if test="def3 != null and def3 !='' "> and bank.def3 = #{def3}</if>
|
||||
<if test="tripartiteId != null and tripartiteId !='' "> and supplier.tripartiteId = #{tripartiteId}</if>
|
||||
<if test="ts != null and ts !='' "> and supplier.ts >'2023-09-30 14:18:39' and supplier.ts > #{ts} </if>
|
||||
</trim>
|
||||
group by supplier.code,supplier.name,supplier.taxpayerid,bank.def1,bank.def2,bank.def3,supplier.ts, supplier.pk_cust_sup
|
||||
</select>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="thirdInterfaceGetSupplierDetails" resultMap="get-BipSupplierEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity">
|
||||
select
|
||||
<include refid="BipSupplierEntity_Base_Column_List_details" />
|
||||
FROM db_customerbank
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and name = #{name}</if>
|
||||
<if test="bankaccno != null and bankaccno !='' "> and bankaccno = #{bankaccno}</if>
|
||||
<if test="splitbank != null and splitbank !='' "> and splitbank = #{splitbank}</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="BipSupplierEntity_list_base" resultMap="get-BipSupplierEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity">
|
||||
select
|
||||
<include refid="BipSupplierEntity_Base_Column_List" />
|
||||
FROM bd_cust_supplier supplier
|
||||
left join db_customerbank bank ON supplier.code = bank.code
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">supplier.code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and supplier.name = #{name}</if>
|
||||
<if test="taxpayerid != null and taxpayerid !='' "> and supplier.taxpayerid = #{taxpayerid}</if>
|
||||
<if test="def1 != null and def1 !='' "> and bank.def1 = #{def1}</if>
|
||||
<if test="def2 != null and def2 !='' "> and bank.def2 = #{def2}</if>
|
||||
<if test="def3 != null and def3 !='' "> and bank.def3 = #{def3}</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-BipSupplierEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity">
|
||||
select
|
||||
<include refid="BipSupplierEntity_Base_Column_List" />
|
||||
FROM bd_cust_supplier supplier
|
||||
left join db_customerbank bank ON supplier.code = bank.code
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''"> supplier.code like concat('%',#{code},'%')</if>
|
||||
<if test="name != null and name !='' "> and supplier.name like concat('%',#{name},'%')</if>
|
||||
<if test="taxpayerid != null and taxpayerid !='' "> and supplier.taxpayeridlike concat('%',#{taxpayeridlike},'%')</if>
|
||||
<if test="def1 != null and def1 !='' "> and bank.def1 like concat('%',#{def1},'%')</if>
|
||||
<if test="def2 != null and def2 !='' "> and bank.def2 like concat('%',#{def2},'%')</if>
|
||||
<if test="def3 != null and def3 !='' "> and bank.def3 like concat('%',#{def3},'%')</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* com.hzya.frame.bip.v3.v2207.entity
|
||||
*
|
||||
* @author makejava
|
||||
* @date 2024-05 -27 11:24
|
||||
*/
|
||||
|
||||
public class BipTokenVo extends BaseEntity {
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BipVoucher {
|
||||
private List<BipVoucherDetails> details;
|
||||
private List<BipVoucherDetails> detail;
|
||||
private String no;
|
||||
private String pk_corp;
|
||||
private String pk_glorgbook;
|
||||
private String pk_prepared;
|
||||
private String pk_vouchertype;
|
||||
private String pk_voucher;
|
||||
private String period;
|
||||
private String vouchertype;
|
||||
private String attachment;
|
||||
private String year;
|
||||
private String prepared;
|
||||
private String prepareddate;
|
||||
private String num;
|
||||
private String accbookCode;
|
||||
|
||||
public List<BipVoucherDetails> getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void setDetails(List<BipVoucherDetails> details) {
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
public String getNo() {
|
||||
return no;
|
||||
}
|
||||
|
||||
public void setNo(String no) {
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public String getPk_corp() {
|
||||
return pk_corp;
|
||||
}
|
||||
|
||||
public void setPk_corp(String pk_corp) {
|
||||
this.pk_corp = pk_corp;
|
||||
}
|
||||
|
||||
public String getPk_glorgbook() {
|
||||
return pk_glorgbook;
|
||||
}
|
||||
|
||||
public void setPk_glorgbook(String pk_glorgbook) {
|
||||
this.pk_glorgbook = pk_glorgbook;
|
||||
}
|
||||
|
||||
public String getPk_prepared() {
|
||||
return pk_prepared;
|
||||
}
|
||||
|
||||
public void setPk_prepared(String pk_prepared) {
|
||||
this.pk_prepared = pk_prepared;
|
||||
}
|
||||
|
||||
public String getPk_vouchertype() {
|
||||
return pk_vouchertype;
|
||||
}
|
||||
|
||||
public void setPk_vouchertype(String pk_vouchertype) {
|
||||
this.pk_vouchertype = pk_vouchertype;
|
||||
}
|
||||
|
||||
public String getPk_voucher() {
|
||||
return pk_voucher;
|
||||
}
|
||||
|
||||
public void setPk_voucher(String pk_voucher) {
|
||||
this.pk_voucher = pk_voucher;
|
||||
}
|
||||
|
||||
public List<BipVoucherDetails> getDetail() {
|
||||
return detail;
|
||||
}
|
||||
|
||||
public void setDetail(List<BipVoucherDetails> detail) {
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
public String getPeriod() {
|
||||
return period;
|
||||
}
|
||||
|
||||
public void setPeriod(String period) {
|
||||
this.period = period;
|
||||
}
|
||||
|
||||
public String getVouchertype() {
|
||||
return vouchertype;
|
||||
}
|
||||
|
||||
public void setVouchertype(String vouchertype) {
|
||||
this.vouchertype = vouchertype;
|
||||
}
|
||||
|
||||
public String getAttachment() {
|
||||
return attachment;
|
||||
}
|
||||
|
||||
public void setAttachment(String attachment) {
|
||||
this.attachment = attachment;
|
||||
}
|
||||
|
||||
public String getYear() {
|
||||
return year;
|
||||
}
|
||||
|
||||
public void setYear(String year) {
|
||||
this.year = year;
|
||||
}
|
||||
|
||||
public String getPrepared() {
|
||||
return prepared;
|
||||
}
|
||||
|
||||
public void setPrepared(String prepared) {
|
||||
this.prepared = prepared;
|
||||
}
|
||||
|
||||
public String getPrepareddate() {
|
||||
return prepareddate;
|
||||
}
|
||||
|
||||
public void setPrepareddate(String prepareddate) {
|
||||
this.prepareddate = prepareddate;
|
||||
}
|
||||
|
||||
public String getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(String num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public String getAccbookCode() {
|
||||
return accbookCode;
|
||||
}
|
||||
|
||||
public void setAccbookCode(String accbookCode) {
|
||||
this.accbookCode = accbookCode;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,186 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BipVoucherDetails {
|
||||
private List<BipAss> ass;
|
||||
private List<BipCashflow> cashflow;
|
||||
private String creditamount;
|
||||
private String debitamount;
|
||||
private String explanation;
|
||||
private String localcreditamount;
|
||||
private String localdebitamount;
|
||||
private String pk_accsubj;
|
||||
private String pk_currtype;
|
||||
private String debitquantity;
|
||||
private String price;
|
||||
private String accountCode;
|
||||
private String amount;
|
||||
private String globalcreditamount;
|
||||
private String globaldebitamount;
|
||||
private String groupdebitamount;
|
||||
private String currtypeCode;
|
||||
private String busidate;
|
||||
private String groupcreditamount;
|
||||
private String detailindex;
|
||||
|
||||
public List<BipAss> getAss() {
|
||||
return ass;
|
||||
}
|
||||
|
||||
public void setAss(List<BipAss> ass) {
|
||||
this.ass = ass;
|
||||
}
|
||||
|
||||
public List<BipCashflow> getCashflow() {
|
||||
return cashflow;
|
||||
}
|
||||
|
||||
public void setCashflow(List<BipCashflow> cashflow) {
|
||||
this.cashflow = cashflow;
|
||||
}
|
||||
|
||||
public String getCreditamount() {
|
||||
return creditamount;
|
||||
}
|
||||
|
||||
public void setCreditamount(String creditamount) {
|
||||
this.creditamount = creditamount;
|
||||
}
|
||||
|
||||
public String getDebitamount() {
|
||||
return debitamount;
|
||||
}
|
||||
|
||||
public void setDebitamount(String debitamount) {
|
||||
this.debitamount = debitamount;
|
||||
}
|
||||
|
||||
public String getExplanation() {
|
||||
return explanation;
|
||||
}
|
||||
|
||||
public void setExplanation(String explanation) {
|
||||
this.explanation = explanation;
|
||||
}
|
||||
|
||||
public String getLocalcreditamount() {
|
||||
return localcreditamount;
|
||||
}
|
||||
|
||||
public void setLocalcreditamount(String localcreditamount) {
|
||||
this.localcreditamount = localcreditamount;
|
||||
}
|
||||
|
||||
public String getLocaldebitamount() {
|
||||
return localdebitamount;
|
||||
}
|
||||
|
||||
public void setLocaldebitamount(String localdebitamount) {
|
||||
this.localdebitamount = localdebitamount;
|
||||
}
|
||||
|
||||
public String getPk_accsubj() {
|
||||
return pk_accsubj;
|
||||
}
|
||||
|
||||
public void setPk_accsubj(String pk_accsubj) {
|
||||
this.pk_accsubj = pk_accsubj;
|
||||
}
|
||||
|
||||
public String getPk_currtype() {
|
||||
return pk_currtype;
|
||||
}
|
||||
|
||||
public void setPk_currtype(String pk_currtype) {
|
||||
this.pk_currtype = pk_currtype;
|
||||
}
|
||||
|
||||
public String getDebitquantity() {
|
||||
return debitquantity;
|
||||
}
|
||||
|
||||
public void setDebitquantity(String debitquantity) {
|
||||
this.debitquantity = debitquantity;
|
||||
}
|
||||
|
||||
public String getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(String price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getAccountCode() {
|
||||
return accountCode;
|
||||
}
|
||||
|
||||
public void setAccountCode(String accountCode) {
|
||||
this.accountCode = accountCode;
|
||||
}
|
||||
|
||||
public String getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(String amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public String getGlobalcreditamount() {
|
||||
return globalcreditamount;
|
||||
}
|
||||
|
||||
public void setGlobalcreditamount(String globalcreditamount) {
|
||||
this.globalcreditamount = globalcreditamount;
|
||||
}
|
||||
|
||||
public String getGlobaldebitamount() {
|
||||
return globaldebitamount;
|
||||
}
|
||||
|
||||
public void setGlobaldebitamount(String globaldebitamount) {
|
||||
this.globaldebitamount = globaldebitamount;
|
||||
}
|
||||
|
||||
public String getGroupdebitamount() {
|
||||
return groupdebitamount;
|
||||
}
|
||||
|
||||
public void setGroupdebitamount(String groupdebitamount) {
|
||||
this.groupdebitamount = groupdebitamount;
|
||||
}
|
||||
|
||||
public String getCurrtypeCode() {
|
||||
return currtypeCode;
|
||||
}
|
||||
|
||||
public void setCurrtypeCode(String currtypeCode) {
|
||||
this.currtypeCode = currtypeCode;
|
||||
}
|
||||
|
||||
public String getBusidate() {
|
||||
return busidate;
|
||||
}
|
||||
|
||||
public void setBusidate(String busidate) {
|
||||
this.busidate = busidate;
|
||||
}
|
||||
|
||||
public String getGroupcreditamount() {
|
||||
return groupcreditamount;
|
||||
}
|
||||
|
||||
public void setGroupcreditamount(String groupcreditamount) {
|
||||
this.groupcreditamount = groupcreditamount;
|
||||
}
|
||||
|
||||
public String getDetailindex() {
|
||||
return detailindex;
|
||||
}
|
||||
|
||||
public void setDetailindex(String detailindex) {
|
||||
this.detailindex = detailindex;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service;
|
||||
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
|
||||
public interface IBipPzService extends IBaseService<BipTokenVo,String>{
|
||||
|
||||
|
||||
SysExtensionApiEntity getPz(SysExtensionApiEntity entity);
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service;
|
||||
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public interface IBipSsoService extends IBaseService<BipTokenVo,String>{
|
||||
/**
|
||||
*
|
||||
* @content Bip单点统一认证接口
|
||||
* @author laborer
|
||||
* @date 2024/5/30 0030 13:45
|
||||
*
|
||||
*/
|
||||
|
||||
String erpSso(HttpServletRequest request, String ticket)throws Exception;
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取sso动态加密,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
SysExtensionApiEntity ssoEncrypt(SysExtensionApiEntity entity);
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service;
|
||||
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
|
||||
public interface IBipV32207BillService extends IBaseService<BipTokenVo,String>{
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取BIPtoken,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
|
||||
SysExtensionApiEntity getBipBill(SysExtensionApiEntity entity);
|
||||
SysExtensionApiEntity getBipBillYs(SysExtensionApiEntity entity);
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface IBipV32207Service extends IBaseService<BipSupplierEntity,String>{
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 获取token
|
||||
**/
|
||||
JsonResultEntity thirdInterfaceGetToken(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 获取供应商
|
||||
**/
|
||||
@DS("oracle91")
|
||||
JsonResultEntity thirdInterfaceGetSupplier(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 新增供应商
|
||||
**/
|
||||
JsonResultEntity thirdInterfaceSaveSupplier(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* 供应商传递OA
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
JsonResultEntity thirdInterfaceSendOa(JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* 获取BIP组织数据
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
JsonResultEntity thirdInterfaceGetOrgs(JSONObject jsonObject);
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface IBipV32207TokenService extends IBaseService<BipTokenVo,String>{
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取BIPtoken,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
|
||||
SysExtensionApiEntity getBipToken(SysExtensionApiEntity entity);
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipArchivesDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipAss;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipVoucher;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipVoucherDetails;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipPzService;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import jdk.nashorn.internal.ir.annotations.Reference;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service(value = "bipPzService")
|
||||
public class BipPzServiceImpl extends BaseService<BipTokenVo, String> implements IBipPzService {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@Resource
|
||||
private IBipArchivesDao bipArchivesDao;
|
||||
/**
|
||||
* @param entity
|
||||
* @return com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity
|
||||
* @Author lvleigang
|
||||
* @Description 组装凭证数据
|
||||
* @Date 10:52 上午 2024/11/5
|
||||
**/
|
||||
@Override
|
||||
public SysExtensionApiEntity getPz(SysExtensionApiEntity entity) {
|
||||
String bodys = entity.getBodys();
|
||||
BipVoucher voucher = JSONObject.parseObject(bodys, BipVoucher.class);
|
||||
List<String> fzhs = Arrays.asList(new String[]{"1", "2", "6", "73", "D01", "jobass", "93", "96", "22"});
|
||||
if (voucher.getDetails() != null && voucher.getDetails().size() > 0) {
|
||||
for (int a = 0; a < voucher.getDetails().size(); a++) {
|
||||
BipVoucherDetails voucherDetails = voucher.getDetails().get(a);
|
||||
if (voucherDetails.getAss() != null && voucherDetails.getAss().size() > 0) {
|
||||
for (int b = 0; b < voucherDetails.getAss().size(); b++) {
|
||||
BipAss ass = voucherDetails.getAss().get(b);
|
||||
if (ass.getChecktypecode() != null && !"".equals(ass.getChecktypecode())) {
|
||||
//存在需要转换的
|
||||
if (fzhs.contains(ass.getChecktypecode())) {
|
||||
BipArchivesEntity archivesEntity = new BipArchivesEntity();
|
||||
archivesEntity.setArchivesType(ass.getChecktypecode());
|
||||
archivesEntity.setLeftCode(ass.getCheckvaluecode());
|
||||
archivesEntity.setLeftOrg(voucher.getPk_corp());
|
||||
|
||||
List<BipArchivesEntity> archivesEntities = bipArchivesDao.queryArchivesData(archivesEntity);
|
||||
if (archivesEntities != null && archivesEntities.size() > 0) {
|
||||
ass.setCheckvaluecode(archivesEntities.get(0).getRightCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bodys = JSON.toJSONString(voucher);
|
||||
entity.setBodys(bodys);
|
||||
return entity;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpException;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipSsoService;
|
||||
import com.hzya.frame.iputil.IPUtil;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import nccloud.security.impl.SignatureTookKit;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Service(value = "BipSsoServiceImpl")
|
||||
public class BipSsoServiceImpl extends BaseService<BipTokenVo, String> implements IBipSsoService {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
private final String BASEURL = "http://192.168.2.237:8099/seeyon/thirdpartyController.do?ticket=";
|
||||
private final String ESBURL = "http://127.0.0.1:9081/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
/**
|
||||
*
|
||||
* @content Bip单点统一认证接口
|
||||
* @author laborer
|
||||
* @date 2024/5/30 0030 13:45
|
||||
*
|
||||
*/
|
||||
|
||||
@Override
|
||||
public String erpSso(HttpServletRequest request,String userCode)throws Exception {
|
||||
logger.info("当前IP地址为"+ JSON.toJSONString(IPUtil.getIpAddress(request)));
|
||||
String result = "";
|
||||
boolean flag = true;
|
||||
// logger.info("接收到致远OA认证参数的ticket:{}",ticket);
|
||||
//通过ticket获取OA用户信息
|
||||
// String userCode = HttpUtil.get(BASEURL+ticket);
|
||||
logger.info("获取到的OA用户信息:{}",userCode);
|
||||
String dsname = "ycjf";
|
||||
String client_id = "OAREST";//第三方系统id
|
||||
StringBuffer sb = new StringBuffer();
|
||||
if(StrUtil.isNotEmpty(userCode)){
|
||||
try {
|
||||
logger.info("开始加密");
|
||||
String security = genKey(userCode,userCode + (System.currentTimeMillis() + "").substring(0, 6));
|
||||
logger.info("加密结束:{}",security);
|
||||
sb.append("type=type_security&dsname="+dsname+"&usercode="+userCode+"&client_id="+client_id+"&security="+security);
|
||||
String baseUrl = "http://10.75.51.78:8899/service/genThirdPartyAccessToken?"+sb.toString();
|
||||
logger.info("请求BIPtokenbaseUrl:{}",baseUrl);
|
||||
result = HttpRequest.post(baseUrl)
|
||||
.header("Content-Type", "application/x-www-form-urlencoded")//头信息,多个头信息多次调用此方法即可
|
||||
.header("Content-Length", "10000")//头信息,多个头信息多次调用此方法即可
|
||||
.header("userid", "admin")//头信息,多个头信息多次调用此方法即可
|
||||
.body("{}")//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
logger.info("获取到的BIPtoken信息:{}",result);
|
||||
} catch (HttpException e) {
|
||||
flag=false;
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
String indexUR = "http://10.75.51.78:8899/nccloud/resources/uap/rbac/thirdpartylogin/main/index.html?accesstoken="+result+"&redirect_uri=http://10.75.51.78:8899/nccloud/resources/workbench/public/common/main/index.html#";
|
||||
logger.info(indexUR);
|
||||
return indexUR;
|
||||
}else{
|
||||
return "http://10.75.51.78:8899/nccloud/resources/uap/rbac/login/main/index.html";
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取sso动态加密,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
|
||||
@Override
|
||||
public SysExtensionApiEntity ssoEncrypt(SysExtensionApiEntity entity) {
|
||||
try {
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
String userCode = headers.get("usercode");//用户编码
|
||||
String dsname = headers.get("dsname");//数据源
|
||||
String client_id = headers.get("client_id");//第三方系统id
|
||||
StringBuffer sb = new StringBuffer();
|
||||
String security = genKey(userCode,userCode + (System.currentTimeMillis() + "").substring(0, 6));
|
||||
StringBuffer querys = new StringBuffer();
|
||||
querys.append("type=type_security");
|
||||
querys.append("&dsname="+dsname);
|
||||
querys.append("&usercode="+userCode);
|
||||
querys.append("&client_id="+client_id);
|
||||
querys.append("&security="+security);
|
||||
entity.setQuerys(querys.toString());
|
||||
headers.put("Content-Type", "application/x-www-form-urlencoded");
|
||||
headers.put("userid", "admin");
|
||||
entity.setHeaders(headers);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
/**获取NCC的key*/
|
||||
private static String genKey(String userid, String key) throws Exception {
|
||||
return new Base64().encodeToString(SignatureTookKit.digestSign(userid.getBytes(), key.getBytes()));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipArchivesDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipAss;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipVoucher;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipVoucherDetails;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207BillService;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207TokenService;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.util.bipV3.Encryption;
|
||||
import com.hzya.frame.util.bipV3.SHA256Util;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Service(value = "BipV32207BillServiceImpl")
|
||||
public class BipV32207BillServiceImpl extends BaseService<BipTokenVo, String> implements IBipV32207BillService {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
@Resource
|
||||
private IBipArchivesDao bipArchivesDao;
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取拼接单据动态加密,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
|
||||
@Override
|
||||
public SysExtensionApiEntity getBipBill(SysExtensionApiEntity entity) {
|
||||
try {
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
String client_id = headers.get("client_id");
|
||||
//token信息
|
||||
String access_token = headers.get("access_token");
|
||||
//公钥
|
||||
String pubKey = headers.get("pubKey");
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(client_id);
|
||||
String parm = entity.getBodys();
|
||||
if (StringUtils.isNotBlank(parm)) {
|
||||
sb.append(parm);
|
||||
}
|
||||
sb.append(pubKey);
|
||||
// 签名
|
||||
String sign = SHA256Util.getSHA256(sb.toString(), pubKey);
|
||||
StringBuffer querys = new StringBuffer();
|
||||
querys.append("access_token="+access_token);
|
||||
querys.append("&signature="+sign);
|
||||
querys.append("&client_id="+client_id);
|
||||
entity.setQuerys(querys.toString());
|
||||
headers.put("signature",sign);
|
||||
// headers.put("content-type","application/x-www-form-urlencoded");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
@Override
|
||||
public SysExtensionApiEntity getBipBillYs(SysExtensionApiEntity entity) {
|
||||
try {
|
||||
String bodys = entity.getBodys();
|
||||
BipVoucher voucher = JSONObject.parseObject(bodys, BipVoucher.class);
|
||||
List<String> fzhs = Arrays.asList(new String[]{"0012", "0006", "0004"});
|
||||
if (voucher.getDetail() != null && voucher.getDetail().size() > 0) {
|
||||
for (int a = 0; a < voucher.getDetail().size(); a++) {
|
||||
BipVoucherDetails voucherDetails = voucher.getDetail().get(a);
|
||||
if (voucherDetails.getAss() != null && voucherDetails.getAss().size() > 0) {
|
||||
for (int b = 0; b < voucherDetails.getAss().size(); b++) {
|
||||
BipAss ass = voucherDetails.getAss().get(b);
|
||||
if (ass.getChecktypecode() != null && !"".equals(ass.getChecktypecode())) {
|
||||
//存在需要转换的
|
||||
if (fzhs.contains(ass.getChecktypecode())) {
|
||||
BipArchivesEntity archivesEntity = new BipArchivesEntity();
|
||||
archivesEntity.setArchivesType(ass.getChecktypecode());
|
||||
archivesEntity.setLeftCode(ass.getCheckvaluecode());
|
||||
archivesEntity.setLeftOrg(voucher.getPk_corp());
|
||||
|
||||
List<BipArchivesEntity> archivesEntities = bipArchivesDao.queryArchivesDatays(archivesEntity);
|
||||
if (archivesEntities != null && archivesEntities.size() > 0) {
|
||||
ass.setCheckvaluecode(archivesEntities.get(0).getRightCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bodys = JSON.toJSONString(voucher);
|
||||
entity.setBodys(bodys);
|
||||
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
String client_id = headers.get("client_id");
|
||||
//token信息
|
||||
String access_token = headers.get("access_token");
|
||||
//公钥
|
||||
String pubKey = headers.get("pubKey");
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(client_id);
|
||||
String parm = entity.getBodys();
|
||||
if (StringUtils.isNotBlank(parm)) {
|
||||
sb.append(parm);
|
||||
}
|
||||
sb.append(pubKey);
|
||||
// 签名
|
||||
String sign = SHA256Util.getSHA256(sb.toString(), pubKey);
|
||||
StringBuffer querys = new StringBuffer();
|
||||
querys.append("access_token="+access_token);
|
||||
querys.append("&signature="+sign);
|
||||
querys.append("&client_id="+client_id);
|
||||
entity.setQuerys(querys.toString());
|
||||
headers.put("signature",sign);
|
||||
// headers.put("content-type","application/x-www-form-urlencoded");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,480 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.google.gson.Gson;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsDetailsEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierDetailsEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207Service;
|
||||
import com.hzya.frame.dateutil.DateUtil;
|
||||
import com.hzya.frame.util.PluginUtils;
|
||||
import com.hzya.frame.util.bipV3.Encryption;
|
||||
import com.hzya.frame.util.bipV3.SHA256Util;
|
||||
import com.hzya.frame.util.oldNcc.CompressUtil;
|
||||
import com.hzya.frame.util.oldNcc.Decryption;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@Service(value = "bipV32207Service")
|
||||
public class BipV32207ServiceImpl extends BaseService<BipSupplierEntity, String> implements IBipV32207Service {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
//定义项目开始同步日期
|
||||
private String ts = "2023-09-30 15:47:08";
|
||||
//组织的同步日期
|
||||
private String orgsts = "2023-09-30 15:47:08";
|
||||
@Autowired
|
||||
private IBipSupplierDao bipSupplierDao;
|
||||
|
||||
@Autowired
|
||||
private IBipSupplierDetailsDao bipSupplierDetailsDao;
|
||||
|
||||
@Autowired
|
||||
private IBipOrgsDao bipOrgsDao;
|
||||
|
||||
@Autowired
|
||||
private IBipOrgsDetailsDao bipOrgsDetailsDao;
|
||||
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 获取token
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceGetToken(JSONObject object) {
|
||||
JSONObject jsonObject = getstrObj("jsonStr", object);
|
||||
String client_id = jsonObject.getString("client_id");
|
||||
String pubKey = jsonObject.getString("pubKey");
|
||||
String client_secret = jsonObject.getString("client_secret");
|
||||
String username = jsonObject.getString("username");
|
||||
String pwd = jsonObject.getString("pwd");
|
||||
String busi_center = jsonObject.getString("busi_center");
|
||||
String dsname = jsonObject.getString("dsname");
|
||||
String baseUrl = jsonObject.getString("baseUrl");
|
||||
Map<String, String> paramMap = new HashMap<String, String>();
|
||||
// 密码模式认证
|
||||
paramMap.put("grant_type", "password");
|
||||
// 第三方应用id
|
||||
paramMap.put("client_id", client_id);
|
||||
// 第三方应用secret 公钥加密
|
||||
try {
|
||||
paramMap.put("client_secret", URLEncoder.encode(Encryption.pubEncrypt(pubKey, client_secret), "utf-8"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// ncc用户名
|
||||
paramMap.put("username", username);
|
||||
// 密码 公钥加密
|
||||
try {
|
||||
paramMap.put("password", URLEncoder.encode(Encryption.pubEncrypt(pubKey, pwd), "utf-8"));
|
||||
} catch (Exception e) {
|
||||
return BaseResult.getFailureMessageEntity("获取token失败");
|
||||
}
|
||||
// 账套编码
|
||||
paramMap.put("biz_center", busi_center);
|
||||
// 签名
|
||||
String sign = SHA256Util.getSHA256(client_id + client_secret + username + pwd + pubKey, pubKey);
|
||||
paramMap.put("signature", sign);
|
||||
paramMap.put("dsname", dsname);
|
||||
String url = baseUrl + "/nccloud/opm/accesstoken";
|
||||
String mediaType = "application/x-www-form-urlencoded";
|
||||
String token = null;
|
||||
try {
|
||||
token = doPostHutool(url, paramMap, mediaType, null, "", "token");
|
||||
} catch (Exception e) {
|
||||
return BaseResult.getFailureMessageEntity("获取token失败");
|
||||
}
|
||||
if (JSONUtil.isTypeJSON(token)) {
|
||||
JSONObject jsonObject1 = JSONObject.parseObject(token);
|
||||
return BaseResult.getSuccessMessageEntity("获取token成功", jsonObject1);
|
||||
} else {
|
||||
return BaseResult.getSuccessMessageEntity("获取token成功", token);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送post请求
|
||||
*
|
||||
* @param baseUrl
|
||||
* @param paramMap
|
||||
* @param mediaType
|
||||
* @param headers
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
private String doPostHutool(String baseUrl, Map<String, String> paramMap, String mediaType, Map<String, String> headers, String json, String type) {
|
||||
String result = null;
|
||||
|
||||
try {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(baseUrl);
|
||||
if (paramMap != null) {
|
||||
sb.append("?");
|
||||
for (Map.Entry<String, String> entry : paramMap.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
String value = entry.getValue();
|
||||
sb.append(key + "=" + value).append("&");
|
||||
}
|
||||
}
|
||||
if ("bill".equals(type)) {
|
||||
sb.append("?");
|
||||
for (Map.Entry<String, String> entry : headers.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
String value = entry.getValue();
|
||||
sb.append(key + "=" + value).append("&");
|
||||
}
|
||||
}
|
||||
baseUrl = sb.toString().substring(0, sb.toString().length() - 1);
|
||||
HttpRequest re = HttpRequest.post(baseUrl);
|
||||
re.addHeaders(headers);
|
||||
result = re.body(json)
|
||||
.timeout(2000000)//超时,毫秒
|
||||
.execute().body();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param key
|
||||
* @param object
|
||||
* @return com.alibaba.fastjson.JSONObject
|
||||
* @Author lvleigang
|
||||
* @Description 获取对象转换成jsonobj
|
||||
* @Date 11:51 下午 2023/7/10
|
||||
**/
|
||||
public JSONObject getstrObj(String key, JSONObject object) {
|
||||
if (checkStr(object.getString(key))) {
|
||||
return object.getJSONObject(key);
|
||||
}
|
||||
return new JSONObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param str
|
||||
* @return void
|
||||
* @Author lvleigang
|
||||
* @Description 校验字符串
|
||||
* @Date 11:41 上午 2022/12/7
|
||||
**/
|
||||
protected Boolean checkStr(String str) {
|
||||
Boolean flag = true;
|
||||
if (str == null || "".equals(str)) {
|
||||
flag = false;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 获取供应商
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceGetSupplier(JSONObject jsonObject) {
|
||||
BipSupplierEntity bipSupplierEntity = getData("jsonStr", jsonObject, BipSupplierEntity.class);
|
||||
//设置查询区间
|
||||
bipSupplierEntity.setTs(ts);
|
||||
logger.info("查询供应商数据,当前TS:"+ts);
|
||||
List<BipSupplierEntity> bipSupplierEntities = bipSupplierDao.thirdInterfaceGetSupplier(bipSupplierEntity);
|
||||
//更新TS时间
|
||||
ts = DateUtil.dateToString(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
logger.info("TS已更新:"+ts);
|
||||
//System.out.println("查询供应商明细");
|
||||
logger.info("查询供应商明细"+JSON.toJSONString(bipSupplierEntities));
|
||||
List<JSONObject> jsonObjectList=new ArrayList<>();
|
||||
//[{"code":"SL20231101727","dataSourceCode":"master","name":"无锡恒君安管理咨询有限公司","taxpayerid":"91320205MAD2HAQN6Q","tripartiteId":"0001A31000000002M3TS","ts":"2023-11-16 14:05:10"}]
|
||||
|
||||
List<BipSupplierDetailsEntity> bipSupplierDetails = null;
|
||||
for (BipSupplierEntity supplierEntity : bipSupplierEntities) {
|
||||
List<JSONObject> list=new ArrayList<>();
|
||||
JSONObject jsonObjectResult=new JSONObject();
|
||||
jsonObjectResult.put("code",supplierEntity.getCode());
|
||||
jsonObjectResult.put("name",supplierEntity.getName());
|
||||
jsonObjectResult.put("taxpayerid",supplierEntity.getTaxpayerid());
|
||||
jsonObjectResult.put("def1",supplierEntity.getDef1());
|
||||
jsonObjectResult.put("def2",supplierEntity.getDef2());
|
||||
jsonObjectResult.put("def3",supplierEntity.getDef3());
|
||||
jsonObjectResult.put("tripartiteId",supplierEntity.getTripartiteId());
|
||||
//根据供应商编码和名称查询明细
|
||||
String code = supplierEntity.getCode();
|
||||
String name = supplierEntity.getName();
|
||||
//System.out.println("根据供应处名称,编码获取明细数据:code:"+code +"name:"+name);
|
||||
logger.info("根据供应处名称,编码获取明细数据:code:"+code +"name:"+name);
|
||||
BipSupplierDetailsEntity bipSupplierDetailsEntity = new BipSupplierDetailsEntity();
|
||||
bipSupplierDetailsEntity.setCode(code);
|
||||
bipSupplierDetailsEntity.setName(name);
|
||||
logger.info("根据供应商编码,名称查询银行档案 {}",JSON.toJSONString(bipSupplierDetailsEntity));
|
||||
List<BipSupplierDetailsEntity> bipSupplierDetailsEntities = queryBipSupplierDetails(bipSupplierDetailsEntity) ;
|
||||
// /bipSupplierDetails.stream().filter(that-> code.equalsIgnoreCase(that.getCode() ) && name.equalsIgnoreCase(that.getName() ) ).collect(Collectors.toList());
|
||||
logger.info("根据供应处名称,编码获取明细数据 bipSupplierDetailsEntities值:{}",JSON.toJSONString(bipSupplierDetailsEntities));
|
||||
if (bipSupplierDetailsEntities.size()>0 && null!=bipSupplierDetailsEntities){
|
||||
bipSupplierDetailsEntities.get(0).setIsdefault("-8073674727882144390");
|
||||
for (BipSupplierDetailsEntity supplierDetailsEntity : bipSupplierDetailsEntities) {
|
||||
JSONObject jsonObjectDetails=new JSONObject();
|
||||
jsonObjectDetails.put("splitbank",supplierDetailsEntity.getSplitbank());
|
||||
jsonObjectDetails.put("bankaccno",supplierDetailsEntity.getBankaccno());
|
||||
jsonObjectDetails.put("combinno",supplierDetailsEntity.getCombinno());
|
||||
jsonObjectDetails.put("isdefault",supplierDetailsEntity.getIsdefault());
|
||||
list.add(jsonObjectDetails);
|
||||
}
|
||||
}
|
||||
jsonObjectResult.put("details",list);
|
||||
jsonObjectList.add(jsonObjectResult);
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询成功",jsonObjectList);
|
||||
}
|
||||
@DS("oracle91")
|
||||
private List<BipSupplierDetailsEntity> queryBipSupplierDetails(BipSupplierDetailsEntity bipSupplierDetailsEntity){
|
||||
// BipSupplierDetailsEntity bipSupplierDetailsEntity=new BipSupplierDetailsEntity();
|
||||
// bipSupplierDetailsEntity.setCode(supplierEntity.getCode());
|
||||
// bipSupplierDetailsEntity.setName(supplierEntity.getName());
|
||||
|
||||
List<BipSupplierDetailsEntity> bipSupplierDetailsEntities = bipSupplierDetailsDao.thirdInterfaceGetSupplierDetails(bipSupplierDetailsEntity);
|
||||
return bipSupplierDetailsEntities;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取BIP组织数据
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceGetOrgs(JSONObject jsonObject) {
|
||||
BipOrgsEntity bipOrgsEntity = getData("jsonStr", jsonObject, BipOrgsEntity.class);
|
||||
//设置查询区间
|
||||
bipOrgsEntity.setOrgsts(orgsts);
|
||||
logger.info("查询组织数据,当前TS:" + orgsts);
|
||||
List<BipOrgsEntity> bipOrgsEntities = bipOrgsDao.thirdInterfaceGetOrgs(bipOrgsEntity);
|
||||
//更新TS时间
|
||||
orgsts = DateUtil.dateToString(new Date(), "yyyy-MM-dd HH:mm:ss");
|
||||
logger.info("组织TS已更新:" + orgsts);
|
||||
logger.info("查询组织明细" + JSON.toJSONString(bipOrgsEntities));
|
||||
List<JSONObject> jsonObjectList = new ArrayList<>();
|
||||
if (null != bipOrgsEntities && bipOrgsEntities.size() > 0) {
|
||||
for (BipOrgsEntity orgsEntity : bipOrgsEntities) {
|
||||
List<JSONObject> list = new ArrayList<>();
|
||||
JSONObject jsonObjectResult = new JSONObject();
|
||||
jsonObjectResult.put("code", orgsEntity.getCode());//单位编码
|
||||
jsonObjectResult.put("name", orgsEntity.getName());//单位名称
|
||||
jsonObjectResult.put("tripartiteId", orgsEntity.getTripartiteId());//BIPID
|
||||
//根据组织主键查询明细
|
||||
String tripartiteId = orgsEntity.getTripartiteId();
|
||||
//System.out.println("根据供应处名称,编码获取明细数据:code:"+code +"name:"+name);
|
||||
logger.info("根据组织主键获取明细数据:pk_financeorg:{}", tripartiteId);
|
||||
BipOrgsDetailsEntity bipOrgsDetailsEntity = new BipOrgsDetailsEntity();
|
||||
bipOrgsDetailsEntity.setControlorg(tripartiteId);
|
||||
List<BipOrgsDetailsEntity> bipOrgsDetailsEntities = queryBipOrgsDetails(bipOrgsDetailsEntity);
|
||||
if (bipOrgsDetailsEntities.size() > 0 && null != bipOrgsDetailsEntities) {
|
||||
for (BipOrgsDetailsEntity orgsDetailsEntity : bipOrgsDetailsEntities) {
|
||||
JSONObject jsonObjectDetails = new JSONObject();
|
||||
jsonObjectDetails.put("bankCode", orgsDetailsEntity.getBankCode());//开户行编码
|
||||
jsonObjectDetails.put("bankName", orgsDetailsEntity.getBankName());//开户行名称
|
||||
jsonObjectDetails.put("accnum", orgsDetailsEntity.getAccnum());//账户
|
||||
jsonObjectDetails.put("cnapsCode", orgsDetailsEntity.getCnapsCode());//联行号
|
||||
list.add(jsonObjectDetails);
|
||||
}
|
||||
}
|
||||
jsonObjectResult.put("details", list);
|
||||
jsonObjectList.add(jsonObjectResult);
|
||||
}
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询成功", jsonObjectList);
|
||||
}
|
||||
private List<BipOrgsDetailsEntity> queryBipOrgsDetails(BipOrgsDetailsEntity bipOrgsDetailsEntity){
|
||||
List<BipOrgsDetailsEntity> bipOrgsDetailsEntities = bipOrgsDetailsDao.thirdInterfaceGetOrgsDetails(bipOrgsDetailsEntity);
|
||||
return bipOrgsDetailsEntities;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 新增供应商
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceSaveSupplier(JSONObject object) {
|
||||
JSONObject jsonObject = getstrObj("jsonStr", object);
|
||||
//认证access_token
|
||||
String access_token = jsonObject.getString("access_token");
|
||||
//认证security_key
|
||||
String security_key = jsonObject.getString("security_key");
|
||||
//服务器ip:port
|
||||
String baseUrl = jsonObject.getString("baseUrl");
|
||||
//api方法
|
||||
String apiUrl = jsonObject.getString("apiUrl");
|
||||
//发送的数据
|
||||
String sendData =jsonObject.getString("sendData");
|
||||
//对应于在第三方应用注册当中的app_id
|
||||
String client_id = jsonObject.getString("client_id");
|
||||
//公钥
|
||||
String pubKey = jsonObject.getString("pubKey");
|
||||
//接口调用业务标识
|
||||
String busi_id = jsonObject.getString("busi_id");
|
||||
//重复调用检查
|
||||
String repeat_check = jsonObject.getString("repeat_check");
|
||||
//返回值压缩加密级别
|
||||
String secret_level = jsonObject.getString("secret_level") == null ? "L0": jsonObject.getString("secret_level") ;
|
||||
try {
|
||||
String returnStr = sendApi(access_token, security_key, baseUrl,apiUrl,sendData,client_id,pubKey,busi_id,repeat_check,secret_level);
|
||||
if(JSONUtil.isTypeJSON(returnStr)){
|
||||
JSONObject jsonObject1 = JSONObject.parseObject(returnStr);
|
||||
return BaseResult.getSuccessMessageEntity("发送数据成功",jsonObject1);
|
||||
}else {
|
||||
return BaseResult.getSuccessMessageEntity("发送数据成功",returnStr);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return BaseResult.getFailureMessageEntity("发送数据错误");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应商传递OA
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceSendOa(JSONObject jsonObject) throws Exception {
|
||||
JSONObject jsonObjectStr = getstrObj("jsonStr", jsonObject);
|
||||
PluginBaseEntity pluginBaseEntity = PluginUtils.getPluginsById(jsonObjectStr.getString("plug_id"));
|
||||
JsonResultEntity s = pluginBaseEntity.executeBusiness(jsonObjectStr);
|
||||
return BaseResult.getSuccessMessageEntity("传递成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param access_token 认证access_token
|
||||
* @param security_key 认证security_key
|
||||
* @param baseUrl 服务器ip:port
|
||||
* @param apiUrl api方法
|
||||
* @param putParameter 发送的数据
|
||||
* @param client_id 对应于在第三方应用注册当中的app_id
|
||||
* @param pubKey 公钥
|
||||
* @param busi_id 接口调用业务标识
|
||||
* @param repeat_check 重复调用检查
|
||||
* @param secret_level 返回值压缩加密级别
|
||||
* @return java.lang.String
|
||||
* @Author lvleigang
|
||||
* @Description 发起api接口
|
||||
* @Date 9:52 上午 2023/8/22
|
||||
**/
|
||||
private String sendApi(String access_token, String security_key, String baseUrl, String apiUrl, String putParameter, String client_id, String pubKey, String busi_id, String repeat_check, String secret_level) throws Exception{
|
||||
// header 参数
|
||||
Map<String, String> headermap = new HashMap<>();
|
||||
headermap.put("access_token", access_token);
|
||||
headermap.put("client_id", client_id);
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(client_id);
|
||||
if (StringUtils.isNotBlank(putParameter)) {
|
||||
sb.append(putParameter);
|
||||
}
|
||||
sb.append(pubKey);
|
||||
String sign = SHA256Util.getSHA256(sb.toString(), pubKey);
|
||||
headermap.put("signature", sign);
|
||||
if (StringUtils.isNotBlank(busi_id)) {
|
||||
headermap.put("busi_id", busi_id);
|
||||
}
|
||||
if (StringUtils.isNotBlank(repeat_check)) {
|
||||
headermap.put("repeat_check", repeat_check);
|
||||
}
|
||||
String mediaType = "application/json;charset=utf-8";
|
||||
// 表体数据json
|
||||
// 根据安全级别选择加密或压缩请求表体参数
|
||||
String json = dealRequestBody(putParameter, security_key, secret_level);
|
||||
// 返回值
|
||||
String sendUrl = baseUrl + apiUrl;
|
||||
String result = doPostHutool(sendUrl, null, mediaType, headermap, json, "bill");
|
||||
String changeData = dealResponseBody(result, security_key, secret_level);
|
||||
return changeData;
|
||||
}
|
||||
|
||||
// 返回值进行过加密和压缩,对返回值进行解压和解密
|
||||
private static String dealResponseBody(String source, String security_key, String level) throws Exception {
|
||||
String result = null;
|
||||
if (StringUtils.isEmpty(level) || SecretConst.LEVEL0.equals(level)) {
|
||||
result = source;
|
||||
} else if (SecretConst.LEVEL1.equals(level)) {
|
||||
result = Decryption.symDecrypt(security_key, source);
|
||||
} else if (SecretConst.LEVEL2.equals(level)) {
|
||||
result = CompressUtil.gzipDecompress(source);
|
||||
} else if (SecretConst.LEVEL3.equals(level)) {
|
||||
result = CompressUtil.gzipDecompress(Decryption.symDecrypt(security_key, source));
|
||||
} else if (SecretConst.LEVEL4.equals(level)) {
|
||||
result = Decryption.symDecrypt(security_key, CompressUtil.gzipDecompress(source));
|
||||
} else {
|
||||
throw new Exception("无效的安全等级");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// 根据安全级别设置,表体是否加密或压缩
|
||||
private static String dealRequestBody(String source, String security_key, String level) throws Exception {
|
||||
String result = null;
|
||||
if (StringUtils.isEmpty(level) || SecretConst.LEVEL0.equals(level)) {
|
||||
result = source;
|
||||
} else if (SecretConst.LEVEL1.equals(level)) {
|
||||
result = Encryption.symEncrypt(security_key, source);
|
||||
} else if (SecretConst.LEVEL2.equals(level)) {
|
||||
result = CompressUtil.gzipCompress(source);
|
||||
} else if (SecretConst.LEVEL3.equals(level)) {
|
||||
result = Encryption.symEncrypt(security_key, CompressUtil.gzipCompress(source));
|
||||
} else if (SecretConst.LEVEL4.equals(level)) {
|
||||
result = CompressUtil.gzipCompress(Encryption.symEncrypt(security_key, source));
|
||||
} else {
|
||||
throw new Exception("无效的安全等级");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
class SecretConst {
|
||||
/**
|
||||
* LEVEL0 不压缩、不加密
|
||||
*/
|
||||
public static final String LEVEL0 = "L0";
|
||||
/**
|
||||
* LEVEL1 只加密、不压缩
|
||||
*/
|
||||
public static final String LEVEL1 = "L1";
|
||||
/**
|
||||
* LEVEL2 只压缩、不加密
|
||||
*/
|
||||
public static final String LEVEL2 = "L2";
|
||||
/**
|
||||
* LEVEL3 先压缩、后加密
|
||||
*/
|
||||
public static final String LEVEL3 = "L3";
|
||||
/**
|
||||
* LEVEL4 先加密、后压缩
|
||||
*/
|
||||
public static final String LEVEL4 = "L4";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.*;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207Service;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207TokenService;
|
||||
import com.hzya.frame.dateutil.DateUtil;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.util.PluginUtils;
|
||||
import com.hzya.frame.util.bipV3.Encryption;
|
||||
import com.hzya.frame.util.bipV3.SHA256Util;
|
||||
import com.hzya.frame.util.oldNcc.CompressUtil;
|
||||
import com.hzya.frame.util.oldNcc.Decryption;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@Service(value = "bipV32207TokenService")
|
||||
public class BipV32207TokenServiceImpl extends BaseService<BipTokenVo, String> implements IBipV32207TokenService {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取BIPtoken,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
|
||||
@Override
|
||||
public SysExtensionApiEntity getBipToken(SysExtensionApiEntity entity) {
|
||||
try {
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
String client_id = headers.get("client_id");
|
||||
Map<String, String> paramMap = new HashMap<String, String>();
|
||||
// 密码模式认证
|
||||
paramMap.put("grant_type", "client_credentials");
|
||||
// 第三方应用id
|
||||
paramMap.put("client_id", client_id);
|
||||
// 第三方应用secret]
|
||||
String client_secret = headers.get("client_secret");
|
||||
// 账套编码
|
||||
String busi_center = headers.get("busi_center");
|
||||
//用户编码
|
||||
String usercode = headers.get("usercode");
|
||||
//数据库编码
|
||||
String dsname = headers.get("dsname");
|
||||
String pubKey = headers.get("pubKey");
|
||||
// 第三方应用secret 公钥加密]
|
||||
paramMap.put("client_secret", URLEncoder.encode(Encryption.pubEncrypt(pubKey, client_secret), "utf-8"));
|
||||
// 账套编码
|
||||
paramMap.put("biz_center", busi_center);
|
||||
// // TODO 传递数据源和ncc登录用户
|
||||
paramMap.put("dsname", dsname);
|
||||
paramMap.put("usercode", usercode);
|
||||
// 签名
|
||||
String sign = SHA256Util.getSHA256(client_id + client_secret + pubKey,pubKey);
|
||||
paramMap.put("signature", sign);
|
||||
StringBuffer querys = new StringBuffer();
|
||||
querys.append("biz_center="+busi_center);
|
||||
querys.append("&grant_type="+"client_credentials");
|
||||
querys.append("&signature="+sign);
|
||||
querys.append("&dsname="+dsname);
|
||||
querys.append("&client_secret="+URLEncoder.encode(Encryption.pubEncrypt(pubKey, client_secret), "utf-8"));
|
||||
querys.append("&usercode="+usercode);
|
||||
querys.append("&client_id="+client_id);
|
||||
entity.setQuerys(querys.toString());
|
||||
headers.put("content-type","application/x-www-form-urlencoded");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
package com.hzya.frame.bip.v3.v2207.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* com.hzya.frame.bip.v3.v2207.util
|
||||
*
|
||||
* @author makejava
|
||||
* @date 2024-05 -30 14:20
|
||||
*/
|
||||
|
||||
public class BipUtil {
|
||||
/**
|
||||
*
|
||||
* @content 发送单据到BIP系统
|
||||
* @author laborer
|
||||
* @date 2024/6/21 0021 10:51
|
||||
*
|
||||
*/
|
||||
|
||||
public static String sendU9cTOBipEsb(String parm, String apiCode,String token){
|
||||
String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
System.out.println("推送参数"+parm);
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800023")//头信息,多个头信息多次调用此方法即可
|
||||
.header("access_token", token)//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body(parm)//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
System.out.println("返回参数"+result);
|
||||
if(StrUtil.isNotEmpty(result)){
|
||||
return analytic(result);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String getBipToken(String userCode, String apiCode){
|
||||
String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800023")//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("usercode", userCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body("")//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
System.out.println("返回参数"+result);
|
||||
if(StrUtil.isNotEmpty(result)){
|
||||
JSONObject obj = JSON.parseObject( analytic(result));
|
||||
JSONObject data = obj.getJSONObject("data");
|
||||
return data.getString("access_token");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String analytic(String parm){
|
||||
JSONObject main = JSON.parseObject(parm);
|
||||
return main.getString("attribute");
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
</web-app>
|
|
@ -3,10 +3,21 @@ package com.hzya.frame.seeyon.dao;
|
|||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description seeyon 附件对象
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/17 15:21
|
||||
**/
|
||||
public interface ICtpFileDao extends IBaseDao<CtpFileEntity,String> {
|
||||
/**
|
||||
*
|
||||
* @content 根据附件id查询附加信息
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2025-04-27 18:03
|
||||
* **/
|
||||
List<CtpFileEntity> queryCtpFileById(CtpFileEntity ctpFileEntity);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package com.hzya.frame.seeyon.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.seeyon.dao.ICtpAttachmentDao;
|
||||
import com.hzya.frame.seeyon.dao.ICtpFileDao;
|
||||
import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
|
||||
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
|
@ -14,4 +15,9 @@ import org.springframework.stereotype.Repository;
|
|||
**/
|
||||
@Repository()
|
||||
public class CtpFileDaoImpl extends MybatisGenericDao<CtpFileEntity,String> implements ICtpFileDao {
|
||||
@DS("#ctpFileEntity.dataSourceCode")
|
||||
@Override
|
||||
public List<CtpFileEntity> queryCtpFileById(CtpFileEntity ctpFileEntity) {
|
||||
return (List<CtpFileEntity>) super.selectList("queryCtpFileById",ctpFileEntity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.seeyon.entity.CtpFileEntity">
|
||||
<mapper namespace="com.hzya.frame.seeyon.dao.impl.CtpFileDaoImpl">
|
||||
<resultMap id="get-CtpFileEntity-result" type="com.hzya.frame.seeyon.entity.CtpFileEntity">
|
||||
<!--主键 -->
|
||||
<result property="id" column="id" />
|
||||
|
@ -45,5 +45,17 @@
|
|||
</trim>
|
||||
</select>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="queryCtpFileById" resultMap="get-CtpFileEntity-result" parameterType="com.hzya.frame.seeyon.entity.CtpFileEntity">
|
||||
select
|
||||
<include refid="CtpFileEntity_sql"/>
|
||||
from
|
||||
ctp_file
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">id = #{id}</if>
|
||||
<if test="filename != null and filename != ''">and filename = #{filename}</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
|
||||
<!--通过主键修改方法-->
|
||||
<update id="updateInvoiceUrl" parameterType = "com.hzya.frame.seeyon.invoice.entity.InvoiceEntity" >
|
||||
update ${tabName} set ${url_field} =#{url} where id=#{id}
|
||||
update formmain_0331 set ${url_field} =#{url} where id=#{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键修改方法-->
|
||||
|
@ -105,7 +105,7 @@
|
|||
|
||||
<!--通过主键修改方法-->
|
||||
<update id="updateInvoiceResult" parameterType = "com.hzya.frame.seeyon.invoice.entity.InvoiceEntity" >
|
||||
update ${tabName} set
|
||||
update formmain_0331 set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="input_result_status != null and input_result_status != ''"> ${input_result_status_filed} = #{input_result_status},</if>
|
||||
<if test="invoice_code != null and invoice_code != ''"> ${invoice_code_field} = #{invoice_code},</if>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.hzya.frame.seeyon.invoice.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
@ -8,7 +10,9 @@ import com.hzya.frame.basedao.service.impl.BaseService;
|
|||
import com.hzya.frame.mdm.mdmModuleSource.dao.impl.MdmModuleSourceDaoImpl;
|
||||
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||
import com.hzya.frame.seeyon.dao.ICtpAttachmentDao;
|
||||
import com.hzya.frame.seeyon.dao.ICtpFileDao;
|
||||
import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
|
||||
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
||||
import com.hzya.frame.seeyon.invoice.dao.IInvoiceDao;
|
||||
import com.hzya.frame.seeyon.invoice.dao.IInvoiceDetailsDao;
|
||||
import com.hzya.frame.seeyon.invoice.entity.InvoiceEntity;
|
||||
|
@ -31,11 +35,16 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.*;
|
||||
|
||||
@Service(value = "InvoiceServiceImpl")
|
||||
|
@ -54,6 +63,9 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
private ComparisonServiceImpl comparisonServiceimpl;
|
||||
@Autowired
|
||||
private ICtpAttachmentDao ctpAttachmentDao;
|
||||
@Autowired
|
||||
private ICtpFileDao ctpFileDao;
|
||||
|
||||
|
||||
@Value("${zt.url}")
|
||||
private String url;
|
||||
|
@ -152,17 +164,9 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
return BaseResult.getSuccessMessageEntity("查询成功");
|
||||
}
|
||||
for (InvoiceEntity entity : invoiceEntities) {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
Map<String, Object> parametersMap = new HashMap<>();
|
||||
parametersMap.put("accessKey","6X3B526P5HqE6ums");
|
||||
parametersMap.put("timestamp",timestamp);
|
||||
String sign = YzfSignUtil.signRequest(parametersMap,"34e5fc32ac894a2ba2ade8c3852c7a0a");
|
||||
entity.setDataSourceCode("HT-OA");
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("serialNumber",entity.getId());
|
||||
jsonObject.put("accessKey","6X3B526P5HqE6ums");
|
||||
jsonObject.put("sign",sign);
|
||||
jsonObject.put("timestamp",timestamp);
|
||||
logger.info("=======调用杭泰税务查询申请单详情的请求参数为:{}=======",jsonObject.toJSONString());
|
||||
jsonObject.put("serialNumber", entity.getSerial_number());
|
||||
//发送数据
|
||||
String result = HttpRequest.post(url).
|
||||
header("appId", "800060").
|
||||
|
@ -180,7 +184,7 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
JSONObject attribute = resultJson.getJSONObject("attribute");
|
||||
if ("0".equals(attribute.getString("code"))) {
|
||||
JSONObject jsonResult = JSONObject.parseObject(attribute.getString("result"));
|
||||
if(null !=jsonResult){
|
||||
if (null != jsonResult && jsonResult.getString("serialNumber").equals(entity.getSerial_number())) {
|
||||
JSONArray jsonArray = jsonResult.getJSONArray("invoiceInfoVOList");
|
||||
if (CollectionUtils.isNotEmpty(jsonArray)) {
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
|
@ -194,29 +198,35 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
entity.setInvoice_code(invoiceCode);
|
||||
entity.setInvoice_number(invoiceNumber);
|
||||
entity.setResult_status(resultStatus);
|
||||
entity.setId(entity.getSerial_number());
|
||||
//将开票结果,发票号码,发票代码,回写OA
|
||||
logger.info("=======开始将开票结果,发票号码,发票代码,回写OA======");
|
||||
invoiceDao.updateInvoiceResult(entity);
|
||||
logger.info("=======将开票结果,发票号码,发票代码,回写OA完毕======");
|
||||
if (null != invoiceInfo.getString("url") || null != invoiceInfo.getString("ofdUrl")) {
|
||||
String pdfUrl = invoiceInfo.getString("url");//pdf文件
|
||||
String ofdUrl = invoiceInfo.getString("ofdUrl");//ofd文件
|
||||
String xmlUrl = invoiceInfo.getString("xmlUrl");//xml文件
|
||||
//获取pdf文件到本地 并为pdf取名,否则会报无法访问错误
|
||||
logger.info("========开始将pdf文件保存到本地========");
|
||||
String pdfFileName = generateFileName(pdfUrl, "pdf");
|
||||
String pdfFileName = generateFileName(pdfUrl, "PDF");
|
||||
String pdfSavePath = invoicePdfUrl + pdfFileName;
|
||||
downloadPdf(pdfUrl, pdfSavePath);
|
||||
logger.info("========pdf文件保存到本地完成========");
|
||||
File filePdf = new File(pdfSavePath);
|
||||
if(null !=filePdf){
|
||||
logger.info("========开始将pdf文件上传OA========");
|
||||
ManyfileUpload(filePdf, entity, sub_reference, att_reference, jsonObject);
|
||||
logger.info("========pdf文件上传OA完成========");
|
||||
}
|
||||
//获取ofd文件到本地
|
||||
logger.info("========开始将ofd文件保存到本地========");
|
||||
String ofdFileName = generateFileName(ofdUrl, "ofd");
|
||||
String ofdSavePath = ofdUrl + ofdFileName;
|
||||
String ofdFileName = generateFileName(ofdUrl, "OFD");
|
||||
String ofdSavePath = invoiceOfdUrl + ofdFileName;
|
||||
downloadPdf(ofdUrl, ofdSavePath);
|
||||
logger.info("========ofd文件保存到本地完成========");
|
||||
File fileOfd = new File(ofdSavePath);
|
||||
if(null !=fileOfd){
|
||||
logger.info("========开始将ofd文件上传OA========");
|
||||
ManyfileUpload(fileOfd, entity, sub_reference, att_reference, jsonObject);
|
||||
logger.info("========ofd文件上传OA完成========");
|
||||
|
@ -226,10 +236,10 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.info("======查询杭泰税务申请单详情失败====",e.getMessage());
|
||||
logger.info("======查询杭泰税务申请单详情失败:{}====",e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
|
@ -248,17 +258,9 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
return BaseResult.getSuccessMessageEntity("查询成功");
|
||||
}
|
||||
for (InvoiceEntity entity : invoiceEntities) {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
Map<String, Object> parametersMap = new HashMap<>();
|
||||
parametersMap.put("accessKey","6X3B526P5HqE6ums");
|
||||
parametersMap.put("timestamp",timestamp);
|
||||
String sign = YzfSignUtil.signRequest(parametersMap,"34e5fc32ac894a2ba2ade8c3852c7a0a");
|
||||
entity.setDataSourceCode("HT-OA");
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
jsonObject.put("serialNumber",entity.getId());
|
||||
jsonObject.put("accessKey","6X3B526P5HqE6ums");
|
||||
jsonObject.put("sign",sign);
|
||||
jsonObject.put("timestamp",timestamp);
|
||||
logger.info("=======调用杭泰税务查询发票批量录入结果的请求参数为:{}=======",jsonObject.toJSONString());
|
||||
//发送数据
|
||||
String result = HttpRequest.post(url).
|
||||
header("appId", "800060").
|
||||
|
@ -293,18 +295,29 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.info("======查询杭泰税务发票批量录入结果失败====",e.getMessage());
|
||||
logger.info("======查询杭泰税务发票批量录入结果失败:{}====",e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void ManyfileUpload(File file,InvoiceEntity entity,String sub_reference,String att_reference,JSONObject jsonObject){
|
||||
JSONObject jsonObjectOfd = OARestUtil.fileUpload(file,"8000590003","8000590001");
|
||||
logger.info("=======文件名称为:{}=====",file.getName());
|
||||
if(null !=file) {
|
||||
JSONObject jsonObjectOfd = fileUploadPdfAndOfd(file);
|
||||
if (jsonObjectOfd.getString("fileUrl") != null) {
|
||||
entity.setUrl(sub_reference);
|
||||
entity.setDataSourceCode("HT-OA");
|
||||
logger.info("===========查询开票详情开始将附件id更新OA==========");
|
||||
invoiceDao.updateInvoiceUrl(entity);
|
||||
logger.info("===========查询开票详情将附件id更新OA完毕==========");
|
||||
//根据附件id查询附件信息
|
||||
CtpFileEntity ctpFileEntity=new CtpFileEntity();
|
||||
ctpFileEntity.setId(jsonObjectOfd.getString("fileUrl"));
|
||||
ctpFileEntity.setDataSourceCode("HT-OA");
|
||||
List<CtpFileEntity> query = ctpFileDao.queryCtpFileById(ctpFileEntity);
|
||||
if(CollectionUtils.isNotEmpty(query)) {
|
||||
CtpFileEntity ctpFile = query.get(0);
|
||||
//根据附件id查询附件业务数据
|
||||
String file_url = jsonObjectOfd.getString("fileUrl");
|
||||
CtpAttachmentEntity ctpAttachmentEntity = new CtpAttachmentEntity();
|
||||
|
@ -315,11 +328,11 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
List<CtpAttachmentEntity> ctpAttachmentEntities = ctpAttachmentDao.queryCtpAttachment(ctpAttachmentEntity);
|
||||
//如果没有查询到数据,就新增附件业务,否则更新
|
||||
if (ctpAttachmentEntities.size() == 0) {
|
||||
String category = jsonObject.getString("category");
|
||||
String type = jsonObject.getString("type");
|
||||
String filename = jsonObject.getString("filename");
|
||||
String mime_type = jsonObject.getString("mimeType");
|
||||
String attachment_size = jsonObject.getString("size");
|
||||
String category =ctpFile.getCategory();
|
||||
String type =ctpFile.getType();
|
||||
String filename =ctpFile.getFilename();
|
||||
String mime_type =ctpFile.getMime_type();
|
||||
String attachment_size =ctpFile.getFile_size();
|
||||
String id = String.valueOf(UUIDLong.longUUID());
|
||||
ctpAttachmentEntity.setCategory(category);
|
||||
ctpAttachmentEntity.setFilename(filename);
|
||||
|
@ -339,15 +352,68 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
ctpAttachmentDao.updateCtpAttachment(ctpAttachmentEntity);
|
||||
}
|
||||
logger.info("=====电子回单执行完毕=======");
|
||||
}else{
|
||||
logger.info("========根据附件id:{}没有查询到附件信息======",jsonObjectOfd.getString("fileUrl"));
|
||||
}
|
||||
}
|
||||
file.delete();
|
||||
}else{
|
||||
logger.info("==========本地没有文件==============");
|
||||
}
|
||||
}
|
||||
|
||||
public JSONObject fileUploadPdfAndOfd(File file) {
|
||||
if (null != file) {
|
||||
try {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("file", file);
|
||||
String url = "/seeyon/rest/attachment?token=@token@";//如果后面加上applicationCategory=1&extensions=&firstSave=true,附件业务自动生成一条记录
|
||||
url = url.replaceAll("@token@", getToken());
|
||||
String result = HttpUtil.post("http://60.204.152.210" + url, paramMap);
|
||||
if (StrUtil.isNotBlank(result)) {
|
||||
logger.info("附件上传结果"+result);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String atts = jsonObject.get("atts").toString();
|
||||
if (StrUtil.isNotEmpty(atts)) {
|
||||
JSONArray jsonArray = JSONArray.parseArray(atts);
|
||||
JSONObject res = (JSONObject) jsonArray.get(0);
|
||||
String fileUrl = res.getString("fileUrl");
|
||||
logger.info("附件id:" + fileUrl);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.error("附件上传失败"+e.getMessage());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String getToken() {
|
||||
//获取oatoken
|
||||
HashMap<String, String> hashMap = new HashMap<>();
|
||||
hashMap.put("userName", "hzyaRest");
|
||||
hashMap.put("password", "a5ce21b8-91db-4cec-b3e3-3e44719655fd");
|
||||
hashMap.put("loginName","bdmanager");
|
||||
String result = HttpUtil.post("http://60.204.152.210" + "/seeyon/rest/token", JSON.toJSONString(hashMap));
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if (null != jsonObject) {
|
||||
logger.info(result);
|
||||
logger.info("======token:{}======" + jsonObject.getString("id"));
|
||||
return jsonObject.getString("id");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void downloadPdf(String pdfUrl, String savePath) {
|
||||
try {
|
||||
URL url = new URL(pdfUrl);
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setRequestMethod("Post");
|
||||
// 处理 HTTPS 证书(测试环境忽略验证,生产环境需移除)
|
||||
if (pdfUrl.startsWith("https")) {
|
||||
trustAllCertificates((HttpsURLConnection) connection);
|
||||
}
|
||||
connection.setRequestMethod("GET");
|
||||
int responseCode = connection.getResponseCode();
|
||||
if (responseCode == HttpURLConnection.HTTP_OK) {
|
||||
InputStream inputStream = connection.getInputStream();
|
||||
|
@ -371,6 +437,20 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
}
|
||||
}
|
||||
|
||||
private static void trustAllCertificates(HttpsURLConnection conn) throws Exception {
|
||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||
new X509TrustManager() {
|
||||
@Override public void checkClientTrusted(X509Certificate[] chain, String authType) {}
|
||||
@Override public void checkServerTrusted(X509Certificate[] chain, String authType) {}
|
||||
@Override public X509Certificate[] getAcceptedIssuers() { return new X509Certificate[0]; }
|
||||
}
|
||||
};
|
||||
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
|
||||
conn.setSSLSocketFactory(sslContext.getSocketFactory());
|
||||
conn.setHostnameVerifier((hostname, session) -> true); // 忽略主机名验证
|
||||
}
|
||||
|
||||
private String generateFileName(String url, String extension) {
|
||||
// 这里简单根据 URL 的参数生成文件名,你可以根据实际需求调整
|
||||
String[] parts = url.split("&");
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
package com.hzya.frame.seeyon.makeinvoice.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IMakeInvoiceDao extends IBaseDao<MakeInvoiceEntity, String> {
|
||||
/**
|
||||
*
|
||||
* @content 获取未推送税务的蓝字发票集合
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2025-03-20 15:32
|
||||
*
|
||||
*/
|
||||
|
||||
List<MakeInvoiceEntity> getMakeInvoiceByState(MakeInvoiceEntity entity);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.hzya.frame.seeyon.makeinvoice.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.seeyon.makeinvoice.dao.IMakeInvoiceDao;
|
||||
import com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Repository(value = "MakeInvoiceDaoImpl")
|
||||
public class MakeInvoiceDaoImpl extends MybatisGenericDao<MakeInvoiceEntity,String> implements IMakeInvoiceDao {
|
||||
|
||||
@Override
|
||||
@DS("#entity.dataSourceCode")
|
||||
public List<MakeInvoiceEntity> getMakeInvoiceByState(MakeInvoiceEntity entity) {
|
||||
return (List<MakeInvoiceEntity>) super.selectList("com.hzya.frame.seeyon.makeinvoice.dao.impl.MakeInvoiceDaoImpl.getMakeInvoiceByState",entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,531 @@
|
|||
package com.hzya.frame.seeyon.makeinvoice.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
public class MakeInvoiceEntity extends BaseEntity {
|
||||
|
||||
private String sellerTaxNo;//企业纳税人识别号,建议传
|
||||
private String templateId;//模版ID,固定值: 测试环境: 生产环境:"
|
||||
private String businessNo;//业务单号 (40长度)
|
||||
private String superiorBusinessNo;//上级业务单号,后续接口创建红字发票申请时,可根据此字段查找该单号下的已开发票。可传:销售单号等,或可与业务单号保持一致
|
||||
private String buyerName;//购买方名称,收购发票会以在开票企业在云帐房内维护的信息覆盖该属性
|
||||
private String buyerTaxNo;//购买方纳税人识别号,收购发票时与企业编码二选一必传
|
||||
private String buyerAddrPhone;//购买方地址、电话,收购发票会以在开票企业在云帐房内维护的信息覆盖该属性
|
||||
private String buyerBankAccount;//购买方开户行及账号,收购发票会以在开票企业在云帐房内维护的信息覆盖该属性
|
||||
private String applyPerson;//申请人,为空时,平台将记录申请人为“系统自动”
|
||||
private String applyEmailNotice;//是否邮件通知申请人,按平台内申请人邮箱发送示例值:0可选值:1 是0 否
|
||||
private String buyerEmailNotice;//是否邮件通知购买方,按平台内购买方邮箱发送示例值:0可选值:1 是0 否
|
||||
private String workcode;// 申请人工号
|
||||
private String otherEmail;//其他发票接收邮箱,可支持最多10个邮箱,邮箱间以英文字符;分隔
|
||||
private String buyerContact;//购买方发票邮寄接收联系人名称
|
||||
private String buyerMobile;//购买方发票邮寄接收手机号
|
||||
private String buyerRecvAddress;//购买方发票邮寄接收地址
|
||||
private String applicationRemark;//申请单其他说明
|
||||
private String attachments;//附件,文件Url地址列表
|
||||
private String notifyUrl;//回调通知地址【必须为外网可以调通的地址】
|
||||
private String specialInvoiceMark;//特殊票种标识 00非特殊票种 01农产品销售 02农产品收购 03 建筑服务 04 货物运输服务 05 不动产销售服务 06不动产经营租赁服务 14机动车"
|
||||
private String sellerName;//销售方名称,收购类发票必填 ,非收购发票会以在开票企业在云帐房内维护的信息覆盖该属性
|
||||
private String sellerAddrPhone;//销售方地址、电话,非收购发票会以在开票企业在云帐房内维护的信息覆盖该属性
|
||||
private String sellerBankAccount;//销售方银行账号,非收购发票会以在开票企业在云帐房内维护的信息覆盖该属性
|
||||
private String extFieldJSONObject;//自定义字段,具体传参见示例
|
||||
private String extendFields;//自定义扩展字段.最多支持6个文本类型和4个日期类型,日期格式为yyyy-MM-dd.其中的key为用户自行配置(集团视角-应用设置-扩展字段配置)
|
||||
private String applicationForm;//申请单信息
|
||||
private String invoiceType;//发票种类示例值:0可选值:0 增值税普通发票10 增值税专用发票2 增值税电子普通发票13增值税电子专用发票 21电子发票(增值税专用发票) 22电子发票(普通发票)
|
||||
private String isPerson;//是否自然人 1是 默认为否
|
||||
private String levyTaxType;//征税方式,差额征税时,一个开票申请中只可有一张发票示例值:0 可选值:0 普通征税2 差额征税(差额开具)3 差额征税(全额开具)
|
||||
private String deduction;//扣除额,差额征税时必填
|
||||
private String remark;//发票备注,换行使用\n隔开230字节(115个纯汉字)
|
||||
private String detailList;//开票明细
|
||||
private String itemNo;//明细行编号,为空时,平台将自动生成一个唯一编号
|
||||
private String itemName;//商品名称
|
||||
private String taxCateCode;//税收分类编码,19位
|
||||
private String spec;//规格型号/(车辆识别代号/车架号码)
|
||||
private String unit;//单位
|
||||
private String quantity;//数量示例值:200 (特殊票种为机动车时必填,且车架识别代号/车架号码不为空时,数值必须为正整数)
|
||||
private String unitPrice;//单价示例值:100.23(特殊票种为机动车时必填)
|
||||
private String price;//金额示例值:100.23
|
||||
private String taxRate;//税率示例值:0.03
|
||||
private String zeroFlag;//零税率标识,如果税率为0,必填示例值:1 可选值: 1:免税2:不征收3:普通零税率
|
||||
private String tax;//税额示例值:100.23
|
||||
private String includeTaxTag;//含税标识,为1时,则单价和金额为不含税单价及不含税金额示例值:0 可选值:0 含税1 不含税
|
||||
private String detailType;//明细行性质示例值:0 可选值: 0 正常行1 折扣行2 被折扣行 如果是折扣行,只开票明细只接受金额,并且金额不能超过被折扣行
|
||||
private String enjoyPreferentialFlag;//是否享受优惠 示例值:0 可选值: 0 否 1是
|
||||
private String preferentialPolicyType;//优惠政策类型(是否享受优惠为是时必传)传递 code 示例:100 100-简易征收 107-按3%简易征收, 108-按5%简易征收, 109-按5%简易征收减按1.5%计征"
|
||||
private String specialIndustryDTO;//特殊票种信息-建筑服务
|
||||
private String place;//地址:建筑服务发生地,不动产地址。“-”分割 示例:江苏省-南京市-雨花台区 北京市-海淀区"
|
||||
private String placeOfDetail;//详细地址:建筑服务发生地详细地址,不动产详细地址
|
||||
private String constructionProjectName;//建筑项目名称
|
||||
private String kqysssxbgglbm;//跨区域涉税事项报验管理編号
|
||||
private String productNo;//土地增值税项目编号
|
||||
private String crossDistinctCityFlag;//跨地(市)标志:是,否
|
||||
|
||||
|
||||
private String certificateOfTitle;//产权证书/不动产权证号
|
||||
private String areaUnit;//面积单位: 平方千米 平方米 孔公里 公顷 亩 h㎡ k㎡ ㎡"
|
||||
private String startDate;//租赁开始,格式yyyy-MM-dd
|
||||
private String endDate;//租赁结束,格式yyyy-MM-dd
|
||||
|
||||
public String getSellerTaxNo() {
|
||||
return sellerTaxNo;
|
||||
}
|
||||
|
||||
public void setSellerTaxNo(String sellerTaxNo) {
|
||||
this.sellerTaxNo = sellerTaxNo;
|
||||
}
|
||||
|
||||
public String getTemplateId() {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
public void setTemplateId(String templateId) {
|
||||
this.templateId = templateId;
|
||||
}
|
||||
|
||||
public String getBusinessNo() {
|
||||
return businessNo;
|
||||
}
|
||||
|
||||
public void setBusinessNo(String businessNo) {
|
||||
this.businessNo = businessNo;
|
||||
}
|
||||
|
||||
public String getSuperiorBusinessNo() {
|
||||
return superiorBusinessNo;
|
||||
}
|
||||
|
||||
public void setSuperiorBusinessNo(String superiorBusinessNo) {
|
||||
this.superiorBusinessNo = superiorBusinessNo;
|
||||
}
|
||||
|
||||
public String getBuyerName() {
|
||||
return buyerName;
|
||||
}
|
||||
|
||||
public void setBuyerName(String buyerName) {
|
||||
this.buyerName = buyerName;
|
||||
}
|
||||
|
||||
public String getBuyerTaxNo() {
|
||||
return buyerTaxNo;
|
||||
}
|
||||
|
||||
public void setBuyerTaxNo(String buyerTaxNo) {
|
||||
this.buyerTaxNo = buyerTaxNo;
|
||||
}
|
||||
|
||||
public String getBuyerAddrPhone() {
|
||||
return buyerAddrPhone;
|
||||
}
|
||||
|
||||
public void setBuyerAddrPhone(String buyerAddrPhone) {
|
||||
this.buyerAddrPhone = buyerAddrPhone;
|
||||
}
|
||||
|
||||
public String getBuyerBankAccount() {
|
||||
return buyerBankAccount;
|
||||
}
|
||||
|
||||
public void setBuyerBankAccount(String buyerBankAccount) {
|
||||
this.buyerBankAccount = buyerBankAccount;
|
||||
}
|
||||
|
||||
public String getApplyPerson() {
|
||||
return applyPerson;
|
||||
}
|
||||
|
||||
public void setApplyPerson(String applyPerson) {
|
||||
this.applyPerson = applyPerson;
|
||||
}
|
||||
|
||||
public String getApplyEmailNotice() {
|
||||
return applyEmailNotice;
|
||||
}
|
||||
|
||||
public void setApplyEmailNotice(String applyEmailNotice) {
|
||||
this.applyEmailNotice = applyEmailNotice;
|
||||
}
|
||||
|
||||
public String getBuyerEmailNotice() {
|
||||
return buyerEmailNotice;
|
||||
}
|
||||
|
||||
public void setBuyerEmailNotice(String buyerEmailNotice) {
|
||||
this.buyerEmailNotice = buyerEmailNotice;
|
||||
}
|
||||
|
||||
public String getWorkcode() {
|
||||
return workcode;
|
||||
}
|
||||
|
||||
public void setWorkcode(String workcode) {
|
||||
this.workcode = workcode;
|
||||
}
|
||||
|
||||
public String getOtherEmail() {
|
||||
return otherEmail;
|
||||
}
|
||||
|
||||
public void setOtherEmail(String otherEmail) {
|
||||
this.otherEmail = otherEmail;
|
||||
}
|
||||
|
||||
public String getBuyerContact() {
|
||||
return buyerContact;
|
||||
}
|
||||
|
||||
public void setBuyerContact(String buyerContact) {
|
||||
this.buyerContact = buyerContact;
|
||||
}
|
||||
|
||||
public String getBuyerMobile() {
|
||||
return buyerMobile;
|
||||
}
|
||||
|
||||
public void setBuyerMobile(String buyerMobile) {
|
||||
this.buyerMobile = buyerMobile;
|
||||
}
|
||||
|
||||
public String getBuyerRecvAddress() {
|
||||
return buyerRecvAddress;
|
||||
}
|
||||
|
||||
public void setBuyerRecvAddress(String buyerRecvAddress) {
|
||||
this.buyerRecvAddress = buyerRecvAddress;
|
||||
}
|
||||
|
||||
public String getApplicationRemark() {
|
||||
return applicationRemark;
|
||||
}
|
||||
|
||||
public void setApplicationRemark(String applicationRemark) {
|
||||
this.applicationRemark = applicationRemark;
|
||||
}
|
||||
|
||||
public String getAttachments() {
|
||||
return attachments;
|
||||
}
|
||||
|
||||
public void setAttachments(String attachments) {
|
||||
this.attachments = attachments;
|
||||
}
|
||||
|
||||
public String getNotifyUrl() {
|
||||
return notifyUrl;
|
||||
}
|
||||
|
||||
public void setNotifyUrl(String notifyUrl) {
|
||||
this.notifyUrl = notifyUrl;
|
||||
}
|
||||
|
||||
public String getSpecialInvoiceMark() {
|
||||
return specialInvoiceMark;
|
||||
}
|
||||
|
||||
public void setSpecialInvoiceMark(String specialInvoiceMark) {
|
||||
this.specialInvoiceMark = specialInvoiceMark;
|
||||
}
|
||||
|
||||
public String getSellerName() {
|
||||
return sellerName;
|
||||
}
|
||||
|
||||
public void setSellerName(String sellerName) {
|
||||
this.sellerName = sellerName;
|
||||
}
|
||||
|
||||
public String getSellerAddrPhone() {
|
||||
return sellerAddrPhone;
|
||||
}
|
||||
|
||||
public void setSellerAddrPhone(String sellerAddrPhone) {
|
||||
this.sellerAddrPhone = sellerAddrPhone;
|
||||
}
|
||||
|
||||
public String getSellerBankAccount() {
|
||||
return sellerBankAccount;
|
||||
}
|
||||
|
||||
public void setSellerBankAccount(String sellerBankAccount) {
|
||||
this.sellerBankAccount = sellerBankAccount;
|
||||
}
|
||||
|
||||
public String getExtFieldJSONObject() {
|
||||
return extFieldJSONObject;
|
||||
}
|
||||
|
||||
public void setExtFieldJSONObject(String extFieldJSONObject) {
|
||||
this.extFieldJSONObject = extFieldJSONObject;
|
||||
}
|
||||
|
||||
public String getExtendFields() {
|
||||
return extendFields;
|
||||
}
|
||||
|
||||
public void setExtendFields(String extendFields) {
|
||||
this.extendFields = extendFields;
|
||||
}
|
||||
|
||||
public String getApplicationForm() {
|
||||
return applicationForm;
|
||||
}
|
||||
|
||||
public void setApplicationForm(String applicationForm) {
|
||||
this.applicationForm = applicationForm;
|
||||
}
|
||||
|
||||
public String getInvoiceType() {
|
||||
return invoiceType;
|
||||
}
|
||||
|
||||
public void setInvoiceType(String invoiceType) {
|
||||
this.invoiceType = invoiceType;
|
||||
}
|
||||
|
||||
public String getIsPerson() {
|
||||
return isPerson;
|
||||
}
|
||||
|
||||
public void setIsPerson(String isPerson) {
|
||||
this.isPerson = isPerson;
|
||||
}
|
||||
|
||||
public String getLevyTaxType() {
|
||||
return levyTaxType;
|
||||
}
|
||||
|
||||
public void setLevyTaxType(String levyTaxType) {
|
||||
this.levyTaxType = levyTaxType;
|
||||
}
|
||||
|
||||
public String getDeduction() {
|
||||
return deduction;
|
||||
}
|
||||
|
||||
public void setDeduction(String deduction) {
|
||||
this.deduction = deduction;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getDetailList() {
|
||||
return detailList;
|
||||
}
|
||||
|
||||
public void setDetailList(String detailList) {
|
||||
this.detailList = detailList;
|
||||
}
|
||||
|
||||
public String getItemNo() {
|
||||
return itemNo;
|
||||
}
|
||||
|
||||
public void setItemNo(String itemNo) {
|
||||
this.itemNo = itemNo;
|
||||
}
|
||||
|
||||
public String getItemName() {
|
||||
return itemName;
|
||||
}
|
||||
|
||||
public void setItemName(String itemName) {
|
||||
this.itemName = itemName;
|
||||
}
|
||||
|
||||
public String getTaxCateCode() {
|
||||
return taxCateCode;
|
||||
}
|
||||
|
||||
public void setTaxCateCode(String taxCateCode) {
|
||||
this.taxCateCode = taxCateCode;
|
||||
}
|
||||
|
||||
public String getSpec() {
|
||||
return spec;
|
||||
}
|
||||
|
||||
public void setSpec(String spec) {
|
||||
this.spec = spec;
|
||||
}
|
||||
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getUnitPrice() {
|
||||
return unitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(String unitPrice) {
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public String getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(String price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getTaxRate() {
|
||||
return taxRate;
|
||||
}
|
||||
|
||||
public void setTaxRate(String taxRate) {
|
||||
this.taxRate = taxRate;
|
||||
}
|
||||
|
||||
public String getZeroFlag() {
|
||||
return zeroFlag;
|
||||
}
|
||||
|
||||
public void setZeroFlag(String zeroFlag) {
|
||||
this.zeroFlag = zeroFlag;
|
||||
}
|
||||
|
||||
public String getTax() {
|
||||
return tax;
|
||||
}
|
||||
|
||||
public void setTax(String tax) {
|
||||
this.tax = tax;
|
||||
}
|
||||
|
||||
public String getIncludeTaxTag() {
|
||||
return includeTaxTag;
|
||||
}
|
||||
|
||||
public void setIncludeTaxTag(String includeTaxTag) {
|
||||
this.includeTaxTag = includeTaxTag;
|
||||
}
|
||||
|
||||
public String getDetailType() {
|
||||
return detailType;
|
||||
}
|
||||
|
||||
public void setDetailType(String detailType) {
|
||||
this.detailType = detailType;
|
||||
}
|
||||
|
||||
public String getEnjoyPreferentialFlag() {
|
||||
return enjoyPreferentialFlag;
|
||||
}
|
||||
|
||||
public void setEnjoyPreferentialFlag(String enjoyPreferentialFlag) {
|
||||
this.enjoyPreferentialFlag = enjoyPreferentialFlag;
|
||||
}
|
||||
|
||||
public String getPreferentialPolicyType() {
|
||||
return preferentialPolicyType;
|
||||
}
|
||||
|
||||
public void setPreferentialPolicyType(String preferentialPolicyType) {
|
||||
this.preferentialPolicyType = preferentialPolicyType;
|
||||
}
|
||||
|
||||
public String getSpecialIndustryDTO() {
|
||||
return specialIndustryDTO;
|
||||
}
|
||||
|
||||
public void setSpecialIndustryDTO(String specialIndustryDTO) {
|
||||
this.specialIndustryDTO = specialIndustryDTO;
|
||||
}
|
||||
|
||||
public String getPlace() {
|
||||
return place;
|
||||
}
|
||||
|
||||
public void setPlace(String place) {
|
||||
this.place = place;
|
||||
}
|
||||
|
||||
public String getPlaceOfDetail() {
|
||||
return placeOfDetail;
|
||||
}
|
||||
|
||||
public void setPlaceOfDetail(String placeOfDetail) {
|
||||
this.placeOfDetail = placeOfDetail;
|
||||
}
|
||||
|
||||
public String getConstructionProjectName() {
|
||||
return constructionProjectName;
|
||||
}
|
||||
|
||||
public void setConstructionProjectName(String constructionProjectName) {
|
||||
this.constructionProjectName = constructionProjectName;
|
||||
}
|
||||
|
||||
public String getKqysssxbgglbm() {
|
||||
return kqysssxbgglbm;
|
||||
}
|
||||
|
||||
public void setKqysssxbgglbm(String kqysssxbgglbm) {
|
||||
this.kqysssxbgglbm = kqysssxbgglbm;
|
||||
}
|
||||
|
||||
public String getProductNo() {
|
||||
return productNo;
|
||||
}
|
||||
|
||||
public void setProductNo(String productNo) {
|
||||
this.productNo = productNo;
|
||||
}
|
||||
|
||||
public String getCrossDistinctCityFlag() {
|
||||
return crossDistinctCityFlag;
|
||||
}
|
||||
|
||||
public void setCrossDistinctCityFlag(String crossDistinctCityFlag) {
|
||||
this.crossDistinctCityFlag = crossDistinctCityFlag;
|
||||
}
|
||||
|
||||
public String getCertificateOfTitle() {
|
||||
return certificateOfTitle;
|
||||
}
|
||||
|
||||
public void setCertificateOfTitle(String certificateOfTitle) {
|
||||
this.certificateOfTitle = certificateOfTitle;
|
||||
}
|
||||
|
||||
public String getAreaUnit() {
|
||||
return areaUnit;
|
||||
}
|
||||
|
||||
public void setAreaUnit(String areaUnit) {
|
||||
this.areaUnit = areaUnit;
|
||||
}
|
||||
|
||||
public String getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(String startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.seeyon.makeinvoice.dao.impl.MakeInvoiceDaoImpl">
|
||||
<resultMap id="get-MakeInvoiceEntity-result" type="com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity">
|
||||
<result property="sourceFlowNumber" column="sourceFlowNumber" />
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="MakeInvoiceEntity_Base_Column_List">
|
||||
id
|
||||
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<select id="getMakeInvoiceByState" resultMap="get-MakeInvoiceEntity-result" parameterType="com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity">
|
||||
select
|
||||
main.id as id,
|
||||
field0163 as sellerTaxNo,-- 销方税号
|
||||
'等待客户提供' as templateId, -- 模版ID
|
||||
field0117 as businessNo,-- 申请单单号
|
||||
field0106 as buyerName,-- 客户名称
|
||||
field0105 as buyerTaxNo,-- 客户税号
|
||||
field0100 + ' ' + field0101 as buyerAddrPhone,-- 地址和电话中间用空格隔开
|
||||
field0103 + ' ' + field0102 as buyerBankAccount,-- 开户行名称和开户行银行账户中间用空格隔开
|
||||
field0115 as applyPerson,-- 制单人
|
||||
0 as applyEmailNotice,-- 是否邮件通知申请人
|
||||
0 as buyerEmailNotice,-- 是否邮件通知购买方
|
||||
field0111 as otherEmail,-- 收件人邮箱
|
||||
field0126 as buyerRecvAddress,-- 邮寄地址
|
||||
'00' as specialInvoiceMark ,-- 临时默认00 后续确认 field0167建筑服务传03, 不动产租赁传06, 其他传00
|
||||
field0108 as sellerName, -- 销售方名称
|
||||
field0109 as invoiceType,-- 专票:21 普票:22
|
||||
'否' as isPerson, -- 是否自然人
|
||||
0 as levyTaxType,-- 征税方式
|
||||
field0090 as remark,-- 备注
|
||||
field0080 as itemName,-- 上网电费
|
||||
'1100101010600000000' as taxCateCode,-- 税收分类编码
|
||||
field0083 as spec,-- 规格型号
|
||||
field0084 as quantity,-- 电量
|
||||
field0168 as unitPrice,-- 单价(不含税)
|
||||
field0086 as price,-- 金额(不含税)
|
||||
field0118 as taxRate,-- 默认0.13
|
||||
field0169 as tax,-- 税额
|
||||
field0169 as includeTaxTag,-- 税额
|
||||
1 as detailType,-- 含税标识
|
||||
0 as detailType,-- 明细行性质
|
||||
0 as enjoyPreferentialFlag,-- 是否享受优惠
|
||||
field0167
|
||||
from formmain_0331 main
|
||||
left join formson_0332 body on main.id = body.formmain_id
|
||||
left join COL_SUMMARY summary on main.id = summary.form_recordid
|
||||
where summary.state = '3'
|
||||
and field0154 ='-8073674727882144390' -- 蓝字发票条件 是否红冲为是
|
||||
and field0206 is null
|
||||
</select>
|
||||
<select id="getMakeInvoiceByFormson_0700" resultMap="get-MakeInvoiceEntity-result" parameterType="com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity">
|
||||
|
||||
</select>
|
||||
<select id="getMakeInvoiceByFormson_0701" resultMap="get-MakeInvoiceEntity-result" parameterType="com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity">
|
||||
|
||||
</select>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="updatePushStatus" parameterType = "com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity" >
|
||||
update ${tabName} set ${pushStatusField} =#{pushStatus} where id=#{dataId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.hzya.frame.seeyon.makeinvoice.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface IMakeInvoiceService extends IBaseService<MakeInvoiceEntity,String> {
|
||||
/**
|
||||
*
|
||||
* @content 推送蓝字发票申请单申请到税务平台
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2025-03-20 15:26
|
||||
*
|
||||
*/
|
||||
|
||||
JsonResultEntity sendMakeInvoiceSw(JSONObject requestJson);
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.hzya.frame.seeyon.makeinvoice.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.seeyon.makeinvoice.dao.IMakeInvoiceDao;
|
||||
import com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity;
|
||||
import com.hzya.frame.seeyon.makeinvoice.service.IMakeInvoiceService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service("MakeInvoiceServiceImpl")
|
||||
public class MakeInvoiceServiceImpl extends BaseService<MakeInvoiceEntity, String> implements IMakeInvoiceService {
|
||||
|
||||
@Autowired
|
||||
private IMakeInvoiceDao makeInvoiceDao;
|
||||
@Override
|
||||
public JsonResultEntity sendMakeInvoiceSw(JSONObject requestJson) {
|
||||
MakeInvoiceEntity makeInvoice = new MakeInvoiceEntity();
|
||||
makeInvoice.setDataSourceCode("HT_OA");
|
||||
List<MakeInvoiceEntity> makeInvoiceEntityList = makeInvoiceDao.getMakeInvoiceByState(makeInvoice);
|
||||
return BaseResult.getSuccessMessageEntity("操作成功");
|
||||
}
|
||||
}
|
11
pom.xml
11
pom.xml
|
@ -19,6 +19,17 @@
|
|||
<!-- <module>fw-u8c</module>-->
|
||||
<!-- <module>fw-u9c</module>-->
|
||||
<!-- <module>fw-weixin</module>-->
|
||||
<module>fw-bip</module>
|
||||
<!-- <module>fw-cbs</module>-->
|
||||
<!-- <module>fw-dd</module>-->
|
||||
<!-- <module>fw-grpU8</module>-->
|
||||
<!-- <module>fw-nc</module>-->
|
||||
<!-- <module>fw-ncc</module>-->
|
||||
<!-- <module>fw-ningbobank</module>-->
|
||||
<!-- <module>fw-oa</module>-->
|
||||
<!-- <module>fw-u8</module>-->
|
||||
<!-- <module>fw-u8c</module>-->
|
||||
<!-- <module>fw-u9c</module>-->
|
||||
</modules>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<artifactId>kangarooDataCenterV3</artifactId>
|
||||
|
|
Loading…
Reference in New Issue