Compare commits
26 Commits
master
...
deguangxin
Author | SHA1 | Date |
---|---|---|
|
20f0a4bea3 | |
|
a605df1cf6 | |
|
614df64837 | |
|
2a1da945fe | |
|
9068a98f7a | |
|
c3cd1e29b7 | |
|
5a11ab67e0 | |
|
b35b87cc5f | |
|
776c49dfc5 | |
|
6ebfffd7de | |
|
537b70f510 | |
|
5209d7cfd5 | |
|
06d06dddbe | |
|
a1eafd905f | |
|
db93567ca4 | |
|
93f351f17c | |
|
8ec7624e91 | |
|
6198069118 | |
|
cbae49fc0a | |
|
be5f91fd11 | |
|
f6dc71c3d6 | |
|
0f6ee62126 | |
|
b6b4fd877d | |
|
9fbfa51c52 | |
|
6b4bf0edb1 | |
|
b4f1e3c3ec |
|
@ -64,5 +64,3 @@ $RECYCLE.BIN/
|
||||||
/base-common/target/
|
/base-common/target/
|
||||||
/base-core/target/
|
/base-core/target/
|
||||||
/base-webapp/target/classes/com/hzya/frame/
|
/base-webapp/target/classes/com/hzya/frame/
|
||||||
/fw-weixin/target/
|
|
||||||
/E:/yongansystem/log/2024-10-15/
|
|
||||||
|
|
|
@ -39,15 +39,16 @@
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>xel</id> <!--xel-->
|
<id>dgx</id> <!--dgx-->
|
||||||
<properties>
|
<properties>
|
||||||
<profile.active>xel</profile.active>
|
<profile.active>dgx</profile.active>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>zqtlocal</id> <!--曾庆拓-->
|
<id>xel</id> <!--相二林-->
|
||||||
<properties>
|
<properties>
|
||||||
<profile.active>zqtlocal</profile.active>
|
<profile.active>xel</profile.active>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
|
|
@ -1,386 +0,0 @@
|
||||||
package com.hzya.frame.plugin.BackUpDatabase.plugin;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.base.PluginBaseEntity;
|
|
||||||
import com.hzya.frame.web.entity.BaseResult;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
|
|
||||||
import com.jcraft.jsch.Channel;
|
|
||||||
import com.jcraft.jsch.ChannelSftp;
|
|
||||||
import com.jcraft.jsch.JSch;
|
|
||||||
import com.jcraft.jsch.Session;
|
|
||||||
import com.jcraft.jsch.SftpATTRS;
|
|
||||||
import com.jcraft.jsch.SftpException;
|
|
||||||
import org.apache.commons.net.ftp.FTPClient;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主数据模版(MdmModule)表服务接口
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-06-18 10:33:32
|
|
||||||
*/
|
|
||||||
public class BackUpDatabaseInitializer extends PluginBaseEntity {
|
|
||||||
Logger logger = LoggerFactory.getLogger(BackUpDatabaseInitializer.class);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void initialize() {
|
|
||||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void destroy() {
|
|
||||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getPluginId() {
|
|
||||||
return "BackUpDatabasePlugin";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getPluginName() {
|
|
||||||
return "数据库备份下发";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getPluginLabel() {
|
|
||||||
return "BackUpDatabasePlugin";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getPluginType() {
|
|
||||||
return "1";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Value("${database.filePase:}")
|
|
||||||
private String filePase;//文件保存路径
|
|
||||||
|
|
||||||
@Value("${database.fileName:data.sql}")
|
|
||||||
private String fileName;//文件保存名称
|
|
||||||
|
|
||||||
@Value("${database.databaseName:}")
|
|
||||||
private String databaseName;//库名
|
|
||||||
|
|
||||||
@Value("${database.host:}")
|
|
||||||
private String host;//地址
|
|
||||||
|
|
||||||
@Value("${database.port:}")
|
|
||||||
private String port;//端口
|
|
||||||
|
|
||||||
@Value("${database.username:}")
|
|
||||||
private String username;//用户名
|
|
||||||
|
|
||||||
@Value("${database.password:}")
|
|
||||||
private String password;//密码
|
|
||||||
|
|
||||||
|
|
||||||
@Value("${sftp.host:}")
|
|
||||||
private String sftpHost;
|
|
||||||
|
|
||||||
@Value("${sftp.port:}")
|
|
||||||
private Integer sftpPort;
|
|
||||||
|
|
||||||
@Value("${sftp.username:}")
|
|
||||||
private String sftpUsername;
|
|
||||||
|
|
||||||
@Value("${sftp.password:}")
|
|
||||||
private String sftpPassword;
|
|
||||||
|
|
||||||
@Value("${sftp.filePase:}")
|
|
||||||
private String sftpFilePase;
|
|
||||||
|
|
||||||
|
|
||||||
private ChannelSftp sftp = null;
|
|
||||||
private Session sshSession = null;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
|
||||||
try {
|
|
||||||
if(filePase == null || "".equals(filePase)
|
|
||||||
|| databaseName == null || "".equals(databaseName)
|
|
||||||
|| fileName == null || "".equals(fileName)
|
|
||||||
|| host == null || "".equals(host)
|
|
||||||
|| port == null || "".equals(port)
|
|
||||||
|| username == null || "".equals(username)
|
|
||||||
|| password == null || "".equals(password)
|
|
||||||
){
|
|
||||||
return BaseResult.getSuccessMessageEntity("系统参数未配置不执行,数据库备份");
|
|
||||||
}
|
|
||||||
//查找是否存在当天数据库
|
|
||||||
//格式化日期
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
String data = sdf.format(new Date());
|
|
||||||
//当天路径
|
|
||||||
String nowDatabasePase = filePase + File.separator + data;
|
|
||||||
//不判断文件是否存在,直接执行
|
|
||||||
if(!backFile(nowDatabasePase)){
|
|
||||||
return BaseResult.getFailureMessageEntity("备份失败");
|
|
||||||
}
|
|
||||||
//判断是否有sftp配置,有的备份,没有的不备份
|
|
||||||
if(sftpHost != null && !"".equals(sftpHost)
|
|
||||||
&& sftpPort != null && !"".equals(sftpPort)
|
|
||||||
&& sftpUsername != null && !"".equals(sftpUsername)
|
|
||||||
&& sftpPassword != null && !"".equals(sftpPassword)
|
|
||||||
&& sftpFilePase != null && !"".equals(sftpFilePase)
|
|
||||||
){
|
|
||||||
String sftpnowDatabasePase = sftpFilePase + File.separator + data;
|
|
||||||
if(!sendFile(nowDatabasePase,sftpnowDatabasePase)){
|
|
||||||
return BaseResult.getFailureMessageEntity("备份失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
logger.info("执行成功");
|
|
||||||
return BaseResult.getSuccessMessageEntity("执行成功");
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("执行失败{}", e.getMessage());
|
|
||||||
return BaseResult.getFailureMessageEntity("备份失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean backFile(String nowDatabasePase) {
|
|
||||||
try {
|
|
||||||
// 构建 mysqldump 命令
|
|
||||||
ProcessBuilder processBuilder = new ProcessBuilder(
|
|
||||||
"mysqldump",
|
|
||||||
"--ssl-mode=DISABLED",
|
|
||||||
"-h", host,
|
|
||||||
"-u", username,
|
|
||||||
"-p" + password,
|
|
||||||
"-P" + port,
|
|
||||||
databaseName);
|
|
||||||
// 启动进程并获取输入流
|
|
||||||
Process process = processBuilder.start();
|
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
|
||||||
File f = creatFile(nowDatabasePase,fileName);
|
|
||||||
// 将备份内容写入文件
|
|
||||||
FileWriter writer = new FileWriter(f);
|
|
||||||
String line;
|
|
||||||
while ((line = reader.readLine())!= null) {
|
|
||||||
writer.write(line + "\n");
|
|
||||||
}
|
|
||||||
// 关闭资源
|
|
||||||
reader.close();
|
|
||||||
writer.close();
|
|
||||||
process.waitFor();
|
|
||||||
logger.info("文件备份成功路径:"+nowDatabasePase+ File.separator +fileName);
|
|
||||||
return true;
|
|
||||||
} catch (IOException | InterruptedException e) {
|
|
||||||
logger.info("文件备份失败:"+e.getMessage());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @Author lvleigang
|
|
||||||
* @Description 创建目录及文件
|
|
||||||
* @Date 8:59 上午 2024/10/22
|
|
||||||
* @param filePath
|
|
||||||
* @param fileName
|
|
||||||
* @return java.io.File
|
|
||||||
**/
|
|
||||||
public File creatFile(String filePath, String fileName) {
|
|
||||||
File folder = new File(filePath);
|
|
||||||
//文件夹路径不存在
|
|
||||||
if (!folder.exists()) {
|
|
||||||
boolean mkdirs = folder.mkdirs();
|
|
||||||
}
|
|
||||||
// 如果文件不存在就创建
|
|
||||||
File file = new File(filePath + File.separator + fileName);
|
|
||||||
if (!file.exists()) {
|
|
||||||
try {
|
|
||||||
file.createNewFile();
|
|
||||||
} catch (IOException e) {
|
|
||||||
logger.error("创建备份文件失败:"+e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return file;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean sendFile(String localFilePath,String remoteFileName) {
|
|
||||||
try {
|
|
||||||
connect();
|
|
||||||
uploadFile(remoteFileName,fileName,localFilePath,fileName);
|
|
||||||
disconnect();
|
|
||||||
return true;
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("sftp文件上传失败:"+e.getMessage());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void connect() {
|
|
||||||
try {
|
|
||||||
JSch jsch = new JSch();
|
|
||||||
jsch.getSession(sftpUsername, sftpHost, sftpPort);
|
|
||||||
sshSession = jsch.getSession(sftpUsername, sftpHost, sftpPort);
|
|
||||||
if (logger.isInfoEnabled()) {
|
|
||||||
logger.info("Session created.");
|
|
||||||
}
|
|
||||||
sshSession.setPassword(sftpPassword);
|
|
||||||
Properties sshConfig = new Properties();
|
|
||||||
sshConfig.put("StrictHostKeyChecking", "no");
|
|
||||||
sshSession.setConfig(sshConfig);
|
|
||||||
sshSession.connect();
|
|
||||||
if (logger.isInfoEnabled()) {
|
|
||||||
logger.info("Session connected.");
|
|
||||||
}
|
|
||||||
Channel channel = sshSession.openChannel("sftp");
|
|
||||||
channel.connect();
|
|
||||||
if (logger.isInfoEnabled()) {
|
|
||||||
logger.info("Opening Channel.");
|
|
||||||
}
|
|
||||||
sftp = (ChannelSftp) channel;
|
|
||||||
if (logger.isInfoEnabled()) {
|
|
||||||
logger.info("Connected to " + host + ".");
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关闭连接
|
|
||||||
*/
|
|
||||||
public void disconnect() {
|
|
||||||
if (this.sftp != null) {
|
|
||||||
if (this.sftp.isConnected()) {
|
|
||||||
this.sftp.disconnect();
|
|
||||||
if (logger.isInfoEnabled()) {
|
|
||||||
logger.info("sftp is closed already");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (this.sshSession != null) {
|
|
||||||
if (this.sshSession.isConnected()) {
|
|
||||||
this.sshSession.disconnect();
|
|
||||||
if (logger.isInfoEnabled()) {
|
|
||||||
logger.info("sshSession is closed already");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 上传单个文件
|
|
||||||
*
|
|
||||||
* @param remotePath:远程保存目录
|
|
||||||
* @param remoteFileName:保存文件名
|
|
||||||
* @param localPath:本地上传目录(以路径符号结束)
|
|
||||||
* @param localFileName:上传的文件名
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean uploadFile(String remotePath, String remoteFileName, String localPath, String localFileName) {
|
|
||||||
FileInputStream in = null;
|
|
||||||
try {
|
|
||||||
createDir(remotePath);
|
|
||||||
File file = new File(localPath + File.separator + localFileName);
|
|
||||||
in = new FileInputStream(file);
|
|
||||||
sftp.put(in, remoteFileName, 65536);
|
|
||||||
return true;
|
|
||||||
} catch (FileNotFoundException e) {
|
|
||||||
} catch (SftpException e) {
|
|
||||||
} finally {
|
|
||||||
if (in != null) {
|
|
||||||
try {
|
|
||||||
in.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建目录
|
|
||||||
*
|
|
||||||
* @param createpath
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean createDir(String createpath) {
|
|
||||||
try {
|
|
||||||
if (isDirExist(createpath)) {
|
|
||||||
this.sftp.cd(createpath);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
String pathArry[] = createpath.split("/");
|
|
||||||
StringBuffer filePath = new StringBuffer("/");
|
|
||||||
for (String path : pathArry) {
|
|
||||||
if (path.equals("")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
filePath.append(path + "/");
|
|
||||||
if (isDirExist(filePath.toString())) {
|
|
||||||
sftp.cd(filePath.toString());
|
|
||||||
} else {
|
|
||||||
// 建立目录
|
|
||||||
sftp.mkdir(filePath.toString());
|
|
||||||
// 进入并设置为当前目录
|
|
||||||
sftp.cd(filePath.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
this.sftp.cd(createpath);
|
|
||||||
return true;
|
|
||||||
} catch (SftpException e) {
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断目录是否存在
|
|
||||||
*
|
|
||||||
* @param directory
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean isDirExist(String directory) {
|
|
||||||
boolean isDirExistFlag = false;
|
|
||||||
try {
|
|
||||||
SftpATTRS sftpATTRS = sftp.lstat(directory);
|
|
||||||
isDirExistFlag = true;
|
|
||||||
return sftpATTRS.isDir();
|
|
||||||
} catch (Exception e) {
|
|
||||||
if (e.getMessage().toLowerCase().equals("no such file")) {
|
|
||||||
isDirExistFlag = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return isDirExistFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 如果目录不存在就创建目录
|
|
||||||
*
|
|
||||||
* @param path
|
|
||||||
*/
|
|
||||||
public void mkdirs(String path) {
|
|
||||||
File f = new File(path);
|
|
||||||
|
|
||||||
String fs = f.getParent();
|
|
||||||
|
|
||||||
f = new File(fs);
|
|
||||||
|
|
||||||
if (!f.exists()) {
|
|
||||||
f.mkdirs();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailLinesEntity;
|
||||||
|
|
||||||
|
public interface IPaymentDetailsLinesDao extends IBaseDao<PaymentOrderDetailLinesEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailsUseLinesEntity;
|
||||||
|
|
||||||
|
public interface IPaymentDetailsUseLinesDao extends IBaseDao<PaymentOrderDetailsUseLinesEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IPaymentOrderDao extends IBaseDao<PaymentOrderEntity,String> {
|
||||||
|
|
||||||
|
//更新付款单推送标识
|
||||||
|
Integer updatePaymentOrderStatus(PaymentOrderEntity paymentOrderEntity);
|
||||||
|
|
||||||
|
//重试方法
|
||||||
|
List<PaymentOrderEntity> queryPaymentOrderRetry(PaymentOrderEntity paymentOrderEntity);
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.dao;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.SalesOrderEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ISalesOrderDao extends IBaseDao<SalesOrderEntity,String> {
|
||||||
|
|
||||||
|
//修改销售订单推送状态
|
||||||
|
Integer updateSalesOrderStatus(SalesOrderEntity salesOrderEntity);
|
||||||
|
|
||||||
|
//重试方法
|
||||||
|
List<SalesOrderEntity> querySalesOrderRetry(SalesOrderEntity salesOrder);
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.SalesOrderDetailsEntity;
|
||||||
|
|
||||||
|
|
||||||
|
public interface ISalesOrderDetailsDao extends IBaseDao<SalesOrderDetailsEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.dao.IPaymentDetailsLinesDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailLinesEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository(value = "PaymentDetailsLinesDaoImpl")
|
||||||
|
public class PaymentDetailsLinesDaoImpl extends MybatisGenericDao<PaymentOrderDetailLinesEntity,String> implements IPaymentDetailsLinesDao {
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.dao.IPaymentDetailsUseLinesDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailsUseLinesEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository(value = "PaymentDetailsUseLinesDaoImpl")
|
||||||
|
public class PaymentDetailsUseLinesDaoImpl extends MybatisGenericDao<PaymentOrderDetailsUseLinesEntity,String> implements IPaymentDetailsUseLinesDao {
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.dao.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.dao.IPaymentOrderDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class PaymentOrderDaoImpl extends MybatisGenericDao<PaymentOrderEntity,String> implements IPaymentOrderDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@DS("#paymentOrderEntity.dataSourceCode")
|
||||||
|
public Integer updatePaymentOrderStatus(PaymentOrderEntity paymentOrderEntity) {
|
||||||
|
return super.update("PaymentOrderEntity_update_status",paymentOrderEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@DS("#paymentOrderEntity.dataSourceCode")
|
||||||
|
public List<PaymentOrderEntity> queryPaymentOrderRetry(PaymentOrderEntity paymentOrderEntity) {
|
||||||
|
return super.query("queryPaymentOrderRetry",paymentOrderEntity);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.dao.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.dao.ISalesOrderDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.SalesOrderEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SalesOrderDaoImpl extends MybatisGenericDao<SalesOrderEntity,String> implements ISalesOrderDao {
|
||||||
|
@Override
|
||||||
|
@DS("#salesOrderEntity.dataSourceCode")
|
||||||
|
public Integer updateSalesOrderStatus(SalesOrderEntity salesOrderEntity) {
|
||||||
|
return super.update("SalesOrderEntity_update_status",salesOrderEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@DS("#salesOrder.dataSourceCode")
|
||||||
|
public List<SalesOrderEntity> querySalesOrderRetry(SalesOrderEntity salesOrder) {
|
||||||
|
return super.query("querySalesOrderRetry",salesOrder);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.dao.ISalesOrderDetailsDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.SalesOrderDetailsEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository(value = "SalesOrderDetailsDaoImpl")
|
||||||
|
public class SalesOrderDetailsDaoImpl extends MybatisGenericDao<SalesOrderDetailsEntity,String> implements ISalesOrderDetailsDao {
|
||||||
|
}
|
|
@ -0,0 +1,108 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 付款单明细行
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-11-13 16:33
|
||||||
|
* **/
|
||||||
|
public class PaymentOrderDetailLinesEntity extends BaseEntity {
|
||||||
|
|
||||||
|
private String settlementMethodCode;//结算方式
|
||||||
|
private String payBkAccCode;//付款银行账号
|
||||||
|
private String payBACCode;//账户币种
|
||||||
|
private String payBkSubAccount;//子账户
|
||||||
|
private String payACCSettlementFee;//手续费
|
||||||
|
private String lineNum;//行号
|
||||||
|
private String cashAccountCode;//现金账号
|
||||||
|
private String tradeDate;//回单日期
|
||||||
|
|
||||||
|
private String formmainId;//主表id
|
||||||
|
|
||||||
|
private String settlementFee;//手续费
|
||||||
|
|
||||||
|
public String getSettlementFee() {
|
||||||
|
return settlementFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSettlementFee(String settlementFee) {
|
||||||
|
this.settlementFee = settlementFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFormmainId() {
|
||||||
|
return formmainId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormmainId(String formmainId) {
|
||||||
|
this.formmainId = formmainId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSettlementMethodCode() {
|
||||||
|
return settlementMethodCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSettlementMethodCode(String settlementMethodCode) {
|
||||||
|
this.settlementMethodCode = settlementMethodCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayBkAccCode() {
|
||||||
|
return payBkAccCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayBkAccCode(String payBkAccCode) {
|
||||||
|
this.payBkAccCode = payBkAccCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayBACCode() {
|
||||||
|
return payBACCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayBACCode(String payBACCode) {
|
||||||
|
this.payBACCode = payBACCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayBkSubAccount() {
|
||||||
|
return payBkSubAccount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayBkSubAccount(String payBkSubAccount) {
|
||||||
|
this.payBkSubAccount = payBkSubAccount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayACCSettlementFee() {
|
||||||
|
return payACCSettlementFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayACCSettlementFee(String payACCSettlementFee) {
|
||||||
|
this.payACCSettlementFee = payACCSettlementFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLineNum() {
|
||||||
|
return lineNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLineNum(String lineNum) {
|
||||||
|
this.lineNum = lineNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCashAccountCode() {
|
||||||
|
return cashAccountCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCashAccountCode(String cashAccountCode) {
|
||||||
|
this.cashAccountCode = cashAccountCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTradeDate() {
|
||||||
|
return tradeDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTradeDate(String tradeDate) {
|
||||||
|
this.tradeDate = tradeDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,79 @@
|
||||||
|
<?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.dgx.oa.dao.impl.PaymentDetailsLinesDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-PaymentOrderDetailLinesEntity-result" type="com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailLinesEntity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="settlementMethodCode" column="settlementMethodCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payBkAccCode" column="payBkAccCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payBACCode" column="payBACCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payBkSubAccount" column="payBkSubAccount" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payACCSettlementFee" column="payACCSettlementFee" jdbcType="VARCHAR"/>
|
||||||
|
<result property="lineNum" column="lineNum" jdbcType="VARCHAR"/>
|
||||||
|
<result property="cashAccountCode" column="cashAccountCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="settlementFee" column="settlementFee" jdbcType="VARCHAR"/>
|
||||||
|
<result property="tradeDate" column="tradeDate" jdbcType="VARCHAR"/>
|
||||||
|
<result property="formmainId" column="formmainId" 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"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "PaymentOrderDetailLinesEntity_Base_Column_List">
|
||||||
|
id,
|
||||||
|
formmain_id as formmainId,
|
||||||
|
field0002 as settlementMethodCode, -- 结算方式
|
||||||
|
field0005 as settlementFee, -- 手续费
|
||||||
|
field0007 as payBkAccCode, -- 付款银行账号
|
||||||
|
field0008 as payBACCode, -- 账户币种
|
||||||
|
field0009 as payBkSubAccount, -- 子账户
|
||||||
|
field0005 as payACCSettlementFee, -- 手续费
|
||||||
|
field0001 as lineNum, -- 行号
|
||||||
|
field0010 as cashAccountCode, -- 现金账号
|
||||||
|
field0011 as tradeDate -- 回单日期
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-PaymentOrderDetailLinesEntity-result" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailLinesEntity">
|
||||||
|
select
|
||||||
|
<include refid="PaymentOrderDetailLinesEntity_Base_Column_List" />
|
||||||
|
from formson_0654
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||||
|
<if test="settlementMethodCode != null and settlementMethodCode != ''"> and field0002 = #{settlementMethodCode} </if>
|
||||||
|
<if test="payBkAccCode != null and payBkAccCode != ''"> and field0007 = #{payBkAccCode} </if>
|
||||||
|
<if test="payBACCode != null and payBACCode != ''"> and field0008 = #{payBACCode} </if>
|
||||||
|
<if test="payBkSubAccount != null and payBkSubAccount != ''"> and field0009 = #{payBkSubAccount} </if>
|
||||||
|
<if test="payACCSettlementFee != null and payACCSettlementFee != ''"> and field0005 = #{payACCSettlementFee} </if>
|
||||||
|
<if test="lineNum != null and lineNum != ''"> and field0001 = #{lineNum} </if>
|
||||||
|
<if test="cashAccountCode != null and cashAccountCode != ''"> and field0010 = #{cashAccountCode} </if>
|
||||||
|
<if test="tradeDate != null and tradeDate != ''"> and field0011 = #{tradeDate} </if>
|
||||||
|
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailLinesEntity" >
|
||||||
|
update formson_0654 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||||
|
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||||
|
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||||
|
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||||
|
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!--将U9C销售订单号传递到OA上-->
|
||||||
|
<update id="PaymentOrderDetailLinesEntity_update_DocNo" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailLinesEntity" >
|
||||||
|
update formson_0654 set xxx={docNo} where id= #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,179 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 付款单用途
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-11-13 16:36
|
||||||
|
* **/
|
||||||
|
public class PaymentOrderDetailsUseLinesEntity extends BaseEntity {
|
||||||
|
private String payProperty;// 用途
|
||||||
|
private String money;// 金额
|
||||||
|
private String lineNum;// 行号
|
||||||
|
private String suppCode;// 代付供应商
|
||||||
|
private String suppName;// 代付供应商名称
|
||||||
|
private String suppSiteCode;// 代付供应商位置
|
||||||
|
private String suppSiteName;// 代付供应商位置名称
|
||||||
|
private String deptCode;// 部门
|
||||||
|
private String transactorCode;// 业务员
|
||||||
|
private String projectCode;// 项目
|
||||||
|
private String incExpItemCode;// 收支项目
|
||||||
|
private String itemMasterCode;// 料品
|
||||||
|
private String custCode;// 代付客户
|
||||||
|
private String custName;// 代付客户名称
|
||||||
|
private String custSiteCode;// 代付客户位置
|
||||||
|
private String custSiteName;// 代付客户位置名称
|
||||||
|
|
||||||
|
private String formmainId;//主表id
|
||||||
|
|
||||||
|
private String maturity;//到期日
|
||||||
|
|
||||||
|
public String getMaturity() {
|
||||||
|
return maturity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaturity(String maturity) {
|
||||||
|
maturity = maturity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFormmainId() {
|
||||||
|
return formmainId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormmainId(String formmainId) {
|
||||||
|
this.formmainId = formmainId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayProperty() {
|
||||||
|
return payProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayProperty(String payProperty) {
|
||||||
|
this.payProperty = payProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMoney() {
|
||||||
|
return money;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMoney(String money) {
|
||||||
|
this.money = money;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLineNum() {
|
||||||
|
return lineNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLineNum(String lineNum) {
|
||||||
|
this.lineNum = lineNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppCode() {
|
||||||
|
return suppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppCode(String suppCode) {
|
||||||
|
this.suppCode = suppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppName() {
|
||||||
|
return suppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppName(String suppName) {
|
||||||
|
this.suppName = suppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppSiteCode() {
|
||||||
|
return suppSiteCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppSiteCode(String suppSiteCode) {
|
||||||
|
this.suppSiteCode = suppSiteCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppSiteName() {
|
||||||
|
return suppSiteName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppSiteName(String suppSiteName) {
|
||||||
|
this.suppSiteName = suppSiteName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getDeptCode() {
|
||||||
|
return deptCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptCode(String deptCode) {
|
||||||
|
this.deptCode = deptCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactorCode() {
|
||||||
|
return transactorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactorCode(String transactorCode) {
|
||||||
|
this.transactorCode = transactorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProjectCode() {
|
||||||
|
return projectCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectCode(String projectCode) {
|
||||||
|
this.projectCode = projectCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIncExpItemCode() {
|
||||||
|
return incExpItemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIncExpItemCode(String incExpItemCode) {
|
||||||
|
this.incExpItemCode = incExpItemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemMasterCode() {
|
||||||
|
return itemMasterCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemMasterCode(String itemMasterCode) {
|
||||||
|
this.itemMasterCode = itemMasterCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustCode() {
|
||||||
|
return custCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustCode(String custCode) {
|
||||||
|
this.custCode = custCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustName() {
|
||||||
|
return custName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustName(String custName) {
|
||||||
|
this.custName = custName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustSiteCode() {
|
||||||
|
return custSiteCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustSiteCode(String custSiteCode) {
|
||||||
|
this.custSiteCode = custSiteCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustSiteName() {
|
||||||
|
return custSiteName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustSiteName(String custSiteName) {
|
||||||
|
this.custSiteName = custSiteName;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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.plugin.dgx.oa.dao.impl.PaymentDetailsUseLinesDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-PaymentOrderDetailsUseLinesEntity-result" type="com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailsUseLinesEntity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payProperty" column="payProperty" jdbcType="VARCHAR"/>
|
||||||
|
<result property="money" column="money" jdbcType="VARCHAR"/>
|
||||||
|
<result property="lineNum" column="lineNum" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppCode" column="suppCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppName" column="suppName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppSiteCode" column="suppSiteCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppSiteName" column="suppSiteName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="custCode" column="custCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="custName" column="custName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="custSiteCode" column="custSiteCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="custSiteName" column="custSiteName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="deptCode" column="deptCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="projectCode" column="projectCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="transactorCode" column="transactorCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="incExpItemCode" column="incExpItemCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="itemMasterCode" column="itemMasterCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="maturity" column="Maturity" jdbcType="VARCHAR"/>
|
||||||
|
<result property="formmainId" column="formmainId" 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"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "PaymentOrderDetailsUseLinesEntity_Base_Column_List">
|
||||||
|
id ,
|
||||||
|
formmain_id as formmainId,
|
||||||
|
field0058 as payProperty , -- 用途
|
||||||
|
field0052 as money, -- 金额
|
||||||
|
field0047 as lineNum, -- 行号
|
||||||
|
field0048 as suppCode, -- 代付供应商
|
||||||
|
field0085 as SuppName, -- 代付供应商名称
|
||||||
|
field0086 as SuppSiteCode, -- 代付供应商位置
|
||||||
|
field0087 as SuppSiteName, -- 代付供应商位置名称
|
||||||
|
field0088 as CustCode, -- 代付客户
|
||||||
|
field0089 as CustName, -- 代付客户名称
|
||||||
|
field0090 as CustSiteCode, -- 代付客户位置
|
||||||
|
field0091 as CustSiteName, -- 代付客户位置名称
|
||||||
|
field0099 as deptCode, -- 部门
|
||||||
|
field0098 as transactorCode, -- 业务员
|
||||||
|
field0097 as projectCode,-- 项目
|
||||||
|
field0072 as incExpItemCode, -- 收支项目
|
||||||
|
field0064 as Maturity, -- 到期日
|
||||||
|
field0070 as itemMasterCode -- 料号
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-PaymentOrderDetailsUseLinesEntity-result" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailsUseLinesEntity">
|
||||||
|
select
|
||||||
|
<include refid="PaymentOrderDetailsUseLinesEntity_Base_Column_List" />
|
||||||
|
from formson_0655
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||||
|
<if test="payProperty != null and payProperty != ''"> and id = #{payProperty} </if>
|
||||||
|
<if test="money != null and money != ''"> and field0052 = #{money} </if>
|
||||||
|
<if test="lineNum != null and lineNum != ''"> and field0047 = #{lineNum} </if>
|
||||||
|
<if test="suppCode != null and suppCode != ''"> and field0048 = #{suppCode} </if>
|
||||||
|
<if test="deptCode != null and deptCode != ''"> and field0099 = #{deptCode} </if>
|
||||||
|
<if test="transactorCode != null and transactorCode != ''"> and field0098 = #{transactorCode} </if>
|
||||||
|
<if test="projectCode != null and projectCode != ''"> and field0097 = #{projectCode} </if>
|
||||||
|
<if test="incExpItemCode != null and incExpItemCode != ''"> and field0072 = #{incExpItemCode} </if>
|
||||||
|
<if test="itemMasterCode != null and itemMasterCode != ''"> and field0069 = #{itemMasterCode} </if>
|
||||||
|
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailsUseLinesEntity" >
|
||||||
|
update formson_0655 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||||
|
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||||
|
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||||
|
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||||
|
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!--将U9C销售订单号传递到OA上-->
|
||||||
|
<update id="PaymentOrderDetailsUseLinesEntity_update_DocNo" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailsUseLinesEntity" >
|
||||||
|
update formson_0655 set xxx={docNo} where id= #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,199 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 付款单
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-23 16:42
|
||||||
|
* **/
|
||||||
|
public class PaymentOrderEntity extends BaseEntity {
|
||||||
|
|
||||||
|
private String docNo;//单号
|
||||||
|
private String pCCode;//币种
|
||||||
|
private String payDate;//付款日期
|
||||||
|
private String documentTypeCode;//单据类型
|
||||||
|
private String suppCode;//供应商
|
||||||
|
private String suppName;//供应商名称
|
||||||
|
private String suppSiteCode;//供应商位置
|
||||||
|
private String suppSiteName;//供应商位置名称
|
||||||
|
private String custCode;//客户
|
||||||
|
private String custName;//客户名称
|
||||||
|
private String custSiteCode;//客户位置
|
||||||
|
private String custSiteName;//客户位置名称
|
||||||
|
private String payObjType;//付款对象
|
||||||
|
private String deptCode;//部门
|
||||||
|
private String projectCode;//项目
|
||||||
|
private String srcBillOrgCode;//来源组织
|
||||||
|
private String transactorCode;//业务员
|
||||||
|
private String note;//备注
|
||||||
|
|
||||||
|
private String pushStatus;//推送状态
|
||||||
|
|
||||||
|
private String privateDescSeg1;//私有段 单号
|
||||||
|
|
||||||
|
public String getPrivateDescSeg1() {
|
||||||
|
return privateDescSeg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrivateDescSeg1(String privateDescSeg1) {
|
||||||
|
this.privateDescSeg1 = privateDescSeg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPushStatus() {
|
||||||
|
return pushStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPushStatus(String pushStatus) {
|
||||||
|
this.pushStatus = pushStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocNo() {
|
||||||
|
return docNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocNo(String docNo) {
|
||||||
|
this.docNo = docNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getpCCode() {
|
||||||
|
return pCCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setpCCode(String pCCode) {
|
||||||
|
this.pCCode = pCCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayDate() {
|
||||||
|
return payDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayDate(String payDate) {
|
||||||
|
this.payDate = payDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentTypeCode() {
|
||||||
|
return documentTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentTypeCode(String documentTypeCode) {
|
||||||
|
this.documentTypeCode = documentTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppCode() {
|
||||||
|
return suppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppCode(String suppCode) {
|
||||||
|
this.suppCode = suppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppName() {
|
||||||
|
return suppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppName(String suppName) {
|
||||||
|
this.suppName = suppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppSiteCode() {
|
||||||
|
return suppSiteCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppSiteCode(String suppSiteCode) {
|
||||||
|
this.suppSiteCode = suppSiteCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppSiteName() {
|
||||||
|
return suppSiteName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppSiteName(String suppSiteName) {
|
||||||
|
this.suppSiteName = suppSiteName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustCode() {
|
||||||
|
return custCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustCode(String custCode) {
|
||||||
|
this.custCode = custCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustName() {
|
||||||
|
return custName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustName(String custName) {
|
||||||
|
this.custName = custName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustSiteCode() {
|
||||||
|
return custSiteCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustSiteCode(String custSiteCode) {
|
||||||
|
this.custSiteCode = custSiteCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustSiteName() {
|
||||||
|
return custSiteName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustSiteName(String custSiteName) {
|
||||||
|
this.custSiteName = custSiteName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayObjType() {
|
||||||
|
return payObjType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayObjType(String payObjType) {
|
||||||
|
this.payObjType = payObjType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptCode() {
|
||||||
|
return deptCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptCode(String deptCode) {
|
||||||
|
this.deptCode = deptCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProjectCode() {
|
||||||
|
return projectCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectCode(String projectCode) {
|
||||||
|
this.projectCode = projectCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSrcBillOrgCode() {
|
||||||
|
return srcBillOrgCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSrcBillOrgCode(String srcBillOrgCode) {
|
||||||
|
this.srcBillOrgCode = srcBillOrgCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactorCode() {
|
||||||
|
return transactorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactorCode(String transactorCode) {
|
||||||
|
this.transactorCode = transactorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNote() {
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNote(String note) {
|
||||||
|
this.note = note;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,124 @@
|
||||||
|
<?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.dgx.oa.dao.impl.PaymentOrderDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-PaymentOrderEntity-result" type="com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderEntity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="docNo" column="docNo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pCCode" column="pCCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payDate" column="payDate" jdbcType="VARCHAR"/>
|
||||||
|
<result property="documentTypeCode" column="documentTypeCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppCode" column="suppCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppName" column="suppName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppSiteCode" column="suppSiteCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppSiteName" column="suppSiteName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="custCode" column="custCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="custName" column="custName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="custSiteCode" column="custSiteCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="custSiteName" column="custSiteName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payObjType" column="payObjType" jdbcType="VARCHAR"/>
|
||||||
|
<result property="deptCode" column="deptCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="projectCode" column="projectCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="srcBillOrgCode" column="srcBillOrgCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="transactorCode" column="transactorCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="note" column="note" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pushStatus" column="pushStatus" jdbcType="VARCHAR"/>
|
||||||
|
<result property="privateDescSeg1" column="privateDescSeg1" 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"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "PaymentOrderEntity_Base_Column_List">
|
||||||
|
main.id as id,
|
||||||
|
main.field0021 as privateDescSeg1,-- 单号
|
||||||
|
main.field0102 as pCCode, -- 币种
|
||||||
|
main.field0025 as payDate, -- 付款日期
|
||||||
|
main.field0104 as documentTypeCode, -- 单据类型
|
||||||
|
main.field0030 as suppCode, -- 供应商
|
||||||
|
main.field0078 as SuppName, -- 供应商名称
|
||||||
|
main.field0019 as suppSiteCode,-- 供应商位置
|
||||||
|
main.field0079 as SuppSiteName , -- 供应商位置名称
|
||||||
|
main.field0080 as CustCode, -- 客户
|
||||||
|
main.field0081 as CustName, -- 客户名称
|
||||||
|
main.field0082 as CustSiteCode ,-- 客户位置
|
||||||
|
main.field0083 as CustSiteName,-- 客户位置名称
|
||||||
|
main.field0084 as Note,-- 备注
|
||||||
|
main.field0092 as pushStatus,-- 推送标识
|
||||||
|
main.field0027 as payObjType,-- 付款对象
|
||||||
|
main.field0101 as deptCode, -- 部门
|
||||||
|
main.field0095 as projectCode, -- 项目
|
||||||
|
main.field0103 as srcBillOrgCode, -- 来源组织
|
||||||
|
main.field0100 as transactorCode -- 业务员
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-PaymentOrderEntity-result" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderEntity">
|
||||||
|
select
|
||||||
|
<include refid="PaymentOrderEntity_Base_Column_List" />
|
||||||
|
from formmain_0653 main
|
||||||
|
left join col_summary summary on main.id = summary.form_recordid
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="privateDescSeg1 != null and privateDescSeg1 != ''"> and field0021 = #{privateDescSeg1} </if>
|
||||||
|
<if test="pCCode != null and pCCode != ''"> and field0102 = #{pCCode} </if>
|
||||||
|
<if test="payDate != null and payDate != ''"> and field0025 = #{payDate} </if>
|
||||||
|
<if test="documentTypeCode != null and documentTypeCode != ''"> and field0104 = #{documentTypeCode} </if>
|
||||||
|
<if test="suppCode != null and suppCode != ''"> and field0030 = #{suppCode} </if>
|
||||||
|
<if test="suppSiteCode != null and suppSiteCode != ''"> and field0019 = #{suppSiteCode} </if>
|
||||||
|
<if test="payObjType != null and payObjType != ''"> and field0027 = #{payObjType} </if>
|
||||||
|
<if test="deptCode != null and deptCode != ''"> and field0101 = #{deptCode} </if>
|
||||||
|
<if test="projectCode != null and projectCode != ''"> and field0095 = #{projectCode} </if>
|
||||||
|
<if test="srcBillOrgCode != null and srcBillOrgCode != ''"> and field0103 = #{srcBillOrgCode} </if>
|
||||||
|
<if test="transactorCode != null and transactorCode != ''"> and field0100 = #{transactorCode} </if>
|
||||||
|
and main.field0092 is null and summary.state ='3' -- and summary.state in ('1','2','3')
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="queryPaymentOrderRetry" resultMap="get-PaymentOrderEntity-result" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderEntity">
|
||||||
|
select
|
||||||
|
<include refid="PaymentOrderEntity_Base_Column_List" />
|
||||||
|
from formmain_0653 main
|
||||||
|
left join col_summary summary on main.id = summary.form_recordid
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="privateDescSeg1 != null and privateDescSeg1 != ''"> and field0021 = #{privateDescSeg1} </if>
|
||||||
|
<if test="pCCode != null and pCCode != ''"> and field0102 = #{pCCode} </if>
|
||||||
|
<if test="payDate != null and payDate != ''"> and field0025 = #{payDate} </if>
|
||||||
|
<if test="documentTypeCode != null and documentTypeCode != ''"> and field0104 = #{documentTypeCode} </if>
|
||||||
|
<if test="suppCode != null and suppCode != ''"> and field0030 = #{suppCode} </if>
|
||||||
|
<if test="suppSiteCode != null and suppSiteCode != ''"> and field0019 = #{suppSiteCode} </if>
|
||||||
|
<if test="payObjType != null and payObjType != ''"> and field0027 = #{payObjType} </if>
|
||||||
|
<if test="deptCode != null and deptCode != ''"> and field0101 = #{deptCode} </if>
|
||||||
|
<if test="projectCode != null and projectCode != ''"> and field0095 = #{projectCode} </if>
|
||||||
|
<if test="srcBillOrgCode != null and srcBillOrgCode != ''"> and field0103 = #{srcBillOrgCode} </if>
|
||||||
|
<if test="transactorCode != null and transactorCode != ''"> and field0100 = #{transactorCode} </if>
|
||||||
|
and summary.state ='3'
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderEntity" >
|
||||||
|
update formmain_0653 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||||
|
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||||
|
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||||
|
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||||
|
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!--更新付款单推送标识-->
|
||||||
|
<update id="PaymentOrderEntity_update_status" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderEntity" >
|
||||||
|
update formmain_0653 set field0092=#{pushStatus} where id= #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,178 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 销售订单明细
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-11-13 16:23
|
||||||
|
* **/
|
||||||
|
public class SalesOrderDetailsEntity extends BaseEntity {
|
||||||
|
private String docLineNo;//行号
|
||||||
|
private String itemCode;//料号
|
||||||
|
private String freeType;//免费品类型
|
||||||
|
private String orderByQtyTU;//数量
|
||||||
|
private String tU;//销售单位编码
|
||||||
|
private String finallyPriceTC;//最终价
|
||||||
|
private String taxSchedule;//税组合
|
||||||
|
private String shipTogetherFlag;//成套发货标志
|
||||||
|
private String memo;//备注
|
||||||
|
private String privateDescSeg1;//是否处理
|
||||||
|
private String privateDescSeg2;//项目明细
|
||||||
|
private String privateDescSeg5;//厂区明细id
|
||||||
|
private String pubDescSeg1;//合同号明细
|
||||||
|
private String docSubLineNo;//行号
|
||||||
|
private String requireDate;//交期
|
||||||
|
private String demandType;//需求分类
|
||||||
|
|
||||||
|
private String recTermCode;//收款条件
|
||||||
|
|
||||||
|
private String formmainId; // 主表id
|
||||||
|
|
||||||
|
public String getRecTermCode() {
|
||||||
|
return recTermCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecTermCode(String recTermCode) {
|
||||||
|
this.recTermCode = recTermCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocLineNo() {
|
||||||
|
return docLineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocLineNo(String docLineNo) {
|
||||||
|
this.docLineNo = docLineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemCode() {
|
||||||
|
return itemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemCode(String itemCode) {
|
||||||
|
this.itemCode = itemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFreeType() {
|
||||||
|
return freeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFreeType(String freeType) {
|
||||||
|
this.freeType = freeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderByQtyTU() {
|
||||||
|
return orderByQtyTU;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderByQtyTU(String orderByQtyTU) {
|
||||||
|
this.orderByQtyTU = orderByQtyTU;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String gettU() {
|
||||||
|
return tU;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void settU(String tU) {
|
||||||
|
this.tU = tU;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFinallyPriceTC() {
|
||||||
|
return finallyPriceTC;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFinallyPriceTC(String finallyPriceTC) {
|
||||||
|
this.finallyPriceTC = finallyPriceTC;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaxSchedule() {
|
||||||
|
return taxSchedule;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaxSchedule(String taxSchedule) {
|
||||||
|
this.taxSchedule = taxSchedule;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShipTogetherFlag() {
|
||||||
|
return shipTogetherFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShipTogetherFlag(String shipTogetherFlag) {
|
||||||
|
this.shipTogetherFlag = shipTogetherFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMemo() {
|
||||||
|
return memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemo(String memo) {
|
||||||
|
this.memo = memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getPrivateDescSeg1() {
|
||||||
|
return privateDescSeg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrivateDescSeg1(String privateDescSeg1) {
|
||||||
|
this.privateDescSeg1 = privateDescSeg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrivateDescSeg2() {
|
||||||
|
return privateDescSeg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrivateDescSeg2(String privateDescSeg2) {
|
||||||
|
this.privateDescSeg2 = privateDescSeg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrivateDescSeg5() {
|
||||||
|
return privateDescSeg5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrivateDescSeg5(String privateDescSeg5) {
|
||||||
|
this.privateDescSeg5 = privateDescSeg5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPubDescSeg1() {
|
||||||
|
return pubDescSeg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPubDescSeg1(String pubDescSeg1) {
|
||||||
|
this.pubDescSeg1 = pubDescSeg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocSubLineNo() {
|
||||||
|
return docSubLineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocSubLineNo(String docSubLineNo) {
|
||||||
|
this.docSubLineNo = docSubLineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRequireDate() {
|
||||||
|
return requireDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequireDate(String requireDate) {
|
||||||
|
this.requireDate = requireDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDemandType() {
|
||||||
|
return demandType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDemandType(String demandType) {
|
||||||
|
this.demandType = demandType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFormmainId() {
|
||||||
|
return formmainId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormmainId(String formmainId) {
|
||||||
|
this.formmainId = formmainId;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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.plugin.dgx.oa.dao.impl.SalesOrderDetailsDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-SalesOrderDetailsEntity-result" type="com.hzya.frame.plugin.dgx.oa.entity.SalesOrderDetailsEntity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="docLineNo" column="docLineNo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="itemCode" column="itemCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="freeType" column="freeType" jdbcType="VARCHAR"/>
|
||||||
|
<result property="orderByQtyTU" column="orderByQtyTU" jdbcType="VARCHAR"/>
|
||||||
|
<result property="tU" column="tU" jdbcType="VARCHAR"/>
|
||||||
|
<result property="finallyPriceTC" column="finallyPriceTC" jdbcType="VARCHAR"/>
|
||||||
|
<result property="taxSchedule" column="taxSchedule" jdbcType="VARCHAR"/>
|
||||||
|
<result property="shipTogetherFlag" column="shipTogetherFlag" jdbcType="VARCHAR"/>
|
||||||
|
<result property="memo" column="memo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="privateDescSeg1" column="privateDescSeg1" jdbcType="VARCHAR"/>
|
||||||
|
<result property="privateDescSeg1" column="privateDescSeg1" jdbcType="VARCHAR"/>
|
||||||
|
<result property="privateDescSeg5" column="privateDescSeg5" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pubDescSeg1" column="pubDescSeg1" jdbcType="VARCHAR"/>
|
||||||
|
<result property="docSubLineNo" column="docSubLineNo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="requireDate" column="requireDate" jdbcType="VARCHAR"/>
|
||||||
|
<result property="demandType" column="demandType" jdbcType="VARCHAR"/>
|
||||||
|
<result property="formmainId" column="formmainId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="recTermCode" column="recTermCode" 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"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "SalesOrderDetailsEntity_Base_Column_List">
|
||||||
|
id as id,
|
||||||
|
formmain_id as formmainId,
|
||||||
|
field0021 as docLineNo,-- 行号
|
||||||
|
field0028 as itemCode, -- 料号
|
||||||
|
field0034 as freeType, -- 免费品类型
|
||||||
|
field0031 as orderByQtyTU, -- 数量
|
||||||
|
field0032 as tU, -- 销售单位编码
|
||||||
|
field0036 as finallyPriceTC,-- 最终价
|
||||||
|
field0067 as taxSchedule,-- 税组合编码
|
||||||
|
field0042 as memo, -- 备注
|
||||||
|
field0022 as privateDescSeg1, -- 是否处理
|
||||||
|
field0065 as privateDescSeg2, -- 项目明细编码
|
||||||
|
field0070 as privateDescSeg5, -- 厂区明细编码
|
||||||
|
field0023 as pubDescSeg1, -- 合同号明细
|
||||||
|
field0033 as requireDate, -- 交期
|
||||||
|
field0078 as recTermCode, -- 收款条件
|
||||||
|
field0076 as demandType -- 需求分类枚举值
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-SalesOrderDetailsEntity-result" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.SalesOrderDetailsEntity">
|
||||||
|
select
|
||||||
|
<include refid="SalesOrderDetailsEntity_Base_Column_List" />
|
||||||
|
from formson_0668
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||||
|
<if test="docLineNo != null and docLineNo != ''"> and field0021 = #{docLineNo} </if>
|
||||||
|
<if test="itemCode != null and itemCode != ''"> and field0028 = #{itemCode} </if>
|
||||||
|
<if test="freeType != null and freeType != ''"> and field0034 = #{freeType} </if>
|
||||||
|
<if test="orderByQtyTU != null and orderByQtyTU != ''"> and field0031 = #{orderByQtyTU} </if>
|
||||||
|
<if test="tU != null and tU != ''"> and field0032 = #{tU} </if>
|
||||||
|
<if test="finallyPriceTC != null and finallyPriceTC != ''"> and field0036 = #{finallyPriceTC} </if>
|
||||||
|
<if test="taxSchedule != null and taxSchedule != ''"> and field0041 = #{taxSchedule} </if>
|
||||||
|
<if test="memo != null and memo != ''"> and field0042 = #{memo} </if>
|
||||||
|
<if test="privateDescSeg1 != null and privateDescSeg1 != ''"> and field0022 = #{privateDescSeg1} </if>
|
||||||
|
<if test="privateDescSeg2 != null and privateDescSeg2 != ''"> and field0026 = #{privateDescSeg2} </if>
|
||||||
|
<if test="privateDescSeg5 != null and privateDescSeg5 != ''"> and field0025 = #{privateDescSeg5} </if>
|
||||||
|
<if test="pubDescSeg1 != null and pubDescSeg1 != ''"> and field0023 = #{pubDescSeg1} </if>
|
||||||
|
<if test="requireDate != null and requireDate != ''"> and field0033 = #{requireDate} </if>
|
||||||
|
<if test="demandType != null and demandType != ''"> and field0027 = #{demandType} </if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.SalesOrderDetailsEntity" >
|
||||||
|
update formson_0668 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||||
|
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||||
|
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||||
|
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||||
|
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!--将U9C销售订单号传递到OA上-->
|
||||||
|
<update id="SalesOrderDetailsEntity_update_DocNo" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.SalesOrderDetailsEntity" >
|
||||||
|
update formson_0668 set xxx={docNo} where id= #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,155 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.entity;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 销售订单
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-06 11:52
|
||||||
|
* **/
|
||||||
|
public class SalesOrderEntity extends BaseEntity {
|
||||||
|
|
||||||
|
private String documentType;//单据类型
|
||||||
|
private String docNo;//单号
|
||||||
|
private String orderBy;//客户
|
||||||
|
private String businessDate;//日期
|
||||||
|
private String saleDepartment;//部门
|
||||||
|
private String seller;//业务员
|
||||||
|
private String isPriceIncludeTax;//价格是否含税
|
||||||
|
private String memo;//备注
|
||||||
|
private String confirmTermCode;//立账条件
|
||||||
|
private String pubDescSeg1;//合同号
|
||||||
|
private String pubDescSeg5;//厂区
|
||||||
|
private String pubDescSeg6;//贸易方式
|
||||||
|
|
||||||
|
private String recTermCode;//收款条件
|
||||||
|
|
||||||
|
private String pushStatus;//推送状态
|
||||||
|
private String project;//项目编码
|
||||||
|
|
||||||
|
public String getProject() {
|
||||||
|
return project;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProject(String project) {
|
||||||
|
this.project = project;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecTermCode() {
|
||||||
|
return recTermCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecTermCode(String recTermCode) {
|
||||||
|
this.recTermCode = recTermCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPushStatus() {
|
||||||
|
return pushStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPushStatus(String pushStatus) {
|
||||||
|
this.pushStatus = pushStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentType() {
|
||||||
|
return documentType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentType(String documentType) {
|
||||||
|
this.documentType = documentType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocNo() {
|
||||||
|
return docNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocNo(String docNo) {
|
||||||
|
this.docNo = docNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderBy() {
|
||||||
|
return orderBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderBy(String orderBy) {
|
||||||
|
this.orderBy = orderBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBusinessDate() {
|
||||||
|
return businessDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBusinessDate(String businessDate) {
|
||||||
|
this.businessDate = businessDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSaleDepartment() {
|
||||||
|
return saleDepartment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSaleDepartment(String saleDepartment) {
|
||||||
|
this.saleDepartment = saleDepartment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSeller() {
|
||||||
|
return seller;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSeller(String seller) {
|
||||||
|
this.seller = seller;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsPriceIncludeTax() {
|
||||||
|
return isPriceIncludeTax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsPriceIncludeTax(String isPriceIncludeTax) {
|
||||||
|
this.isPriceIncludeTax = isPriceIncludeTax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMemo() {
|
||||||
|
return memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemo(String memo) {
|
||||||
|
this.memo = memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfirmTermCode() {
|
||||||
|
return confirmTermCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfirmTermCode(String confirmTermCode) {
|
||||||
|
this.confirmTermCode = confirmTermCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPubDescSeg1() {
|
||||||
|
return pubDescSeg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPubDescSeg1(String pubDescSeg1) {
|
||||||
|
this.pubDescSeg1 = pubDescSeg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPubDescSeg5() {
|
||||||
|
return pubDescSeg5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPubDescSeg5(String pubDescSeg5) {
|
||||||
|
this.pubDescSeg5 = pubDescSeg5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPubDescSeg6() {
|
||||||
|
return pubDescSeg6;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPubDescSeg6(String pubDescSeg6) {
|
||||||
|
this.pubDescSeg6 = pubDescSeg6;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
<?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.dgx.oa.dao.impl.SalesOrderDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-SalesOrderEntity-result" type="com.hzya.frame.plugin.dgx.oa.entity.SalesOrderEntity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="documentType" column="documentType" jdbcType="VARCHAR"/>
|
||||||
|
<result property="docNo" column="docNo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="orderBy" column="orderBy" jdbcType="VARCHAR"/>
|
||||||
|
<result property="businessDate" column="businessDate" jdbcType="VARCHAR"/>
|
||||||
|
<result property="saleDepartment" column="saleDepartment" jdbcType="VARCHAR"/>
|
||||||
|
<result property="seller" column="seller" jdbcType="VARCHAR"/>
|
||||||
|
<result property="isPriceIncludeTax" column="isPriceIncludeTax" jdbcType="VARCHAR"/>
|
||||||
|
<result property="memo" column="memo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="recTermCode" column="recTermCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="confirmTermCode" column="confirmTermCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pubDescSeg1" column="pubDescSeg1" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pubDescSeg5" column="pubDescSeg5" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pubDescSeg6" column="pubDescSeg6" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pushStatus" column="pushStatus" jdbcType="VARCHAR"/>
|
||||||
|
<result property="project" column="project" 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"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "SalesOrderEntity_Base_Column_List">
|
||||||
|
main.id,
|
||||||
|
main.field0071 as documentType, -- 单据类型
|
||||||
|
main.field0005 as docNo, -- 单号
|
||||||
|
main.field0064 as orderBy,-- 客户编码
|
||||||
|
main.field0017 as businessDate,-- 日期
|
||||||
|
main.field0057 as saleDepartment,-- 部门编码
|
||||||
|
main.field0059 as seller,-- 业务员编码
|
||||||
|
main.field0020 as memo,-- 备注
|
||||||
|
main.field0061 as confirmTermCode,-- 立账条件编码
|
||||||
|
main.field0077 as recTermCode, -- 收款条件
|
||||||
|
main.field0003 as pubDescSeg1,-- 合同号
|
||||||
|
main.field0069 as pubDescSeg5,-- 厂区编码
|
||||||
|
main.field0068 as pubDescSeg6,-- 贸易方式
|
||||||
|
main.field0062 as project,-- 项目编码
|
||||||
|
main.field0054 as pushStatus -- 推送状态
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-SalesOrderEntity-result" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.SalesOrderEntity">
|
||||||
|
select
|
||||||
|
<include refid="SalesOrderEntity_Base_Column_List" />
|
||||||
|
from formmain_0667 main
|
||||||
|
left join col_summary summary on main.id = summary.form_recordid
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and main.id = #{id} </if>
|
||||||
|
<if test="docNo != null and docNo != ''"> and main.field0005 = #{docNo} </if>
|
||||||
|
<if test="documentType != null and documentType != ''"> and main.field0001 = #{documentType} </if>
|
||||||
|
<if test="orderBy != null and orderBy != ''"> and main.field0064 = #{orderBy} </if>
|
||||||
|
<if test="businessDate != null and businessDate != ''"> and main.field0017 = #{businessDate} </if>
|
||||||
|
<if test="saleDepartment != null and saleDepartment != ''"> and main.field0057 = #{saleDepartment} </if>
|
||||||
|
<if test="seller != null and seller != ''"> and main.field0059 = #{seller} </if>
|
||||||
|
<if test="memo != null and memo != ''"> and main.field0020 = #{memo} </if>
|
||||||
|
<if test="confirmTermCode != null and confirmTermCode != ''"> and main.field0061 = #{confirmTermCode} </if>
|
||||||
|
<if test="pubDescSeg1 != null and pubDescSeg1 != ''"> and main.field0003 = #{pubDescSeg1} </if>
|
||||||
|
<if test="pubDescSeg5 != null and pubDescSeg5 != ''"> and main.field0069 = #{pubDescSeg5} </if>
|
||||||
|
<if test="pubDescSeg6 != null and pubDescSeg6 != ''"> and main.field0068 = #{pubDescSeg6} </if>
|
||||||
|
and main.field0054 is null and summary.state ='3' -- and summary.state in ('1','2','3')
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="querySalesOrderRetry" resultMap="get-SalesOrderEntity-result" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.SalesOrderEntity">
|
||||||
|
select
|
||||||
|
<include refid="SalesOrderEntity_Base_Column_List" />
|
||||||
|
from formmain_0667 main
|
||||||
|
left join col_summary summary on main.id = summary.form_recordid
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and main.id = #{id} </if>
|
||||||
|
<if test="docNo != null and docNo != ''"> and main.field0005 = #{docNo} </if>
|
||||||
|
<if test="documentType != null and documentType != ''"> and main.field0001 = #{documentType} </if>
|
||||||
|
<if test="orderBy != null and orderBy != ''"> and main.field0064 = #{orderBy} </if>
|
||||||
|
<if test="businessDate != null and businessDate != ''"> and main.field0017 = #{businessDate} </if>
|
||||||
|
<if test="saleDepartment != null and saleDepartment != ''"> and main.field0057 = #{saleDepartment} </if>
|
||||||
|
<if test="seller != null and seller != ''"> and main.field0059 = #{seller} </if>
|
||||||
|
<if test="memo != null and memo != ''"> and main.field0020 = #{memo} </if>
|
||||||
|
<if test="confirmTermCode != null and confirmTermCode != ''"> and main.field0061 = #{confirmTermCode} </if>
|
||||||
|
<if test="pubDescSeg1 != null and pubDescSeg1 != ''"> and main.field0003 = #{pubDescSeg1} </if>
|
||||||
|
<if test="pubDescSeg5 != null and pubDescSeg5 != ''"> and main.field0069 = #{pubDescSeg5} </if>
|
||||||
|
<if test="pubDescSeg6 != null and pubDescSeg6 != ''"> and main.field0068 = #{pubDescSeg6} </if>
|
||||||
|
and summary.state ='3'
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.SalesOrderEntity" >
|
||||||
|
update formmain_0667 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||||
|
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||||
|
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||||
|
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||||
|
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!--修改销售订单推送状态-->
|
||||||
|
<update id="SalesOrderEntity_update_status" parameterType = "com.hzya.frame.plugin.dgx.oa.entity.SalesOrderEntity" >
|
||||||
|
update formmain_0667 set field0054=#{pushStatus} where id= #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 流程事件枚举类型
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-23 18:01
|
||||||
|
* **/
|
||||||
|
public enum ColEventTypeEnum {
|
||||||
|
ONBEFORESTART("onBeforeStart","流程发起前"),
|
||||||
|
ONSTART("onStart","流程发起"),
|
||||||
|
ONBEFORESTOP("onBeforeStop","终止前事件"),
|
||||||
|
ONSTOP("onStop","终止事件"),
|
||||||
|
ONBEFORECANCEL("onBeforeCancel","撤销前事件"),
|
||||||
|
ONCANCEL("onCancel","撤销事件"),
|
||||||
|
ONPROCESSFINISHED("onProcessFinished","结束事件"),
|
||||||
|
ONBEFOREFINISHWORKITEM("onBeforeFinishWorkitem","处理前事件"),
|
||||||
|
ONFINISHWORKITEM("onFinishWorkitem","处理事件"),
|
||||||
|
ONBEFORESTEPBACK("onBeforeStepBack","回退前事件"),
|
||||||
|
ONSTEPBACK("onStepBack","回退事件"),
|
||||||
|
ONBEFORETAKEBACK("onBeforeTakeBack","取回前事件"),
|
||||||
|
ONTAKEBACK("onTakeBack","取回事件"),
|
||||||
|
;
|
||||||
|
private String type;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
ColEventTypeEnum(String type, String name) {
|
||||||
|
this.type = type;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,94 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.plugin;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.service.impl.PaymentOrderServiceImpl;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.service.impl.SalesOrderServiceImpl;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.impl.IntegrationTaskLivingDetailsServiceImpl;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content OA付款单推送德广信U9C
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-11-14 9:55
|
||||||
|
* **/
|
||||||
|
public class PaymentOrderPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaymentOrderServiceImpl paymentOrderServiceImpl;
|
||||||
|
@Autowired
|
||||||
|
private IntegrationTaskLivingDetailsServiceImpl taskLivingDetailsService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "PaymentOrderPluginInitializer";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "OA付款单推送德广信U9C插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "OA付款单推送德广信U9C插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
try {
|
||||||
|
if(null !=requestJson){
|
||||||
|
//如果不为空,说明是重试
|
||||||
|
String taskDetailsId = requestJson.getString("integration_task_living_details_id");
|
||||||
|
logger.info("======德广信付款单重试得integration_task_living_details_id为:{}=====",taskDetailsId);
|
||||||
|
if(StrUtil.isNotEmpty(taskDetailsId)){
|
||||||
|
logger.info("=========开始在plugin中执行付款单重试推送U9C=====");
|
||||||
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = taskLivingDetailsService.get(taskDetailsId);
|
||||||
|
if(null != integrationTaskLivingDetailsEntity && StrUtil.isNotEmpty(integrationTaskLivingDetailsEntity.getRootAppPk())){
|
||||||
|
logger.info("=======德广信付款单重试查询出得json为:{}=====", integrationTaskLivingDetailsEntity.getRootAppPk());
|
||||||
|
requestJson.put("id",integrationTaskLivingDetailsEntity.getRootAppPk());
|
||||||
|
requestJson.put("details_id",integrationTaskLivingDetailsEntity.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logger.info("=========开始在plugin中执行付款单推送U9C=====");
|
||||||
|
JsonResultEntity jsonResultEntity = paymentOrderServiceImpl.queryPaymentOrderToU9C(requestJson);
|
||||||
|
if(jsonResultEntity.getStatus().equals("200")){
|
||||||
|
return BaseResult.getSuccessMessageEntity(getPluginName()+"执行成功");
|
||||||
|
}else{
|
||||||
|
return BaseResult.getFailureMessageEntity(getPluginName()+"执行失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("=====plugin中执行付款单推送U9C失败:{}",e.getMessage());
|
||||||
|
return BaseResult.getFailureMessageEntity(getPluginName()+"执行失败");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,94 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.plugin;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.service.impl.SalesOrderServiceImpl;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.impl.IntegrationTaskLivingDetailsServiceImpl;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content OA销售订单推送U9C
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-11-14 9:40
|
||||||
|
* **/
|
||||||
|
public class SalesOrderPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SalesOrderServiceImpl salesOrderServiceimple;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IntegrationTaskLivingDetailsServiceImpl taskLivingDetailsService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "SalesOrderPluginInitializer";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "OA销售订单推送德广信U9C插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "OA销售订单推送德广信U9C插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
try {
|
||||||
|
if(null !=requestJson){
|
||||||
|
//如果不为空,说明是重试
|
||||||
|
String taskDetailsId = requestJson.getString("integration_task_living_details_id");
|
||||||
|
logger.info("======德广信销售订单重试得integration_task_living_details_id为:{}=====",taskDetailsId);
|
||||||
|
if(StrUtil.isNotEmpty(taskDetailsId)){
|
||||||
|
logger.info("=========开始在plugin中执行销售订单重试推送U9C=====");
|
||||||
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = taskLivingDetailsService.get(taskDetailsId);
|
||||||
|
if(null != integrationTaskLivingDetailsEntity && StrUtil.isNotEmpty(integrationTaskLivingDetailsEntity.getRootAppPk())){
|
||||||
|
logger.info("=======德广信销售订单重试查询出得源系统id为:{}=====", integrationTaskLivingDetailsEntity.getRootAppPk());
|
||||||
|
requestJson.put("id",integrationTaskLivingDetailsEntity.getRootAppPk());
|
||||||
|
requestJson.put("details_id",integrationTaskLivingDetailsEntity.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logger.info("=========开始在plugin中执行销售订单推送U9C=====");
|
||||||
|
JsonResultEntity jsonResultEntity = salesOrderServiceimple.querySalesOrderToU9C(requestJson);
|
||||||
|
if(jsonResultEntity.getStatus().equals("200")){
|
||||||
|
return BaseResult.getSuccessMessageEntity(getPluginName()+"执行成功");
|
||||||
|
}else{
|
||||||
|
return BaseResult.getFailureMessageEntity(getPluginName()+"执行失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("=====plugin中执行销售订单推送U9C失败:{}",e.getMessage());
|
||||||
|
return BaseResult.getFailureMessageEntity(getPluginName()+"执行失败");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.seeyon.entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 保存交行日志用
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/3/18 14:07
|
||||||
|
**/
|
||||||
|
public class CfsLogEntity {
|
||||||
|
|
||||||
|
private String tab_name_ch;//中文表名
|
||||||
|
private String tab_name_en;//英文表名
|
||||||
|
private OAWorkflowEventDataEntity oaWorkflowEventDataEntity;//无流程表单数据
|
||||||
|
|
||||||
|
private String result;//交通银行返回的参数(解析后的)
|
||||||
|
public CfsLogEntity() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param tab_name_ch 中文表名
|
||||||
|
* @param tab_name_en 英文表名
|
||||||
|
* @param oaWorkflowEventDataEntity 无流程表单数据
|
||||||
|
*/
|
||||||
|
public CfsLogEntity(String tab_name_ch, String tab_name_en, OAWorkflowEventDataEntity oaWorkflowEventDataEntity, String result) {
|
||||||
|
this.tab_name_ch = tab_name_ch;
|
||||||
|
this.tab_name_en = tab_name_en;
|
||||||
|
this.oaWorkflowEventDataEntity = oaWorkflowEventDataEntity;
|
||||||
|
this.result=result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTab_name_ch() {
|
||||||
|
return tab_name_ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTab_name_ch(String tab_name_ch) {
|
||||||
|
this.tab_name_ch = tab_name_ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTab_name_en() {
|
||||||
|
return tab_name_en;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTab_name_en(String tab_name_en) {
|
||||||
|
this.tab_name_en = tab_name_en;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public OAWorkflowEventDataEntity getOaWorkflowEventDataEntity() {
|
||||||
|
return oaWorkflowEventDataEntity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOaWorkflowEventDataEntity(OAWorkflowEventDataEntity oaWorkflowEventDataEntity) {
|
||||||
|
this.oaWorkflowEventDataEntity = oaWorkflowEventDataEntity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResult() {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(String result) {
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,143 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.seeyon.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Content OA监听事件提供的表单内容
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2020-12-24 8:38
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class OAWorkflowEventDataEntity {
|
||||||
|
private String id;//业务表单id
|
||||||
|
private String eventType;//流程类型
|
||||||
|
/** 流程ID*/
|
||||||
|
private String summaryId;
|
||||||
|
/** 节点ID*/
|
||||||
|
private String affairId;
|
||||||
|
private String currentActivityId;
|
||||||
|
/** 表单表的FORM ID,用此字段标记是哪个流程*/
|
||||||
|
private String formApp;
|
||||||
|
/****/
|
||||||
|
private String formViewOperation;
|
||||||
|
private Object summaryObj;
|
||||||
|
private String deeCfgId;
|
||||||
|
private String currentNodeLast;
|
||||||
|
private Map<String, Object> businessData;
|
||||||
|
private Map<String, Object> extData;
|
||||||
|
private String businessDataStr;
|
||||||
|
|
||||||
|
private String OnProcessFinished;
|
||||||
|
public String getSummaryId() {
|
||||||
|
return summaryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSummaryId(String summaryId) {
|
||||||
|
this.summaryId = summaryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAffairId() {
|
||||||
|
return affairId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAffairId(String affairId) {
|
||||||
|
this.affairId = affairId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCurrentActivityId() {
|
||||||
|
return currentActivityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrentActivityId(String currentActivityId) {
|
||||||
|
this.currentActivityId = currentActivityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFormApp() {
|
||||||
|
return formApp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormApp(String formApp) {
|
||||||
|
this.formApp = formApp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFormViewOperation() {
|
||||||
|
return formViewOperation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormViewOperation(String formViewOperation) {
|
||||||
|
this.formViewOperation = formViewOperation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSummaryObj() {
|
||||||
|
return summaryObj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSummaryObj(Object summaryObj) {
|
||||||
|
this.summaryObj = summaryObj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeeCfgId() {
|
||||||
|
return deeCfgId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeeCfgId(String deeCfgId) {
|
||||||
|
this.deeCfgId = deeCfgId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCurrentNodeLast() {
|
||||||
|
return currentNodeLast;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrentNodeLast(String currentNodeLast) {
|
||||||
|
this.currentNodeLast = currentNodeLast;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> getBusinessData() {
|
||||||
|
return businessData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBusinessData(Map<String, Object> businessData) {
|
||||||
|
this.businessData = businessData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> getExtData() {
|
||||||
|
return extData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExtData(Map<String, Object> extData) {
|
||||||
|
this.extData = extData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBusinessDataStr() {
|
||||||
|
return businessDataStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBusinessDataStr(String businessDataStr) {
|
||||||
|
this.businessDataStr = businessDataStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOnProcessFinished() {
|
||||||
|
return OnProcessFinished;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnProcessFinished(String onProcessFinished) {
|
||||||
|
OnProcessFinished = onProcessFinished;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEventType() {
|
||||||
|
return eventType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEventType(String eventType) {
|
||||||
|
this.eventType = eventType;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.seeyon.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.seeyon.entity.CfsLogEntity;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description oa单据推送交行日志
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/3/18 13:40
|
||||||
|
**/
|
||||||
|
public interface ICfsLogService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存日志
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity importCfsLog(CfsLogEntity entity);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,93 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.seeyon.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.seeyon.entity.CfsLogEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.seeyon.service.ICfsLogService;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.service.impl.SeeYonInterFaceImpl;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description oa单据推送交行日志
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/3/18 13:40
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class CfsLogServiceImpl implements ICfsLogService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SeeYonInterFaceImpl seeYonInterFace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存日志
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity importCfsLog(CfsLogEntity entity) {
|
||||||
|
JSONArray jsonArray = new JSONArray();
|
||||||
|
JSONObject data = new JSONObject();
|
||||||
|
data.put("tab_name_ch",entity.getTab_name_ch());
|
||||||
|
data.put("tab_name_en",entity.getTab_name_en());
|
||||||
|
data.put("bill_code",entity.getOaWorkflowEventDataEntity().getBusinessDataStr());
|
||||||
|
data.put("form_app_id",entity.getOaWorkflowEventDataEntity().getFormApp());
|
||||||
|
data.put("event_type","onProcessFinished");
|
||||||
|
data.put("id",entity.getOaWorkflowEventDataEntity().getId());
|
||||||
|
data.put("title","");//流程标题,这个字段暂时取不到
|
||||||
|
data.put("result",entity.getResult());//返回的报文
|
||||||
|
if (StrUtil.isNotEmpty(entity.getResult())){
|
||||||
|
JSONObject resultObj = JSONObject.parseObject(entity.getResult());
|
||||||
|
JSONArray jsonArrayData = resultObj.getJSONArray("Data");
|
||||||
|
JSONObject jsonData = JSON.parseObject(JSON.toJSONString(jsonArrayData.get(0)));
|
||||||
|
String mErrorMsg = jsonData.getString("m_errorMsg");//返回的错误信息
|
||||||
|
String mId = jsonData.getString("m_iD");//返回的m_id
|
||||||
|
String mCode = jsonData.getString("m_code");//返回的单号
|
||||||
|
data.put("m_errorMsg",mErrorMsg);
|
||||||
|
data.put("m_iD",mId);
|
||||||
|
data.put("m_code",mCode);
|
||||||
|
}
|
||||||
|
jsonArray.add(data);
|
||||||
|
JSONObject jsonStr = new JSONObject();
|
||||||
|
jsonStr.put("type","archives");
|
||||||
|
jsonStr.put("templateCode","");
|
||||||
|
jsonStr.put("attribute",jsonArray);
|
||||||
|
//1、解析数据
|
||||||
|
//2、保存日志
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("jsonStr",jsonStr);
|
||||||
|
JsonResultEntity jsonResultEntity = seeYonInterFace.thirdInterfaceSend(jsonObject);
|
||||||
|
//调用日志模板
|
||||||
|
return jsonResultEntity;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private String getCode(CfsLogEntity entity){
|
||||||
|
if (null != entity && null != entity.getOaWorkflowEventDataEntity()){
|
||||||
|
String tableName = entity.getTab_name_en();
|
||||||
|
String jsonStr = entity.getOaWorkflowEventDataEntity().getBusinessDataStr();
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(jsonStr);
|
||||||
|
if (null != jsonObject){
|
||||||
|
String bill_code=null;
|
||||||
|
switch (tableName){
|
||||||
|
case "formmain_0673"://付款单
|
||||||
|
bill_code=jsonObject.getJSONObject("formmain_0673").getString("field0021");
|
||||||
|
break;
|
||||||
|
case "formmain_0666"://销售订单
|
||||||
|
bill_code=jsonObject.getJSONObject("formmain_0666").getString("field0005");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return bill_code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
|
public interface IPaymentOrderService extends IBaseService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 将OA付款单推送德广信U9C
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-06 15:32
|
||||||
|
* **/
|
||||||
|
JsonResultEntity queryPaymentOrderToU9C(JSONObject json);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 更新推送状态
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-18 17:01
|
||||||
|
* **/
|
||||||
|
Integer updatePaymentOrderStatus(JSONObject json);
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.SalesOrderEntity;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
|
public interface ISalesOrderService extends IBaseService<SalesOrderEntity,String> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 查询OA销售订单数据推送到U9C
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-06 14:29
|
||||||
|
* **/
|
||||||
|
JsonResultEntity querySalesOrderToU9C(JSONObject json);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 致远OA接口类
|
||||||
|
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @version 1.0
|
||||||
|
* @content
|
||||||
|
* @date 2023-08-22 9:29
|
||||||
|
*/
|
||||||
|
public interface ISeeYonInterFace {
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 发起OA表单方法
|
||||||
|
* @content:
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-22 9:31
|
||||||
|
* @param requestData 请求json
|
||||||
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
**/
|
||||||
|
JsonResultEntity thirdInterfaceSend(JSONObject requestData);
|
||||||
|
}
|
|
@ -0,0 +1,311 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.*;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.enums.ColEventTypeEnum;
|
||||||
|
import com.hzya.frame.sysnew.application.database.entity.SysApplicationDatabaseEntity;
|
||||||
|
import com.hzya.frame.sysnew.application.database.service.ISysApplicationDatabaseService;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 扩展类 解析参数并重新进行组装
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-23 17:18
|
||||||
|
* **/
|
||||||
|
@Service(value = "ParseAndAssembleService")
|
||||||
|
public class ParseAndAssembleService {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysApplicationDatabaseService sysApplicationDatabaseService;
|
||||||
|
|
||||||
|
public SysExtensionApiEntity parseAndAssemble(SysExtensionApiEntity entity){
|
||||||
|
try {
|
||||||
|
String bodys = entity.getBodys();
|
||||||
|
String dataSourceCode = "";
|
||||||
|
SysApplicationEntity receiveApp = entity.getReceiveApp();
|
||||||
|
if (null != receiveApp){
|
||||||
|
SysApplicationDatabaseEntity sysDatabaseEntity = new SysApplicationDatabaseEntity();
|
||||||
|
sysDatabaseEntity.setAppId(receiveApp.getId());
|
||||||
|
List<SysApplicationDatabaseEntity> dataBaseList = sysApplicationDatabaseService.query(sysDatabaseEntity);
|
||||||
|
if (CollectionUtils.isNotEmpty(dataBaseList)){
|
||||||
|
dataSourceCode = dataBaseList.get(0).getSourceCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Map<String, String> headers = entity.getHeaders();
|
||||||
|
String formmainTableName = headers.get("formmainTableName");
|
||||||
|
String forsonTableName = headers.get("forsonTableName");
|
||||||
|
String forsonDetailsTableName = headers.get("forsonDetailsTableName");
|
||||||
|
String djlx = headers.get("djlx");
|
||||||
|
JSONObject bodyObj = JSONObject.parseObject(bodys);
|
||||||
|
//事件类型
|
||||||
|
String eventType = bodyObj.getString("eventType");
|
||||||
|
//formApp 表单id
|
||||||
|
String formApp = bodyObj.getString("formApp");
|
||||||
|
//summaryId
|
||||||
|
String summaryId = bodyObj.getString("summaryId");
|
||||||
|
JSONObject jsonObject = bodyObj.getJSONObject("businessDataStr");
|
||||||
|
if(null!=jsonObject){
|
||||||
|
//得到主表和明细表
|
||||||
|
JSONObject formmainData = jsonObject.getJSONObject(formmainTableName);
|
||||||
|
JSONArray forsonData = jsonObject.getJSONArray(forsonTableName);
|
||||||
|
JSONArray forsonDetails = jsonObject.getJSONArray(forsonDetailsTableName);
|
||||||
|
String result="";
|
||||||
|
//如果单据是销售订单
|
||||||
|
if(DjlxEnum.SALES.type.equals(djlx)){
|
||||||
|
result= sales(eventType,formmainData,forsonData,forsonDetails);
|
||||||
|
}
|
||||||
|
//如果是付款单
|
||||||
|
else if(DjlxEnum.PAYMENT.type.equals(djlx)){
|
||||||
|
result= payment(eventType,formmainData,forsonData,forsonDetails);
|
||||||
|
}
|
||||||
|
if(StrUtil.isNotEmpty(result)){
|
||||||
|
JSONObject jsonStr = JSONObject.parseObject(result);
|
||||||
|
jsonStr.put("formApp",formApp);
|
||||||
|
jsonStr.put("id",formmainData.getString("id"));
|
||||||
|
jsonStr.put("dataSourceCode",dataSourceCode);
|
||||||
|
|
||||||
|
String jsonString = jsonStr.toJSONString();
|
||||||
|
entity.setBodys(jsonString);
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("======在调用接口之前,流程参数组装错误:{}===",e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 销售订单在调用之前参数组装
|
||||||
|
* @Param headers:头部信息
|
||||||
|
* eventType:事件类型
|
||||||
|
* summaryId:流程id
|
||||||
|
* dataSourceCode:数据库编码
|
||||||
|
* formmainData:主表数据
|
||||||
|
* forsonData:明细表数据
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-23 17:53
|
||||||
|
* **/
|
||||||
|
private String sales(String eventType, JSONObject formmainData, JSONArray forsonData,JSONArray forsonDetailsTableName){
|
||||||
|
try {
|
||||||
|
//流程结束
|
||||||
|
if(ColEventTypeEnum.ONPROCESSFINISHED.getType().equals(eventType)){
|
||||||
|
JSONObject jsonMain=new JSONObject();
|
||||||
|
jsonMain.put("DocumentType",formmainData.getString("field0001")==null?"SO1":formmainData.getString("field0001"));//单据类型
|
||||||
|
jsonMain.put("DocNo",formmainData.getString("field0005"));//单号
|
||||||
|
jsonMain.put("OrderBy",formmainData.getString("field0009"));//客户
|
||||||
|
jsonMain.put("BusinessDate",formmainData.getString("field0017"));//日期
|
||||||
|
jsonMain.put("SaleDepartment",formmainData.getString("field0010"));//部门
|
||||||
|
jsonMain.put("Seller",formmainData.getString("field0006"));//业务员
|
||||||
|
jsonMain.put("IsPriceIncludeTax",true);//价格是否含税
|
||||||
|
jsonMain.put("Memo",formmainData.getString("field0020"));//备注
|
||||||
|
jsonMain.put("ConfirmTermCode",formmainData.getString("field0015"));//立账条件
|
||||||
|
JSONObject jsonDescFlexField=new JSONObject();
|
||||||
|
jsonDescFlexField.put("PubDescSeg1",formmainData.getString("field0003"));//合同号
|
||||||
|
jsonDescFlexField.put("PubDescSeg5",formmainData.getString("field0008"));//厂区
|
||||||
|
jsonDescFlexField.put("PubDescSeg6",formmainData.getString("field0012"));//贸易方式
|
||||||
|
jsonMain.put("DescFlexField",jsonDescFlexField);
|
||||||
|
if(CollectionUtils.isNotEmpty(forsonData)){
|
||||||
|
JSONArray jsonArray=new JSONArray();
|
||||||
|
for (Object forsonDatum : forsonData) {
|
||||||
|
JSONObject jsonSOLineDTOList = JSON.parseObject(JSON.toJSONString(forsonDatum));
|
||||||
|
JSONObject jsonDetails=new JSONObject();
|
||||||
|
jsonDetails.put("DocLineNo",jsonSOLineDTOList.getString("field0021"));//行号
|
||||||
|
jsonDetails.put("ItemCode",jsonSOLineDTOList.getString("field0028"));//料号
|
||||||
|
jsonDetails.put("FreeType",jsonSOLineDTOList.getString("field0034"));//免费品类型
|
||||||
|
jsonDetails.put("OrderByQtyTU",jsonSOLineDTOList.getString("field0031"));//数量
|
||||||
|
jsonDetails.put("TU",jsonSOLineDTOList.getString("field0032"));//销售单位编码
|
||||||
|
jsonDetails.put("FinallyPriceTC",jsonSOLineDTOList.getString("field0036"));//最终价
|
||||||
|
jsonDetails.put("TaxSchedule",jsonSOLineDTOList.getString("field0041")==null?"YZ08":jsonSOLineDTOList.getString("field0041"));//税组合
|
||||||
|
jsonDetails.put("ShipTogetherFlag","-1");//成套发货标志
|
||||||
|
jsonDetails.put("Memo",jsonSOLineDTOList.getString("field0042"));//备注
|
||||||
|
jsonDetails.put("RecTermCode",formmainData.getString("field0019"));//收款条件
|
||||||
|
JSONObject jsonDesc=new JSONObject();
|
||||||
|
jsonDesc.put("PrivateDescSeg1",jsonSOLineDTOList.getString("field0022"));//是否处理
|
||||||
|
jsonDesc.put("PrivateDescSeg2",jsonSOLineDTOList.getString("field0026"));//项目明细
|
||||||
|
jsonDesc.put("PrivateDescSeg5",jsonSOLineDTOList.getString("field0025"));//厂区明细id
|
||||||
|
jsonDesc.put("PubDescSeg1",jsonSOLineDTOList.getString("field0023"));//合同号明细
|
||||||
|
jsonDetails.put("DescFlexField",jsonDesc);
|
||||||
|
/*if(CollectionUtils.isNotEmpty(forsonDetailsTableName)){
|
||||||
|
JSONArray jsonArrayLineDTO=new JSONArray();
|
||||||
|
for (Object o : forsonDetailsTableName) {
|
||||||
|
JSONObject jsonSOShiplineDTOListObject = JSON.parseObject(JSON.toJSONString(o));
|
||||||
|
JSONObject jsonObjectShiplineDTO=new JSONObject();
|
||||||
|
jsonObjectShiplineDTO.put("DocSubLineNo",jsonSOLineDTOList.getString(""));//行号
|
||||||
|
jsonObjectShiplineDTO.put("ItemCode",jsonSOLineDTOList.getString("field0028"));//料号
|
||||||
|
jsonObjectShiplineDTO.put("RequireDate",jsonSOShiplineDTOListObject.getString(""));//交期
|
||||||
|
jsonObjectShiplineDTO.put("DemandType",jsonSOShiplineDTOListObject.getString(""));//需求分类
|
||||||
|
jsonObjectShiplineDTO.put("Memo",jsonSOShiplineDTOListObject.getString(""));//备注
|
||||||
|
|
||||||
|
*//* jsonObjectShiplineDTO.put("SupplySource",jsonSOShiplineDTOListObject.getString(""));//供应来源
|
||||||
|
jsonObjectShiplineDTO.put("DemandTransformType",jsonSOShiplineDTOListObject.getString(""));//供应类型
|
||||||
|
jsonObjectShiplineDTO.put("ShiperOrg",jsonSOShiplineDTOListObject.getString(""));//货主组织
|
||||||
|
jsonObjectShiplineDTO.put("SupplyOrg",jsonSOShiplineDTOListObject.getString(""));//供应组织*//*
|
||||||
|
jsonArrayLineDTO.add(jsonObjectShiplineDTO);
|
||||||
|
jsonDetails.put("SOShiplineDTOList",jsonArrayLineDTO);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
JSONArray jsonArrayLineDTO=new JSONArray();
|
||||||
|
JSONObject jsonObjectShiplineDTO=new JSONObject();
|
||||||
|
jsonObjectShiplineDTO.put("DocSubLineNo",jsonSOLineDTOList.getString("field0021"));//行号
|
||||||
|
jsonObjectShiplineDTO.put("ItemCode",jsonSOLineDTOList.getString("field0028"));//料号
|
||||||
|
jsonObjectShiplineDTO.put("RequireDate",jsonSOLineDTOList.getString("field0033"));//交期
|
||||||
|
jsonObjectShiplineDTO.put("DemandType",jsonSOLineDTOList.getString("field0027"));//需求分类
|
||||||
|
jsonObjectShiplineDTO.put("Memo",jsonSOLineDTOList.getString("field0042"));//备注
|
||||||
|
jsonArrayLineDTO.add(jsonObjectShiplineDTO);
|
||||||
|
jsonDetails.put("SOShiplineDTOList",jsonArrayLineDTO);
|
||||||
|
jsonArray.add(jsonDetails);
|
||||||
|
jsonMain.put("SOLineDTOList",jsonArray);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String jsonString = jsonMain.toJSONString();
|
||||||
|
logger.info("====OA销售订单在流程结束组装的参数为:{}====",jsonString);
|
||||||
|
return jsonString;
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("=====销售订单在调用之前参数组装失败:{}====",e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 付款单在调用之前参数组装
|
||||||
|
* @Param headers:头部信息
|
||||||
|
* eventType:事件类型
|
||||||
|
* summaryId:流程id
|
||||||
|
* dataSourceCode:数据库编码
|
||||||
|
* formmainData:主表数据
|
||||||
|
* forsonData:明细表数据
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-23 17:53
|
||||||
|
* **/
|
||||||
|
private String payment(String eventType, JSONObject formmainData, JSONArray forsonData,JSONArray forsonDetailsTableName){
|
||||||
|
try {
|
||||||
|
//流程结束
|
||||||
|
if(ColEventTypeEnum.ONPROCESSFINISHED.getType().equals(eventType)){
|
||||||
|
JSONObject jsonMain=new JSONObject();
|
||||||
|
jsonMain.put("DocNo",formmainData.getString("field0021"));//单号
|
||||||
|
jsonMain.put("PCCode",formmainData.getString("field0022")==null?"C001":formmainData.getString("field0022"));//币种
|
||||||
|
jsonMain.put("PayDate",formmainData.getString("field0025"));//付款日期
|
||||||
|
jsonMain.put("DocumentTypeCode",formmainData.getString("field0018")==null?"APP001":formmainData.getString("field0018"));//单据类型
|
||||||
|
jsonMain.put("SuppCode",formmainData.getString("field0030"));//供应商
|
||||||
|
jsonMain.put("SuppName",formmainData.getString(""));//供应商名称
|
||||||
|
jsonMain.put("SuppSiteCode",formmainData.getString("field0019"));//供应商位置
|
||||||
|
jsonMain.put("SuppSiteName",formmainData.getString(""));//供应商位置名称
|
||||||
|
jsonMain.put("CustCode",formmainData.getString(""));//客户
|
||||||
|
jsonMain.put("CustName",formmainData.getString(""));//客户名称
|
||||||
|
jsonMain.put("CustSiteCode",formmainData.getString(""));//客户位置
|
||||||
|
jsonMain.put("CustSiteName",formmainData.getString(""));//客户位置名称
|
||||||
|
jsonMain.put("PayObjType",formmainData.getString("field0027"));//付款对象
|
||||||
|
jsonMain.put("DeptCode",formmainData.getString("field0020"));//部门
|
||||||
|
jsonMain.put("ProjectCode",formmainData.getString("field0026"));//项目
|
||||||
|
jsonMain.put("SrcBillOrgCode",formmainData.getString("field0024")==null?"1001":formmainData.getString("field0024"));//来源组织
|
||||||
|
jsonMain.put("TransactorCode",formmainData.getString("field0029"));//业务员
|
||||||
|
jsonMain.put("Note",formmainData.getString(""));//备注
|
||||||
|
if(CollectionUtils.isNotEmpty(forsonData)){
|
||||||
|
JSONArray jsonArray=new JSONArray();
|
||||||
|
for (Object forsonDatum : forsonData) {
|
||||||
|
JSONObject jsonPayBillLines = JSON.parseObject(JSON.toJSONString(forsonDatum));
|
||||||
|
JSONObject jsonDetails=new JSONObject();
|
||||||
|
jsonDetails.put("SettlementMethodCode",jsonPayBillLines.getString("field0002"));//结算方式
|
||||||
|
jsonDetails.put("PayBkAccCode",jsonPayBillLines.getString("field0007"));//付款银行账号
|
||||||
|
jsonDetails.put("PayBACCode",jsonPayBillLines.getString("field0008"));//账户币种
|
||||||
|
jsonDetails.put("PayBkSubAccount",jsonPayBillLines.getString("field0009"));//子账户
|
||||||
|
jsonDetails.put("PayACCSettlementFee",jsonPayBillLines.getString("field0005"));//手续费
|
||||||
|
jsonDetails.put("LineNum",jsonPayBillLines.getString("field0001"));//行号
|
||||||
|
jsonDetails.put("CashAccountCode",jsonPayBillLines.getString("field0010"));//现金账号
|
||||||
|
jsonDetails.put("TradeDate",jsonPayBillLines.getString("field0011"));//回单日期
|
||||||
|
jsonDetails.put("Maturity",formmainData.getString("field0035"));//到期日
|
||||||
|
if(CollectionUtils.isNotEmpty(forsonDetailsTableName)){
|
||||||
|
JSONArray jsonArrayUseLine=new JSONArray();
|
||||||
|
for (Object o : forsonDetailsTableName) {
|
||||||
|
JSONObject PayBillUseLine = JSON.parseObject(JSON.toJSONString(o));
|
||||||
|
JSONObject jsonPayBillUse=new JSONObject();
|
||||||
|
jsonPayBillUse.put("PayProperty",PayBillUseLine.getString("field0058")==null?"0":PayBillUseLine.getString("field0058"));//用途
|
||||||
|
jsonPayBillUse.put("Money",PayBillUseLine.getString("field0052"));//金额
|
||||||
|
jsonPayBillUse.put("SettlementFee",jsonPayBillLines.getString("field0005"));//手续费
|
||||||
|
jsonPayBillUse.put("LineNum",PayBillUseLine.getString("field0047"));//行号
|
||||||
|
jsonPayBillUse.put("SuppCode",PayBillUseLine.getString("field0048"));//代付供应商
|
||||||
|
jsonPayBillUse.put("SuppName",PayBillUseLine.getString(""));//代付供应商名称
|
||||||
|
jsonPayBillUse.put("SuppSiteCode",PayBillUseLine.getString(""));//代付供应商位置
|
||||||
|
jsonPayBillUse.put("SuppSiteName",PayBillUseLine.getString(""));//代付供应商位置名称
|
||||||
|
jsonPayBillUse.put("BizOrgCode",formmainData.getString("field0024")==null?"1001":formmainData.getString("field0024"));//业务组织
|
||||||
|
jsonPayBillUse.put("DeptCode",PayBillUseLine.getString("field0067"));//部门
|
||||||
|
jsonPayBillUse.put("TransactorCode",PayBillUseLine.getString("field0068"));//业务员
|
||||||
|
jsonPayBillUse.put("ProjectCode",PayBillUseLine.getString("field0071"));//项目
|
||||||
|
jsonPayBillUse.put("IncExpItemCode",PayBillUseLine.getString("field0072"));//收支项目
|
||||||
|
jsonPayBillUse.put("ItemMasterCode",PayBillUseLine.getString("field0069"));//料品
|
||||||
|
jsonPayBillUse.put("CustCode",PayBillUseLine.getString(""));//代付客户
|
||||||
|
jsonPayBillUse.put("CustName",PayBillUseLine.getString(""));//代付客户名称
|
||||||
|
jsonPayBillUse.put("CustSiteCode",PayBillUseLine.getString(""));//代付客户位置
|
||||||
|
jsonPayBillUse.put("CustSiteName",PayBillUseLine.getString(""));//代付客户位置名称
|
||||||
|
jsonArrayUseLine.add(jsonPayBillUse);
|
||||||
|
jsonDetails.put("PayBillUseLines",jsonArrayUseLine);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jsonArray.add(jsonDetails);
|
||||||
|
jsonMain.put("PayBillLines",jsonArray);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String jsonString = jsonMain.toJSONString();
|
||||||
|
logger.info("====OA付款单在流程结束组装的参数为:{}====",jsonString);
|
||||||
|
return jsonString;
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("=====付款单在调用之前参数组装失败:{}====",e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum DjlxEnum {
|
||||||
|
SALES("sales","销售订单"),
|
||||||
|
PAYMENT("payment","付款单"),
|
||||||
|
;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
DjlxEnum(String type, String name) {
|
||||||
|
this.type = type;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,295 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.dao.IPaymentDetailsLinesDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.dao.IPaymentDetailsUseLinesDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.dao.IPaymentOrderDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailLinesEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderDetailsUseLinesEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.PaymentOrderEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.seeyon.service.impl.CfsLogServiceImpl;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.service.IPaymentOrderService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.impl.AcquireTokenServiceImpl;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class PaymentOrderServiceImpl extends BaseService implements IPaymentOrderService {
|
||||||
|
|
||||||
|
private IPaymentOrderDao paymentOrderDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPaymentDetailsLinesDao paymentDetailsLinesDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPaymentDetailsUseLinesDao paymentDetailsUseLinesDao;
|
||||||
|
@Autowired
|
||||||
|
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setPaymentOrderDao(IPaymentOrderDao dao) {
|
||||||
|
this.paymentOrderDao = dao;
|
||||||
|
this.dao=dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String URLTEST="http://122.224.56.190:8082";
|
||||||
|
@Autowired
|
||||||
|
private AcquireTokenServiceImpl acquireTokenService;
|
||||||
|
|
||||||
|
//将OA已审批得付款单推送到U9C
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity queryPaymentOrderToU9C(JSONObject json) {
|
||||||
|
String sourceCode = json.getString("sourceCode");
|
||||||
|
PaymentOrderEntity paymentOrderEntity=new PaymentOrderEntity();
|
||||||
|
paymentOrderEntity.setDataSourceCode(sourceCode);
|
||||||
|
try {
|
||||||
|
List<PaymentOrderEntity> query = null;
|
||||||
|
if(StrUtil.isNotEmpty(json.getString("id"))){
|
||||||
|
paymentOrderEntity.setId(json.getString("id"));
|
||||||
|
query=paymentOrderDao.queryPaymentOrderRetry(paymentOrderEntity);
|
||||||
|
}else{
|
||||||
|
query= paymentOrderDao.query(paymentOrderEntity);
|
||||||
|
}
|
||||||
|
if(CollectionUtils.isEmpty(query)){
|
||||||
|
logger.info("====OA中没有已审核得付款单传递U9C====");
|
||||||
|
return BaseResult.getSuccessMessageEntity("查询成功",null);
|
||||||
|
}
|
||||||
|
for (PaymentOrderEntity orderEntity : query) {
|
||||||
|
orderEntity.setDataSourceCode(sourceCode);
|
||||||
|
JSONObject jsonMain=new JSONObject();
|
||||||
|
// jsonMain.put("DocNo",orderEntity.getDocNo());//单号 此字段不用了
|
||||||
|
jsonMain.put("PCCode",orderEntity.getpCCode()==null?"C001":orderEntity.getpCCode());//币种
|
||||||
|
jsonMain.put("PayDate",orderEntity.getPayDate());//付款日期
|
||||||
|
jsonMain.put("DocumentTypeCode",orderEntity.getDocumentTypeCode());//单据类型
|
||||||
|
jsonMain.put("SuppCode",orderEntity.getSuppCode());//供应商
|
||||||
|
jsonMain.put("SuppName",orderEntity.getSuppName());//供应商名称
|
||||||
|
jsonMain.put("SuppSiteCode",orderEntity.getSuppSiteCode());//供应商位置
|
||||||
|
jsonMain.put("SuppSiteName",orderEntity.getSuppSiteName());//供应商位置名称
|
||||||
|
jsonMain.put("CustCode",orderEntity.getCustCode());//客户
|
||||||
|
jsonMain.put("CustName",orderEntity.getCustName());//客户名称
|
||||||
|
jsonMain.put("CustSiteCode",orderEntity.getCustSiteCode());//客户位置
|
||||||
|
jsonMain.put("CustSiteName",orderEntity.getCustSiteName());//客户位置名称
|
||||||
|
String payObjType=null;
|
||||||
|
if(orderEntity.getPayObjType().equals("2744088252311683800")){
|
||||||
|
payObjType="0";//客户 2744088252311683800
|
||||||
|
}else{
|
||||||
|
payObjType="1";//供应商
|
||||||
|
}
|
||||||
|
jsonMain.put("PayObjType",payObjType);//付款对象
|
||||||
|
jsonMain.put("DeptCode",orderEntity.getDeptCode());//部门
|
||||||
|
jsonMain.put("ProjectCode",orderEntity.getProjectCode());//项目
|
||||||
|
jsonMain.put("SrcBillOrgCode",orderEntity.getSrcBillOrgCode());//来源组织
|
||||||
|
jsonMain.put("TransactorCode",orderEntity.getTransactorCode());//业务员
|
||||||
|
jsonMain.put("Note",orderEntity.getNote());//备注
|
||||||
|
JSONObject jsonDescFlexField=new JSONObject();
|
||||||
|
jsonDescFlexField.put("PrivateDescSeg1",orderEntity.getPrivateDescSeg1());//单号
|
||||||
|
jsonMain.put("DescFlexField",jsonDescFlexField);
|
||||||
|
JSONArray jsonArray=new JSONArray();
|
||||||
|
PaymentOrderDetailLinesEntity paymentOrderDetailLinesEntity=new PaymentOrderDetailLinesEntity();
|
||||||
|
paymentOrderDetailLinesEntity.setFormmainId(orderEntity.getId());
|
||||||
|
paymentOrderDetailLinesEntity.setDataSourceCode(sourceCode);
|
||||||
|
List<PaymentOrderDetailLinesEntity> paymentOrderDetailLinesEntities = paymentDetailsLinesDao.query(paymentOrderDetailLinesEntity);
|
||||||
|
if(CollectionUtils.isEmpty(paymentOrderDetailLinesEntities)){
|
||||||
|
logger.info("====OA中查询出来得付款单明细行为空====");
|
||||||
|
jsonMain.put("PayBillLines",jsonArray);
|
||||||
|
}else{
|
||||||
|
for (PaymentOrderDetailLinesEntity orderDetailLinesEntity : paymentOrderDetailLinesEntities) {
|
||||||
|
JSONObject jsonDetails=new JSONObject();
|
||||||
|
String settlementMethodCode=null;
|
||||||
|
if(orderDetailLinesEntity.getSettlementMethodCode().equals("-7937303392876737290")){
|
||||||
|
settlementMethodCode="YZ01";//现金
|
||||||
|
}else if(orderDetailLinesEntity.getSettlementMethodCode().equals("920692801377095260")){
|
||||||
|
settlementMethodCode="YZ02";//银行
|
||||||
|
}else if(orderDetailLinesEntity.getSettlementMethodCode().equals("-8115207479941119383")){
|
||||||
|
settlementMethodCode="YZ03";//信用证
|
||||||
|
}else if(orderDetailLinesEntity.getSettlementMethodCode().equals("823764250156614494")){
|
||||||
|
settlementMethodCode="YZ04";//银行承兑汇票
|
||||||
|
}else if(orderDetailLinesEntity.getSettlementMethodCode().equals("8845367011189605014")){
|
||||||
|
settlementMethodCode="YZ05";//商业承兑汇票
|
||||||
|
}else if(orderDetailLinesEntity.getSettlementMethodCode().equals("4478413944029466492")){
|
||||||
|
settlementMethodCode="YZ06";//电汇
|
||||||
|
}else if(orderDetailLinesEntity.getSettlementMethodCode().equals("-8705002786699392279")){
|
||||||
|
settlementMethodCode="YZ07";//银行承兑汇票-票据池
|
||||||
|
}
|
||||||
|
jsonDetails.put("SettlementMethodCode",settlementMethodCode);//结算方式
|
||||||
|
jsonDetails.put("PayBkAccCode",orderDetailLinesEntity.getPayBkAccCode());//付款银行账号
|
||||||
|
jsonDetails.put("PayBACCode",orderDetailLinesEntity.getPayBACCode());//账户币种
|
||||||
|
jsonDetails.put("PayBkSubAccount",orderDetailLinesEntity.getPayBkSubAccount());//子账户
|
||||||
|
jsonDetails.put("PayACCSettlementFee",orderDetailLinesEntity.getPayACCSettlementFee());//手续费
|
||||||
|
jsonDetails.put("LineNum",orderDetailLinesEntity.getLineNum());//行号
|
||||||
|
jsonDetails.put("CashAccountCode",orderDetailLinesEntity.getCashAccountCode());//现金账号
|
||||||
|
jsonDetails.put("TradeDate",orderDetailLinesEntity.getTradeDate());//回单日期
|
||||||
|
JSONArray jsonArrayUseLine=new JSONArray();
|
||||||
|
PaymentOrderDetailsUseLinesEntity paymentOrderDetailsUseLinesEntity=new PaymentOrderDetailsUseLinesEntity();
|
||||||
|
paymentOrderDetailsUseLinesEntity.setFormmainId(orderEntity.getId());
|
||||||
|
paymentOrderDetailsUseLinesEntity.setDataSourceCode(sourceCode);
|
||||||
|
List<PaymentOrderDetailsUseLinesEntity> paymentOrderDetailsUseLinesEntities = paymentDetailsUseLinesDao.query(paymentOrderDetailsUseLinesEntity);
|
||||||
|
if(CollectionUtils.isEmpty(paymentOrderDetailsUseLinesEntities)){
|
||||||
|
logger.info("====OA中查询出来得付款单明细用途为空====");
|
||||||
|
jsonDetails.put("PayBillUseLines",jsonArrayUseLine);
|
||||||
|
}else{
|
||||||
|
for (PaymentOrderDetailsUseLinesEntity orderDetailsUseLinesEntity : paymentOrderDetailsUseLinesEntities) {
|
||||||
|
JSONObject jsonPayBillUse=new JSONObject();
|
||||||
|
jsonDetails.put("Maturity",orderDetailsUseLinesEntity.getMaturity());//到期日
|
||||||
|
String payProperty=null;
|
||||||
|
if(StrUtil.isEmpty(orderDetailsUseLinesEntity.getPayProperty()) ||orderDetailsUseLinesEntity.getPayProperty().equals("-4517840471053613598")){
|
||||||
|
payProperty="0";//标准
|
||||||
|
}else if(orderDetailsUseLinesEntity.getPayProperty().equals("3562140919963140665")){
|
||||||
|
payProperty="1";//保证金
|
||||||
|
}else if(orderDetailsUseLinesEntity.getPayProperty().equals("-1289258062492909108")){
|
||||||
|
payProperty="3";//预付款
|
||||||
|
}else if(orderDetailsUseLinesEntity.getPayProperty().equals("5931400285590995368")){
|
||||||
|
payProperty="9";//杂项
|
||||||
|
}
|
||||||
|
jsonPayBillUse.put("PayProperty",payProperty);//用途
|
||||||
|
jsonPayBillUse.put("Money",orderDetailsUseLinesEntity.getMoney());//金额
|
||||||
|
jsonPayBillUse.put("SettlementFee",orderDetailLinesEntity.getSettlementFee());//手续费
|
||||||
|
jsonPayBillUse.put("LineNum",orderDetailsUseLinesEntity.getLineNum());//行号
|
||||||
|
jsonPayBillUse.put("SuppCode",orderDetailsUseLinesEntity.getSuppCode());//代付供应商
|
||||||
|
jsonPayBillUse.put("SuppName",orderDetailsUseLinesEntity.getSuppName());//代付供应商名称
|
||||||
|
jsonPayBillUse.put("SuppSiteCode",orderDetailsUseLinesEntity.getSuppSiteCode());//代付供应商位置
|
||||||
|
jsonPayBillUse.put("SuppSiteName",orderDetailsUseLinesEntity.getSuppSiteName());//代付供应商位置名称
|
||||||
|
jsonPayBillUse.put("BizOrgCode",orderEntity.getSrcBillOrgCode());//业务组织
|
||||||
|
jsonPayBillUse.put("DeptCode",orderDetailsUseLinesEntity.getDeptCode());//部门
|
||||||
|
jsonPayBillUse.put("TransactorCode",orderDetailsUseLinesEntity.getTransactorCode());//业务员
|
||||||
|
jsonPayBillUse.put("ProjectCode",orderDetailsUseLinesEntity.getProjectCode());//项目
|
||||||
|
jsonPayBillUse.put("IncExpItemCode",orderDetailsUseLinesEntity.getIncExpItemCode());//收支项目
|
||||||
|
jsonPayBillUse.put("ItemMasterCode",orderDetailsUseLinesEntity.getItemMasterCode());//料品
|
||||||
|
jsonPayBillUse.put("CustCode",orderDetailsUseLinesEntity.getCustCode());//代付客户
|
||||||
|
jsonPayBillUse.put("CustName",orderDetailsUseLinesEntity.getCustName());//代付客户名称
|
||||||
|
jsonPayBillUse.put("CustSiteCode",orderDetailsUseLinesEntity.getCustSiteCode());//代付客户位置
|
||||||
|
jsonPayBillUse.put("CustSiteName",orderDetailsUseLinesEntity.getCustSiteName());//代付客户位置名称
|
||||||
|
jsonArrayUseLine.add(jsonPayBillUse);
|
||||||
|
jsonDetails.put("PayBillUseLines",jsonArrayUseLine);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jsonArray.add(jsonDetails);
|
||||||
|
jsonMain.put("PayBillLines",jsonArray);
|
||||||
|
}
|
||||||
|
String token = acquireTokenService.getToken();
|
||||||
|
logger.info("======获取得德广信U9Ctoken为:{}=====",token);
|
||||||
|
if(StrUtil.isNotEmpty(token)) {
|
||||||
|
String params = jsonMain.toJSONString();
|
||||||
|
JSONObject jsonObject1 = JSONObject.parseObject(params);
|
||||||
|
JSONArray jsonArray1 = new JSONArray();
|
||||||
|
jsonArray1.add(jsonObject1);
|
||||||
|
String jsonStr = String.valueOf(jsonArray1);
|
||||||
|
//调用U9C付款单新增接口
|
||||||
|
logger.info("====OA付款单传递德广信U9C得请求参数为:{}======",jsonStr);
|
||||||
|
String body = HttpRequest.post(URLTEST + "/U9C/webapi/PayBill/Create").header("token", token).header("content-type", "application/json").body(jsonStr).execute().body();
|
||||||
|
logger.info("====OA付款单传递德广信U9C得返回参数为:{}======",body);
|
||||||
|
boolean flag=true;
|
||||||
|
JSONObject jsonBody = JSONObject.parseObject(body);
|
||||||
|
if(jsonBody.getString("Success").equals("true")){
|
||||||
|
JSONArray jsonArrayData = jsonBody.getJSONArray("Data");
|
||||||
|
if(CollectionUtils.isNotEmpty(jsonArrayData)) {
|
||||||
|
JSONObject jsonData = JSON.parseObject(JSON.toJSONString(jsonArrayData.get(0)));
|
||||||
|
String mCode = jsonData.getString("m_code");
|
||||||
|
if (StrUtil.isNotEmpty(mCode)) {
|
||||||
|
flag=true;
|
||||||
|
}else{
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
//保存日志
|
||||||
|
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
|
||||||
|
taskLivingDetail.setCreate_time(new Date());
|
||||||
|
taskLivingDetail.setModify_time(new Date());
|
||||||
|
taskLivingDetail.setRootAppPk(orderEntity.getId());
|
||||||
|
taskLivingDetail.setRootAppBill(orderEntity.getDocNo()==null?orderEntity.getPrivateDescSeg1():orderEntity.getDocNo());
|
||||||
|
taskLivingDetail.setPluginId("PaymentOrderPluginInitializer");
|
||||||
|
taskLivingDetail.setId(json.getString("details_id"));
|
||||||
|
taskLivingDetail.setRootAppNewData(jsonStr);
|
||||||
|
taskLivingDetail.setNewTransmitInfo(body);
|
||||||
|
taskLivingDetail.setNewPushDate(new Date());
|
||||||
|
saveLog(json.getString("id"), flag, taskLivingDetail);
|
||||||
|
if(jsonBody.getString("Success").equals("true")){
|
||||||
|
JSONArray jsonArrayDate = jsonBody.getJSONArray("Data");
|
||||||
|
if(CollectionUtils.isNotEmpty(jsonArrayDate)){
|
||||||
|
JSONObject jsonData = JSON.parseObject(JSON.toJSONString(jsonArrayDate.get(0)));
|
||||||
|
String mCode = jsonData.getString("Code");
|
||||||
|
logger.info("=====德广信U9C付款单新增返回得付款订单号为:{}===",mCode);
|
||||||
|
if(StrUtil.isNotEmpty(mCode)){
|
||||||
|
logger.info("========开始更新付款单推送标识为成功=========");
|
||||||
|
orderEntity.setPushStatus(mCode);
|
||||||
|
paymentOrderDao.updatePaymentOrderStatus(orderEntity);
|
||||||
|
logger.info("======付款单推送状态更新成功完毕=======");
|
||||||
|
return BaseResult.getSuccessMessageEntity("付款单推送成功",mCode);
|
||||||
|
}else{
|
||||||
|
logger.info("=========OA付款单推送失败,开始更新付款单推送标识为失败:{}=====",jsonBody.getString("ResMsg"));
|
||||||
|
orderEntity.setPushStatus("2");
|
||||||
|
paymentOrderDao.updatePaymentOrderStatus(orderEntity);
|
||||||
|
return BaseResult.getFailureMessageEntity("付款单推送失败");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
logger.info("=========OA付款单推送失败,开始更新付款单推送标识为失败:{}=====",jsonBody.getString("ResMsg"));
|
||||||
|
orderEntity.setPushStatus("2");
|
||||||
|
paymentOrderDao.updatePaymentOrderStatus(orderEntity);
|
||||||
|
return BaseResult.getFailureMessageEntity("付款单推送失败");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
logger.info("=========OA付款单推送失败,开始更新付款单推送标识为失败:{}=====",jsonBody.getString("ResMsg"));
|
||||||
|
orderEntity.setPushStatus("2");
|
||||||
|
paymentOrderDao.updatePaymentOrderStatus(orderEntity);
|
||||||
|
return BaseResult.getFailureMessageEntity("付款单推送失败");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
logger.info("=========获取德广信U9Ctkoen失败====");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("===OA付款单推送德广信U9C错误:{}===",e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveLog(String integration_task_living_details_id, Boolean flag, IntegrationTaskLivingDetailsEntity taskLivingDetail) {
|
||||||
|
try {
|
||||||
|
//判断,成功调用这个方法
|
||||||
|
if (StrUtil.isEmpty(integration_task_living_details_id)) {
|
||||||
|
if (flag) {
|
||||||
|
taskLivingDetailsService.saveLogToSuccess(taskLivingDetail);
|
||||||
|
} else {
|
||||||
|
//失败 调用这个方法
|
||||||
|
taskLivingDetailsService.saveLogToFail(taskLivingDetail);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (flag) {
|
||||||
|
//如果是重试 成功调这个方法
|
||||||
|
taskLivingDetailsService.saveLogFailToSuccess(taskLivingDetail);
|
||||||
|
} else {
|
||||||
|
//如果是重试 失败调这个方法
|
||||||
|
taskLivingDetailsService.updateLogFailToSuccess(taskLivingDetail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("保存日志出错:{}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer updatePaymentOrderStatus(JSONObject json) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,261 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.dao.ISalesOrderDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.dao.ISalesOrderDetailsDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.SalesOrderDetailsEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.entity.SalesOrderEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.seeyon.service.impl.CfsLogServiceImpl;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.service.ISalesOrderService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.impl.AcquireTokenServiceImpl;
|
||||||
|
import com.hzya.frame.sysnew.application.database.dao.ISysApplicationDatabaseDao;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
public class SalesOrderServiceImpl extends BaseService<SalesOrderEntity,String> implements ISalesOrderService {
|
||||||
|
|
||||||
|
private ISalesOrderDao salesOrderDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISalesOrderDetailsDao salesOrderDetailsDao;
|
||||||
|
@Autowired
|
||||||
|
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setSalesOrderDao(ISalesOrderDao dao) {
|
||||||
|
this.salesOrderDao = dao;
|
||||||
|
this.dao=dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static String URLTEST="http://122.224.56.190:8082";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysApplicationDatabaseDao sysApplicationDatabaseDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AcquireTokenServiceImpl acquireTokenService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CfsLogServiceImpl cfsLogService;
|
||||||
|
|
||||||
|
|
||||||
|
//定时查询OA中已审核得销售订单传递U9C
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity querySalesOrderToU9C(JSONObject json) {
|
||||||
|
String sourceCode = json.getString("sourceCode");
|
||||||
|
SalesOrderEntity salesOrderEntity=new SalesOrderEntity();
|
||||||
|
salesOrderEntity.setDataSourceCode(sourceCode);
|
||||||
|
try {
|
||||||
|
List<SalesOrderEntity> query =null; //
|
||||||
|
if(StrUtil.isNotEmpty(json.getString("id"))){
|
||||||
|
//重试方法
|
||||||
|
salesOrderEntity.setId(json.getString("id"));
|
||||||
|
query= salesOrderDao.querySalesOrderRetry(salesOrderEntity);
|
||||||
|
}else{
|
||||||
|
query= salesOrderDao.query(salesOrderEntity);
|
||||||
|
}
|
||||||
|
if(CollectionUtils.isEmpty(query)){
|
||||||
|
logger.info("====OA中没有已审核得销售订单传递U9C====");
|
||||||
|
return BaseResult.getSuccessMessageEntity("查询成功",null);
|
||||||
|
}
|
||||||
|
for (SalesOrderEntity orderEntity : query) {
|
||||||
|
orderEntity.setDataSourceCode(sourceCode);
|
||||||
|
JSONObject jsonMain=new JSONObject();
|
||||||
|
jsonMain.put("DocumentType",orderEntity.getDocumentType());//单据类型
|
||||||
|
jsonMain.put("DocNo",orderEntity.getDocNo());//单号
|
||||||
|
jsonMain.put("OrderBy",orderEntity.getOrderBy());//客户
|
||||||
|
jsonMain.put("BusinessDate",orderEntity.getBusinessDate());//日期
|
||||||
|
jsonMain.put("SaleDepartment",orderEntity.getSaleDepartment());//部门
|
||||||
|
jsonMain.put("Seller",orderEntity.getSeller());//业务员
|
||||||
|
jsonMain.put("IsPriceIncludeTax",true);//价格是否含税
|
||||||
|
jsonMain.put("Memo",orderEntity.getMemo());//备注
|
||||||
|
jsonMain.put("ConfirmTermCode",orderEntity.getConfirmTermCode());//立账条件
|
||||||
|
JSONObject jsonDescFlexField=new JSONObject();
|
||||||
|
jsonDescFlexField.put("PubDescSeg1",orderEntity.getPubDescSeg1());//合同号
|
||||||
|
jsonDescFlexField.put("PubDescSeg5",orderEntity.getPubDescSeg5());//厂区
|
||||||
|
jsonDescFlexField.put("PubDescSeg6",orderEntity.getPubDescSeg6());//贸易方式
|
||||||
|
jsonMain.put("DescFlexField",jsonDescFlexField);
|
||||||
|
JSONArray jsonArray=new JSONArray();
|
||||||
|
SalesOrderDetailsEntity salesOrderDetailsEntity = new SalesOrderDetailsEntity();
|
||||||
|
salesOrderDetailsEntity.setFormmainId(orderEntity.getId());
|
||||||
|
salesOrderDetailsEntity.setDataSourceCode(sourceCode);
|
||||||
|
List<SalesOrderDetailsEntity> salesOrderDetailsEntities = salesOrderDetailsDao.query(salesOrderDetailsEntity);
|
||||||
|
if (CollectionUtils.isEmpty(salesOrderDetailsEntities)) {
|
||||||
|
logger.info("====OA中查询出来得销售订单明细为空====");
|
||||||
|
jsonMain.put("SOLineDTOList",jsonArray);
|
||||||
|
}else{
|
||||||
|
for (SalesOrderDetailsEntity orderDetailsEntity : salesOrderDetailsEntities) {
|
||||||
|
JSONObject jsonDetails=new JSONObject();
|
||||||
|
jsonDetails.put("DocLineNo",orderDetailsEntity.getDocLineNo());//行号
|
||||||
|
jsonDetails.put("ItemCode",orderDetailsEntity.getItemCode());//料号
|
||||||
|
String freeType=null;
|
||||||
|
if(StrUtil.isEmpty(orderDetailsEntity.getFreeType())){
|
||||||
|
freeType="-1";
|
||||||
|
} else if(orderDetailsEntity.getFreeType().equals("-7818294496872217619")){
|
||||||
|
freeType="0";
|
||||||
|
}else if(orderDetailsEntity.getFreeType().equals("6443958972472642867")){
|
||||||
|
freeType="1";
|
||||||
|
}
|
||||||
|
jsonDetails.put("FreeType",freeType);//免费品类型
|
||||||
|
jsonDetails.put("Project",orderEntity.getProject());//项目
|
||||||
|
jsonDetails.put("OrderByQtyTU",orderDetailsEntity.getOrderByQtyTU());//数量
|
||||||
|
jsonDetails.put("TU",orderDetailsEntity.gettU());//销售单位编码
|
||||||
|
jsonDetails.put("FinallyPriceTC",orderDetailsEntity.getFinallyPriceTC());//最终价
|
||||||
|
jsonDetails.put("TaxSchedule",orderDetailsEntity.getTaxSchedule());//税组合
|
||||||
|
jsonDetails.put("ShipTogetherFlag","-1");//成套发货标志
|
||||||
|
jsonDetails.put("Memo",orderDetailsEntity.getMemo());//备注
|
||||||
|
jsonDetails.put("RecTermCode",orderDetailsEntity.getRecTermCode());//收款条件
|
||||||
|
JSONObject jsonDesc=new JSONObject();
|
||||||
|
boolean falg=true;
|
||||||
|
if(StrUtil.isEmpty(orderDetailsEntity.getPrivateDescSeg1()) || !orderDetailsEntity.getPrivateDescSeg1().equals("5634606992081569853")){
|
||||||
|
falg=false;
|
||||||
|
} else{
|
||||||
|
falg=true;
|
||||||
|
}
|
||||||
|
jsonDesc.put("PrivateDescSeg1",falg);//是否处理
|
||||||
|
jsonDesc.put("PrivateDescSeg2",orderDetailsEntity.getPrivateDescSeg2());//项目明细
|
||||||
|
jsonDesc.put("PubDescSeg5",orderDetailsEntity.getPrivateDescSeg5());//厂区明细id
|
||||||
|
jsonDesc.put("PubDescSeg1",orderDetailsEntity.getPubDescSeg1());//合同号明细
|
||||||
|
jsonDetails.put("DescFlexField",jsonDesc);
|
||||||
|
JSONArray jsonArrayLineDTO=new JSONArray();
|
||||||
|
JSONObject jsonObjectShiplineDTO=new JSONObject();
|
||||||
|
jsonObjectShiplineDTO.put("DocSubLineNo",orderDetailsEntity.getDocLineNo());//行号
|
||||||
|
jsonObjectShiplineDTO.put("ItemCode",orderDetailsEntity.getItemCode());//料号
|
||||||
|
jsonObjectShiplineDTO.put("RequireDate",orderDetailsEntity.getRequireDate());//交期
|
||||||
|
jsonObjectShiplineDTO.put("DemandType",orderDetailsEntity.getDemandType());//需求分类
|
||||||
|
jsonObjectShiplineDTO.put("Memo",orderDetailsEntity.getMemo());//备注
|
||||||
|
jsonArrayLineDTO.add(jsonObjectShiplineDTO);
|
||||||
|
jsonDetails.put("SOShiplineDTOList",jsonArrayLineDTO);
|
||||||
|
jsonArray.add(jsonDetails);
|
||||||
|
jsonMain.put("SOLineDTOList",jsonArray);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String token = acquireTokenService.getToken();
|
||||||
|
logger.info("======获取得德广信U9Ctoken为:{}=====",token);
|
||||||
|
if(StrUtil.isNotEmpty(token)) {
|
||||||
|
String params = jsonMain.toJSONString();
|
||||||
|
JSONObject jsonObject1 = JSONObject.parseObject(params);
|
||||||
|
JSONArray jsonArray1 = new JSONArray();
|
||||||
|
jsonArray1.add(jsonObject1);
|
||||||
|
String jsonStr = String.valueOf(jsonArray1);
|
||||||
|
//调用U9C销售订单新增接口
|
||||||
|
logger.info("====OA销售订单传递德广信U9C得请求参数为:{}======", jsonStr);
|
||||||
|
String body = HttpRequest.post(URLTEST + "/U9C/webapi/SO/Create").header("token", token).header("content-type", "application/json").body(jsonStr).execute().body();
|
||||||
|
logger.info("====OA销售订单传递德广信U9C得返回参数为:{}======", body);
|
||||||
|
boolean flag=true;
|
||||||
|
JSONObject jsonBody = JSONObject.parseObject(body);
|
||||||
|
if(jsonBody.getString("Success").equals("true")){
|
||||||
|
JSONArray jsonArrayData = jsonBody.getJSONArray("Data");
|
||||||
|
if(CollectionUtils.isNotEmpty(jsonArrayData)) {
|
||||||
|
JSONObject jsonData = JSON.parseObject(JSON.toJSONString(jsonArrayData.get(0)));
|
||||||
|
String mCode = jsonData.getString("m_code");
|
||||||
|
if (StrUtil.isNotEmpty(mCode)) {
|
||||||
|
flag=true;
|
||||||
|
}else{
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
//保存日志
|
||||||
|
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
|
||||||
|
taskLivingDetail.setCreate_time(new Date());
|
||||||
|
taskLivingDetail.setModify_time(new Date());
|
||||||
|
taskLivingDetail.setRootAppPk(orderEntity.getId());
|
||||||
|
taskLivingDetail.setRootAppBill(orderEntity.getDocNo());
|
||||||
|
taskLivingDetail.setId(json.getString("details_id"));
|
||||||
|
taskLivingDetail.setPluginId("SalesOrderPluginInitializer");
|
||||||
|
taskLivingDetail.setRootAppNewData(jsonStr);
|
||||||
|
taskLivingDetail.setNewTransmitInfo(body);
|
||||||
|
taskLivingDetail.setNewPushDate(new Date());
|
||||||
|
saveLog(json.getString("id"), flag, taskLivingDetail);
|
||||||
|
|
||||||
|
if(jsonBody.getString("Success").equals("true")){
|
||||||
|
JSONArray jsonArrayData = jsonBody.getJSONArray("Data");
|
||||||
|
if(CollectionUtils.isNotEmpty(jsonArrayData)) {
|
||||||
|
JSONObject jsonData = JSON.parseObject(JSON.toJSONString(jsonArrayData.get(0)));
|
||||||
|
String mCode = jsonData.getString("m_code");
|
||||||
|
logger.info("=====德广信U9C销售订单新增返回得销售订单号为:{}===", mCode);
|
||||||
|
if (StrUtil.isNotEmpty(mCode)) {
|
||||||
|
orderEntity.setPushStatus(mCode);
|
||||||
|
logger.info("========开始更新销售订单推送标识为成功=========");
|
||||||
|
//更新销售订单推送状态
|
||||||
|
salesOrderDao.updateSalesOrderStatus(orderEntity);
|
||||||
|
logger.info("======销售订单推送状态更新成功完毕=======");
|
||||||
|
return BaseResult.getSuccessMessageEntity("销售订单推送成功",mCode);
|
||||||
|
}else{
|
||||||
|
logger.info("=========OA销售订单推送失败,开始更新销售订单推送标识为失败:{}=====",jsonBody.getString("ResMsg"));
|
||||||
|
orderEntity.setPushStatus("2");
|
||||||
|
salesOrderDao.updateSalesOrderStatus(orderEntity);
|
||||||
|
return BaseResult.getFailureMessageEntity("销售订单推送失败");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
logger.info("=========OA销售订单推送失败,开始更新销售订单推送标识为失败:{}=====",jsonBody.getString("ResMsg"));
|
||||||
|
orderEntity.setPushStatus("2");
|
||||||
|
salesOrderDao.updateSalesOrderStatus(orderEntity);
|
||||||
|
return BaseResult.getFailureMessageEntity("销售订单推送失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
logger.info("=========OA销售订单推送失败,开始更新销售订单推送标识为失败:{}=====",jsonBody.getString("ResMsg"));
|
||||||
|
orderEntity.setPushStatus("2");
|
||||||
|
salesOrderDao.updateSalesOrderStatus(orderEntity);
|
||||||
|
return BaseResult.getFailureMessageEntity("销售订单推送失败");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
logger.info("=========获取德广信U9Ctkoen失败====");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("======查询OA已审核得销售订单失败:{}====",e.getMessage());
|
||||||
|
return BaseResult.getFailureMessageEntity("查询OA已审核得销售订单失败");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void saveLog(String integration_task_living_details_id, Boolean flag, IntegrationTaskLivingDetailsEntity taskLivingDetail) {
|
||||||
|
try {
|
||||||
|
//判断,成功调用这个方法
|
||||||
|
if (StrUtil.isEmpty(integration_task_living_details_id)) {
|
||||||
|
if (flag) {
|
||||||
|
taskLivingDetailsService.saveLogToSuccess(taskLivingDetail);
|
||||||
|
} else {
|
||||||
|
//失败 调用这个方法
|
||||||
|
taskLivingDetailsService.saveLogToFail(taskLivingDetail);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (flag) {
|
||||||
|
//如果是重试 成功调这个方法
|
||||||
|
taskLivingDetailsService.saveLogFailToSuccess(taskLivingDetail);
|
||||||
|
} else {
|
||||||
|
//如果是重试 失败调这个方法
|
||||||
|
taskLivingDetailsService.updateLogFailToSuccess(taskLivingDetail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("保存日志出错:{}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,129 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.oa.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.JSONObject;
|
||||||
|
import com.hzya.frame.plugin.dgx.oa.service.ISeeYonInterFace;
|
||||||
|
import com.hzya.frame.stringutil.StringUtil;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import com.hzya.frame.web.exception.BaseSystemException;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @version 1.0
|
||||||
|
* @content
|
||||||
|
* @date 2023-08-22 9:30
|
||||||
|
*/
|
||||||
|
@Service(value = "seeYonInterFace")
|
||||||
|
public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(SeeYonInterFaceImpl.class);
|
||||||
|
/*** rest 用户名*/
|
||||||
|
private static final String RESTUSERNAME = "hzyaRest";
|
||||||
|
/*** rest 密码*/
|
||||||
|
private static final String RESTPASSWORD = "a5ce21b8-91db-4cec-b3e3-3e44719655fd";
|
||||||
|
|
||||||
|
private static final String sendUrl = "http://xxxx/seeyon/";
|
||||||
|
|
||||||
|
/****
|
||||||
|
* @Content:发起无流程表单接口实现
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2019/12/23 17:03
|
||||||
|
* @Param [templateCode 模版编码, sendLoginName 发送人登录帐号 ,xmlData ]
|
||||||
|
* @return java.lang.Integer
|
||||||
|
**/
|
||||||
|
public static JsonResultEntity saveNoProcess(String templateCode , String interfaceUrl,String sendLoginName, String xmlData) {
|
||||||
|
String token = getToken(RESTUSERNAME, RESTPASSWORD, sendLoginName);
|
||||||
|
Map res = new HashMap();
|
||||||
|
res.put("loginName", sendLoginName);
|
||||||
|
res.put("dataXml", xmlData);
|
||||||
|
res.put("token", token);
|
||||||
|
String result = HttpRequest.post(sendUrl + interfaceUrl + templateCode).header("token", token).body(JSON.toJSONString(res)).execute().body();
|
||||||
|
logger.info("无流程表单执行结果:" + result);
|
||||||
|
return BaseResult.getFailureMessageEntity("执行成功", result);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getToken(String userName, String password, String loginName) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
/** 获取token*/
|
||||||
|
|
||||||
|
jsonObject.put("userName", userName);
|
||||||
|
jsonObject.put("password", password);
|
||||||
|
jsonObject.put("loginName", loginName);
|
||||||
|
logger.info("请求获取token开始---------------------------------------------");
|
||||||
|
logger.info("请求参数" + jsonObject.toJSONString());
|
||||||
|
String result = HttpUtil.post(sendUrl + "rest/token", jsonObject.toJSONString());
|
||||||
|
logger.info("获取token结果---------------------------------------------" + result);
|
||||||
|
logger.info("获取token结果---------------------------------------------" + result);
|
||||||
|
jsonObject = JSONObject.parseObject(result);
|
||||||
|
if ("".equals(result) || result == null) {
|
||||||
|
logger.info("获取token失败!");
|
||||||
|
throw new RuntimeException("获取token失败!");
|
||||||
|
} else {
|
||||||
|
String token = jsonObject.get("id").toString();
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity thirdInterfaceSend(JSONObject requestData) {
|
||||||
|
JSONObject jsonStr = requestData.getJSONObject("jsonStr");
|
||||||
|
if (ObjectUtils.isEmpty(jsonStr)) {
|
||||||
|
throw new BaseSystemException("jsonStr为空!请传递参数");
|
||||||
|
}
|
||||||
|
//类型 flow archives
|
||||||
|
String type = jsonStr.getString("type");
|
||||||
|
if (StringUtils.isEmpty(type)) {
|
||||||
|
throw new BaseSystemException("请传递类型!type 流程表单:flow 基础档案:archives");
|
||||||
|
}
|
||||||
|
//模版编号
|
||||||
|
String templateCode = jsonStr.getString("templateCode");
|
||||||
|
if (StringUtils.isEmpty(templateCode)) {
|
||||||
|
throw new BaseSystemException("请传入模版编号!templateCode不允许为空");
|
||||||
|
}
|
||||||
|
String attributeArrayStr = jsonStr.getString("attribute");
|
||||||
|
if (StringUtils.isEmpty(attributeArrayStr)) {
|
||||||
|
throw new BaseSystemException("attribute不允许为空");
|
||||||
|
}
|
||||||
|
List<JSONObject> attributeArray = JSON.parseArray(attributeArrayStr, JSONObject.class);
|
||||||
|
JsonResultEntity result = null;
|
||||||
|
for (JSONObject jsonObject : attributeArray){
|
||||||
|
String dataXml = createCfsTempData(jsonObject);
|
||||||
|
String loginName = "seeyon";
|
||||||
|
Map res = new HashMap();
|
||||||
|
res.put("loginName", loginName);
|
||||||
|
res.put("dataXml", dataXml);
|
||||||
|
result = saveNoProcess( "formmain_0527","rest/form/import/", loginName, dataXml);
|
||||||
|
logger.info("日志模板发起无流程表单结果:" + result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String createCfsTempData(JSONObject jsonObject){
|
||||||
|
String xml = "<forms version=\"2.1\"><formExport><summary id=\"-8308614817594585886\" name=\"formmain_0527\"/><definitions><column id=\"field0004\" type=\"0\" name=\"表单名称\" isNullable=\"false\" length=\"100\"/><column id=\"field0005\" type=\"0\" name=\"数据库表名\" isNullable=\"false\" length=\"100\"/><column id=\"field0006\" type=\"0\" name=\"表单ID\" isNullable=\"false\" length=\"100\"/><column id=\"field0007\" type=\"0\" name=\"表单编号\" isNullable=\"false\" length=\"100\"/><column id=\"field0008\" type=\"0\" name=\"流程标题\" isNullable=\"false\" length=\"100\"/><column id=\"field0009\" type=\"0\" name=\"事件类型\" isNullable=\"false\" length=\"100\"/><column id=\"field0010\" type=\"0\" name=\"formApp\" isNullable=\"false\" length=\"100\"/><column id=\"field0011\" type=\"0\" name=\"推送结果\" isNullable=\"false\" length=\"100\"/><column id=\"field0012\" type=\"0\" name=\"流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0013\" type=\"0\" name=\"返回信息\" isNullable=\"false\" length=\"100\"/></definitions><values><column name=\"表单名称\"><value><![CDATA[{}]]></value></column><column name=\"数据库表名\"><value><![CDATA[{}]]></value></column><column name=\"表单ID\"><value><![CDATA[{}]]></value></column><column name=\"表单编号\"><value><![CDATA[{}]]></value></column><column name=\"流程标题\"><value><![CDATA[{}]]></value></column><column name=\"事件类型\"><value><![CDATA[{}]]></value></column><column name=\"formApp\"><value><![CDATA[{}]]></value></column><column name=\"推送结果\"><value><![CDATA[{}]]></value></column><column name=\"流水号\"><value><![CDATA[{}]]></value></column><column name=\"返回信息\"><value><![CDATA[{}]]></value></column></values><subForms/></formExport></forms>";
|
||||||
|
String tabNameCh = StringUtil.nullConvert(jsonObject.getString("tab_name_ch"));
|
||||||
|
String tabNameEn = StringUtil.nullConvert(jsonObject.getString("tab_name_en"));
|
||||||
|
String id = StringUtil.nullConvert(jsonObject.getString("id"));
|
||||||
|
String billCode = StringUtil.nullConvert(jsonObject.getString("bill_code"));
|
||||||
|
String title = StringUtil.nullConvert(jsonObject.getString("title"));
|
||||||
|
String eventType = StringUtil.nullConvert(jsonObject.getString("event_type"));
|
||||||
|
String formApp = StringUtil.nullConvert(jsonObject.getString("form_app_id"));
|
||||||
|
String mErrorMsg = StringUtil.nullConvert(jsonObject.getString("m_errorMsg"));
|
||||||
|
String mId = StringUtil.nullConvert(jsonObject.getString("m_iD"));
|
||||||
|
String mCode = StringUtil.nullConvert(jsonObject.getString("m_code"));
|
||||||
|
String result = StringUtil.nullConvert(jsonObject.getString("result"));
|
||||||
|
String dataXml = StrUtil.format(xml,tabNameCh,tabNameEn,id,billCode,title,eventType,formApp,mErrorMsg,mId,mCode,result);
|
||||||
|
return dataXml;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.OaEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
public interface IOaDao extends IBaseDao<OaEntity,String> {
|
||||||
|
/**
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 查询oa请款单
|
||||||
|
* @Date 2:56 下午 2024/11/14
|
||||||
|
* @param oaEntity
|
||||||
|
* @return java.util.List<com.hzya.frame.plugin.dgx.u9c.entity.OaEntity>
|
||||||
|
**/
|
||||||
|
List<OaEntity> queryQkdList(OaEntity oaEntity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 修改oa请款单
|
||||||
|
* @Date 2:56 下午 2024/11/14
|
||||||
|
* @param oaEntity
|
||||||
|
* @return java.util.List<com.hzya.frame.plugin.dgx.u9c.entity.OaEntity>
|
||||||
|
**/
|
||||||
|
Integer updateQkd(OaEntity oaEntity);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 查询oa请购单
|
||||||
|
* @Date 2:56 下午 2024/11/14
|
||||||
|
* @param oaEntity
|
||||||
|
* @return java.util.List<com.hzya.frame.plugin.dgx.u9c.entity.OaEntity>
|
||||||
|
**/
|
||||||
|
List<OaEntity> queryQgdList(OaEntity oaEntity);
|
||||||
|
/**
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 修改oa请购单
|
||||||
|
* @Date 2:56 下午 2024/11/14
|
||||||
|
* @param oaEntity
|
||||||
|
* @return java.util.List<com.hzya.frame.plugin.dgx.u9c.entity.OaEntity>
|
||||||
|
**/
|
||||||
|
Integer updateQgd(OaEntity oaEntity);
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 14:35
|
||||||
|
**/
|
||||||
|
public interface IPrepaymentDao extends IBaseDao<PrepaymentEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentDetailEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单明细表
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 17:18
|
||||||
|
**/
|
||||||
|
public interface IPrepaymentDetailDao extends IBaseDao<PrepaymentDetailEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentSuppEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单明细表 第一个页签 供应商明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/10/14 13:41
|
||||||
|
**/
|
||||||
|
public interface IPrepaymentSuppDao extends IBaseDao<PrepaymentSuppEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.RequisitionEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C请购单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 14:08
|
||||||
|
**/
|
||||||
|
public interface IRequisitionDao extends IBaseDao<RequisitionEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.RequisitionDetailEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C请购单明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 17:15
|
||||||
|
**/
|
||||||
|
public interface IRequisitionDetailDao extends IBaseDao<RequisitionDetailEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IOaDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.OaEntity;
|
||||||
|
import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class OaDaoImpl extends MybatisGenericDao<OaEntity,String> implements IOaDao {
|
||||||
|
/**
|
||||||
|
* @param entity
|
||||||
|
* @return java.util.List<com.hzya.frame.plugin.dgx.u9c.entity.OaEntity>
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 查询oa请款单
|
||||||
|
* @Date 2:56 下午 2024/11/14
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
public List<OaEntity> queryQkdList(OaEntity entity) {
|
||||||
|
List<OaEntity> o = (List<OaEntity>) super.selectList(getSqlIdPrifx() + "queryQkdList", entity);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param entity
|
||||||
|
* @return java.util.List<com.hzya.frame.plugin.dgx.u9c.entity.OaEntity>
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 修改oa请款单
|
||||||
|
* @Date 2:56 下午 2024/11/14
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
public Integer updateQkd(OaEntity entity) {
|
||||||
|
Integer o = super.update(getSqlIdPrifx() + "updateQkd", entity);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param entity
|
||||||
|
* @return java.util.List<com.hzya.frame.plugin.dgx.u9c.entity.OaEntity>
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 查询oa请购单
|
||||||
|
* @Date 2:56 下午 2024/11/14
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
public List<OaEntity> queryQgdList(OaEntity entity) {
|
||||||
|
List<OaEntity> o = (List<OaEntity>) super.selectList(getSqlIdPrifx() + "queryQgdList", entity);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param entity
|
||||||
|
* @return java.util.List<com.hzya.frame.plugin.dgx.u9c.entity.OaEntity>
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 修改oa请购单
|
||||||
|
* @Date 2:56 下午 2024/11/14
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
public Integer updateQgd(OaEntity entity) {
|
||||||
|
Integer o = super.update(getSqlIdPrifx() + "updateQgd", entity);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IPrepaymentDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 14:38
|
||||||
|
**/
|
||||||
|
public class PrepaymentDaoImpl extends MybatisGenericDao<PrepaymentEntity,String> implements IPrepaymentDao {
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IPrepaymentDetailDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentDetailEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单明细表
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 17:19
|
||||||
|
**/
|
||||||
|
public class PrepaymentDetailDaoImpl extends MybatisGenericDao<PrepaymentDetailEntity,String> implements IPrepaymentDetailDao {
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IPrepaymentSuppDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentSuppEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单明细表 第一个页签 供应商明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/10/14 13:42
|
||||||
|
**/
|
||||||
|
public class PrepaymentSuppDaoImpl extends MybatisGenericDao<PrepaymentSuppEntity,String> implements IPrepaymentSuppDao {
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IRequisitionDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.RequisitionEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 14:10
|
||||||
|
**/
|
||||||
|
public class RequisitionDaoImpl extends MybatisGenericDao<RequisitionEntity,String> implements IRequisitionDao {
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IRequisitionDetailDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.RequisitionDetailEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C请购单明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 17:17
|
||||||
|
**/
|
||||||
|
public class RequisitionDetailDaoImpl extends MybatisGenericDao<RequisitionDetailEntity,String> implements IRequisitionDetailDao {
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description Oa
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 14:08
|
||||||
|
**/
|
||||||
|
public class OaEntity extends BaseEntity {
|
||||||
|
|
||||||
|
//id
|
||||||
|
private String id;
|
||||||
|
//单号
|
||||||
|
private String docNo;
|
||||||
|
//单据状态code
|
||||||
|
private String status;
|
||||||
|
//推送状态
|
||||||
|
private String sendStatus;
|
||||||
|
//推送描述
|
||||||
|
private String sendMsg;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocNo() {
|
||||||
|
return docNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocNo(String docNo) {
|
||||||
|
this.docNo = docNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSendStatus() {
|
||||||
|
return sendStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendStatus(String sendStatus) {
|
||||||
|
this.sendStatus = sendStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSendMsg() {
|
||||||
|
return sendMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendMsg(String sendMsg) {
|
||||||
|
this.sendMsg = sendMsg;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?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.dgx.u9c.dao.impl.OaDaoImpl">
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="queryQkdList" resultType="com.hzya.frame.plugin.dgx.u9c.entity.OaEntity" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.OaEntity">
|
||||||
|
select
|
||||||
|
formmain_0664.id,
|
||||||
|
formmain_0664.field0003 as docNo,
|
||||||
|
COL_SUMMARY.STATE as status
|
||||||
|
from formmain_0664
|
||||||
|
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0664.id
|
||||||
|
WHERE
|
||||||
|
<if test="id != null and id != ''"> id = #{id} </if>
|
||||||
|
<if test=" id == null or id == ''.toString() "> formmain_0664.field0074 is NULL </if>
|
||||||
|
and COL_SUMMARY.STATE in ( '1','3','0')
|
||||||
|
and formmain_0664.finishedflag = 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateQkd" parameterType="com.hzya.frame.plugin.dgx.u9c.entity.OaEntity">
|
||||||
|
update formmain_0664 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="sendStatus != null and sendStatus != ''"> field0074 = #{sendStatus},</if>
|
||||||
|
<if test="sendMsg != null and sendMsg != ''"> field0075 = #{sendMsg},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="queryQgdList" resultType="com.hzya.frame.plugin.dgx.u9c.entity.OaEntity" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.OaEntity">
|
||||||
|
select
|
||||||
|
formmain_0673.id,
|
||||||
|
formmain_0673.field0007 as docNo,
|
||||||
|
COL_SUMMARY.STATE as status
|
||||||
|
from formmain_0673
|
||||||
|
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0673.id
|
||||||
|
WHERE
|
||||||
|
<if test="id != null and id != ''"> id = #{id} </if>
|
||||||
|
<if test=" id == null or id == ''.toString() "> formmain_0673.field0032 is NULL </if>
|
||||||
|
and COL_SUMMARY.STATE in ( '1','3','0')
|
||||||
|
and formmain_0673.finishedflag = 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateQgd" parameterType="com.hzya.frame.plugin.dgx.u9c.entity.OaEntity">
|
||||||
|
update formmain_0673 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="sendStatus != null and sendStatus != ''"> field0032 = #{sendStatus},</if>
|
||||||
|
<if test="sendMsg != null and sendMsg != ''"> field0033 = #{sendMsg},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,321 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单明细(请款单) 请款明细 第2个页签
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 17:11
|
||||||
|
**/
|
||||||
|
public class PrepaymentDetailEntity extends BaseEntity {
|
||||||
|
// 主表id
|
||||||
|
private String mainId;
|
||||||
|
// 单据类型明细
|
||||||
|
private String docType;
|
||||||
|
// 应付单
|
||||||
|
private String docCode;
|
||||||
|
// 折扣前可请款金额
|
||||||
|
private String canDisposeMoney;
|
||||||
|
// 请款对应折扣
|
||||||
|
private String rfDisCount;
|
||||||
|
// 折扣前请款金额明细
|
||||||
|
private String rfTotalMoney;
|
||||||
|
// 折扣后请款金额明细
|
||||||
|
private String raTotalMoney;
|
||||||
|
// 累计确认对应金额
|
||||||
|
private String cfmMoney;
|
||||||
|
// 发票号
|
||||||
|
private String invoiceNum;
|
||||||
|
// 发票日期
|
||||||
|
private String invoiceDate;
|
||||||
|
// 立账日期
|
||||||
|
private String accrueDate;
|
||||||
|
// 记账期间
|
||||||
|
private String postPeriod;
|
||||||
|
// 到期日
|
||||||
|
private String maturity;
|
||||||
|
// 付款条件 ID
|
||||||
|
private String payTermId;
|
||||||
|
// 付款条件 code
|
||||||
|
private String payTermCode;
|
||||||
|
// 付款条件 name
|
||||||
|
private String payTermName;
|
||||||
|
// 部门明细 code
|
||||||
|
private String detpCode;
|
||||||
|
// 部门明细
|
||||||
|
private String detpName;
|
||||||
|
// 业务员明细 code
|
||||||
|
private String transactorCode;
|
||||||
|
// 业务员明细
|
||||||
|
private String transactorName;
|
||||||
|
// 料号 ID
|
||||||
|
private String itemId;
|
||||||
|
// 料号 code
|
||||||
|
private String itemCode;
|
||||||
|
// 料号
|
||||||
|
private String itemName;
|
||||||
|
// 项目 ID
|
||||||
|
private String projectId;
|
||||||
|
// 项目 code
|
||||||
|
private String projectCode;
|
||||||
|
// 项目
|
||||||
|
private String projectName;
|
||||||
|
// 立账供应商 id
|
||||||
|
private String suppId;
|
||||||
|
// 立账供应商 code
|
||||||
|
private String suppCode;
|
||||||
|
// 立账供应商
|
||||||
|
private String suppName;
|
||||||
|
|
||||||
|
//用途code
|
||||||
|
private String reqFundUseCode;
|
||||||
|
//用途name
|
||||||
|
private String reqFundUseName;
|
||||||
|
public String getMainId() {
|
||||||
|
return mainId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMainId(String mainId) {
|
||||||
|
this.mainId = mainId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocType() {
|
||||||
|
return docType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocType(String docType) {
|
||||||
|
this.docType = docType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocCode() {
|
||||||
|
return docCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocCode(String docCode) {
|
||||||
|
this.docCode = docCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCanDisposeMoney() {
|
||||||
|
return canDisposeMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanDisposeMoney(String canDisposeMoney) {
|
||||||
|
this.canDisposeMoney = canDisposeMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRfDisCount() {
|
||||||
|
return rfDisCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRfDisCount(String rfDisCount) {
|
||||||
|
this.rfDisCount = rfDisCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRfTotalMoney() {
|
||||||
|
return rfTotalMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRfTotalMoney(String rfTotalMoney) {
|
||||||
|
this.rfTotalMoney = rfTotalMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRaTotalMoney() {
|
||||||
|
return raTotalMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRaTotalMoney(String raTotalMoney) {
|
||||||
|
this.raTotalMoney = raTotalMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCfmMoney() {
|
||||||
|
return cfmMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCfmMoney(String cfmMoney) {
|
||||||
|
this.cfmMoney = cfmMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvoiceNum() {
|
||||||
|
return invoiceNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInvoiceNum(String invoiceNum) {
|
||||||
|
this.invoiceNum = invoiceNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvoiceDate() {
|
||||||
|
return invoiceDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInvoiceDate(String invoiceDate) {
|
||||||
|
this.invoiceDate = invoiceDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAccrueDate() {
|
||||||
|
return accrueDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccrueDate(String accrueDate) {
|
||||||
|
this.accrueDate = accrueDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPostPeriod() {
|
||||||
|
return postPeriod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPostPeriod(String postPeriod) {
|
||||||
|
this.postPeriod = postPeriod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaturity() {
|
||||||
|
return maturity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaturity(String maturity) {
|
||||||
|
this.maturity = maturity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayTermId() {
|
||||||
|
return payTermId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayTermId(String payTermId) {
|
||||||
|
this.payTermId = payTermId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayTermCode() {
|
||||||
|
return payTermCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayTermCode(String payTermCode) {
|
||||||
|
this.payTermCode = payTermCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayTermName() {
|
||||||
|
return payTermName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayTermName(String payTermName) {
|
||||||
|
this.payTermName = payTermName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDetpCode() {
|
||||||
|
return detpCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetpCode(String detpCode) {
|
||||||
|
this.detpCode = detpCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDetpName() {
|
||||||
|
return detpName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetpName(String detpName) {
|
||||||
|
this.detpName = detpName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactorCode() {
|
||||||
|
return transactorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactorCode(String transactorCode) {
|
||||||
|
this.transactorCode = transactorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactorName() {
|
||||||
|
return transactorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactorName(String transactorName) {
|
||||||
|
this.transactorName = transactorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemId() {
|
||||||
|
return itemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemId(String itemId) {
|
||||||
|
this.itemId = itemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemCode() {
|
||||||
|
return itemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemCode(String itemCode) {
|
||||||
|
this.itemCode = itemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemName() {
|
||||||
|
return itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemName(String itemName) {
|
||||||
|
this.itemName = itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProjectId() {
|
||||||
|
return projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectId(String projectId) {
|
||||||
|
this.projectId = projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProjectCode() {
|
||||||
|
return projectCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectCode(String projectCode) {
|
||||||
|
this.projectCode = projectCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProjectName() {
|
||||||
|
return projectName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectName(String projectName) {
|
||||||
|
this.projectName = projectName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppId() {
|
||||||
|
return suppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppId(String suppId) {
|
||||||
|
this.suppId = suppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppCode() {
|
||||||
|
return suppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppCode(String suppCode) {
|
||||||
|
this.suppCode = suppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppName() {
|
||||||
|
return suppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppName(String suppName) {
|
||||||
|
this.suppName = suppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReqFundUseCode() {
|
||||||
|
return reqFundUseCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReqFundUseCode(String reqFundUseCode) {
|
||||||
|
this.reqFundUseCode = reqFundUseCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReqFundUseName() {
|
||||||
|
return reqFundUseName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReqFundUseName(String reqFundUseName) {
|
||||||
|
this.reqFundUseName = reqFundUseName;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,151 @@
|
||||||
|
<?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.dgx.u9c.dao.impl.PrepaymentDetailDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-PrepaymentDetailEntity-result" type="com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentDetailEntity" >
|
||||||
|
<result property="mainId" column="mainId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="docType" column="docType" jdbcType="VARCHAR"/>
|
||||||
|
<result property="docCode" column="docCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="canDisposeMoney" column="canDisposeMoney" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rfDisCount" column="rfDisCount" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rfTotalMoney" column="rfTotalMoney" jdbcType="VARCHAR"/>
|
||||||
|
<result property="raTotalMoney" column="raTotalMoney" jdbcType="VARCHAR"/>
|
||||||
|
<result property="cfmMoney" column="cfmMoney" jdbcType="VARCHAR"/>
|
||||||
|
<result property="invoiceNum" column="invoiceNum" jdbcType="VARCHAR"/>
|
||||||
|
<result property="invoiceDate" column="invoiceDate" jdbcType="VARCHAR"/>
|
||||||
|
<result property="accrueDate" column="accrueDate" jdbcType="VARCHAR"/>
|
||||||
|
<result property="postPeriod" column="postPeriod" jdbcType="VARCHAR"/>
|
||||||
|
<result property="maturity" column="maturity" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payTermId" column="payTermId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payTermCode" column="payTermCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payTermName" column="payTermName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="detpCode" column="detpCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="detpName" column="detpName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="transactorCode" column="transactorCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="transactorName" column="transactorName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="itemId" column="itemId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="itemCode" column="itemCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="itemName" column="itemName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="projectId" column="projectId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="projectCode" column="projectCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="projectName" column="projectName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppId" column="suppId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppCode" column="suppCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppName" column="suppName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="reqFundUseCode" column="reqFundUseCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="reqFundUseName" column="reqFundUseName" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "PrepaymentDetailEntity_Base_Column_List">
|
||||||
|
mainId,
|
||||||
|
docType,
|
||||||
|
docCode,
|
||||||
|
canDisposeMoney,
|
||||||
|
rfDisCount,
|
||||||
|
rfTotalMoney,
|
||||||
|
raTotalMoney,
|
||||||
|
cfmMoney,
|
||||||
|
invoiceNum,
|
||||||
|
invoiceDate,
|
||||||
|
accrueDate,
|
||||||
|
postPeriod,
|
||||||
|
maturity,
|
||||||
|
payTermId,
|
||||||
|
payTermCode,
|
||||||
|
payTermName,
|
||||||
|
detpCode,
|
||||||
|
detpName,
|
||||||
|
transactorCode,
|
||||||
|
transactorName,
|
||||||
|
itemId,
|
||||||
|
itemCode,
|
||||||
|
itemName,
|
||||||
|
projectId,
|
||||||
|
projectCode,
|
||||||
|
projectName,
|
||||||
|
reqFundUseCode,
|
||||||
|
reqFundUseName,
|
||||||
|
suppId,
|
||||||
|
suppCode,
|
||||||
|
suppName
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-PrepaymentDetailEntity-result" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentDetailEntity">
|
||||||
|
select
|
||||||
|
<include refid="PrepaymentDetailEntity_Base_Column_List" />
|
||||||
|
from v_hzya_u9c_payreq_detail
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="mainId!= null and mainId!= ''"> and mainId = #{mainId}</if>
|
||||||
|
<if test="docType!= null and docType!= ''"> and docType = #{docType}</if>
|
||||||
|
<if test="docCode!= null and docCode!= ''"> and docCode = #{docCode}</if>
|
||||||
|
<if test="canDisposeMoney!= null and canDisposeMoney!= ''"> and canDisposeMoney = #{canDisposeMoney}</if>
|
||||||
|
<if test="rfDisCount!= null and rfDisCount!= ''"> and rfDisCount = #{rfDisCount}</if>
|
||||||
|
<if test="rfTotalMoney!= null and rfTotalMoney!= ''"> and rfTotalMoney = #{rfTotalMoney}</if>
|
||||||
|
<if test="raTotalMoney!= null and raTotalMoney!= ''"> and raTotalMoney = #{raTotalMoney}</if>
|
||||||
|
<if test="cfmMoney!= null and cfmMoney!= ''"> and cfmMoney = #{cfmMoney}</if>
|
||||||
|
<if test="invoiceNum!= null and invoiceNum!= ''"> and invoiceNum = #{invoiceNum}</if>
|
||||||
|
<if test="invoiceDate!= null and invoiceDate!= ''"> and invoiceDate = #{invoiceDate}</if>
|
||||||
|
<if test="accrueDate!= null and accrueDate!= ''"> and accrueDate = #{accrueDate}</if>
|
||||||
|
<if test="postPeriod!= null and postPeriod!= ''"> and postPeriod = #{postPeriod}</if>
|
||||||
|
<if test="maturity!= null and maturity!= ''"> and maturity = #{maturity}</if>
|
||||||
|
<if test="payTermId!= null and payTermId!= ''"> and payTermId = #{payTermId}</if>
|
||||||
|
<if test="payTermCode!= null and payTermCode!= ''"> and payTermCode = #{payTermCode}</if>
|
||||||
|
<if test="payTermName!= null and payTermName!= ''"> and payTermName = #{payTermName}</if>
|
||||||
|
<if test="detpCode!= null and detpCode!= ''"> and detpCode = #{detpCode}</if>
|
||||||
|
<if test="detpName!= null and detpName!= ''"> and detpName = #{detpName}</if>
|
||||||
|
<if test="transactorCode!= null and transactorCode!= ''"> and transactorCode = #{transactorCode}</if>
|
||||||
|
<if test="transactorName!= null and transactorName!= ''"> and transactorName = #{transactorName}</if>
|
||||||
|
<if test="itemId!= null and itemId!= ''"> and itemId = #{itemId}</if>
|
||||||
|
<if test="itemCode!= null and itemCode!= ''"> and itemCode = #{itemCode}</if>
|
||||||
|
<if test="itemName!= null and itemName!= ''"> and itemName = #{itemName}</if>
|
||||||
|
<if test="projectId!= null and projectId!= ''"> and projectId = #{projectId}</if>
|
||||||
|
<if test="projectCode!= null and projectCode!= ''"> and projectCode = #{projectCode}</if>
|
||||||
|
<if test="projectName!= null and projectName!= ''"> and projectName = #{projectName}</if>
|
||||||
|
<if test="reqFundUseCode!= null and reqFundUseCode!= ''"> and reqFundUseCode = #{reqFundUseCode}</if>
|
||||||
|
<if test="reqFundUseName!= null and reqFundUseName!= ''"> and reqFundUseName = #{reqFundUseName}</if>
|
||||||
|
<if test="suppId!= null and suppId!= ''"> and suppId = #{suppId}</if>
|
||||||
|
<if test="suppCode!= null and suppCode!= ''"> and suppCode = #{suppCode}</if>
|
||||||
|
<if test="suppName!= null and suppName!= ''"> and suppName = #{suppName}</if>
|
||||||
|
</trim>
|
||||||
|
order by v_hzya_u9c_payreq_detail.mainId
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentDetailEntity">
|
||||||
|
select count(1) from v_hzya_u9c_payreq_detail
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="mainId!= null and mainId!= ''"> and mainId = #{mainId}</if>
|
||||||
|
<if test="docType!= null and docType!= ''"> and docType = #{docType}</if>
|
||||||
|
<if test="docCode!= null and docCode!= ''"> and docCode = #{docCode}</if>
|
||||||
|
<if test="canDisposeMoney!= null and canDisposeMoney!= ''"> and canDisposeMoney = #{canDisposeMoney}</if>
|
||||||
|
<if test="rfDisCount!= null and rfDisCount!= ''"> and rfDisCount = #{rfDisCount}</if>
|
||||||
|
<if test="rfTotalMoney!= null and rfTotalMoney!= ''"> and rfTotalMoney = #{rfTotalMoney}</if>
|
||||||
|
<if test="raTotalMoney!= null and raTotalMoney!= ''"> and raTotalMoney = #{raTotalMoney}</if>
|
||||||
|
<if test="cfmMoney!= null and cfmMoney!= ''"> and cfmMoney = #{cfmMoney}</if>
|
||||||
|
<if test="invoiceNum!= null and invoiceNum!= ''"> and invoiceNum = #{invoiceNum}</if>
|
||||||
|
<if test="invoiceDate!= null and invoiceDate!= ''"> and invoiceDate = #{invoiceDate}</if>
|
||||||
|
<if test="accrueDate!= null and accrueDate!= ''"> and accrueDate = #{accrueDate}</if>
|
||||||
|
<if test="postPeriod!= null and postPeriod!= ''"> and postPeriod = #{postPeriod}</if>
|
||||||
|
<if test="maturity!= null and maturity!= ''"> and maturity = #{maturity}</if>
|
||||||
|
<if test="payTermId!= null and payTermId!= ''"> and payTermId = #{payTermId}</if>
|
||||||
|
<if test="payTermCode!= null and payTermCode!= ''"> and payTermCode = #{payTermCode}</if>
|
||||||
|
<if test="payTermName!= null and payTermName!= ''"> and payTermName = #{payTermName}</if>
|
||||||
|
<if test="detpCode!= null and detpCode!= ''"> and detpCode = #{detpCode}</if>
|
||||||
|
<if test="detpName!= null and detpName!= ''"> and detpName = #{detpName}</if>
|
||||||
|
<if test="transactorCode!= null and transactorCode!= ''"> and transactorCode = #{transactorCode}</if>
|
||||||
|
<if test="transactorName!= null and transactorName!= ''"> and transactorName = #{transactorName}</if>
|
||||||
|
<if test="itemId!= null and itemId!= ''"> and itemId = #{itemId}</if>
|
||||||
|
<if test="itemCode!= null and itemCode!= ''"> and itemCode = #{itemCode}</if>
|
||||||
|
<if test="itemName!= null and itemName!= ''"> and itemName = #{itemName}</if>
|
||||||
|
<if test="projectId!= null and projectId!= ''"> and projectId = #{projectId}</if>
|
||||||
|
<if test="projectCode!= null and projectCode!= ''"> and projectCode = #{projectCode}</if>
|
||||||
|
<if test="projectName!= null and projectName!= ''"> and projectName = #{projectName}</if>
|
||||||
|
<if test="reqFundUseCode!= null and reqFundUseCode!= ''"> and reqFundUseCode = #{reqFundUseCode}</if>
|
||||||
|
<if test="reqFundUseName!= null and reqFundUseName!= ''"> and reqFundUseName = #{reqFundUseName}</if>
|
||||||
|
<if test="suppId!= null and suppId!= ''"> and suppId = #{suppId}</if>
|
||||||
|
<if test="suppCode!= null and suppCode!= ''"> and suppCode = #{suppCode}</if>
|
||||||
|
<if test="suppName!= null and suppName!= ''"> and suppName = #{suppName}</if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,297 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单(请款单)
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 14:36
|
||||||
|
**/
|
||||||
|
public class PrepaymentEntity extends BaseEntity {
|
||||||
|
|
||||||
|
//开始时间 查询用
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private String startTime;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
//结束时间 查询用
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
|
||||||
|
// 单据号
|
||||||
|
private String docNo;
|
||||||
|
//单据类型id
|
||||||
|
private String documentTypeId;
|
||||||
|
//单据类型code
|
||||||
|
private String documentTypeCode;
|
||||||
|
//单据类型name
|
||||||
|
private String documentTypeName;
|
||||||
|
// 业务员 id
|
||||||
|
private String transactorId;
|
||||||
|
// 业务员 code
|
||||||
|
private String transactorCode;
|
||||||
|
// 业务员 name
|
||||||
|
private String transactorName;
|
||||||
|
// 申请日期
|
||||||
|
private String payRFDate;
|
||||||
|
// 部门 id
|
||||||
|
private String deptId;
|
||||||
|
// 部门 code
|
||||||
|
private String deptCode;
|
||||||
|
// 部门 name
|
||||||
|
private String deptName;
|
||||||
|
// 预计付款日 _表头
|
||||||
|
private String expectPayDate;
|
||||||
|
// 付款方式 code
|
||||||
|
private String payModeCode;
|
||||||
|
// 付款对象 code
|
||||||
|
private String requestObjTypeCode;
|
||||||
|
// 状态 code
|
||||||
|
private String docStatusCode;
|
||||||
|
//状态name
|
||||||
|
private String docStatusName;
|
||||||
|
//出纳确认
|
||||||
|
private String cashierConfirmed;
|
||||||
|
//币种id
|
||||||
|
private String currencyId;
|
||||||
|
//币种code
|
||||||
|
private String currencyCode;
|
||||||
|
//币种name
|
||||||
|
private String currencyName;
|
||||||
|
//创建时间
|
||||||
|
private String createdOn;
|
||||||
|
//修改时间
|
||||||
|
private String modifiedOn;
|
||||||
|
//数据状态 1、成功 2、失败
|
||||||
|
private String dataStatus;
|
||||||
|
//数据状态描述
|
||||||
|
private String dataMsg;
|
||||||
|
//用户手机号
|
||||||
|
private String userPhone;
|
||||||
|
private String gys;
|
||||||
|
public String getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartTime(String startTime) {
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(String endTime) {
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
public String getDocNo() {
|
||||||
|
return docNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocNo(String docNo) {
|
||||||
|
this.docNo = docNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactorId() {
|
||||||
|
return transactorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactorId(String transactorId) {
|
||||||
|
this.transactorId = transactorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactorCode() {
|
||||||
|
return transactorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactorCode(String transactorCode) {
|
||||||
|
this.transactorCode = transactorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactorName() {
|
||||||
|
return transactorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactorName(String transactorName) {
|
||||||
|
this.transactorName = transactorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayRFDate() {
|
||||||
|
return payRFDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayRFDate(String payRFDate) {
|
||||||
|
this.payRFDate = payRFDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptId() {
|
||||||
|
return deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptId(String deptId) {
|
||||||
|
this.deptId = deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptCode() {
|
||||||
|
return deptCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptCode(String deptCode) {
|
||||||
|
this.deptCode = deptCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptName() {
|
||||||
|
return deptName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptName(String deptName) {
|
||||||
|
this.deptName = deptName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExpectPayDate() {
|
||||||
|
return expectPayDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpectPayDate(String expectPayDate) {
|
||||||
|
this.expectPayDate = expectPayDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayModeCode() {
|
||||||
|
return payModeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayModeCode(String payModeCode) {
|
||||||
|
this.payModeCode = payModeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRequestObjTypeCode() {
|
||||||
|
return requestObjTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequestObjTypeCode(String requestObjTypeCode) {
|
||||||
|
this.requestObjTypeCode = requestObjTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocStatusCode() {
|
||||||
|
return docStatusCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocStatusCode(String docStatusCode) {
|
||||||
|
this.docStatusCode = docStatusCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocStatusName() {
|
||||||
|
return docStatusName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocStatusName(String docStatusName) {
|
||||||
|
this.docStatusName = docStatusName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCashierConfirmed() {
|
||||||
|
return cashierConfirmed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCashierConfirmed(String cashierConfirmed) {
|
||||||
|
this.cashierConfirmed = cashierConfirmed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreatedOn() {
|
||||||
|
return createdOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedOn(String createdOn) {
|
||||||
|
this.createdOn = createdOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModifiedOn() {
|
||||||
|
return modifiedOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifiedOn(String modifiedOn) {
|
||||||
|
this.modifiedOn = modifiedOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentTypeId() {
|
||||||
|
return documentTypeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentTypeId(String documentTypeId) {
|
||||||
|
this.documentTypeId = documentTypeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentTypeCode() {
|
||||||
|
return documentTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentTypeCode(String documentTypeCode) {
|
||||||
|
this.documentTypeCode = documentTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentTypeName() {
|
||||||
|
return documentTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentTypeName(String documentTypeName) {
|
||||||
|
this.documentTypeName = documentTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCurrencyId() {
|
||||||
|
return currencyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrencyId(String currencyId) {
|
||||||
|
this.currencyId = currencyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCurrencyCode() {
|
||||||
|
return currencyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrencyCode(String currencyCode) {
|
||||||
|
this.currencyCode = currencyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCurrencyName() {
|
||||||
|
return currencyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrencyName(String currencyName) {
|
||||||
|
this.currencyName = currencyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataStatus() {
|
||||||
|
return dataStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataStatus(String dataStatus) {
|
||||||
|
this.dataStatus = dataStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataMsg() {
|
||||||
|
return dataMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataMsg(String dataMsg) {
|
||||||
|
this.dataMsg = dataMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserPhone() {
|
||||||
|
return userPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserPhone(String userPhone) {
|
||||||
|
this.userPhone = userPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGys() {
|
||||||
|
return gys;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGys(String gys) {
|
||||||
|
this.gys = gys;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,139 @@
|
||||||
|
<?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.dgx.u9c.dao.impl.PrepaymentDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-PrepaymentEntity-result" type="com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentEntity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="docNo" column="docNo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="documentTypeId" column="documentTypeId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="documentTypeCode" column="documentTypeCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="documentTypeName" column="documentTypeName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="transactorId" column="transactorId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="transactorCode" column="transactorCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="transactorName" column="transactorName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payRFDate" column="payRFDate" jdbcType="VARCHAR"/>
|
||||||
|
<result property="deptId" column="deptId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="deptCode" column="deptCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="deptName" column="deptName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="expectPayDate" column="expectPayDate" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payModeCode" column="payModeCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="requestObjTypeCode" column="requestObjTypeCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="docStatusCode" column="docStatusCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="docStatusName" column="docStatusName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="cashierConfirmed" column="cashierConfirmed" jdbcType="VARCHAR"/>
|
||||||
|
<result property="currencyId" column="currencyId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="currencyCode" column="currencyCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="currencyName" column="currencyName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createdOn" column="createdOn" jdbcType="VARCHAR"/>
|
||||||
|
<result property="modifiedOn" column="modifiedOn" jdbcType="VARCHAR"/>
|
||||||
|
<result property="userPhone" column="userPhone" jdbcType="VARCHAR"/>
|
||||||
|
<result property="dataMsg" column="dataMsg" jdbcType="VARCHAR"/>
|
||||||
|
<result property="dataStatus" column="dataStatus" jdbcType="VARCHAR"/>
|
||||||
|
<result property="gys" column="gys" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "PrepaymentEntity_Base_Column_List">
|
||||||
|
id,
|
||||||
|
docNo,
|
||||||
|
documentTypeId,
|
||||||
|
documentTypeCode,
|
||||||
|
documentTypeName,
|
||||||
|
transactorId,
|
||||||
|
transactorCode,
|
||||||
|
transactorName,
|
||||||
|
payRFDate,
|
||||||
|
deptId,
|
||||||
|
deptCode,
|
||||||
|
deptName,
|
||||||
|
expectPayDate,
|
||||||
|
payModeCode,
|
||||||
|
requestObjTypeCode,
|
||||||
|
docStatusCode,
|
||||||
|
docStatusName,
|
||||||
|
cashierConfirmed,
|
||||||
|
currencyId,
|
||||||
|
currencyCode,
|
||||||
|
currencyName,
|
||||||
|
createdOn,
|
||||||
|
modifiedOn,
|
||||||
|
dataStatus,
|
||||||
|
dataMsg,
|
||||||
|
userPhone,
|
||||||
|
gys
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-PrepaymentEntity-result" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentEntity">
|
||||||
|
select
|
||||||
|
<include refid="PrepaymentEntity_Base_Column_List" />
|
||||||
|
from v_hzya_u9c_payreq
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="docNo != null and docNo != ''"> and docNo = #{docNo} </if>
|
||||||
|
<if test="documentTypeId != null and documentTypeId != ''"> and documentTypeId = #{documentTypeId} </if>
|
||||||
|
<if test="documentTypeCode != null and documentTypeCode != ''"> and documentTypeCode = #{documentTypeCode} </if>
|
||||||
|
<if test="documentTypeName != null and documentTypeName != ''"> and documentTypeName = #{documentTypeName} </if>
|
||||||
|
<if test="transactorId != null and transactorId != ''"> and transactorId = #{transactorId} </if>
|
||||||
|
<if test="transactorCode != null and transactorCode != ''"> and transactorCode = #{transactorCode} </if>
|
||||||
|
<if test="transactorName != null and transactorName != ''"> and transactorName = #{transactorName} </if>
|
||||||
|
<if test="payRFDate != null and payRFDate != ''"> and payRFDate = #{payRFDate} </if>
|
||||||
|
<if test="deptId != null and deptId != ''"> and deptId = #{deptId} </if>
|
||||||
|
<if test="deptCode != null and deptCode != ''"> and deptCode = #{deptCode} </if>
|
||||||
|
<if test="deptName != null and deptName != ''"> and deptName = #{deptName} </if>
|
||||||
|
<if test="expectPayDate != null and expectPayDate != ''"> and expectPayDate = #{expectPayDate} </if>
|
||||||
|
<if test="payModeCode != null and payModeCode != ''"> and payModeCode = #{payModeCode} </if>
|
||||||
|
<if test="requestObjTypeCode != null and requestObjTypeCode != ''"> and requestObjTypeCode = #{requestObjTypeCode} </if>
|
||||||
|
<if test="docStatusCode != null and docStatusCode != ''"> and docStatusCode = #{docStatusCode} </if>
|
||||||
|
<if test="docStatusName != null and docStatusName != ''"> and docStatusName = #{docStatusName} </if>
|
||||||
|
<if test="cashierConfirmed != null and cashierConfirmed != ''"> and cashierConfirmed = #{cashierConfirmed} </if>
|
||||||
|
<if test="currencyId != null and currencyId != ''"> and currencyId = #{currencyId} </if>
|
||||||
|
<if test="currencyCode != null and currencyCode != ''"> and currencyCode = #{currencyCode} </if>
|
||||||
|
<if test="currencyName != null and currencyName != ''"> and currencyName = #{currencyName} </if>
|
||||||
|
<if test="modifiedOn != null and modifiedOn != ''"> and modifiedOn = #{modifiedOn} </if>
|
||||||
|
<if test="createdOn != null and createdOn != ''"> and createdOn = #{createdOn} </if>
|
||||||
|
<if test="startTime != null and startTime != ''"> and modifiedOn >= #{startTime} </if>
|
||||||
|
<if test="endTime != null and endTime != ''"> <![CDATA[ and modifiedOn <= #{endTime} ]]> </if>
|
||||||
|
and dataStatus is null or dataStatus = ''
|
||||||
|
</trim>
|
||||||
|
order by v_hzya_u9c_payreq.modifiedOn desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentEntity">
|
||||||
|
select count(1) from v_hzya_u9c_payreq
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="docNo != null and docNo != ''"> and docNo = #{docNo} </if>
|
||||||
|
<if test="documentTypeId != null and documentTypeId != ''"> and documentTypeId = #{documentTypeId} </if>
|
||||||
|
<if test="documentTypeCode != null and documentTypeCode != ''"> and documentTypeCode = #{documentTypeCode} </if>
|
||||||
|
<if test="documentTypeName != null and documentTypeName != ''"> and documentTypeName = #{documentTypeName} </if>
|
||||||
|
<if test="transactorId != null and transactorId != ''"> and transactorId = #{transactorId} </if>
|
||||||
|
<if test="transactorCode != null and transactorCode != ''"> and transactorCode = #{transactorCode} </if>
|
||||||
|
<if test="transactorName != null and transactorName != ''"> and transactorName = #{transactorName} </if>
|
||||||
|
<if test="payRFDate != null and payRFDate != ''"> and payRFDate = #{payRFDate} </if>
|
||||||
|
<if test="deptId != null and deptId != ''"> and deptId = #{deptId} </if>
|
||||||
|
<if test="deptCode != null and deptCode != ''"> and deptCode = #{deptCode} </if>
|
||||||
|
<if test="deptName != null and deptName != ''"> and deptName = #{deptName} </if>
|
||||||
|
<if test="expectPayDate != null and expectPayDate != ''"> and expectPayDate = #{expectPayDate} </if>
|
||||||
|
<if test="payModeCode != null and payModeCode != ''"> and payModeCode = #{payModeCode} </if>
|
||||||
|
<if test="requestObjTypeCode != null and requestObjTypeCode != ''"> and requestObjTypeCode = #{requestObjTypeCode} </if>
|
||||||
|
<if test="docStatusCode != null and docStatusCode != ''"> and docStatusCode = #{docStatusCode} </if>
|
||||||
|
<if test="docStatusName != null and docStatusName != ''"> and docStatusName = #{docStatusName} </if>
|
||||||
|
<if test="cashierConfirmed != null and cashierConfirmed != ''"> and cashierConfirmed = #{cashierConfirmed} </if>
|
||||||
|
<if test="modifiedOn != null and modifiedOn != ''"> and modifiedOn = #{modifiedOn} </if>
|
||||||
|
<if test="createdOn != null and createdOn != ''"> and createdOn = #{createdOn} </if>
|
||||||
|
<if test="startTime != null and startTime != ''"> and modifiedOn >= #{startTime} </if>
|
||||||
|
<if test="endTime != null and endTime != ''"> <![CDATA[ and modifiedOn <= #{endTime} ]]> </if>
|
||||||
|
and dataStatus is null or dataStatus = ''
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="entity_update" parameterType="com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentEntity">
|
||||||
|
update AP_PayReqBillHead set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="dataStatus != null and dataStatus != ''"> DescFlexField_PrivateDescSeg2 = #{dataStatus},</if>
|
||||||
|
<if test="dataMsg != null and dataMsg != ''"> DescFlexField_PrivateDescSeg1 = #{dataMsg},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,251 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单明细(请款单) 明细,供应商页签
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/10/14 11:29
|
||||||
|
**/
|
||||||
|
public class PrepaymentSuppEntity extends BaseEntity {
|
||||||
|
// 付款申请资金表头作为主 ID
|
||||||
|
private String mainId;
|
||||||
|
// 行号
|
||||||
|
private String lineNum;
|
||||||
|
// 供应商名字
|
||||||
|
private String suppName;
|
||||||
|
// 折扣前请款金额
|
||||||
|
private String rfTotalMoney;
|
||||||
|
// 请款对应折扣
|
||||||
|
private String rfDisCount;
|
||||||
|
// 折扣后请款金额
|
||||||
|
private String rfaMoney;
|
||||||
|
// 付款本币金额
|
||||||
|
private String acmPayFCMoney;
|
||||||
|
// 结算方式
|
||||||
|
private String payType;
|
||||||
|
// 收款银行账号
|
||||||
|
private String oppAccBkAccount;
|
||||||
|
// 收款账号名称
|
||||||
|
private String recBkAccName;
|
||||||
|
// 开户行
|
||||||
|
private String oppAccBk;
|
||||||
|
// 收支项目 id
|
||||||
|
private String incomeExpendItem;
|
||||||
|
// 收支项目名字
|
||||||
|
private String incomeExpendItemName;
|
||||||
|
// 部门 - 供应商 id
|
||||||
|
private String deptId;
|
||||||
|
// 部门 - 供应商 code
|
||||||
|
private String deptCode;
|
||||||
|
// 部门 - 供应商 name
|
||||||
|
private String deptName;
|
||||||
|
// 业务员 - 供应商 id
|
||||||
|
private String transactorId;
|
||||||
|
// 业务员 - 供应商 code
|
||||||
|
private String transactorCode;
|
||||||
|
// 业务员 - 供应商
|
||||||
|
private String transactorName;
|
||||||
|
// 立账供应商 id
|
||||||
|
private String accrueSuppId;
|
||||||
|
// 立账供应商 code
|
||||||
|
private String accrueSuppCode;
|
||||||
|
// 立账供应商
|
||||||
|
private String accrueSuppName;
|
||||||
|
// 料品 code
|
||||||
|
private String itemCode;
|
||||||
|
// 料品
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
public String getMainId() {
|
||||||
|
return mainId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMainId(String mainId) {
|
||||||
|
this.mainId = mainId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLineNum() {
|
||||||
|
return lineNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLineNum(String lineNum) {
|
||||||
|
this.lineNum = lineNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuppName() {
|
||||||
|
return suppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuppName(String suppName) {
|
||||||
|
this.suppName = suppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRfTotalMoney() {
|
||||||
|
return rfTotalMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRfTotalMoney(String rfTotalMoney) {
|
||||||
|
this.rfTotalMoney = rfTotalMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRfDisCount() {
|
||||||
|
return rfDisCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRfDisCount(String rfDisCount) {
|
||||||
|
this.rfDisCount = rfDisCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRfaMoney() {
|
||||||
|
return rfaMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRfaMoney(String rfaMoney) {
|
||||||
|
this.rfaMoney = rfaMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAcmPayFCMoney() {
|
||||||
|
return acmPayFCMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAcmPayFCMoney(String acmPayFCMoney) {
|
||||||
|
this.acmPayFCMoney = acmPayFCMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayType() {
|
||||||
|
return payType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayType(String payType) {
|
||||||
|
this.payType = payType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOppAccBkAccount() {
|
||||||
|
return oppAccBkAccount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOppAccBkAccount(String oppAccBkAccount) {
|
||||||
|
this.oppAccBkAccount = oppAccBkAccount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecBkAccName() {
|
||||||
|
return recBkAccName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecBkAccName(String recBkAccName) {
|
||||||
|
this.recBkAccName = recBkAccName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOppAccBk() {
|
||||||
|
return oppAccBk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOppAccBk(String oppAccBk) {
|
||||||
|
this.oppAccBk = oppAccBk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIncomeExpendItem() {
|
||||||
|
return incomeExpendItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIncomeExpendItem(String incomeExpendItem) {
|
||||||
|
this.incomeExpendItem = incomeExpendItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIncomeExpendItemName() {
|
||||||
|
return incomeExpendItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIncomeExpendItemName(String incomeExpendItemName) {
|
||||||
|
this.incomeExpendItemName = incomeExpendItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptId() {
|
||||||
|
return deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptId(String deptId) {
|
||||||
|
this.deptId = deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptCode() {
|
||||||
|
return deptCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptCode(String deptCode) {
|
||||||
|
this.deptCode = deptCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptName() {
|
||||||
|
return deptName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptName(String deptName) {
|
||||||
|
this.deptName = deptName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactorId() {
|
||||||
|
return transactorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactorId(String transactorId) {
|
||||||
|
this.transactorId = transactorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactorCode() {
|
||||||
|
return transactorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactorCode(String transactorCode) {
|
||||||
|
this.transactorCode = transactorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactorName() {
|
||||||
|
return transactorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactorName(String transactorName) {
|
||||||
|
this.transactorName = transactorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAccrueSuppId() {
|
||||||
|
return accrueSuppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccrueSuppId(String accrueSuppId) {
|
||||||
|
this.accrueSuppId = accrueSuppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAccrueSuppCode() {
|
||||||
|
return accrueSuppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccrueSuppCode(String accrueSuppCode) {
|
||||||
|
this.accrueSuppCode = accrueSuppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAccrueSuppName() {
|
||||||
|
return accrueSuppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccrueSuppName(String accrueSuppName) {
|
||||||
|
this.accrueSuppName = accrueSuppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemCode() {
|
||||||
|
return itemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemCode(String itemCode) {
|
||||||
|
this.itemCode = itemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemName() {
|
||||||
|
return itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemName(String itemName) {
|
||||||
|
this.itemName = itemName;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,123 @@
|
||||||
|
<?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.dgx.u9c.dao.impl.PrepaymentSuppDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-PrepaymentSuppEntity-result" type="com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentSuppEntity" >
|
||||||
|
<result property="mainId" column="mainId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="lineNum" column="lineNum" jdbcType="VARCHAR"/>
|
||||||
|
<result property="suppName" column="suppName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rfTotalMoney" column="rfTotalMoney" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rfDisCount" column="rfDisCount" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rfaMoney" column="rfaMoney" jdbcType="VARCHAR"/>
|
||||||
|
<result property="acmPayFCMoney" column="acmPayFCMoney" jdbcType="VARCHAR"/>
|
||||||
|
<result property="payType" column="payType" jdbcType="VARCHAR"/>
|
||||||
|
<result property="oppAccBkAccount" column="oppAccBkAccount" jdbcType="VARCHAR"/>
|
||||||
|
<result property="recBkAccName" column="recBkAccName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="oppAccBk" column="oppAccBk" jdbcType="VARCHAR"/>
|
||||||
|
<result property="incomeExpendItem" column="incomeExpendItem" jdbcType="VARCHAR"/>
|
||||||
|
<result property="incomeExpendItemName" column="incomeExpendItemName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="deptId" column="deptId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="deptCode" column="deptCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="deptName" column="deptName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="transactorId" column="transactorId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="transactorCode" column="transactorCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="transactorName" column="transactorName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="accrueSuppId" column="accrueSuppId" jdbcType="VARCHAR"/>
|
||||||
|
<result property="accrueSuppCode" column="accrueSuppCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="accrueSuppName" column="accrueSuppName" jdbcType="VARCHAR"/>
|
||||||
|
<result property="itemCode" column="itemCode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="itemName" column="itemName" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "PrepaymentSuppEntity_Base_Column_List">
|
||||||
|
mainId,
|
||||||
|
lineNum,
|
||||||
|
suppName,
|
||||||
|
rfTotalMoney,
|
||||||
|
rfDisCount,
|
||||||
|
rfaMoney,
|
||||||
|
acmPayFCMoney,
|
||||||
|
payType,
|
||||||
|
oppAccBkAccount,
|
||||||
|
recBkAccName,
|
||||||
|
oppAccBk,
|
||||||
|
incomeExpendItem,
|
||||||
|
incomeExpendItemName,
|
||||||
|
deptId,
|
||||||
|
deptCode,
|
||||||
|
deptName,
|
||||||
|
transactorId,
|
||||||
|
transactorCode,
|
||||||
|
transactorName,
|
||||||
|
accrueSuppId,
|
||||||
|
accrueSuppCode,
|
||||||
|
accrueSuppName,
|
||||||
|
itemCode,
|
||||||
|
itemName
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-PrepaymentSuppEntity-result" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentSuppEntity">
|
||||||
|
select
|
||||||
|
<include refid="PrepaymentSuppEntity_Base_Column_List" />
|
||||||
|
from v_hzya_u9c_payreq_supp
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="mainId!= null and mainId!= ''"> and mainId = #{mainId}</if>
|
||||||
|
<if test="lineNum!= null and lineNum!= ''"> and lineNum = #{lineNum}</if>
|
||||||
|
<if test="suppName!= null and suppName!= ''"> and suppName = #{suppName}</if>
|
||||||
|
<if test="rfTotalMoney!= null and rfTotalMoney!= ''"> and rfTotalMoney = #{rfTotalMoney}</if>
|
||||||
|
<if test="rfDisCount!= null and rfDisCount!= ''"> and rfDisCount = #{rfDisCount}</if>
|
||||||
|
<if test="rfaMoney!= null and rfaMoney!= ''"> and rfaMoney = #{rfaMoney}</if>
|
||||||
|
<if test="acmPayFCMoney!= null and acmPayFCMoney!= ''"> and acmPayFCMoney = #{acmPayFCMoney}</if>
|
||||||
|
<if test="payType!= null and payType!= ''"> and payType = #{payType}</if>
|
||||||
|
<if test="oppAccBkAccount!= null and oppAccBkAccount!= ''"> and oppAccBkAccount = #{oppAccBkAccount}</if>
|
||||||
|
<if test="recBkAccName!= null and recBkAccName!= ''"> and recBkAccName = #{recBkAccName}</if>
|
||||||
|
<if test="oppAccBk!= null and oppAccBk!= ''"> and oppAccBk = #{oppAccBk}</if>
|
||||||
|
<if test="incomeExpendItem!= null and incomeExpendItem!= ''"> and incomeExpendItem = #{incomeExpendItem}</if>
|
||||||
|
<if test="incomeExpendItemName!= null and incomeExpendItemName!= ''"> and incomeExpendItemName = #{incomeExpendItemName}</if>
|
||||||
|
<if test="deptId!= null and deptId!= ''"> and deptId = #{deptId}</if>
|
||||||
|
<if test="deptCode!= null and deptCode!= ''"> and deptCode = #{deptCode}</if>
|
||||||
|
<if test="deptName!= null and deptName!= ''"> and deptName = #{deptName}</if>
|
||||||
|
<if test="transactorId!= null and transactorId!= ''"> and transactorId = #{transactorId}</if>
|
||||||
|
<if test="transactorCode!= null and transactorCode!= ''"> and transactorCode = #{transactorCode}</if>
|
||||||
|
<if test="transactorName!= null and transactorName!= ''"> and transactorName = #{transactorName}</if>
|
||||||
|
<if test="accrueSuppId!= null and accrueSuppId!= ''"> and accrueSuppId = #{accrueSuppId}</if>
|
||||||
|
<if test="accrueSuppCode!= null and accrueSuppCode!= ''"> and accrueSuppCode = #{accrueSuppCode}</if>
|
||||||
|
<if test="accrueSuppName!= null and accrueSuppName!= ''"> and accrueSuppName = #{accrueSuppName}</if>
|
||||||
|
<if test="itemCode!= null and itemCode!= ''"> and itemCode = #{itemCode}</if>
|
||||||
|
<if test="itemName!= null and itemName!= ''"> and itemName = #{itemName}</if>
|
||||||
|
</trim>
|
||||||
|
order by v_hzya_u9c_payreq_supp.mainId,v_hzya_u9c_payreq_supp.lineNum
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentSuppEntity">
|
||||||
|
select count(1) from v_hzya_u9c_payreq_supp
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="mainId!= null and mainId!= ''"> and mainId = #{mainId}</if>
|
||||||
|
<if test="lineNum!= null and lineNum!= ''"> and lineNum = #{lineNum}</if>
|
||||||
|
<if test="suppName!= null and suppName!= ''"> and suppName = #{suppName}</if>
|
||||||
|
<if test="rfTotalMoney!= null and rfTotalMoney!= ''"> and rfTotalMoney = #{rfTotalMoney}</if>
|
||||||
|
<if test="rfDisCount!= null and rfDisCount!= ''"> and rfDisCount = #{rfDisCount}</if>
|
||||||
|
<if test="rfaMoney!= null and rfaMoney!= ''"> and rfaMoney = #{rfaMoney}</if>
|
||||||
|
<if test="acmPayFCMoney!= null and acmPayFCMoney!= ''"> and acmPayFCMoney = #{acmPayFCMoney}</if>
|
||||||
|
<if test="payType!= null and payType!= ''"> and payType = #{payType}</if>
|
||||||
|
<if test="oppAccBkAccount!= null and oppAccBkAccount!= ''"> and oppAccBkAccount = #{oppAccBkAccount}</if>
|
||||||
|
<if test="recBkAccName!= null and recBkAccName!= ''"> and recBkAccName = #{recBkAccName}</if>
|
||||||
|
<if test="oppAccBk!= null and oppAccBk!= ''"> and oppAccBk = #{oppAccBk}</if>
|
||||||
|
<if test="incomeExpendItem!= null and incomeExpendItem!= ''"> and incomeExpendItem = #{incomeExpendItem}</if>
|
||||||
|
<if test="incomeExpendItemName!= null and incomeExpendItemName!= ''"> and incomeExpendItemName = #{incomeExpendItemName}</if>
|
||||||
|
<if test="deptId!= null and deptId!= ''"> and deptId = #{deptId}</if>
|
||||||
|
<if test="deptCode!= null and deptCode!= ''"> and deptCode = #{deptCode}</if>
|
||||||
|
<if test="deptName!= null and deptName!= ''"> and deptName = #{deptName}</if>
|
||||||
|
<if test="transactorId!= null and transactorId!= ''"> and transactorId = #{transactorId}</if>
|
||||||
|
<if test="transactorCode!= null and transactorCode!= ''"> and transactorCode = #{transactorCode}</if>
|
||||||
|
<if test="transactorName!= null and transactorName!= ''"> and transactorName = #{transactorName}</if>
|
||||||
|
<if test="accrueSuppId!= null and accrueSuppId!= ''"> and accrueSuppId = #{accrueSuppId}</if>
|
||||||
|
<if test="accrueSuppCode!= null and accrueSuppCode!= ''"> and accrueSuppCode = #{accrueSuppCode}</if>
|
||||||
|
<if test="accrueSuppName!= null and accrueSuppName!= ''"> and accrueSuppName = #{accrueSuppName}</if>
|
||||||
|
<if test="itemCode!= null and itemCode!= ''"> and itemCode = #{itemCode}</if>
|
||||||
|
<if test="itemName!= null and itemName!= ''"> and itemName = #{itemName}</if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,203 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C请购单明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 17:11
|
||||||
|
**/
|
||||||
|
public class RequisitionDetailEntity extends BaseEntity {
|
||||||
|
|
||||||
|
//主表id
|
||||||
|
private String pr;
|
||||||
|
//行号
|
||||||
|
private String docLineNo;
|
||||||
|
//需求分类
|
||||||
|
private String demandCode;
|
||||||
|
//厂区编码
|
||||||
|
private String factoryCode;
|
||||||
|
//厂区名字
|
||||||
|
private String factoryName;
|
||||||
|
//项目id
|
||||||
|
private String projectId;
|
||||||
|
//项目编码
|
||||||
|
private String projectCode;
|
||||||
|
//项目名字
|
||||||
|
private String projectName;
|
||||||
|
//料品id
|
||||||
|
private String materialId;
|
||||||
|
//料品编码
|
||||||
|
private String materialCode;
|
||||||
|
//料品名字
|
||||||
|
private String materialName;
|
||||||
|
//规格型号
|
||||||
|
private String specs;
|
||||||
|
//需求数量1
|
||||||
|
private String reqQtyTU;
|
||||||
|
//库存单位
|
||||||
|
private String storeUOM;
|
||||||
|
//备注
|
||||||
|
private String memo;
|
||||||
|
//要求交货日期
|
||||||
|
private String requiredDeliveryDate;
|
||||||
|
//来源单据号
|
||||||
|
private String srcDocNo;
|
||||||
|
//库存可用量
|
||||||
|
private String pRInvQty;
|
||||||
|
//状态
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
public String getPr() {
|
||||||
|
return pr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPr(String pr) {
|
||||||
|
this.pr = pr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocLineNo() {
|
||||||
|
return docLineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocLineNo(String docLineNo) {
|
||||||
|
this.docLineNo = docLineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDemandCode() {
|
||||||
|
return demandCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDemandCode(String demandCode) {
|
||||||
|
this.demandCode = demandCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFactoryCode() {
|
||||||
|
return factoryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFactoryCode(String factoryCode) {
|
||||||
|
this.factoryCode = factoryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFactoryName() {
|
||||||
|
return factoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFactoryName(String factoryName) {
|
||||||
|
this.factoryName = factoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProjectId() {
|
||||||
|
return projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectId(String projectId) {
|
||||||
|
this.projectId = projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProjectCode() {
|
||||||
|
return projectCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectCode(String projectCode) {
|
||||||
|
this.projectCode = projectCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProjectName() {
|
||||||
|
return projectName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectName(String projectName) {
|
||||||
|
this.projectName = projectName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialId() {
|
||||||
|
return materialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaterialId(String materialId) {
|
||||||
|
this.materialId = materialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialCode() {
|
||||||
|
return materialCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaterialCode(String materialCode) {
|
||||||
|
this.materialCode = materialCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialName() {
|
||||||
|
return materialName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaterialName(String materialName) {
|
||||||
|
this.materialName = materialName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSpecs() {
|
||||||
|
return specs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSpecs(String specs) {
|
||||||
|
this.specs = specs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReqQtyTU() {
|
||||||
|
return reqQtyTU;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReqQtyTU(String reqQtyTU) {
|
||||||
|
this.reqQtyTU = reqQtyTU;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStoreUOM() {
|
||||||
|
return storeUOM;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStoreUOM(String storeUOM) {
|
||||||
|
this.storeUOM = storeUOM;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMemo() {
|
||||||
|
return memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemo(String memo) {
|
||||||
|
this.memo = memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRequiredDeliveryDate() {
|
||||||
|
return requiredDeliveryDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequiredDeliveryDate(String requiredDeliveryDate) {
|
||||||
|
this.requiredDeliveryDate = requiredDeliveryDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSrcDocNo() {
|
||||||
|
return srcDocNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSrcDocNo(String srcDocNo) {
|
||||||
|
this.srcDocNo = srcDocNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getpRInvQty() {
|
||||||
|
return pRInvQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setpRInvQty(String pRInvQty) {
|
||||||
|
this.pRInvQty = pRInvQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?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.dgx.u9c.dao.impl.RequisitionDetailDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-RequisitionDetailEntity-result" type="com.hzya.frame.plugin.dgx.u9c.entity.RequisitionDetailEntity" >
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="pr" column="pr" />
|
||||||
|
<result property="docLineNo" column="docLineNo" />
|
||||||
|
<result property="demandCode" column="demandCode"/>
|
||||||
|
<result property="factoryCode" column="factoryCode"/>
|
||||||
|
<result property="factoryName" column="factoryName"/>
|
||||||
|
<result property="projectId" column="projectId"/>
|
||||||
|
<result property="projectCode" column="projectCode"/>
|
||||||
|
<result property="projectName" column="projectName"/>
|
||||||
|
<result property="materialId" column="materialId"/>
|
||||||
|
<result property="materialCode" column="materialCode"/>
|
||||||
|
<result property="materialName" column="materialName"/>
|
||||||
|
<result property="specs" column="specs"/>
|
||||||
|
<result property="reqQtyTU" column="reqQtyTU"/>
|
||||||
|
<result property="storeUOM" column="storeUOM"/>
|
||||||
|
<result property="memo" column="memo"/>
|
||||||
|
<result property="requiredDeliveryDate" column="requiredDeliveryDate"/>
|
||||||
|
<result property="srcDocNo" column="srcDocNo"/>
|
||||||
|
<result property="pRInvQty" column="pRInvQty"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "RequisitionDetailEntity_Base_Column_List">
|
||||||
|
id,
|
||||||
|
pr,
|
||||||
|
docLineNo,
|
||||||
|
demandCode,
|
||||||
|
factoryCode,
|
||||||
|
factoryName,
|
||||||
|
projectId,
|
||||||
|
projectCode,
|
||||||
|
projectName,
|
||||||
|
materialId,
|
||||||
|
materialCode,
|
||||||
|
materialName,
|
||||||
|
specs,
|
||||||
|
reqQtyTU,
|
||||||
|
storeUOM,
|
||||||
|
memo,
|
||||||
|
requiredDeliveryDate,
|
||||||
|
srcDocNo,
|
||||||
|
pRInvQty,
|
||||||
|
status
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-RequisitionDetailEntity-result" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.RequisitionDetailEntity">
|
||||||
|
select
|
||||||
|
<include refid="RequisitionDetailEntity_Base_Column_List" />
|
||||||
|
from v_hzya_u9c_pr_prline
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="pr != null and pr != ''"> and pr = #{pr} </if>
|
||||||
|
<if test="docLineNo != null and docLineNo != ''"> and docLineNo = #{docLineNo} </if>
|
||||||
|
<if test="demandCode != null and demandCode != ''"> and demandCode = #{demandCode} </if>
|
||||||
|
<if test="factoryCode != null and factoryCode != ''"> and factoryCode = #{factoryCode} </if>
|
||||||
|
<if test="factoryName != null and factoryName != ''"> and factoryName = #{factoryName} </if>
|
||||||
|
<if test="projectId != null and projectId != ''"> and projectId = #{projectId} </if>
|
||||||
|
<if test="projectCode != null and projectCode != ''"> and projectCode = #{projectCode} </if>
|
||||||
|
<if test="projectName != null and projectName != ''"> and projectName = #{projectName} </if>
|
||||||
|
<if test="materialId != null and materialId != ''"> and materialId = #{materialId} </if>
|
||||||
|
<if test="materialCode != null and materialCode != ''"> and materialCode = #{materialCode} </if>
|
||||||
|
<if test="materialName != null and materialName != ''"> and materialName = #{materialName} </if>
|
||||||
|
<if test="specs != null and specs != ''"> and specs = #{specs} </if>
|
||||||
|
<if test="reqQtyTU != null and reqQtyTU != ''"> and reqQtyTU = #{reqQtyTU} </if>
|
||||||
|
<if test="storeUOM != null and storeUOM != ''"> and storeUOM = #{storeUOM} </if>
|
||||||
|
<if test="memo != null and memo != ''"> and memo = #{memo} </if>
|
||||||
|
<if test="requiredDeliveryDate != null and requiredDeliveryDate != ''"> and requiredDeliveryDate = #{requiredDeliveryDate} </if>
|
||||||
|
<if test="srcDocNo != null and srcDocNo != ''"> and srcDocNo = #{srcDocNo} </if>
|
||||||
|
<if test="pRInvQty != null and pRInvQty != ''"> and pRInvQty = #{pRInvQty} </if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status} </if>
|
||||||
|
</trim>
|
||||||
|
order by v_hzya_u9c_pr_prline.pr,v_hzya_u9c_pr_prline.docLineNo
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.RequisitionDetailEntity">
|
||||||
|
select count(1) from v_hzya_u9c_pr_prline
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="pr != null and pr != ''"> and pr = #{pr} </if>
|
||||||
|
<if test="docLineNo != null and docLineNo != ''"> and docLineNo = #{docLineNo} </if>
|
||||||
|
<if test="demandCode != null and demandCode != ''"> and demandCode = #{demandCode} </if>
|
||||||
|
<if test="factoryCode != null and factoryCode != ''"> and factoryCode = #{factoryCode} </if>
|
||||||
|
<if test="factoryName != null and factoryName != ''"> and factoryName = #{factoryName} </if>
|
||||||
|
<if test="projectId != null and projectId != ''"> and projectId = #{projectId} </if>
|
||||||
|
<if test="projectCode != null and projectCode != ''"> and projectCode = #{projectCode} </if>
|
||||||
|
<if test="projectName != null and projectName != ''"> and projectName = #{projectName} </if>
|
||||||
|
<if test="materialId != null and materialId != ''"> and materialId = #{materialId} </if>
|
||||||
|
<if test="materialCode != null and materialCode != ''"> and materialCode = #{materialCode} </if>
|
||||||
|
<if test="materialName != null and materialName != ''"> and materialName = #{materialName} </if>
|
||||||
|
<if test="specs != null and specs != ''"> and specs = #{specs} </if>
|
||||||
|
<if test="reqQtyTU != null and reqQtyTU != ''"> and reqQtyTU = #{reqQtyTU} </if>
|
||||||
|
<if test="storeUOM != null and storeUOM != ''"> and storeUOM = #{storeUOM} </if>
|
||||||
|
<if test="memo != null and memo != ''"> and memo = #{memo} </if>
|
||||||
|
<if test="requiredDeliveryDate != null and requiredDeliveryDate != ''"> and requiredDeliveryDate = #{requiredDeliveryDate} </if>
|
||||||
|
<if test="srcDocNo != null and srcDocNo != ''"> and srcDocNo = #{srcDocNo} </if>
|
||||||
|
<if test="pRInvQty != null and pRInvQty != ''"> and pRInvQty = #{pRInvQty} </if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status} </if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,231 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C请购单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 14:08
|
||||||
|
**/
|
||||||
|
public class RequisitionEntity extends BaseEntity {
|
||||||
|
|
||||||
|
//单号
|
||||||
|
private String docNo;
|
||||||
|
//业务日期
|
||||||
|
private String businessDate;
|
||||||
|
//单据类型id
|
||||||
|
private String pRDocTypeId;
|
||||||
|
//单据类型编码
|
||||||
|
private String pRDocTypeCode;
|
||||||
|
//单据类型名字
|
||||||
|
private String pRDocTypeName;
|
||||||
|
//需求人员id
|
||||||
|
private String reqEmployeeId;
|
||||||
|
//需求人员编码
|
||||||
|
private String reqEmployeeCode;
|
||||||
|
//需求人员名称
|
||||||
|
private String reqEmployeeName;
|
||||||
|
//需求部门id
|
||||||
|
private String reqDepartmentId;
|
||||||
|
//需求部门编码
|
||||||
|
private String reqDepartmentCode;
|
||||||
|
//需求部门名字
|
||||||
|
private String reqDepartmentName;
|
||||||
|
//来源类型code
|
||||||
|
private String sourceTypeCode;
|
||||||
|
//单据状态code
|
||||||
|
private String status;
|
||||||
|
//单据状态name
|
||||||
|
private String statusName;
|
||||||
|
//修改时间
|
||||||
|
private String modifiedOn;
|
||||||
|
//创建时间
|
||||||
|
private String createdOn;
|
||||||
|
//开始时间 查询用
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private String startTime;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
//结束时间 查询用
|
||||||
|
private String endTime;
|
||||||
|
//数据状态 1、成功 2、失败
|
||||||
|
private String dataStatus;
|
||||||
|
//数据状态描述
|
||||||
|
private String dataMsg;
|
||||||
|
//用户手机号
|
||||||
|
private String sendPhone;
|
||||||
|
|
||||||
|
public String getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartTime(String startTime) {
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(String endTime) {
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocNo() {
|
||||||
|
return docNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocNo(String docNo) {
|
||||||
|
this.docNo = docNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBusinessDate() {
|
||||||
|
return businessDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBusinessDate(String businessDate) {
|
||||||
|
this.businessDate = businessDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getpRDocTypeId() {
|
||||||
|
return pRDocTypeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setpRDocTypeId(String pRDocTypeId) {
|
||||||
|
this.pRDocTypeId = pRDocTypeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getpRDocTypeCode() {
|
||||||
|
return pRDocTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setpRDocTypeCode(String pRDocTypeCode) {
|
||||||
|
this.pRDocTypeCode = pRDocTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getpRDocTypeName() {
|
||||||
|
return pRDocTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setpRDocTypeName(String pRDocTypeName) {
|
||||||
|
this.pRDocTypeName = pRDocTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReqEmployeeId() {
|
||||||
|
return reqEmployeeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReqEmployeeId(String reqEmployeeId) {
|
||||||
|
this.reqEmployeeId = reqEmployeeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReqEmployeeCode() {
|
||||||
|
return reqEmployeeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReqEmployeeCode(String reqEmployeeCode) {
|
||||||
|
this.reqEmployeeCode = reqEmployeeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReqEmployeeName() {
|
||||||
|
return reqEmployeeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReqEmployeeName(String reqEmployeeName) {
|
||||||
|
this.reqEmployeeName = reqEmployeeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReqDepartmentId() {
|
||||||
|
return reqDepartmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReqDepartmentId(String reqDepartmentId) {
|
||||||
|
this.reqDepartmentId = reqDepartmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReqDepartmentCode() {
|
||||||
|
return reqDepartmentCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReqDepartmentCode(String reqDepartmentCode) {
|
||||||
|
this.reqDepartmentCode = reqDepartmentCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReqDepartmentName() {
|
||||||
|
return reqDepartmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReqDepartmentName(String reqDepartmentName) {
|
||||||
|
this.reqDepartmentName = reqDepartmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSourceTypeCode() {
|
||||||
|
return sourceTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourceTypeCode(String sourceTypeCode) {
|
||||||
|
this.sourceTypeCode = sourceTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatusName() {
|
||||||
|
return statusName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatusName(String statusName) {
|
||||||
|
this.statusName = statusName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModifiedOn() {
|
||||||
|
return modifiedOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifiedOn(String modifiedOn) {
|
||||||
|
this.modifiedOn = modifiedOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreatedOn() {
|
||||||
|
return createdOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedOn(String createdOn) {
|
||||||
|
this.createdOn = createdOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataStatus() {
|
||||||
|
return dataStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataStatus(String dataStatus) {
|
||||||
|
this.dataStatus = dataStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataMsg() {
|
||||||
|
return dataMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataMsg(String dataMsg) {
|
||||||
|
this.dataMsg = dataMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getSendPhone() {
|
||||||
|
return sendPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendPhone(String sendPhone) {
|
||||||
|
this.sendPhone = sendPhone;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
<?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.dgx.u9c.dao.impl.RequisitionDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-RequisitionEntity-result" type="com.hzya.frame.plugin.dgx.u9c.entity.RequisitionEntity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="docNo" column="docNo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="businessDate" column="businessDate"/>
|
||||||
|
<result property="pRDocTypeId" column="pRDocTypeId"/>
|
||||||
|
<result property="pRDocTypeCode" column="pRDocTypeCode"/>
|
||||||
|
<result property="pRDocTypeName" column="pRDocTypeName"/>
|
||||||
|
<result property="reqEmployeeId" column="reqEmployeeId"/>
|
||||||
|
<result property="reqEmployeeCode" column="reqEmployeeCode"/>
|
||||||
|
<result property="reqEmployeeName" column="reqEmployeeName"/>
|
||||||
|
<result property="reqDepartmentId" column="reqDepartmentId"/>
|
||||||
|
<result property="reqDepartmentCode" column="reqDepartmentCode"/>
|
||||||
|
<result property="reqDepartmentName" column="reqDepartmentName"/>
|
||||||
|
<result property="sourceTypeCode" column="sourceTypeCode"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="statusName" column="statusName"/>
|
||||||
|
<result property="modifiedOn" column="modifiedOn"/>
|
||||||
|
<result property="createdOn" column="createdOn"/>
|
||||||
|
<result property="dataMsg" column="dataMsg"/>
|
||||||
|
<result property="dataStatus" column="dataStatus"/>
|
||||||
|
<result property="sendPhone" column="sendPhone"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "RequisitionEntity_Base_Column_List">
|
||||||
|
id,
|
||||||
|
docNo,
|
||||||
|
businessDate,
|
||||||
|
pRDocTypeId,
|
||||||
|
pRDocTypeCode,
|
||||||
|
pRDocTypeName,
|
||||||
|
reqEmployeeId,
|
||||||
|
reqEmployeeCode,
|
||||||
|
reqEmployeeName,
|
||||||
|
reqDepartmentId,
|
||||||
|
reqDepartmentCode,
|
||||||
|
reqDepartmentName,
|
||||||
|
sourceTypeCode,
|
||||||
|
status,
|
||||||
|
statusName,
|
||||||
|
modifiedOn,
|
||||||
|
createdOn,
|
||||||
|
dataStatus,
|
||||||
|
dataMsg,
|
||||||
|
sendPhone
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-RequisitionEntity-result" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.RequisitionEntity">
|
||||||
|
select
|
||||||
|
<include refid="RequisitionEntity_Base_Column_List" />
|
||||||
|
from v_hzya_u9c_pr_pr
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="docNo != null and docNo != ''"> and docNo = #{docNo} </if>
|
||||||
|
<if test="businessDate != null and businessDate != ''"> and businessDate = #{businessDate} </if>
|
||||||
|
<if test="pRDocTypeId != null and pRDocTypeId != ''"> and pRDocTypeId = #{pRDocTypeId} </if>
|
||||||
|
<if test="pRDocTypeCode != null and pRDocTypeCode != ''"> and pRDocTypeCode = #{pRDocTypeCode} </if>
|
||||||
|
<if test="pRDocTypeName != null and pRDocTypeName != ''"> and pRDocTypeName = #{pRDocTypeName} </if>
|
||||||
|
<if test="reqEmployeeId != null and reqEmployeeId != ''"> and reqEmployeeId = #{reqEmployeeId} </if>
|
||||||
|
<if test="reqEmployeeId != null and reqEmployeeId != ''"> and reqEmployeeId = #{reqEmployeeId} </if>
|
||||||
|
<if test="reqEmployeeCode != null and reqEmployeeCode != ''"> and reqEmployeeCode = #{reqEmployeeCode} </if>
|
||||||
|
<if test="reqEmployeeName != null and reqEmployeeName != ''"> and reqEmployeeName = #{reqEmployeeName} </if>
|
||||||
|
<if test="reqDepartmentCode != null and reqDepartmentCode != ''"> and reqDepartmentCode = #{reqDepartmentCode} </if>
|
||||||
|
<if test="reqDepartmentName != null and reqDepartmentName != ''"> and reqDepartmentName = #{reqDepartmentName} </if>
|
||||||
|
<if test="sourceTypeCode != null and sourceTypeCode != ''"> and sourceTypeCode = #{sourceTypeCode} </if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status} </if>
|
||||||
|
<if test="statusName != null and statusName != ''"> and statusName = #{statusName} </if>
|
||||||
|
<if test="modifiedOn != null and modifiedOn != ''"> and modifiedOn = #{modifiedOn} </if>
|
||||||
|
<if test="createdOn != null and createdOn != ''"> and createdOn = #{createdOn} </if>
|
||||||
|
<if test="startTime != null and startTime != ''"> and modifiedOn >= #{startTime} </if>
|
||||||
|
<if test="endTime != null and endTime != ''"> <![CDATA[ and modifiedOn <= #{endTime} ]]> </if>
|
||||||
|
and dataStatus is null or dataStatus = ''
|
||||||
|
</trim>
|
||||||
|
order by v_hzya_u9c_pr_pr.modifiedOn desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.dgx.u9c.entity.RequisitionEntity">
|
||||||
|
select count(1) from v_hzya_u9c_pr_pr
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="docNo != null and docNo != ''"> and docNo = #{docNo} </if>
|
||||||
|
<if test="businessDate != null and businessDate != ''"> and businessDate = #{businessDate} </if>
|
||||||
|
<if test="pRDocTypeId != null and pRDocTypeId != ''"> and pRDocTypeId = #{pRDocTypeId} </if>
|
||||||
|
<if test="pRDocTypeCode != null and pRDocTypeCode != ''"> and pRDocTypeCode = #{pRDocTypeCode} </if>
|
||||||
|
<if test="pRDocTypeName != null and pRDocTypeName != ''"> and pRDocTypeName = #{pRDocTypeName} </if>
|
||||||
|
<if test="reqEmployeeId != null and reqEmployeeId != ''"> and reqEmployeeId = #{reqEmployeeId} </if>
|
||||||
|
<if test="reqEmployeeId != null and reqEmployeeId != ''"> and reqEmployeeId = #{reqEmployeeId} </if>
|
||||||
|
<if test="reqEmployeeCode != null and reqEmployeeCode != ''"> and reqEmployeeCode = #{reqEmployeeCode} </if>
|
||||||
|
<if test="reqEmployeeName != null and reqEmployeeName != ''"> and reqEmployeeName = #{reqEmployeeName} </if>
|
||||||
|
<if test="reqDepartmentCode != null and reqDepartmentCode != ''"> and reqDepartmentCode = #{reqDepartmentCode} </if>
|
||||||
|
<if test="reqDepartmentName != null and reqDepartmentName != ''"> and reqDepartmentName = #{reqDepartmentName} </if>
|
||||||
|
<if test="sourceTypeCode != null and sourceTypeCode != ''"> and sourceTypeCode = #{sourceTypeCode} </if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status} </if>
|
||||||
|
<if test="statusName != null and statusName != ''"> and statusName = #{statusName} </if>
|
||||||
|
<if test="modifiedOn != null and modifiedOn != ''"> and modifiedOn = #{modifiedOn} </if>
|
||||||
|
<if test="createdOn != null and createdOn != ''"> and createdOn = #{createdOn} </if>
|
||||||
|
and dataStatus is null or dataStatus = ''
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="entity_update" parameterType="com.hzya.frame.plugin.dgx.u9c.entity.RequisitionEntity">
|
||||||
|
update PR_PR set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="dataStatus != null and dataStatus != ''"> DescFlexField_PrivateDescSeg2 = #{dataStatus},</if>
|
||||||
|
<if test="dataMsg != null and dataMsg != ''"> DescFlexField_PrivateDescSeg1 = #{dataMsg},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,102 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IU9CPluginService;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信OA回传预付单状态到U9C
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 11:54
|
||||||
|
**/
|
||||||
|
public class BackStatusPrepaymentPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
@Resource(name = "u9CPluginServiceImpl")
|
||||||
|
private IU9CPluginService u9CPluginService;
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "BackStatusPrepaymentPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "德广信OA回传预付单状态到U9C";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "德广信OA回传预付单状态到U9C";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 德广信OA回传预付单状态到U9C
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
u9CPluginService.backPrepaymentStartFlow(requestJson);
|
||||||
|
return BaseResult.getSuccessMessageEntity(getPluginLabel()+"执行成功");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,96 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IU9CPluginService;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信OA请购单回传状态到U9c
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 11:56
|
||||||
|
**/
|
||||||
|
public class BackStatusRequisitionPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Resource(name = "u9CPluginServiceImpl")
|
||||||
|
private IU9CPluginService u9CPluginService;
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "BackStatusRequisitionPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "德广信OA请购单回传状态到U9c";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "德广信OA请购单回传状态到U9c";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 德广信OA请购单回传状态到U9c
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
u9CPluginService.backRequisitionStartFlow(requestJson);
|
||||||
|
return BaseResult.getSuccessMessageEntity(getPluginName()+"执行成功");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IPrepaymentService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IU9CPluginService;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单推到OA走审批
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 11:54
|
||||||
|
**/
|
||||||
|
public class PrepaymentPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
@Resource(name = "u9CPluginServiceImpl")
|
||||||
|
private IU9CPluginService u9CPluginService;
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "U9CPrepaymentPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "德广信U9C预付单推到OA插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "德广信U9C预付单推到OA插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
u9CPluginService.prepaymentStartFlow(requestJson);
|
||||||
|
return BaseResult.getSuccessMessageEntity(getPluginLabel()+"执行成功");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IRequisitionService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IU9CPluginService;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C请购单推送OA走审批
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 11:56
|
||||||
|
**/
|
||||||
|
public class RequisitionPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Resource(name = "u9CPluginServiceImpl")
|
||||||
|
private IU9CPluginService u9CPluginService;
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "U9CRequisitionPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "德广信U9C请购单推送OA插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "德广信U9C请购单推送OA插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
u9CPluginService.requisitionStartFlow(requestJson);
|
||||||
|
return BaseResult.getSuccessMessageEntity(getPluginName()+"执行成功");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 获取U9Ctoken
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-24 11:33
|
||||||
|
* **/
|
||||||
|
public interface IAcquireTokenService extends IBaseService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 获取Token
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-24 11:36
|
||||||
|
* **/
|
||||||
|
String getToken();
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentDetailEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 17:22
|
||||||
|
**/
|
||||||
|
public interface IPrepaymentDetailService extends IBaseService<PrepaymentDetailEntity,String> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询预付单明细
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PrepaymentDetailEntity> queryDetails(PrepaymentDetailEntity entity);
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentEntity;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 14:39
|
||||||
|
**/
|
||||||
|
public interface IPrepaymentService extends IBaseService<PrepaymentEntity,String> {
|
||||||
|
/**
|
||||||
|
* 查询u9c预付单
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PrepaymentEntity> queryList(PrepaymentEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新推送状态
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void updateStatus(PrepaymentEntity entity);
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentSuppEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单明细表 第一个页签 供应商明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/10/14 13:43
|
||||||
|
**/
|
||||||
|
public interface IPrepaymentSuppService extends IBaseService<PrepaymentSuppEntity,String> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询预付单明细 供应商页签
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PrepaymentSuppEntity> queryDetails(PrepaymentSuppEntity entity);
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.RequisitionDetailEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 广信U9C请购单 明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 17:22
|
||||||
|
**/
|
||||||
|
public interface IRequisitionDetailService extends IBaseService<RequisitionDetailEntity,String> {
|
||||||
|
/**
|
||||||
|
* 查询请购单明细
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RequisitionDetailEntity> queryDetails(RequisitionDetailEntity entity);
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.RequisitionEntity;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 广信U9C请购单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 14:12
|
||||||
|
**/
|
||||||
|
public interface IRequisitionService extends IBaseService<RequisitionEntity,String> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询U9C请购单
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RequisitionEntity> queryList(RequisitionEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新推送状态
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void updateStatus(RequisitionEntity entity);
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C插件service
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 15:24
|
||||||
|
**/
|
||||||
|
public interface IU9CPluginService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* u9c预付单发起OA流程
|
||||||
|
* @param requestJson
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity prepaymentStartFlow(JSONObject requestJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* u9c请购单发起OA流程
|
||||||
|
* @param requestJson
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity requisitionStartFlow(JSONObject requestJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存日志
|
||||||
|
* @param integration_task_living_details_id 日志表id
|
||||||
|
* @param flag 成功失败
|
||||||
|
* @param taskLivingDetail 日志表对象
|
||||||
|
*/
|
||||||
|
void saveLog(String integration_task_living_details_id, Boolean flag, IntegrationTaskLivingDetailsEntity taskLivingDetail);
|
||||||
|
//根据应用key和应用密钥获取应用编码和应用名称
|
||||||
|
public SysExtensionApiEntity setQueryUrl(SysExtensionApiEntity sysExtensionApiEntity);
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 德广信OA回传预付单状态到U9C
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
JsonResultEntity backPrepaymentStartFlow(JSONObject requestJson);
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 德广信OA请购单回传状态到U9c
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
JsonResultEntity backRequisitionStartFlow(JSONObject requestJson);
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import cn.hutool.http.HttpResponse;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IAcquireTokenService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 获取U9Ctoken
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2024-09-24 11:32
|
||||||
|
* **/
|
||||||
|
@Service(value = "AcquireTokenServiceImpl")
|
||||||
|
public class AcquireTokenServiceImpl extends BaseService implements IAcquireTokenService {
|
||||||
|
|
||||||
|
private static String TOKENTEST="http://122.224.56.190:8082";
|
||||||
|
private static String URL="/U9C/webapi/OAuth2/AuthLogin";
|
||||||
|
@Override
|
||||||
|
public String getToken() {
|
||||||
|
String clientid="001";
|
||||||
|
String clientsecret="8364356273724b499fb840efbc53edb4";
|
||||||
|
String entCode="002";
|
||||||
|
String userCode="OA";
|
||||||
|
String orgCode="1001";
|
||||||
|
String result=null;
|
||||||
|
try {
|
||||||
|
String params="?clientid="+clientid+"&clientsecret="+clientsecret+"&entCode="+entCode+"&userCode="+userCode+"&orgCode="+orgCode;
|
||||||
|
logger.info("======获取德广信U9Ctoken请求参数为:{}===",TOKENTEST + params);
|
||||||
|
String body = HttpRequest.get(TOKENTEST+URL + params).execute().body();
|
||||||
|
logger.info("======获取德广信U9Ctoken返回参数为:{}=====",body);
|
||||||
|
if(StrUtil.isNotEmpty(body)){
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(body);
|
||||||
|
result = jsonObject.getString("Data");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("===获取德广信U9Ctoken失败:{}====",e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IPrepaymentDetailDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentDetailEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IPrepaymentDetailService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 17:23
|
||||||
|
**/
|
||||||
|
public class PrepaymentDetailServiceImpl extends BaseService<PrepaymentDetailEntity,String> implements IPrepaymentDetailService {
|
||||||
|
|
||||||
|
private IPrepaymentDetailDao prepaymentDetailDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setPrepaymentDetailDao(IPrepaymentDetailDao dao) {
|
||||||
|
this.prepaymentDetailDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询预付单明细
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public List<PrepaymentDetailEntity> queryDetails(PrepaymentDetailEntity entity) {
|
||||||
|
List<PrepaymentDetailEntity> list = prepaymentDetailDao.queryList(entity, "com.hzya.frame.plugin.dgx.u9c.dao.impl.PrepaymentDetailDaoImpl.entity_list_base");
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IPrepaymentDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IPrepaymentService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 14:40
|
||||||
|
**/
|
||||||
|
public class PrepaymentServiceImpl extends BaseService<PrepaymentEntity,String> implements IPrepaymentService {
|
||||||
|
|
||||||
|
private IPrepaymentDao prepaymentDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setPrepaymentDao(IPrepaymentDao dao) {
|
||||||
|
this.prepaymentDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询u9c预付单
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public List<PrepaymentEntity> queryList(PrepaymentEntity entity) {
|
||||||
|
List<PrepaymentEntity> list = prepaymentDao.query(entity);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新推送状态
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public void updateStatus(PrepaymentEntity entity) {
|
||||||
|
prepaymentDao.update(entity);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IPrepaymentSuppDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentDetailEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.PrepaymentSuppEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IPrepaymentSuppService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 德广信U9C预付单明细表 第一个页签 供应商明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/10/14 13:44
|
||||||
|
**/
|
||||||
|
public class PrepaymentSuppServiceImpl extends BaseService<PrepaymentSuppEntity,String> implements IPrepaymentSuppService {
|
||||||
|
|
||||||
|
private IPrepaymentSuppDao prepaymentSuppDao;
|
||||||
|
@Autowired
|
||||||
|
public void setPrepaymentSuppDao(IPrepaymentSuppDao dao) {
|
||||||
|
this.prepaymentSuppDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询预付单明细 供应商页签
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public List<PrepaymentSuppEntity> queryDetails(PrepaymentSuppEntity entity) {
|
||||||
|
List<PrepaymentSuppEntity> list = prepaymentSuppDao.queryList(entity, "com.hzya.frame.plugin.dgx.u9c.dao.impl.PrepaymentSuppDaoImpl.entity_list_base");
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IRequisitionDetailDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.RequisitionDetailEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IRequisitionDetailService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 17:25
|
||||||
|
**/
|
||||||
|
public class RequisitionDetailServiceImpl extends BaseService<RequisitionDetailEntity,String> implements IRequisitionDetailService {
|
||||||
|
|
||||||
|
private IRequisitionDetailDao requisitionDetailDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setRequisitionDetailDao(IRequisitionDetailDao dao) {
|
||||||
|
this.requisitionDetailDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询请购单明细
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public List<RequisitionDetailEntity> queryDetails(RequisitionDetailEntity entity) {
|
||||||
|
List<RequisitionDetailEntity> list = requisitionDetailDao.queryList(entity, "com.hzya.frame.plugin.dgx.u9c.dao.impl.RequisitionDetailDaoImpl.entity_list_base");
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IRequisitionDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.RequisitionEntity;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.IRequisitionService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 14:13
|
||||||
|
**/
|
||||||
|
public class RequisitionServiceImpl extends BaseService<RequisitionEntity,String> implements IRequisitionService {
|
||||||
|
|
||||||
|
private IRequisitionDao requisitionDao;
|
||||||
|
@Autowired
|
||||||
|
public void setRequisitionDao(IRequisitionDao dao) {
|
||||||
|
this.requisitionDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询U9C请购单
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public List<RequisitionEntity> queryList(RequisitionEntity entity) {
|
||||||
|
List<RequisitionEntity> list = requisitionDao.queryList(entity, "com.hzya.frame.plugin.dgx.u9c.dao.impl.RequisitionDaoImpl.entity_list_base");
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新推送状态
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public void updateStatus(RequisitionEntity entity) {
|
||||||
|
requisitionDao.update(entity);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,871 @@
|
||||||
|
package com.hzya.frame.plugin.dgx.u9c.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.dao.IOaDao;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.entity.*;
|
||||||
|
import com.hzya.frame.plugin.dgx.u9c.service.*;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.bson.types.Code;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description德广信U9C插件service
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/9/18 15:25
|
||||||
|
**/
|
||||||
|
public class U9CPluginServiceImpl implements IU9CPluginService {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
@Resource(name = "prepaymentServiceImpl")
|
||||||
|
private IPrepaymentService prepaymentService;
|
||||||
|
@Resource
|
||||||
|
private IPrepaymentDetailService prepaymentDetailServiceImpl;
|
||||||
|
@Resource
|
||||||
|
private IPrepaymentSuppService prepaymentSuppService;
|
||||||
|
@Resource(name = "requisitionServiceImpl")
|
||||||
|
private IRequisitionService requisitionService;
|
||||||
|
@Resource
|
||||||
|
private IRequisitionDetailService requisitionDetailServiceImpl;
|
||||||
|
@Resource
|
||||||
|
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||||
|
@Autowired
|
||||||
|
private AcquireTokenServiceImpl acquireTokenService;
|
||||||
|
@Resource
|
||||||
|
private IOaDao oaDao;
|
||||||
|
@Value("${zt.url}")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* u9c预付单发起OA请款单流程 (预付)
|
||||||
|
*
|
||||||
|
* @param requestJson
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity prepaymentStartFlow(JSONObject requestJson) {
|
||||||
|
//数据源编码
|
||||||
|
String datasourceCode = requestJson.getString("sourceCode");
|
||||||
|
//开始时间
|
||||||
|
String startTime = DateUtil.format(requestJson.getDate("startTime"), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
//结束时间
|
||||||
|
String endTime = DateUtil.format(requestJson.getDate("endTime"), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
//重试id
|
||||||
|
String taskId = requestJson.getString("integration_task_living_details_id");
|
||||||
|
//查询U9C预付单
|
||||||
|
PrepaymentEntity prepaymentEntity = new PrepaymentEntity();
|
||||||
|
prepaymentEntity.setDataSourceCode(datasourceCode);
|
||||||
|
if (StrUtil.isEmpty(taskId)) {
|
||||||
|
} else {
|
||||||
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = taskLivingDetailsService.get(taskId);
|
||||||
|
prepaymentEntity.setId(integrationTaskLivingDetailsEntity.getRootAppPk());
|
||||||
|
}
|
||||||
|
List<PrepaymentEntity> prepaymentList = prepaymentService.queryList(prepaymentEntity);
|
||||||
|
if (CollectionUtils.isNotEmpty(prepaymentList)) {
|
||||||
|
for (PrepaymentEntity prepayment : prepaymentList) {
|
||||||
|
//查询u9c预付单供应商明细 第一个页签
|
||||||
|
PrepaymentSuppEntity prepaymentSuppEntity = new PrepaymentSuppEntity();
|
||||||
|
prepaymentSuppEntity.setMainId(prepayment.getId());
|
||||||
|
prepaymentSuppEntity.setDataSourceCode(datasourceCode);
|
||||||
|
List<PrepaymentSuppEntity> prepaymentSuppList = prepaymentSuppService.queryDetails(prepaymentSuppEntity);
|
||||||
|
//查询u9c预付单明细 第二个页签
|
||||||
|
PrepaymentDetailEntity prepaymentDetailEntity = new PrepaymentDetailEntity();
|
||||||
|
prepaymentDetailEntity.setMainId(prepayment.getId());
|
||||||
|
prepaymentDetailEntity.setDataSourceCode(datasourceCode);
|
||||||
|
List<PrepaymentDetailEntity> prepaymentDetailList = prepaymentDetailServiceImpl.queryDetails(prepaymentDetailEntity);
|
||||||
|
if (CollectionUtils.isNotEmpty(prepaymentDetailList) && CollectionUtils.isNotEmpty(prepaymentSuppList)) {
|
||||||
|
//主表
|
||||||
|
JSONObject zb = new JSONObject();
|
||||||
|
//单据类型
|
||||||
|
zb.put("field0001", prepayment.getDocumentTypeName());
|
||||||
|
//币种
|
||||||
|
zb.put("field0002", prepayment.getCurrencyName());
|
||||||
|
//单号
|
||||||
|
zb.put("field0003", prepayment.getDocNo());
|
||||||
|
//业务员
|
||||||
|
zb.put("field0004", prepayment.getTransactorName());
|
||||||
|
//申请日期
|
||||||
|
zb.put("field0005", prepayment.getPayRFDate());
|
||||||
|
//部门
|
||||||
|
zb.put("field0006", prepayment.getDeptName());
|
||||||
|
//预计付款日
|
||||||
|
zb.put("field0007", prepayment.getExpectPayDate());
|
||||||
|
//付款方式
|
||||||
|
zb.put("field0008", prepayment.getPayModeCode());
|
||||||
|
//请款对象
|
||||||
|
zb.put("field0009", prepayment.getRequestObjTypeCode());
|
||||||
|
//状态
|
||||||
|
zb.put("field0010", prepayment.getDocStatusName());
|
||||||
|
//请款用途
|
||||||
|
zb.put("field0011", prepaymentDetailList.get(0).getReqFundUseName());
|
||||||
|
//出纳确认
|
||||||
|
zb.put("field0012", prepayment.getCashierConfirmed());
|
||||||
|
//供应商
|
||||||
|
zb.put("field0044", prepayment.getGys());
|
||||||
|
//请款对应折扣合计
|
||||||
|
zb.put("field0045", "");
|
||||||
|
//折扣后请款金额合计
|
||||||
|
zb.put("field0046", "");
|
||||||
|
//付款本币金额合计
|
||||||
|
zb.put("field0047", "");
|
||||||
|
//请款金额合计
|
||||||
|
zb.put("field0053", "");
|
||||||
|
//请款数量合计
|
||||||
|
zb.put("field0061", "");
|
||||||
|
//请款金额和明细合计
|
||||||
|
zb.put("field0063", "");
|
||||||
|
//单据编号
|
||||||
|
zb.put("field0070", "");
|
||||||
|
//发起人
|
||||||
|
zb.put("field0071", "");
|
||||||
|
//发起部门
|
||||||
|
zb.put("field0072", "");
|
||||||
|
//发起时间
|
||||||
|
zb.put("field0073", "");
|
||||||
|
//子表
|
||||||
|
List<JSONObject> gysList = new LinkedList<>();//供应商
|
||||||
|
List<JSONObject> qkList = new LinkedList<>();//请款
|
||||||
|
for (PrepaymentSuppEntity detail : prepaymentSuppList) {
|
||||||
|
JSONObject gys = new JSONObject();
|
||||||
|
//行号
|
||||||
|
gys.put("field0013", detail.getLineNum());
|
||||||
|
//供应商
|
||||||
|
gys.put("field0014", detail.getSuppName());
|
||||||
|
//选单
|
||||||
|
gys.put("field0015", "");//有问题,不知道字段
|
||||||
|
//折扣前请款金额
|
||||||
|
gys.put("field0016", detail.getRfTotalMoney());
|
||||||
|
//请款对应折扣
|
||||||
|
gys.put("field0017", detail.getRfDisCount());
|
||||||
|
//折扣后请款金额
|
||||||
|
gys.put("field0018", detail.getRfaMoney());
|
||||||
|
//付款本币金额
|
||||||
|
gys.put("field0019", detail.getAcmPayFCMoney());
|
||||||
|
//结算方式
|
||||||
|
gys.put("field0020", detail.getPayType());
|
||||||
|
//收款银行帐号
|
||||||
|
gys.put("field0021", detail.getOppAccBkAccount());
|
||||||
|
//收款账号名称
|
||||||
|
gys.put("field0022", detail.getRecBkAccName());
|
||||||
|
//开户银行
|
||||||
|
gys.put("field0023", detail.getOppAccBk());
|
||||||
|
//收支项目
|
||||||
|
gys.put("field0024", detail.getIncomeExpendItemName());
|
||||||
|
//部门-供应商
|
||||||
|
gys.put("field0025", detail.getDeptName());
|
||||||
|
//业务员-供应商
|
||||||
|
gys.put("field0026", detail.getTransactorName());
|
||||||
|
//项目-供应商
|
||||||
|
gys.put("field0027", "");
|
||||||
|
//预付款类型
|
||||||
|
gys.put("field0051", "");
|
||||||
|
//请款金额
|
||||||
|
gys.put("field0052", "");
|
||||||
|
//料品
|
||||||
|
gys.put("field0054", detail.getItemName());
|
||||||
|
gysList.add(gys);
|
||||||
|
}
|
||||||
|
for (PrepaymentDetailEntity detail : prepaymentDetailList) {
|
||||||
|
JSONObject qk = new JSONObject();
|
||||||
|
//单据类型明细
|
||||||
|
qk.put("field0028", detail.getDocType());
|
||||||
|
//应付单
|
||||||
|
qk.put("field0029", detail.getDocCode());
|
||||||
|
//折扣前可请款金额
|
||||||
|
qk.put("field0030", detail.getCanDisposeMoney());
|
||||||
|
//可享受折扣
|
||||||
|
qk.put("field0031", detail.getRfDisCount());
|
||||||
|
//折扣前请款金额明细
|
||||||
|
qk.put("field0032", detail.getRfTotalMoney());
|
||||||
|
//请款享受折扣
|
||||||
|
qk.put("field0033", detail.getRfDisCount());
|
||||||
|
//折扣后请款金额明细
|
||||||
|
qk.put("field0034", detail.getRaTotalMoney());
|
||||||
|
//累计确认对应金额
|
||||||
|
qk.put("field0035", detail.getCfmMoney());
|
||||||
|
//发票号
|
||||||
|
qk.put("field0036", detail.getInvoiceNum());
|
||||||
|
//发票日期
|
||||||
|
qk.put("field0037", detail.getInvoiceDate());
|
||||||
|
//立账日期
|
||||||
|
qk.put("field0038", detail.getAccrueDate());
|
||||||
|
//记账日期
|
||||||
|
qk.put("field0039", detail.getPostPeriod());
|
||||||
|
//到期日
|
||||||
|
qk.put("field0040", detail.getMaturity());
|
||||||
|
//付款条件
|
||||||
|
qk.put("field0041", detail.getPayTermName());
|
||||||
|
//部门明细
|
||||||
|
qk.put("field0042", detail.getDetpName());
|
||||||
|
//业务员明细
|
||||||
|
qk.put("field0043", detail.getTransactorName());
|
||||||
|
//预付款类型明细
|
||||||
|
qk.put("field0055", "");//有问题,不知道字段
|
||||||
|
//单号明细
|
||||||
|
qk.put("field0056", "");//有问题,不知道字段
|
||||||
|
//单价
|
||||||
|
qk.put("field0057", "");//有问题,不知道字段
|
||||||
|
//数量
|
||||||
|
qk.put("field0058", "");//有问题,不知道字段
|
||||||
|
//单位
|
||||||
|
qk.put("field0059", "");//有问题,不知道字段
|
||||||
|
//请款数量
|
||||||
|
qk.put("field0060", "");//有问题,不知道字段
|
||||||
|
//请款金额明细
|
||||||
|
qk.put("field0062", "");//有问题,不知道字段
|
||||||
|
//费用
|
||||||
|
qk.put("field0064", "");//有问题,不知道字段
|
||||||
|
//料号
|
||||||
|
qk.put("field0065", "");//有问题,不知道字段
|
||||||
|
//料品明细
|
||||||
|
qk.put("field0066", "");//有问题,不知道字段
|
||||||
|
//项目
|
||||||
|
qk.put("field0067", detail.getProjectName());
|
||||||
|
//立账供应商
|
||||||
|
qk.put("field0068", detail.getSuppName());
|
||||||
|
//单据状态
|
||||||
|
qk.put("field0069", prepayment.getDocumentTypeName());
|
||||||
|
qkList.add(qk);
|
||||||
|
}
|
||||||
|
JSONObject formData = new JSONObject(new LinkedHashMap<>());
|
||||||
|
formData.put("formmain_0664", zb);//主表
|
||||||
|
formData.put("formson_0665", gysList);
|
||||||
|
formData.put("formson_0666", qkList);
|
||||||
|
JSONObject data = new JSONObject();
|
||||||
|
data.put("templateCode", "formmain_0664");
|
||||||
|
data.put("draft", "0");
|
||||||
|
data.put("data", formData);
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("appName", "collaboration");
|
||||||
|
param.put("data", data);
|
||||||
|
String paramStr = param.toString();
|
||||||
|
logger.info("u9c预付单发起OA流程请求参数:{}", paramStr);
|
||||||
|
String res = null;
|
||||||
|
Boolean flag = false;
|
||||||
|
try {
|
||||||
|
////1、获取token
|
||||||
|
//JSONObject nouserToken = getToken(null, "800045", "8000450000");
|
||||||
|
//if (nouserToken.getBoolean("flag")) {
|
||||||
|
//2、根据电话获取code
|
||||||
|
//JSONObject usercode = getUsercode(nouserToken.getString("token"), prepayment.getUserPhone(), "800045", "8000450005");
|
||||||
|
//if (usercode.getBoolean("flag")) {
|
||||||
|
//3、根据code,再次获取token
|
||||||
|
JSONObject token = getToken(prepayment.getUserPhone(), "800045", "8000450000");
|
||||||
|
if (token.getBoolean("flag")) {
|
||||||
|
res = invokeEsb(param, "800045", "8000450001", token.getString("token"));
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(res);
|
||||||
|
flag = jsonObject.getBoolean("flag");
|
||||||
|
} else {
|
||||||
|
res = token.getString("msg");
|
||||||
|
}
|
||||||
|
//} else {
|
||||||
|
// res = usercode.getString("msg");
|
||||||
|
//}
|
||||||
|
//} else {
|
||||||
|
// res = nouserToken.getString("msg");
|
||||||
|
//}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("调用oa接口出错:{}", e);
|
||||||
|
res = e.getMessage();
|
||||||
|
}
|
||||||
|
//保存日志
|
||||||
|
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
|
||||||
|
taskLivingDetail.setCreate_time(new Date());
|
||||||
|
taskLivingDetail.setModify_time(new Date());
|
||||||
|
taskLivingDetail.setRootAppPk(prepayment.getId());
|
||||||
|
taskLivingDetail.setRootAppBill(prepayment.getDocNo());
|
||||||
|
taskLivingDetail.setPluginId("U9CPrepaymentPlugin");
|
||||||
|
taskLivingDetail.setRootAppNewData(paramStr);
|
||||||
|
taskLivingDetail.setNewTransmitInfo(res);
|
||||||
|
taskLivingDetail.setNewPushDate(new Date());
|
||||||
|
saveLog(taskId, flag, taskLivingDetail);
|
||||||
|
logger.info("u9c预付单发起OA流程返回结果:{}", res);
|
||||||
|
// 发送完成修改主表状态 已完成或发送失败 flag判断
|
||||||
|
if (flag) {
|
||||||
|
PrepaymentEntity updatePrepayment = new PrepaymentEntity();
|
||||||
|
updatePrepayment.setDataSourceCode(datasourceCode);
|
||||||
|
updatePrepayment.setId(prepayment.getId());
|
||||||
|
updatePrepayment.setDataStatus("1");
|
||||||
|
updatePrepayment.setDataMsg("成功");
|
||||||
|
prepaymentService.updateStatus(updatePrepayment);
|
||||||
|
} else {
|
||||||
|
PrepaymentEntity updatePrepayment = new PrepaymentEntity();
|
||||||
|
updatePrepayment.setDataSourceCode(datasourceCode);
|
||||||
|
updatePrepayment.setId(prepayment.getId());
|
||||||
|
updatePrepayment.setDataStatus("1");
|
||||||
|
updatePrepayment.setDataMsg("失败:" + res);
|
||||||
|
prepaymentService.updateStatus(updatePrepayment);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 没有明细不发送,修改数据状态,已完成,没有明细不发送
|
||||||
|
PrepaymentEntity updatePrepayment = new PrepaymentEntity();
|
||||||
|
updatePrepayment.setDataSourceCode(datasourceCode);
|
||||||
|
updatePrepayment.setId(prepayment.getId());
|
||||||
|
updatePrepayment.setDataStatus("1");
|
||||||
|
updatePrepayment.setDataMsg("成功,没有明细不发送");
|
||||||
|
prepaymentService.updateStatus(updatePrepayment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return BaseResult.getSuccessMessageEntity("德广信U9C预付单推到OA插件执行成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* u9c请购单发起OA请购单流程
|
||||||
|
*
|
||||||
|
* @param requestJson
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity requisitionStartFlow(JSONObject requestJson) {
|
||||||
|
//数据源编码
|
||||||
|
String datasourceCode = requestJson.getString("sourceCode");
|
||||||
|
//开始时间
|
||||||
|
String startTime = DateUtil.format(requestJson.getDate("startTime"), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
//结束时间
|
||||||
|
String endTime = DateUtil.format(requestJson.getDate("endTime"), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
//重试id
|
||||||
|
String taskId = requestJson.getString("integration_task_living_details_id");
|
||||||
|
//查询u9c请购单
|
||||||
|
RequisitionEntity requisitionEntity = new RequisitionEntity();
|
||||||
|
requisitionEntity.setDataSourceCode(datasourceCode);
|
||||||
|
if (StrUtil.isEmpty(taskId)) {
|
||||||
|
//requisitionEntity.setStartTime(startTime);
|
||||||
|
//requisitionEntity.setEndTime(endTime);
|
||||||
|
} else {
|
||||||
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = taskLivingDetailsService.get(taskId);
|
||||||
|
requisitionEntity.setId(integrationTaskLivingDetailsEntity.getRootAppPk());
|
||||||
|
}
|
||||||
|
List<RequisitionEntity> requisitionList = requisitionService.queryList(requisitionEntity);
|
||||||
|
if (CollectionUtils.isNotEmpty(requisitionList)) {
|
||||||
|
//1、获取token
|
||||||
|
|
||||||
|
for (RequisitionEntity requisition : requisitionList) {
|
||||||
|
//查询u9c请购单明细
|
||||||
|
RequisitionDetailEntity requisitionDetail = new RequisitionDetailEntity();
|
||||||
|
requisitionDetail.setPr(requisition.getId());
|
||||||
|
requisitionDetail.setDataSourceCode(datasourceCode);
|
||||||
|
List<RequisitionDetailEntity> requisitionDetailList = requisitionDetailServiceImpl.queryDetails(requisitionDetail);
|
||||||
|
if (CollectionUtils.isNotEmpty(requisitionDetailList)) {
|
||||||
|
//主表
|
||||||
|
JSONObject formmain_0652 = new JSONObject();
|
||||||
|
//单据类型
|
||||||
|
formmain_0652.put("field0001", requisition.getpRDocTypeName());
|
||||||
|
//需求人员
|
||||||
|
formmain_0652.put("field0005", requisition.getReqEmployeeName());
|
||||||
|
//单号
|
||||||
|
formmain_0652.put("field0007", requisition.getDocNo());
|
||||||
|
//需求部门
|
||||||
|
formmain_0652.put("field0008", requisition.getReqDepartmentName());
|
||||||
|
//日期
|
||||||
|
formmain_0652.put("field0010", requisition.getBusinessDate());
|
||||||
|
//厂区
|
||||||
|
formmain_0652.put("field0012", requisitionDetailList.get(0).getFactoryName());
|
||||||
|
//状态
|
||||||
|
formmain_0652.put("field0013", requisition.getStatusName());
|
||||||
|
|
||||||
|
//发起人
|
||||||
|
//formmain_0652.put("field0002", token.getString("name"));
|
||||||
|
//发起部门
|
||||||
|
//formmain_0652.put("field0003", token.getString("bm"));
|
||||||
|
//发起时间
|
||||||
|
formmain_0652.put("field0004", DateUtil.now());
|
||||||
|
//来源类型 不要
|
||||||
|
//formmain_0652.put("field0006",requisition.getSourceTypeName());
|
||||||
|
//来源单号 不要
|
||||||
|
//formmain_0652.put("field0009",requisitionDetailList.get(0).getSrcDocNo());
|
||||||
|
////项目 不要
|
||||||
|
//formmain_0652.put("field0011",requisitionDetailList.get(0).getProjectName());
|
||||||
|
//请购数量合计 不要
|
||||||
|
//formmain_0652.put("field0030","");
|
||||||
|
//子表
|
||||||
|
List<JSONObject> formsonList = new LinkedList<>();
|
||||||
|
for (RequisitionDetailEntity detail : requisitionDetailList) {
|
||||||
|
JSONObject formson_0653 = new JSONObject();
|
||||||
|
//行号
|
||||||
|
formson_0653.put("field0014", detail.getDocLineNo());
|
||||||
|
//需求分类
|
||||||
|
formson_0653.put("field0015", detail.getDemandCode());
|
||||||
|
//厂区明细
|
||||||
|
formson_0653.put("field0016", detail.getFactoryName());
|
||||||
|
//项目明细
|
||||||
|
formson_0653.put("field0017", detail.getProjectName());
|
||||||
|
//料号
|
||||||
|
formson_0653.put("field0018", detail.getMaterialCode());
|
||||||
|
//品名
|
||||||
|
formson_0653.put("field0021", detail.getMaterialName());
|
||||||
|
//规格
|
||||||
|
formson_0653.put("field0022", detail.getSpecs());
|
||||||
|
//请购数量
|
||||||
|
formson_0653.put("field0023", detail.getReqQtyTU());
|
||||||
|
//单位
|
||||||
|
formson_0653.put("field0024", detail.getStoreUOM());
|
||||||
|
//单据备注
|
||||||
|
formson_0653.put("field0025", detail.getMemo());
|
||||||
|
////需求交货日期
|
||||||
|
//formson_0653.put("field0026", detail.getRequiredDeliveryDate());
|
||||||
|
////来源单号明细
|
||||||
|
//formson_0653.put("field0027", detail.getSrcDocNo());
|
||||||
|
////库存可用量
|
||||||
|
//formson_0653.put("field0028", detail.getpRInvQty());
|
||||||
|
//状态明细
|
||||||
|
formson_0653.put("field0029", detail.getStatus());
|
||||||
|
formsonList.add(formson_0653);
|
||||||
|
}
|
||||||
|
JSONObject formData = new JSONObject();
|
||||||
|
formData.put("formmain_0673", formmain_0652);
|
||||||
|
formData.put("formson_0674", formsonList);
|
||||||
|
JSONObject data = new JSONObject();
|
||||||
|
data.put("templateCode", "formmain_0673");
|
||||||
|
data.put("draft", "0");
|
||||||
|
data.put("data", formData);
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("appName", "collaboration");
|
||||||
|
param.put("data", data);
|
||||||
|
String paramStr = param.toString();
|
||||||
|
logger.info("u9c请购单发起OA流程请求参数:{}", paramStr);
|
||||||
|
String res = null;
|
||||||
|
Boolean flag = false;
|
||||||
|
try {
|
||||||
|
JSONObject token = getToken(requisition.getSendPhone(), "800045", "8000450000");
|
||||||
|
//3、根据code,再次获取token
|
||||||
|
if (token.getBoolean("flag")) {
|
||||||
|
res = invokeEsb(param, "800045", "8000450002", token.getString("token"));
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(res);
|
||||||
|
flag = jsonObject.getBoolean("flag");
|
||||||
|
} else {
|
||||||
|
res = token.getString("msg");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("调用oa接口出错:{}", e);
|
||||||
|
res = e.getMessage();
|
||||||
|
}
|
||||||
|
//保存日志
|
||||||
|
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
|
||||||
|
taskLivingDetail.setCreate_time(new Date());
|
||||||
|
taskLivingDetail.setModify_time(new Date());
|
||||||
|
taskLivingDetail.setRootAppPk(requisition.getId());
|
||||||
|
taskLivingDetail.setRootAppBill(requisition.getDocNo());
|
||||||
|
taskLivingDetail.setPluginId("U9CRequisitionPlugin");
|
||||||
|
taskLivingDetail.setRootAppNewData(paramStr);
|
||||||
|
taskLivingDetail.setNewTransmitInfo(res);
|
||||||
|
taskLivingDetail.setNewPushDate(new Date());
|
||||||
|
saveLog(taskId, flag, taskLivingDetail);
|
||||||
|
logger.info("u9c请购单发起OA流程返回结果:{}", res);
|
||||||
|
// 发送完成修改主表状态 已完成或发送失败 flag判断
|
||||||
|
if (flag) {
|
||||||
|
RequisitionEntity updateRequisition = new RequisitionEntity();
|
||||||
|
updateRequisition.setDataSourceCode(datasourceCode);
|
||||||
|
updateRequisition.setId(requisition.getId());
|
||||||
|
updateRequisition.setDataStatus("1");
|
||||||
|
updateRequisition.setDataMsg("成功");
|
||||||
|
requisitionService.updateStatus(updateRequisition);
|
||||||
|
} else {
|
||||||
|
RequisitionEntity updateRequisition = new RequisitionEntity();
|
||||||
|
updateRequisition.setDataSourceCode(datasourceCode);
|
||||||
|
updateRequisition.setId(requisition.getId());
|
||||||
|
updateRequisition.setDataStatus("2");
|
||||||
|
updateRequisition.setDataMsg("失败:" + res);
|
||||||
|
requisitionService.updateStatus(updateRequisition);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 没有明细不发送,修改数据状态,已完成,没有明细不发送
|
||||||
|
RequisitionEntity updateRequisition = new RequisitionEntity();
|
||||||
|
updateRequisition.setDataSourceCode(datasourceCode);
|
||||||
|
updateRequisition.setId(requisition.getId());
|
||||||
|
updateRequisition.setDataStatus("1");
|
||||||
|
updateRequisition.setDataMsg("成功,没有明细不发送");
|
||||||
|
requisitionService.updateStatus(updateRequisition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return BaseResult.getSuccessMessageEntity("德广信U9C请购单推送OA插件执行成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
private JSONObject getUsercode(String token, String phone, String appId, String apiCode) {
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("phone", phone);
|
||||||
|
param.put("token", token);
|
||||||
|
|
||||||
|
JSONObject returnData = new JSONObject();
|
||||||
|
|
||||||
|
String res = null;
|
||||||
|
String code = null;
|
||||||
|
String bm = null;
|
||||||
|
String name = null;
|
||||||
|
Boolean flag = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
res = invokeEsb(param, appId, apiCode, null);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(res);
|
||||||
|
flag = jsonObject.getBoolean("flag");
|
||||||
|
if (flag) {
|
||||||
|
code = jsonObject.getJSONObject("attribute").getString("loginName");
|
||||||
|
bm = jsonObject.getJSONObject("attribute").getString("orgDepartmentName");
|
||||||
|
name = jsonObject.getJSONObject("attribute").getString("name");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("调用oa接口出错:{}", e);
|
||||||
|
res = e.getMessage();
|
||||||
|
}
|
||||||
|
if (flag) {
|
||||||
|
returnData.put("flag", "true");
|
||||||
|
returnData.put("code", code);
|
||||||
|
returnData.put("bm", bm);
|
||||||
|
returnData.put("name", name);
|
||||||
|
} else {
|
||||||
|
returnData.put("flag", "false");
|
||||||
|
returnData.put("msg", res);
|
||||||
|
}
|
||||||
|
return returnData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param code
|
||||||
|
* @param appId
|
||||||
|
* @param apiCode
|
||||||
|
* @return com.alibaba.fastjson.JSONObject
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 获取token
|
||||||
|
* @Date 11:53 上午 2024/10/28
|
||||||
|
**/
|
||||||
|
private JSONObject getToken(String code, String appId, String apiCode) {
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("userName", "hzyaRest");
|
||||||
|
param.put("password", "3ca9a8d7-43df-4101-8de2-8bb113cb9145");
|
||||||
|
if (code != null) {
|
||||||
|
param.put("loginName", code);
|
||||||
|
}
|
||||||
|
JSONObject returnData = new JSONObject();
|
||||||
|
|
||||||
|
String res = null;
|
||||||
|
String token = null;
|
||||||
|
Boolean flag = false;
|
||||||
|
//String bm = null;
|
||||||
|
String name = null;
|
||||||
|
try {
|
||||||
|
res = invokeEsb(param, appId, apiCode, null);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(res);
|
||||||
|
flag = jsonObject.getBoolean("flag");
|
||||||
|
if (flag) {
|
||||||
|
token = jsonObject.getJSONObject("attribute").getString("id");
|
||||||
|
//bm = jsonObject.getJSONObject("attribute").getJSONObject("bindingUser").getString("orgDepartmentName");
|
||||||
|
name = jsonObject.getJSONObject("attribute").getJSONObject("bindingUser").getString("name");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("调用oa接口出错:{}", e);
|
||||||
|
res = e.getMessage();
|
||||||
|
}
|
||||||
|
if (flag) {
|
||||||
|
returnData.put("flag", "true");
|
||||||
|
returnData.put("token", token);
|
||||||
|
//returnData.put("bm", bm);
|
||||||
|
returnData.put("name", name);
|
||||||
|
} else {
|
||||||
|
returnData.put("flag", "false");
|
||||||
|
returnData.put("msg", res);
|
||||||
|
}
|
||||||
|
return returnData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存日志
|
||||||
|
*
|
||||||
|
* @param integration_task_living_details_id 日志表id
|
||||||
|
* @param flag 成功失败
|
||||||
|
* @param taskLivingDetail 日志表对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void saveLog(String integration_task_living_details_id, Boolean flag, IntegrationTaskLivingDetailsEntity taskLivingDetail) {
|
||||||
|
try {
|
||||||
|
//判断,成功调用这个方法
|
||||||
|
if (StrUtil.isEmpty(integration_task_living_details_id)) {
|
||||||
|
if (flag) {
|
||||||
|
taskLivingDetailsService.saveLogToSuccess(taskLivingDetail);
|
||||||
|
} else {
|
||||||
|
//失败 调用这个方法
|
||||||
|
taskLivingDetailsService.saveLogToFail(taskLivingDetail);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
taskLivingDetail.setId(integration_task_living_details_id);
|
||||||
|
if (flag) {
|
||||||
|
//如果是重试 成功调这个方法
|
||||||
|
taskLivingDetailsService.saveLogFailToSuccess(taskLivingDetail);
|
||||||
|
} else {
|
||||||
|
//如果是重试 失败调这个方法
|
||||||
|
taskLivingDetailsService.updateLogFailToSuccess(taskLivingDetail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("保存日志出错:{}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//调用注册好的esb接口
|
||||||
|
private String invokeEsb(JSONObject jsonObject, String appId, String apiCode, String token) {
|
||||||
|
String param = jsonObject.toString();
|
||||||
|
logger.info("调用:{},请求参数:{}", apiCode, param);
|
||||||
|
String result = null;
|
||||||
|
if (token != null) {
|
||||||
|
result = HttpRequest.post(url)
|
||||||
|
.header("token", token)//token
|
||||||
|
.header("appId", appId)//目标应用
|
||||||
|
.header("apiCode", apiCode)//目标api
|
||||||
|
.header("publicKey", "ZJYAh1QkjBK/pIrl8+vYvw190Jg/Oh84xuvDYe8sPbEtO65Ce7eDIk+3zDUT+v578prj")//调用方key
|
||||||
|
.header("secretKey", "oS2ELoTO92eVwuu0wsFvvHivg3rt8iyJqZTNDxa3iiZHzw7KU9LjmJqJDi2kQNo5j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//调用方密钥
|
||||||
|
.body(param)
|
||||||
|
.timeout(30000)
|
||||||
|
.execute()
|
||||||
|
.body();
|
||||||
|
} else {
|
||||||
|
result = HttpRequest.post(url)
|
||||||
|
.header("appId", appId)//目标应用
|
||||||
|
.header("apiCode", apiCode)//目标api
|
||||||
|
.header("publicKey", "ZJYAh1QkjBK/pIrl8+vYvw190Jg/Oh84xuvDYe8sPbEtO65Ce7eDIk+3zDUT+v578prj")//调用方key
|
||||||
|
.header("secretKey", "oS2ELoTO92eVwuu0wsFvvHivg3rt8iyJqZTNDxa3iiZHzw7KU9LjmJqJDi2kQNo5j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//调用方密钥
|
||||||
|
.body(param)
|
||||||
|
.timeout(30000)
|
||||||
|
.execute()
|
||||||
|
.body();
|
||||||
|
}
|
||||||
|
logger.info("调用:{},返回参数:{}", apiCode, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据应用key和应用密钥获取应用编码和应用名称
|
||||||
|
@Override
|
||||||
|
public SysExtensionApiEntity setQueryUrl(SysExtensionApiEntity sysExtensionApiEntity) {
|
||||||
|
String bodys = sysExtensionApiEntity.getBodys();
|
||||||
|
JSONObject jsonObject = JSON.parseObject(bodys);
|
||||||
|
String url = jsonObject.getString("phone") + "?token=" + jsonObject.getString("token");
|
||||||
|
sysExtensionApiEntity.setAddQuerys(url);
|
||||||
|
return sysExtensionApiEntity;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 德广信OA回传预付单状态到U9C
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity backPrepaymentStartFlow(JSONObject requestJson) {
|
||||||
|
//数据源编码
|
||||||
|
String datasourceCode = requestJson.getString("sourceCode");
|
||||||
|
//重试id
|
||||||
|
String taskId = requestJson.getString("integration_task_living_details_id");
|
||||||
|
//查询OA预付单
|
||||||
|
OaEntity oaEntity = new OaEntity();
|
||||||
|
oaEntity.setDataSourceCode(datasourceCode);
|
||||||
|
if (!StrUtil.isEmpty(taskId)) {
|
||||||
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = taskLivingDetailsService.get(taskId);
|
||||||
|
oaEntity.setId(integrationTaskLivingDetailsEntity.getRootAppPk());
|
||||||
|
}
|
||||||
|
List<OaEntity> oaEntities = oaDao.queryQkdList(oaEntity);
|
||||||
|
//发送数据
|
||||||
|
if (CollectionUtils.isNotEmpty(oaEntities)) {
|
||||||
|
for (OaEntity oaEntity1 : oaEntities) {
|
||||||
|
if(oaEntity1.getDocNo() == null || "".equals(oaEntity1.getDocNo())){
|
||||||
|
OaEntity updateOa = new OaEntity();
|
||||||
|
updateOa.setDataSourceCode(datasourceCode);
|
||||||
|
updateOa.setId(oaEntity1.getId());
|
||||||
|
updateOa.setSendStatus("2");
|
||||||
|
updateOa.setSendMsg("失败:单据号为空");
|
||||||
|
oaDao.updateQkd(updateOa);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONArray senddataList = new JSONArray();
|
||||||
|
JSONObject senddata = new JSONObject();
|
||||||
|
senddata.put("Code",oaEntity1.getDocNo());
|
||||||
|
senddataList.add(senddata);
|
||||||
|
logger.info("德广信OA回传预付单状态到U9C参数:{}", senddataList.toString());
|
||||||
|
String res = null;
|
||||||
|
Boolean flag = false;
|
||||||
|
try {
|
||||||
|
//todo调用接口
|
||||||
|
String token = acquireTokenService.getToken();
|
||||||
|
if(StrUtil.isEmpty(token)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String apicode = "8000440005";
|
||||||
|
if(oaEntity1.getStatus() != null && "3".equals(oaEntity1.getStatus())){
|
||||||
|
apicode ="8000440004";
|
||||||
|
}
|
||||||
|
String result = HttpRequest.post(url)
|
||||||
|
.header("token", token)//目标应用
|
||||||
|
.header("appId", "800044")//目标应用
|
||||||
|
.header("apiCode", apicode)//目标api
|
||||||
|
.header("publicKey", "ZJYAdmAd+G+wwPab5xb6R6a/n+AJoLcXTWy4IYUJSsIZCkxCe7eDIk+3zDUT+v578prj")//调用方key
|
||||||
|
.header("secretKey", "5oaeo0y2U+3ocl2dbvvStTINXKUNXyiDwiwkim0v/DG4WrdQ97jMoE2/za5T5GcFj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//调用方密钥
|
||||||
|
.body(senddataList.toString())
|
||||||
|
.timeout(30000)
|
||||||
|
.execute()
|
||||||
|
.body();
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
flag = jsonObject.getBoolean("flag");
|
||||||
|
res = result;
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("调用U9接口出错:{}", e);
|
||||||
|
res = e.getMessage();
|
||||||
|
}
|
||||||
|
//保存日志
|
||||||
|
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
|
||||||
|
taskLivingDetail.setCreate_time(new Date());
|
||||||
|
taskLivingDetail.setModify_time(new Date());
|
||||||
|
taskLivingDetail.setRootAppPk(oaEntity1.getId());
|
||||||
|
taskLivingDetail.setRootAppBill(oaEntity1.getDocNo());
|
||||||
|
taskLivingDetail.setPluginId("BackStatusPrepaymentPlugin");
|
||||||
|
taskLivingDetail.setRootAppNewData(senddata.toString());
|
||||||
|
taskLivingDetail.setNewTransmitInfo(res);
|
||||||
|
taskLivingDetail.setNewPushDate(new Date());
|
||||||
|
saveLog(taskId, flag, taskLivingDetail);
|
||||||
|
logger.info("OA回传预付单状态到U9C流程返回结果:{}", res);
|
||||||
|
// 发送完成修改主表状态 已完成或发送失败 flag判断
|
||||||
|
if (flag) {
|
||||||
|
OaEntity updateOa = new OaEntity();
|
||||||
|
updateOa.setDataSourceCode(datasourceCode);
|
||||||
|
updateOa.setId(oaEntity1.getId());
|
||||||
|
updateOa.setSendStatus("1");
|
||||||
|
updateOa.setSendMsg("成功");
|
||||||
|
oaDao.updateQkd(updateOa);
|
||||||
|
} else {
|
||||||
|
OaEntity updateOa = new OaEntity();
|
||||||
|
updateOa.setDataSourceCode(datasourceCode);
|
||||||
|
updateOa.setId(oaEntity1.getId());
|
||||||
|
updateOa.setSendStatus("2");
|
||||||
|
updateOa.setSendMsg("失败:" + res);
|
||||||
|
oaDao.updateQkd(updateOa);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return BaseResult.getSuccessMessageEntity("德广信OA回传预付单状态到U9C插件执行成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 德广信OA请购单回传状态到U9c
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity backRequisitionStartFlow(JSONObject requestJson) {
|
||||||
|
//数据源编码
|
||||||
|
String datasourceCode = requestJson.getString("sourceCode");
|
||||||
|
//重试id
|
||||||
|
String taskId = requestJson.getString("integration_task_living_details_id");
|
||||||
|
//查询OA预付单
|
||||||
|
OaEntity oaEntity = new OaEntity();
|
||||||
|
oaEntity.setDataSourceCode(datasourceCode);
|
||||||
|
if (!StrUtil.isEmpty(taskId)) {
|
||||||
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = taskLivingDetailsService.get(taskId);
|
||||||
|
oaEntity.setId(integrationTaskLivingDetailsEntity.getRootAppPk());
|
||||||
|
}
|
||||||
|
List<OaEntity> oaEntities = oaDao.queryQgdList(oaEntity);
|
||||||
|
|
||||||
|
//发送数据
|
||||||
|
if (CollectionUtils.isNotEmpty(oaEntities)) {
|
||||||
|
for (OaEntity oaEntity1 : oaEntities) {
|
||||||
|
if(oaEntity1.getDocNo() == null || "".equals(oaEntity1.getDocNo())){
|
||||||
|
OaEntity updateOa = new OaEntity();
|
||||||
|
updateOa.setDataSourceCode(datasourceCode);
|
||||||
|
updateOa.setId(oaEntity1.getId());
|
||||||
|
updateOa.setSendStatus("2");
|
||||||
|
updateOa.setSendMsg("失败:单据号为空");
|
||||||
|
oaDao.updateQkd(updateOa);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
JSONArray senddataList = new JSONArray();
|
||||||
|
JSONObject PRData = new JSONObject();
|
||||||
|
JSONObject senddata = new JSONObject();
|
||||||
|
senddata.put("Code",oaEntity1.getDocNo());
|
||||||
|
PRData.put("PRData",senddata);
|
||||||
|
senddataList.add(PRData);
|
||||||
|
logger.info("德广信OA回传请购单状态到U9C参数:{}", senddataList.toString());
|
||||||
|
String res = null;
|
||||||
|
Boolean flag = false;
|
||||||
|
try {
|
||||||
|
//todo调用接口
|
||||||
|
String token = acquireTokenService.getToken();
|
||||||
|
if(StrUtil.isEmpty(token)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String apicode = "8000440007";
|
||||||
|
if(oaEntity1.getStatus() != null && "3".equals(oaEntity1.getStatus())){
|
||||||
|
apicode ="8000440006";
|
||||||
|
}
|
||||||
|
String result = HttpRequest.post(url)
|
||||||
|
.header("token", token)//目标应用
|
||||||
|
.header("appId", "800044")//目标应用
|
||||||
|
.header("apiCode", apicode)//目标api
|
||||||
|
.header("publicKey", "ZJYAdmAd+G+wwPab5xb6R6a/n+AJoLcXTWy4IYUJSsIZCkxCe7eDIk+3zDUT+v578prj")//调用方key
|
||||||
|
.header("secretKey", "5oaeo0y2U+3ocl2dbvvStTINXKUNXyiDwiwkim0v/DG4WrdQ97jMoE2/za5T5GcFj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//调用方密钥
|
||||||
|
.body(senddataList.toString())
|
||||||
|
.timeout(30000)
|
||||||
|
.execute()
|
||||||
|
.body();
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
flag = jsonObject.getBoolean("flag");
|
||||||
|
res = result;
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("调用U9接口出错:{}", e);
|
||||||
|
res = e.getMessage();
|
||||||
|
}
|
||||||
|
//保存日志
|
||||||
|
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
|
||||||
|
taskLivingDetail.setCreate_time(new Date());
|
||||||
|
taskLivingDetail.setModify_time(new Date());
|
||||||
|
taskLivingDetail.setRootAppPk(oaEntity1.getId());
|
||||||
|
taskLivingDetail.setRootAppBill(oaEntity1.getDocNo());
|
||||||
|
taskLivingDetail.setPluginId("BackStatusRequisitionPlugin");
|
||||||
|
taskLivingDetail.setRootAppNewData(senddata.toString());
|
||||||
|
taskLivingDetail.setNewTransmitInfo(res);
|
||||||
|
taskLivingDetail.setNewPushDate(new Date());
|
||||||
|
saveLog(taskId, flag, taskLivingDetail);
|
||||||
|
logger.info("OA回传请购单状态到U9C流程返回结果:{}", res);
|
||||||
|
// 发送完成修改主表状态 已完成或发送失败 flag判断
|
||||||
|
if (flag) {
|
||||||
|
OaEntity updateOa = new OaEntity();
|
||||||
|
updateOa.setDataSourceCode(datasourceCode);
|
||||||
|
updateOa.setId(oaEntity1.getId());
|
||||||
|
updateOa.setSendStatus("1");
|
||||||
|
updateOa.setSendMsg("成功");
|
||||||
|
oaDao.updateQgd(updateOa);
|
||||||
|
} else {
|
||||||
|
OaEntity updateOa = new OaEntity();
|
||||||
|
updateOa.setDataSourceCode(datasourceCode);
|
||||||
|
updateOa.setId(oaEntity1.getId());
|
||||||
|
updateOa.setSendStatus("2");
|
||||||
|
updateOa.setSendMsg("失败:" + res);
|
||||||
|
oaDao.updateQgd(updateOa);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return BaseResult.getSuccessMessageEntity("德广信OA回传请购单状态到U9C插件执行成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -452,7 +452,6 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info("执行异常错误原因:"+e);
|
|
||||||
logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
||||||
taskDetailEntity.setResult("新增返回脚本解析保存三方id错误");
|
taskDetailEntity.setResult("新增返回脚本解析保存三方id错误");
|
||||||
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
|
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
|
||||||
|
@ -544,7 +543,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
map1.put("tableName",mainDb);
|
map1.put("tableName",mainDb);
|
||||||
map1.put("dataStatus", "N");
|
map1.put("dataStatus", "N");
|
||||||
map1.put("deleteStatus", "0");
|
map1.put("deleteStatus", "0");
|
||||||
map1.put("size", 50);
|
map1.put("size", 10);
|
||||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||||
objects = toLowerCaseKeys(objects);
|
objects = toLowerCaseKeys(objects);
|
||||||
|
|
||||||
|
@ -739,7 +738,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
map1.put("tableName",mainDb);
|
map1.put("tableName",mainDb);
|
||||||
//map1.put("dataStatus", "F");
|
//map1.put("dataStatus", "F");
|
||||||
map1.put("updateStatus", "0");
|
map1.put("updateStatus", "0");
|
||||||
map1.put("size", 50);
|
map1.put("size", 10);
|
||||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||||
objects = toLowerCaseKeys(objects);
|
objects = toLowerCaseKeys(objects);
|
||||||
|
|
||||||
|
@ -927,7 +926,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
map1.put("tableName",mainDb);
|
map1.put("tableName",mainDb);
|
||||||
//map1.put("dataStatus", "Y");
|
//map1.put("dataStatus", "Y");
|
||||||
map1.put("addStatus", "0");
|
map1.put("addStatus", "0");
|
||||||
map1.put("size", 50);
|
map1.put("size", 100);
|
||||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||||
objects = toLowerCaseKeys(objects);
|
objects = toLowerCaseKeys(objects);
|
||||||
|
|
||||||
|
@ -992,7 +991,6 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
mdmModuleSendLogEntity.setTableName(mainDb+"_send_log");
|
mdmModuleSendLogEntity.setTableName(mainDb+"_send_log");
|
||||||
mdmModuleSendLogEntity.setFormmainId(doObjects.get(i).getString("id"));
|
mdmModuleSendLogEntity.setFormmainId(doObjects.get(i).getString("id"));
|
||||||
mdmModuleSendLogEntity.setSts("Y");
|
mdmModuleSendLogEntity.setSts("Y");
|
||||||
mdmModuleSendLogEntity.setDataType("1");
|
|
||||||
mdmModuleSendLogEntity.setAppId(sysApplicationEntity.getId());
|
mdmModuleSendLogEntity.setAppId(sysApplicationEntity.getId());
|
||||||
mdmModuleSendLogEntity.setApiId(apiEntity.getId());
|
mdmModuleSendLogEntity.setApiId(apiEntity.getId());
|
||||||
//mdmModuleSendLogEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
|
//mdmModuleSendLogEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
|
||||||
|
@ -1123,12 +1121,10 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
}
|
}
|
||||||
//保存日志
|
//保存日志
|
||||||
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");
|
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);
|
|
||||||
continue;
|
continue;
|
||||||
}else {
|
}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");
|
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);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1136,14 +1132,12 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
//所有下发发送完成,修改数据状态
|
//所有下发发送完成,修改数据状态
|
||||||
for (int i = 0; i < objects.size(); i++) {
|
for (int i = 0; i < objects.size(); i++) {
|
||||||
if(objects.get(i).getBoolean("sendsanfzt123")){
|
Map<String, Object> updateMap = new HashMap<>();
|
||||||
Map<String, Object> updateMap = new HashMap<>();
|
updateMap.put("tableName",mainDb);
|
||||||
updateMap.put("tableName",mainDb);
|
//updateMap.put("dataStatus", "Y");
|
||||||
//updateMap.put("dataStatus", "Y");
|
updateMap.put("addStatus", "1");
|
||||||
updateMap.put("addStatus", "1");
|
updateMap.put("id", objects.get(i).getString("id"));
|
||||||
updateMap.put("id", objects.get(i).getString("id"));
|
mdmModuleDao.updateMdmSTs(updateMap);
|
||||||
mdmModuleDao.updateMdmSTs(updateMap);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,6 @@ public class PushMessagePluginInitializer extends PluginBaseEntity {
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||||
try {
|
try {
|
||||||
logger.info("======开始执行定时消息推送========");
|
logger.info("======开始执行定时消息推送========");
|
||||||
//目前只查询一周内的异常日志进行消息推送
|
|
||||||
List<SysPushMessageEntity> list = sysPushMessageDao.getAll();
|
List<SysPushMessageEntity> list = sysPushMessageDao.getAll();
|
||||||
|
|
||||||
for(SysPushMessageEntity entity : list){
|
for(SysPushMessageEntity entity : list){
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
#######################本地环境#######################
|
||||||
|
logging:
|
||||||
|
#日志级别 指定目录级别
|
||||||
|
level:
|
||||||
|
root: info
|
||||||
|
encodings: GBK
|
||||||
|
file:
|
||||||
|
# 日志保存路径
|
||||||
|
path: D:\yongansystem\logs
|
||||||
|
spring:
|
||||||
|
data:
|
||||||
|
mongodb:
|
||||||
|
# host: 192.168.2.237
|
||||||
|
# port: 27017
|
||||||
|
# database: businesscenter
|
||||||
|
# auto-index-creation: true
|
||||||
|
# password: hzya1314
|
||||||
|
# username: hzya
|
||||||
|
flyway:
|
||||||
|
# 启动flyway migration, 默认为true
|
||||||
|
enabled: false
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
druid:
|
||||||
|
filters: stat,log4j2
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://127.0.0.1:3306/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: f571f73abf62eeef41f0a0993bb01db9
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
|
||||||
|
|
||||||
|
# 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: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
savefile:
|
||||||
|
# 文件保存路径
|
||||||
|
path: D:\yongansystem\logs
|
||||||
|
tomcatpath: D:\yongansystem\logs
|
||||||
|
pluginpath: D:\yongansystem\logs
|
||||||
|
zt:
|
||||||
|
url: http://127.0.0.1:9082/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||||
|
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
|
|
@ -25,20 +25,14 @@ spring:
|
||||||
filters: stat,log4j2
|
filters: stat,log4j2
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
# url: jdbc:mysql://ufidahz.com.cn:9096/dgx?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: hzyazt
|
# username: root
|
||||||
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
# password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
# type: com.alibaba.druid.pool.DruidDataSource
|
|
||||||
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
|
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
|
username: root
|
||||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
# url: jdbc:dm://hzya.ufyct.com:9040/businesscenter?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
|
|
||||||
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
|
||||||
# username: hzyazt
|
|
||||||
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
|
||||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
|
||||||
savefile:
|
savefile:
|
||||||
# 文件保存路径
|
# 文件保存路径
|
||||||
path: /Users/apple/Desktop/log/local
|
path: /Users/apple/Desktop/log/local
|
||||||
|
@ -59,24 +53,4 @@ cbs8:
|
||||||
#电子回单下载临时存放位置
|
#电子回单下载临时存放位置
|
||||||
elec_path: /Users/xiangerlin/Downloads/
|
elec_path: /Users/xiangerlin/Downloads/
|
||||||
OA:
|
OA:
|
||||||
data_source_code: yc_oa
|
data_source_code: yc_oa
|
||||||
server:
|
|
||||||
port: 10086
|
|
||||||
|
|
||||||
# mysqldump -d mylm -hhzya.ufyct.com -p9096 -uroot -phzya1314 >%dirName%\table_view.sql
|
|
||||||
|
|
||||||
|
|
||||||
database:
|
|
||||||
databaseName: businesscenter
|
|
||||||
host: 192.168.2.237
|
|
||||||
port: 3306
|
|
||||||
username: root
|
|
||||||
password: hzya@1314
|
|
||||||
filePase: /Users/apple/Desktop/log
|
|
||||||
fileName: data.sql
|
|
||||||
#sftp:
|
|
||||||
# host: 192.168.2.237
|
|
||||||
# port: 9091
|
|
||||||
# username: cs237
|
|
||||||
# password: hzya@1314
|
|
||||||
# filePase: /databaseBack
|
|
|
@ -14,10 +14,24 @@ spring:
|
||||||
master:
|
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
|
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
|
username: root
|
||||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
savefile:
|
savefile:
|
||||||
# 文件保存路径
|
# 文件保存路径
|
||||||
path: /Users/xiangerlin/work/app/file/dev
|
path: /Users/xiangerlin/work/app/file/dev
|
||||||
pluginpath: /Users/xiangerlin/work/app/file/dev
|
|
||||||
tomcatpath: /Users/xiangerlin/work/app/file/dev
|
tomcatpath: /Users/xiangerlin/work/app/file/dev
|
||||||
|
pluginpath: /Users/xiangerlin/work/app/file/dev
|
||||||
|
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: 0469146F06BF3B01236E84632441E826F3067A6B93BC3839C836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185
|
||||||
|
#电子回单下载临时存放位置
|
||||||
|
elec_path: /Users/xiangerlin/Downloads/
|
||||||
|
OA:
|
||||||
|
data_source_code: yc-test
|
||||||
|
|
|
@ -36,4 +36,4 @@ cbs8:
|
||||||
OA:
|
OA:
|
||||||
data_source_code: yc_oa
|
data_source_code: yc_oa
|
||||||
zt:
|
zt:
|
||||||
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
|
url: http://127.0.0.1:9082/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -126,17 +126,3 @@ jeecg :
|
||||||
bucketName: ??
|
bucketName: ??
|
||||||
data:
|
data:
|
||||||
use: true
|
use: true
|
||||||
database:
|
|
||||||
databaseName:
|
|
||||||
host:
|
|
||||||
port:
|
|
||||||
username:
|
|
||||||
password:
|
|
||||||
filePase:
|
|
||||||
fileName:
|
|
||||||
sftp:
|
|
||||||
host:
|
|
||||||
port:
|
|
||||||
username:
|
|
||||||
password:
|
|
||||||
filePase:
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<plugin>
|
|
||||||
<id>BackUpDatabasePlugin</id>
|
|
||||||
<name>BackUpDatabasePlugin插件</name>
|
|
||||||
<category>20241021</category>
|
|
||||||
</plugin>
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?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="backUpDatabaseInitializer" class="com.hzya.frame.plugin.BackUpDatabase.plugin.BackUpDatabaseInitializer" />
|
|
||||||
</beans>
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<plugin>
|
||||||
|
<id>dgxU9CPlugin</id>
|
||||||
|
<name>德广信U9C插件</name>
|
||||||
|
<category>24091801</category>
|
||||||
|
</plugin>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?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="requisitionDaoImpl" class="com.hzya.frame.plugin.dgx.u9c.dao.impl.RequisitionDaoImpl" />
|
||||||
|
<bean name="requisitionDetailDaoImpl" class="com.hzya.frame.plugin.dgx.u9c.dao.impl.RequisitionDetailDaoImpl" />
|
||||||
|
<bean name="prepaymentDaoImpl" class="com.hzya.frame.plugin.dgx.u9c.dao.impl.PrepaymentDaoImpl" />
|
||||||
|
<bean name="prepaymentDetailDaoImpl" class="com.hzya.frame.plugin.dgx.u9c.dao.impl.PrepaymentDetailDaoImpl" />
|
||||||
|
<bean name="prepaymentSuppDaoImpl" class="com.hzya.frame.plugin.dgx.u9c.dao.impl.PrepaymentSuppDaoImpl" />
|
||||||
|
<bean name="SalesOrderDaoImpl" class="com.hzya.frame.plugin.dgx.oa.dao.impl.SalesOrderDaoImpl" />
|
||||||
|
<bean name="PaymentOrderDaoImpl" class="com.hzya.frame.plugin.dgx.oa.dao.impl.PaymentOrderDaoImpl" />
|
||||||
|
<bean name="oaDaoImpl" class="com.hzya.frame.plugin.dgx.u9c.dao.impl.OaDaoImpl" />
|
||||||
|
</beans>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?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="prepaymentPluginInitializer" class="com.hzya.frame.plugin.dgx.u9c.plugin.PrepaymentPluginInitializer" />
|
||||||
|
<bean name="requisitionPluginInitializer" class="com.hzya.frame.plugin.dgx.u9c.plugin.RequisitionPluginInitializer" />
|
||||||
|
<bean name="backStatusPrepaymentPluginInitializer" class="com.hzya.frame.plugin.dgx.u9c.plugin.BackStatusPrepaymentPluginInitializer" />
|
||||||
|
<bean name="backStatusRequisitionPluginInitializer" class="com.hzya.frame.plugin.dgx.u9c.plugin.BackStatusRequisitionPluginInitializer" />
|
||||||
|
<bean name="SalesOrderPluginInitializer" class="com.hzya.frame.plugin.dgx.oa.plugin.SalesOrderPluginInitializer" />
|
||||||
|
<bean name="PaymentOrderPluginInitializer" class="com.hzya.frame.plugin.dgx.oa.plugin.PaymentOrderPluginInitializer" />
|
||||||
|
</beans>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?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="requisitionServiceImpl" class="com.hzya.frame.plugin.dgx.u9c.service.impl.RequisitionServiceImpl" />
|
||||||
|
<bean name="requisitionDetailServiceImpl" class="com.hzya.frame.plugin.dgx.u9c.service.impl.RequisitionDetailServiceImpl" />
|
||||||
|
<bean name="prepaymentServiceImpl" class="com.hzya.frame.plugin.dgx.u9c.service.impl.PrepaymentServiceImpl" />
|
||||||
|
<bean name="prepaymentDetailServiceImpl" class="com.hzya.frame.plugin.dgx.u9c.service.impl.PrepaymentDetailServiceImpl" />
|
||||||
|
<bean name="prepaymentSuppServiceImpl" class="com.hzya.frame.plugin.dgx.u9c.service.impl.PrepaymentSuppServiceImpl" />
|
||||||
|
<bean name="u9CPluginServiceImpl" class="com.hzya.frame.plugin.dgx.u9c.service.impl.U9CPluginServiceImpl" />
|
||||||
|
<bean name="SalesOrderServiceImpl" class="com.hzya.frame.plugin.dgx.oa.service.impl.SalesOrderServiceImpl" />
|
||||||
|
<bean name="PaymentOrderServiceImpl" class="com.hzya.frame.plugin.dgx.oa.service.impl.PaymentOrderServiceImpl" />
|
||||||
|
</beans>
|
|
@ -1,29 +1,11 @@
|
||||||
package com.hzya.frame;
|
package com.hzya.frame;
|
||||||
|
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.util.AESUtil;
|
import com.hzya.frame.util.AESUtil;
|
||||||
import org.apache.http.HttpEntity;
|
|
||||||
import org.apache.http.client.config.RequestConfig;
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
||||||
import org.apache.http.client.methods.HttpGet;
|
|
||||||
import org.apache.http.client.methods.HttpPut;
|
|
||||||
import org.apache.http.entity.StringEntity;
|
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
|
||||||
import org.apache.http.impl.client.HttpClientBuilder;
|
|
||||||
import org.apache.http.impl.client.HttpClients;
|
|
||||||
import org.apache.http.util.EntityUtils;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName dsasas
|
* @ClassName dsasas
|
||||||
* @Description
|
* @Description
|
||||||
|
@ -36,111 +18,13 @@ public class temButtom {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test01() {
|
public void test01() {
|
||||||
String a = AESUtil.encrypt("hzya@1314");
|
String a = AESUtil.encrypt("dgx@2018");
|
||||||
System.out.println(a);
|
System.out.println(a);
|
||||||
String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
|
String b = AESUtil.decrypt("f571f73abf62eeef41f0a0993bb01db9");
|
||||||
System.out.println(b);
|
System.out.println(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void test02() {
|
|
||||||
// 1056162015172640840 -7858803986346327947 3178176833471791293 合同评审-待办测试(bdmanager 2024-10-22 16:45) 7743552636545550897 bdmanager 18058147870 pending start success 新增成功!
|
|
||||||
// success 更新待办为已办成功!
|
|
||||||
// task7803207f54ff047d6008dcce31c2628f 新增成功!
|
|
||||||
// 2024-10-24 2024-10-24
|
|
||||||
|
|
||||||
String phone ="19357235324";
|
|
||||||
String taskid ="task8b0c7ca72439bc9b0c1c89e8866c8275";
|
|
||||||
//token
|
|
||||||
Map<String, String> headers = new HashMap<>();
|
|
||||||
String token ="https://oapi.dingtalk.com/gettoken?appkey=dingxewtjaserj292ggu&appsecret=DuRw6EEEvhGXfr6Q8wN_x4025qKjrffIGCXF9KeCKKIID-LVSsR6_8KWMei6sug1";
|
|
||||||
String body = sendGet(token,headers);
|
|
||||||
JSONObject tokenobject = JSONObject.parseObject(body);
|
|
||||||
|
|
||||||
//钉钉id
|
|
||||||
headers = new HashMap<>();
|
|
||||||
//https://oapi.dingtalk.com/user/get_by_mobile?access_token=9abd3996cb103ba48dd8c69fea5473e7&mobile=15700100840
|
|
||||||
String ddid ="https://oapi.dingtalk.com/user/get_by_mobile?access_token="+tokenobject.get("access_token")+"&mobile="+phone;
|
|
||||||
String ddidbody = sendGet(ddid,headers);
|
|
||||||
JSONObject ddidobject = JSONObject.parseObject(ddidbody);
|
|
||||||
|
|
||||||
//人员id
|
|
||||||
headers = new HashMap<>();
|
|
||||||
//https://oapi.dingtalk.com/user/get?userid=111336474727636213&access_token=3d21a6614fb037a98542a537336e8149
|
|
||||||
String userid ="https://oapi.dingtalk.com/user/get?userid="+ddidobject.get("userid")+"&access_token="+tokenobject.get("access_token");
|
|
||||||
String useridbody = sendGet(userid,headers);
|
|
||||||
JSONObject useridobject = JSONObject.parseObject(useridbody);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
|
||||||
HttpPut httpPut = new HttpPut("https://api.dingtalk.com/v1.0/todo/users/"+useridobject.get("unionid")+"/tasks/"+taskid);
|
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(35000).setConnectionRequestTimeout(35000).setSocketTimeout(60000).build();
|
|
||||||
httpPut.setConfig(requestConfig);
|
|
||||||
httpPut.setHeader("Content-type", "application/json");
|
|
||||||
httpPut.setHeader("x-acs-dingtalk-access-token", tokenobject.getString("access_token"));
|
|
||||||
Map<String, Object> dataMap = new HashMap();
|
|
||||||
dataMap.put("done", true);
|
|
||||||
CloseableHttpResponse httpResponse = null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
httpPut.setEntity(new StringEntity("{\"done\": true}"));
|
|
||||||
httpResponse = httpClient.execute(httpPut);
|
|
||||||
HttpEntity entity = httpResponse.getEntity();
|
|
||||||
String results = EntityUtils.toString(entity);
|
|
||||||
System.out.println(results);
|
|
||||||
} catch (Exception var15) {
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
httpResponse.close();
|
|
||||||
httpClient.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private String sendGet(String url, Map<String, String> headers) {
|
|
||||||
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
|
|
||||||
// HttpClient
|
|
||||||
CloseableHttpClient closeableHttpClient = httpClientBuilder.disableCookieManagement().build();
|
|
||||||
HttpGet get = new HttpGet(url.toString());
|
|
||||||
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"));
|
|
||||||
} catch (Exception e) {
|
|
||||||
body.append(e.getMessage());
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
// 关闭响应对象
|
|
||||||
if (response != null) {
|
|
||||||
response.close();
|
|
||||||
}
|
|
||||||
// 关闭响应对象
|
|
||||||
if (closeableHttpClient != null) {
|
|
||||||
closeableHttpClient.close();
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return body.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
package com.hzya.frame.dingtalk.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description 通讯录事件类型
|
|
||||||
* @Author xiangerlin
|
|
||||||
* @Date 2024/8/27 15:58
|
|
||||||
**/
|
|
||||||
public enum OrgEventEnum {
|
|
||||||
USER_ADD_ORG("user_add_org","通讯录用户新增"),
|
|
||||||
USER_MODIFY_ORG("user_modify_org","通讯录用户更改"),
|
|
||||||
USER_LEAVE_ORG("user_leave_org","通讯录用户离职"),
|
|
||||||
USER_ACTIVE_ORG("user_active_org","加入企业后用户激活"),
|
|
||||||
ORG_DEPT_CREATE("org_dept_create","通讯录企业部门创建"),
|
|
||||||
ORG_DEPT_MODIFY("org_dept_modify","通讯录企业部门更改"),
|
|
||||||
ORG_DEPT_REMOVE("org_dept_remove","通讯录企业部门删除"),
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
private String code;
|
|
||||||
private String explain;
|
|
||||||
|
|
||||||
OrgEventEnum(String code, String explain) {
|
|
||||||
this.code = code;
|
|
||||||
this.explain = explain;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getExplain() {
|
|
||||||
return explain;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据code获取事件类型
|
|
||||||
* @param code
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static OrgEventEnum getByCode(String code){
|
|
||||||
for (OrgEventEnum org : OrgEventEnum.values()) {
|
|
||||||
if (org.getCode().equals(code)){
|
|
||||||
return org;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
package com.hzya.frame.dingtalk.service;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
|
|
||||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description 钉钉集成扩展类
|
|
||||||
* @Author xiangerlin
|
|
||||||
* @Date 2024/8/28 14:25
|
|
||||||
**/
|
|
||||||
public interface IDingTalkExtService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 调用这个方法初始化钉钉参数
|
|
||||||
* @param entity
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
SysExtensionApiEntity init(SysExtensionApiEntity entity);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询配置在应用上的钉钉参数
|
|
||||||
* @param sysApplication
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JSONObject getDingTalkConfig(SysApplicationEntity sysApplication);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 清空配置缓存
|
|
||||||
*/
|
|
||||||
void clearDingTalkConfigCatch();
|
|
||||||
}
|
|
|
@ -1,66 +0,0 @@
|
||||||
package com.hzya.frame.dingtalk.service;
|
|
||||||
|
|
||||||
import com.dingtalk.api.request.OapiV2UserListRequest;
|
|
||||||
import com.dingtalk.api.response.OapiV2DepartmentGetResponse;
|
|
||||||
import com.dingtalk.api.response.OapiV2DepartmentListsubResponse;
|
|
||||||
import com.dingtalk.api.response.OapiV2UserGetResponse;
|
|
||||||
import com.dingtalk.api.response.OapiV2UserListResponse;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description 钉钉service
|
|
||||||
* @Author xiangerlin
|
|
||||||
* @Date 2024/8/27 16:17
|
|
||||||
**/
|
|
||||||
public interface IDingTalkService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据userid获取用户详情
|
|
||||||
* @param userId 钉钉userid
|
|
||||||
* @param appKey
|
|
||||||
* @param appSecret
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
OapiV2UserGetResponse.UserGetResponse getUserById(String userId, String appKey, String appSecret);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据userid获取用户详情
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
OapiV2UserGetResponse.UserGetResponse getUserById(String userId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取部门用户列表
|
|
||||||
* @param req 请求参数
|
|
||||||
* @param appKey
|
|
||||||
* @param appSecret
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
OapiV2UserListResponse.PageResult getUserListByDeptId(OapiV2UserListRequest req, String appKey, String appSecret);
|
|
||||||
/**
|
|
||||||
* 根据部门id获取部门详情
|
|
||||||
* @param deptId 钉钉部门id
|
|
||||||
* @param appKey
|
|
||||||
* @param appSecret
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
OapiV2DepartmentGetResponse.DeptGetResponse getDeptById(Long deptId, String appKey, String appSecret);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据部门id获取部门详情
|
|
||||||
* @param deptId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
OapiV2DepartmentGetResponse.DeptGetResponse getDeptById(Long deptId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取部门列表,此接口只会返回下一级部门信息
|
|
||||||
* @param deptId 部门id,如果不传则查询一级部门
|
|
||||||
* @param appKey
|
|
||||||
* @param appSecret
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> getDeptList(Long deptId, String appKey, String appSecret);
|
|
||||||
}
|
|
|
@ -1,100 +0,0 @@
|
||||||
package com.hzya.frame.dingtalk.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.dingtalk.service.IDingTalkExtService;
|
|
||||||
import com.hzya.frame.dingtalk.util.DingTalkAccessToken;
|
|
||||||
import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity;
|
|
||||||
import com.hzya.frame.sysnew.application.apiPara.dao.ISysApplicationApiParaDao;
|
|
||||||
import com.hzya.frame.sysnew.application.apiPara.entity.SysApplicationApiParaEntity;
|
|
||||||
import com.hzya.frame.sysnew.application.apiPara.service.ISysApplicationApiParaService;
|
|
||||||
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
|
|
||||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description 钉钉集成扩展类
|
|
||||||
* @Author xiangerlin
|
|
||||||
* @Date 2024/8/28 14:25
|
|
||||||
**/
|
|
||||||
@Service(value = "dingTalkExtService")
|
|
||||||
public class DingTalkExtServiceImpl implements IDingTalkExtService {
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ISysApplicationApiParaDao sysApplicationApiParaDao;
|
|
||||||
private final ConcurrentHashMap<String, JSONObject> dingTalkMap = new ConcurrentHashMap<>();
|
|
||||||
/**
|
|
||||||
* 调用这个方法初始化钉钉参数
|
|
||||||
*
|
|
||||||
* @param entity
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SysExtensionApiEntity init(SysExtensionApiEntity entity) {
|
|
||||||
Map<String, String> headers = entity.getHeaders();
|
|
||||||
if (null == headers){
|
|
||||||
headers = new HashMap<>();
|
|
||||||
}
|
|
||||||
SysApplicationEntity receiveApp = entity.getReceiveApp();
|
|
||||||
//查询应用上配置的参数
|
|
||||||
JSONObject dingTalkConfig = getDingTalkConfig(receiveApp);
|
|
||||||
//给token赋值
|
|
||||||
entity.setQuerys("access_token="+DingTalkAccessToken.getAccessToken(dingTalkConfig.getString("appKey"),dingTalkConfig.getString("appSecret")));
|
|
||||||
return entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询配置在应用上的钉钉参数
|
|
||||||
*
|
|
||||||
* @param sysApplication
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JSONObject getDingTalkConfig(SysApplicationEntity sysApplication) {
|
|
||||||
if (null != sysApplication && StrUtil.isNotEmpty(sysApplication.getId()) && null != sysApplication.getAppId()){
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
|
||||||
String key = sysApplication.getAppId()+"dingTalk";
|
|
||||||
if (null != dingTalkMap.get(key)){
|
|
||||||
return dingTalkMap.get(key);
|
|
||||||
}else {
|
|
||||||
//查询应用上配置的参数
|
|
||||||
SysApplicationApiParaEntity paraEntity = new SysApplicationApiParaEntity();
|
|
||||||
paraEntity.setAppId(sysApplication.getId());
|
|
||||||
List<SysApplicationApiParaEntity> paraList = sysApplicationApiParaDao.query(paraEntity);
|
|
||||||
if (CollectionUtils.isNotEmpty(paraList)) {
|
|
||||||
List<SysApplicationApiParaEntity> appKeyList = paraList.stream().filter(p -> p.getInterfaceKey().equals("appKey")).collect(Collectors.toList());
|
|
||||||
if (CollectionUtils.isNotEmpty(appKeyList)) {
|
|
||||||
jsonObject.put("appKey", appKeyList.get(0).getInterfaceValue());
|
|
||||||
}
|
|
||||||
List<SysApplicationApiParaEntity> appSecretList = paraList.stream().filter(p -> p.getInterfaceKey().equals("appSecret")).collect(Collectors.toList());
|
|
||||||
if (CollectionUtils.isNotEmpty(appSecretList)) {
|
|
||||||
jsonObject.put("appSecret", appSecretList.get(0).getInterfaceValue());
|
|
||||||
}
|
|
||||||
dingTalkMap.put(key,jsonObject);
|
|
||||||
return dingTalkMap.get(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 清空配置缓存
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void clearDingTalkConfigCatch() {
|
|
||||||
dingTalkMap.clear();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,164 +0,0 @@
|
||||||
package com.hzya.frame.dingtalk.service.impl;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.dingtalk.api.DefaultDingTalkClient;
|
|
||||||
import com.dingtalk.api.DingTalkClient;
|
|
||||||
import com.dingtalk.api.request.OapiV2DepartmentGetRequest;
|
|
||||||
import com.dingtalk.api.request.OapiV2DepartmentListsubRequest;
|
|
||||||
import com.dingtalk.api.request.OapiV2UserGetRequest;
|
|
||||||
import com.dingtalk.api.request.OapiV2UserListRequest;
|
|
||||||
import com.dingtalk.api.response.OapiV2DepartmentGetResponse;
|
|
||||||
import com.dingtalk.api.response.OapiV2DepartmentListsubResponse;
|
|
||||||
import com.dingtalk.api.response.OapiV2UserGetResponse;
|
|
||||||
import com.dingtalk.api.response.OapiV2UserListResponse;
|
|
||||||
import com.hzya.frame.dingtalk.service.IDingTalkService;
|
|
||||||
import com.hzya.frame.dingtalk.util.DingTalkAccessToken;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description 钉钉service
|
|
||||||
* @Author xiangerlin
|
|
||||||
* @Date 2024/8/27 16:17
|
|
||||||
**/
|
|
||||||
@Service(value = "dingTalkService")
|
|
||||||
public class DingTalkServiceImpl implements IDingTalkService {
|
|
||||||
Logger logger = LoggerFactory.getLogger(getClass());
|
|
||||||
@Value("${dingtalk.appKey:}")
|
|
||||||
private String dAppKey;
|
|
||||||
@Value("${dingtalk.appSecret:}")
|
|
||||||
private String dAppSecret;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据userid获取用户详情
|
|
||||||
*
|
|
||||||
* @param userId 钉钉userid
|
|
||||||
* @param appKey
|
|
||||||
* @param appSecret
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public OapiV2UserGetResponse.UserGetResponse getUserById(String userId, String appKey, String appSecret) {
|
|
||||||
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/user/get");
|
|
||||||
OapiV2UserGetRequest req = new OapiV2UserGetRequest();
|
|
||||||
req.setUserid(userId);
|
|
||||||
req.setLanguage("zh_CN");
|
|
||||||
try {
|
|
||||||
OapiV2UserGetResponse rsp = client.execute(req, DingTalkAccessToken.getAccessToken(appKey,appSecret));
|
|
||||||
if (rsp.isSuccess()){
|
|
||||||
OapiV2UserGetResponse.UserGetResponse result = rsp.getResult();
|
|
||||||
String s = JSONObject.toJSONString(result);
|
|
||||||
logger.info("人员详情信息:{}",s);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}catch (Exception e){
|
|
||||||
logger.error("根据部门id获取钉钉用户详情出错:{}",e);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据userid获取用户详情
|
|
||||||
*
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public OapiV2UserGetResponse.UserGetResponse getUserById(String userId) {
|
|
||||||
return getUserById(userId,dAppKey,dAppSecret);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取部门用户列表
|
|
||||||
*
|
|
||||||
* @param req 请求参数
|
|
||||||
* @param appKey
|
|
||||||
* @param appSecret
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public OapiV2UserListResponse.PageResult getUserListByDeptId(OapiV2UserListRequest req, String appKey, String appSecret) {
|
|
||||||
try {
|
|
||||||
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/user/list");
|
|
||||||
req.setSize(100L);//每页最大只能查100条
|
|
||||||
req.setOrderField("modify_desc");
|
|
||||||
req.setContainAccessLimit(false);
|
|
||||||
req.setLanguage("zh_CN");
|
|
||||||
OapiV2UserListResponse rsp = client.execute(req, DingTalkAccessToken.getAccessToken(appKey,appSecret));
|
|
||||||
OapiV2UserListResponse.PageResult result = rsp.getResult();
|
|
||||||
return result;
|
|
||||||
}catch (Exception e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据部门id获取部门详情
|
|
||||||
*
|
|
||||||
* @param deptId 钉钉部门id
|
|
||||||
* @param appKey
|
|
||||||
* @param appSecret
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public OapiV2DepartmentGetResponse.DeptGetResponse getDeptById(Long deptId, String appKey, String appSecret) {
|
|
||||||
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/department/get");
|
|
||||||
OapiV2DepartmentGetRequest req = new OapiV2DepartmentGetRequest();
|
|
||||||
req.setDeptId(deptId);
|
|
||||||
req.setLanguage("zh_CN");
|
|
||||||
try {
|
|
||||||
OapiV2DepartmentGetResponse rsp = client.execute(req, DingTalkAccessToken.getAccessToken(appKey,appSecret));
|
|
||||||
if (rsp.isSuccess()){
|
|
||||||
OapiV2DepartmentGetResponse.DeptGetResponse result = rsp.getResult();
|
|
||||||
String s = JSONObject.toJSONString(result);
|
|
||||||
logger.info("部门详情信息:{}",s);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}catch(Exception e){
|
|
||||||
logger.error("根据部门id获取钉钉部门出错:{}",e);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据部门id获取部门详情
|
|
||||||
*
|
|
||||||
* @param deptId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public OapiV2DepartmentGetResponse.DeptGetResponse getDeptById(Long deptId) {
|
|
||||||
return getDeptById(deptId,dAppKey,dAppSecret);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取部门列表,此接口只会返回下一级部门信息
|
|
||||||
* @param deptId 部门id,如果不传则查询一级部门
|
|
||||||
* @param appKey
|
|
||||||
* @param appSecret
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<OapiV2DepartmentListsubResponse.DeptBaseResponse> getDeptList(Long deptId,String appKey,String appSecret) {
|
|
||||||
try {
|
|
||||||
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/department/listsub");
|
|
||||||
OapiV2DepartmentListsubRequest req = new OapiV2DepartmentListsubRequest();
|
|
||||||
req.setDeptId(deptId);
|
|
||||||
req.setLanguage("zh_CN");
|
|
||||||
OapiV2DepartmentListsubResponse rsp = client.execute(req, DingTalkAccessToken.getAccessToken(appKey,appSecret));
|
|
||||||
if (rsp.isSuccess()){
|
|
||||||
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> result = rsp.getResult();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}catch (Exception e){
|
|
||||||
logger.error("获取部门列表接口出错:{}",e);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,103 +0,0 @@
|
||||||
package com.hzya.frame.dingtalk.util;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenResponse;
|
|
||||||
import com.aliyun.tea.TeaException;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
|
|
||||||
import java.time.Instant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description 钉钉获取accessToken
|
|
||||||
* @Author xiangerlin
|
|
||||||
* @Date 2024/8/27 14:05
|
|
||||||
**/
|
|
||||||
public class DingTalkAccessToken {
|
|
||||||
static Logger logger = LoggerFactory.getLogger(DingTalkAccessToken.class);
|
|
||||||
//token
|
|
||||||
private static String accessToken;
|
|
||||||
//过期时间
|
|
||||||
private static Instant expireTime;
|
|
||||||
private static final Long CACHE_EXPIRY_TIME = 7000L; // 缓存有效时间(秒)
|
|
||||||
//应用key
|
|
||||||
private static String appKey;
|
|
||||||
//应用密钥
|
|
||||||
private static String appSecret;
|
|
||||||
@Value("${dingtalk.appKey:}")
|
|
||||||
public static void setAppKey(String appKey) {
|
|
||||||
DingTalkAccessToken.appKey = appKey;
|
|
||||||
}
|
|
||||||
@Value("${dingtalk.appSecret:}")
|
|
||||||
public static void setAppSecret(String appSecret) {
|
|
||||||
DingTalkAccessToken.appSecret = appSecret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取token
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static String getAccessToken(){
|
|
||||||
return getAccessToken(appKey,appSecret);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 获取accessToken
|
|
||||||
*
|
|
||||||
* @param appKey
|
|
||||||
* @param appSecret
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static String getAccessToken(String appKey,String appSecret) {
|
|
||||||
//判断是否过期 如果没过期直接返回
|
|
||||||
if (null != accessToken && expireTime != null && Instant.now().isBefore(expireTime)) {
|
|
||||||
return accessToken;
|
|
||||||
}
|
|
||||||
//获取新的accessToken
|
|
||||||
accessToken = fetchNewAccessToken(appKey,appSecret);
|
|
||||||
//过期时间设置成当前事件+7000s,预留200s的时间
|
|
||||||
expireTime = Instant.now().plusSeconds(CACHE_EXPIRY_TIME);
|
|
||||||
return accessToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取新的accessToken
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private static String fetchNewAccessToken(String appKey,String appSecret) {
|
|
||||||
try {
|
|
||||||
//查询应用上配置的钉钉信息
|
|
||||||
if (StrUtil.isNotEmpty(appKey) && StrUtil.isNotEmpty(appSecret)) {
|
|
||||||
//查询应用上的信息
|
|
||||||
com.aliyun.dingtalkoauth2_1_0.Client client = DingTalkAccessToken.createClient();
|
|
||||||
com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenRequest getAccessTokenRequest = new com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenRequest()
|
|
||||||
.setAppKey(appKey)
|
|
||||||
.setAppSecret(appSecret);
|
|
||||||
GetAccessTokenResponse accessToken = client.getAccessToken(getAccessTokenRequest);
|
|
||||||
String accessToken1 = accessToken.getBody().getAccessToken();
|
|
||||||
return accessToken1;
|
|
||||||
}
|
|
||||||
} catch (Exception _err) {
|
|
||||||
TeaException err = new TeaException(_err.getMessage(), _err);
|
|
||||||
if (!com.aliyun.teautil.Common.empty(err.code) && !com.aliyun.teautil.Common.empty(err.message)) {
|
|
||||||
// err 中含有 code 和 message 属性,可帮助开发定位问题
|
|
||||||
}
|
|
||||||
logger.error("获取钉钉token出错:{}", _err);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 使用 Token 初始化账号Client
|
|
||||||
*
|
|
||||||
* @return Client
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
private static com.aliyun.dingtalkoauth2_1_0.Client createClient() throws Exception {
|
|
||||||
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config();
|
|
||||||
config.protocol = "https";
|
|
||||||
config.regionId = "central";
|
|
||||||
return new com.aliyun.dingtalkoauth2_1_0.Client(config);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -50,7 +50,6 @@ public class HomeServiceImpl extends BaseService<HomeEntity, String> implements
|
||||||
for (int a = 0; a < sysApplicationEntities.size(); a++) {
|
for (int a = 0; a < sysApplicationEntities.size(); a++) {
|
||||||
if(homeEntities.get(i).getAppId()!= null && sysApplicationEntities.get(a).getId().equals(homeEntities.get(i).getAppId())){
|
if(homeEntities.get(i).getAppId()!= null && sysApplicationEntities.get(a).getId().equals(homeEntities.get(i).getAppId())){
|
||||||
homeEntities.get(i).setPath(sysApplicationEntities.get(a).getAppLogo());
|
homeEntities.get(i).setPath(sysApplicationEntities.get(a).getAppLogo());
|
||||||
homeEntities.get(i).setName(sysApplicationEntities.get(a).getName());
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue