Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
88985562
Commit
88985562
authored
Nov 17, 2022
by
季圣华
Browse files
增加根据原单号查询关联的单据列表接口
parent
c62c6139
Changes
3
Show whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
88985562
...
...
@@ -373,6 +373,30 @@ public class DepotHeadController {
return
res
;
}
/**
* 根据原单号查询关联的单据列表
* @param number
* @param request
* @return
*/
@GetMapping
(
value
=
"/getBillListByLinkNumber"
)
@ApiOperation
(
value
=
"根据原单号查询关联的单据列表"
)
public
BaseResponseInfo
getBillListByLinkNumber
(
@RequestParam
(
"number"
)
String
number
,
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
DepotHead
dh
=
new
DepotHead
();
try
{
List
<
DepotHead
>
list
=
depotHeadService
.
getBillListByLinkNumber
(
number
);
res
.
code
=
200
;
res
.
data
=
list
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
res
.
code
=
500
;
res
.
data
=
"获取数据失败"
;
}
return
res
;
}
/**
* 新增单据主表及单据子表信息
* @param body
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/vo/DepotHeadVo4List.java
View file @
88985562
...
...
@@ -47,6 +47,10 @@ public class DepotHeadVo4List extends DepotHead{
* 是否有付款单或收款单
*/
private
Boolean
hasFinancialFlag
;
/**
* 是否有退款单
*/
private
Boolean
hasBackFlag
;
public
String
getProjectName
()
{
return
projectName
;
...
...
@@ -199,4 +203,12 @@ public class DepotHeadVo4List extends DepotHead{
public
void
setHasFinancialFlag
(
Boolean
hasFinancialFlag
)
{
this
.
hasFinancialFlag
=
hasFinancialFlag
;
}
public
Boolean
getHasBackFlag
()
{
return
hasBackFlag
;
}
public
void
setHasBackFlag
(
Boolean
hasBackFlag
)
{
this
.
hasBackFlag
=
hasBackFlag
;
}
}
\ No newline at end of file
jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
88985562
...
...
@@ -156,6 +156,9 @@ public class DepotHeadService {
//是否有付款单或收款单
int
financialBillNoSize
=
accountHeadService
.
getFinancialBillNoByBillId
(
dh
.
getId
()).
size
();
dh
.
setHasFinancialFlag
(
financialBillNoSize
>
0
);
//是否有退款单
int
billListSize
=
getBillListByLinkNumber
(
dh
.
getNumber
()).
size
();
dh
.
setHasBackFlag
(
billListSize
>
0
);
if
(
StringUtil
.
isNotEmpty
(
dh
.
getSalesMan
()))
{
dh
.
setSalesManStr
(
personService
.
getPersonByMapAndIds
(
personMap
,
dh
.
getSalesMan
()));
}
...
...
@@ -730,6 +733,12 @@ public class DepotHeadService {
if
(
dh
.
getTotalPrice
()
!=
null
)
{
dh
.
setTotalPrice
(
dh
.
getTotalPrice
().
abs
());
}
//是否有付款单或收款单
int
financialBillNoSize
=
accountHeadService
.
getFinancialBillNoByBillId
(
dh
.
getId
()).
size
();
dh
.
setHasFinancialFlag
(
financialBillNoSize
>
0
);
//是否有退款单
int
billListSize
=
getBillListByLinkNumber
(
dh
.
getNumber
()).
size
();
dh
.
setHasBackFlag
(
billListSize
>
0
);
if
(
StringUtil
.
isNotEmpty
(
dh
.
getSalesMan
()))
{
dh
.
setSalesManStr
(
personService
.
getPersonByMapAndIds
(
personMap
,
dh
.
getSalesMan
()));
}
...
...
@@ -759,6 +768,18 @@ public class DepotHeadService {
return
depotHeadMapper
.
selectByExample
(
example
);
}
/**
* 根据原单号查询关联的单据列表
* @param linkNumber
* @return
* @throws Exception
*/
public
List
<
DepotHead
>
getBillListByLinkNumber
(
String
linkNumber
)
throws
Exception
{
DepotHeadExample
example
=
new
DepotHeadExample
();
example
.
createCriteria
().
andLinkNumberEqualTo
(
linkNumber
).
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
depotHeadMapper
.
selectByExample
(
example
);
}
/**
* 新增单据主表及单据子表信息
* @param beanJson
...
...
Write
Preview
Supports
Markdown
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