合规发送
This commit is contained in:
parent
fb13a15a69
commit
d7109a3c8a
|
@ -1,6 +1,9 @@
|
|||
package com.hzya.frame.plugin.c4project.plugin;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
|
@ -8,8 +11,12 @@ import com.hzya.frame.plugin.c4project.dao.IC4ProjectDao;
|
|||
import com.hzya.frame.plugin.c4project.entity.C4ProjectXmDetailEntity;
|
||||
import com.hzya.frame.plugin.c4project.entity.C4ProjectXmEntity;
|
||||
import com.hzya.frame.plugin.c4project.entity.LexmisC4ProjectEntity;
|
||||
import com.hzya.frame.seeyon.entity.CollAttachmentResDTO;
|
||||
import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity;
|
||||
import com.hzya.frame.sysnew.application.api.service.ISysApplicationApiService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import com.hzya.frame.web.exception.BaseSystemException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -27,6 +34,8 @@ public class LexmisC4ProjectPluginInitializer extends PluginBaseEntity{
|
|||
Logger logger = LoggerFactory.getLogger(LexmisC4ProjectPluginInitializer.class);
|
||||
@Autowired
|
||||
private IC4ProjectDao ic4ProjectDao;
|
||||
@Autowired
|
||||
private ISysApplicationApiService sysApplicationApiService;
|
||||
@Value("${zt.url}")
|
||||
private String url;
|
||||
@Override
|
||||
|
@ -280,7 +289,7 @@ public class LexmisC4ProjectPluginInitializer extends PluginBaseEntity{
|
|||
}
|
||||
String sendResult = HttpRequest.post(url).
|
||||
header("appId", "800051").
|
||||
header("apiCode", "8000510001").
|
||||
header("apiCode", "").
|
||||
header("token", token).
|
||||
header("publicKey", "ZJYAM2YFEIsIaI1e4wMagkS2Q7SFgGk0RvsPhEES45m/OVFCe7eDIk+3zDUT+v578prj").
|
||||
header("secretKey", "lR6+uf94mvNMclAB43oIwmhJSMDzQaViTkfXLeNvmGdpLfbFiUvbgbU+p43zO25Zj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
|
||||
|
@ -290,46 +299,39 @@ public class LexmisC4ProjectPluginInitializer extends PluginBaseEntity{
|
|||
logger.error("同步"+jdmz+"单据发送返回:" + sendResult);
|
||||
JSONObject sendJson = JSONObject.parseObject(sendResult);
|
||||
if (sendJson.getBoolean("flag")) {
|
||||
JSONObject attribute = sendJson.getJSONObject("attribute");
|
||||
JSONObject attributeData = attribute.getJSONObject("data");
|
||||
JSONArray workitems = attributeData.getJSONArray("workitems");
|
||||
if(workitems == null || workitems.size() == 0){
|
||||
return BaseResult.getFailureMessageEntity("同步"+jdmz+"发送错误返回没有流程信息,无法自动提交");
|
||||
}
|
||||
JSONObject workitemsis = workitems.getJSONObject(0);
|
||||
JSONObject tjData = new JSONObject();
|
||||
tjData.put("appName","collaboration");
|
||||
tjData.put("workitemId",workitemsis.getString("id"));
|
||||
JSONObject da = new JSONObject();
|
||||
da.put("submitType","1");
|
||||
JSONObject comment_deal = new JSONObject();
|
||||
comment_deal.put("attitude","2");
|
||||
comment_deal.put("content","同意");
|
||||
da.put("comment_deal",comment_deal);
|
||||
tjData.put("data",da);
|
||||
return BaseResult.getSuccessMessageEntity("同步"+jdmz+"发送成功");
|
||||
String attType = "0";
|
||||
String url = "/seeyon/rest/coll/attachments/@SummaryID@/@attType@";
|
||||
url = url.replaceAll("@SummaryID@",businessDataStr.getString("SummaryID")).replaceAll("@attType@",attType);
|
||||
String body = HttpRequest.get(url).header("token", token).execute().body();
|
||||
if (StrUtil.isNotEmpty(body) && JSONUtil.isTypeJSON(body)){
|
||||
List<CollAttachmentResDTO> list = JSON.parseArray(body,CollAttachmentResDTO.class);
|
||||
|
||||
//String tjResult = HttpRequest.post(url).
|
||||
// header("appId", "800051").
|
||||
// header("apiCode", "8000510018").
|
||||
// header("token", token).
|
||||
// header("publicKey", "ZJYAM2YFEIsIaI1e4wMagkS2Q7SFgGk0RvsPhEES45m/OVFCe7eDIk+3zDUT+v578prj").
|
||||
// header("secretKey", "lR6+uf94mvNMclAB43oIwmhJSMDzQaViTkfXLeNvmGdpLfbFiUvbgbU+p43zO25Zj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
|
||||
// body(tjData.toJSONString()).
|
||||
// execute().
|
||||
// body();
|
||||
//logger.error("同步"+jdmz+"单据提交返回:" + tjResult);
|
||||
//JSONObject tjJson = JSONObject.parseObject(tjResult);
|
||||
//if (tjJson.getBoolean("flag")) {
|
||||
// return BaseResult.getSuccessMessageEntity("同步"+jdmz+"发送成功");
|
||||
//} else {
|
||||
// return BaseResult.getFailureMessageEntity("同步"+jdmz+"提交错误:"+tjJson.getString("msg"));
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return BaseResult.getSuccessMessageEntity("同步"+jdmz+"发送成功");
|
||||
} else {
|
||||
return BaseResult.getFailureMessageEntity("同步"+jdmz+"发送错误:"+sendJson.getString("msg"));
|
||||
}
|
||||
}
|
||||
|
||||
private SysApplicationApiEntity getByCode(String api_code){
|
||||
if (StrUtil.isNotEmpty(api_code)){
|
||||
SysApplicationApiEntity sysApp = new SysApplicationApiEntity();
|
||||
sysApp.setApiCode(Long.valueOf(api_code));
|
||||
sysApp = sysApplicationApiService.queryOne(sysApp);
|
||||
if (null != sysApp && StrUtil.isNotEmpty(sysApp.getId())){
|
||||
sysApp = sysApplicationApiService.get(sysApp.getId());
|
||||
if (null != sysApp){
|
||||
return sysApp;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
throw new BaseSystemException("api_code不能为空");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 浙江三维通信研究院有限公司
|
||||
|
|
|
@ -1,14 +1,22 @@
|
|||
package com.hzya.frame.plugin.nuonuo.dao;
|
||||
package com.hzya.frame.plugin.complianceSupplier.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.plugin.nuonuo.entity.NuoNuoEntity;
|
||||
import com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface INuoNuoDao extends IBaseDao<NuoNuoEntity, String> {
|
||||
|
||||
int updateHpdata(NuoNuoEntity nuoNuoEntity);
|
||||
public interface IComplianceSupplierDao extends IBaseDao<ComplianceSupplierEntity, String> {
|
||||
|
||||
List<NuoNuoEntity> queryAffair(NuoNuoEntity nuoNuoEntity);
|
||||
|
||||
List<ComplianceSupplierEntity> queryAffair(ComplianceSupplierEntity complianceSupplierEntity);
|
||||
|
||||
List<ComplianceSupplierEntity> querySqr(ComplianceSupplierEntity sqrEntity);
|
||||
|
||||
List<ComplianceSupplierEntity> querySqbm(ComplianceSupplierEntity sqbmEntity);
|
||||
|
||||
int updateData(ComplianceSupplierEntity entity1);
|
||||
|
||||
List<ComplianceSupplierEntity> getQueryData(ComplianceSupplierEntity complianceSupplierEntity);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,26 +1,42 @@
|
|||
package com.hzya.frame.plugin.nuonuo.dao.impl;
|
||||
package com.hzya.frame.plugin.complianceSupplier.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.plugin.nuonuo.dao.INuoNuoDao;
|
||||
import com.hzya.frame.plugin.complianceSupplier.dao.IComplianceSupplierDao;
|
||||
import com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity;
|
||||
import com.hzya.frame.plugin.nuonuo.entity.NuoNuoEntity;
|
||||
import com.hzya.frame.seeyon.entity.NuoNuoCallbackEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class NuoNuoDaoImpl extends MybatisGenericDao<NuoNuoEntity, String> implements INuoNuoDao {
|
||||
public class ComplianceSupplierDaoImpl extends MybatisGenericDao<ComplianceSupplierEntity, String> implements IComplianceSupplierDao {
|
||||
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public int updateHpdata(NuoNuoEntity entity) {
|
||||
return super.update(getSqlIdPrifx()+"updateHpdata",entity);
|
||||
public List<ComplianceSupplierEntity> queryAffair(ComplianceSupplierEntity entity) {
|
||||
return (List<ComplianceSupplierEntity>) super.selectList(getSqlIdPrifx()+"queryAffair",entity);
|
||||
}
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<NuoNuoEntity> queryAffair(NuoNuoEntity entity) {
|
||||
return (List<NuoNuoEntity>) super.selectList(getSqlIdPrifx()+"queryAffair",entity);
|
||||
public List<ComplianceSupplierEntity> querySqr(ComplianceSupplierEntity entity) {
|
||||
return (List<ComplianceSupplierEntity>) super.selectList(getSqlIdPrifx()+"querySqr",entity);
|
||||
|
||||
}
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<ComplianceSupplierEntity> querySqbm(ComplianceSupplierEntity entity) {
|
||||
return (List<ComplianceSupplierEntity>) super.selectList(getSqlIdPrifx()+"querySqbm",entity);
|
||||
|
||||
}
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public int updateData(ComplianceSupplierEntity entity) {
|
||||
return super.update(getSqlIdPrifx()+"updateData",entity);
|
||||
}
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<ComplianceSupplierEntity> getQueryData(ComplianceSupplierEntity entity) {
|
||||
return (List<ComplianceSupplierEntity>) super.selectList(getSqlIdPrifx()+"getQueryData",entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,25 +1,30 @@
|
|||
package com.hzya.frame.plugin.nuonuo.entity;
|
||||
package com.hzya.frame.plugin.complianceSupplier.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
public class NuoNuoEntity extends BaseEntity {
|
||||
public class ComplianceSupplierEntity extends BaseEntity {
|
||||
|
||||
private String id;
|
||||
private String field0191;//申请编号
|
||||
private String field0192;//红字确认单状态
|
||||
private String field0193;//红字确认单描述
|
||||
private String field0194;//红冲状态
|
||||
private String field0195;//红冲描述
|
||||
private String sqr;
|
||||
private String sqbm;
|
||||
private String affairId;
|
||||
private String noname;
|
||||
private String nodename;
|
||||
|
||||
public String getNodename() {
|
||||
return nodename;
|
||||
private String id;
|
||||
private String sqjg;
|
||||
private String cljg;
|
||||
private String sqjgField;
|
||||
private String cljgField;
|
||||
private String dhField;
|
||||
private String dh;
|
||||
private String tableName;
|
||||
|
||||
public String getAffairId() {
|
||||
return affairId;
|
||||
}
|
||||
|
||||
public void setNodename(String nodename) {
|
||||
this.nodename = nodename;
|
||||
public void setAffairId(String affairId) {
|
||||
this.affairId = affairId;
|
||||
}
|
||||
|
||||
public String getNoname() {
|
||||
|
@ -30,12 +35,28 @@ public class NuoNuoEntity extends BaseEntity {
|
|||
this.noname = noname;
|
||||
}
|
||||
|
||||
public String getAffairId() {
|
||||
return affairId;
|
||||
public String getNodename() {
|
||||
return nodename;
|
||||
}
|
||||
|
||||
public void setAffairId(String affairId) {
|
||||
this.affairId = affairId;
|
||||
public void setNodename(String nodename) {
|
||||
this.nodename = nodename;
|
||||
}
|
||||
|
||||
public String getSqr() {
|
||||
return sqr;
|
||||
}
|
||||
|
||||
public void setSqr(String sqr) {
|
||||
this.sqr = sqr;
|
||||
}
|
||||
|
||||
public String getSqbm() {
|
||||
return sqbm;
|
||||
}
|
||||
|
||||
public void setSqbm(String sqbm) {
|
||||
this.sqbm = sqbm;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,44 +69,60 @@ public class NuoNuoEntity extends BaseEntity {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public String getField0191() {
|
||||
return field0191;
|
||||
public String getSqjg() {
|
||||
return sqjg;
|
||||
}
|
||||
|
||||
public void setField0191(String field0191) {
|
||||
this.field0191 = field0191;
|
||||
public void setSqjg(String sqjg) {
|
||||
this.sqjg = sqjg;
|
||||
}
|
||||
|
||||
public String getField0192() {
|
||||
return field0192;
|
||||
public String getCljg() {
|
||||
return cljg;
|
||||
}
|
||||
|
||||
public void setField0192(String field0192) {
|
||||
this.field0192 = field0192;
|
||||
public void setCljg(String cljg) {
|
||||
this.cljg = cljg;
|
||||
}
|
||||
|
||||
public String getField0193() {
|
||||
return field0193;
|
||||
public String getSqjgField() {
|
||||
return sqjgField;
|
||||
}
|
||||
|
||||
public void setField0193(String field0193) {
|
||||
this.field0193 = field0193;
|
||||
public void setSqjgField(String sqjgField) {
|
||||
this.sqjgField = sqjgField;
|
||||
}
|
||||
|
||||
public String getField0194() {
|
||||
return field0194;
|
||||
public String getCljgField() {
|
||||
return cljgField;
|
||||
}
|
||||
|
||||
public void setField0194(String field0194) {
|
||||
this.field0194 = field0194;
|
||||
public void setCljgField(String cljgField) {
|
||||
this.cljgField = cljgField;
|
||||
}
|
||||
|
||||
public String getField0195() {
|
||||
return field0195;
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setField0195(String field0195) {
|
||||
this.field0195 = field0195;
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public String getDhField() {
|
||||
return dhField;
|
||||
}
|
||||
|
||||
public void setDhField(String dhField) {
|
||||
this.dhField = dhField;
|
||||
}
|
||||
|
||||
public String getDh() {
|
||||
return dh;
|
||||
}
|
||||
|
||||
public void setDh(String dh) {
|
||||
this.dh = dh;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,25 +1,39 @@
|
|||
<?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.plugin.nuonuo.dao.impl.NuoNuoDaoImpl">
|
||||
<mapper namespace="com.hzya.frame.plugin.complianceSupplier.dao.impl.ComplianceSupplierDaoImpl">
|
||||
|
||||
<update id="updateHpdata" parameterType="com.hzya.frame.plugin.nuonuo.entity.NuoNuoEntity">
|
||||
update formmain_11970 set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="field0191 != null and field0191 !='' "> field0191 = #{field0191},</if>
|
||||
<if test="field0192 != null and field0192 !='' "> field0192 = #{field0192},</if>
|
||||
<if test="field0193 != null and field0193 !='' "> field0193 = #{field0193},</if>
|
||||
<if test="field0194 != null and field0194 !='' "> field0194 = #{field0194},</if>
|
||||
<if test="field0195 != null and field0195 !='' "> field0195 = #{field0195},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="queryAffair" resultType="com.hzya.frame.plugin.nuonuo.entity.NuoNuoEntity" parameterType="com.hzya.frame.plugin.nuonuo.entity.NuoNuoEntity">
|
||||
<select id="queryAffair" resultType="com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity" parameterType="com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity">
|
||||
select NODE_NAME as noname,NODE_POLICY as nodename from ctp_affair
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="affairId != null and affairId !='' ">id = #{affairId} </if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="querySqr" resultType="com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity" parameterType="com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity">
|
||||
SELECT name as sqr from ORG_MEMBER where id = #{sqr}
|
||||
</select>
|
||||
<select id="querySqbm" resultType="com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity" parameterType="com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity">
|
||||
SELECT name as sqbm from ORG_UNIT where id = #{sqbm}
|
||||
</select>
|
||||
|
||||
<update id="updateData" parameterType="com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity">
|
||||
update ${tableName} set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="sqjg != null and sqjg !='' "> ${sqjgField} = #{sqjg},</if>
|
||||
<if test="cljg != null and cljg !='' "> ${cljgField} = #{cljg},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<select id="getQueryData" resultType="com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity" parameterType="com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity">
|
||||
select
|
||||
id as id,
|
||||
${sqjgField} as sqjg,
|
||||
${dhField} as dh,
|
||||
#{tableName} as #{tableName},
|
||||
#{sqjgField} as #{sqjgField},
|
||||
#{cljgField} as #{cljgField}
|
||||
from ${tableName}
|
||||
where ${sqjgField} is not null and ${cljgField} is null
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
package com.hzya.frame.plugin.complianceSupplier.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.complianceSupplier.service.IComplianceSupplierService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class ComplianceSupplierDataPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(ComplianceSupplierDataPluginInitializer.class);
|
||||
@Autowired
|
||||
private IComplianceSupplierService complianceSupplierService;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "执行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "执行销毁方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "ComplianceSupplierDataPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "ComplianceSupplierDataPlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "ComplianceSupplierDataPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
try {
|
||||
logger.info("======开始执行合规同步========");
|
||||
//return complianceSupplierService.sendComplianceSupplier(requestJson);
|
||||
return complianceSupplierService.doSendComplianceSupplierData(requestJson);
|
||||
} catch (Exception e) {
|
||||
logger.info("======执行合规同步失败:{}========", e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,26 +1,23 @@
|
|||
package com.hzya.frame.plugin.nuonuo.plugin;
|
||||
package com.hzya.frame.plugin.complianceSupplier.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.masterData.plugin.MdmPluginInitializer;
|
||||
import com.hzya.frame.plugin.nuonuo.service.INuoNuoService;
|
||||
import com.hzya.frame.sysnew.comparison.masterData.service.IMasterDataService;
|
||||
import com.hzya.frame.plugin.complianceSupplier.service.IComplianceSupplierService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* 诺诺发票
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class NuoNuoPluginInitializer extends PluginBaseEntity{
|
||||
Logger logger = LoggerFactory.getLogger(NuoNuoPluginInitializer.class);
|
||||
public class ComplianceSupplierPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(ComplianceSupplierPluginInitializer.class);
|
||||
@Autowired
|
||||
private INuoNuoService nuoNuoService;
|
||||
private IComplianceSupplierService complianceSupplierService;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "执行初始化方法initialize()");
|
||||
}
|
||||
|
@ -32,30 +29,32 @@ public class NuoNuoPluginInitializer extends PluginBaseEntity{
|
|||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "NuoNuoPlugin";
|
||||
return "ComplianceSupplierPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "NuoNuoPlugin插件";
|
||||
return "ComplianceSupplierPlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "NuoNuoPlugin";
|
||||
return "ComplianceSupplierPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
try {
|
||||
logger.info("======开始执行诺诺发票同步========");
|
||||
return nuoNuoService.sendNuoNuoFaPiao(requestJson);
|
||||
}catch (Exception e){
|
||||
logger.info("======执行诺诺发票同步失败:{}========",e.getMessage());
|
||||
logger.info("======开始执行合规同步========");
|
||||
//return complianceSupplierService.sendComplianceSupplier(requestJson);
|
||||
return complianceSupplierService.doSendComplianceSupplier(requestJson);
|
||||
} catch (Exception e) {
|
||||
logger.info("======执行合规同步失败:{}========", e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -1,37 +1,22 @@
|
|||
package com.hzya.frame.plugin.nuonuo.service;
|
||||
package com.hzya.frame.plugin.complianceSupplier.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.plugin.nuonuo.entity.NuoNuoEntity;
|
||||
import com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface INuoNuoService extends IBaseService<NuoNuoEntity, String>{
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 同步诺诺发票蓝字
|
||||
* @Date 5:31 下午 2025/6/26
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity sendNuoNuoFaPiao(JSONObject requestJson);
|
||||
public interface IComplianceSupplierService extends IBaseService<ComplianceSupplierEntity, String>{
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 诺诺发票确认单
|
||||
* @Date 4:35 下午 2025/7/2
|
||||
* @Description 合规同步
|
||||
* @Date 2:21 下午 2025/7/28
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity sendNuoNuoFaPiaoQrd(JSONObject requestJson);
|
||||
JsonResultEntity sendComplianceSupplier(JSONObject requestJson);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 诺诺发票红冲
|
||||
* @Date 4:35 下午 2025/7/2
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity sendNuoNuoFaPiaoHc(JSONObject requestJson);
|
||||
JsonResultEntity doSendComplianceSupplier(JSONObject requestJson);
|
||||
|
||||
JsonResultEntity sendNuoNuoFaPiaoHp(JSONObject requestJson);
|
||||
JsonResultEntity doSendComplianceSupplierData(JSONObject requestJson);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>ComplianceSupplierPlugin</id>
|
||||
<name>ComplianceSupplierPlugin插件</name>
|
||||
<category>20250728001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="complianceSupplierDao" class="com.hzya.frame.plugin.complianceSupplier.dao.impl.ComplianceSupplierDaoImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="complianceSupplierPluginInitializer" class="com.hzya.frame.plugin.complianceSupplier.plugin.ComplianceSupplierPluginInitializer" />
|
||||
<bean name="complianceSupplierDataPluginInitializer" class="com.hzya.frame.plugin.complianceSupplier.plugin.ComplianceSupplierDataPluginInitializer" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="complianceSupplierService" class="com.hzya.frame.plugin.complianceSupplier.service.impl.ComplianceSupplierServiceImpl" />
|
||||
</beans>
|
Loading…
Reference in New Issue