Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-cost-system
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
bltdc
dc-cost-system
Commits
2d7a2b9a
Commit
2d7a2b9a
authored
Jun 21, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
费用单处理新增判断, 若是已支付状态就不准改
parent
364cc7ea
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
1 deletion
+75
-1
CostCheckController.java
.../blt/other/other_cost/controller/CostCheckController.java
+16
-1
CostDao.java
...e/src/main/java/com/blt/other/other_cost/dao/CostDao.java
+2
-0
CostTofinanceDao.java
...n/java/com/blt/other/other_cost/dao/CostTofinanceDao.java
+11
-0
CostService.java
...in/java/com/blt/other/other_cost/service/CostService.java
+2
-0
CostServiceImpl.java
...om/blt/other/other_cost/service/impl/CostServiceImpl.java
+5
-0
Cost.xml
cost-core/src/main/resources/mapper/Cost.xml
+6
-0
OtherApplicationTests.java
...re/src/test/java/com/blt/other/OtherApplicationTests.java
+33
-0
No files found.
cost-core/src/main/java/com/blt/other/other_cost/controller/CostCheckController.java
View file @
2d7a2b9a
...
...
@@ -12,6 +12,7 @@ import com.blt.other.other_cost.vo.ApplyMoneyDetail;
import
com.blt.other.other_cost.vo.CashierCallbackUrlVo
;
import
com.blt.other.other_database.model.*
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -116,6 +117,20 @@ public class CostCheckController {
Map
<
String
,
Object
>
map
=
null
;
String
costNo
=
request
.
getParameter
(
"costNo"
);
String
updateuserid
=
request
.
getParameter
(
"updateuserid"
);
Integer
costStatus
=
costService
.
getCostStatusByNo
(
costNo
);
/**
* 吴通新增
* 如果是支付状态, 就不准改
*/
if
(
null
!=
costStatus
&&
costStatus
.
equals
(
4
))
{
map
=
new
HashMap
<>();
map
.
put
(
"msg"
,
"error"
);
map
.
put
(
"result"
,
0
);
map
.
put
(
"finance"
,
false
);
costLogService
.
save
(
costNo
,
Integer
.
parseInt
(
updateuserid
),
"尝试修改已支付费用单,被拦截"
);
return
map
;
}
costLogService
.
save
(
costNo
,
Integer
.
parseInt
(
updateuserid
),
"费用系统财务审核通过"
);
// 审核通过,自动提交到出纳付款
...
...
@@ -392,7 +407,7 @@ public class CostCheckController {
* @param costNo
* @return
*/
p
rivate
boolean
tofinanceMethod
(
String
costNo
){
p
ublic
boolean
tofinanceMethod
(
String
costNo
){
// 获取费用单信息
List
<
ApplyMoneyDetail
>
applyMoneyDetailList
=
new
ArrayList
<>();
ApplyMoneyDetail
applyMoneyDetail
=
new
ApplyMoneyDetail
();
...
...
cost-core/src/main/java/com/blt/other/other_cost/dao/CostDao.java
View file @
2d7a2b9a
...
...
@@ -113,4 +113,6 @@ public interface CostDao {
* @return
*/
List
<
CostDomain
>
selectNoPayCost
(
@Param
(
"list"
)
List
<
String
>
costNoList
);
Integer
selectCostStatusByNo
(
@Param
(
"costNo"
)
String
costNo
);
}
cost-core/src/main/java/com/blt/other/other_cost/dao/CostTofinanceDao.java
View file @
2d7a2b9a
...
...
@@ -2,8 +2,12 @@ package com.blt.other.other_cost.dao;
import
com.blt.other.other_database.model.CostTofinanceDomain
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Mapper
@Repository
public
interface
CostTofinanceDao
{
...
...
@@ -14,4 +18,11 @@ public interface CostTofinanceDao {
* @return
*/
Integer
insert
(
CostTofinanceDomain
costTofinanceDomain
);
/**
* 手动查费用单重新提交
*/
@Select
(
"SELECT cost_no FROM cost WHERE cost_no in \n"
+
"('F006565','F007080','F008044','F008045','F008046','F008277','SF008984')"
)
List
<
String
>
listErrorFee
();
}
cost-core/src/main/java/com/blt/other/other_cost/service/CostService.java
View file @
2d7a2b9a
...
...
@@ -97,4 +97,6 @@ public interface CostService {
CostDomain
getLastCost
();
List
<
CostDto
>
getLinkLendCost
(
Integer
createuserid
);
Integer
getCostStatusByNo
(
String
costNo
);
}
cost-core/src/main/java/com/blt/other/other_cost/service/impl/CostServiceImpl.java
View file @
2d7a2b9a
...
...
@@ -352,6 +352,11 @@ public class CostServiceImpl implements CostService {
}
@Override
public
Integer
getCostStatusByNo
(
String
costNo
)
{
return
costDao
.
selectCostStatusByNo
(
costNo
);
}
@Override
public
CostDomain
getCostDomainByNo
(
String
costNo
)
{
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costNo
);
return
costDomain
;
...
...
cost-core/src/main/resources/mapper/Cost.xml
View file @
2d7a2b9a
...
...
@@ -433,4 +433,9 @@
#{costNo}
</foreach>
</select>
<select
id=
"selectCostStatusByNo"
resultType=
"integer"
>
select cost_status from cost where cost_no=#{costNo}
</select>
</mapper>
\ No newline at end of file
cost-core/src/test/java/com/blt/other/OtherApplicationTests.java
View file @
2d7a2b9a
package
com
.
blt
.
other
;
import
com.blt.other.other_cost.controller.CostCheckController
;
import
com.blt.other.other_cost.dao.CostTofinanceDao
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.mock.web.MockHttpServletRequest
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequestWrapper
;
import
java.util.List
;
import
java.util.Map
;
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
public
class
OtherApplicationTests
{
@Autowired
private
CostCheckController
costCheckController
;
@Autowired
private
CostTofinanceDao
costTofinanceDao
;
/**
* 泽凯财务系统错误驳回
* 手动提交
*/
@Test
public
void
test
()
{
List
<
String
>
strings
=
costTofinanceDao
.
listErrorFee
();
for
(
String
string
:
strings
)
{
costCheckController
.
tofinanceMethod
(
string
);
}
}
/**
* 测试已支付单不准修改
*/
@Test
public
void
test2
()
{
HttpServletRequest
request
=
new
MockHttpServletRequest
();
request
.
setAttribute
(
"costNo"
,
"F009455"
);
request
.
setAttribute
(
"updateuserid"
,
"2653"
);
Map
<
String
,
Object
>
pass
=
costCheckController
.
pass
(
request
,
null
);
System
.
out
.
println
(
pass
);
}
}
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