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
0d4e670e
Commit
0d4e670e
authored
Jan 19, 2022
by
sunc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改线下出库
parent
04109897
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
263 additions
and
4 deletions
+263
-4
OrderDetailsMapper.java
...n/java/com/cftech/orderdetail/dao/OrderDetailsMapper.java
+7
-0
OrderDetailsMapper.xml
...in/java/com/cftech/orderdetail/dao/OrderDetailsMapper.xml
+8
-0
OrderDetailsService.java
...a/com/cftech/orderdetail/service/OrderDetailsService.java
+7
-0
OrderDetailsServiceImpl.java
...ech/orderdetail/service/impl/OrderDetailsServiceImpl.java
+5
-0
orderform.html
...le-web/src/main/webapp/WEB-INF/views/order/orderform.html
+0
-1
orderlistout.html
...web/src/main/webapp/WEB-INF/views/order/orderlistout.html
+2
-0
OrderMapper.java
...odule/src/main/java/com/cftech/order/dao/OrderMapper.java
+14
-0
OrderMapper.xml
...module/src/main/java/com/cftech/order/dao/OrderMapper.xml
+117
-0
OrderFromVO.java
...ule/src/main/java/com/cftech/order/model/OrderFromVO.java
+1
-1
OrderService.java
.../src/main/java/com/cftech/order/service/OrderService.java
+7
-0
OrderServiceImpl.java
.../java/com/cftech/order/service/impl/OrderServiceImpl.java
+48
-2
OrderController.java
...e/src/main/java/com/cftech/order/web/OrderController.java
+46
-0
WaybillServiceImpl.java
...a/com/cftech/waybill/service/impl/WaybillServiceImpl.java
+1
-0
No files found.
aidea-modules/order-detail-module/src/main/java/com/cftech/orderdetail/dao/OrderDetailsMapper.java
View file @
0d4e670e
...
@@ -35,4 +35,11 @@ public interface OrderDetailsMapper extends GenericDao<OrderDetails> {
...
@@ -35,4 +35,11 @@ public interface OrderDetailsMapper extends GenericDao<OrderDetails> {
* @return
* @return
*/
*/
List
<
OrderSplitBatchDto
>
fetchSearchByBatchDrug
(
Map
<
String
,
Object
>
params
);
List
<
OrderSplitBatchDto
>
fetchSearchByBatchDrug
(
Map
<
String
,
Object
>
params
);
/**
* 根据订单id查询订单明细批次号
* @param orderId
* @return
*/
OrderSplitBatchDto
getDetailsByOrderId
(
Long
orderId
);
}
}
\ No newline at end of file
aidea-modules/order-detail-module/src/main/java/com/cftech/orderdetail/dao/OrderDetailsMapper.xml
View file @
0d4e670e
...
@@ -282,4 +282,12 @@
...
@@ -282,4 +282,12 @@
ORDER BY t.drugs_id DESC, t.create_time DESC
ORDER BY t.drugs_id DESC, t.create_time DESC
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
</select>
<select
id=
"getDetailsByOrderId"
parameterType=
"java.lang.Long"
resultType=
"com.cftech.orderdetail.model.OrderSplitBatchDto"
>
SELECT o.id orderId,o.number orderCode,o.openid openid,t.id drugsId,
t.product_number drugsCode,t.common_name drugsName,o.accounts_id accountsId FROM t_order o
LEFT JOIN t_order_details d ON o.id = d.order_id
LEFT JOIN t_aidea_product t ON d.drugs_id = t.id
WHERE o.id = #{orderId} LIMIT 0,1
</select>
</mapper>
</mapper>
\ No newline at end of file
aidea-modules/order-detail-module/src/main/java/com/cftech/orderdetail/service/OrderDetailsService.java
View file @
0d4e670e
...
@@ -47,4 +47,11 @@ public interface OrderDetailsService extends GenericService<OrderDetails> {
...
@@ -47,4 +47,11 @@ public interface OrderDetailsService extends GenericService<OrderDetails> {
* @return
* @return
*/
*/
List
<
OrderSplitBatchDto
>
fetchSearchByBatchDrug
(
Conds
conds
,
Sort
sort
,
int
page
,
int
pageSize
);
List
<
OrderSplitBatchDto
>
fetchSearchByBatchDrug
(
Conds
conds
,
Sort
sort
,
int
page
,
int
pageSize
);
/**
* 根据订单id查询订单明细批次号
* @param orderId
* @return
*/
OrderSplitBatchDto
getDetailsByOrderId
(
Long
orderId
);
}
}
aidea-modules/order-detail-module/src/main/java/com/cftech/orderdetail/service/impl/OrderDetailsServiceImpl.java
View file @
0d4e670e
...
@@ -70,4 +70,9 @@ public class OrderDetailsServiceImpl extends GenericServiceImpl<OrderDetails> im
...
@@ -70,4 +70,9 @@ public class OrderDetailsServiceImpl extends GenericServiceImpl<OrderDetails> im
params
.
put
(
"sort"
,
sort
);
params
.
put
(
"sort"
,
sort
);
return
orderDetailsMapper
.
fetchSearchByBatchDrug
(
params
);
return
orderDetailsMapper
.
fetchSearchByBatchDrug
(
params
);
}
}
@Override
public
OrderSplitBatchDto
getDetailsByOrderId
(
Long
orderId
)
{
return
orderDetailsMapper
.
getDetailsByOrderId
(
orderId
);
}
}
}
\ No newline at end of file
aidea-modules/order-module-web/src/main/webapp/WEB-INF/views/order/orderform.html
View file @
0d4e670e
...
@@ -382,7 +382,6 @@
...
@@ -382,7 +382,6 @@
goodsList
=
JSON
.
parse
(
res
.
data
);
goodsList
=
JSON
.
parse
(
res
.
data
);
if
(
isView
==
"true"
)
{
//查看
if
(
isView
==
"true"
)
{
//查看
let
details
=
`$!{list}`
;
let
details
=
`$!{list}`
;
console
.
log
(
details
);
if
(
details
!=
null
&&
details
!=
''
&&
details
!=
'[]'
)
{
if
(
details
!=
null
&&
details
!=
''
&&
details
!=
'[]'
)
{
let
arr
=
JSON
.
parse
(
details
);
let
arr
=
JSON
.
parse
(
details
);
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
...
...
aidea-modules/order-module-web/src/main/webapp/WEB-INF/views/order/orderlistout.html
View file @
0d4e670e
...
@@ -383,9 +383,11 @@
...
@@ -383,9 +383,11 @@
html
+=
'<a data-action="view" class="btn green" href="#springUrl("/a/order/findorderDetail?id='
+
a
+
'&isDetail=y")">查看清单明细</a>'
;
html
+=
'<a data-action="view" class="btn green" href="#springUrl("/a/order/findorderDetail?id='
+
a
+
'&isDetail=y")">查看清单明细</a>'
;
if
(
c
.
status
==
'2'
)
{
//待发货才可以出库操作
if
(
c
.
status
==
'2'
)
{
//待发货才可以出库操作
html
+=
'<a data-action="remove" class="btn red" href="#springUrl("/a/order/sendOut?pageType=Edit&id='
+
a
+
'")">订单出库</a>'
;
html
+=
'<a data-action="remove" class="btn red" href="#springUrl("/a/order/sendOut?pageType=Edit&id='
+
a
+
'")">订单出库</a>'
;
html
+=
'<a data-action="remove" class="btn red" href="#springUrl("/a/order/offlineOrder?pageType=Edit&id='
+
a
+
'")">线下出库</a>'
;
}
}
if
(
c
.
status
==
'3'
||
c
.
status
==
'4'
)
{
//
if
(
c
.
status
==
'3'
||
c
.
status
==
'4'
)
{
//
html
+=
'<a data-action="view" class="btn green" href="#springUrl("/a/order/sendOut?pageType=View&id='
+
a
+
'")">订单出库详情</a>'
;
html
+=
'<a data-action="view" class="btn green" href="#springUrl("/a/order/sendOut?pageType=View&id='
+
a
+
'")">订单出库详情</a>'
;
// html += '
<
a
data
-
action
=
"remove"
class
=
"btn red"
href
=
"#springUrl("
/
a
/
order
/
offlineOrder
?
pageType
=
View
&
id
=
' + a + '
")"
>
线下出库详情
<
/a>'
;
}
}
html
+=
'#end'
;
html
+=
'#end'
;
return
html
;
return
html
;
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/dao/OrderMapper.java
View file @
0d4e670e
...
@@ -104,4 +104,18 @@ public interface OrderMapper extends GenericDao<Order> {
...
@@ -104,4 +104,18 @@ public interface OrderMapper extends GenericDao<Order> {
* @return
* @return
*/
*/
BigDecimal
findUserDrugsPatientsSum
(
String
openid
);
BigDecimal
findUserDrugsPatientsSum
(
String
openid
);
/**
* 保存线下出库单
* @param offlineOrder
* @return
*/
Integer
saveOfflineOrder
(
OfflineOrder
offlineOrder
);
/**
* 生成物流单
* @param waybillDto
* @return
*/
Integer
saveWaybill
(
WaybillDto
waybillDto
);
}
}
\ No newline at end of file
aidea-modules/order-module/src/main/java/com/cftech/order/dao/OrderMapper.xml
View file @
0d4e670e
...
@@ -193,6 +193,40 @@
...
@@ -193,6 +193,40 @@
update t_order_details set del_flag=1 where id=#{id}
update t_order_details set del_flag=1 where id=#{id}
</update>
</update>
<insert
id=
"saveOfflineOrder"
parameterType=
"com.cftech.order.model.OfflineOrder"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_offline_order
(
`waybill_no`,
`consult_id`,
`order_id`,
`contact`,
`mobile`,
`status`,
`temperature_range`,
`storage_manage`,
`send_express_date`,
`accept_express_date`,
`batch_num`,
`drugs_num`
)
values
(
#{waybillNo, jdbcType=VARCHAR},
#{consultId, jdbcType=VARCHAR},
#{orderId, jdbcType=VARCHAR},
#{contact, jdbcType=VARCHAR},
#{mobile, jdbcType=VARCHAR},
#{status, jdbcType=VARCHAR},
#{temperatureRange, jdbcType=VARCHAR},
#{storageManage, jdbcType=VARCHAR},
#{sendExpressDate, jdbcType=TIMESTAMP},
#{acceptExpressDate, jdbcType=TIMESTAMP},
#{batchNum, jdbcType=VARCHAR},
#{drugsNum, jdbcType=BIGINT}
)
</insert>
<select
id=
"fetchId"
parameterType=
"java.lang.Long"
resultType=
"com.cftech.order.model.OrderFromVO"
>
<select
id=
"fetchId"
parameterType=
"java.lang.Long"
resultType=
"com.cftech.order.model.OrderFromVO"
>
SELECT
SELECT
...
@@ -209,6 +243,7 @@
...
@@ -209,6 +243,7 @@
o.create_time AS createTime,
o.create_time AS createTime,
o.confirm,
o.confirm,
o.courier_number AS courierNumber,
o.courier_number AS courierNumber,
cs.consult_id AS consultCode,
o.address_des AS addressDes,
o.address_des AS addressDes,
o.openid,
o.openid,
o.remarks,
o.remarks,
...
@@ -221,6 +256,7 @@
...
@@ -221,6 +256,7 @@
qyu.name storageManageName
qyu.name storageManageName
from
from
t_order o
t_order o
LEFT JOIN t_aidea_consult_sheet cs ON o.consult_id = cs.id
LEFT JOIN t_shipping_address s ON o.address_id = s.id
LEFT JOIN t_shipping_address s ON o.address_id = s.id
LEFT JOIN t_aidea_waybill aw ON o.id = aw.order_id
LEFT JOIN t_aidea_waybill aw ON o.id = aw.order_id
LEFT JOIN user u ON u.id = aw.storage_manage
LEFT JOIN user u ON u.id = aw.storage_manage
...
@@ -744,4 +780,85 @@
...
@@ -744,4 +780,85 @@
t_order t
t_order t
WHERE t.del_flag = 0 AND t.openid = #{openid}
WHERE t.del_flag = 0 AND t.openid = #{openid}
</select>
</select>
<sql
id=
"insertSqlColumns"
>
consult_id,
order_id,
number,
member_id,
open_id,
storage_manage,
waybill_no,
language,
monthly_card,
express_type_id,
temperature_range,
contact,
mobile,
province,
city,
county,
address,
address_id,
send_express_date,
accept_express_date,
waybill_remark,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by,
route_des,
filter_result,
dest_code,
origin_code
</sql>
<insert
id=
"saveWaybill"
parameterType=
"com.cftech.order.model.WaybillDto"
useGeneratedKeys=
"true"
>
insert into t_aidea_waybill
(
<include
refid=
"insertSqlColumns"
/>
)
values
(
#{consultId, jdbcType=BIGINT},
#{orderId, jdbcType=BIGINT},
#{number, jdbcType=VARCHAR},
#{memberId, jdbcType=VARCHAR},
#{openId, jdbcType=VARCHAR},
#{storageManage, jdbcType=VARCHAR},
#{waybillNo, jdbcType=VARCHAR},
#{language, jdbcType=VARCHAR},
#{monthlyCard, jdbcType=VARCHAR},
#{expressTypeId, jdbcType=VARCHAR},
#{temperatureRange, jdbcType=VARCHAR},
#{contact, jdbcType=VARCHAR},
#{mobile, jdbcType=VARCHAR},
#{province, jdbcType=VARCHAR},
#{city, jdbcType=VARCHAR},
#{county, jdbcType=VARCHAR},
#{address, jdbcType=VARCHAR},
#{addressId, jdbcType=VARCHAR},
#{sendExpressDate, jdbcType=TIMESTAMP},
#{acceptExpressDate, jdbcType=TIMESTAMP},
#{waybillRemark, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
now(),
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT},
#{routeDes, jdbcType=VARCHAR},
#{filterResult, jdbcType=VARCHAR},
#{destCode, jdbcType=VARCHAR},
#{originCode, jdbcType=VARCHAR}
)
</insert>
</mapper>
</mapper>
\ No newline at end of file
aidea-modules/order-module/src/main/java/com/cftech/order/model/OrderFromVO.java
View file @
0d4e670e
...
@@ -44,6 +44,6 @@ public class OrderFromVO {
...
@@ -44,6 +44,6 @@ public class OrderFromVO {
private
String
acceptExpressDateStr
;
private
String
acceptExpressDateStr
;
private
String
payTime
;
private
String
payTime
;
private
String
storageManageName
;
private
String
storageManageName
;
private
String
consultCode
;
/* 咨询单编码 */
}
}
aidea-modules/order-module/src/main/java/com/cftech/order/service/OrderService.java
View file @
0d4e670e
...
@@ -136,4 +136,11 @@ public interface OrderService extends GenericService<Order> {
...
@@ -136,4 +136,11 @@ public interface OrderService extends GenericService<Order> {
*/
*/
String
findOrderPayParams
(
String
openId
,
String
appId
,
String
prepayId
);
String
findOrderPayParams
(
String
openId
,
String
appId
,
String
prepayId
);
/**
* 线下出库保存
* @param datas
* @return
*/
JSONObject
saveOfflineOrder
(
String
datas
,
HttpServletRequest
request
);
}
}
aidea-modules/order-module/src/main/java/com/cftech/order/service/impl/OrderServiceImpl.java
View file @
0d4e670e
package
com
.
cftech
.
order
.
service
.
impl
;
package
com
.
cftech
.
order
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.druid.support.json.JSONUtils
;
import
com.alibaba.druid.support.json.JSONUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
...
@@ -33,17 +36,20 @@ import com.cftech.core.sql.Conds;
...
@@ -33,17 +36,20 @@ import com.cftech.core.sql.Conds;
import
com.cftech.order.utils.InvoiceUtil
;
import
com.cftech.order.utils.InvoiceUtil
;
import
com.cftech.orderdetail.dao.OrderDetailsMapper
;
import
com.cftech.orderdetail.dao.OrderDetailsMapper
;
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.prescription.model.Prescription
;
import
com.cftech.prescription.model.Prescription
;
import
com.cftech.prescription.service.PrescriptionService
;
import
com.cftech.prescription.service.PrescriptionService
;
import
com.cftech.product.model.Product
;
import
com.cftech.product.model.Product
;
import
com.cftech.product.service.ProductService
;
import
com.cftech.product.service.ProductService
;
import
com.cftech.sys.security.UserUtils
;
import
com.cftech.wechat.pay.WechatPayUtils
;
import
com.cftech.wechat.pay.WechatPayUtils
;
import
javafx.scene.control.TableColumn
;
import
javafx.scene.control.TreeTableColumn
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringEscapeUtils
;
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
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.NoTransactionException
;
import
org.springframework.transaction.NoTransactionException
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -765,6 +771,46 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
...
@@ -765,6 +771,46 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
return
retObj
.
toString
();
return
retObj
.
toString
();
}
}
@Override
public
JSONObject
saveOfflineOrder
(
String
datas
,
HttpServletRequest
request
)
{
JSONObject
jsonObject
=
new
JSONObject
();
OfflineOrder
offlineOrder
=
serializeToBean
(
datas
);
Integer
integer
=
orderMapper
.
saveOfflineOrder
(
offlineOrder
);
//更新订单状态
this
.
updateStatus
(
offlineOrder
.
getOrderId
(),
offlineOrder
.
getStatus
(),
"线下发货"
);
//生成物流单
WaybillDto
waybillDto
=
new
WaybillDto
();
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
BeanUtil
.
copyProperties
(
offlineOrder
,
waybillDto
);
waybillDto
.
setDelFlag
(
false
);
waybillDto
.
setAccountsId
(
accountsId
);
waybillDto
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
waybillDto
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
waybillDto
.
setOpenId
(
offlineOrder
.
getOpenId
());
waybillDto
.
setNumber
(
codingruleUtils
.
getNumber
(
accountsId
,
"com.cftech.waybill.model.Waybill"
));
waybillDto
.
setCreateTime
(
offlineOrder
.
getSendExpressDate
());
waybillDto
.
setUpdateTime
(
DateUtil
.
date
());
orderMapper
.
saveWaybill
(
waybillDto
);
//生成订单明细表(批次号)
OrderSplitBatchDto
orderSplitBatch
=
orderDetailsService
.
getDetailsByOrderId
(
offlineOrder
.
getOrderId
());
orderSplitBatch
.
setDrugsNum
(
offlineOrder
.
getDrugsNum
());
orderSplitBatch
.
setDrugsBatchNo
(
offlineOrder
.
getBatchNum
());
orderSplitBatch
.
setCreateTime
(
offlineOrder
.
getSendExpressDate
());
orderSplitBatch
.
setUpdateTime
(
DateUtil
.
date
());
orderDetailsService
.
saveDrugBatchNo
(
orderSplitBatch
);
jsonObject
.
put
(
"errorNo"
,
"0"
);
if
(
integer
<
0
)
{
jsonObject
.
put
(
"errorNo"
,
"1"
);
}
return
jsonObject
;
}
public
OfflineOrder
serializeToBean
(
String
datas
){
datas
=
StringEscapeUtils
.
unescapeHtml4
(
datas
).
replace
(
"+"
,
" "
);
OfflineOrder
offlineOrder
=
JSONUtil
.
toBean
(
JSONUtil
.
parseObj
(
datas
),
OfflineOrder
.
class
);
return
offlineOrder
;
}
@Override
@Override
public
boolean
sendQyWechatMassage
(
Long
orderId
,
String
msgType
)
{
public
boolean
sendQyWechatMassage
(
Long
orderId
,
String
msgType
)
{
Long
accounts
=
Long
.
parseLong
(
SystemConfig
.
p
.
getProperty
(
"QY_SEND_APPID"
));
Long
accounts
=
Long
.
parseLong
(
SystemConfig
.
p
.
getProperty
(
"QY_SEND_APPID"
));
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/web/OrderController.java
View file @
0d4e670e
...
@@ -43,6 +43,7 @@ import org.springframework.transaction.UnexpectedRollbackException;
...
@@ -43,6 +43,7 @@ import org.springframework.transaction.UnexpectedRollbackException;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -204,6 +205,51 @@ public class OrderController {
...
@@ -204,6 +205,51 @@ public class OrderController {
return
"order/orderSendOut"
;
return
"order/orderSendOut"
;
}
}
//线下出库页面
@RequiresPermissions
(
value
=
ORDER_VIEW
)
@RequestMapping
(
"/offlineOrder"
)
public
String
sendOutConfirm
(
HttpServletRequest
request
,
String
id
,
Model
model
,
String
pageType
)
{
if
(
StringUtils
.
isNoneBlank
(
id
))
{
OrderFromVO
orderFromVO
=
orderService
.
fetchId
(
id
);
//JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(orderFromVO));
JSONObject
jsonObject
=
new
JSONObject
();
User
user
=
UserUtils
.
getUser
();
jsonObject
.
put
(
"consultId"
,
orderFromVO
.
getConsultId
());
jsonObject
.
put
(
"consultSheetCode"
,
orderFromVO
.
getConsultCode
());
jsonObject
.
put
(
"orderId"
,
id
);
jsonObject
.
put
(
"orderCode"
,
orderFromVO
.
getNumber
());
jsonObject
.
put
(
"storageManage"
,
user
.
getId
());
jsonObject
.
put
(
"storageManageName"
,
user
.
getUsername
());
jsonObject
.
put
(
"openId"
,
orderFromVO
.
getOpenid
());
model
.
addAttribute
(
"data"
,
jsonObject
);
}
model
.
addAttribute
(
"pageType"
,
StringUtils
.
equals
(
pageType
,
"View"
)
?
true
:
false
);
return
"order/offlineOrder"
;
}
//线下出库保存
@RequiresPermissions
(
value
=
ORDER_EDIT
)
@PostMapping
(
value
=
"/saveOfflineOrder"
)
@ResponseBody
public
JSONObject
saveOfflineOrder
(
String
datas
,
HttpServletRequest
request
)
{
//解析json字符串
JSONObject
jsonObject
=
null
;
try
{
jsonObject
=
orderService
.
saveOfflineOrder
(
datas
,
request
);
}
catch
(
UnexpectedRollbackException
e
)
{
if
(
jsonObject
==
null
)
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"errorNo"
,
1
);
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
if
(
jsonObject
==
null
)
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"errorNo"
,
1
);
e
.
printStackTrace
();
}
return
jsonObject
;
}
@RequestMapping
(
"/fromProduct"
)
@RequestMapping
(
"/fromProduct"
)
@ResponseBody
@ResponseBody
public
JSONObject
fromProduct
()
{
public
JSONObject
fromProduct
()
{
...
...
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/service/impl/WaybillServiceImpl.java
View file @
0d4e670e
...
@@ -29,6 +29,7 @@ import org.apache.commons.lang3.StringEscapeUtils;
...
@@ -29,6 +29,7 @@ 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
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
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