Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
郑小冰
/
orthopedics
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f0f769aa
authored
Oct 31, 2019
by
肖洋洋
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://git.papagostore.com/ice/orthopedics
parents
8dab0a00
69db51ad
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
224 additions
and
2 deletions
src/main/java/orthopedics/controller/bookcity/PurRequisitionController.java
src/main/java/orthopedics/controller/bookcity/StockTransferController.java
src/main/java/orthopedics/controller/bookcity/WshShipmentController.java
src/main/java/orthopedics/model/JSONArrayModel.java
src/main/java/orthopedics/service/PurOrderHeaderService.java
src/main/java/orthopedics/service/TransferService.java
src/main/java/orthopedics/controller/bookcity/PurRequisitionController.java
View file @
f0f769aa
...
...
@@ -128,6 +128,7 @@ public class PurRequisitionController {
**/
@RequestMapping
(
path
=
"/add"
,
method
=
RequestMethod
.
POST
)
public
Result
add
(
@RequestBody
PurRequisitionPage
purRequisitionPage
,
@RequestParam
(
value
=
"token"
)
String
token
,
@RequestParam
(
value
=
"headerStatus"
,
required
=
false
)
String
headerStatus
)
{
//判断想要下推生成采购申请单的状态是否为已审批
if
(!
"approval"
.
equals
(
headerStatus
)
&&
!
"completed"
.
equals
(
headerStatus
))
{
...
...
@@ -164,10 +165,12 @@ public class PurRequisitionController {
}
requisitionLine
.
setItemCode
(
invItem
.
getItemCode
());
}
SysAccessToken
sysAccessToken
=
userServer
.
checkAccessToken
(
token
);
PurRequisition
purRequisition
=
new
PurRequisition
();
BeanUtils
.
copyProperties
(
purRequisitionPage
,
purRequisition
);
//为采购申请主表添加组织code
purRequisition
.
setSysOrgCode
(
sysOrgCode
);
purRequisition
.
setApplicant
(
sysAccessToken
.
getUserId
());
//添加
purRequisitionService
.
saveMain
(
purRequisition
,
purRequisitionPage
.
getPurRequisitionLineList
());
return
new
Result
(
true
,
StatusCode
.
OK
,
"下推采购申请成功!"
,
purRequisitionPage
.
getOrderNumber
());
...
...
src/main/java/orthopedics/controller/bookcity/StockTransferController.java
0 → 100644
View file @
f0f769aa
This diff is collapsed.
Click to expand it.
src/main/java/orthopedics/controller/bookcity/WshShipmentController.java
View file @
f0f769aa
...
...
@@ -74,7 +74,7 @@ public class WshShipmentController {
}
String
updateBy
=
user
.
getRealname
();
LocalDateTime
updateTime
=
LocalDateTime
.
now
();
wshShipmentHeaderPage
.
setShipperV
(
user
.
get
Person
Id
());
wshShipmentHeaderPage
.
setShipperV
(
user
.
getId
());
//查找出当前用户所在的组织sysorgcode
Map
<
String
,
Object
>
map
=
getInfo
(
user
.
getPersonId
());
//赋值当前用户的组织code
...
...
src/main/java/orthopedics/model/JSONArrayModel.java
0 → 100644
View file @
f0f769aa
package
orthopedics
.
model
;
public
class
JSONArrayModel
{
private
String
inv_id
;
private
String
inv_code
;
private
String
inv_name
;
private
String
subinv_id
;
private
String
subinv_code
;
private
String
subinv_name
;
private
String
locator_id
;
private
String
locator_code
;
private
String
locator_name
;
private
String
item_id
;
private
String
item_code
;
private
String
item_name
;
private
String
unit_code
;
private
String
purchase_price
;
private
String
in_inv_id
;
private
String
in_inv_code
;
private
String
in_inv_name
;
private
String
balance
;
private
String
quantity
;
public
String
getInv_id
()
{
return
inv_id
;
}
public
void
setInv_id
(
String
inv_id
)
{
this
.
inv_id
=
inv_id
;
}
public
String
getInv_code
()
{
return
inv_code
;
}
public
void
setInv_code
(
String
inv_code
)
{
this
.
inv_code
=
inv_code
;
}
public
String
getInv_name
()
{
return
inv_name
;
}
public
void
setInv_name
(
String
inv_name
)
{
this
.
inv_name
=
inv_name
;
}
public
String
getSubinv_id
()
{
return
subinv_id
;
}
public
void
setSubinv_id
(
String
subinv_id
)
{
this
.
subinv_id
=
subinv_id
;
}
public
String
getSubinv_code
()
{
return
subinv_code
;
}
public
void
setSubinv_code
(
String
subinv_code
)
{
this
.
subinv_code
=
subinv_code
;
}
public
String
getSubinv_name
()
{
return
subinv_name
;
}
public
void
setSubinv_name
(
String
subinv_name
)
{
this
.
subinv_name
=
subinv_name
;
}
public
String
getLocator_id
()
{
return
locator_id
;
}
public
void
setLocator_id
(
String
locator_id
)
{
this
.
locator_id
=
locator_id
;
}
public
String
getLocator_code
()
{
return
locator_code
;
}
public
void
setLocator_code
(
String
locator_code
)
{
this
.
locator_code
=
locator_code
;
}
public
String
getLocator_name
()
{
return
locator_name
;
}
public
void
setLocator_name
(
String
locator_name
)
{
this
.
locator_name
=
locator_name
;
}
public
String
getItem_id
()
{
return
item_id
;
}
public
void
setItem_id
(
String
item_id
)
{
this
.
item_id
=
item_id
;
}
public
String
getItem_code
()
{
return
item_code
;
}
public
void
setItem_code
(
String
item_code
)
{
this
.
item_code
=
item_code
;
}
public
String
getItem_name
()
{
return
item_name
;
}
public
void
setItem_name
(
String
item_name
)
{
this
.
item_name
=
item_name
;
}
public
String
getUnit_code
()
{
return
unit_code
;
}
public
void
setUnit_code
(
String
unit_code
)
{
this
.
unit_code
=
unit_code
;
}
public
String
getPurchase_price
()
{
return
purchase_price
;
}
public
void
setPurchase_price
(
String
purchase_price
)
{
this
.
purchase_price
=
purchase_price
;
}
public
String
getIn_inv_id
()
{
return
in_inv_id
;
}
public
void
setIn_inv_id
(
String
in_inv_id
)
{
this
.
in_inv_id
=
in_inv_id
;
}
public
String
getIn_inv_code
()
{
return
in_inv_code
;
}
public
void
setIn_inv_code
(
String
in_inv_code
)
{
this
.
in_inv_code
=
in_inv_code
;
}
public
String
getIn_inv_name
()
{
return
in_inv_name
;
}
public
void
setIn_inv_name
(
String
in_inv_name
)
{
this
.
in_inv_name
=
in_inv_name
;
}
public
String
getBalance
()
{
return
balance
;
}
public
void
setBalance
(
String
balance
)
{
this
.
balance
=
balance
;
}
public
String
getQuantity
()
{
return
quantity
;
}
public
void
setQuantity
(
String
quantity
)
{
this
.
quantity
=
quantity
;
}
@Override
public
String
toString
()
{
return
"JSONArrayModel{"
+
"inv_id='"
+
inv_id
+
'\''
+
", inv_code='"
+
inv_code
+
'\''
+
", inv_name='"
+
inv_name
+
'\''
+
", subinv_id='"
+
subinv_id
+
'\''
+
", subinv_code='"
+
subinv_code
+
'\''
+
", subinv_name='"
+
subinv_name
+
'\''
+
", locator_id='"
+
locator_id
+
'\''
+
", locator_code='"
+
locator_code
+
'\''
+
", locator_name='"
+
locator_name
+
'\''
+
", item_id='"
+
item_id
+
'\''
+
", item_code='"
+
item_code
+
'\''
+
", item_name='"
+
item_name
+
'\''
+
", unit_code='"
+
unit_code
+
'\''
+
", purchase_price='"
+
purchase_price
+
'\''
+
", in_inv_id='"
+
in_inv_id
+
'\''
+
", in_inv_code='"
+
in_inv_code
+
'\''
+
", in_inv_name='"
+
in_inv_name
+
'\''
+
", balance='"
+
balance
+
'\''
+
", quantity='"
+
quantity
+
'\''
+
'}'
;
}
}
src/main/java/orthopedics/service/PurOrderHeaderService.java
View file @
f0f769aa
...
...
@@ -35,7 +35,6 @@ public class PurOrderHeaderService {
entity
.
setCreateTime
(
purOrderHeader
.
getCreateTime
());
entity
.
setUpdateBy
(
purOrderHeader
.
getUpdateBy
());
entity
.
setUpdateTime
(
purOrderHeader
.
getUpdateTime
());
entity
.
setOrderNumber
(
purOrderHeader
.
getOrderNumber
());
entity
.
setSourceHeaderId
(
purOrderHeader
.
getSourceHeaderId
());
entity
.
setSourceHeaderNumber
(
purOrderHeader
.
getSourceHeaderNumber
());
purOrderLineMapper
.
insert
(
entity
);
...
...
src/main/java/orthopedics/service/TransferService.java
View file @
f0f769aa
...
...
@@ -3,6 +3,7 @@ package orthopedics.service;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
orthopedics.dao.InvItemOnhandMapper
;
import
orthopedics.dao.InvTransactionMapper
;
...
...
@@ -80,4 +81,22 @@ public class TransferService {
public
int
updateInvItemOnHandByOriginTxId
(
Integer
quantity
,
String
id
){
return
invItemOnhandMapper
.
updateInvItemOnHandByOriginTxId
(
quantity
,
id
);
}
@Transactional
public
void
saveMain
(
WarTransfer
warTransfer
,
List
<
WarTransferLine
>
warTransferLineList
){
warTransferMapper
.
insert
(
warTransfer
);
for
(
WarTransferLine
warTransferLine
:
warTransferLineList
)
{
warTransferLine
.
setCreateBy
(
warTransfer
.
getCreateBy
());
warTransferLine
.
setCreateTime
(
warTransfer
.
getCreateTime
());
warTransferLine
.
setUpdateBy
(
warTransfer
.
getUpdateBy
());
warTransferLine
.
setUpdateTime
(
warTransfer
.
getUpdateTime
());
warTransferLine
.
setOrderNumber
(
warTransfer
.
getOrderNumber
());
warTransferLine
.
setOrgId
(
warTransfer
.
getOrgId
());
warTransferLine
.
setSysOrgCode
(
warTransfer
.
getSysOrgCode
());
warTransferLine
.
setLineStatus
(
warTransfer
.
getOrderStatus
());
warTransferLine
.
setOrderType
(
warTransfer
.
getOrderType
());
warTransferLine
.
setSourceHeaderId
(
warTransfer
.
getId
());
warTransferLineMapper
.
insert
(
warTransferLine
);
}
}
}
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