Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
warehouse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡懿
warehouse
Commits
437f11c7
Commit
437f11c7
authored
Feb 23, 2023
by
胡懿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'hy' and 'master' of gitlab.yqdchina.com:huyi/warehouse into hy
parents
3904b920
b991e8ce
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
4 deletions
+85
-4
UserController.java
...main/java/com/jeeplus/modules/sys/web/UserController.java
+17
-1
Ledger.java
...a/com/jeeplus/modules/warehouse/ledger/entity/Ledger.java
+6
-0
MaterialRequisitionController.java
...aterialrequisition/web/MaterialRequisitionController.java
+4
-0
ProfitWarehousingService.java
...e/profitwarehousing/service/ProfitWarehousingService.java
+34
-2
ProfitWarehousingController.java
...se/profitwarehousing/web/ProfitWarehousingController.java
+24
-1
No files found.
src/main/java/com/jeeplus/modules/sys/web/UserController.java
View file @
437f11c7
...
@@ -5,6 +5,7 @@ package com.jeeplus.modules.sys.web;
...
@@ -5,6 +5,7 @@ package com.jeeplus.modules.sys.web;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -548,7 +549,22 @@ public class UserController extends BaseController {
...
@@ -548,7 +549,22 @@ public class UserController extends BaseController {
}
}
return
mapList
;
return
mapList
;
}
}
/**
* 获取 领用机构下的 所有用户
*/
@ResponseBody
@RequestMapping
(
value
=
"getUserListByOfficeId"
)
public
List
<
User
>
getUserListByOfficeId
(
String
officeId
)
throws
Exception
{
/**
* 后台hibernate-validation插件校验
*/
List
<
User
>
list
=
new
ArrayList
<>();
if
(
StringUtils
.
isBlank
(
officeId
)){
return
list
;
}
list
=
systemService
.
findUserByOfficeId
(
officeId
);
return
list
;
}
/**
/**
* web端ajax验证用户名是否可用
* web端ajax验证用户名是否可用
* @param loginName
* @param loginName
...
...
src/main/java/com/jeeplus/modules/warehouse/ledger/entity/Ledger.java
View file @
437f11c7
...
@@ -41,6 +41,12 @@ public class Ledger extends DataEntity<Ledger> {
...
@@ -41,6 +41,12 @@ public class Ledger extends DataEntity<Ledger> {
super
(
id
);
super
(
id
);
}
}
public
Ledger
(
String
name
,
MaterialType
type
,
String
model
)
{
this
.
name
=
name
;
this
.
type
=
type
;
this
.
model
=
model
;
}
@NotNull
(
message
=
"物资名称不能为空"
)
@NotNull
(
message
=
"物资名称不能为空"
)
@ExcelField
(
title
=
"物资名称"
,
align
=
2
,
sort
=
1
)
@ExcelField
(
title
=
"物资名称"
,
align
=
2
,
sort
=
1
)
public
String
getName
()
{
public
String
getName
()
{
...
...
src/main/java/com/jeeplus/modules/warehouse/materialrequisition/web/MaterialRequisitionController.java
View file @
437f11c7
...
@@ -6,6 +6,7 @@ package com.jeeplus.modules.warehouse.materialrequisition.web;
...
@@ -6,6 +6,7 @@ package com.jeeplus.modules.warehouse.materialrequisition.web;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -92,6 +93,9 @@ public class MaterialRequisitionController extends BaseController {
...
@@ -92,6 +93,9 @@ public class MaterialRequisitionController extends BaseController {
@RequiresPermissions
(
value
={
"warehouse:materialrequisition:materialRequisition:view"
,
"warehouse:materialrequisition:materialRequisition:add"
,
"warehouse:materialrequisition:materialRequisition:edit"
},
logical
=
Logical
.
OR
)
@RequiresPermissions
(
value
={
"warehouse:materialrequisition:materialRequisition:view"
,
"warehouse:materialrequisition:materialRequisition:add"
,
"warehouse:materialrequisition:materialRequisition:edit"
},
logical
=
Logical
.
OR
)
@RequestMapping
(
value
=
"form/{mode}"
)
@RequestMapping
(
value
=
"form/{mode}"
)
public
String
form
(
@PathVariable
String
mode
,
MaterialRequisition
materialRequisition
,
Model
model
)
{
public
String
form
(
@PathVariable
String
mode
,
MaterialRequisition
materialRequisition
,
Model
model
)
{
if
(
materialRequisition
.
getNumber
()==
null
||
Objects
.
equals
(
materialRequisition
.
getNumber
(),
""
)){
materialRequisition
.
setNumber
(
materialRequisitionService
.
createLYDH
());
}
model
.
addAttribute
(
"materialRequisition"
,
materialRequisition
);
model
.
addAttribute
(
"materialRequisition"
,
materialRequisition
);
model
.
addAttribute
(
"mode"
,
mode
);
model
.
addAttribute
(
"mode"
,
mode
);
return
"modules/warehouse/materialrequisition/materialRequisitionForm"
;
return
"modules/warehouse/materialrequisition/materialRequisitionForm"
;
...
...
src/main/java/com/jeeplus/modules/warehouse/profitwarehousing/service/ProfitWarehousingService.java
View file @
437f11c7
...
@@ -3,10 +3,14 @@
...
@@ -3,10 +3,14 @@
*/
*/
package
com
.
jeeplus
.
modules
.
warehouse
.
profitwarehousing
.
service
;
package
com
.
jeeplus
.
modules
.
warehouse
.
profitwarehousing
.
service
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
import
com.jeeplus.modules.warehouse.code.util.CodeUtil
;
import
com.jeeplus.modules.warehouse.code.util.CodeUtil
;
import
com.jeeplus.modules.warehouse.code.util.StaticNumSeq
;
import
com.jeeplus.modules.warehouse.code.util.StaticNumSeq
;
import
com.jeeplus.modules.warehouse.ledger.entity.Ledger
;
import
com.jeeplus.modules.warehouse.ledger.entity.LedgerInfo
;
import
com.jeeplus.modules.warehouse.ledger.mapper.LedgerMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -30,7 +34,9 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
...
@@ -30,7 +34,9 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
@Autowired
@Autowired
private
ProfitWarehousingInfoMapper
profitWarehousingInfoMapper
;
private
ProfitWarehousingInfoMapper
profitWarehousingInfoMapper
;
@Autowired
private
LedgerMapper
ledgerMapper
;
public
ProfitWarehousing
get
(
String
id
)
{
public
ProfitWarehousing
get
(
String
id
)
{
ProfitWarehousing
profitWarehousing
=
super
.
get
(
id
);
ProfitWarehousing
profitWarehousing
=
super
.
get
(
id
);
profitWarehousing
.
setProfitWarehousingInfoList
(
profitWarehousingInfoMapper
.
findList
(
new
ProfitWarehousingInfo
(
profitWarehousing
)));
profitWarehousing
.
setProfitWarehousingInfoList
(
profitWarehousingInfoMapper
.
findList
(
new
ProfitWarehousingInfo
(
profitWarehousing
)));
...
@@ -77,5 +83,30 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
...
@@ -77,5 +83,30 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
super
.
delete
(
profitWarehousing
);
super
.
delete
(
profitWarehousing
);
profitWarehousingInfoMapper
.
delete
(
new
ProfitWarehousingInfo
(
profitWarehousing
));
profitWarehousingInfoMapper
.
delete
(
new
ProfitWarehousingInfo
(
profitWarehousing
));
}
}
//盘盈入库 保存 盘盈入库信息 ,并添加对应的台账信息
@Transactional
(
readOnly
=
false
)
public
void
inLedgerInfo
(
ProfitWarehousing
profitWarehousing
)
{
List
<
ProfitWarehousingInfo
>
profitWarehousingInfoList
=
profitWarehousing
.
getProfitWarehousingInfoList
();
//当前盘盈入库单的明细信息
BigDecimal
sum
=
BigDecimal
.
ONE
;
if
(
profitWarehousingInfoList
!=
null
){
if
(
profitWarehousingInfoList
.
size
()
>
0
){
for
(
ProfitWarehousingInfo
one:
profitWarehousingInfoList
)
{
BigDecimal
amount
=
one
.
getAmount
();
if
(
amount
!=
null
){
//总价 是所有单价之和
sum
=
sum
.
add
(
amount
);
}
//获取同名称类型型号的台账主表信息
Ledger
ledger
=
new
Ledger
(
one
.
getName
(),
one
.
getType
(),
one
.
getMarking
());
Ledger
oldLeger
=
ledgerMapper
.
findByTypeAndModel
(
ledger
);
if
(
oldLeger
!=
null
){
LedgerInfo
ledgerInfo
=
new
LedgerInfo
();
ledgerInfo
.
setLedger
(
oldLeger
);
ledgerInfo
.
setAmount
(
one
.
getAmount
());
}
}
}
}
}
}
}
\ No newline at end of file
src/main/java/com/jeeplus/modules/warehouse/profitwarehousing/web/ProfitWarehousingController.java
View file @
437f11c7
...
@@ -228,6 +228,28 @@ public class ProfitWarehousingController extends BaseController {
...
@@ -228,6 +228,28 @@ public class ProfitWarehousingController extends BaseController {
}
}
return
j
;
return
j
;
}
}
/**
* 保存新增盘盈入库信息后,入台账
*/
@ResponseBody
@RequiresPermissions
(
value
={
"warehouse:profitwarehousing:profitWarehousing:add"
,
"warehouse:profitwarehousing:profitWarehousing:edit"
},
logical
=
Logical
.
OR
)
@RequestMapping
(
value
=
"inLedgerInfo"
)
public
AjaxJson
inLedgerInfo
(
ProfitWarehousing
profitWarehousing
,
Model
model
)
throws
Exception
{
AjaxJson
j
=
new
AjaxJson
();
/**
* 后台hibernate-validation插件校验
*/
String
errMsg
=
beanValidator
(
profitWarehousing
);
if
(
StringUtils
.
isNotBlank
(
errMsg
)){
j
.
setSuccess
(
false
);
j
.
setMsg
(
errMsg
);
return
j
;
}
//新增或编辑表单保存
profitWarehousingService
.
inLedgerInfo
(
profitWarehousing
);
//保存
j
.
setSuccess
(
true
);
j
.
setMsg
(
"物资入帐成功"
);
return
j
;
}
}
}
\ No newline at end of file
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