Commit 0144a810 by liyanlin

fix

parent 46e11868
FROM openjdk:8-jdk-alpine
VOLUME /tmp
ADD cost-service-1.0-SNAPSHOT.jar cost-service-1.0-SNAPSHOT.jar
ENV LANG en_GB.UTF-8
RUN echo "Asia/Shanghai" > /etc/timezone
RUN echo -e "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.4/main\n\
https://mirror.tuna.tsinghua.edu.cn/alpine/v3.4/community" > /etc/apk/repositories
ENTRYPOINT ["java","-Xms100m","-Xmx300m","-jar","-Dspring.profiles.active=prod","/app.jar"]
EXPOSE 8082
RUN apk --update add curl bash ttf-dejavu && \
rm -rf /var/cache/apk/*
ENTRYPOINT ["java","-Xms1G","-Xmx1G","-jar","-Dspring.profiles.active=prod","/cost-service-1.0-SNAPSHOT.jar"]
EXPOSE 8082
FROM openjdk:8-jdk-alpine
VOLUME /tmp
ADD cost-service-1.0-SNAPSHOT.jar app.jar
RUN echo "Asia/Shanghai" > /etc/timezone
ENTRYPOINT ["java","-Xms3G","-Xmx3G","-jar","-Dspring.profiles.active=4k","/app.jar"]
EXPOSE 8082
......@@ -454,7 +454,11 @@ public class CostDomain implements Serializable {
// 获取文件名
String filePath = this.getFilePath();
if (null != filePath && filePath.contains("&")) {
if(null != filePath && filePath.startsWith("http")){
String fileName = filePath.substring(filePath.lastIndexOf("/") + 1);
costDto.setFileName(fileName);
}
else if (null != filePath && filePath.contains("&")) {
String fileName = filePath.substring(filePath.lastIndexOf("&") + 1);
costDto.setFileName(fileName);
}
......
......@@ -20,4 +20,5 @@ public class NetsuiteKey {
private String token;
private String tokenSecret;
private String realm;
private Boolean doWork;
}
......@@ -44,6 +44,9 @@ public class NetsuiteLogServiceImpl extends ServiceImpl<NetsuiteLogDao,NetsuiteL
@Override
public void publishToNetsuite(int top) {
if(!netsuiteKey.getDoWork()){
return;
}
//78:费用单
Map<String,Object> resultMap = new HashMap<>();
List<NetsuiteLogDto> list = netsuiteLogDao.selectNonPublishTop(NetsuiteLogDomain.SCRIPT_FEE,top);
......
spring:
# 数据源配置
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://172.17.0.14:3306/bailun_other?useUnicode=true&characterEncoding=UTF-8&useSSL=false&rewriteBatchedStatements=true
username: root
password: "DB_oa4kmiles!@#"
hikari:
maximum-pool-size: 200
minimum-idle: 10
rabbitmq:
host: mq.bailuntec.com
port: 5672
username: bailun
password: bailun2019
template:
mandatory: true
publisher-confirms: true
publisher-returns: true
thymeleaf:
prefix: classpath:/templates/
suffix: .html
cache: false
resources:
static-locations: classpath:/resources/, classpath:/static/
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
profiles:
active: prod
mail:
host: smtp.qq.com
username: robbendev@qq.com
password: zaaiclinciptbgdd
properties:
mail:
smtp:
auth: true
ssl:
enable: true
required: true
port: 465
main:
allow-bean-definition-overriding: true
#mybatis plus 配置
mybatis-plus:
mapper-locations:
- classpath:mapper/*.xml
- classpath:mapper/**/*.xml
#分页插件
pagehelper:
helper-dialect: mysql
reasonable: true
support-methods-arguments: true
params: count=countSql
#日志地址
logging:
file:
name: other/log/other.log
#项目参数配置
cost:
url:
# fee
purchase-apply-callback-url-post: http://api.fee.bailuntec.com/purchase/other/purchasing/list/detail/ApplyCallbackUrl
purchase-cashier-callback-url-post: http://api.fee.bailuntec.com/purchase/other/purchasing/list/detail/CashierCallbackUrl
cost-apply-callback-url-post: http://api.fee.bailuntec.com/purchase/other/cost/check/ApplyCallbackUrl
cost-cashier-callback-url-post: http://api.fee.bailuntec.com//purchase/other/cost/check/CashierCallbackUrl
# oa
buy-user-api: http://oa.bailuntec.com/Api/User/GetUser
login-user-api: http://oa.bailuntec.com/Login/GetUserByBLUserAcct
get-exchange-rate-api: http://oa.bailuntec.com/api/ExchangeRate/GetExchangeRate
get-department-list-api: http://oa.bailuntec.com/api/User/GetDeparmentList
# cw
post-company-list-api: http://cw.bailuntec.com/API/API/GetCompanyMainBody
post-apply-api: http://cw.bailuntec.com/API/API/Apply
post-company-list-finance-api: http://cw.bailuntec.com/API/API/GetBankAccount
get-consumables-api: http://cw.bailuntec.com/Cashier/Cashier/BuyCashierRecordList
get-cashier-annex-api: http://cw.bailuntec.com/API/API/GetCashierAnnex
# supplier
get-supplier-page-list-api: http://supplier.bailuntec.com/Api/GetSupplierPageList
get-all-logistics-finance-api: http://supplier.bailuntec.com/Api/GetLogisticsSupplier
get-all-sub-logistics-finance-api: http://supplier.bailuntec.com/Api/GetSubLogisticsSupplier
fee-domain: bailuntec.com
# servlet 容器配置
server:
port: 8082
servlet:
context-path: /purchase/other
# NetSuite Api Base
net-suite:
base-url: https://6916374.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=%s&deploy=1
consumer-key: 250a79acd8e92f85b89cf5808384d1f608fe9a911779f4631b26070aa96661d6
consumer-secret: 28b85bd45e896d38c39a2e36c4094bdbdd6895001f773d62914f436bc17737b9
token: e64196ffe3a77d749be20ef2e02b7e65e673f85845b49c86d6ed8df8b7bbe843
token-secret: 595dda4f2ed594494240261d3abbc9341647e47ba793c747f5749a2d60e05fb9
realm: 6916374
do-work: false
......@@ -101,3 +101,4 @@ net-suite:
token: 042c17360b2f3c831c9531365c8b98ef6aeeaf40ce4e7c46144ee70aad2e7667
token-secret: d974ba497472b258a06175cc62a2edba6104f94c131afba38143e8c3a2f0e125
realm: 6916374_SB1
do-work: false
......@@ -101,4 +101,5 @@ net-suite:
token: e64196ffe3a77d749be20ef2e02b7e65e673f85845b49c86d6ed8df8b7bbe843
token-secret: 595dda4f2ed594494240261d3abbc9341647e47ba793c747f5749a2d60e05fb9
realm: 6916374
do-work: true
......@@ -91,3 +91,4 @@ net-suite:
token: 042c17360b2f3c831c9531365c8b98ef6aeeaf40ce4e7c46144ee70aad2e7667
token-secret: d974ba497472b258a06175cc62a2edba6104f94c131afba38143e8c3a2f0e125
realm: 6916374_SB1
do-work: false
......@@ -40,6 +40,6 @@ public class CostFileUtilTest {
// 文件上传的路径
String filePath = "/Users/huluobin/Downloads/";
// 调用工具类执行保存,并返回 path
String path = CostFileUtil.upload("http://imgcache.bailuntec.com/20200928170018adb228b6-f277-40ff-8d70-1a6da09c82aa工资条附件.xlsx", filePath);
String path = CostFileUtil.qiniuUpload("http://imgcache.bailuntec.com/20200928170018adb228b6-f277-40ff-8d70-1a6da09c82aa工资条附件.xlsx");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment