Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
EIP-Integration
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
李炎
EIP-Integration
Commits
bc424e97
继续操作前请注册或者登录。
提交
bc424e97
authored
10月 13, 2021
作者:
李炎
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
改bug
上级
f22ee536
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
127 行增加
和
129 行删除
+127
-129
ProductionSchedulingTimed.java
...modules/iost/API/TimedTask/ProductionSchedulingTimed.java
+1
-1
PurchaseordererrorController.java
...les/iost/API/controller/PurchaseordererrorController.java
+0
-69
Physicalid.java
...in/java/org/jeecg/modules/iost/API/entity/Physicalid.java
+1
-1
Purchaseorder.java
...java/org/jeecg/modules/iost/API/entity/Purchaseorder.java
+4
-4
Salesorder.java
...va/org/jeecg/modules/iost/API/entity/pojo/Salesorder.java
+73
-25
Supplylist.java
...va/org/jeecg/modules/iost/API/entity/pojo/Supplylist.java
+3
-3
PhysicalIDerrorServiceImpl.java
...les/iost/API/service/impl/PhysicalIDerrorServiceImpl.java
+9
-5
PurchaseorderServiceImpl.java
...dules/iost/API/service/impl/PurchaseorderServiceImpl.java
+5
-11
SalesOrderServiceImpl.java
.../modules/iost/API/service/impl/SalesOrderServiceImpl.java
+1
-0
SalesOrderWebapi.java
...a/org/jeecg/modules/iost/API/webapi/SalesOrderWebapi.java
+2
-0
application.yml
jeecg-boot-module-system/src/main/resources/application.yml
+1
-1
SecurityToolsTest.java
...ule-system/src/test/java/org/jeecg/SecurityToolsTest.java
+27
-9
DEMO.apk
storage/DEMO.apk
+0
-0
没有找到文件。
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/TimedTask/ProductionSchedulingTimed.java
浏览文件 @
bc424e97
...
...
@@ -20,7 +20,7 @@ public class ProductionSchedulingTimed implements Job {
@Autowired
IProductionSchedulingService
productionSchedulingService
;
@Scheduled
(
cron
=
"0 0 1 * * ?"
)
//cron表达式每天凌晨一点
@Scheduled
(
fixedDelay
=
1000
*
60
*
10
)
//
@Scheduled(fixedDelay = 1000*60*10)
public
void
job
()
throws
ParseException
{
productionSchedulingService
.
synchronization
(
null
);
// System.out.println("执行了");
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/controller/PurchaseordererrorController.java
deleted
100644 → 0
浏览文件 @
f22ee536
package
org
.
jeecg
.
modules
.
iost
.
API
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
net.sf.json.JSONObject
;
import
org.apache.commons.lang.StringEscapeUtils
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.aspect.annotation.AutoLog
;
import
org.jeecg.common.system.query.QueryGenerator
;
import
org.jeecg.modules.iost.API.entity.Purchaseorder
;
import
org.jeecg.modules.iost.API.entity.Purchaseordererror
;
import
org.jeecg.modules.iost.API.lanjieqi.Lanjieqi_API
;
import
org.jeecg.modules.iost.API.service.PurchaseordererrorService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Map
;
/**
* 实物ID信息
*/
@Api
(
tags
=
"同步金蝶国网返回日志"
)
@RestController
@RequestMapping
(
"/API/purchase-order-journal"
)
@Slf4j
public
class
PurchaseordererrorController
{
@Autowired
private
PurchaseordererrorService
purchaseordererrorService
;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog
(
value
=
"金蝶销售订单接口-分页列表查询"
)
@ApiOperation
(
value
=
"金蝶销售订单接口-分页列表查询"
,
notes
=
"金蝶销售订单接口-分页列表查询"
)
@GetMapping
(
value
=
"list"
)
public
Result
<?>
queryPageList
(
Purchaseordererror
purchaseordererror
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
QueryWrapper
<
Purchaseordererror
>
purchaseordererrorQueryWrapper
=
QueryGenerator
.
initQueryWrapper
(
purchaseordererror
,
req
.
getParameterMap
());
Page
<
Purchaseordererror
>
purchaseorderPage
=
new
Page
<>(
pageNo
,
pageSize
);
IPage
<
Purchaseordererror
>
page
=
purchaseordererrorService
.
page
(
purchaseorderPage
,
purchaseordererrorQueryWrapper
);
return
Result
.
OK
(
page
);
}
@GetMapping
(
value
=
"select"
)
public
Result
<?>
select
()
{
Map
<
String
,
Object
>
id
=
purchaseordererrorService
.
getMap
(
new
QueryWrapper
<
Purchaseordererror
>().
eq
(
"id"
,
"1426426456518492162"
));
return
Result
.
OK
(
id
);
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/entity/Physicalid.java
浏览文件 @
bc424e97
...
...
@@ -106,7 +106,7 @@ public class Physicalid implements Serializable {
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss.SSS"
)
@ApiModelProperty
(
value
=
"审核日期记录"
)
private
Date
fapprovedate
;
//*实
体主键
*//
//*实
物ID编码
*//
private
String
fbillno
;
/**单据编号**/
private
String
fid
;
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/entity/Purchaseorder.java
浏览文件 @
bc424e97
...
...
@@ -109,10 +109,10 @@ public class Purchaseorder implements Serializable {
* 采购技术固化ID
*/
private
String
fixedTechId
;
/**
* 合同包号/
*
private String pkgNo;
*
/**招标批次号
// 合同包号
private
String
pkgNo
;
/**招标批次号
*/
private
String
bidBatCode
;
/**
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/entity/pojo/Salesorder.java
浏览文件 @
bc424e97
...
...
@@ -16,94 +16,142 @@ import org.springframework.format.annotation.DateTimeFormat;
@TableName
(
"salesorder"
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@ApiModel
(
value
=
"salesorder对象"
,
description
=
"销售订单API"
)
@ApiModel
(
value
=
"salesorder对象"
,
description
=
"销售订单API"
)
public
class
Salesorder
{
private
static
final
long
serialVersionUID
=
1L
;
/**主键*/
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ApiModelProperty
(
value
=
"主键"
)
private
String
id
;
/**采购方总部编码*/
/**
* 采购方总部编码
*/
@Excel
(
name
=
"采购方总部编码"
,
width
=
15
)
@ApiModelProperty
(
value
=
"采购方总部编码"
)
private
String
purchaserhqcode
;
/**销售订单号*/
/**
* 销售订单号
*/
@Excel
(
name
=
"销售订单号"
,
width
=
15
)
@ApiModelProperty
(
value
=
"销售订单号"
)
private
String
sono
;
/**供应商编码*/
/**
* 供应商编码
*/
@Excel
(
name
=
"供应商编码"
,
width
=
15
)
@ApiModelProperty
(
value
=
"供应商编码"
)
private
String
suppliercode
;
/**采购方公司编码*/
/**
* 采购方公司编码
*/
@Excel
(
name
=
"采购方公司编码"
,
width
=
15
)
@ApiModelProperty
(
value
=
"采购方公司编码"
)
private
String
buyercode
;
/**采购方公司名称*/
/**
* 采购方公司名称
*/
@Excel
(
name
=
"采购方公司名称"
,
width
=
15
)
@ApiModelProperty
(
value
=
"采购方公司名称"
)
private
String
buyername
;
/**采购方公司省份*/
/**
* 采购方公司省份
*/
@Excel
(
name
=
"采购方公司省份"
,
width
=
15
)
@ApiModelProperty
(
value
=
"采购方公司省份"
)
private
String
buyerprovince
;
/**品类编码*/
/**
* 品类编码
*/
@Excel
(
name
=
"品类编码"
,
width
=
15
)
@ApiModelProperty
(
value
=
"品类编码"
)
private
String
categorycode
;
/**种类编码*/
/**
* 种类编码
*/
@Excel
(
name
=
"种类编码"
,
width
=
15
)
@ApiModelProperty
(
value
=
"种类编码"
)
private
String
subclasscode
;
/**销售订单状态*/
/**
* 销售订单状态
*/
@Excel
(
name
=
"销售订单状态"
,
width
=
15
)
@ApiModelProperty
(
value
=
"销售订单状态"
)
private
String
sostatus
;
/**销售订单行项目号*/
/**
* 销售订单行项目号
*/
@Excel
(
name
=
"销售订单行项目号"
,
width
=
15
)
@ApiModelProperty
(
value
=
"销售订单行项目号"
)
private
String
soitemno
;
/**采购订单行项目ID*/
/**
* 采购订单行项目ID
*/
@Excel
(
name
=
"采购订单行项目ID"
,
width
=
15
)
@ApiModelProperty
(
value
=
"采购订单行项目ID"
)
private
String
poitemid
;
/**物资编码*/
/**
* 物资编码
*/
@Excel
(
name
=
"物资编码"
,
width
=
15
)
@ApiModelProperty
(
value
=
"物资编码"
)
private
String
productcode
;
/**物资名称*/
/**
* 物资名称
*/
@Excel
(
name
=
"物资名称"
,
width
=
15
)
@ApiModelProperty
(
value
=
"物资名称"
)
private
String
productname
;
/**物资单位*/
/**
* 物资单位
*/
@Excel
(
name
=
"物资单位"
,
width
=
15
)
@ApiModelProperty
(
value
=
"物资单位"
)
private
String
productunit
;
/**物资数量*/
/**
* 物资数量
*/
@Excel
(
name
=
"物资数量"
,
width
=
15
)
@ApiModelProperty
(
value
=
"物资数量"
)
private
String
productamount
;
/**数据拥有方*/
/**
* 数据拥有方
*/
@Excel
(
name
=
"数据拥有方"
,
width
=
15
)
@ApiModelProperty
(
value
=
"数据拥有方"
)
private
String
ownerid
;
/**数据可见方*/
/**
* 数据可见方
*/
@Excel
(
name
=
"数据可见方"
,
width
=
15
)
@ApiModelProperty
(
value
=
"数据可见方"
)
private
String
openid
;
/**数据来源 0:供应商, 1:网关, 2:代理*/
/**
* 数据来源 0:供应商, 1:网关, 2:代理
*/
@Excel
(
name
=
"数据来源 0:供应商, 1:网关, 2:代理"
,
width
=
15
)
@ApiModelProperty
(
value
=
"数据来源 0:供应商, 1:网关, 2:代理"
)
private
String
datasource
;
/**来源数据创建时间*/
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
/**
* 来源数据创建时间
*/
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"来源数据创建时间"
,
width
=
15
)
@ApiModelProperty
(
value
=
"来源数据创建时间"
)
private
String
datasourcecreatetime
;
/**实体主键*/
/**
* 实体主键
*/
@Excel
(
name
=
"实体主键"
,
width
=
15
)
@ApiModelProperty
(
value
=
"实体主键"
)
private
String
fid
;
/**
* 销售订单编码
*/
@Excel
(
name
=
"销售订单编码"
,
width
=
15
)
@ApiModelProperty
(
value
=
"销售订单编码"
)
private
String
fbillno
;
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/entity/pojo/Supplylist.java
浏览文件 @
bc424e97
...
...
@@ -37,9 +37,9 @@ public class Supplylist implements Serializable {
@Excel
(
name
=
"实体主键"
,
width
=
15
)
@ApiModelProperty
(
value
=
"实体主键"
)
private
String
fid
;
/**
单据编号
*/
@Excel
(
name
=
"
单据编号
"
,
width
=
15
)
@ApiModelProperty
(
value
=
"
单据编号
"
)
/**
供货单编码
*/
@Excel
(
name
=
"
供货单编码
"
,
width
=
15
)
@ApiModelProperty
(
value
=
"
供货单编码
"
)
private
String
fbillno
;
/**采购方总部编码*/
@Excel
(
name
=
"采购方总部编码"
,
width
=
15
)
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/impl/PhysicalIDerrorServiceImpl.java
浏览文件 @
bc424e97
...
...
@@ -221,11 +221,15 @@ public class PhysicalIDerrorServiceImpl extends ServiceImpl<PhysicaliderrorMappe
}
public
String
timeSSS
(
String
selectedTimeStamp
)
{
int
x
=
selectedTimeStamp
.
length
()
-
selectedTimeStamp
.
lastIndexOf
(
'.'
);
if
(
x
==
2
)
selectedTimeStamp
+=
"00"
;
if
(
x
==
3
)
selectedTimeStamp
+=
'0'
;
if
(
selectedTimeStamp
.
indexOf
(
"."
)>
0
)
{
int
x
=
selectedTimeStamp
.
length
()
-
selectedTimeStamp
.
lastIndexOf
(
'.'
);
if
(
x
==
2
)
selectedTimeStamp
+=
"00"
;
if
(
x
==
3
)
selectedTimeStamp
+=
'0'
;
}
else
{
selectedTimeStamp
+=
".000"
;
}
return
selectedTimeStamp
;
}
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/impl/PurchaseorderServiceImpl.java
浏览文件 @
bc424e97
...
...
@@ -53,19 +53,12 @@ public class PurchaseorderServiceImpl extends ServiceImpl<PurchaseorderMapper, P
@Override
public
JSONObject
select
(
Map
<
String
,
String
>
map
)
{
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
purchaseorderApi
.
select
());
String
webreq
=
salesOrderWebapi
.
add
(
jsonObject
);
JSONObject
js
=
JSONObject
.
fromObject
(
webreq
);
//JSON.parseObject(json,Map.class);
JSONObject
js2
=
JSONObject
.
fromObject
(
js
.
get
(
"Result"
));
Purchaseorder
purchaseorder
=
(
Purchaseorder
)
JSONObject
.
toBean
(
jsonObject
,
Purchaseorder
.
class
);
purchaseorder
.
setId
(
js2
.
get
(
"id"
).
toString
());
purchaseorder
.
setId
(
js2
.
get
(
"Number"
).
toString
());
this
.
save
(
purchaseorder
);
return
jsonObject
;
return
null
;
}
//从国网同步采购订单数据至金蝶销售订单
public
Boolean
synchronizationList
(
Map
object
)
throws
IOException
,
ParseException
{
public
synchronized
Boolean
synchronizationList
(
Map
object
)
throws
IOException
,
ParseException
{
Boolean
success
=
true
;
/**
* 获取记录的最大时间访问国网
...
...
@@ -82,7 +75,6 @@ public class PurchaseorderServiceImpl extends ServiceImpl<PurchaseorderMapper, P
}
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
purchaseorderApi
.
selectList
(
map
));
System
.
out
.
println
(
"jsonObject "
+
jsonObject
);
if
(
jsonObject
.
get
(
"success"
)
==
null
)
{
//请求国网的返回信息
JSONObject
resultValue
=
JSONObject
.
fromObject
(
jsonObject
.
get
(
"resultValue"
));
...
...
@@ -163,6 +155,7 @@ public class PurchaseorderServiceImpl extends ServiceImpl<PurchaseorderMapper, P
if
(
map
.
get
(
"prjname"
)
==
null
||
map
.
get
(
"materialcode"
)
==
null
||
map
.
get
(
"amount"
)
==
null
||
Integer
.
parseInt
(
map
.
get
(
"amount"
).
toString
())
<=
0
)
{
System
.
out
.
println
(
"saveBatch"
+
map
);
}
else
{
JSONObject
model
=
JSONObject
.
fromObject
(
map
);
//转换数据格式
Map
<
String
,
Object
>
SAL_SaleOrder
=
FieldConversion
.
nameAPI
(
model
);
//拼接需要的数据 字段转换
...
...
@@ -185,6 +178,7 @@ public class PurchaseorderServiceImpl extends ServiceImpl<PurchaseorderMapper, P
}
}
}
boolean
save
=
this
.
saveBatch
(
purchaseordersAdd
);
//记录明细
return
save
;
}
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/impl/SalesOrderServiceImpl.java
浏览文件 @
bc424e97
...
...
@@ -202,6 +202,7 @@ public class SalesOrderServiceImpl extends ServiceImpl<SalesOrderMapper, Salesor
s
.
setDatasource
(
stringStringMap
.
get
(
"datasource"
));
s
.
setDatasourcecreatetime
(
stringStringMap
.
get
(
"datasourcecreatetime"
));
s
.
setFid
(
stringStringMap
.
get
(
"fid"
));
s
.
setFbillno
(
stringStringMap
.
get
(
"fbillno"
));
salesorders
.
add
(
s
);
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/webapi/SalesOrderWebapi.java
浏览文件 @
bc424e97
...
...
@@ -40,6 +40,7 @@ public class SalesOrderWebapi implements web_api {
key
.
put
(
"FUnitID"
,
"FUnitID"
);
// 物料单位5
key
.
put
(
"FQTY"
,
"FQTY"
);
//物料数量6
key
.
put
(
"FID"
,
"FID"
);
//主键7
key
.
put
(
"FBillNo"
,
"FBillNo "
);
//单据编号8
}
@Autowired
...
...
@@ -110,6 +111,7 @@ public class SalesOrderWebapi implements web_api {
salesordermap
.
put
(
"productunit"
,
list1
.
get
(
5
).
toString
());
// 物料单位
salesordermap
.
put
(
"productamount"
,
list1
.
get
(
6
).
toString
());
//物料数量
salesordermap
.
put
(
"fid"
,
list1
.
get
(
7
).
toString
());
//实体主键 ,设置了后不能重复插入
salesordermap
.
put
(
"fbillno"
,
list1
.
get
(
8
).
toString
());
//销售订单编码
salesorderlist
.
add
(
salesordermap
);
}
}
...
...
jeecg-boot-module-system/src/main/resources/application.yml
浏览文件 @
bc424e97
spring
:
profiles
:
active
:
docker
active
:
test
swagger
:
production
:
false
basic
:
...
...
jeecg-boot-module-system/src/test/java/org/jeecg/SecurityToolsTest.java
浏览文件 @
bc424e97
...
...
@@ -2,6 +2,7 @@ package org.jeecg;
import
com.alibaba.fastjson.JSON
;
import
kingdee.bos.webapi.client.K3CloudApiClient
;
import
lombok.extern.slf4j.Slf4j
;
import
net.sf.json.JSONObject
;
...
...
@@ -10,10 +11,12 @@ import org.jeecg.common.util.security.entity.*;
import
org.jeecg.modules.iost.API.Dao.CategoryDao
;
import
org.jeecg.modules.iost.API.Util.HttpUtils
;
import
org.jeecg.modules.iost.API.dto.EIP
;
import
org.jeecg.modules.iost.API.entity.Physicalid
;
import
org.junit.Test
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -87,18 +90,33 @@ public class SecurityToolsTest {
return
jsonObject
;
}
@Test
public
void
S
()
{
Random
r
=
new
Random
();
public
void
S
()
throws
ParseException
{
//map转实体类
// 第一种方法
// int num = (int) (Math.random() * 5 + 1);
// System.out.println("num:" + num);
// 第二种方法
int
a
=
r
.
nextInt
(
5
)
+
1
;
System
.
out
.
println
(
"a:"
+
a
);
String
fApproveDate
=
"2021-10-06T15:59:20.90"
;
}
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss.SSS"
);
Date
parse
=
null
;
parse
=
simpleDateFormat
.
parse
(
timeSSS
(
fApproveDate
));
//时间转换毫秒补丁
SimpleDateFormat
fs
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss.SSS"
);
String
format
=
fs
.
format
(
parse
);
System
.
out
.
println
(
parse
);
System
.
out
.
println
(
format
);
}
public
String
timeSSS
(
String
selectedTimeStamp
)
{
if
(
selectedTimeStamp
.
indexOf
(
"."
)>
0
)
{
int
x
=
selectedTimeStamp
.
length
()
-
selectedTimeStamp
.
lastIndexOf
(
'.'
);
if
(
x
==
2
)
selectedTimeStamp
+=
"00"
;
if
(
x
==
3
)
selectedTimeStamp
+=
'0'
;
}
else
{
selectedTimeStamp
+=
".000"
;
}
return
selectedTimeStamp
;
}
/**
* 测试定时
*/
...
...
storage/DEMO.apk
deleted
100644 → 0
浏览文件 @
f22ee536
File deleted
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论