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
bltdc
dc-java
Commits
9096c47e
Commit
9096c47e
authored
Jan 04, 2020
by
yinyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据中心--订单头程费用判断更新
parent
c664ce3d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
212 additions
and
9 deletions
+212
-9
OrderSyncJob.java
...s-order/src/main/java/com/bailuntec/job/OrderSyncJob.java
+5
-0
DcMidCostFirst.java
...main/java/com/bailuntec/domain/entity/DcMidCostFirst.java
+26
-1
DcMidCostFirstExample.java
...a/com/bailuntec/domain/example/DcMidCostFirstExample.java
+120
-0
DcMidCostFirstMapper.xml
...c/main/java/com/bailuntec/mapper/DcMidCostFirstMapper.xml
+61
-8
No files found.
data-base/base-sync-oms-order/src/main/java/com/bailuntec/job/OrderSyncJob.java
View file @
9096c47e
...
...
@@ -569,7 +569,12 @@ public class OrderSyncJob extends PointJob {
dcMidCostFirst
=
new
DcMidCostFirst
();
dcMidCostFirst
.
setCostFirst
(
bailunSkuStructure
.
getBailunSkuWeight
().
multiply
(
Constant
.
COST_FIRST_PRICE
).
setScale
(
5
,
RoundingMode
.
HALF_EVEN
));
}
if
(
dcMidCostFirst
.
getHasCalculation
())
{
dcBaseOmsSku
.
setCostFirst
(
dcMidCostFirst
.
getCostFirst
());
}
else
{
dcBaseOmsOrder
.
setCostFirst
(
BigDecimal
.
ZERO
);
}
//GBBLJW这个仓库有些SKU是单独配置的单价
if
(
"GBBLJW"
.
equals
(
dcBaseWarehouse
.
getWarehouseCode
()))
{
DcBaseOmsConfigCostFirstMapper
costFirstMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseOmsConfigCostFirstMapper
.
class
);
...
...
data-common/src/main/java/com/bailuntec/domain/entity/DcMidCostFirst.java
View file @
9096c47e
...
...
@@ -43,6 +43,24 @@ public class DcMidCostFirst {
private
String
warehouseCode
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_mid_cost_first.company_id
*
* @mbg.generated
*/
private
Integer
companyId
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_mid_cost_first.has_calculation
*
* @mbg.generated
*/
private
Boolean
hasCalculation
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first
*
...
...
@@ -58,6 +76,8 @@ public class DcMidCostFirst {
sb
.
append
(
", costFirst="
).
append
(
costFirst
);
sb
.
append
(
", bailunSku="
).
append
(
bailunSku
);
sb
.
append
(
", warehouseCode="
).
append
(
warehouseCode
);
sb
.
append
(
", companyId="
).
append
(
companyId
);
sb
.
append
(
", hasCalculation="
).
append
(
hasCalculation
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
...
...
@@ -83,7 +103,9 @@ public class DcMidCostFirst {
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
.
getWarehouseCode
()
==
null
?
other
.
getWarehouseCode
()
==
null
:
this
.
getWarehouseCode
().
equals
(
other
.
getWarehouseCode
()))
&&
(
this
.
getCompanyId
()
==
null
?
other
.
getCompanyId
()
==
null
:
this
.
getCompanyId
().
equals
(
other
.
getCompanyId
()))
&&
(
this
.
getHasCalculation
()
==
null
?
other
.
getHasCalculation
()
==
null
:
this
.
getHasCalculation
().
equals
(
other
.
getHasCalculation
()));
}
/**
...
...
@@ -100,6 +122,8 @@ public class DcMidCostFirst {
result
=
prime
*
result
+
((
getCostFirst
()
==
null
)
?
0
:
getCostFirst
().
hashCode
());
result
=
prime
*
result
+
((
getBailunSku
()
==
null
)
?
0
:
getBailunSku
().
hashCode
());
result
=
prime
*
result
+
((
getWarehouseCode
()
==
null
)
?
0
:
getWarehouseCode
().
hashCode
());
result
=
prime
*
result
+
((
getCompanyId
()
==
null
)
?
0
:
getCompanyId
().
hashCode
());
result
=
prime
*
result
+
((
getHasCalculation
()
==
null
)
?
0
:
getHasCalculation
().
hashCode
());
return
result
;
}
}
\ No newline at end of file
data-common/src/main/java/com/bailuntec/domain/example/DcMidCostFirstExample.java
View file @
9096c47e
...
...
@@ -629,6 +629,126 @@ public class DcMidCostFirstExample {
addCriterion
(
"warehouse_code not between"
,
value1
,
value2
,
"warehouseCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdIsNull
()
{
addCriterion
(
"company_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdIsNotNull
()
{
addCriterion
(
"company_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdEqualTo
(
Integer
value
)
{
addCriterion
(
"company_id ="
,
value
,
"companyId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"company_id <>"
,
value
,
"companyId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"company_id >"
,
value
,
"companyId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"company_id >="
,
value
,
"companyId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdLessThan
(
Integer
value
)
{
addCriterion
(
"company_id <"
,
value
,
"companyId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"company_id <="
,
value
,
"companyId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"company_id in"
,
values
,
"companyId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"company_id not in"
,
values
,
"companyId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"company_id between"
,
value1
,
value2
,
"companyId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"company_id not between"
,
value1
,
value2
,
"companyId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationIsNull
()
{
addCriterion
(
"has_calculation is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationIsNotNull
()
{
addCriterion
(
"has_calculation is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationEqualTo
(
Boolean
value
)
{
addCriterion
(
"has_calculation ="
,
value
,
"hasCalculation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationNotEqualTo
(
Boolean
value
)
{
addCriterion
(
"has_calculation <>"
,
value
,
"hasCalculation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationGreaterThan
(
Boolean
value
)
{
addCriterion
(
"has_calculation >"
,
value
,
"hasCalculation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationGreaterThanOrEqualTo
(
Boolean
value
)
{
addCriterion
(
"has_calculation >="
,
value
,
"hasCalculation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationLessThan
(
Boolean
value
)
{
addCriterion
(
"has_calculation <"
,
value
,
"hasCalculation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationLessThanOrEqualTo
(
Boolean
value
)
{
addCriterion
(
"has_calculation <="
,
value
,
"hasCalculation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationIn
(
List
<
Boolean
>
values
)
{
addCriterion
(
"has_calculation in"
,
values
,
"hasCalculation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationNotIn
(
List
<
Boolean
>
values
)
{
addCriterion
(
"has_calculation not in"
,
values
,
"hasCalculation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationBetween
(
Boolean
value1
,
Boolean
value2
)
{
addCriterion
(
"has_calculation between"
,
value1
,
value2
,
"hasCalculation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHasCalculationNotBetween
(
Boolean
value1
,
Boolean
value2
)
{
addCriterion
(
"has_calculation not between"
,
value1
,
value2
,
"hasCalculation"
);
return
(
Criteria
)
this
;
}
}
/**
...
...
data-common/src/main/java/com/bailuntec/mapper/DcMidCostFirstMapper.xml
View file @
9096c47e
...
...
@@ -10,6 +10,8 @@
<result
column=
"cost_first"
jdbcType=
"DECIMAL"
property=
"costFirst"
/>
<result
column=
"bailun_sku"
jdbcType=
"VARCHAR"
property=
"bailunSku"
/>
<result
column=
"warehouse_code"
jdbcType=
"VARCHAR"
property=
"warehouseCode"
/>
<result
column=
"company_id"
jdbcType=
"INTEGER"
property=
"companyId"
/>
<result
column=
"has_calculation"
jdbcType=
"BIT"
property=
"hasCalculation"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
...
...
@@ -82,7 +84,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, cost_first, bailun_sku, warehouse_code
id, cost_first, bailun_sku, warehouse_code
, company_id, has_calculation
</sql>
<select
id=
"selectByExample"
parameterType=
"com.bailuntec.domain.example.DcMidCostFirstExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -144,9 +146,11 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dc_mid_cost_first (id, cost_first, bailun_sku,
warehouse_code)
warehouse_code, company_id, has_calculation
)
values (#{id,jdbcType=INTEGER}, #{costFirst,jdbcType=DECIMAL}, #{bailunSku,jdbcType=VARCHAR},
#{warehouseCode,jdbcType=VARCHAR})
#{warehouseCode,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{hasCalculation,jdbcType=BIT}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.bailuntec.domain.entity.DcMidCostFirst"
>
<!--
...
...
@@ -167,6 +171,12 @@
<if
test=
"warehouseCode != null"
>
warehouse_code,
</if>
<if
test=
"companyId != null"
>
company_id,
</if>
<if
test=
"hasCalculation != null"
>
has_calculation,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
...
...
@@ -181,6 +191,12 @@
<if
test=
"warehouseCode != null"
>
#{warehouseCode,jdbcType=VARCHAR},
</if>
<if
test=
"companyId != null"
>
#{companyId,jdbcType=INTEGER},
</if>
<if
test=
"hasCalculation != null"
>
#{hasCalculation,jdbcType=BIT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.bailuntec.domain.example.DcMidCostFirstExample"
resultType=
"java.lang.Long"
>
...
...
@@ -212,6 +228,12 @@
<if
test=
"record.warehouseCode != null"
>
warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.companyId != null"
>
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if
test=
"record.hasCalculation != null"
>
has_calculation = #{record.hasCalculation,jdbcType=BIT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -226,7 +248,9 @@
set id = #{record.id,jdbcType=INTEGER},
cost_first = #{record.costFirst,jdbcType=DECIMAL},
bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR}
warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
company_id = #{record.companyId,jdbcType=INTEGER},
has_calculation = #{record.hasCalculation,jdbcType=BIT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -247,6 +271,12 @@
<if
test=
"warehouseCode != null"
>
warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
</if>
<if
test=
"companyId != null"
>
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if
test=
"hasCalculation != null"
>
has_calculation = #{hasCalculation,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
...
...
@@ -258,7 +288,9 @@
update dc_mid_cost_first
set cost_first = #{costFirst,jdbcType=DECIMAL},
bailun_sku = #{bailunSku,jdbcType=VARCHAR},
warehouse_code = #{warehouseCode,jdbcType=VARCHAR}
warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
company_id = #{companyId,jdbcType=INTEGER},
has_calculation = #{hasCalculation,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
<insert
id=
"upsertSelective"
parameterType=
"com.bailuntec.domain.entity.DcMidCostFirst"
>
...
...
@@ -281,6 +313,12 @@
<if
test=
"warehouseCode != null"
>
warehouse_code,
</if>
<if
test=
"companyId != null"
>
company_id,
</if>
<if
test=
"hasCalculation != null"
>
has_calculation,
</if>
</trim>
values
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -296,6 +334,12 @@
<if
test=
"warehouseCode != null"
>
#{warehouseCode,jdbcType=VARCHAR},
</if>
<if
test=
"companyId != null"
>
#{companyId,jdbcType=INTEGER},
</if>
<if
test=
"hasCalculation != null"
>
#{hasCalculation,jdbcType=BIT},
</if>
</trim>
on duplicate key update
<trim
suffixOverrides=
","
>
...
...
@@ -311,6 +355,12 @@
<if
test=
"warehouseCode != null"
>
warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
</if>
<if
test=
"companyId != null"
>
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if
test=
"hasCalculation != null"
>
has_calculation = #{hasCalculation,jdbcType=BIT},
</if>
</trim>
</insert>
<insert
id=
"upsert"
parameterType=
"com.bailuntec.domain.entity.DcMidCostFirst"
>
...
...
@@ -320,15 +370,18 @@
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into dc_mid_cost_first
(id, cost_first, bailun_sku, warehouse_code)
(id, cost_first, bailun_sku, warehouse_code
, company_id, has_calculation
)
values
(#{id,jdbcType=INTEGER}, #{costFirst,jdbcType=DECIMAL}, #{bailunSku,jdbcType=VARCHAR},
#{warehouseCode,jdbcType=VARCHAR})
#{warehouseCode,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{hasCalculation,jdbcType=BIT}
)
on duplicate key update
id = #{id,jdbcType=INTEGER},
cost_first = #{costFirst,jdbcType=DECIMAL},
bailun_sku = #{bailunSku,jdbcType=VARCHAR},
warehouse_code = #{warehouseCode,jdbcType=VARCHAR}
warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
company_id = #{companyId,jdbcType=INTEGER},
has_calculation = #{hasCalculation,jdbcType=BIT}
</insert>
<select
id=
"selectOneByExample"
parameterType=
"com.bailuntec.domain.example.DcMidCostFirstExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
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