合规发送
This commit is contained in:
parent
fb13a15a69
commit
d7109a3c8a
|
@ -1,6 +1,9 @@
|
||||||
package com.hzya.frame.plugin.c4project.plugin;
|
package com.hzya.frame.plugin.c4project.plugin;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.base.PluginBaseEntity;
|
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.C4ProjectXmDetailEntity;
|
||||||
import com.hzya.frame.plugin.c4project.entity.C4ProjectXmEntity;
|
import com.hzya.frame.plugin.c4project.entity.C4ProjectXmEntity;
|
||||||
import com.hzya.frame.plugin.c4project.entity.LexmisC4ProjectEntity;
|
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.BaseResult;
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import com.hzya.frame.web.exception.BaseSystemException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -27,6 +34,8 @@ public class LexmisC4ProjectPluginInitializer extends PluginBaseEntity{
|
||||||
Logger logger = LoggerFactory.getLogger(LexmisC4ProjectPluginInitializer.class);
|
Logger logger = LoggerFactory.getLogger(LexmisC4ProjectPluginInitializer.class);
|
||||||
@Autowired
|
@Autowired
|
||||||
private IC4ProjectDao ic4ProjectDao;
|
private IC4ProjectDao ic4ProjectDao;
|
||||||
|
@Autowired
|
||||||
|
private ISysApplicationApiService sysApplicationApiService;
|
||||||
@Value("${zt.url}")
|
@Value("${zt.url}")
|
||||||
private String url;
|
private String url;
|
||||||
@Override
|
@Override
|
||||||
|
@ -280,7 +289,7 @@ public class LexmisC4ProjectPluginInitializer extends PluginBaseEntity{
|
||||||
}
|
}
|
||||||
String sendResult = HttpRequest.post(url).
|
String sendResult = HttpRequest.post(url).
|
||||||
header("appId", "800051").
|
header("appId", "800051").
|
||||||
header("apiCode", "8000510001").
|
header("apiCode", "").
|
||||||
header("token", token).
|
header("token", token).
|
||||||
header("publicKey", "ZJYAM2YFEIsIaI1e4wMagkS2Q7SFgGk0RvsPhEES45m/OVFCe7eDIk+3zDUT+v578prj").
|
header("publicKey", "ZJYAM2YFEIsIaI1e4wMagkS2Q7SFgGk0RvsPhEES45m/OVFCe7eDIk+3zDUT+v578prj").
|
||||||
header("secretKey", "lR6+uf94mvNMclAB43oIwmhJSMDzQaViTkfXLeNvmGdpLfbFiUvbgbU+p43zO25Zj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
|
header("secretKey", "lR6+uf94mvNMclAB43oIwmhJSMDzQaViTkfXLeNvmGdpLfbFiUvbgbU+p43zO25Zj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
|
||||||
|
@ -290,46 +299,39 @@ public class LexmisC4ProjectPluginInitializer extends PluginBaseEntity{
|
||||||
logger.error("同步"+jdmz+"单据发送返回:" + sendResult);
|
logger.error("同步"+jdmz+"单据发送返回:" + sendResult);
|
||||||
JSONObject sendJson = JSONObject.parseObject(sendResult);
|
JSONObject sendJson = JSONObject.parseObject(sendResult);
|
||||||
if (sendJson.getBoolean("flag")) {
|
if (sendJson.getBoolean("flag")) {
|
||||||
JSONObject attribute = sendJson.getJSONObject("attribute");
|
String attType = "0";
|
||||||
JSONObject attributeData = attribute.getJSONObject("data");
|
String url = "/seeyon/rest/coll/attachments/@SummaryID@/@attType@";
|
||||||
JSONArray workitems = attributeData.getJSONArray("workitems");
|
url = url.replaceAll("@SummaryID@",businessDataStr.getString("SummaryID")).replaceAll("@attType@",attType);
|
||||||
if(workitems == null || workitems.size() == 0){
|
String body = HttpRequest.get(url).header("token", token).execute().body();
|
||||||
return BaseResult.getFailureMessageEntity("同步"+jdmz+"发送错误返回没有流程信息,无法自动提交");
|
if (StrUtil.isNotEmpty(body) && JSONUtil.isTypeJSON(body)){
|
||||||
}
|
List<CollAttachmentResDTO> list = JSON.parseArray(body,CollAttachmentResDTO.class);
|
||||||
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 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=").
|
return BaseResult.getSuccessMessageEntity("同步"+jdmz+"发送成功");
|
||||||
// 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"));
|
|
||||||
//}
|
|
||||||
} else {
|
} else {
|
||||||
return BaseResult.getFailureMessageEntity("同步"+jdmz+"发送错误:"+sendJson.getString("msg"));
|
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
|
* @Author lvleigang
|
||||||
* @Description 浙江三维通信研究院有限公司
|
* @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.basedao.dao.IBaseDao;
|
||||||
import com.hzya.frame.plugin.nuonuo.entity.NuoNuoEntity;
|
import com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity;
|
||||||
|
|
||||||
import java.util.List;
|
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.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
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.plugin.nuonuo.entity.NuoNuoEntity;
|
||||||
import com.hzya.frame.seeyon.entity.NuoNuoCallbackEntity;
|
|
||||||
|
|
||||||
import java.util.List;
|
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")
|
@DS("#entity.dataSourceCode")
|
||||||
@Override
|
@Override
|
||||||
public int updateHpdata(NuoNuoEntity entity) {
|
public List<ComplianceSupplierEntity> queryAffair(ComplianceSupplierEntity entity) {
|
||||||
return super.update(getSqlIdPrifx()+"updateHpdata",entity);
|
return (List<ComplianceSupplierEntity>) super.selectList(getSqlIdPrifx()+"queryAffair",entity);
|
||||||
}
|
}
|
||||||
@DS("#entity.dataSourceCode")
|
@DS("#entity.dataSourceCode")
|
||||||
@Override
|
@Override
|
||||||
public List<NuoNuoEntity> queryAffair(NuoNuoEntity entity) {
|
public List<ComplianceSupplierEntity> querySqr(ComplianceSupplierEntity entity) {
|
||||||
return (List<NuoNuoEntity>) super.selectList(getSqlIdPrifx()+"queryAffair",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;
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
public class NuoNuoEntity extends BaseEntity {
|
public class ComplianceSupplierEntity extends BaseEntity {
|
||||||
|
|
||||||
private String id;
|
private String sqr;
|
||||||
private String field0191;//申请编号
|
private String sqbm;
|
||||||
private String field0192;//红字确认单状态
|
|
||||||
private String field0193;//红字确认单描述
|
|
||||||
private String field0194;//红冲状态
|
|
||||||
private String field0195;//红冲描述
|
|
||||||
private String affairId;
|
private String affairId;
|
||||||
private String noname;
|
private String noname;
|
||||||
private String nodename;
|
private String nodename;
|
||||||
|
|
||||||
public String getNodename() {
|
private String id;
|
||||||
return nodename;
|
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) {
|
public void setAffairId(String affairId) {
|
||||||
this.nodename = nodename;
|
this.affairId = affairId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNoname() {
|
public String getNoname() {
|
||||||
|
@ -30,12 +35,28 @@ public class NuoNuoEntity extends BaseEntity {
|
||||||
this.noname = noname;
|
this.noname = noname;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAffairId() {
|
public String getNodename() {
|
||||||
return affairId;
|
return nodename;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAffairId(String affairId) {
|
public void setNodename(String nodename) {
|
||||||
this.affairId = affairId;
|
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
|
@Override
|
||||||
|
@ -48,44 +69,60 @@ public class NuoNuoEntity extends BaseEntity {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getField0191() {
|
public String getSqjg() {
|
||||||
return field0191;
|
return sqjg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setField0191(String field0191) {
|
public void setSqjg(String sqjg) {
|
||||||
this.field0191 = field0191;
|
this.sqjg = sqjg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getField0192() {
|
public String getCljg() {
|
||||||
return field0192;
|
return cljg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setField0192(String field0192) {
|
public void setCljg(String cljg) {
|
||||||
this.field0192 = field0192;
|
this.cljg = cljg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getField0193() {
|
public String getSqjgField() {
|
||||||
return field0193;
|
return sqjgField;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setField0193(String field0193) {
|
public void setSqjgField(String sqjgField) {
|
||||||
this.field0193 = field0193;
|
this.sqjgField = sqjgField;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getField0194() {
|
public String getCljgField() {
|
||||||
return field0194;
|
return cljgField;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setField0194(String field0194) {
|
public void setCljgField(String cljgField) {
|
||||||
this.field0194 = field0194;
|
this.cljgField = cljgField;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getField0195() {
|
public String getTableName() {
|
||||||
return field0195;
|
return tableName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setField0195(String field0195) {
|
public void setTableName(String tableName) {
|
||||||
this.field0195 = field0195;
|
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"?>
|
<?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">
|
<!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">
|
<select id="queryAffair" resultType="com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity" parameterType="com.hzya.frame.plugin.complianceSupplier.entity.ComplianceSupplierEntity">
|
||||||
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 NODE_NAME as noname,NODE_POLICY as nodename from ctp_affair
|
select NODE_NAME as noname,NODE_POLICY as nodename from ctp_affair
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="affairId != null and affairId !='' ">id = #{affairId} </if>
|
<if test="affairId != null and affairId !='' ">id = #{affairId} </if>
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</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>
|
</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,24 +1,21 @@
|
||||||
package com.hzya.frame.plugin.nuonuo.plugin;
|
package com.hzya.frame.plugin.complianceSupplier.plugin;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.base.PluginBaseEntity;
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
import com.hzya.frame.plugin.masterData.plugin.MdmPluginInitializer;
|
import com.hzya.frame.plugin.complianceSupplier.service.IComplianceSupplierService;
|
||||||
import com.hzya.frame.plugin.nuonuo.service.INuoNuoService;
|
|
||||||
import com.hzya.frame.sysnew.comparison.masterData.service.IMasterDataService;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 诺诺发票
|
|
||||||
*
|
|
||||||
* @author makejava
|
* @author makejava
|
||||||
* @since 2024-06-21 13:52:35
|
* @since 2024-06-21 13:52:35
|
||||||
*/
|
*/
|
||||||
public class NuoNuoPluginInitializer extends PluginBaseEntity{
|
public class ComplianceSupplierPluginInitializer extends PluginBaseEntity {
|
||||||
Logger logger = LoggerFactory.getLogger(NuoNuoPluginInitializer.class);
|
Logger logger = LoggerFactory.getLogger(ComplianceSupplierPluginInitializer.class);
|
||||||
@Autowired
|
@Autowired
|
||||||
private INuoNuoService nuoNuoService;
|
private IComplianceSupplierService complianceSupplierService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
|
@ -32,30 +29,32 @@ public class NuoNuoPluginInitializer extends PluginBaseEntity{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPluginId() {
|
public String getPluginId() {
|
||||||
return "NuoNuoPlugin";
|
return "ComplianceSupplierPlugin";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPluginName() {
|
public String getPluginName() {
|
||||||
return "NuoNuoPlugin插件";
|
return "ComplianceSupplierPlugin插件";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPluginLabel() {
|
public String getPluginLabel() {
|
||||||
return "NuoNuoPlugin";
|
return "ComplianceSupplierPlugin";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPluginType() {
|
public String getPluginType() {
|
||||||
return "1";
|
return "1";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||||
try {
|
try {
|
||||||
logger.info("======开始执行诺诺发票同步========");
|
logger.info("======开始执行合规同步========");
|
||||||
return nuoNuoService.sendNuoNuoFaPiao(requestJson);
|
//return complianceSupplierService.sendComplianceSupplier(requestJson);
|
||||||
}catch (Exception e){
|
return complianceSupplierService.doSendComplianceSupplier(requestJson);
|
||||||
logger.info("======执行诺诺发票同步失败:{}========",e.getMessage());
|
} catch (Exception e) {
|
||||||
|
logger.info("======执行合规同步失败:{}========", e.getMessage());
|
||||||
}
|
}
|
||||||
return null;
|
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.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
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;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
public interface INuoNuoService extends IBaseService<NuoNuoEntity, String>{
|
public interface IComplianceSupplierService extends IBaseService<ComplianceSupplierEntity, String>{
|
||||||
/**
|
|
||||||
* @Author lvleigang
|
|
||||||
* @Description 同步诺诺发票蓝字
|
|
||||||
* @Date 5:31 下午 2025/6/26
|
|
||||||
* @param requestJson
|
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
|
||||||
**/
|
|
||||||
JsonResultEntity sendNuoNuoFaPiao(JSONObject requestJson);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author lvleigang
|
* @Author lvleigang
|
||||||
* @Description 诺诺发票确认单
|
* @Description 合规同步
|
||||||
* @Date 4:35 下午 2025/7/2
|
* @Date 2:21 下午 2025/7/28
|
||||||
* @param requestJson
|
* @param requestJson
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
**/
|
**/
|
||||||
JsonResultEntity sendNuoNuoFaPiaoQrd(JSONObject requestJson);
|
JsonResultEntity sendComplianceSupplier(JSONObject requestJson);
|
||||||
|
|
||||||
/**
|
JsonResultEntity doSendComplianceSupplier(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 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