Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
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
王衍超
cloud-fb
Commits
ecc8ad25
Commit
ecc8ad25
authored
Nov 11, 2021
by
高晓磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增散客类型销售记录
parent
76f82f5d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
132 additions
and
88 deletions
+132
-88
RetailInfoServiceImpl.java
...yst/dinas/biz/internal/service/RetailInfoServiceImpl.java
+1
-1
InventoryServiceImpl.java
...st/dinas/sales/internal/service/InventoryServiceImpl.java
+3
-0
SalesPlanServiceImpl.java
...st/dinas/sales/internal/service/SalesPlanServiceImpl.java
+2
-0
SalesRecordServiceImpl.java
.../dinas/sales/internal/service/SalesRecordServiceImpl.java
+8
-6
SalesRecordInfo.java
...n/java/com/xyst/dinas/sales/web/info/SalesRecordInfo.java
+16
-15
SalesRecord.jmx
.../resources/com/xyst/dinas/sales/datamodel/SalesRecord.jmx
+102
-64
WeighbridgeSyncController.java
...m/xyst/dinas/transport/web/WeighbridgeSyncController.java
+0
-2
No files found.
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/service/RetailInfoServiceImpl.java
View file @
ecc8ad25
...
...
@@ -201,7 +201,7 @@ public class RetailInfoServiceImpl implements RetailInfoService {
KObject
object
=
bean
.
newInstance
();
object
.
set
(
"purchaseAmount"
,
dealAmount
);
object
.
set
(
"master"
,
retailInfoDao
.
load
(
orGet
.
getUuid
(
"id"
)));
object
.
set
(
"dinasType"
,
dinasType
Dao
.
load
(
object
.
get
(
"dinasType"
).
getUuid
(
BaseConstants
.
ID
))
);
object
.
set
(
"dinasType"
,
dinasType
);
object
.
set
(
BaseConstants
.
ID
,
UUID
.
randomUUID
());
retailInfoDao
.
saveOrUpdate
(
object
);
...
...
backend/xyst.dinas.sales/src/main/java/com/xyst/dinas/sales/internal/service/InventoryServiceImpl.java
View file @
ecc8ad25
...
...
@@ -265,6 +265,9 @@ public class InventoryServiceImpl implements InventoryService {
List
<
KObject
>
itemListByStationId
=
inventoryDao
.
getItemListByStationId
(
stationId
);
List
<
StationDinasTypeRelation
>
result
=
new
ArrayList
<>();
for
(
KObject
item
:
itemListByStationId
)
{
if
(
item
.
getBigDecimal
(
"price"
)==
null
||
item
.
getBigDecimal
(
"price"
).
compareTo
(
BigDecimal
.
ZERO
)<
1
){
continue
;
}
StationDinasTypeRelation
r
=
new
StationDinasTypeRelation
();
r
.
setStationId
(
item
.
get
(
"station"
).
getUuid
(
"id"
));
r
.
setStationName
(
item
.
get
(
"station"
).
getString
(
"stationName"
));
...
...
backend/xyst.dinas.sales/src/main/java/com/xyst/dinas/sales/internal/service/SalesPlanServiceImpl.java
View file @
ecc8ad25
...
...
@@ -619,6 +619,7 @@ public class SalesPlanServiceImpl implements SalesPlanService {
//本周期分配量
stringObjectHashMap
.
put
(
"planAmount"
,
saleTempDetail
.
getBigDecimal
(
"salesPlanAmount"
));
stringObjectHashMap
.
put
(
"salePlanId"
,
saleTempDetail
.
get
(
"master"
).
getUuid
(
"id"
));
stringObjectHashMap
.
put
(
"salePlanDetailId"
,
saleTempDetail
.
getUuid
(
"id"
));
//获取砂石今日库存
//库存id
UUID
id
=
inventory
.
getUuid
(
"id"
);
...
...
@@ -685,6 +686,7 @@ public class SalesPlanServiceImpl implements SalesPlanService {
UUID
uuid
=
a
.
get
(
"master"
).
getUuid
(
"id"
);
stringObjectHashMap
.
put
(
"planAmount"
,
planAmount
);
stringObjectHashMap
.
put
(
"salePlanId"
,
uuid
);
stringObjectHashMap
.
put
(
"salePlanDetailId"
,
a
.
getUuid
(
"id"
));
});
//获取砂石今日库存
if
(!
stringObjectHashMap
.
containsKey
(
"planAmount"
)){
...
...
backend/xyst.dinas.sales/src/main/java/com/xyst/dinas/sales/internal/service/SalesRecordServiceImpl.java
View file @
ecc8ad25
...
...
@@ -98,7 +98,7 @@ public class SalesRecordServiceImpl implements SalesRecordService {
salesRecord
.
set
(
SalesRecordConstant
.
TARE_WEIGHT_PERSON
,
salesRecordInfo
.
getTareWeightPerson
());
salesRecord
.
set
(
SalesRecordConstant
.
SYNCTIME
,
thentime
);
salesRecord
.
set
(
SalesRecordConstant
.
DEALBILLCODE
,
salesRecordInfo
.
getDealBillCode
());
salesRecord
.
set
(
SalesRecordConstant
.
CARINFO
,
salesRecordInfo
.
getCar
Info
());
salesRecord
.
set
(
SalesRecordConstant
.
CARINFO
,
salesRecordInfo
.
getCar
Num
());
salesRecord
.
set
(
SalesRecordConstant
.
PRICE
,
salesRecordInfo
.
getPrice
());
salesRecord
.
set
(
SalesRecordConstant
.
PAYMENTSOURCE
,
salesRecordInfo
.
getPaymentSource
());
salesRecord
.
set
(
SalesRecordConstant
.
TRANSPORT_TYPE
,
salesRecordInfo
.
getTransportType
());
...
...
@@ -106,12 +106,13 @@ public class SalesRecordServiceImpl implements SalesRecordService {
salesRecord
.
set
(
SalesRecordConstant
.
SALE_TYPE
,
saleType
);
salesRecord
.
set
(
SalesRecordConstant
.
REGIONALCOMPANY
,
regionalCompany
);
salesRecord
.
set
(
SalesRecordConstant
.
DINASTYPE
,
dinasType
);
salesRecord
.
set
(
SalesRecordConstant
.
CARINFO
,
salesRecordInfo
.
getCarInfo
());
salesRecord
.
set
(
SalesRecordConstant
.
AMOUNT
,
salesRecordInfo
.
getAmount
());
salesRecord
.
set
(
SalesRecordConstant
.
DEALAMOUNT
,
salesRecordInfo
.
getDealAmount
());
//如果是散客则全部新增
if
(
2
==
saleType
)
{
salesRecord
.
set
(
SalesRecordConstant
.
CUSTOMERTYPE
,
CustomerTypeEnum
.
RetailInfo
.
name
());
retailInfoService
.
create
(
station
,
dinasType
,
salesRecordInfo
.
get
RetailName
(),
salesRecordInfo
.
getCarInfo
(),
salesRecordInfo
.
getCarInfo
(),
salesRecordInfo
.
getDealAmount
(),
salesRecordInfo
.
getAmount
());
retailInfoService
.
create
(
station
,
dinasType
,
salesRecordInfo
.
get
CarNum
(),
salesRecordInfo
.
getRetailName
(),
salesRecordInfo
.
getCarNum
(),
salesRecordInfo
.
getDealAmount
(),
salesRecordInfo
.
getAmount
());
}
else
{
//如果不为2则必定有合同 项目 购砂单位 区域公司
salesRecord
.
set
(
SalesRecordConstant
.
CUSTOMERTYPE
,
CustomerTypeEnum
.
PurchaseSandCompany
.
name
());
...
...
@@ -139,7 +140,7 @@ public class SalesRecordServiceImpl implements SalesRecordService {
BigDecimal
dealAmount
=
BigDecimal
.
ZERO
.
subtract
(
BigDecimal
.
valueOf
(
salesRecord
.
getDouble
(
SalesRecordConstant
.
DEALAMOUNT
)));
BigDecimal
amount
;
if
(
0
==
salesRecordInfo
.
getPaymentSource
(
))
{
if
(
Integer
.
valueOf
(
0
).
equals
(
salesRecordInfo
.
getPaymentSource
()
))
{
amount
=
BigDecimal
.
ZERO
.
subtract
(
BigDecimal
.
valueOf
(
salesRecord
.
getDouble
(
SalesRecordConstant
.
AMOUNT
)));
}
else
{
amount
=
BigDecimal
.
ZERO
;
...
...
@@ -158,13 +159,13 @@ public class SalesRecordServiceImpl implements SalesRecordService {
}
else
if
(
saleType
==
1
)
{
// 为1时是需用计划和销售计划
KObject
salesPlan
=
salesPlanDao
.
load
(
UUID
.
fromString
(
salesRecordInfo
.
getSalePlanId
()));
BigDecimal
actualSaleTotalAmount
=
salesPlan
.
get
(
"actualSaleTotalAmount"
)
==
null
?
BigDecimal
.
ZERO
:
(
salesPlan
.
getBigDecimal
(
"actualSaleTotalAmount"
));
BigDecimal
actualSaleTotalAmount
=
salesPlan
.
get
BigDecimal
(
"actualSaleTotalAmount"
)
==
null
?
BigDecimal
.
ZERO
:
(
salesPlan
.
getBigDecimal
(
"actualSaleTotalAmount"
));
salesPlan
.
set
(
"actualSaleTotalAmount"
,
actualSaleTotalAmount
.
subtract
(
dealAmount
));
salesPlanDao
.
update
(
salesPlan
);
salesPlanDao
.
updateSalesPlanDetailAmount
(
salesRecordInfo
.
getSalePlanDetailId
(),
salesRecordInfo
.
getDealAmount
());
KObject
needPlanDetail
=
needPlanDao
.
queryDetailById
(
UUID
.
fromString
(
salesRecordInfo
.
getNeedPlanDetailId
()));
if
(
needPlanDetail
!=
null
)
{
BigDecimal
effectiveSale
=
needPlanDetail
.
get
(
"effectiveSale"
)
==
null
?
BigDecimal
.
ZERO
:
needPlanDetail
.
getBigDecimal
(
"effectiveSale"
);
BigDecimal
effectiveSale
=
needPlanDetail
.
get
BigDecimal
(
"effectiveSale"
)
==
null
?
BigDecimal
.
ZERO
:
needPlanDetail
.
getBigDecimal
(
"effectiveSale"
);
needPlanDetail
.
set
(
"effectiveSale"
,
effectiveSale
.
subtract
(
dealAmount
));
needPlanDao
.
update
(
needPlanDetail
);
}
...
...
@@ -202,6 +203,7 @@ public class SalesRecordServiceImpl implements SalesRecordService {
return
salesRecordId
.
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
SyncException
(
"销售台账信息存储报出错:"
+
e
.
getMessage
());
}
}
...
...
backend/xyst.dinas.sales/src/main/java/com/xyst/dinas/sales/web/info/SalesRecordInfo.java
View file @
ecc8ad25
package
com
.
xyst
.
dinas
.
sales
.
web
.
info
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
...
...
@@ -53,7 +54,7 @@ public class SalesRecordInfo {
/**
* 车辆信息
*/
private
String
car
Info
;
private
String
car
Num
;
/**
* 毛重时间
...
...
@@ -68,11 +69,11 @@ public class SalesRecordInfo {
/**
* 皮重
*/
private
String
tareWeight
;
private
BigDecimal
tareWeight
;
/**
* 毛重
*/
private
String
grossWeight
;
private
BigDecimal
grossWeight
;
/**
* 毛重司磅员
*/
...
...
@@ -210,14 +211,6 @@ public class SalesRecordInfo {
this
.
dealTime
=
dealTime
;
}
public
String
getCarInfo
()
{
return
carInfo
;
}
public
void
setCarInfo
(
String
carInfo
)
{
this
.
carInfo
=
carInfo
;
}
public
Date
getGrossWeightTime
()
{
return
grossWeightTime
;
}
...
...
@@ -234,19 +227,19 @@ public class SalesRecordInfo {
this
.
tareWeightTime
=
tareWeightTime
;
}
public
String
getTareWeight
()
{
public
BigDecimal
getTareWeight
()
{
return
tareWeight
;
}
public
void
setTareWeight
(
String
tareWeight
)
{
public
void
setTareWeight
(
BigDecimal
tareWeight
)
{
this
.
tareWeight
=
tareWeight
;
}
public
String
getGrossWeight
()
{
public
BigDecimal
getGrossWeight
()
{
return
grossWeight
;
}
public
void
setGrossWeight
(
String
grossWeight
)
{
public
void
setGrossWeight
(
BigDecimal
grossWeight
)
{
this
.
grossWeight
=
grossWeight
;
}
...
...
@@ -306,6 +299,14 @@ public class SalesRecordInfo {
this
.
salePlanDetailId
=
salePlanDetailId
;
}
public
String
getCarNum
()
{
return
carNum
;
}
public
void
setCarNum
(
String
carNum
)
{
this
.
carNum
=
carNum
;
}
public
Double
getDealAmount
()
{
return
dealAmount
;
}
...
...
backend/xyst.dinas.sales/src/main/resources/com/xyst/dinas/sales/datamodel/SalesRecord.jmx
View file @
ecc8ad25
...
...
@@ -87,44 +87,6 @@
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
javax.persistence.Column
</m:type>
<m:properties>
<m:property>
<m:key>
name
</m:key>
<m:value>
gross_weight_time
</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>
ca273c9d-0981-4f6d-94b4-4a3b76742a1e
</m:id>
<m:name>
grossWeightTime
</m:name>
<m:title>
毛重时间
</m:title>
<m:type>
datetime
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
javax.persistence.Column
</m:type>
<m:properties>
<m:property>
<m:key>
name
</m:key>
<m:value>
tare_weight_time
</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>
ca273c9d-0981-4f6d-94b4-4a3b76742a1e
</m:id>
<m:name>
tareWeightTime
</m:name>
<m:title>
皮重时间
</m:title>
<m:type>
datetime
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
javax.persistence.ManyToOne
</m:type>
</m:annotation>
<m:annotation>
...
...
@@ -360,6 +322,44 @@
<m:properties>
<m:property>
<m:key>
name
</m:key>
<m:value>
gross_weight_time
</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>
33dda8c2-be30-4edd-acda-a250eea496be
</m:id>
<m:name>
grossWeightTime
</m:name>
<m:title>
毛重时间
</m:title>
<m:type>
datetime
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
javax.persistence.Column
</m:type>
<m:properties>
<m:property>
<m:key>
name
</m:key>
<m:value>
tare_weight_time
</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>
ecfdaf26-7e34-4753-9dfb-f5e0a9789ef2
</m:id>
<m:name>
tareWeightTime
</m:name>
<m:title>
皮重时间
</m:title>
<m:type>
datetime
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
javax.persistence.Column
</m:type>
<m:properties>
<m:property>
<m:key>
name
</m:key>
<m:value>
deal_time
</m:value>
</m:property>
</m:properties>
...
...
@@ -417,78 +417,116 @@
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.StringLength
</m:type>
<m:value>
20
</m:value>
<m:type>
bcp.type.constraint.Numeric
</m:type>
<m:properties>
<m:property>
<m:key>
precision
</m:key>
<m:value>
12
</m:value>
</m:property>
<m:property>
<m:key>
scale
</m:key>
<m:value>
4
</m:value>
</m:property>
</m:properties>
</m:annotation>
<m:annotation>
<m:type>
javax.persistence.Column
</m:type>
<m:properties>
<m:property>
<m:key>
name
</m:key>
<m:value>
gross_weight_person
</m:value>
<m:value>
deal_amount
</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>
9ed97388-563a-4634-a555-b56bb1664dd
0
</m:id>
<m:name>
grossWeightPerson
</m:name>
<m:title>
毛重司磅员
</m:title>
<m:type>
string
</m:type>
<m:id>
d307fa81-7819-4216-887c-2a0fdffd319
0
</m:id>
<m:name>
dealAmount
</m:name>
<m:title>
净重
</m:title>
<m:type>
fixnum
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.StringLength
</m:type>
<m:value>
20
</m:value>
</m:annotation>
<m:annotation>
<m:type>
javax.persistence.Column
</m:type>
<m:properties>
<m:property>
<m:key>
name
</m:key>
<m:value>
tare_weight_person
</m:value>
<m:value>
sale_type
</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>
9ed97388-563a-4634-a555-b56bb1664dd0
</m:id>
<m:name>
tareWeightPerson
</m:name>
<m:title>
皮重司磅员
</m:title>
<m:type>
string
</m:type>
<m:id>
deccf7b5-4378-4573-b927-5fd413a22f11
</m:id>
<m:name>
saleType
</m:name>
<m:title>
销售类型
</m:title>
<m:type>
int
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.Numeric
</m:type>
<m:type>
javax.persistence.Column
</m:type>
<m:properties>
<m:property>
<m:key>
precision
</m:key>
<m:value>
12
</m:value>
<m:key>
name
</m:key>
<m:value>
transport_type
</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>
1d5e96fc-1a8a-4de5-956b-1f26ca610edb
</m:id>
<m:name>
transportType
</m:name>
<m:title>
运输类型
</m:title>
<m:type>
int
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.StringLength
</m:type>
<m:value>
20
</m:value>
</m:annotation>
<m:annotation>
<m:type>
javax.persistence.Column
</m:type>
<m:properties>
<m:property>
<m:key>
scal
e
</m:key>
<m:value>
4
</m:value>
<m:key>
nam
e
</m:key>
<m:value>
gross_weight_person
</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>
6da43868-9ade-4c8c-8184-4e4f2a585455
</m:id>
<m:name>
grossWeightPerson
</m:name>
<m:title>
毛重司磅员
</m:title>
<m:type>
string
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.StringLength
</m:type>
<m:value>
20
</m:value>
</m:annotation>
<m:annotation>
<m:type>
javax.persistence.Column
</m:type>
<m:properties>
<m:property>
<m:key>
name
</m:key>
<m:value>
deal_amount
</m:value>
<m:value>
tare_weight_person
</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>
d307fa81-7819-4216-887c-2a0fdffd3190
</m:id>
<m:name>
dealAmount
</m:name>
<m:title>
销售数量
</m:title>
<m:type>
fixnum
</m:type>
<m:id>
9669004f-a72e-43df-94e7-401bde16bb11
</m:id>
<m:name>
tareWeightPerson
</m:name>
<m:title>
皮重司磅员
</m:title>
<m:type>
string
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
...
...
backend/xyst.dinas.transport/src/main/java/com/xyst/dinas/transport/web/WeighbridgeSyncController.java
View file @
ecc8ad25
...
...
@@ -142,6 +142,4 @@ public class WeighbridgeSyncController {
return
ResponseObj
.
success
(
"查询成功"
,
allDinasTypes
);
}
}
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