Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
dc-java
Commits
046c95c5
Commit
046c95c5
authored
Mar 30, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动周转根据采购单付款类型, 调整周转天数; SKU接口调整.
parent
299f2e6c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
279 additions
and
238 deletions
+279
-238
OmsOrderTest.java
...-base/base-sync-oms-order/src/test/java/OmsOrderTest.java
+1
-1
SkuJsonHandle.java
...nc-sku/src/main/java/com/bailuntec/job/SkuJsonHandle.java
+5
-2
SkuSyncJob.java
...-sync-sku/src/main/java/com/bailuntec/job/SkuSyncJob.java
+0
-2
pom.xml
data-base/base-sync-warehouse/pom.xml
+6
-0
SyncWarehouseTest.java
.../base-sync-warehouse/src/test/java/SyncWarehouseTest.java
+10
-0
DcAutoTurnover.java
...main/java/com/bailuntec/domain/entity/DcAutoTurnover.java
+14
-1
DcAveragePurchase.java
...n/java/com/bailuntec/domain/entity/DcAveragePurchase.java
+14
-1
DcAutoTurnoverExample.java
...a/com/bailuntec/domain/example/DcAutoTurnoverExample.java
+60
-0
DcAveragePurchaseExample.java
...om/bailuntec/domain/example/DcAveragePurchaseExample.java
+159
-0
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+9
-1
DcMidCostFirst.java
...main/java/com/bailuntec/domain/entity/DcMidCostFirst.java
+0
-105
DcMidCostFirstExample.java
...a/com/bailuntec/domain/example/DcMidCostFirstExample.java
+0
-0
DcMidCostFirstMapper.java
.../main/java/com/bailuntec/mapper/DcMidCostFirstMapper.java
+0
-124
DcMidCostFirstMapper.xml
...c/main/java/com/bailuntec/mapper/DcMidCostFirstMapper.xml
+0
-0
init.properties
mybatis-generator/src/main/resources/init.properties
+1
-1
No files found.
data-base/base-sync-oms-order/src/test/java/OmsOrderTest.java
View file @
046c95c5
...
@@ -78,7 +78,7 @@ public class OmsOrderTest {
...
@@ -78,7 +78,7 @@ public class OmsOrderTest {
LinkedHashMap
<
String
,
String
>
map
=
new
LinkedHashMap
<>(
4
);
LinkedHashMap
<
String
,
String
>
map
=
new
LinkedHashMap
<>(
4
);
map
.
put
(
"pageIndex"
,
"1"
);
map
.
put
(
"pageIndex"
,
"1"
);
map
.
put
(
"pageCount"
,
"100"
);
map
.
put
(
"pageCount"
,
"100"
);
map
.
put
(
"OriginOrderNo"
,
"
405-1430822-7337124
"
);
map
.
put
(
"OriginOrderNo"
,
"
263334209922-2394744359016
"
);
Request
request
=
new
Request
.
Builder
()
Request
request
=
new
Request
.
Builder
()
.
get
()
.
get
()
.
url
(
OkHttpUtil
.
attachHttpGetParams
(
"http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders"
,
map
))
.
url
(
OkHttpUtil
.
attachHttpGetParams
(
"http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders"
,
map
))
...
...
data-base/base-sync-sku/src/main/java/com/bailuntec/job/SkuJsonHandle.java
View file @
046c95c5
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.TypeReference;
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.TypeReference;
import
com.bailuntec.domain.constant.CommonConstant
;
import
com.bailuntec.domain.constant.CommonConstant
;
import
com.bailuntec.domain.entity.DcBaseSku
;
import
com.bailuntec.domain.entity.DcBaseSku
;
import
com.bailuntec.domain.entity.JobPointLog
;
import
com.bailuntec.domain.entity.JobPointLog
;
import
com.bailuntec.domain.example.DcBaseSkuExample
;
import
com.bailuntec.domain.pojo.CommonSkuCondition
;
import
com.bailuntec.domain.pojo.CommonSkuCondition
;
import
com.bailuntec.domain.pojo.CommonSkuProductInfo
;
import
com.bailuntec.domain.pojo.CommonSkuProductInfo
;
import
com.bailuntec.domain.pojo.SkuData
;
import
com.bailuntec.domain.pojo.SkuData
;
...
@@ -155,8 +156,10 @@ public class SkuJsonHandle {
...
@@ -155,8 +156,10 @@ public class SkuJsonHandle {
dcBaseSku
.
setHeight
((
split
!=
null
&&
split
.
length
>
2
&&
CommonConstant
.
NUMBER_AND_DECIMAL
.
matcher
(
split
[
2
]).
matches
())
?
new
BigDecimal
(
split
[
2
])
:
BigDecimal
.
ZERO
);
dcBaseSku
.
setHeight
((
split
!=
null
&&
split
.
length
>
2
&&
CommonConstant
.
NUMBER_AND_DECIMAL
.
matcher
(
split
[
2
]).
matches
())
?
new
BigDecimal
(
split
[
2
])
:
BigDecimal
.
ZERO
);
dcBaseSku
.
setWeight
(
skuProductInfo
.
getWeight
()
!=
null
?
skuProductInfo
.
getWeight
()
:
BigDecimal
.
ZERO
.
add
(
skuProductInfo
.
getPackingWeight
()
!=
null
?
skuProductInfo
.
getPackingWeight
()
:
BigDecimal
.
ZERO
));
dcBaseSku
.
setWeight
(
skuProductInfo
.
getWeight
()
!=
null
?
skuProductInfo
.
getWeight
()
:
BigDecimal
.
ZERO
.
add
(
skuProductInfo
.
getPackingWeight
()
!=
null
?
skuProductInfo
.
getPackingWeight
()
:
BigDecimal
.
ZERO
));
dcBaseSku
.
setGmtModified
(
LocalDateTime
.
now
());
dcBaseSku
.
setGmtModified
(
LocalDateTime
.
now
());
dcBaseSkuMapper
.
upsertSelective
(
dcBaseSku
);
int
i
=
dcBaseSkuMapper
.
updateByExampleSelective
(
dcBaseSku
,
DcBaseSkuExample
.
newAndCreateCriteria
().
andBailunSkuEqualTo
(
dcBaseSku
.
getBailunSku
()).
example
());
SessionUtil
.
getSession
().
commit
();
if
(
i
==
0
)
{
dcBaseSkuMapper
.
insertSelective
(
dcBaseSku
);
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
data-base/base-sync-sku/src/main/java/com/bailuntec/job/SkuSyncJob.java
View file @
046c95c5
...
@@ -17,8 +17,6 @@ public class SkuSyncJob extends PointJob {
...
@@ -17,8 +17,6 @@ public class SkuSyncJob extends PointJob {
skuConditionDto
.
setIsFinish
(-
1
);
skuConditionDto
.
setIsFinish
(-
1
);
//有ResultWare返回发货仓库信息
//有ResultWare返回发货仓库信息
skuConditionDto
.
setIsResultWare
(
1
);
skuConditionDto
.
setIsResultWare
(
1
);
// skuConditionDto.setSortField("id");
// skuConditionDto.setSort("asc");
//有SKU只查提供的SKU
//有SKU只查提供的SKU
// skuConditionDto.setSkus("909117825");
// skuConditionDto.setSkus("909117825");
//有UpdateDate只查当天更新的数据-增量更新
//有UpdateDate只查当天更新的数据-增量更新
...
...
data-base/base-sync-warehouse/pom.xml
View file @
046c95c5
...
@@ -21,6 +21,12 @@
...
@@ -21,6 +21,12 @@
<groupId>
org.projectlombok
</groupId>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<artifactId>
lombok
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.junit.jupiter
</groupId>
<artifactId>
junit-jupiter-api
</artifactId>
<version>
RELEASE
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
data-base/base-sync-warehouse/src/test/java/SyncWarehouseTest.java
0 → 100644
View file @
046c95c5
import
com.bailuntec.job.WarehouseSyncJob
;
import
org.junit.jupiter.api.Test
;
public
class
SyncWarehouseTest
{
@Test
public
void
test
()
{
WarehouseSyncJob
warehouseSyncJob
=
new
WarehouseSyncJob
();
warehouseSyncJob
.
execute
(
null
);
}
}
data-common/src/main/java/com/bailuntec/domain/entity/DcAutoTurnover.java
View file @
046c95c5
...
@@ -485,6 +485,15 @@ public class DcAutoTurnover {
...
@@ -485,6 +485,15 @@ public class DcAutoTurnover {
private
Integer
stockUpDays
;
private
Integer
stockUpDays
;
/**
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_turnover.payment_before_delivery
*
* @mbg.generated
*/
private
Integer
paymentBeforeDelivery
;
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_auto_turnover
* This method corresponds to the database table dc_auto_turnover
*
*
...
@@ -549,6 +558,7 @@ public class DcAutoTurnover {
...
@@ -549,6 +558,7 @@ public class DcAutoTurnover {
sb
.
append
(
", stockUpSales="
).
append
(
stockUpSales
);
sb
.
append
(
", stockUpSales="
).
append
(
stockUpSales
);
sb
.
append
(
", quantityBeginAdvise="
).
append
(
quantityBeginAdvise
);
sb
.
append
(
", quantityBeginAdvise="
).
append
(
quantityBeginAdvise
);
sb
.
append
(
", stockUpDays="
).
append
(
stockUpDays
);
sb
.
append
(
", stockUpDays="
).
append
(
stockUpDays
);
sb
.
append
(
", paymentBeforeDelivery="
).
append
(
paymentBeforeDelivery
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
@@ -623,7 +633,8 @@ public class DcAutoTurnover {
...
@@ -623,7 +633,8 @@ public class DcAutoTurnover {
&&
(
this
.
getForecastTurnoverdaySales
()
==
null
?
other
.
getForecastTurnoverdaySales
()
==
null
:
this
.
getForecastTurnoverdaySales
().
equals
(
other
.
getForecastTurnoverdaySales
()))
&&
(
this
.
getForecastTurnoverdaySales
()
==
null
?
other
.
getForecastTurnoverdaySales
()
==
null
:
this
.
getForecastTurnoverdaySales
().
equals
(
other
.
getForecastTurnoverdaySales
()))
&&
(
this
.
getStockUpSales
()
==
null
?
other
.
getStockUpSales
()
==
null
:
this
.
getStockUpSales
().
equals
(
other
.
getStockUpSales
()))
&&
(
this
.
getStockUpSales
()
==
null
?
other
.
getStockUpSales
()
==
null
:
this
.
getStockUpSales
().
equals
(
other
.
getStockUpSales
()))
&&
(
this
.
getQuantityBeginAdvise
()
==
null
?
other
.
getQuantityBeginAdvise
()
==
null
:
this
.
getQuantityBeginAdvise
().
equals
(
other
.
getQuantityBeginAdvise
()))
&&
(
this
.
getQuantityBeginAdvise
()
==
null
?
other
.
getQuantityBeginAdvise
()
==
null
:
this
.
getQuantityBeginAdvise
().
equals
(
other
.
getQuantityBeginAdvise
()))
&&
(
this
.
getStockUpDays
()
==
null
?
other
.
getStockUpDays
()
==
null
:
this
.
getStockUpDays
().
equals
(
other
.
getStockUpDays
()));
&&
(
this
.
getStockUpDays
()
==
null
?
other
.
getStockUpDays
()
==
null
:
this
.
getStockUpDays
().
equals
(
other
.
getStockUpDays
()))
&&
(
this
.
getPaymentBeforeDelivery
()
==
null
?
other
.
getPaymentBeforeDelivery
()
==
null
:
this
.
getPaymentBeforeDelivery
().
equals
(
other
.
getPaymentBeforeDelivery
()));
}
}
/**
/**
...
@@ -689,6 +700,7 @@ public class DcAutoTurnover {
...
@@ -689,6 +700,7 @@ public class DcAutoTurnover {
result
=
prime
*
result
+
((
getStockUpSales
()
==
null
)
?
0
:
getStockUpSales
().
hashCode
());
result
=
prime
*
result
+
((
getStockUpSales
()
==
null
)
?
0
:
getStockUpSales
().
hashCode
());
result
=
prime
*
result
+
((
getQuantityBeginAdvise
()
==
null
)
?
0
:
getQuantityBeginAdvise
().
hashCode
());
result
=
prime
*
result
+
((
getQuantityBeginAdvise
()
==
null
)
?
0
:
getQuantityBeginAdvise
().
hashCode
());
result
=
prime
*
result
+
((
getStockUpDays
()
==
null
)
?
0
:
getStockUpDays
().
hashCode
());
result
=
prime
*
result
+
((
getStockUpDays
()
==
null
)
?
0
:
getStockUpDays
().
hashCode
());
result
=
prime
*
result
+
((
getPaymentBeforeDelivery
()
==
null
)
?
0
:
getPaymentBeforeDelivery
().
hashCode
());
return
result
;
return
result
;
}
}
}
}
\ No newline at end of file
data-common/src/main/java/com/bailuntec/domain/entity/DcAveragePurchase.java
View file @
046c95c5
...
@@ -89,6 +89,15 @@ public class DcAveragePurchase {
...
@@ -89,6 +89,15 @@ public class DcAveragePurchase {
private
LocalDateTime
updateTime
;
private
LocalDateTime
updateTime
;
/**
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_average_purchase.payment_type
*
* @mbg.generated
*/
private
Integer
paymentType
;
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_average_purchase
* This method corresponds to the database table dc_average_purchase
*
*
...
@@ -109,6 +118,7 @@ public class DcAveragePurchase {
...
@@ -109,6 +118,7 @@ public class DcAveragePurchase {
sb
.
append
(
", deliveryDays="
).
append
(
deliveryDays
);
sb
.
append
(
", deliveryDays="
).
append
(
deliveryDays
);
sb
.
append
(
", inboundDays="
).
append
(
inboundDays
);
sb
.
append
(
", inboundDays="
).
append
(
inboundDays
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", paymentType="
).
append
(
paymentType
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
@@ -139,7 +149,8 @@ public class DcAveragePurchase {
...
@@ -139,7 +149,8 @@ public class DcAveragePurchase {
&&
(
this
.
getPrice
()
==
null
?
other
.
getPrice
()
==
null
:
this
.
getPrice
().
equals
(
other
.
getPrice
()))
&&
(
this
.
getPrice
()
==
null
?
other
.
getPrice
()
==
null
:
this
.
getPrice
().
equals
(
other
.
getPrice
()))
&&
(
this
.
getDeliveryDays
()
==
null
?
other
.
getDeliveryDays
()
==
null
:
this
.
getDeliveryDays
().
equals
(
other
.
getDeliveryDays
()))
&&
(
this
.
getDeliveryDays
()
==
null
?
other
.
getDeliveryDays
()
==
null
:
this
.
getDeliveryDays
().
equals
(
other
.
getDeliveryDays
()))
&&
(
this
.
getInboundDays
()
==
null
?
other
.
getInboundDays
()
==
null
:
this
.
getInboundDays
().
equals
(
other
.
getInboundDays
()))
&&
(
this
.
getInboundDays
()
==
null
?
other
.
getInboundDays
()
==
null
:
this
.
getInboundDays
().
equals
(
other
.
getInboundDays
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()));
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()))
&&
(
this
.
getPaymentType
()
==
null
?
other
.
getPaymentType
()
==
null
:
this
.
getPaymentType
().
equals
(
other
.
getPaymentType
()));
}
}
/**
/**
...
@@ -161,6 +172,7 @@ public class DcAveragePurchase {
...
@@ -161,6 +172,7 @@ public class DcAveragePurchase {
result
=
prime
*
result
+
((
getDeliveryDays
()
==
null
)
?
0
:
getDeliveryDays
().
hashCode
());
result
=
prime
*
result
+
((
getDeliveryDays
()
==
null
)
?
0
:
getDeliveryDays
().
hashCode
());
result
=
prime
*
result
+
((
getInboundDays
()
==
null
)
?
0
:
getInboundDays
().
hashCode
());
result
=
prime
*
result
+
((
getInboundDays
()
==
null
)
?
0
:
getInboundDays
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getPaymentType
()
==
null
)
?
0
:
getPaymentType
().
hashCode
());
return
result
;
return
result
;
}
}
}
}
\ No newline at end of file
data-common/src/main/java/com/bailuntec/domain/example/DcAutoTurnoverExample.java
View file @
046c95c5
...
@@ -3680,6 +3680,66 @@ public class DcAutoTurnoverExample {
...
@@ -3680,6 +3680,66 @@ public class DcAutoTurnoverExample {
addCriterion
(
"stock_up_days not between"
,
value1
,
value2
,
"stockUpDays"
);
addCriterion
(
"stock_up_days not between"
,
value1
,
value2
,
"stockUpDays"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andPaymentBeforeDeliveryIsNull
()
{
addCriterion
(
"payment_before_delivery is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentBeforeDeliveryIsNotNull
()
{
addCriterion
(
"payment_before_delivery is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentBeforeDeliveryEqualTo
(
Integer
value
)
{
addCriterion
(
"payment_before_delivery ="
,
value
,
"paymentBeforeDelivery"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentBeforeDeliveryNotEqualTo
(
Integer
value
)
{
addCriterion
(
"payment_before_delivery <>"
,
value
,
"paymentBeforeDelivery"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentBeforeDeliveryGreaterThan
(
Integer
value
)
{
addCriterion
(
"payment_before_delivery >"
,
value
,
"paymentBeforeDelivery"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentBeforeDeliveryGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"payment_before_delivery >="
,
value
,
"paymentBeforeDelivery"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentBeforeDeliveryLessThan
(
Integer
value
)
{
addCriterion
(
"payment_before_delivery <"
,
value
,
"paymentBeforeDelivery"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentBeforeDeliveryLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"payment_before_delivery <="
,
value
,
"paymentBeforeDelivery"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentBeforeDeliveryIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"payment_before_delivery in"
,
values
,
"paymentBeforeDelivery"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentBeforeDeliveryNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"payment_before_delivery not in"
,
values
,
"paymentBeforeDelivery"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentBeforeDeliveryBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"payment_before_delivery between"
,
value1
,
value2
,
"paymentBeforeDelivery"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentBeforeDeliveryNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"payment_before_delivery not between"
,
value1
,
value2
,
"paymentBeforeDelivery"
);
return
(
Criteria
)
this
;
}
}
}
/**
/**
...
...
data-common/src/main/java/com/bailuntec/domain/example/DcAveragePurchaseExample.java
View file @
046c95c5
...
@@ -219,6 +219,36 @@ public class DcAveragePurchaseExample {
...
@@ -219,6 +219,36 @@ public class DcAveragePurchaseExample {
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
DcAveragePurchaseExample
when
(
boolean
condition
,
IExampleWhen
then
)
{
if
(
condition
)
{
then
.
example
(
this
);
}
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_average_purchase
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
DcAveragePurchaseExample
when
(
boolean
condition
,
IExampleWhen
then
,
IExampleWhen
otherwise
)
{
if
(
condition
)
{
then
.
example
(
this
);
}
else
{
otherwise
.
example
(
this
);
}
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_average_purchase
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
void
setOffset
(
Integer
offset
)
{
public
void
setOffset
(
Integer
offset
)
{
this
.
offset
=
offset
;
this
.
offset
=
offset
;
}
}
...
@@ -910,6 +940,66 @@ public class DcAveragePurchaseExample {
...
@@ -910,6 +940,66 @@ public class DcAveragePurchaseExample {
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andPaymentTypeIsNull
()
{
addCriterion
(
"payment_type is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentTypeIsNotNull
()
{
addCriterion
(
"payment_type is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentTypeEqualTo
(
Integer
value
)
{
addCriterion
(
"payment_type ="
,
value
,
"paymentType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentTypeNotEqualTo
(
Integer
value
)
{
addCriterion
(
"payment_type <>"
,
value
,
"paymentType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentTypeGreaterThan
(
Integer
value
)
{
addCriterion
(
"payment_type >"
,
value
,
"paymentType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentTypeGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"payment_type >="
,
value
,
"paymentType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentTypeLessThan
(
Integer
value
)
{
addCriterion
(
"payment_type <"
,
value
,
"paymentType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentTypeLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"payment_type <="
,
value
,
"paymentType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentTypeIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"payment_type in"
,
values
,
"paymentType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentTypeNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"payment_type not in"
,
values
,
"paymentType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentTypeBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"payment_type between"
,
value1
,
value2
,
"paymentType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPaymentTypeNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"payment_type not between"
,
value1
,
value2
,
"paymentType"
);
return
(
Criteria
)
this
;
}
}
}
/**
/**
...
@@ -958,6 +1048,7 @@ public class DcAveragePurchaseExample {
...
@@ -958,6 +1048,7 @@ public class DcAveragePurchaseExample {
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
@Deprecated
public
Criteria
andIf
(
boolean
ifAdd
,
ICriteriaAdd
add
)
{
public
Criteria
andIf
(
boolean
ifAdd
,
ICriteriaAdd
add
)
{
if
(
ifAdd
)
{
if
(
ifAdd
)
{
add
.
add
(
this
);
add
.
add
(
this
);
...
@@ -966,12 +1057,43 @@ public class DcAveragePurchaseExample {
...
@@ -966,12 +1057,43 @@ public class DcAveragePurchaseExample {
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_average_purchase
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
when
(
boolean
condition
,
ICriteriaWhen
then
)
{
if
(
condition
)
{
then
.
criteria
(
this
);
}
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_average_purchase
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
when
(
boolean
condition
,
ICriteriaWhen
then
,
ICriteriaWhen
otherwise
)
{
if
(
condition
)
{
then
.
criteria
(
this
);
}
else
{
otherwise
.
criteria
(
this
);
}
return
this
;
}
/**
* This interface was generated by MyBatis Generator.
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table dc_average_purchase
* This interface corresponds to the database table dc_average_purchase
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
@Deprecated
public
interface
ICriteriaAdd
{
public
interface
ICriteriaAdd
{
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
...
@@ -1075,4 +1197,40 @@ public class DcAveragePurchaseExample {
...
@@ -1075,4 +1197,40 @@ public class DcAveragePurchaseExample {
this
(
condition
,
value
,
secondValue
,
null
);
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table dc_average_purchase
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
interface
ICriteriaWhen
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_average_purchase
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
void
criteria
(
Criteria
criteria
);
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table dc_average_purchase
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
interface
IExampleWhen
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_average_purchase
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
void
example
(
DcAveragePurchaseExample
example
);
}
}
}
\ No newline at end of file
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
046c95c5
...
@@ -171,6 +171,8 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -171,6 +171,8 @@ public class AutoTurnoverJob extends PointJob {
//从采购平均指标,仓库平均指标拿周转天数, 拿不到的或者数值异常的, 才按上面的来
//从采购平均指标,仓库平均指标拿周转天数, 拿不到的或者数值异常的, 才按上面的来
DcAveragePurchase
dcAveragePurchase
=
null
;
DcAveragePurchase
dcAveragePurchase
=
null
;
DcAverageWarehouse
dcAverageWarehouse
=
null
;
DcAverageWarehouse
dcAverageWarehouse
=
null
;
//是否先款后货? 先款后货供应链长度加一天paymentBeforeDelivery = 1;
Integer
paymentBeforeDelivery
=
null
;
try
{
try
{
DcBaseSkuMapper
baseSkuMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseSkuMapper
.
class
);
DcBaseSkuMapper
baseSkuMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseSkuMapper
.
class
);
turnoverSku
=
baseSkuMapper
.
getTurnoverSku
(
bailunSku
);
turnoverSku
=
baseSkuMapper
.
getTurnoverSku
(
bailunSku
);
...
@@ -180,6 +182,9 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -180,6 +182,9 @@ public class AutoTurnoverJob extends PointJob {
dcAveragePurchase
=
dcAveragePurchaseMapper
.
selectOneByExample
(
DcAveragePurchaseExample
.
newAndCreateCriteria
().
andBailunSkuEqualTo
(
bailunSku
).
andWarehouseCodeEqualTo
(
warehouseCode
).
andSupplierIdEqualTo
(
turnoverSku
.
getSuppliersId
()).
example
());
dcAveragePurchase
=
dcAveragePurchaseMapper
.
selectOneByExample
(
DcAveragePurchaseExample
.
newAndCreateCriteria
().
andBailunSkuEqualTo
(
bailunSku
).
andWarehouseCodeEqualTo
(
warehouseCode
).
andSupplierIdEqualTo
(
turnoverSku
.
getSuppliersId
()).
example
());
DcAverageWarehouseMapper
dcAverageWarehouseMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcAverageWarehouseMapper
.
class
);
DcAverageWarehouseMapper
dcAverageWarehouseMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcAverageWarehouseMapper
.
class
);
dcAverageWarehouse
=
dcAverageWarehouseMapper
.
selectOneByExample
(
DcAverageWarehouseExample
.
newAndCreateCriteria
().
andBailunSkuEqualTo
(
bailunSku
).
andWarehouseCodeEqualTo
(
warehouseCode
).
example
());
dcAverageWarehouse
=
dcAverageWarehouseMapper
.
selectOneByExample
(
DcAverageWarehouseExample
.
newAndCreateCriteria
().
andBailunSkuEqualTo
(
bailunSku
).
andWarehouseCodeEqualTo
(
warehouseCode
).
example
());
if
(
dcAveragePurchase
!=
null
&&
dcAveragePurchase
.
getPaymentType
().
equals
(
1
))
{
paymentBeforeDelivery
=
1
;
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"Mybatis操作DB失败"
,
e
);
throw
new
RuntimeException
(
"Mybatis操作DB失败"
,
e
);
...
@@ -200,6 +205,9 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -200,6 +205,9 @@ public class AutoTurnoverJob extends PointJob {
DcAutoConfigDelivery
dcAutoConfigDelivery
=
getDcAutoConfigDelivery
(
bailunSku
,
warehouseCode
,
dcBaseWarehouse
,
bailunFirstLevelCatagoryId
);
DcAutoConfigDelivery
dcAutoConfigDelivery
=
getDcAutoConfigDelivery
(
bailunSku
,
warehouseCode
,
dcBaseWarehouse
,
bailunFirstLevelCatagoryId
);
//获取周转天数计算配置, 数据来源于.net同事计算的均值
//获取周转天数计算配置, 数据来源于.net同事计算的均值
Integer
turnoverDays
=
getTurnoverDelivery
(
turnoverSku
,
dcBaseWarehouse
,
dcAutoTurnover
,
dcAutoConfigDelivery
,
dcAveragePurchase
,
dcAverageWarehouse
);
Integer
turnoverDays
=
getTurnoverDelivery
(
turnoverSku
,
dcBaseWarehouse
,
dcAutoTurnover
,
dcAutoConfigDelivery
,
dcAveragePurchase
,
dcAverageWarehouse
);
if
(
paymentBeforeDelivery
!=
null
)
{
turnoverDays
+=
paymentBeforeDelivery
;
}
/*
/*
* 因为第一个周转期再补货已经来不及
* 因为第一个周转期再补货已经来不及
* 所以预测2倍周转期长度
* 所以预测2倍周转期长度
...
@@ -434,7 +442,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -434,7 +442,7 @@ public class AutoTurnoverJob extends PointJob {
stockUpSales
=
stockUpSales
.
add
(
forecastSalesList
.
get
(
i
+
turnoverDays
+
1
));
stockUpSales
=
stockUpSales
.
add
(
forecastSalesList
.
get
(
i
+
turnoverDays
+
1
));
}
}
}
}
dcAutoTurnover
.
setPaymentBeforeDelivery
(
paymentBeforeDelivery
);
dcAutoTurnover
.
setStockUpDays
(
stockUpDays
);
dcAutoTurnover
.
setStockUpDays
(
stockUpDays
);
dcAutoTurnover
.
setStockUpSales
(
stockUpSales
);
dcAutoTurnover
.
setStockUpSales
(
stockUpSales
);
dcAutoTurnover
.
setQuantityBeginAdvise
(
forecastPurchaseAdvisedList
.
get
(
0
));
dcAutoTurnover
.
setQuantityBeginAdvise
(
forecastPurchaseAdvisedList
.
get
(
0
));
...
...
mybatis-generator/src/main/java/com/bailuntec/domain/entity/DcMidCostFirst.java
deleted
100644 → 0
View file @
299f2e6c
package
com
.
bailuntec
.
domain
.
entity
;
import
java.math.BigDecimal
;
import
lombok.Data
;
@Data
public
class
DcMidCostFirst
{
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_mid_cost_first.id
*
* @mbg.generated
*/
private
Integer
id
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_mid_cost_first.cost_first
*
* @mbg.generated
*/
private
BigDecimal
costFirst
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_mid_cost_first.bailun_sku
*
* @mbg.generated
*/
private
String
bailunSku
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_mid_cost_first.warehouse_code
*
* @mbg.generated
*/
private
String
warehouseCode
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", costFirst="
).
append
(
costFirst
);
sb
.
append
(
", bailunSku="
).
append
(
bailunSku
);
sb
.
append
(
", warehouseCode="
).
append
(
warehouseCode
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
DcMidCostFirst
other
=
(
DcMidCostFirst
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getCostFirst
()
==
null
?
other
.
getCostFirst
()
==
null
:
this
.
getCostFirst
().
equals
(
other
.
getCostFirst
()))
&&
(
this
.
getBailunSku
()
==
null
?
other
.
getBailunSku
()
==
null
:
this
.
getBailunSku
().
equals
(
other
.
getBailunSku
()))
&&
(
this
.
getWarehouseCode
()
==
null
?
other
.
getWarehouseCode
()
==
null
:
this
.
getWarehouseCode
().
equals
(
other
.
getWarehouseCode
()));
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getCostFirst
()
==
null
)
?
0
:
getCostFirst
().
hashCode
());
result
=
prime
*
result
+
((
getBailunSku
()
==
null
)
?
0
:
getBailunSku
().
hashCode
());
result
=
prime
*
result
+
((
getWarehouseCode
()
==
null
)
?
0
:
getWarehouseCode
().
hashCode
());
return
result
;
}
}
\ No newline at end of file
mybatis-generator/src/main/java/com/bailuntec/domain/example/DcMidCostFirstExample.java
deleted
100644 → 0
View file @
299f2e6c
This diff is collapsed.
Click to expand it.
mybatis-generator/src/main/java/com/bailuntec/mapper/DcMidCostFirstMapper.java
deleted
100644 → 0
View file @
299f2e6c
package
com
.
bailuntec
.
mapper
;
import
com.bailuntec.domain.entity.DcMidCostFirst
;
import
com.bailuntec.domain.example.DcMidCostFirstExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
DcMidCostFirstMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
long
countByExample
(
DcMidCostFirstExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
int
deleteByExample
(
DcMidCostFirstExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
Integer
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
int
insert
(
DcMidCostFirst
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
int
insertSelective
(
DcMidCostFirst
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
DcMidCostFirst
selectOneByExample
(
DcMidCostFirstExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
List
<
DcMidCostFirst
>
selectByExample
(
DcMidCostFirstExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
DcMidCostFirst
selectByPrimaryKey
(
Integer
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
DcMidCostFirst
record
,
@Param
(
"example"
)
DcMidCostFirstExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
int
updateByExample
(
@Param
(
"record"
)
DcMidCostFirst
record
,
@Param
(
"example"
)
DcMidCostFirstExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
int
updateByPrimaryKeySelective
(
DcMidCostFirst
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
*/
int
updateByPrimaryKey
(
DcMidCostFirst
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int
upsert
(
DcMidCostFirst
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int
upsertSelective
(
DcMidCostFirst
record
);
}
\ No newline at end of file
mybatis-generator/src/main/java/com/bailuntec/mapper/DcMidCostFirstMapper.xml
deleted
100644 → 0
View file @
299f2e6c
This diff is collapsed.
Click to expand it.
mybatis-generator/src/main/resources/init.properties
View file @
046c95c5
table-name
=
dc_
mid_cost_first
table-name
=
dc_
auto_turnover
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment