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
a138c678
Commit
a138c678
authored
Apr 18, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步采购单详情新增字段.
parent
4d0370a6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
122 additions
and
18 deletions
+122
-18
SyncPurchaseDetailsJob.java
...c/main/java/com/bailuntec/job/SyncPurchaseDetailsJob.java
+6
-3
DcBasePurchaseDetailsMapper.xml
...java/com/bailuntec/mapper/DcBasePurchaseDetailsMapper.xml
+41
-13
DcBasePurchaseDetails.java
...va/com/bailuntec/domain/entity/DcBasePurchaseDetails.java
+14
-1
DcBasePurchaseDetailsExample.java
...ailuntec/domain/example/DcBasePurchaseDetailsExample.java
+60
-0
init.properties
mybatis-generator/src/main/resources/init.properties
+1
-1
No files found.
data-base/base-sync-purchase-details/src/main/java/com/bailuntec/job/SyncPurchaseDetailsJob.java
View file @
a138c678
...
...
@@ -7,6 +7,7 @@ import com.bailuntec.domain.constant.CommonConstant;
import
com.bailuntec.domain.dto.PurchaseDetailDTO
;
import
com.bailuntec.domain.entity.DcBasePurchaseDetails
;
import
com.bailuntec.domain.entity.JobPointLog
;
import
com.bailuntec.domain.example.DcBasePurchaseDetailsExample
;
import
com.bailuntec.mapper.DcBasePurchaseDetailsMapper
;
import
com.bailuntec.mapper.JobPointLogMapper
;
import
com.bailuntec.support.PointJob
;
...
...
@@ -81,15 +82,17 @@ public class SyncPurchaseDetailsJob extends PointJob {
e
.
printStackTrace
();
throw
new
RuntimeException
(
"BeanUtils.copyProperties采购单sku详细信息异常"
);
}
dcBasePurchaseDetails
.
setQuantityNotInbound
(
purchaseDetail
.
getQuantityPurchase
()
-
purchaseDetail
.
getQuantityInbound
());
dcBasePurchaseDetails
.
setCreateTime
(
LocalDateTime
.
parse
(
purchaseDetail
.
getCreateTimed
(),
DateTimeFormatter
.
ofPattern
(
"yyyy/M/d H:m:s"
)));
dcBasePurchaseDetails
.
setUpdateTime
(
LocalDateTime
.
parse
(
purchaseDetail
.
getUpdateTimed
(),
DateTimeFormatter
.
ofPattern
(
"yyyy/M/d H:m:s"
)));
dcBasePurchaseDetails
.
setGmtModified
(
LocalDateTime
.
now
());
mapper
.
upsertSelective
(
dcBasePurchaseDetails
);
SessionUtil
.
getSession
().
commit
();
int
i
=
mapper
.
updateByExampleSelective
(
dcBasePurchaseDetails
,
DcBasePurchaseDetailsExample
.
newAndCreateCriteria
().
andBailunSkuEqualTo
(
dcBasePurchaseDetails
.
getBailunSku
()).
andPurchaseIdEqualTo
(
dcBasePurchaseDetails
.
getPurchaseId
()).
example
());
if
(
i
==
0
)
{
mapper
.
insertSelective
(
dcBasePurchaseDetails
);
}
});
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"MYBATIS操作DB失败"
,
e
);
throw
new
RuntimeException
(
"MYBATIS操作DB失败"
);
}
finally
{
SessionUtil
.
closeSession
();
...
...
data-base/base-sync-purchase-details/src/main/java/com/bailuntec/mapper/DcBasePurchaseDetailsMapper.xml
View file @
a138c678
...
...
@@ -39,6 +39,7 @@
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"gmt_create"
jdbcType=
"TIMESTAMP"
property=
"gmtCreate"
/>
<result
column=
"gmt_modified"
jdbcType=
"TIMESTAMP"
property=
"gmtModified"
/>
<result
column=
"quantity_not_inbound"
jdbcType=
"INTEGER"
property=
"quantityNotInbound"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
...
...
@@ -117,7 +118,7 @@
quantity_return, quantity_inbound, quantity_deliver, quantity_not_deliver, quantity_arrival,
quantity_not_arrival, quantity_inspect, quantity_qualified_inspect, quantity_unqualified_inspect,
quantity_wait_transfer, quantity_exchange, quantity_lose_inbound, create_time, update_time,
gmt_create, gmt_modified
gmt_create, gmt_modified
, quantity_not_inbound
</sql>
<select
id=
"selectByExample"
parameterType=
"com.bailuntec.domain.example.DcBasePurchaseDetailsExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -189,7 +190,8 @@
quantity_qualified_inspect, quantity_unqualified_inspect,
quantity_wait_transfer, quantity_exchange,
quantity_lose_inbound, create_time, update_time,
gmt_create, gmt_modified)
gmt_create, gmt_modified, quantity_not_inbound
)
values (#{id,jdbcType=INTEGER}, #{purchaseId,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT},
#{purchaseCategoryName,jdbcType=VARCHAR}, #{deliverId,jdbcType=INTEGER}, #{deliverName,jdbcType=VARCHAR},
#{buyerName,jdbcType=VARCHAR}, #{warehouseFromCode,jdbcType=VARCHAR}, #{warehouseFromName,jdbcType=VARCHAR},
...
...
@@ -200,8 +202,9 @@
#{quantityArrival,jdbcType=INTEGER}, #{quantityNotArrival,jdbcType=INTEGER}, #{quantityInspect,jdbcType=INTEGER},
#{quantityQualifiedInspect,jdbcType=INTEGER}, #{quantityUnqualifiedInspect,jdbcType=INTEGER},
#{quantityWaitTransfer,jdbcType=INTEGER}, #{quantityExchange,jdbcType=INTEGER},
#{quantityLoseInbound,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP})
#{quantityLoseInbound,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{quantityNotInbound,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.bailuntec.domain.entity.DcBasePurchaseDetails"
>
<!--
...
...
@@ -309,6 +312,9 @@
<if
test=
"gmtModified != null"
>
gmt_modified,
</if>
<if
test=
"quantityNotInbound != null"
>
quantity_not_inbound,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
...
...
@@ -410,6 +416,9 @@
<if
test=
"gmtModified != null"
>
#{gmtModified,jdbcType=TIMESTAMP},
</if>
<if
test=
"quantityNotInbound != null"
>
#{quantityNotInbound,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.bailuntec.domain.example.DcBasePurchaseDetailsExample"
resultType=
"java.lang.Long"
>
...
...
@@ -528,6 +537,9 @@
<if
test=
"record.gmtModified != null"
>
gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.quantityNotInbound != null"
>
quantity_not_inbound = #{record.quantityNotInbound,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -571,7 +583,8 @@
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP}
gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
quantity_not_inbound = #{record.quantityNotInbound,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -679,6 +692,9 @@
<if
test=
"gmtModified != null"
>
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
</if>
<if
test=
"quantityNotInbound != null"
>
quantity_not_inbound = #{quantityNotInbound,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
...
...
@@ -719,7 +735,8 @@
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
quantity_not_inbound = #{quantityNotInbound,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<insert
id=
"upsertSelective"
parameterType=
"com.bailuntec.domain.entity.DcBasePurchaseDetails"
>
...
...
@@ -829,6 +846,9 @@
<if
test=
"gmtModified != null"
>
gmt_modified,
</if>
<if
test=
"quantityNotInbound != null"
>
quantity_not_inbound,
</if>
</trim>
values
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -931,6 +951,9 @@
<if
test=
"gmtModified != null"
>
#{gmtModified,jdbcType=TIMESTAMP},
</if>
<if
test=
"quantityNotInbound != null"
>
#{quantityNotInbound,jdbcType=INTEGER},
</if>
</trim>
on duplicate key update
<trim
suffixOverrides=
","
>
...
...
@@ -1033,6 +1056,9 @@
<if
test=
"gmtModified != null"
>
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
</if>
<if
test=
"quantityNotInbound != null"
>
quantity_not_inbound = #{quantityNotInbound,jdbcType=INTEGER},
</if>
</trim>
</insert>
<insert
id=
"upsert"
parameterType=
"com.bailuntec.domain.entity.DcBasePurchaseDetails"
>
...
...
@@ -1048,7 +1074,7 @@
quantity_return, quantity_inbound, quantity_deliver, quantity_not_deliver, quantity_arrival,
quantity_not_arrival, quantity_inspect, quantity_qualified_inspect, quantity_unqualified_inspect,
quantity_wait_transfer, quantity_exchange, quantity_lose_inbound, create_time,
update_time, gmt_create, gmt_modified)
update_time, gmt_create, gmt_modified
, quantity_not_inbound
)
values
(#{id,jdbcType=INTEGER}, #{purchaseId,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT},
#{purchaseCategoryName,jdbcType=VARCHAR}, #{deliverId,jdbcType=INTEGER}, #{deliverName,jdbcType=VARCHAR},
...
...
@@ -1060,8 +1086,9 @@
#{quantityArrival,jdbcType=INTEGER}, #{quantityNotArrival,jdbcType=INTEGER}, #{quantityInspect,jdbcType=INTEGER},
#{quantityQualifiedInspect,jdbcType=INTEGER}, #{quantityUnqualifiedInspect,jdbcType=INTEGER},
#{quantityWaitTransfer,jdbcType=INTEGER}, #{quantityExchange,jdbcType=INTEGER},
#{quantityLoseInbound,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP})
#{quantityLoseInbound,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{quantityNotInbound,jdbcType=INTEGER}
)
on duplicate key update
id = #{id,jdbcType=INTEGER},
purchase_id = #{purchaseId,jdbcType=VARCHAR},
...
...
@@ -1092,10 +1119,11 @@
quantity_wait_transfer = #{quantityWaitTransfer,jdbcType=INTEGER},
quantity_exchange = #{quantityExchange,jdbcType=INTEGER},
quantity_lose_inbound = #{quantityLoseInbound,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
quantity_not_inbound = #{quantityNotInbound,jdbcType=INTEGER}
</insert>
<select
id=
"selectOneByExample"
parameterType=
"com.bailuntec.domain.example.DcBasePurchaseDetailsExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
data-common/src/main/java/com/bailuntec/domain/entity/DcBasePurchaseDetails.java
View file @
a138c678
...
...
@@ -305,6 +305,15 @@ public class DcBasePurchaseDetails {
private
LocalDateTime
gmtModified
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_purchase_details.quantity_not_inbound
*
* @mbg.generated
*/
private
Integer
quantityNotInbound
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_purchase_details
*
...
...
@@ -349,6 +358,7 @@ public class DcBasePurchaseDetails {
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", gmtCreate="
).
append
(
gmtCreate
);
sb
.
append
(
", gmtModified="
).
append
(
gmtModified
);
sb
.
append
(
", quantityNotInbound="
).
append
(
quantityNotInbound
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
...
...
@@ -403,7 +413,8 @@ public class DcBasePurchaseDetails {
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()))
&&
(
this
.
getGmtCreate
()
==
null
?
other
.
getGmtCreate
()
==
null
:
this
.
getGmtCreate
().
equals
(
other
.
getGmtCreate
()))
&&
(
this
.
getGmtModified
()
==
null
?
other
.
getGmtModified
()
==
null
:
this
.
getGmtModified
().
equals
(
other
.
getGmtModified
()));
&&
(
this
.
getGmtModified
()
==
null
?
other
.
getGmtModified
()
==
null
:
this
.
getGmtModified
().
equals
(
other
.
getGmtModified
()))
&&
(
this
.
getQuantityNotInbound
()
==
null
?
other
.
getQuantityNotInbound
()
==
null
:
this
.
getQuantityNotInbound
().
equals
(
other
.
getQuantityNotInbound
()));
}
/**
...
...
@@ -449,6 +460,7 @@ public class DcBasePurchaseDetails {
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getGmtCreate
()
==
null
)
?
0
:
getGmtCreate
().
hashCode
());
result
=
prime
*
result
+
((
getGmtModified
()
==
null
)
?
0
:
getGmtModified
().
hashCode
());
result
=
prime
*
result
+
((
getQuantityNotInbound
()
==
null
)
?
0
:
getQuantityNotInbound
().
hashCode
());
return
result
;
}
}
\ No newline at end of file
data-common/src/main/java/com/bailuntec/domain/example/DcBasePurchaseDetailsExample.java
View file @
a138c678
...
...
@@ -2460,6 +2460,66 @@ public class DcBasePurchaseDetailsExample {
addCriterion
(
"gmt_modified not between"
,
value1
,
value2
,
"gmtModified"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundIsNull
()
{
addCriterion
(
"quantity_not_inbound is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundIsNotNull
()
{
addCriterion
(
"quantity_not_inbound is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundEqualTo
(
Integer
value
)
{
addCriterion
(
"quantity_not_inbound ="
,
value
,
"quantityNotInbound"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundNotEqualTo
(
Integer
value
)
{
addCriterion
(
"quantity_not_inbound <>"
,
value
,
"quantityNotInbound"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundGreaterThan
(
Integer
value
)
{
addCriterion
(
"quantity_not_inbound >"
,
value
,
"quantityNotInbound"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"quantity_not_inbound >="
,
value
,
"quantityNotInbound"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundLessThan
(
Integer
value
)
{
addCriterion
(
"quantity_not_inbound <"
,
value
,
"quantityNotInbound"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"quantity_not_inbound <="
,
value
,
"quantityNotInbound"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"quantity_not_inbound in"
,
values
,
"quantityNotInbound"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"quantity_not_inbound not in"
,
values
,
"quantityNotInbound"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"quantity_not_inbound between"
,
value1
,
value2
,
"quantityNotInbound"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQuantityNotInboundNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"quantity_not_inbound not between"
,
value1
,
value2
,
"quantityNotInbound"
);
return
(
Criteria
)
this
;
}
}
/**
...
...
mybatis-generator/src/main/resources/init.properties
View file @
a138c678
table-name
=
dc_
auto_turnover
table-name
=
dc_
base_purchase_details
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