Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
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
sa_aidea
Aidea
Commits
7d0abc50
Commit
7d0abc50
authored
Mar 02, 2021
by
fanjr
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://106.14.62.141:8081/sa_aidea/aidea
parents
15c19756
021b3787
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
1354 additions
and
275 deletions
+1354
-275
LogoConfig.java
...rc/main/java/com/cftech/checkcoupon/utils/LogoConfig.java
+3
-1
checkresultlist.html
...ain/webapp/WEB-INF/views/checkresult/checkresultlist.html
+4
-1
CouponrecordMapper.xml
...n/java/com/cftech/couponrecord/dao/CouponrecordMapper.xml
+1
-1
CouponrecordServiceImpl.java
...ch/couponrecord/service/impl/CouponrecordServiceImpl.java
+15
-15
PdaCouponrecordServiceImpl.java
...couponrecord/service/impl/PdaCouponrecordServiceImpl.java
+50
-49
PdaCouponrecordController.java
...om/cftech/couponrecord/web/PdaCouponrecordController.java
+2
-2
hospitallist.html
.../src/main/webapp/WEB-INF/views/hospital/hospitallist.html
+15
-11
OrderDetailsMapper.java
...n/java/com/cftech/orderdetail/dao/OrderDetailsMapper.java
+8
-0
OrderDetailsMapper.xml
...in/java/com/cftech/orderdetail/dao/OrderDetailsMapper.xml
+49
-2
OrderSplitBatchDto.java
...java/com/cftech/orderdetail/model/OrderSplitBatchDto.java
+57
-0
OrderDetailsService.java
...a/com/cftech/orderdetail/service/OrderDetailsService.java
+8
-0
OrderDetailsServiceImpl.java
...ech/orderdetail/service/impl/OrderDetailsServiceImpl.java
+6
-0
orderSendOut.html
...web/src/main/webapp/WEB-INF/views/order/orderSendOut.html
+170
-80
orderform.html
...le-web/src/main/webapp/WEB-INF/views/order/orderform.html
+8
-3
orderlistout.html
...web/src/main/webapp/WEB-INF/views/order/orderlistout.html
+4
-16
OrderMapper.xml
...module/src/main/java/com/cftech/order/dao/OrderMapper.xml
+13
-13
DrugVo.java
...r-module/src/main/java/com/cftech/order/model/DrugVo.java
+10
-0
OrderService.java
.../src/main/java/com/cftech/order/service/OrderService.java
+1
-1
OrderServiceImpl.java
.../java/com/cftech/order/service/impl/OrderServiceImpl.java
+58
-51
OrderController.java
...e/src/main/java/com/cftech/order/web/OrderController.java
+48
-10
outReportlist.html
...b/src/main/webapp/WEB-INF/views/report/outReportlist.html
+450
-0
ReportMapper.java
...ule/src/main/java/com/cftech/report/dao/ReportMapper.java
+13
-0
ReportMapper.xml
...dule/src/main/java/com/cftech/report/dao/ReportMapper.xml
+26
-0
OutStoreReport.java
...src/main/java/com/cftech/report/model/OutStoreReport.java
+34
-0
ReportService.java
...rc/main/java/com/cftech/report/service/ReportService.java
+17
-0
ReportServiceImpl.java
...ava/com/cftech/report/service/impl/ReportServiceImpl.java
+17
-0
OutStoreReportController.java
.../java/com/cftech/report/web/OutStoreReportController.java
+218
-0
ReportController.java
...src/main/java/com/cftech/report/web/ReportController.java
+1
-2
WaybillServiceImpl.java
...a/com/cftech/waybill/service/impl/WaybillServiceImpl.java
+35
-15
ExpressOrderInfoUtils.java
.../java/com/cftech/waybill/utils/ExpressOrderInfoUtils.java
+8
-1
common-test.properties
cftech-common-web/src/main/resources/common-test.properties
+5
-1
No files found.
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/utils/LogoConfig.java
View file @
7d0abc50
...
@@ -17,6 +17,8 @@ import java.io.IOException;
...
@@ -17,6 +17,8 @@ import java.io.IOException;
@Slf4j
@Slf4j
public
class
LogoConfig
{
public
class
LogoConfig
{
private
static
String
QRCODE_LOGO_DIR
=
SystemConfig
.
p
.
getProperty
(
"userfiles.qrcodedir"
);
/**
/**
* 设置 logo
* 设置 logo
*
*
...
@@ -36,7 +38,7 @@ public class LogoConfig {
...
@@ -36,7 +38,7 @@ public class LogoConfig {
/**
/**
* 读取Logo图片
* 读取Logo图片
*/
*/
BufferedImage
logo
=
ImageIO
.
read
(
new
File
(
SystemConfig
.
p
.
getProperty
(
"userfiles.qrcodedir"
)
+
File
.
separator
+
"logo.png"
));
BufferedImage
logo
=
ImageIO
.
read
(
new
File
(
QRCODE_LOGO_DIR
+
File
.
separator
+
"logo.png"
));
//开始绘制图片
//开始绘制图片
g2
.
drawImage
(
logo
,
matrixWidth
/
5
*
2
,
matrixHeigh
/
5
*
2
,
matrixWidth
/
5
,
matrixHeigh
/
5
,
null
);
//绘制
g2
.
drawImage
(
logo
,
matrixWidth
/
5
*
2
,
matrixHeigh
/
5
*
2
,
matrixWidth
/
5
,
matrixHeigh
/
5
,
null
);
//绘制
...
...
aidea-modules/checkresult-module-web/src/main/webapp/WEB-INF/views/checkresult/checkresultlist.html
View file @
7d0abc50
...
@@ -277,6 +277,7 @@
...
@@ -277,6 +277,7 @@
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">'
;
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">'
;
html
+=
'<li>#if($shiro.hasPermission("qy:checkresult:view"))<a href="#springUrl("/a/checkresult/form?pageType=View&id='
+
a
+
'")" class="btn green">查看</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:checkresult:view"))<a href="#springUrl("/a/checkresult/form?pageType=View&id='
+
a
+
'")" class="btn green">查看</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:checkresult:edit"))<a href="#springUrl("/a/checkresult/form?pageType=Edit&id='
+
a
+
'")" class="btn green">修改</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:checkresult:edit"))<a href="#springUrl("/a/checkresult/form?pageType=Edit&id='
+
a
+
'")" class="btn green">修改</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:checkresult:edit"))<a href="javascript:void(0)" onclick="removeData('
+
a
+
')" class="btn green">删除</a>#end</li>'
;
html
+=
'</ul></div>'
;
html
+=
'</ul></div>'
;
return
html
;
return
html
;
}
}
...
@@ -312,7 +313,9 @@
...
@@ -312,7 +313,9 @@
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
"#springUrl('/a/checkresult/delete')"
,
url
:
"#springUrl('/a/checkresult/delete')"
,
data
:
{
id
:
data
},
data
:
{
id
:
data
,
_csrfheader
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
if
(
data
.
errorNo
==
0
)
{
...
...
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/dao/CouponrecordMapper.xml
View file @
7d0abc50
...
@@ -134,7 +134,7 @@
...
@@ -134,7 +134,7 @@
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_coupon_record t
SELECT COUNT(1) FROM t_aidea_coupon_record t
LEFT JOIN t_aidea_check_coupon c ON t.coupon_id = c.id
LEFT JOIN t_aidea_check_coupon c ON t.coupon_id = c.id
LEFT JOIN wx_mp_fanss f ON f.openid = t.openid
LEFT JOIN wx_mp_fanss f ON f.openid = t.openid
AND f.delflag = '0'
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
</select>
</select>
...
...
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/service/impl/CouponrecordServiceImpl.java
View file @
7d0abc50
...
@@ -77,9 +77,9 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
...
@@ -77,9 +77,9 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
set
Expire
Date
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
TakeEffect
Date
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
TakeEffectDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
ExpireDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//失效时间
couponrecord
.
setInvalidDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
get
ExpireMonth
())));
couponrecord
.
setInvalidDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
get
TakeEffectMonth
())));
//失效时间
couponrecordMapper
.
save
(
couponrecord
);
couponrecordMapper
.
save
(
couponrecord
);
}
}
if
(
number
>=
6
)
{
//赠送第二张
if
(
number
>=
6
)
{
//赠送第二张
...
@@ -97,9 +97,9 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
...
@@ -97,9 +97,9 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
set
ExpireDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpire
Month
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
TakeEffectDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireTwo
Month
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
TakeEffectDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
ExpireDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireTwoMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//失效时间
couponrecord
.
setInvalidDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpire
Month
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
couponrecord
.
setInvalidDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpire
TwoMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//失效时间
couponrecordMapper
.
save
(
couponrecord
);
couponrecordMapper
.
save
(
couponrecord
);
}
}
}
else
{
}
else
{
...
@@ -119,9 +119,9 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
...
@@ -119,9 +119,9 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
set
Expire
Date
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
TakeEffect
Date
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
TakeEffectDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
ExpireDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//失效时间
couponrecord
.
setInvalidDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
get
ExpireMonth
())));
couponrecord
.
setInvalidDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
get
TakeEffectMonth
())));
//失效时间
couponrecordMapper
.
save
(
couponrecord
);
couponrecordMapper
.
save
(
couponrecord
);
}
}
if
(
number
>=
6
)
{
//赠送第二张
if
(
number
>=
6
)
{
//赠送第二张
...
@@ -139,9 +139,9 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
...
@@ -139,9 +139,9 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
set
ExpireDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpire
Month
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
TakeEffectDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireTwo
Month
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
TakeEffectDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
ExpireDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireTwoMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//失效时间
couponrecord
.
setInvalidDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpire
Month
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
couponrecord
.
setInvalidDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpire
TwoMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//失效时间
couponrecordMapper
.
save
(
couponrecord
);
couponrecordMapper
.
save
(
couponrecord
);
}
}
}
else
if
(
couponrecordMax
.
getType
().
equals
(
"1"
))
{
//通过第一张开始时间获取购买数量
}
else
if
(
couponrecordMax
.
getType
().
equals
(
"1"
))
{
//通过第一张开始时间获取购买数量
...
@@ -165,9 +165,9 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
...
@@ -165,9 +165,9 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
set
ExpireDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpire
Month
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
TakeEffectDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireTwo
Month
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
TakeEffectDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
set
ExpireDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireTwoMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//失效时间
couponrecord
.
setInvalidDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpire
Month
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
couponrecord
.
setInvalidDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpire
TwoMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//失效时间
couponrecordMapper
.
save
(
couponrecord
);
couponrecordMapper
.
save
(
couponrecord
);
}
}
}
}
...
...
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/service/impl/PdaCouponrecordServiceImpl.java
View file @
7d0abc50
...
@@ -16,38 +16,39 @@ import java.util.UUID;
...
@@ -16,38 +16,39 @@ import java.util.UUID;
@Service
(
"pdaCouponrecordService"
)
@Service
(
"pdaCouponrecordService"
)
public
class
PdaCouponrecordServiceImpl
implements
PdaCouponrecordService
{
public
class
PdaCouponrecordServiceImpl
implements
PdaCouponrecordService
{
@Autowired
@Autowired
@Qualifier
(
"couponrecordMapper"
)
@Qualifier
(
"couponrecordMapper"
)
private
CouponrecordMapper
couponrecordMapper
;
private
CouponrecordMapper
couponrecordMapper
;
public
JSONObject
writeOff
(
JSONObject
obj
){
public
JSONObject
writeOff
(
JSONObject
obj
)
{
JSONObject
rtnJson
=
new
JSONObject
();
JSONObject
rtnJson
=
new
JSONObject
();
String
logId
=
UUID
.
randomUUID
().
toString
();
String
logId
=
UUID
.
randomUUID
().
toString
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"id"
,
logId
);
map
.
put
(
"id"
,
logId
);
map
.
put
(
"content"
,
obj
.
toString
());
map
.
put
(
"content"
,
obj
.
toString
());
couponrecordMapper
.
insertPdaLog
(
map
);
couponrecordMapper
.
insertPdaLog
(
map
);
String
facilityNo
=
obj
.
get
(
"facilityNo"
)
+
""
;
String
facilityNo
=
obj
.
get
(
"facilityNo"
)
+
""
;
String
number
=
obj
.
get
(
"number"
)
+
""
;
String
number
=
obj
.
get
(
"number"
)
+
""
;
String
token
=
obj
.
get
(
"token"
)
+
""
;
String
token
=
obj
.
get
(
"token"
)
+
""
;
if
(!
token
.
equals
(
"268710d79f63bcdebdf3f745f84d146f"
))
{
if
(!
token
.
equals
(
"268710d79f63bcdebdf3f745f84d146f"
))
{
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"msg"
,
"接口调用失败!"
);
rtnJson
.
put
(
"msg"
,
"接口调用失败!"
);
map
=
new
HashMap
<
String
,
Object
>();
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"id"
,
logId
);
map
.
put
(
"id"
,
logId
);
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"status"
,
1
);
map
.
put
(
"status"
,
1
);
couponrecordMapper
.
updatePdaLog
(
map
);
couponrecordMapper
.
updatePdaLog
(
map
);
return
rtnJson
;
return
rtnJson
;
}
}
try
{
try
{
//是否已核销
//是否已核销
Couponrecord
info
=
couponrecordMapper
.
isWriteOff
(
number
);
Couponrecord
info
=
couponrecordMapper
.
isWriteOff
(
number
);
if
(
info
!=
null
)
{
if
(
info
!=
null
)
{
if
(
info
.
getStatus
().
equals
(
"1"
))
{
if
(
info
.
getStatus
().
equals
(
"1"
))
{
Map
<
String
,
Object
>
map1
=
couponrecordMapper
.
getHospitalIdByfaNo
(
facilityNo
);
Map
<
String
,
Object
>
map1
=
couponrecordMapper
.
getHospitalIdByfaNo
(
facilityNo
);
if
(
map1
!=
null
&&
map1
.
size
()>
0
)
{
if
(
map1
!=
null
&&
map1
.
size
()
>
0
)
{
long
hospitalId
=
Long
.
valueOf
(
map1
.
get
(
"id"
)
+
""
);
long
hospitalId
=
Long
.
valueOf
(
map1
.
get
(
"id"
)
+
""
);
info
.
setStatus
(
"2"
);
info
.
setStatus
(
"2"
);
info
.
setVerifDate
(
new
Date
());
info
.
setVerifDate
(
new
Date
());
info
.
setFacilityNo
(
facilityNo
);
info
.
setFacilityNo
(
facilityNo
);
...
@@ -55,59 +56,59 @@ public class PdaCouponrecordServiceImpl implements PdaCouponrecordService {
...
@@ -55,59 +56,59 @@ public class PdaCouponrecordServiceImpl implements PdaCouponrecordService {
couponrecordMapper
.
update
(
info
);
couponrecordMapper
.
update
(
info
);
rtnJson
.
put
(
"code"
,
200
);
rtnJson
.
put
(
"code"
,
200
);
rtnJson
.
put
(
"msg"
,
"验证成功!"
);
rtnJson
.
put
(
"msg"
,
"验证成功!"
);
map
=
new
HashMap
<
String
,
Object
>();
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"id"
,
logId
);
map
.
put
(
"id"
,
logId
);
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"status"
,
2
);
map
.
put
(
"status"
,
2
);
}
else
{
}
else
{
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"msg"
,
"未找到设备号对应的医院!"
);
rtnJson
.
put
(
"msg"
,
"未找到设备号对应的医院!"
);
map
=
new
HashMap
<
String
,
Object
>();
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"id"
,
logId
);
map
.
put
(
"id"
,
logId
);
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"status"
,
1
);
map
.
put
(
"status"
,
1
);
couponrecordMapper
.
updatePdaLog
(
map
);
couponrecordMapper
.
updatePdaLog
(
map
);
}
}
}
else
if
(
info
.
getStatus
().
equals
(
"0"
))
{
}
else
if
(
info
.
getStatus
().
equals
(
"0"
))
{
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"msg"
,
"检测券未激活!"
);
rtnJson
.
put
(
"msg"
,
"检测券未激活!"
);
map
=
new
HashMap
<
String
,
Object
>();
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"id"
,
logId
);
map
.
put
(
"id"
,
logId
);
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"status"
,
1
);
map
.
put
(
"status"
,
1
);
}
else
if
(
info
.
getStatus
().
equals
(
"2"
))
{
}
else
if
(
info
.
getStatus
().
equals
(
"2"
))
{
rtnJson
.
put
(
"code"
,
201
);
rtnJson
.
put
(
"code"
,
201
);
rtnJson
.
put
(
"msg"
,
"检测券已使用!"
);
rtnJson
.
put
(
"msg"
,
"检测券已使用!"
);
map
=
new
HashMap
<
String
,
Object
>();
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"id"
,
logId
);
map
.
put
(
"id"
,
logId
);
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"status"
,
1
);
map
.
put
(
"status"
,
1
);
}
else
{
}
else
{
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"msg"
,
"检测券已过期!"
);
rtnJson
.
put
(
"msg"
,
"检测券已过期!"
);
map
=
new
HashMap
<
String
,
Object
>();
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"id"
,
logId
);
map
.
put
(
"id"
,
logId
);
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"status"
,
1
);
map
.
put
(
"status"
,
1
);
}
}
couponrecordMapper
.
updatePdaLog
(
map
);
couponrecordMapper
.
updatePdaLog
(
map
);
}
else
{
}
else
{
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"msg"
,
"未找到对应检测券"
);
rtnJson
.
put
(
"msg"
,
"未找到对应检测券"
);
map
=
new
HashMap
<
String
,
Object
>();
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"id"
,
logId
);
map
.
put
(
"id"
,
logId
);
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"status"
,
1
);
map
.
put
(
"status"
,
1
);
couponrecordMapper
.
updatePdaLog
(
map
);
couponrecordMapper
.
updatePdaLog
(
map
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"msg"
,
"系统错误:"
+
e
.
getMessage
());
rtnJson
.
put
(
"msg"
,
"系统错误:"
+
e
.
getMessage
());
map
=
new
HashMap
<
String
,
Object
>();
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"id"
,
logId
);
map
.
put
(
"id"
,
logId
);
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"status"
,
1
);
map
.
put
(
"status"
,
1
);
couponrecordMapper
.
updatePdaLog
(
map
);
couponrecordMapper
.
updatePdaLog
(
map
);
}
}
return
rtnJson
;
return
rtnJson
;
...
...
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/web/PdaCouponrecordController.java
View file @
7d0abc50
...
@@ -27,11 +27,11 @@ public class PdaCouponrecordController {
...
@@ -27,11 +27,11 @@ public class PdaCouponrecordController {
private
PdaCouponrecordService
pdaCouponrecordService
;
private
PdaCouponrecordService
pdaCouponrecordService
;
/**
/**
* @return
* @Author Fanjr
* @Author Fanjr
* @Description
检测券核销
* @Description 检测券核销
* @Date 2021年2月8日
* @Date 2021年2月8日
* @Param
* @Param
* @return
**/
**/
@RequestMapping
(
value
=
"/writeOff"
,
method
=
{
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/writeOff"
,
method
=
{
RequestMethod
.
POST
})
public
JSONObject
writeOff
(
@RequestBody
String
param
)
{
public
JSONObject
writeOff
(
@RequestBody
String
param
)
{
...
...
aidea-modules/hospital-module-web/src/main/webapp/WEB-INF/views/hospital/hospitallist.html
View file @
7d0abc50
...
@@ -104,8 +104,8 @@
...
@@ -104,8 +104,8 @@
<th>
设备号
</th>
<th>
设备号
</th>
<th>
地址
</th>
<th>
地址
</th>
<th>
联系方式
</th>
<th>
联系方式
</th>
<th>
经度
</th
>
<!-- <th>经度</th>--
>
<th>
纬度
</th
>
<!-- <th>纬度</th>--
>
<th>
创建时间
</th>
<th>
创建时间
</th>
<th>
操作
</th>
<th>
操作
</th>
</tr>
</tr>
...
@@ -225,12 +225,12 @@
...
@@ -225,12 +225,12 @@
{
{
"mData"
:
"telephone"
"mData"
:
"telephone"
},
},
{
//
{
"mData"
:
"longitude"
//
"mData": "longitude"
},
//
},
{
//
{
"mData"
:
"latitude"
//
"mData": "latitude"
},
//
},
{
{
"mData"
:
"createTime"
"mData"
:
"createTime"
},
},
...
@@ -243,7 +243,7 @@
...
@@ -243,7 +243,7 @@
'targets'
:
[
0
]
'targets'
:
[
0
]
},
},
{
{
"aTargets"
:
[
8
],
"aTargets"
:
[
6
],
"mData"
:
"createTime"
,
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
...
@@ -251,7 +251,7 @@
...
@@ -251,7 +251,7 @@
}
}
},
},
{
{
"aTargets"
:
[
9
],
"aTargets"
:
[
7
],
"mData"
:
"id"
,
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
let
html
=
''
;
let
html
=
''
;
...
@@ -263,6 +263,7 @@
...
@@ -263,6 +263,7 @@
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">'
;
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">'
;
html
+=
'<li>#if($shiro.hasPermission("qy:hospital:view"))<a href="#springUrl("/a/hospital/form?pageType=View&id='
+
a
+
'")" class="btn green">查看</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:hospital:view"))<a href="#springUrl("/a/hospital/form?pageType=View&id='
+
a
+
'")" class="btn green">查看</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:hospital:edit"))<a href="#springUrl("/a/hospital/form?pageType=Edit&id='
+
a
+
'")" class="btn green">修改</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:hospital:edit"))<a href="#springUrl("/a/hospital/form?pageType=Edit&id='
+
a
+
'")" class="btn green">修改</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:hospital:edit"))<a href="javascript:void(0)" onclick="removeData('
+
a
+
')" class="btn green">删除</a>#end</li>'
;
html
+=
'</ul></div>'
;
html
+=
'</ul></div>'
;
return
html
;
return
html
;
}
}
...
@@ -298,7 +299,10 @@
...
@@ -298,7 +299,10 @@
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
"#springUrl('/a/hospital/delete')"
,
url
:
"#springUrl('/a/hospital/delete')"
,
data
:
{
id
:
data
},
data
:
{
id
:
data
,
_csrfheader
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
if
(
data
.
errorNo
==
0
)
{
...
...
aidea-modules/order-detail-module/src/main/java/com/cftech/orderdetail/dao/OrderDetailsMapper.java
View file @
7d0abc50
...
@@ -2,6 +2,7 @@ package com.cftech.orderdetail.dao;
...
@@ -2,6 +2,7 @@ package com.cftech.orderdetail.dao;
import
com.cftech.orderdetail.model.OrderDetails
;
import
com.cftech.orderdetail.model.OrderDetails
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.orderdetail.model.OrderSplitBatchDto
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -19,4 +20,11 @@ public interface OrderDetailsMapper extends GenericDao<OrderDetails> {
...
@@ -19,4 +20,11 @@ public interface OrderDetailsMapper extends GenericDao<OrderDetails> {
* @return
* @return
*/
*/
Integer
fetchMemberByYearGoodsNum
(
Map
<
String
,
Object
>
params
);
Integer
fetchMemberByYearGoodsNum
(
Map
<
String
,
Object
>
params
);
/**
* 保存订单明细含批次号
* @param orderSplitBatchDto
* @return
*/
Long
saveDrugBatchNo
(
OrderSplitBatchDto
orderSplitBatchDto
);
}
}
\ No newline at end of file
aidea-modules/order-detail-module/src/main/java/com/cftech/orderdetail/dao/OrderDetailsMapper.xml
View file @
7d0abc50
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<insert
id=
"save"
parameterType=
"com.cftech.orderdetail.model.OrderDetails"
useGeneratedKeys=
"true"
<insert
id=
"save"
parameterType=
"com.cftech.orderdetail.model.OrderDetails"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
keyProperty=
"id"
>
insert into t_order
insert into t_order
_split_batch
(
(
<include
refid=
"sqlColumns"
/>
<include
refid=
"sqlColumns"
/>
)
)
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
</select>
</select>
<update
id=
"update"
parameterType=
"com.cftech.orderdetail.model.OrderDetails"
>
<update
id=
"update"
parameterType=
"com.cftech.orderdetail.model.OrderDetails"
>
update t_order
update t_order
_split_batch
<set>
<set>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
id = #{id, jdbcType=BIGINT},
...
@@ -209,4 +209,51 @@
...
@@ -209,4 +209,51 @@
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update t_order set del_flag=1 where id=#{id,jdbcType=BIGINT}
update t_order set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</update>
<!-- 插入订单明细 批次号 -->
<insert
id=
"saveDrugBatchNo"
parameterType=
"com.cftech.orderdetail.model.OrderSplitBatchDto"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_order_split_batch
(
id,
order_id,
order_code,
drugs_id,
drugs_num,
openid,
drugs_code,
drugs_sku,
drugs_batchno,
accounts_id,
del_flag,
STATUS,
create_time,
update_time,
description,
create_by,
update_by,
drugs_name
)
values
(
#{id, jdbcType=BIGINT},
#{orderId, jdbcType=BIGINT},
#{orderCode, jdbcType=VARCHAR},
#{drugsId, jdbcType=BIGINT},
#{drugsNum, jdbcType=BIGINT},
#{openid, jdbcType=VARCHAR},
#{drugsCode, jdbcType=CHAR},
#{drugsSku, jdbcType=VARCHAR},
#{drugsBatchNo, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
now(),
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT},
#{drugsName, jdbcType=VARCHAR}
)
</insert>
</mapper>
</mapper>
\ No newline at end of file
aidea-modules/order-detail-module/src/main/java/com/cftech/orderdetail/model/OrderSplitBatchDto.java
0 → 100644
View file @
7d0abc50
package
com
.
cftech
.
orderdetail
.
model
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
OrderSplitBatchDto
{
/* 主键id */
private
Long
id
;
/* 订单id */
private
Long
orderId
;
/* 订单编码 */
private
String
orderCode
;
/* 商品id */
private
Long
drugsId
;
/* 商品名称 */
private
String
drugsName
;
/* 商品数量 */
private
Long
drugsNum
;
/* 用户所属公众号id */
private
String
openid
;
/* 商品价格 */
private
Double
price
;
/* 商品总价 */
private
Double
amount
;
/* 商品编码 */
private
String
drugsCode
;
/* 商品sku(规格) */
private
String
drugsSku
;
/* 对应erp物料号 */
private
String
drugsBatchNo
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
public
OrderSplitBatchDto
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
aidea-modules/order-detail-module/src/main/java/com/cftech/orderdetail/service/OrderDetailsService.java
View file @
7d0abc50
...
@@ -4,6 +4,7 @@ import com.cftech.core.sql.Conds;
...
@@ -4,6 +4,7 @@ import com.cftech.core.sql.Conds;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.orderdetail.model.OrderDetails
;
import
com.cftech.orderdetail.model.OrderDetails
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.orderdetail.model.OrderSplitBatchDto
;
import
java.util.List
;
import
java.util.List
;
...
@@ -31,4 +32,11 @@ public interface OrderDetailsService extends GenericService<OrderDetails> {
...
@@ -31,4 +32,11 @@ public interface OrderDetailsService extends GenericService<OrderDetails> {
* @return
* @return
*/
*/
Integer
fetchMemberByYearGoodsNum
(
Conds
conds
);
Integer
fetchMemberByYearGoodsNum
(
Conds
conds
);
/**
* 保存订单明细含批次号
* @param orderSplitBatchDto
* @return
*/
Long
saveDrugBatchNo
(
OrderSplitBatchDto
orderSplitBatchDto
);
}
}
aidea-modules/order-detail-module/src/main/java/com/cftech/orderdetail/service/impl/OrderDetailsServiceImpl.java
View file @
7d0abc50
...
@@ -4,6 +4,7 @@ import com.cftech.core.sql.Sort;
...
@@ -4,6 +4,7 @@ import com.cftech.core.sql.Sort;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.orderdetail.model.OrderDetails
;
import
com.cftech.orderdetail.model.OrderDetails
;
import
com.cftech.orderdetail.dao.OrderDetailsMapper
;
import
com.cftech.orderdetail.dao.OrderDetailsMapper
;
import
com.cftech.orderdetail.model.OrderSplitBatchDto
;
import
com.cftech.orderdetail.service.OrderDetailsService
;
import
com.cftech.orderdetail.service.OrderDetailsService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.generic.GenericServiceImpl
;
...
@@ -54,4 +55,9 @@ public class OrderDetailsServiceImpl extends GenericServiceImpl<OrderDetails> im
...
@@ -54,4 +55,9 @@ public class OrderDetailsServiceImpl extends GenericServiceImpl<OrderDetails> im
params
.
put
(
"conds"
,
conds
);
params
.
put
(
"conds"
,
conds
);
return
orderDetailsMapper
.
fetchMemberByYearGoodsNum
(
params
);
return
orderDetailsMapper
.
fetchMemberByYearGoodsNum
(
params
);
}
}
@Override
public
Long
saveDrugBatchNo
(
OrderSplitBatchDto
orderSplitBatchDto
)
{
return
orderDetailsMapper
.
saveDrugBatchNo
(
orderSplitBatchDto
);
}
}
}
\ No newline at end of file
aidea-modules/order-module-web/src/main/webapp/WEB-INF/views/order/orderSendOut.html
View file @
7d0abc50
...
@@ -126,15 +126,6 @@
...
@@ -126,15 +126,6 @@
>
>
</div>
</div>
<!--<div class="form-group form-md-line-input col-xs-5">-->
<!--<label>收货地址<font style="color: red"></font></label>-->
<!--<input type="text"-->
<!--class="form-control" name="address"-->
<!--id="address" readonly="readonly"-->
<!--maxlength="50" placeholder="收货地址"-->
<!--value="$!{data.address}"-->
<!-->-->
<!--</div>-->
<div
class=
"form-group form-md-line-input col-xs-5"
>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
订单状态
<font
style=
"color: red"
></font></label>
<label>
订单状态
<font
style=
"color: red"
></font></label>
<input
type=
"text"
<input
type=
"text"
...
@@ -144,15 +135,7 @@
...
@@ -144,15 +135,7 @@
value=
"$!{data.status}"
value=
"$!{data.status}"
>
>
</div>
</div>
<!--<div class="form-group form-md-line-input col-xs-5">-->
<!--<label>支付备注<font style="color: red"></font></label>-->
<!--<input type="text"-->
<!--class="form-control" name="description"-->
<!--id="description" readonly="readonly"-->
<!--maxlength="50" placeholder=""-->
<!--value="$!{data.description}"-->
<!-->-->
<!--</div>-->
<div
class=
"form-group form-md-line-input col-xs-5"
>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
支付交易号
<font
style=
"color: red"
></font></label>
<label>
支付交易号
<font
style=
"color: red"
></font></label>
<input
type=
"text"
<input
type=
"text"
...
@@ -163,6 +146,17 @@
...
@@ -163,6 +146,17 @@
>
>
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
订单出库员
<font
style=
"color: red"
></font></label>
<input
type=
"text"
class=
"form-control"
name=
"storeManage"
id=
"storeManage"
readonly=
"readonly"
maxlength=
"50"
placeholder=
""
value=
"$!{data.createTime}"
>
</div>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
创建时间
<font
style=
"color: red"
></font></label>
<label>
创建时间
<font
style=
"color: red"
></font></label>
<input
type=
"text"
<input
type=
"text"
...
@@ -173,13 +167,6 @@
...
@@ -173,13 +167,6 @@
>
>
</div>
</div>
<!--<div class="form-group form-md-line-input col-xs-8">-->
<!--<label>订单取消原因<font style="color: red"></font></label>-->
<!--<textarea class="form-control" id="orderCancel" name="orderCancel" rows="3" readonly>$!{data.orderCancel}</textarea>-->
<!--</div>-->
</div>
</div>
</div>
</div>
...
@@ -193,22 +180,33 @@
...
@@ -193,22 +180,33 @@
<th
style=
""
><label
style=
"width: 200px;margin-right: 40px;text-align: center"
>
商品编码
</label></th>
<th
style=
""
><label
style=
"width: 200px;margin-right: 40px;text-align: center"
>
商品编码
</label></th>
<th
style=
""
><label
style=
"width: 100px;margin-right: 45px;text-align: center"
>
购买数量
</label></th>
<th
style=
""
><label
style=
"width: 100px;margin-right: 45px;text-align: center"
>
购买数量
</label></th>
<th
style=
""
><label
style=
"width: 100px;margin-right: 100px;text-align: center"
>
出货数量
</label></th>
<th
style=
""
><label
style=
"width: 100px;margin-right: 100px;text-align: center"
>
出货数量
</label></th>
<th
style=
""
><label
style=
"width: 180px;margin-right: 50px;text-align: center"
>
批次号
</label></th>
</li>
</li>
</div>
</div>
</div>
<!-- <div class="form-group form-md-line-input col-xs-8">--
>
<div
class=
"form-group form-md-line-input col-xs-8"
>
<!-- <label><font></font></label>--
>
<label>
已扫商品编码
</label
>
<!-- <button name="clickScan" type="button" class="btn btn-primary">点击扫码</button>--
>
<textarea
class=
"form-control"
id=
"scanGoodsCode"
name=
"scanGoodsCode"
rows=
"5"
readonly
></textarea
>
<!-- </div>--
>
</div
>
<div
class=
"form-group form-md-line-input col-xs-8
"
>
<div
class=
"form-group form-md-line-input col-xs-6
"
>
<label>
已扫商品编码
<font></font></label
>
<div
>
<
textarea
class=
"form-control"
id=
"scanGoodsCode"
name=
"scanGoodsCode"
rows=
"5"
readonly
></textarea
>
<
button
class=
"btn btn-primary"
onclick=
"orderSplit()"
>
订单拆分
</button
>
</div>
</div>
<!--<button type="button" class="search btn btn-primary" onclick="clickAdd()">添加商品和数量</button>-->
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<th
disabled
>
商品名称
</th>
<th
disabled
>
商品编码
</th>
<th
disabled
>
数量
</th>
<th
disabled
>
批次号
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -299,9 +297,6 @@
...
@@ -299,9 +297,6 @@
//触发顺序keydown keypress keyup
//触发顺序keydown keypress keyup
function
initScanEvent
()
{
function
initScanEvent
()
{
// $("#clickScan").on('click', function() {
// $("#scanGoodsCode").focus();
// });
$
(
"#scanGoodsCode"
).
on
(
'keydown'
,
function
(
event
)
{
$
(
"#scanGoodsCode"
).
on
(
'keydown'
,
function
(
event
)
{
//键盘按下回车后会转换成click 阻止键盘的所有默认行为
//键盘按下回车后会转换成click 阻止键盘的所有默认行为
...
@@ -309,13 +304,6 @@
...
@@ -309,13 +304,6 @@
console
.
log
(
'扫码开始'
);
console
.
log
(
'扫码开始'
);
scanCode
(
event
);
scanCode
(
event
);
});
});
// $("#scanGoodsCode").on('keydown', function(event) {
// //键盘按下回车后会转换成click 阻止键盘的所有默认行为
// event.preventDefault();
// console.log('扫码开始');
// scanCode(event);
// });
}
}
function
scanCode
(
event
)
{
function
scanCode
(
event
)
{
...
@@ -451,11 +439,6 @@
...
@@ -451,11 +439,6 @@
function
clickAdd
(
id
,
productId
,
productName
,
count
,
price
,
amount
,
number
)
{
function
clickAdd
(
id
,
productId
,
productName
,
count
,
price
,
amount
,
number
)
{
var
options
=
""
;
if
(
productName
&&
productName
!=
null
)
{
options
=
`<input name="productName" class="form-control" style="width: 160px ;margin-right: 50px" type='text' readonly="readonly" value="`
+
productName
+
`"></input>`
;
}
var
idHtml
=
""
;
var
idHtml
=
""
;
if
(
id
&&
id
!=
null
){
if
(
id
&&
id
!=
null
){
idHtml
+=
`<input type="hidden" name="idDetail" value="
${
id
}
">`
idHtml
+=
`<input type="hidden" name="idDetail" value="
${
id
}
">`
...
@@ -463,6 +446,16 @@
...
@@ -463,6 +446,16 @@
idHtml
+=
`<input type="hidden" name="idDetail" value="">`
idHtml
+=
`<input type="hidden" name="idDetail" value="">`
}
}
var
proIdHtml
=
""
;
if
(
productId
&&
productId
!=
""
)
{
proIdHtml
+=
`<input type="hidden" name="productId" value="+productId+">`
;
}
var
options
=
""
;
if
(
productName
&&
productName
!=
null
)
{
options
+=
`<input name="productName" class="form-control" style="width: 160px ;margin-right: 50px" type='text' readonly="readonly" value="`
+
productName
+
`"></input>`
;
}
var
htmlNumber
=
""
;
var
htmlNumber
=
""
;
if
(
number
&&
number
!=
null
)
{
if
(
number
&&
number
!=
null
)
{
htmlNumber
+=
`<input name="productCode" class="form-control" style="width: 200px ;margin-right: 50px" type='text' readonly="readonly" value="`
+
number
+
`"></input>`
;
htmlNumber
+=
`<input name="productCode" class="form-control" style="width: 200px ;margin-right: 50px" type='text' readonly="readonly" value="`
+
number
+
`"></input>`
;
...
@@ -470,7 +463,6 @@
...
@@ -470,7 +463,6 @@
var
listHtml
=
""
;
var
listHtml
=
""
;
if
(
count
&&
count
!=
null
)
{
if
(
count
&&
count
!=
null
)
{
price
listHtml
+=
`<input name="orderNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value=
${
count
}
></input>`
;
listHtml
+=
`<input name="orderNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value=
${
count
}
></input>`
;
}
else
{
}
else
{
listHtml
+=
`<input name="orderNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="1"></input>`
;
listHtml
+=
`<input name="orderNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="1"></input>`
;
...
@@ -478,15 +470,16 @@
...
@@ -478,15 +470,16 @@
var
HtmlAmount
=
`<input name="sendNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="0"></input>`
;
var
HtmlAmount
=
`<input name="sendNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="0"></input>`
;
var
HtmlBatchNo
=
`<input name="batchNo" class="form-control" type="text" style="width: 300px; margin-right: 50px;"></input>`
;
//
var HtmlBatchNo = `
<
input
name
=
"batchNo"
class
=
"form-control"
type
=
"text"
style
=
"width: 300px; margin-right: 50px;"
><
/input>`
;
//扫码商品编码
//扫码商品编码
var
HtmlCode
=
`<button name="delGoods" type="button" class="btn btn-danger delGoods">删除</button>`
;
var
HtmlCode
=
`<button name="delGoods" type="button" class="btn btn-danger delGoods">删除</button>`
;
let
html
=
`<li id="form-translate" class="list-group-item translate" style="display:flex;">
let
html
=
`<li id="form-translate" class="list-group-item translate" style="display:flex;">
${
idHtml
}
${
idHtml
}
${
proIdHtml
}
${
options
}
${
options
}
${
htmlNumber
}
${
htmlNumber
}
...
@@ -495,8 +488,6 @@
...
@@ -495,8 +488,6 @@
${
HtmlAmount
}
${
HtmlAmount
}
${
HtmlBatchNo
}
${
HtmlCode
}
${
HtmlCode
}
</li>`
;
</li>`
;
...
@@ -516,6 +507,7 @@
...
@@ -516,6 +507,7 @@
* 保存事件
* 保存事件
*/
*/
function
save
()
{
function
save
()
{
//是否扫码
let
flag
=
false
;
let
flag
=
false
;
$
(
"#group"
).
find
(
'.list-group-item'
).
each
(
function
(
i
)
{
$
(
"#group"
).
find
(
'.list-group-item'
).
each
(
function
(
i
)
{
if
(
$
(
this
).
find
(
'input[name="orderNum"]'
).
val
()
!=
$
(
this
).
find
(
'input[name="sendNum"]'
).
val
())
{
if
(
$
(
this
).
find
(
'input[name="orderNum"]'
).
val
()
!=
$
(
this
).
find
(
'input[name="sendNum"]'
).
val
())
{
...
@@ -529,29 +521,36 @@
...
@@ -529,29 +521,36 @@
return
;
return
;
}
}
let
datas
=
[];
// let datas = [];
$
(
".translate"
).
each
(
function
(
index
,
item
){
// $(".translate").each(function (index,item){
const
idDetail
=
$
(
item
).
find
(
'[name="idDetail"]'
).
val
();
// datas.push({
const
productName
=
$
(
item
).
find
(
'[name="productName"]'
).
val
();
// idDetail : $(item).find('[name="idDetail"]').val(),
const
productCode
=
$
(
item
).
find
(
'[name="productCode"]'
).
val
();
// productName : $(item).find('[name="productName"]').val(),
const
orderNum
=
$
(
item
).
find
(
'[name="orderNum"]'
).
val
();
// productCode : $(item).find('[name="productCode"]').val(),
const
sendNum
=
$
(
item
).
find
(
'[name="sendNum"]'
).
val
();
// orderNum : $(item).find('[name="orderNum"]').val(),
const
batchNo
=
$
(
item
).
find
(
'[name="batchNo"]'
).
val
();
// sendNum : $(item).find('[name="sendNum"]').val()
if
(
batchNo
==
null
||
batchNo
==
''
)
{
// })
$
(
"#labels"
).
text
(
"请输入商品批次号!"
);
// });
$
(
'#exampleModal'
).
modal
(
'show'
);
return
;
//增加产品批次号
}
let
drugArr
=
[];
$
(
".table "
).
find
(
'tr'
).
each
(
function
(
i
,
item
)
{
datas
.
push
({
let
batchNo
=
$
(
item
).
find
(
'td:eq(3)'
).
find
(
'input'
).
val
();
idDetail
:
idDetail
,
if
(
batchNo
==
null
||
batchNo
==
''
)
{
productName
:
productName
,
$
(
"#labels"
).
text
(
"请输入产品批次号!"
);
productCode
:
productCode
,
$
(
'#exampleModal'
).
modal
(
'show'
);
orderNum
:
orderNum
,
return
;
sendNum
:
sendNum
,
}
batchNo
:
batchNo
})
drugArr
.
push
({
});
drugCode
:
$
(
item
).
find
(
'td:eq(0)'
).
text
(),
drugName
:
$
(
item
).
find
(
'td:eq(1)'
).
text
(),
num
:
$
(
item
).
find
(
'td:eq(2)'
).
text
(),
batchNo
:
batchNo
});
});
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
(
"#save"
).
attr
(
"disabled"
,
true
);
var
url
=
"#springUrl('/a/waybill/orderSendOutForWaybill')"
;
var
url
=
"#springUrl('/a/waybill/orderSendOutForWaybill')"
;
$
.
ajax
({
$
.
ajax
({
...
@@ -562,7 +561,7 @@
...
@@ -562,7 +561,7 @@
data
:
{
_csrf
:
csrf
,
data
:
{
_csrf
:
csrf
,
_csrf_header
:
csrf_header
,
_csrf_header
:
csrf_header
,
orderId
:
$
(
"#id"
).
val
(),
orderId
:
$
(
"#id"
).
val
(),
datas
:
JSON
.
stringify
(
d
atas
)},
datas
:
JSON
.
stringify
(
d
rugArr
)},
success
:
function
(
rsp
)
{
success
:
function
(
rsp
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
$
(
"#save"
).
attr
(
"disabled"
,
false
);
if
(
rsp
.
errorNo
==
"0"
){
if
(
rsp
.
errorNo
==
"0"
){
...
@@ -582,6 +581,97 @@
...
@@ -582,6 +581,97 @@
});
});
}
}
/**
* 订单拆分,输入批次号
*/
function
orderSplit
()
{
let
dttable
=
$
(
'#table'
).
dataTable
();
dttable
.
fnClearTable
();
//清空一下table
dttable
.
fnDestroy
();
//还原初始化了的datatable
let
datas
=
[];
$
(
".translate"
).
each
(
function
(
index
,
item
){
let
idDetail
=
$
(
item
).
find
(
'[name="idDetail"]'
).
val
();
let
productId
=
$
(
item
).
find
(
'[name="productId"]'
).
val
();
let
productName
=
$
(
item
).
find
(
'[name="productName"]'
).
val
();
let
productCode
=
$
(
item
).
find
(
'[name="productCode"]'
).
val
();
let
orderNum
=
$
(
item
).
find
(
'[name="orderNum"]'
).
val
();
let
sendNum
=
$
(
item
).
find
(
'[name="sendNum"]'
).
val
();
datas
.
push
({
idDetail
:
idDetail
,
productId
:
productId
,
productName
:
productName
,
productCode
:
productCode
,
orderNum
:
orderNum
,
sendNum
:
sendNum
})
});
seachTable
(
datas
);
}
function
seachTable
(
datas
)
{
var
sSource
=
"#springUrl('/a/order/orderSplit')"
;
var
aoData
=
{};
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
aoData
.
push
({
name
:
"drugs"
,
value
:
JSON
.
stringify
(
datas
)
});
aoData
.
push
({
name
:
"accountId"
,
value
:
348
});
$
.
ajax
({
"type"
:
"GET"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#table'
).
DataTable
({
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"autoWidth"
:
true
,
"scrollX"
:
true
,
"sScrollY"
:
false
,
"bInfo"
:
false
,
"bPaginate"
:
false
,
"aoColumns"
:
[
{
"mData"
:
"drugName"
},
{
"mData"
:
"drugCode"
},
{
"mData"
:
"num"
},
{
"mData"
:
"batchNO"
}
],
"aoColumnDefs"
:
[
{
// set default column settings
'targets'
:
[
3
],
"mData"
:
"batchNO"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
'<input id="batchNo" name="batchNo" class="form-control" placeholder="请输入产品批次号" />'
}
}
]
});
$
(
'.sorting_asc'
).
removeClass
(
"sorting_asc"
);
}
var
recdTypeAdd
=
function
()
{
var
recdTypeAdd
=
function
()
{
var
initForm
=
function
()
{
var
initForm
=
function
()
{
var
initFormCtrl
=
function
()
{
var
initFormCtrl
=
function
()
{
...
...
aidea-modules/order-module-web/src/main/webapp/WEB-INF/views/order/orderform.html
View file @
7d0abc50
...
@@ -593,14 +593,19 @@
...
@@ -593,14 +593,19 @@
var
url
=
"#springUrl('/a/order/formData')"
;
var
url
=
"#springUrl('/a/order/formData')"
;
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
(
"#save"
).
attr
(
"disabled"
,
true
);
console
.
log
(
JSON
.
stringify
(
datas
));
$
.
ajax
({
$
.
ajax
({
url
:
url
,
url
:
url
,
type
:
"POST"
,
type
:
"POST"
,
dateType
:
'json'
,
dateType
:
'json'
,
headers
:
{
"Accept"
:
"application/json;charset=UTF-8"
},
//
headers: {"Accept": "application/json;charset=UTF-8"},
data
:
{
data
:
{
_csrf
:
csrf
,
_csrf_header
:
csrf_header
,
_csrf
:
csrf
,
datas
:
JSON
.
stringify
(
datas
)
_csrf_header
:
csrf_header
,
datas
:
JSON
.
stringify
(
datas
),
orderId
:
$
(
'input[name="id"]'
).
val
(),
openid
:
$
(
'input[name="openid"]'
).
val
(),
orderAmount
:
$
(
'input[name="orderAmount"]'
).
val
()
},
},
success
:
function
(
rsp
)
{
success
:
function
(
rsp
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
$
(
"#save"
).
attr
(
"disabled"
,
false
);
...
...
aidea-modules/order-module-web/src/main/webapp/WEB-INF/views/order/orderlistout.html
View file @
7d0abc50
...
@@ -44,6 +44,10 @@
...
@@ -44,6 +44,10 @@
<!-- bootstrap wysihtml5 - text editor -->
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<!--[if lt IE 9]>
...
@@ -335,21 +339,6 @@
...
@@ -335,21 +339,6 @@
{
{
"mData"
:
"productName"
"mData"
:
"productName"
},
},
// {
// "mData": "orderAmount"
// }
// ,
// {
// "mData": "totalAmount"
// }
// ,
// {
// "mData": "nickName"
// }
// ,
// {
// "mData": "openid"
// },
{
{
"mData"
:
"courierNumber"
"mData"
:
"courierNumber"
}
}
...
@@ -378,7 +367,6 @@
...
@@ -378,7 +367,6 @@
{
{
"mData"
:
"id"
"mData"
:
"id"
}
}
],
],
"aoColumnDefs"
:
[
"aoColumnDefs"
:
[
{
// set default column settings
{
// set default column settings
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/dao/OrderMapper.xml
View file @
7d0abc50
...
@@ -496,7 +496,7 @@
...
@@ -496,7 +496,7 @@
update t_order set del_flag=1 where id=#{id,jdbcType=BIGINT}
update t_order set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</update>
<select
id=
"fetchProduct"
resultType=
"com.cftech.order.model.ProductDto"
parameterType=
"java.util.Map
"
>
<select
id=
"fetchProduct"
parameterType=
"java.util.Map"
resultType=
"com.cftech.order.model.ProductDto
"
>
SELECT * FROM t_aidea_product WHERE id = #{productId} AND accounts_id=#{accountsId} AND del_flag = 0
SELECT * FROM t_aidea_product WHERE id = #{productId} AND accounts_id=#{accountsId} AND del_flag = 0
</select>
</select>
...
@@ -526,21 +526,21 @@
...
@@ -526,21 +526,21 @@
<insert
id=
"saveDetill"
parameterType=
"com.cftech.order.model.OrderDetailDto"
>
<insert
id=
"saveDetill"
parameterType=
"com.cftech.order.model.OrderDetailDto"
>
insert into t_order_details
insert into t_order_details
(
(
<include
refid=
"Column"
/>
<include
refid=
"Column"
/>
)
)
values
values
(
(
#{orderId},
#{orderId},
#{orderCode},
#{orderCode},
#{drugsId},
#{drugsId},
#{drugsNum},
#{drugsNum},
#{openid},
#{openid},
#{price},
#{price},
#{amount},
#{amount},
#{drugsCode},
#{drugsCode},
#{drugsSku},
#{drugsSku},
#{accountsId},
#{accountsId},
#{drugsName}
#{drugsName}
)
)
</insert>
</insert>
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/model/DrugVo.java
0 → 100644
View file @
7d0abc50
package
com
.
cftech
.
order
.
model
;
import
lombok.Data
;
@Data
public
class
DrugVo
{
private
String
drugs
;
}
aidea-modules/order-module/src/main/java/com/cftech/order/service/OrderService.java
View file @
7d0abc50
...
@@ -41,7 +41,7 @@ public interface OrderService extends GenericService<Order> {
...
@@ -41,7 +41,7 @@ public interface OrderService extends GenericService<Order> {
Integer
updateStatus
(
Long
id
,
String
status
,
String
orderCancel
);
Integer
updateStatus
(
Long
id
,
String
status
,
String
orderCancel
);
JSONObject
saveOrderDetail
(
String
datas
,
Long
accountsId
)
throws
Exception
;
JSONObject
saveOrderDetail
(
String
datas
,
Long
accountsId
,
String
orderId
,
String
openid
,
Double
orderAmount
)
throws
Exception
;
JSONObject
deleteAll
(
Long
id
);
JSONObject
deleteAll
(
Long
id
);
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/service/impl/OrderServiceImpl.java
View file @
7d0abc50
...
@@ -48,6 +48,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
...
@@ -48,6 +48,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
@@ -157,18 +158,23 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
...
@@ -157,18 +158,23 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
@Override
@Override
public
JSONObject
saveOrderDetail
(
String
datas
,
Long
accountsId
)
throws
Exception
{
public
JSONObject
saveOrderDetail
(
String
datas
,
Long
accountsId
,
String
orderId
,
String
openid
,
Double
orderAmount
)
throws
Exception
{
JSONObject
rtnJson
=
new
JSONObject
();
JSONObject
rtnJson
=
new
JSONObject
();
OrderDetailDto
orderDetailDto
=
null
;
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
datas
=
datas
.
replaceAll
(
"""
,
"\""
);
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
datas
);
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
datas
);
Long
id
=
null
;
Conds
orderConds
=
new
Conds
();
Double
orderAmount
=
null
;
orderConds
.
equal
(
"o.del_flag"
,
Constants
.
DEL_FLAG_0
);
Order
order
=
null
;
orderConds
.
equal
(
"o.id"
,
orderId
);
boolean
flag
=
false
;
Order
order
=
this
.
fetchSearchByConds
(
orderConds
);
//当前订单所购艾邦德数量,金额
String
drugsId
=
SystemConfig
.
p
.
getProperty
(
"THREE_GRUGS_ID"
);
Long
drugNum
=
0L
;
Double
price
=
null
;
//生成订单详情
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
obj
=
jsonArray
.
getJSONObject
(
i
);
JSONObject
obj
=
jsonArray
.
getJSONObject
(
i
);
params
.
put
(
"accountsId"
,
accountsId
);
params
.
put
(
"accountsId"
,
accountsId
);
...
@@ -184,26 +190,8 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
...
@@ -184,26 +190,8 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
//获取产品信息
//获取产品信息
ProductDto
productDtos
=
orderMapper
.
fetchProduct
(
params
);
ProductDto
productDtos
=
orderMapper
.
fetchProduct
(
params
);
if
(
order
==
null
)
{
OrderDetailDto
orderDetailDto
=
new
OrderDetailDto
();
id
=
obj
.
getLong
(
"id"
);
orderDetailDto
.
setOrderId
(
obj
.
getLong
(
"id"
));
orderAmount
=
obj
.
getDouble
(
"orderAmount"
);
Conds
orderConds
=
new
Conds
();
orderConds
.
equal
(
"o.del_flag"
,
Constants
.
DEL_FLAG_0
);
orderConds
.
equal
(
"o.id"
,
id
);
order
=
this
.
fetchSearchByConds
(
orderConds
);
if
(
order
!=
null
)
{
calculateAmount
(
order
,
orderAmount
);
//order.setOrderAmount(orderAmount);
}
else
{
rtnJson
.
put
(
"errorNo"
,
"1"
);
return
rtnJson
;
}
}
orderDetailDto
=
new
OrderDetailDto
();
orderDetailDto
.
setOrderId
(
id
);
orderDetailDto
.
setOrderCode
(
order
.
getNumber
());
orderDetailDto
.
setOrderCode
(
order
.
getNumber
());
orderDetailDto
.
setOpenid
(
order
.
getOpenid
());
orderDetailDto
.
setOpenid
(
order
.
getOpenid
());
orderDetailDto
.
setPrice
(
obj
.
getDouble
(
"price"
));
orderDetailDto
.
setPrice
(
obj
.
getDouble
(
"price"
));
...
@@ -214,30 +202,37 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
...
@@ -214,30 +202,37 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
orderDetailDto
.
setDrugsCode
(
productDtos
.
getProductNumber
());
orderDetailDto
.
setDrugsCode
(
productDtos
.
getProductNumber
());
orderDetailDto
.
setDrugsSku
(
productDtos
.
getFormat
());
orderDetailDto
.
setDrugsSku
(
productDtos
.
getFormat
());
orderDetailDto
.
setAccountsId
(
accountsId
);
orderDetailDto
.
setAccountsId
(
accountsId
);
Integer
result
=
this
.
saveDetill
(
orderDetailDto
);
this
.
saveDetill
(
orderDetailDto
);
if
(
result
>
0
)
{
flag
=
true
;
if
(
Long
.
parseLong
(
drugsId
)
==
obj
.
getLong
(
"productId"
))
{
drugNum
=
obj
.
getLong
(
"drugsNum"
);
price
=
obj
.
getDouble
(
"price"
);
}
}
}
}
if
(
order
!=
null
)
{
calculateAmount
(
order
,
orderAmount
,
drugNum
,
price
);
}
else
{
rtnJson
.
put
(
"errorNo"
,
"1"
);
return
rtnJson
;
}
//获取商户号订单内容
//获取商户号订单内容
if
(
flag
)
{
JSONObject
mchObj
=
WechatPayUtils
.
genenatePay
(
order
);
JSONObject
mchObj
=
WechatPayUtils
.
genenatePay
(
order
);
if
(
mchObj
!=
null
)
{
if
(
mchObj
!=
null
)
{
order
.
setStatus
(
"1"
);
order
.
setStatus
(
"1"
);
order
.
setOrderTime
(
new
Date
());
order
.
setOrderTime
(
new
Date
());
order
.
setOrderAmount
(
orderAmount
);
order
.
setOrderAmount
(
orderAmount
);
order
.
setRemarks
(
mchObj
.
toString
());
order
.
setRemarks
(
mchObj
.
toString
());
boolean
bool
=
this
.
update
(
order
);
boolean
bool
=
this
.
update
(
order
);
if
(
bool
)
{
if
(
bool
)
{
rtnJson
.
put
(
"errorNo"
,
"0"
);
rtnJson
.
put
(
"errorNo"
,
"0"
);
rtnJson
.
put
(
"errorMsg"
,
"确认成功!"
);
rtnJson
.
put
(
"errorMsg"
,
"确认成功!"
);
return
rtnJson
;
return
rtnJson
;
}
}
else
{
//商户号调用失败抛出异常回滚
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
}
}
}
else
{
//商户号调用失败抛出异常回滚
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
}
}
rtnJson
.
put
(
"errorNo"
,
"1"
);
rtnJson
.
put
(
"errorNo"
,
"1"
);
...
@@ -250,8 +245,10 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
...
@@ -250,8 +245,10 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
* @param orderAmount //非三期患者所以购药金额
* @param orderAmount //非三期患者所以购药金额
* 三期患者免费购药,根据身份证号做出限制,每年同一身份证号购买12盒以内的药品,价格自动设为0,如超出12 盒恢复原价。
* 三期患者免费购药,根据身份证号做出限制,每年同一身份证号购买12盒以内的药品,价格自动设为0,如超出12 盒恢复原价。
*/
*/
private
void
calculateAmount
(
Order
order
,
Double
orderAmount
)
{
private
void
calculateAmount
(
Order
order
,
Double
orderAmount
,
Long
num
,
Double
price
)
{
if
(
isThreeUsers
(
order
.
getOpenid
())
>
0
)
{
if
(
isThreeUsers
(
order
.
getOpenid
())
>
0
)
{
BigDecimal
unitP
=
new
BigDecimal
(
price
);
//折扣单价
BigDecimal
nums
=
null
;
//折扣数量
//三期用户
//三期用户
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"d.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"d.del_flag"
,
Constants
.
DEL_FLAG_0
);
...
@@ -259,12 +256,22 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
...
@@ -259,12 +256,22 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
conds
.
equal
(
"d.openid"
,
order
.
getOpenid
());
conds
.
equal
(
"d.openid"
,
order
.
getOpenid
());
conds
.
equal
(
"o.openid"
,
order
.
getOpenid
());
conds
.
equal
(
"o.openid"
,
order
.
getOpenid
());
conds
.
equal
(
"YEAR(d.create_time)"
,
new
Date
().
getYear
());
conds
.
equal
(
"YEAR(d.create_time)"
,
new
Date
().
getYear
());
Integer
number
=
orderDetailsService
.
fetchMemberByYearGoodsNum
(
conds
);
conds
.
equal
(
"d.drugs_id"
,
SystemConfig
.
p
.
getProperty
(
"THREE_GRUGS_ID"
));
conds
.
notEqual
(
"d.order_id"
,
order
.
getId
());
Integer
number
=
orderDetailsService
.
fetchMemberByYearGoodsNum
(
conds
);
//已购药品数据
if
(
number
>=
12
)
{
if
(
number
>=
12
)
{
order
.
setOrderAmount
(
orderAmount
);
order
.
setOrderAmount
(
orderAmount
);
}
else
{
}
else
{
// todo 计算所需金额
int
realNum
=
(
12
-
number
);
//剩余每年免费盒数
order
.
setOrderAmount
(
orderAmount
);
if
(
num
.
intValue
()
<
realNum
)
{
nums
=
new
BigDecimal
(
num
);
}
else
{
nums
=
new
BigDecimal
(
realNum
);
}
BigDecimal
saleAmount
=
unitP
.
multiply
(
nums
);
//三期患者折扣价格
BigDecimal
sumAmount
=
new
BigDecimal
(
orderAmount
);
//订单总价
BigDecimal
realAmount
=
sumAmount
.
subtract
(
saleAmount
);
//实际需支付价格
order
.
setOrderAmount
(
realAmount
.
doubleValue
());
}
}
}
else
{
}
else
{
//非三期用户
//非三期用户
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/web/OrderController.java
View file @
7d0abc50
package
com
.
cftech
.
order
.
web
;
package
com
.
cftech
.
order
.
web
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.cftech.base.codingrule.utils.CodingruleUtils
;
import
com.cftech.base.codingrule.utils.CodingruleUtils
;
...
@@ -12,10 +13,7 @@ import com.cftech.accounts.model.MpAccountsEntity;
...
@@ -12,10 +13,7 @@ import com.cftech.accounts.model.MpAccountsEntity;
import
com.cftech.accounts.service.MpAccountsService
;
import
com.cftech.accounts.service.MpAccountsService
;
import
com.cftech.base.org.api.QyMsgUtil
;
import
com.cftech.base.org.api.QyMsgUtil
;
import
com.cftech.base.org.service.QyuserService
;
import
com.cftech.base.org.service.QyuserService
;
import
com.cftech.order.model.Order
;
import
com.cftech.order.model.*
;
import
com.cftech.order.model.OrderFromVO
;
import
com.cftech.order.model.OrderVO
;
import
com.cftech.order.model.ProductOrder
;
import
com.cftech.order.service.OrderService
;
import
com.cftech.order.service.OrderService
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.scope.OrderType
;
...
@@ -32,6 +30,7 @@ import com.cftech.sys.service.RoleService;
...
@@ -32,6 +30,7 @@ import com.cftech.sys.service.RoleService;
import
com.cftech.sys.service.UserService
;
import
com.cftech.sys.service.UserService
;
import
com.google.zxing.WriterException
;
import
com.google.zxing.WriterException
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringEscapeUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -49,9 +48,7 @@ import java.io.File;
...
@@ -49,9 +48,7 @@ import java.io.File;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.LinkedList
;
import
java.util.List
;
/**
/**
...
@@ -201,14 +198,16 @@ public class OrderController {
...
@@ -201,14 +198,16 @@ public class OrderController {
//提交数据(新增、修改)
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
ORDER_EDIT
)
@RequiresPermissions
(
value
=
ORDER_EDIT
)
@PostMapping
(
value
=
"/formData"
,
produces
=
{
"application/json;charset=utf-8"
}
)
@PostMapping
(
value
=
"/formData"
)
@ResponseBody
@ResponseBody
public
JSONObject
formData
(
HttpServletRequest
request
,
String
datas
)
{
public
JSONObject
formData
(
HttpServletRequest
request
,
String
datas
,
String
orderId
,
String
openid
,
Double
orderAmount
)
{
//解析json字符串
datas
=
StringEscapeUtils
.
unescapeHtml4
(
datas
);
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
jsonObject
=
null
;
JSONObject
jsonObject
=
null
;
try
{
try
{
//是否三期用户,用户购买数量。 计算超出部分金额
//是否三期用户,用户购买数量。 计算超出部分金额
jsonObject
=
orderService
.
saveOrderDetail
(
datas
,
accountsId
);
jsonObject
=
orderService
.
saveOrderDetail
(
datas
,
accountsId
,
orderId
,
openid
,
orderAmount
);
}
catch
(
UnexpectedRollbackException
e
)
{
}
catch
(
UnexpectedRollbackException
e
)
{
if
(
jsonObject
==
null
)
if
(
jsonObject
==
null
)
jsonObject
=
new
JSONObject
();
jsonObject
=
new
JSONObject
();
...
@@ -635,4 +634,43 @@ public class OrderController {
...
@@ -635,4 +634,43 @@ public class OrderController {
rtnJson
.
put
(
"errorNo"
,
"1"
);
rtnJson
.
put
(
"errorNo"
,
"1"
);
return
rtnJson
;
return
rtnJson
;
}
}
/**
* 拆分出库订单,增加批次号
* @param iDisplayStart
* @param iDisplayLength
* @param drugVo
* @param request
* @return
* @throws ParseException
*/
@RequestMapping
(
value
=
"/orderSplit"
)
@ResponseBody
public
JSONObject
orderSplit
(
int
iDisplayStart
,
int
iDisplayLength
,
DrugVo
drugVo
,
HttpServletRequest
request
)
{
JSONObject
rtnJson
=
new
JSONObject
();
if
(
StringUtils
.
isBlank
(
drugVo
.
getDrugs
()))
{
rtnJson
.
put
(
"errorNo"
,
1
);
return
rtnJson
;
}
String
drugs
=
StringEscapeUtils
.
unescapeHtml4
(
drugVo
.
getDrugs
());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
JSONArray
drugArr
=
JSONArray
.
parseArray
(
drugs
);
for
(
int
i
=
0
;
i
<
drugArr
.
size
();
i
++)
{
JSONObject
drugObj
=
drugArr
.
getJSONObject
(
i
);
for
(
int
y
=
0
;
y
<
drugObj
.
getInteger
(
"orderNum"
);
y
++)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"drugCode"
,
drugObj
.
getString
(
"productCode"
));
map
.
put
(
"drugName"
,
drugObj
.
getString
(
"productName"
));
map
.
put
(
"num"
,
1
);
map
.
put
(
"batchNO"
,
""
);
list
.
add
(
map
);
}
}
rtnJson
.
put
(
"iTotalRecords"
,
100
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
100
);
rtnJson
.
put
(
"aaData"
,
list
);
return
rtnJson
;
}
}
}
aidea-modules/reportform-module-web/src/main/webapp/WEB-INF/views/report/outReportlist.html
0 → 100644
View file @
7d0abc50
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Morris chart -->
<link
rel=
"stylesheet"
href=
"plugins/morris/morris.css"
>
<!-- jvectormap -->
<link
rel=
"stylesheet"
href=
"plugins/jvectormap/jquery-jvectormap-1.2.2.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<link
rel=
"stylesheet"
href=
"plugins\bootstrap-fileinput\fileinput.min.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<div
id=
"importExcelDiv"
></div>
<section
class=
"content-header"
>
<h1>
出库报表信息管理
<small>
出库报表信息
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
出库报表信息管理列表
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/report/exportExcel')"
method=
"get"
>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"region"
placeholder=
"大区"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"province"
placeholder=
"省份"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"city"
placeholder=
"城市"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"hospital"
placeholder=
"医院"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"doctorName"
placeholder=
"医生姓名"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"phone"
placeholder=
"用户手机号码"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"drugsNum"
placeholder=
"购买数量"
>
</div>
<div
class=
"col-xs-2"
>
<div
class=
"input-group date"
>
<div
class=
"input-group-addon"
>
<i
class=
"fa fa-calendar"
></i>
</div>
<input
type=
"text"
class=
"form-control pull-right datepicker"
name=
"startPayTime"
placeholder=
"付款开始时间"
readonly=
"readonly"
>
</div>
</div>
<div
class=
"col-xs-2"
>
<div
class=
"input-group date"
>
<div
class=
"input-group-addon"
>
<i
class=
"fa fa-calendar"
></i>
</div>
<input
type=
"text"
class=
"form-control pull-right datepicker"
name=
"endPayTime"
placeholder=
"付款结束时间"
readonly=
"readonly"
>
</div>
</div>
<div
class=
"col-xs-5"
>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
#if($shiro.hasPermission("qy:report:edit"))
<button
type=
"submit"
class=
"btn btn-primary"
>
导出
</button>
#end
</div>
</form>
</div>
<!-- /.box-header -->
<div
class=
"box-body"
>
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
Id
</td>
<th>
大区
</th>
<th>
省份
</th>
<th>
城市
</th>
<th>
销售代表
</th>
<th>
医院
</th>
<th>
科室
</th>
<th>
医生姓名
</th>
<th>
医生职称
</th>
<th>
性别
</th>
<th>
医生手机号码
</th>
<th>
处方医院
</th>
<th>
处方医生
</th>
<th>
咨询单编码
</th>
<th>
需求清单编码
</th>
<th>
用户姓名
</th>
<th>
用户手机号码
</th>
<th>
产品名称
</th>
<th>
购买数量
</th>
<th>
付款时间
</th>
<th>
发货时间
</th>
<th>
收件时间
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<script
src=
"plugins/datepicker/bootstrap-datepicker.js"
></script>
<script
src=
"plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins\bootstrap-fileinput\fileinput.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh2.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
type=
"text/javascript"
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<script
src=
"common/js/cfapp.js"
></script>
<script>
function
formatDates
(
now
)
{
var
now
=
new
Date
(
now
);
var
year
=
now
.
getFullYear
();
var
month
=
now
.
getMonth
()
+
1
;
var
date
=
now
.
getDate
();
var
hour
=
now
.
getHours
();
var
minute
=
now
.
getMinutes
();
var
second
=
now
.
getSeconds
();
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hour
+
":"
+
minute
+
":"
+
second
;
}
function
seachTable
()
{
var
sSource
=
"#springUrl('/a/report/listData')"
;
var
aoData
=
{
iDisplayStart
:
1
,
iDosplayLength
:
10
}
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
$
(
"#seachTableForm input"
).
each
(
function
()
{
var
params
=
{
name
:
$
(
this
).
attr
(
"name"
),
value
:
$
(
this
).
val
()
};
aoData
.
push
(
params
);
})
$
.
ajax
({
"type"
:
"GET"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#table'
).
DataTable
({
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"autoWidth"
:
true
,
"scrollX"
:
true
,
"sScrollY"
:
false
,
"aoColumns"
:
[
{
"mData"
:
"id"
},
{
"mData"
:
"region"
},
{
"mData"
:
"province"
},
{
"mData"
:
"city"
},
{
"mData"
:
"salesRepresent"
},
{
"mData"
:
"hospital"
},
{
"mData"
:
"department"
},
{
"mData"
:
"doctorName"
},
{
"mData"
:
"doctorTitle"
},
{
"mData"
:
"sex"
},
{
"mData"
:
"doctorPhone"
},
{
"mData"
:
"cfHospital"
},
{
"mData"
:
"cfDoctor"
},
{
"mData"
:
"consultNumber"
},
{
"mData"
:
"orderNumber"
},
{
"mData"
:
"userName"
},
{
"mData"
:
"phone"
},
{
"mData"
:
"productName"
},
{
"mData"
:
"drugsNum"
},
{
"mData"
:
"fkTime"
},
{
"mData"
:
"fhTime"
},
{
"mData"
:
"sjTime"
}],
"aoColumnDefs"
:
[
{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"aTargets"
:
[
19
],
"mData"
:
"fkTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
''
||
a
==
null
){
return
""
;
}
else
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
}
},
{
"aTargets"
:
[
20
],
"mData"
:
"fhTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
''
||
a
==
null
){
return
""
;
}
else
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
}
},
{
"aTargets"
:
[
21
],
"mData"
:
"sjTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
''
||
a
==
null
){
return
""
;
}
else
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
}
},
]
});
}
jQuery
(
document
).
ready
(
function
()
{
seachTable
();
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
todayBtn
:
'linked'
,
clearBtn
:
'linked'
});
$
(
'.search'
).
click
(
function
()
{
$
(
"#table"
).
dataTable
().
fnClearTable
();
});
});
Cfapp
.
init
();
function
removeData
(
data
)
{
Cfapp
.
confirm
({
message
:
"确定要删除吗"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
success
:
function
()
{
$
.
ajax
({
type
:
"POST"
,
url
:
"#springUrl('/a/report/delete')"
,
data
:
{
id
:
data
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
Cfapp
.
alert
({
message
:
"删除成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/report/list')"
;
}
});
}
},
error
:
function
()
{
}
})
},
cancel
:
function
()
{
$
(
".modal-backdrop"
).
fadeOut
();
}
});
}
function
importExcel
()
{
var
templateExcelUrl
=
"#springUrl('/a/report/templateExcel')"
;
var
importExcelUrl
=
"#springUrl('/a/report/importExcel')"
;
Cfapp
.
importExcel
({
title
:
'报表信息导入'
,
importurl
:
importExcelUrl
,
templateurl
:
templateExcelUrl
,
cancel
:
function
()
{
},
success
:
function
()
{
}
});
}
</script>
</body>
</html>
aidea-modules/reportform-module/src/main/java/com/cftech/report/dao/ReportMapper.java
View file @
7d0abc50
...
@@ -38,4 +38,17 @@ public interface ReportMapper extends GenericDao<Report> {
...
@@ -38,4 +38,17 @@ public interface ReportMapper extends GenericDao<Report> {
*/
*/
ReportDoctorInfo
selectReportDoctorInfo
(
Map
<
String
,
Object
>
params
);
ReportDoctorInfo
selectReportDoctorInfo
(
Map
<
String
,
Object
>
params
);
/**
* 订单出库报表
* @param params
* @return
*/
List
<
Report
>
fetchSearchByPageOutReport
(
Map
<
String
,
Object
>
params
);
/**
* 订单出库报表统计
* @param params
* @return
*/
Integer
countOutReport
(
Map
<
String
,
Object
>
params
);
}
}
\ No newline at end of file
aidea-modules/reportform-module/src/main/java/com/cftech/report/dao/ReportMapper.xml
View file @
7d0abc50
...
@@ -351,4 +351,30 @@
...
@@ -351,4 +351,30 @@
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
</select>
</select>
<select
id=
"countOutReport"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_report
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPageOutReport"
parameterType=
"java.util.Map"
resultType=
"com.cftech.report.model.OutStoreReport"
>
SELECT
cs.consult_id consultCode,
o.number orderCode,
p.common_name drugName,
p.format grugSku,
sb.drugs_num drugNum,
sb.drugs_batchno drugBatchNo,
w.create_time outStoreDate
FROM t_order_split_batch sb
LEFT JOIN t_order o ON sb.order_id = o.id AND o.del_flag = '0'
LEFT JOIN t_aidea_consult_sheet cs ON cs.order_id = o.id AND cs.del_flag = '0'
LEFT JOIN t_aidea_product p ON p.id = sb.drugs_id AND p.del_flag = '0'
LEFT JOIN t_aidea_waybill w ON o.id = w.order_id AND w.del_flag = '0'
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
</mapper>
</mapper>
\ No newline at end of file
aidea-modules/reportform-module/src/main/java/com/cftech/report/model/OutStoreReport.java
0 → 100644
View file @
7d0abc50
package
com
.
cftech
.
report
.
model
;
import
lombok.Data
;
/**
* 订单出库报表实体类
*/
@Data
public
class
OutStoreReport
{
/* 咨询单编码 */
private
String
consultCode
;
/* 需求清单编码 */
private
String
orderCode
;
/* 药品名称 */
private
String
drugName
;
/* 药品Sku */
private
String
grugSku
;
/* 药品数量 */
private
String
drugNum
;
/* 药品批次号 */
private
String
drugBatchNo
;
/* 出库时间 */
private
String
outStoreDate
;
/* 有效期 */
private
String
takeEffectDate
;
}
aidea-modules/reportform-module/src/main/java/com/cftech/report/service/ReportService.java
View file @
7d0abc50
...
@@ -41,4 +41,21 @@ public interface ReportService extends GenericService<Report> {
...
@@ -41,4 +41,21 @@ public interface ReportService extends GenericService<Report> {
* @return
* @return
*/
*/
ReportDoctorInfo
selectReportDoctorInfo
(
Conds
cond
);
ReportDoctorInfo
selectReportDoctorInfo
(
Conds
cond
);
/**
* 订单出库报表
* @param conds
* @param sort
* @param iDisplayStart
* @param iDisplayLength
* @return
*/
List
<
Report
>
fetchSearchByPageOutReport
(
Conds
conds
,
Sort
sort
,
int
iDisplayStart
,
int
iDisplayLength
);
/**
* 订单出库报表统计
* @param conds
* @return
*/
Integer
countOutReport
(
Conds
conds
);
}
}
aidea-modules/reportform-module/src/main/java/com/cftech/report/service/impl/ReportServiceImpl.java
View file @
7d0abc50
...
@@ -58,4 +58,21 @@ public class ReportServiceImpl extends GenericServiceImpl<Report> implements Rep
...
@@ -58,4 +58,21 @@ public class ReportServiceImpl extends GenericServiceImpl<Report> implements Rep
params
.
put
(
"conds"
,
cond
);
params
.
put
(
"conds"
,
cond
);
return
reportMapper
.
selectReportDoctorInfo
(
params
);
return
reportMapper
.
selectReportDoctorInfo
(
params
);
}
}
@Override
public
List
<
Report
>
fetchSearchByPageOutReport
(
Conds
conds
,
Sort
sort
,
int
page
,
int
pageSize
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"conds"
,
conds
);
params
.
put
(
"offset"
,
page
>
0
?
page
:
0
);
params
.
put
(
"limit"
,
pageSize
>
0
?
pageSize
:
0
);
params
.
put
(
"sort"
,
sort
);
return
reportMapper
.
fetchSearchByPageOutReport
(
params
);
}
@Override
public
Integer
countOutReport
(
Conds
conds
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"conds"
,
conds
);
return
reportMapper
.
countOutReport
(
params
);
}
}
}
\ No newline at end of file
aidea-modules/reportform-module/src/main/java/com/cftech/report/web/OutStoreReportController.java
0 → 100644
View file @
7d0abc50
package
com
.
cftech
.
report
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.report.model.Report
;
import
com.cftech.report.service.ReportService
;
import
com.cftech.sys.security.UserUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.List
;
/**
* 报表信息Controller
* <p>
* 权限字符串说明:
* 查看:public static final String REPORT_VIEW = "qy:report:view"
* 查看:public static final String REPORT_EDIT = "qy:report:edit"
*
* @author Buyj
* @date: 2020-12-02 11:26
*/
@Slf4j
@Controller
@RequestMapping
(
"/a/outReport"
)
public
class
OutStoreReportController
{
public
static
final
String
REPORT_VIEW
=
"qy:outReport:view"
;
public
static
final
String
REPORT_EDIT
=
"qy:outReport:edit"
;
@Autowired
private
ReportService
reportService
;
//列表页面
@RequiresPermissions
(
value
=
REPORT_VIEW
)
@RequestMapping
(
"/list"
)
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
return
"report/outReportlist"
;
}
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
REPORT_VIEW
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Report
report
=
reportService
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
report
);
}
return
"report/outReportform"
;
}
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
REPORT_EDIT
)
@RequestMapping
(
"/formData"
)
@ResponseBody
public
JSONObject
formData
(
Report
report
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
try
{
if
(
report
!=
null
&&
report
.
getId
()
!=
null
)
{
report
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
reportService
.
update
(
report
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
else
{
report
.
setAccountsId
(
accountsId
);
report
.
setDelFlag
(
false
);
report
.
setAccountsId
(
UserUtils
.
getmpaccounts
(
request
));
report
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
report
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
reportService
.
save
(
report
);
rtnJson
.
put
(
"errorNo"
,
2
);
}
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
//获取列表数据
@RequiresPermissions
(
value
=
REPORT_VIEW
)
@RequestMapping
(
value
=
"/listData"
)
@ResponseBody
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Report
report
,
HttpServletRequest
request
,
String
startPayTime
,
String
endPayTime
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
//conds.equal("accounts_id", accountsId);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
DESC
);
List
<
Report
>
list
=
reportService
.
fetchSearchByPageOutReport
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
reportService
.
countOutReport
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
rtnJson
.
put
(
"aaData"
,
list
);
return
rtnJson
;
}
//删除数据
@RequiresPermissions
(
value
=
REPORT_EDIT
)
@RequestMapping
(
"/delete"
)
@ResponseBody
public
JSONObject
delete
(
String
id
)
{
JSONObject
rtnJosn
=
new
JSONObject
();
try
{
reportService
.
delete
(
id
);
rtnJosn
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
rtnJosn
.
put
(
"errorNo"
,
1
);
}
return
rtnJosn
;
}
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
REPORT_VIEW
)
public
void
exportExcel
(
Report
report
,
HttpServletRequest
request
,
String
startPayTime
,
String
endPayTime
,
HttpServletResponse
response
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
if
(!
StringUtils
.
isEmpty
(
report
.
getRegion
())){
conds
.
like
(
"region"
,
report
.
getRegion
());
}
if
(!
StringUtils
.
isEmpty
(
report
.
getProvince
())){
conds
.
like
(
"province"
,
report
.
getProvince
());
}
if
(!
StringUtils
.
isEmpty
(
report
.
getCity
())){
conds
.
like
(
"city"
,
report
.
getCity
());
}
if
(!
StringUtils
.
isEmpty
(
report
.
getHospital
())){
conds
.
like
(
"hospital"
,
report
.
getHospital
());
}
if
(!
StringUtils
.
isEmpty
(
report
.
getDoctorName
())){
conds
.
like
(
"doctor_name"
,
report
.
getDoctorName
());
}
if
(!
StringUtils
.
isEmpty
(
report
.
getPhone
())){
conds
.
like
(
"phone"
,
report
.
getPhone
());
}
if
(!
StringUtils
.
isEmpty
(
report
.
getDrugsNum
())){
conds
.
equal
(
"drugs_num"
,
report
.
getDrugsNum
());
}
if
(!
StringUtils
.
isEmpty
(
startPayTime
)){
conds
.
greatEqual
(
"DATE_FORMAT(fk_time,'%Y-%m-%d')"
,
startPayTime
);
}
if
(!
StringUtils
.
isEmpty
(
endPayTime
)){
conds
.
lessEqual
(
"DATE_FORMAT(fk_time,'%Y-%m-%d')"
,
endPayTime
);
}
List
<
Report
>
list
=
reportService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
Report
.
class
,
response
).
toExcel
(
list
,
"报表信息信息"
);
}
@RequestMapping
(
"/templateExcel"
)
@RequiresPermissions
(
value
=
REPORT_VIEW
)
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ExcelKit
.
$Export
(
Report
.
class
,
response
).
toExcel
(
null
,
"报表信息信息"
);
}
@RequestMapping
(
"/importExcel"
)
@RequiresPermissions
(
value
=
REPORT_EDIT
)
public
String
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
if
(
file
==
null
)
{
return
list
(
request
,
model
);
}
// 构造临时路径来存储上传的文件
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
uploadDir
=
new
File
(
uploadPath
);
if
(!
uploadDir
.
exists
())
{
uploadDir
.
mkdir
();
}
String
fileName
=
file
.
getOriginalFilename
();
String
filePath
=
uploadPath
+
File
.
separator
+
fileName
;
File
storeFile
=
new
File
(
filePath
);
try
{
file
.
transferTo
(
storeFile
);
ExcelKit
.
$Import
().
setEmptyCellValue
(
""
).
readExcel
(
storeFile
,
rowData
->
{
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
0
)))
{
Report
report
=
new
Report
();
report
.
setAccountsId
(
accountId
);
reportService
.
save
(
report
);
}
});
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
());
}
return
list
(
request
,
model
);
}
}
aidea-modules/reportform-module/src/main/java/com/cftech/report/web/ReportController.java
View file @
7d0abc50
...
@@ -9,7 +9,6 @@ import com.cftech.core.sql.Conds;
...
@@ -9,7 +9,6 @@ import com.cftech.core.sql.Conds;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.core.util.Constants
;
import
com.cftech.report.service.ReportService
;
import
com.cftech.report.service.ReportService
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
com.cftech.sys.security.UserUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
...
@@ -228,7 +227,7 @@ public class ReportController {
...
@@ -228,7 +227,7 @@ public class ReportController {
if
(
file
==
null
)
{
if
(
file
==
null
)
{
return
list
(
request
,
model
);
return
list
(
request
,
model
);
}
}
// 构造临时路径来存储上传的文件
// 构造临时路径来存储上传的文件
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
uploadDir
=
new
File
(
uploadPath
);
File
uploadDir
=
new
File
(
uploadPath
);
if
(!
uploadDir
.
exists
())
{
if
(!
uploadDir
.
exists
())
{
...
...
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/service/impl/WaybillServiceImpl.java
View file @
7d0abc50
...
@@ -11,6 +11,7 @@ import com.cftech.core.util.SystemConfig;
...
@@ -11,6 +11,7 @@ import com.cftech.core.util.SystemConfig;
import
com.cftech.order.model.Order
;
import
com.cftech.order.model.Order
;
import
com.cftech.order.service.OrderService
;
import
com.cftech.order.service.OrderService
;
import
com.cftech.orderdetail.model.OrderDetails
;
import
com.cftech.orderdetail.model.OrderDetails
;
import
com.cftech.orderdetail.model.OrderSplitBatchDto
;
import
com.cftech.orderdetail.service.OrderDetailsService
;
import
com.cftech.orderdetail.service.OrderDetailsService
;
import
com.cftech.sys.model.User
;
import
com.cftech.sys.model.User
;
import
com.cftech.sys.security.UserUtils
;
import
com.cftech.sys.security.UserUtils
;
...
@@ -22,6 +23,7 @@ import com.cftech.core.generic.GenericServiceImpl;
...
@@ -22,6 +23,7 @@ import com.cftech.core.generic.GenericServiceImpl;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.waybill.utils.*
;
import
com.cftech.waybill.utils.*
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringEscapeUtils
;
import
org.apache.http.message.BasicNameValuePair
;
import
org.apache.http.message.BasicNameValuePair
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
...
@@ -76,6 +78,7 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
...
@@ -76,6 +78,7 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
JSONObject
retObj
=
new
JSONObject
();
JSONObject
retObj
=
new
JSONObject
();
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
User
user
=
UserUtils
.
getUser
();
User
user
=
UserUtils
.
getUser
();
datas
=
StringEscapeUtils
.
unescapeHtml4
(
datas
);
try
{
try
{
if
(
orderId
==
null
)
{
if
(
orderId
==
null
)
{
retObj
.
put
(
"errorNo"
,
1
);
retObj
.
put
(
"errorNo"
,
1
);
...
@@ -129,6 +132,8 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
...
@@ -129,6 +132,8 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
waybill
.
setAddress
(
address
.
getAddress
());
waybill
.
setAddress
(
address
.
getAddress
());
waybill
.
setAddressId
(
String
.
valueOf
(
order
.
getAddressId
()));
waybill
.
setAddressId
(
String
.
valueOf
(
order
.
getAddressId
()));
//接口调用数据
//接口调用数据
JSONObject
msgDataObj
=
ExpressOrderInfoUtils
.
generateWaybillOrder
(
order
,
odets
,
waybill
);
JSONObject
msgDataObj
=
ExpressOrderInfoUtils
.
generateWaybillOrder
(
order
,
odets
,
waybill
);
Long
timestamp
=
System
.
currentTimeMillis
();
//时间戳
Long
timestamp
=
System
.
currentTimeMillis
();
//时间戳
...
@@ -181,23 +186,38 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
...
@@ -181,23 +186,38 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
//更新出库批次号
//更新出库批次号
if
(
StringUtils
.
isNoneBlank
(
datas
)
&&
JSONObject
.
parseArray
(
datas
).
size
()
>
0
)
{
if
(
StringUtils
.
isNoneBlank
(
datas
)
&&
JSONObject
.
parseArray
(
datas
).
size
()
>
0
)
{
JSONArray
arr
=
JSONObject
.
parseArray
(
datas
);
Conds
orderDesConds
=
new
Conds
();
JSONArray
arr
=
JSONObject
.
parseArray
(
datas
);
orderDesConds
.
equal
(
"d.del_flag"
,
Constants
.
DEL_FLAG_0
);
for
(
int
i
=
0
;
i
<
arr
.
size
();
i
++)
{
orderDesConds
.
equal
(
"d.order_id"
,
orderId
);
JSONObject
drugs
=
arr
.
getJSONObject
(
i
);
List
<
OrderDetails
>
orderDetailsList
=
orderDetailsService
.
fetchSearchByPage
(
orderDesConds
,
null
,
0
,
0
);
OrderSplitBatchDto
orderSplitBatchDto
=
new
OrderSplitBatchDto
();
for
(
OrderDetails
orderDetails
:
orderDetailsList
)
{
orderSplitBatchDto
.
setOrderId
(
order
.
getId
());
for
(
int
i
=
0
;
i
<
arr
.
size
();
i
++)
{
orderSplitBatchDto
.
setOrderCode
(
order
.
getNumber
());
JSONObject
obj
=
arr
.
getJSONObject
(
i
);
orderSplitBatchDto
.
setDrugsBatchNo
(
drugs
.
getString
(
"batchNo"
));
if
(
StringUtils
.
equals
(
orderDetails
.
getDrugsCode
(),
obj
.
getString
(
"productCode"
)))
{
orderSplitBatchDto
.
setDrugsName
(
drugs
.
getString
(
"drugName"
));
orderDetails
.
setDrugsName
(
obj
.
getString
(
"productName"
));
orderSplitBatchDto
.
setDrugsCode
(
drugs
.
getString
(
"drugCode"
));
orderDetails
.
setDrugsMateriel
(
obj
.
getString
(
"batchNo"
));
orderSplitBatchDto
.
setDrugsNum
(
drugs
.
getLong
(
"num"
));
orderDetailsService
.
update
(
orderDetails
);
orderSplitBatchDto
.
setOpenid
(
order
.
getOpenid
());
continue
;
}
orderDetailsService
.
saveDrugBatchNo
(
orderSplitBatchDto
);
}
}
}
//
// Conds orderDesConds = new Conds();
// orderDesConds.equal("d.del_flag", Constants.DEL_FLAG_0);
// orderDesConds.equal("d.order_id", orderId);
// List<OrderDetails> orderDetailsList = orderDetailsService.fetchSearchByPage(orderDesConds, null, 0, 0);
// for (OrderDetails orderDetails : orderDetailsList) {
// for (int i=0; i< arr.size(); i++) {
// JSONObject obj = arr.getJSONObject(i);
// if (StringUtils.equals(orderDetails.getDrugsCode(), obj.getString("productCode"))) {
// orderDetails.setDrugsName(obj.getString("productName"));
// orderDetails.setDrugsMateriel(obj.getString("batchNo"));
// orderDetailsService.update(orderDetails);
// continue;
// }
// }
// }
}
}
waybillMapper
.
save
(
waybill
);
waybillMapper
.
save
(
waybill
);
...
...
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/utils/ExpressOrderInfoUtils.java
View file @
7d0abc50
...
@@ -158,11 +158,18 @@ public class ExpressOrderInfoUtils {
...
@@ -158,11 +158,18 @@ public class ExpressOrderInfoUtils {
//waybill.put("isReturnRoutelabel", "0");//是否返回路由标签: 默认0, 1:返回路由标签, 0:不返回
//waybill.put("isReturnRoutelabel", "0");//是否返回路由标签: 默认0, 1:返回路由标签, 0:不返回
//waybill.put("podModelAddress", "url");//签单返回范本地址
//waybill.put("podModelAddress", "url");//签单返回范本地址
//增值服务
签收口令
//增值服务
JSONArray
serviceArray
=
new
JSONArray
();
JSONArray
serviceArray
=
new
JSONArray
();
//签收口令
JSONObject
serviceObj
=
new
JSONObject
();
JSONObject
serviceObj
=
new
JSONObject
();
serviceObj
.
put
(
"name"
,
"IN59"
);
serviceObj
.
put
(
"name"
,
"IN59"
);
serviceArray
.
add
(
serviceObj
);
serviceArray
.
add
(
serviceObj
);
//保价服务
JSONObject
servicePrice
=
new
JSONObject
();
servicePrice
.
put
(
"name"
,
"INSURE"
);
servicePrice
.
put
(
"value"
,
"500"
);
serviceArray
.
add
(
servicePrice
);
waybill
.
put
(
"serviceList"
,
serviceArray
);
waybill
.
put
(
"serviceList"
,
serviceArray
);
//特殊需求药品,需冷冻、冷藏
//特殊需求药品,需冷冻、冷藏
...
...
cftech-common-web/src/main/resources/common-test.properties
View file @
7d0abc50
...
@@ -49,6 +49,10 @@ userfiles.imagedir=/mydata/wechatImage
...
@@ -49,6 +49,10 @@ userfiles.imagedir=/mydata/wechatImage
#\u75C5\u8F7D\u6838\u9500\u4E8C\u7EF4\u7801
#\u75C5\u8F7D\u6838\u9500\u4E8C\u7EF4\u7801
userfiles.qrcodedir
=
/mydata/fileQrcode
userfiles.qrcodedir
=
/mydata/fileQrcode
#\u4E09\u671F\u60A3\u8005\u6298\u6263\u836F\u54C1id
THREE_DRUGS_ID
=
24
#\u56FE\u7247\u8BBF\u95EE\u5730\u5740
#\u56FE\u7247\u8BBF\u95EE\u5730\u5740
IMAGEURL
=
/aidea/mobile/qybase/showPic?picFileName={PICFILENAME}
IMAGEURL
=
/aidea/mobile/qybase/showPic?picFileName={PICFILENAME}
#\u4E8C\u7EF4\u7801\u8BBF\u95EE\u8DEF\u5F84
#\u4E8C\u7EF4\u7801\u8BBF\u95EE\u8DEF\u5F84
...
@@ -61,7 +65,7 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog
...
@@ -61,7 +65,7 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog
#\u6821\u9A8C\u5151\u6362\u5BC6\u7801KEY
#\u6821\u9A8C\u5151\u6362\u5BC6\u7801KEY
MEMBER_PASSWORD_KEY
=
DONGCHANGINT9527;
MEMBER_PASSWORD_KEY
=
DONGCHANGINT9527;
list.refreshtoken
=
true
list.refreshtoken
=
true
jwt.domain
=
pd.shxrtech.com
jwt.domain
=
localhost
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
jwt.duration
=
86400000
jwt.duration
=
86400000
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue
...
...
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