Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
precision-effect
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
耿迪迪
precision-effect
Commits
a3bc6699
Commit
a3bc6699
authored
Jun 16, 2023
by
耿迪迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.61.77.35:9999/gengdidi/precision-effect
parents
4751c51c
ecfafdf5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
2802 additions
and
25 deletions
+2802
-25
SysUserController.java
...a/com/zehong/web/controller/system/SysUserController.java
+5
-1
TBorrowingApplyForController.java
.../controller/transaction/TBorrowingApplyForController.java
+142
-0
TPurchaseController.java
...ehong/web/controller/transaction/TPurchaseController.java
+103
-0
TTradeProjectController.java
...g/web/controller/transaction/TTradeProjectController.java
+8
-0
TBorrowingApplyFor.java
...ain/java/com/zehong/system/domain/TBorrowingApplyFor.java
+244
-0
TPurchase.java
...tem/src/main/java/com/zehong/system/domain/TPurchase.java
+249
-0
TTradeProject.java
...src/main/java/com/zehong/system/domain/TTradeProject.java
+10
-0
TBorrowingApplyForMapper.java
...va/com/zehong/system/mapper/TBorrowingApplyForMapper.java
+74
-0
TPurchaseMapper.java
...c/main/java/com/zehong/system/mapper/TPurchaseMapper.java
+61
-0
TTradeProjectMapper.java
...in/java/com/zehong/system/mapper/TTradeProjectMapper.java
+7
-0
ITBorrowingApplyForService.java
...com/zehong/system/service/ITBorrowingApplyForService.java
+74
-0
ITPurchaseService.java
...ain/java/com/zehong/system/service/ITPurchaseService.java
+61
-0
ITTradeProjectService.java
...java/com/zehong/system/service/ITTradeProjectService.java
+1
-0
TBorrowingApplyForServiceImpl.java
...ng/system/service/impl/TBorrowingApplyForServiceImpl.java
+115
-0
TPurchaseServiceImpl.java
.../com/zehong/system/service/impl/TPurchaseServiceImpl.java
+102
-0
TTradeProjectServiceImpl.java
.../zehong/system/service/impl/TTradeProjectServiceImpl.java
+5
-0
TPurchaseMapper.xml
...em/src/main/resources/mapper/business/TPurchaseMapper.xml
+135
-0
TTradeProjectMapper.xml
...rc/main/resources/mapper/business/TTradeProjectMapper.xml
+41
-0
SysUserMapper.xml
...system/src/main/resources/mapper/system/SysUserMapper.xml
+20
-20
TBorrowingApplyForMapper.xml
...main/resources/mapper/system/TBorrowingApplyForMapper.xml
+139
-0
for.js
precision-effect-web/src/api/system/for.js
+53
-0
purchase.js
precision-effect-web/src/api/transaction/purchase.js
+53
-0
MoneyTable.vue
...ion-effect-web/src/views/account/component/MoneyTable.vue
+6
-4
index.vue
precision-effect-web/src/views/for/index.vue
+596
-0
index.vue
precision-effect-web/src/views/purchase/index.vue
+498
-0
No files found.
precision-effect-admin/src/main/java/com/zehong/web/controller/system/SysUserController.java
View file @
a3bc6699
...
...
@@ -210,4 +210,8 @@ public class SysUserController extends BaseController
public
AjaxResult
selectTransactorByDeptId
(
@RequestParam
(
value
=
"deptId"
)
Long
deptId
){
return
AjaxResult
.
success
(
userService
.
selectTransactorByDeptId
(
deptId
));
}
}
precision-effect-admin/src/main/java/com/zehong/web/controller/transaction/TBorrowingApplyForController.java
0 → 100644
View file @
a3bc6699
package
com
.
zehong
.
web
.
controller
.
transaction
;
import
java.util.Date
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.ServletUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.framework.web.service.TokenService
;
import
com.zehong.system.domain.TCashOperate
;
import
com.zehong.system.service.ITCashOperateService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TBorrowingApplyFor
;
import
com.zehong.system.service.ITBorrowingApplyForService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 借支申请Controller
*
* @author zehong
* @date 2023-06-15
*/
@RestController
@RequestMapping
(
"/system/for"
)
public
class
TBorrowingApplyForController
extends
BaseController
{
@Autowired
private
ITBorrowingApplyForService
tBorrowingApplyForService
;
@Autowired
private
TokenService
tokenService
;
@Autowired
private
ITCashOperateService
tCashOperateService
;
/**
* 查询借支申请列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:for:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TBorrowingApplyFor
tBorrowingApplyFor
)
{
startPage
();
List
<
TBorrowingApplyFor
>
list
=
tBorrowingApplyForService
.
selectTBorrowingApplyForList
(
tBorrowingApplyFor
);
return
getDataTable
(
list
);
}
/**
* 导出借支申请列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:for:export')"
)
@Log
(
title
=
"借支申请"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TBorrowingApplyFor
tBorrowingApplyFor
)
{
List
<
TBorrowingApplyFor
>
list
=
tBorrowingApplyForService
.
selectTBorrowingApplyForList
(
tBorrowingApplyFor
);
ExcelUtil
<
TBorrowingApplyFor
>
util
=
new
ExcelUtil
<
TBorrowingApplyFor
>(
TBorrowingApplyFor
.
class
);
return
util
.
exportExcel
(
list
,
"借支申请数据"
);
}
/**
* 获取借支申请详细信息
*/
@GetMapping
(
value
=
"/{borrowing}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"borrowing"
)
Long
borrowing
)
{
return
AjaxResult
.
success
(
tBorrowingApplyForService
.
selectTBorrowingApplyForById
(
borrowing
));
}
/**
* 新增借支申请
*/
@Log
(
title
=
"借支申请"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TBorrowingApplyFor
tBorrowingApplyFor
)
{
// 获取当前用户
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
if
(
StringUtils
.
isNotNull
(
user
))
{
tBorrowingApplyFor
.
setHandledByUserId
(
user
.
getUserId
());
}
return
toAjax
(
tBorrowingApplyForService
.
insertTBorrowingApplyFor
(
tBorrowingApplyFor
));
}
/**
* 修改借支申请
*/
@PreAuthorize
(
"@ss.hasPermi('system:for:approved')"
)
@Log
(
title
=
"借支申请"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
int
edit
(
@RequestBody
TBorrowingApplyFor
tBorrowingApplyFor
)
{
/**查询部门余额是否足够*/
int
isSufficient
=
tBorrowingApplyForService
.
selectTacc
(
tBorrowingApplyFor
);
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
tBorrowingApplyFor
.
setApprovedUserId
(
user
.
getUserId
());
//0部门余额不足 1余额足够
if
(
isSufficient
!=
0
){
//修改部门余额
tBorrowingApplyForService
.
deletebBalance
(
tBorrowingApplyFor
);
//修改借支申请表状态
tBorrowingApplyForService
.
updateTBorrowingApplyFor
(
tBorrowingApplyFor
);
TCashOperate
tCashOperate
=
new
TCashOperate
();
tCashOperate
.
setOperateDeptId
(
tBorrowingApplyFor
.
getBorrowingDeptId
());
tCashOperate
.
setOperateType
(
"2"
);
tCashOperate
.
setOperateAmount
(
tBorrowingApplyFor
.
getTotalFigures
());
tCashOperate
.
setIsDel
(
"0"
);
tCashOperate
.
setOperateTime
(
new
Date
());
//增加资金操作记录
tCashOperateService
.
insertTCashOperate
(
tCashOperate
);
return
1
;
}
else
{
tBorrowingApplyFor
.
setApprovalStatus
(
3
);
//修改借支申请表状态
tBorrowingApplyForService
.
updateTBorrowingApplyFor
(
tBorrowingApplyFor
);
return
2
;
}
}
/**
* 删除借支申请
*/
@PreAuthorize
(
"@ss.hasPermi('system:for:remove')"
)
@Log
(
title
=
"借支申请"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{borrowings}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
borrowings
)
{
return
toAjax
(
tBorrowingApplyForService
.
deleteTBorrowingApplyForByIds
(
borrowings
));
}
}
precision-effect-admin/src/main/java/com/zehong/web/controller/transaction/TPurchaseController.java
0 → 100644
View file @
a3bc6699
package
com
.
zehong
.
web
.
controller
.
transaction
;
import
java.util.List
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TPurchase
;
import
com.zehong.system.service.ITPurchaseService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 外部采购(报销)申请Controller
*
* @author zehong
* @date 2023-06-16
*/
@RestController
@RequestMapping
(
"/system/purchase"
)
public
class
TPurchaseController
extends
BaseController
{
@Autowired
private
ITPurchaseService
tPurchaseService
;
/**
* 查询外部采购(报销)申请列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:purchase:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TPurchase
tPurchase
)
{
startPage
();
List
<
TPurchase
>
list
=
tPurchaseService
.
selectTPurchaseList
(
tPurchase
);
return
getDataTable
(
list
);
}
/**
* 导出外部采购(报销)申请列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:purchase:export')"
)
@Log
(
title
=
"外部采购(报销)申请"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TPurchase
tPurchase
)
{
List
<
TPurchase
>
list
=
tPurchaseService
.
selectTPurchaseList
(
tPurchase
);
ExcelUtil
<
TPurchase
>
util
=
new
ExcelUtil
<
TPurchase
>(
TPurchase
.
class
);
return
util
.
exportExcel
(
list
,
"外部采购(报销)申请数据"
);
}
/**
* 获取外部采购(报销)申请详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:purchase:query')"
)
@GetMapping
(
value
=
"/{purchaseId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"purchaseId"
)
Long
purchaseId
)
{
return
AjaxResult
.
success
(
tPurchaseService
.
selectTPurchaseById
(
purchaseId
));
}
/**
* 新增外部采购(报销)申请
*/
@PreAuthorize
(
"@ss.hasPermi('system:purchase:add')"
)
@Log
(
title
=
"外部采购(报销)申请"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TPurchase
tPurchase
)
{
return
toAjax
(
tPurchaseService
.
insertTPurchase
(
tPurchase
));
}
/**
* 修改外部采购(报销)申请
*/
@PreAuthorize
(
"@ss.hasPermi('system:purchase:edit')"
)
@Log
(
title
=
"外部采购(报销)申请"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TPurchase
tPurchase
)
{
return
toAjax
(
tPurchaseService
.
updateTPurchase
(
tPurchase
));
}
/**
* 删除外部采购(报销)申请
*/
@PreAuthorize
(
"@ss.hasPermi('system:purchase:remove')"
)
@Log
(
title
=
"外部采购(报销)申请"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{purchaseIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
purchaseIds
)
{
return
toAjax
(
tPurchaseService
.
deleteTPurchaseByIds
(
purchaseIds
));
}
}
precision-effect-admin/src/main/java/com/zehong/web/controller/transaction/TTradeProjectController.java
View file @
a3bc6699
...
...
@@ -111,4 +111,12 @@ public class TTradeProjectController extends BaseController
public
AjaxResult
settlementTrade
(
@RequestBody
TTradeProject
tTradeProject
){
return
toAjax
(
tTradeProjectService
.
settlementTrade
(
tTradeProject
));
}
@GetMapping
(
"/getIncomeOrPayableList"
)
public
TableDataInfo
getIncomeOrPayableList
(
TTradeProject
tTradeProject
)
{
startPage
();
List
<
TTradeProject
>
list
=
tTradeProjectService
.
getIncomeOrPayableList
(
tTradeProject
);
return
getDataTable
(
list
);
}
}
precision-effect-system/src/main/java/com/zehong/system/domain/TBorrowingApplyFor.java
0 → 100644
View file @
a3bc6699
package
com
.
zehong
.
system
.
domain
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 借支申请对象 t_borrowing_apply_for
*
* @author zehong
* @date 2023-06-15
*/
public
class
TBorrowingApplyFor
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 借支主键id */
private
Long
borrowing
;
/** 费用名称 */
@Excel
(
name
=
"费用名称"
)
private
String
feeName
;
/** 借支部门id */
@Excel
(
name
=
"借支部门id"
)
private
Long
borrowingDeptId
;
/** 经办人id */
@Excel
(
name
=
"经办人id"
)
private
Long
handledByUserId
;
/** 用途说明 */
@Excel
(
name
=
"用途说明"
)
private
String
applicationDescription
;
/** 使用人id */
@Excel
(
name
=
"使用人id"
)
private
Long
userId
;
/** 大写合计 */
@Excel
(
name
=
"大写合计"
)
private
String
totalWords
;
/** 小写合计 */
@Excel
(
name
=
"小写合计"
)
private
BigDecimal
totalFigures
;
/** 审批人id */
@Excel
(
name
=
"审批人id"
)
private
Long
approvedUserId
;
/** 登记日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"登记日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
registrationDate
;
/** 附件 */
@Excel
(
name
=
"附件"
)
private
String
attachmentUrl
;
/** 是否删除 0未删除 1删除 */
@Excel
(
name
=
"是否删除 0未删除 1删除"
)
private
String
isDel
;
/**审批状态 1未审批 2审批通过 3审批拒绝 */
private
Integer
approvalStatus
;
private
String
handledByUserIdName
;
private
String
userIdName
;
private
String
ApprovedUserIdName
;
public
String
getHandledByUserIdName
()
{
return
handledByUserIdName
;
}
public
void
setHandledByUserIdName
(
String
handledByUserIdName
)
{
this
.
handledByUserIdName
=
handledByUserIdName
;
}
public
String
getUserIdName
()
{
return
userIdName
;
}
public
void
setUserIdName
(
String
userIdName
)
{
this
.
userIdName
=
userIdName
;
}
public
String
getApprovedUserIdName
()
{
return
ApprovedUserIdName
;
}
public
void
setApprovedUserIdName
(
String
approvedUserIdName
)
{
ApprovedUserIdName
=
approvedUserIdName
;
}
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
Integer
getApprovalStatus
()
{
return
approvalStatus
;
}
public
void
setApprovalStatus
(
Integer
approvalStatus
)
{
this
.
approvalStatus
=
approvalStatus
;
}
public
void
setBorrowing
(
Long
borrowing
)
{
this
.
borrowing
=
borrowing
;
}
public
Long
getBorrowing
()
{
return
borrowing
;
}
public
void
setFeeName
(
String
feeName
)
{
this
.
feeName
=
feeName
;
}
public
String
getFeeName
()
{
return
feeName
;
}
public
void
setBorrowingDeptId
(
Long
borrowingDeptId
)
{
this
.
borrowingDeptId
=
borrowingDeptId
;
}
public
Long
getBorrowingDeptId
()
{
return
borrowingDeptId
;
}
public
void
setHandledByUserId
(
Long
handledByUserId
)
{
this
.
handledByUserId
=
handledByUserId
;
}
public
Long
getHandledByUserId
()
{
return
handledByUserId
;
}
public
void
setApplicationDescription
(
String
applicationDescription
)
{
this
.
applicationDescription
=
applicationDescription
;
}
public
String
getApplicationDescription
()
{
return
applicationDescription
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getUserId
()
{
return
userId
;
}
public
void
setTotalWords
(
String
totalWords
)
{
this
.
totalWords
=
totalWords
;
}
public
String
getTotalWords
()
{
return
totalWords
;
}
public
void
setTotalFigures
(
BigDecimal
totalFigures
)
{
this
.
totalFigures
=
totalFigures
;
}
public
BigDecimal
getTotalFigures
()
{
return
totalFigures
;
}
public
void
setApprovedUserId
(
Long
approvedUserId
)
{
this
.
approvedUserId
=
approvedUserId
;
}
public
Long
getApprovedUserId
()
{
return
approvedUserId
;
}
public
void
setRegistrationDate
(
Date
registrationDate
)
{
this
.
registrationDate
=
registrationDate
;
}
public
Date
getRegistrationDate
()
{
return
registrationDate
;
}
public
void
setAttachmentUrl
(
String
attachmentUrl
)
{
this
.
attachmentUrl
=
attachmentUrl
;
}
public
String
getAttachmentUrl
()
{
return
attachmentUrl
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
@Override
public
String
toString
()
{
return
"TBorrowingApplyFor{"
+
"borrowing="
+
borrowing
+
", feeName='"
+
feeName
+
'\''
+
", borrowingDeptId="
+
borrowingDeptId
+
", handledByUserId="
+
handledByUserId
+
", applicationDescription='"
+
applicationDescription
+
'\''
+
", userId="
+
userId
+
", totalWords='"
+
totalWords
+
'\''
+
", totalFigures="
+
totalFigures
+
", approvedUserId="
+
approvedUserId
+
", registrationDate="
+
registrationDate
+
", attachmentUrl='"
+
attachmentUrl
+
'\''
+
", isDel='"
+
isDel
+
'\''
+
", approvalStatus="
+
approvalStatus
+
", handledByUserIdName='"
+
handledByUserIdName
+
'\''
+
", userIdName='"
+
userIdName
+
'\''
+
", ApprovedUserIdName='"
+
ApprovedUserIdName
+
'\''
+
'}'
;
}
}
precision-effect-system/src/main/java/com/zehong/system/domain/TPurchase.java
0 → 100644
View file @
a3bc6699
package
com
.
zehong
.
system
.
domain
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 外部采购(报销)申请对象 t_purchase
*
* @author zehong
* @date 2023-06-16
*/
public
class
TPurchase
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 采购主键 */
private
Long
purchaseId
;
/** 采购申请部门 */
@Excel
(
name
=
"采购申请部门"
)
private
Long
purchaseDeptId
;
public
Long
getHandled_by_user_id
()
{
return
handled_by_user_id
;
}
public
void
setHandled_by_user_id
(
Long
handled_by_user_id
)
{
this
.
handled_by_user_id
=
handled_by_user_id
;
}
private
Long
handled_by_user_id
;
/** 采购名称 */
@Excel
(
name
=
"采购名称"
)
private
String
purchaseName
;
/** 规格 */
@Excel
(
name
=
"规格"
)
private
String
specifications
;
/** 型号 */
@Excel
(
name
=
"型号"
)
private
String
modelType
;
/** 用途说明 */
@Excel
(
name
=
"用途说明"
)
private
String
applicationDescription
;
/** 使用人 */
@Excel
(
name
=
"使用人"
)
private
Long
userId
;
/** 单价 */
@Excel
(
name
=
"单价"
)
private
BigDecimal
price
;
/** 数量 */
@Excel
(
name
=
"数量"
)
private
Long
count
;
/** 总价 */
@Excel
(
name
=
"总价"
)
private
BigDecimal
total
;
/** 采购申请部门长 */
@Excel
(
name
=
"采购申请部门长"
)
private
Long
purchaseDeptManagerId
;
/** 审批人 */
@Excel
(
name
=
"审批人"
)
private
Long
approvedUserId
;
/** 是否删除:0否,1是 */
@Excel
(
name
=
"是否删除:0否,1是"
)
private
String
isDel
;
/** 采购状态:0.待部门长审核 1.核算部审批 2.完成 3.驳回 */
@Excel
(
name
=
"采购状态:0.待部门长审核 1.核算部审批 2.完成 3.驳回"
)
private
String
purchaseStatus
;
/** 审核时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"审核时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
approvedTime
;
public
void
setPurchaseId
(
Long
purchaseId
)
{
this
.
purchaseId
=
purchaseId
;
}
public
Long
getPurchaseId
()
{
return
purchaseId
;
}
public
void
setPurchaseDeptId
(
Long
purchaseDeptId
)
{
this
.
purchaseDeptId
=
purchaseDeptId
;
}
public
Long
getPurchaseDeptId
()
{
return
purchaseDeptId
;
}
public
void
setPurchaseName
(
String
purchaseName
)
{
this
.
purchaseName
=
purchaseName
;
}
public
String
getPurchaseName
()
{
return
purchaseName
;
}
public
void
setSpecifications
(
String
specifications
)
{
this
.
specifications
=
specifications
;
}
public
String
getSpecifications
()
{
return
specifications
;
}
public
void
setModelType
(
String
modelType
)
{
this
.
modelType
=
modelType
;
}
public
String
getModelType
()
{
return
modelType
;
}
public
void
setApplicationDescription
(
String
applicationDescription
)
{
this
.
applicationDescription
=
applicationDescription
;
}
public
String
getApplicationDescription
()
{
return
applicationDescription
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getUserId
()
{
return
userId
;
}
public
void
setPrice
(
BigDecimal
price
)
{
this
.
price
=
price
;
}
public
BigDecimal
getPrice
()
{
return
price
;
}
public
void
setCount
(
Long
count
)
{
this
.
count
=
count
;
}
public
Long
getCount
()
{
return
count
;
}
public
void
setTotal
(
BigDecimal
total
)
{
this
.
total
=
total
;
}
public
BigDecimal
getTotal
()
{
return
total
;
}
public
void
setPurchaseDeptManagerId
(
Long
purchaseDeptManagerId
)
{
this
.
purchaseDeptManagerId
=
purchaseDeptManagerId
;
}
public
Long
getPurchaseDeptManagerId
()
{
return
purchaseDeptManagerId
;
}
public
void
setApprovedUserId
(
Long
approvedUserId
)
{
this
.
approvedUserId
=
approvedUserId
;
}
public
Long
getApprovedUserId
()
{
return
approvedUserId
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setPurchaseStatus
(
String
purchaseStatus
)
{
this
.
purchaseStatus
=
purchaseStatus
;
}
public
String
getPurchaseStatus
()
{
return
purchaseStatus
;
}
public
void
setApprovedTime
(
Date
approvedTime
)
{
this
.
approvedTime
=
approvedTime
;
}
public
Date
getApprovedTime
()
{
return
approvedTime
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"purchaseId"
,
getPurchaseId
())
.
append
(
"purchaseDeptId"
,
getPurchaseDeptId
())
.
append
(
"purchaseName"
,
getPurchaseName
())
.
append
(
"specifications"
,
getSpecifications
())
.
append
(
"modelType"
,
getModelType
())
.
append
(
"applicationDescription"
,
getApplicationDescription
())
.
append
(
"userId"
,
getUserId
())
.
append
(
"price"
,
getPrice
())
.
append
(
"count"
,
getCount
())
.
append
(
"total"
,
getTotal
())
.
append
(
"purchaseDeptManagerId"
,
getPurchaseDeptManagerId
())
.
append
(
"approvedUserId"
,
getApprovedUserId
())
.
append
(
"remark"
,
getRemark
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"purchaseStatus"
,
getPurchaseStatus
())
.
append
(
"approvedTime"
,
getApprovedTime
())
.
toString
();
}
}
precision-effect-system/src/main/java/com/zehong/system/domain/TTradeProject.java
View file @
a3bc6699
...
...
@@ -131,6 +131,16 @@ public class TTradeProject extends BaseEntity
private
String
tradeTransactorName
;
public
String
getProjectName
()
{
return
projectName
;
}
public
void
setProjectName
(
String
projectName
)
{
this
.
projectName
=
projectName
;
}
private
String
projectName
;
/**操作类型*/
private
List
<
String
>
operators
=
new
ArrayList
<>();
...
...
precision-effect-system/src/main/java/com/zehong/system/mapper/TBorrowingApplyForMapper.java
0 → 100644
View file @
a3bc6699
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TBorrowingApplyFor
;
/**
* 借支申请Mapper接口
*
* @author zehong
* @date 2023-06-15
*/
public
interface
TBorrowingApplyForMapper
{
/**
* 查询借支申请
*
* @param borrowing 借支申请ID
* @return 借支申请
*/
public
TBorrowingApplyFor
selectTBorrowingApplyForById
(
Long
borrowing
);
/**
* 查询借支申请列表
*
* @param tBorrowingApplyFor 借支申请
* @return 借支申请集合
*/
public
List
<
TBorrowingApplyFor
>
selectTBorrowingApplyForList
(
TBorrowingApplyFor
tBorrowingApplyFor
);
/**
* 新增借支申请
*
* @param tBorrowingApplyFor 借支申请
* @return 结果
*/
public
int
insertTBorrowingApplyFor
(
TBorrowingApplyFor
tBorrowingApplyFor
);
/**
* 修改借支申请
*
* @param tBorrowingApplyFor 借支申请
* @return 结果
*/
public
int
updateTBorrowingApplyFor
(
TBorrowingApplyFor
tBorrowingApplyFor
);
/**
* 删除借支申请
*
* @param borrowing 借支申请ID
* @return 结果
*/
public
int
deleteTBorrowingApplyForById
(
Long
borrowing
);
/**
* 批量删除借支申请
*
* @param borrowings 需要删除的数据ID
* @return 结果
*/
public
int
deleteTBorrowingApplyForByIds
(
Long
[]
borrowings
);
/**
* 查询部门余额是否足够
* @param tBorrowingApplyFor
* @return
*/
int
selectTacc
(
TBorrowingApplyFor
tBorrowingApplyFor
);
/**
* 修改部门余额
* @param tBorrowingApplyFor
*/
void
deletebBalance
(
TBorrowingApplyFor
tBorrowingApplyFor
);
}
precision-effect-system/src/main/java/com/zehong/system/mapper/TPurchaseMapper.java
0 → 100644
View file @
a3bc6699
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TPurchase
;
/**
* 外部采购(报销)申请Mapper接口
*
* @author zehong
* @date 2023-06-16
*/
public
interface
TPurchaseMapper
{
/**
* 查询外部采购(报销)申请
*
* @param purchaseId 外部采购(报销)申请ID
* @return 外部采购(报销)申请
*/
public
TPurchase
selectTPurchaseById
(
Long
purchaseId
);
/**
* 查询外部采购(报销)申请列表
*
* @param tPurchase 外部采购(报销)申请
* @return 外部采购(报销)申请集合
*/
public
List
<
TPurchase
>
selectTPurchaseList
(
TPurchase
tPurchase
);
/**
* 新增外部采购(报销)申请
*
* @param tPurchase 外部采购(报销)申请
* @return 结果
*/
public
int
insertTPurchase
(
TPurchase
tPurchase
);
/**
* 修改外部采购(报销)申请
*
* @param tPurchase 外部采购(报销)申请
* @return 结果
*/
public
int
updateTPurchase
(
TPurchase
tPurchase
);
/**
* 删除外部采购(报销)申请
*
* @param purchaseId 外部采购(报销)申请ID
* @return 结果
*/
public
int
deleteTPurchaseById
(
Long
purchaseId
);
/**
* 批量删除外部采购(报销)申请
*
* @param purchaseIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTPurchaseByIds
(
Long
[]
purchaseIds
);
}
precision-effect-system/src/main/java/com/zehong/system/mapper/TTradeProjectMapper.java
View file @
a3bc6699
...
...
@@ -65,4 +65,11 @@ public interface TTradeProjectMapper
* @return
*/
List
<
TTradeProject
>
getTradePendingPaymentInfo
(
Long
tradeDeptId
);
/**
* 查询应收、应付项目列表
* @param tTradeProject
* @return
*/
public
List
<
TTradeProject
>
getIncomeOrPayableList
(
TTradeProject
tTradeProject
);
}
precision-effect-system/src/main/java/com/zehong/system/service/ITBorrowingApplyForService.java
0 → 100644
View file @
a3bc6699
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TBorrowingApplyFor
;
/**
* 借支申请Service接口
*
* @author zehong
* @date 2023-06-15
*/
public
interface
ITBorrowingApplyForService
{
/**
* 查询借支申请
*
* @param borrowing 借支申请ID
* @return 借支申请
*/
public
TBorrowingApplyFor
selectTBorrowingApplyForById
(
Long
borrowing
);
/**
* 查询借支申请列表
*
* @param tBorrowingApplyFor 借支申请
* @return 借支申请集合
*/
public
List
<
TBorrowingApplyFor
>
selectTBorrowingApplyForList
(
TBorrowingApplyFor
tBorrowingApplyFor
);
/**
* 新增借支申请
*
* @param tBorrowingApplyFor 借支申请
* @return 结果
*/
public
int
insertTBorrowingApplyFor
(
TBorrowingApplyFor
tBorrowingApplyFor
);
/**
* 修改借支申请
*
* @param tBorrowingApplyFor 借支申请
* @return 结果
*/
public
int
updateTBorrowingApplyFor
(
TBorrowingApplyFor
tBorrowingApplyFor
);
/**
* 批量删除借支申请
*
* @param borrowings 需要删除的借支申请ID
* @return 结果
*/
public
int
deleteTBorrowingApplyForByIds
(
Long
[]
borrowings
);
/**
* 删除借支申请信息
*
* @param borrowing 借支申请ID
* @return 结果
*/
public
int
deleteTBorrowingApplyForById
(
Long
borrowing
);
/**
* 查询部门余额是否足够
* @param tBorrowingApplyFor
* @return
*/
int
selectTacc
(
TBorrowingApplyFor
tBorrowingApplyFor
);
/**
* 修改部门余额
* @param tBorrowingApplyFor
*/
void
deletebBalance
(
TBorrowingApplyFor
tBorrowingApplyFor
);
}
precision-effect-system/src/main/java/com/zehong/system/service/ITPurchaseService.java
0 → 100644
View file @
a3bc6699
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TPurchase
;
/**
* 外部采购(报销)申请Service接口
*
* @author zehong
* @date 2023-06-16
*/
public
interface
ITPurchaseService
{
/**
* 查询外部采购(报销)申请
*
* @param purchaseId 外部采购(报销)申请ID
* @return 外部采购(报销)申请
*/
public
TPurchase
selectTPurchaseById
(
Long
purchaseId
);
/**
* 查询外部采购(报销)申请列表
*
* @param tPurchase 外部采购(报销)申请
* @return 外部采购(报销)申请集合
*/
public
List
<
TPurchase
>
selectTPurchaseList
(
TPurchase
tPurchase
);
/**
* 新增外部采购(报销)申请
*
* @param tPurchase 外部采购(报销)申请
* @return 结果
*/
public
int
insertTPurchase
(
TPurchase
tPurchase
);
/**
* 修改外部采购(报销)申请
*
* @param tPurchase 外部采购(报销)申请
* @return 结果
*/
public
int
updateTPurchase
(
TPurchase
tPurchase
);
/**
* 批量删除外部采购(报销)申请
*
* @param purchaseIds 需要删除的外部采购(报销)申请ID
* @return 结果
*/
public
int
deleteTPurchaseByIds
(
Long
[]
purchaseIds
);
/**
* 删除外部采购(报销)申请信息
*
* @param purchaseId 外部采购(报销)申请ID
* @return 结果
*/
public
int
deleteTPurchaseById
(
Long
purchaseId
);
}
precision-effect-system/src/main/java/com/zehong/system/service/ITTradeProjectService.java
View file @
a3bc6699
...
...
@@ -72,4 +72,5 @@ public interface ITTradeProjectService
* @return
*/
int
settlementTrade
(
TTradeProject
tTradeProject
);
public
List
<
TTradeProject
>
getIncomeOrPayableList
(
TTradeProject
tTradeProject
);
}
precision-effect-system/src/main/java/com/zehong/system/service/impl/TBorrowingApplyForServiceImpl.java
0 → 100644
View file @
a3bc6699
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TBorrowingApplyForMapper
;
import
com.zehong.system.domain.TBorrowingApplyFor
;
import
com.zehong.system.service.ITBorrowingApplyForService
;
/**
* 借支申请Service业务层处理
*
* @author zehong
* @date 2023-06-15
*/
@Service
public
class
TBorrowingApplyForServiceImpl
implements
ITBorrowingApplyForService
{
@Autowired
private
TBorrowingApplyForMapper
tBorrowingApplyForMapper
;
/**
* 查询借支申请
*
* @param borrowing 借支申请ID
* @return 借支申请
*/
@Override
public
TBorrowingApplyFor
selectTBorrowingApplyForById
(
Long
borrowing
)
{
return
tBorrowingApplyForMapper
.
selectTBorrowingApplyForById
(
borrowing
);
}
/**
* 查询借支申请列表
*
* @param tBorrowingApplyFor 借支申请
* @return 借支申请
*/
@Override
public
List
<
TBorrowingApplyFor
>
selectTBorrowingApplyForList
(
TBorrowingApplyFor
tBorrowingApplyFor
)
{
return
tBorrowingApplyForMapper
.
selectTBorrowingApplyForList
(
tBorrowingApplyFor
);
}
/**
* 新增借支申请
*
* @param tBorrowingApplyFor 借支申请
* @return 结果
*/
@Override
public
int
insertTBorrowingApplyFor
(
TBorrowingApplyFor
tBorrowingApplyFor
)
{
tBorrowingApplyFor
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tBorrowingApplyForMapper
.
insertTBorrowingApplyFor
(
tBorrowingApplyFor
);
}
/**
* 修改借支申请
*
* @param tBorrowingApplyFor 借支申请
* @return 结果
*/
@Override
public
int
updateTBorrowingApplyFor
(
TBorrowingApplyFor
tBorrowingApplyFor
)
{
tBorrowingApplyFor
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
tBorrowingApplyForMapper
.
updateTBorrowingApplyFor
(
tBorrowingApplyFor
);
}
/**
* 批量删除借支申请
*
* @param borrowings 需要删除的借支申请ID
* @return 结果
*/
@Override
public
int
deleteTBorrowingApplyForByIds
(
Long
[]
borrowings
)
{
return
tBorrowingApplyForMapper
.
deleteTBorrowingApplyForByIds
(
borrowings
);
}
/**
* 删除借支申请信息
*
* @param borrowing 借支申请ID
* @return 结果
*/
@Override
public
int
deleteTBorrowingApplyForById
(
Long
borrowing
)
{
return
tBorrowingApplyForMapper
.
deleteTBorrowingApplyForById
(
borrowing
);
}
/**
* 查询部门余额是否足够
* @param tBorrowingApplyFor
* @return
*/
@Override
public
int
selectTacc
(
TBorrowingApplyFor
tBorrowingApplyFor
)
{
return
tBorrowingApplyForMapper
.
selectTacc
(
tBorrowingApplyFor
);
}
/**
* 修改部门余额
* @param tBorrowingApplyFor
*/
@Override
public
void
deletebBalance
(
TBorrowingApplyFor
tBorrowingApplyFor
)
{
tBorrowingApplyForMapper
.
deletebBalance
(
tBorrowingApplyFor
);
}
}
precision-effect-system/src/main/java/com/zehong/system/service/impl/TPurchaseServiceImpl.java
0 → 100644
View file @
a3bc6699
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TPurchaseMapper
;
import
com.zehong.system.domain.TPurchase
;
import
com.zehong.system.service.ITPurchaseService
;
/**
* 外部采购(报销)申请Service业务层处理
*
* @author zehong
* @date 2023-06-16
*/
@Service
public
class
TPurchaseServiceImpl
implements
ITPurchaseService
{
@Autowired
private
TPurchaseMapper
tPurchaseMapper
;
/**
* 查询外部采购(报销)申请
*
* @param purchaseId 外部采购(报销)申请ID
* @return 外部采购(报销)申请
*/
@Override
public
TPurchase
selectTPurchaseById
(
Long
purchaseId
)
{
return
tPurchaseMapper
.
selectTPurchaseById
(
purchaseId
);
}
/**
* 查询外部采购(报销)申请列表
*
* @param tPurchase 外部采购(报销)申请
* @return 外部采购(报销)申请
*/
@Override
public
List
<
TPurchase
>
selectTPurchaseList
(
TPurchase
tPurchase
)
{
return
tPurchaseMapper
.
selectTPurchaseList
(
tPurchase
);
}
/**
* 新增外部采购(报销)申请
*
* @param tPurchase 外部采购(报销)申请
* @return 结果
*/
@Override
public
int
insertTPurchase
(
TPurchase
tPurchase
)
{
tPurchase
.
setCreateTime
(
DateUtils
.
getNowDate
());
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
tPurchase
.
setPurchaseDeptId
(
user
.
getDeptId
());
tPurchase
.
setHandled_by_user_id
(
user
.
getUserId
());
//经办人
return
tPurchaseMapper
.
insertTPurchase
(
tPurchase
);
}
/**
* 修改外部采购(报销)申请
*
* @param tPurchase 外部采购(报销)申请
* @return 结果
*/
@Override
public
int
updateTPurchase
(
TPurchase
tPurchase
)
{
tPurchase
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
tPurchaseMapper
.
updateTPurchase
(
tPurchase
);
}
/**
* 批量删除外部采购(报销)申请
*
* @param purchaseIds 需要删除的外部采购(报销)申请ID
* @return 结果
*/
@Override
public
int
deleteTPurchaseByIds
(
Long
[]
purchaseIds
)
{
return
tPurchaseMapper
.
deleteTPurchaseByIds
(
purchaseIds
);
}
/**
* 删除外部采购(报销)申请信息
*
* @param purchaseId 外部采购(报销)申请ID
* @return 结果
*/
@Override
public
int
deleteTPurchaseById
(
Long
purchaseId
)
{
return
tPurchaseMapper
.
deleteTPurchaseById
(
purchaseId
);
}
}
precision-effect-system/src/main/java/com/zehong/system/service/impl/TTradeProjectServiceImpl.java
View file @
a3bc6699
...
...
@@ -168,4 +168,9 @@ public class TTradeProjectServiceImpl implements ITTradeProjectService
}
@Override
public
List
<
TTradeProject
>
getIncomeOrPayableList
(
TTradeProject
tTradeProject
)
{
return
tTradeProjectMapper
.
getIncomeOrPayableList
(
tTradeProject
);
}
}
precision-effect-system/src/main/resources/mapper/business/TPurchaseMapper.xml
0 → 100644
View file @
a3bc6699
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TPurchaseMapper"
>
<resultMap
type=
"TPurchase"
id=
"TPurchaseResult"
>
<result
property=
"purchaseId"
column=
"purchase_id"
/>
<result
property=
"purchaseDeptId"
column=
"purchase_dept_id"
/>
<result
property=
"purchaseName"
column=
"purchase_name"
/>
<result
property=
"specifications"
column=
"specifications"
/>
<result
property=
"modelType"
column=
"model_type"
/>
<result
property=
"applicationDescription"
column=
"application_description"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"price"
column=
"price"
/>
<result
property=
"count"
column=
"count"
/>
<result
property=
"total"
column=
"total"
/>
<result
property=
"purchaseDeptManagerId"
column=
"purchase_dept_manager_id"
/>
<result
property=
"approvedUserId"
column=
"approved_user_id"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"purchaseStatus"
column=
"purchase_status"
/>
<result
property=
"approvedTime"
column=
"approved_time"
/>
</resultMap>
<sql
id=
"selectTPurchaseVo"
>
select purchase_id, purchase_dept_id, purchase_name, specifications, model_type, application_description, user_id, price, count, total, purchase_dept_manager_id, approved_user_id, remark, create_time, is_del, update_time, purchase_status, approved_time from t_purchase
</sql>
<select
id=
"selectTPurchaseList"
parameterType=
"TPurchase"
resultMap=
"TPurchaseResult"
>
<include
refid=
"selectTPurchaseVo"
/>
<where>
<if
test=
"purchaseDeptId != null "
>
and purchase_dept_id = #{purchaseDeptId}
</if>
<if
test=
"purchaseName != null and purchaseName != ''"
>
and purchase_name like concat('%', #{purchaseName}, '%')
</if>
<if
test=
"specifications != null and specifications != ''"
>
and specifications = #{specifications}
</if>
<if
test=
"modelType != null and modelType != ''"
>
and model_type = #{modelType}
</if>
<if
test=
"applicationDescription != null and applicationDescription != ''"
>
and application_description = #{applicationDescription}
</if>
<if
test=
"userId != null "
>
and user_id = #{userId}
</if>
<if
test=
"price != null "
>
and price = #{price}
</if>
<if
test=
"count != null "
>
and count = #{count}
</if>
<if
test=
"total != null "
>
and total = #{total}
</if>
<if
test=
"purchaseDeptManagerId != null "
>
and purchase_dept_manager_id = #{purchaseDeptManagerId}
</if>
<if
test=
"approvedUserId != null "
>
and approved_user_id = #{approvedUserId}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
<if
test=
"purchaseStatus != null and purchaseStatus != ''"
>
and purchase_status = #{purchaseStatus}
</if>
<if
test=
"approvedTime != null "
>
and approved_time = #{approvedTime}
</if>
</where>
</select>
<select
id=
"selectTPurchaseById"
parameterType=
"Long"
resultMap=
"TPurchaseResult"
>
<include
refid=
"selectTPurchaseVo"
/>
where purchase_id = #{purchaseId}
</select>
<insert
id=
"insertTPurchase"
parameterType=
"TPurchase"
>
insert into t_purchase
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"purchaseId != null"
>
purchase_id,
</if>
<if
test=
"purchaseDeptId != null"
>
purchase_dept_id,
</if>
<if
test=
"purchaseName != null"
>
purchase_name,
</if>
<if
test=
"specifications != null"
>
specifications,
</if>
<if
test=
"modelType != null"
>
model_type,
</if>
<if
test=
"applicationDescription != null"
>
application_description,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"price != null"
>
price,
</if>
<if
test=
"count != null"
>
count,
</if>
<if
test=
"total != null"
>
total,
</if>
<if
test=
"purchaseDeptManagerId != null"
>
purchase_dept_manager_id,
</if>
<if
test=
"approvedUserId != null"
>
approved_user_id,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"purchaseStatus != null"
>
purchase_status,
</if>
<if
test=
"approvedTime != null"
>
approved_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"purchaseId != null"
>
#{purchaseId},
</if>
<if
test=
"purchaseDeptId != null"
>
#{purchaseDeptId},
</if>
<if
test=
"purchaseName != null"
>
#{purchaseName},
</if>
<if
test=
"specifications != null"
>
#{specifications},
</if>
<if
test=
"modelType != null"
>
#{modelType},
</if>
<if
test=
"applicationDescription != null"
>
#{applicationDescription},
</if>
<if
test=
"userId != null"
>
#{userId},
</if>
<if
test=
"price != null"
>
#{price},
</if>
<if
test=
"count != null"
>
#{count},
</if>
<if
test=
"total != null"
>
#{total},
</if>
<if
test=
"purchaseDeptManagerId != null"
>
#{purchaseDeptManagerId},
</if>
<if
test=
"approvedUserId != null"
>
#{approvedUserId},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"purchaseStatus != null"
>
#{purchaseStatus},
</if>
<if
test=
"approvedTime != null"
>
#{approvedTime},
</if>
</trim>
</insert>
<update
id=
"updateTPurchase"
parameterType=
"TPurchase"
>
update t_purchase
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"purchaseDeptId != null"
>
purchase_dept_id = #{purchaseDeptId},
</if>
<if
test=
"purchaseName != null"
>
purchase_name = #{purchaseName},
</if>
<if
test=
"specifications != null"
>
specifications = #{specifications},
</if>
<if
test=
"modelType != null"
>
model_type = #{modelType},
</if>
<if
test=
"applicationDescription != null"
>
application_description = #{applicationDescription},
</if>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"price != null"
>
price = #{price},
</if>
<if
test=
"count != null"
>
count = #{count},
</if>
<if
test=
"total != null"
>
total = #{total},
</if>
<if
test=
"purchaseDeptManagerId != null"
>
purchase_dept_manager_id = #{purchaseDeptManagerId},
</if>
<if
test=
"approvedUserId != null"
>
approved_user_id = #{approvedUserId},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"purchaseStatus != null"
>
purchase_status = #{purchaseStatus},
</if>
<if
test=
"approvedTime != null"
>
approved_time = #{approvedTime},
</if>
</trim>
where purchase_id = #{purchaseId}
</update>
<delete
id=
"deleteTPurchaseById"
parameterType=
"Long"
>
delete from t_purchase where purchase_id = #{purchaseId}
</delete>
<delete
id=
"deleteTPurchaseByIds"
parameterType=
"String"
>
delete from t_purchase where purchase_id in
<foreach
item=
"purchaseId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{purchaseId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
precision-effect-system/src/main/resources/mapper/business/TTradeProjectMapper.xml
View file @
a3bc6699
...
...
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"tradeId"
column=
"trade_id"
/>
<result
property=
"receiptNum"
column=
"receipt_num"
/>
<result
property=
"relationTransactionProjectId"
column=
"relation_transaction_project_id"
/>
<result
property=
"projectName"
column=
"project_name"
/>
<result
property=
"applyId"
column=
"apply_id"
/>
<result
property=
"applyDeptId"
column=
"apply_dept_id"
/>
<result
property=
"applyDeptManagerId"
column=
"apply_dept_manager_id"
/>
...
...
@@ -222,4 +223,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND trade_status = '3'
AND pending_payment > 0
</select>
<select
id=
"getIncomeOrPayableList"
parameterType=
"TTradeProject"
resultMap=
"TTradeProjectResult"
>
SELECT
trade_id,
receipt_num,
relation_transaction_project_id,
apply_id,
apply_dept_id,
apply_dept_manager_id,
(select transaction_project_name from t_transaction_project where transaction_project_id=relation_transaction_project_id) project_name,
trade_transactor,
trade_dept_id,
trade_price,
trade_count,
trade_total,
trade_score,
trade_dept_manager_id,
settlement_time,
deal_price,
pending_payment,
attachment_url,
trade_status,
create_time,
update_time,
is_del,
remark,
deal_remark,
(SELECT nick_name FROM sys_user WHERE user_id = trade_transactor) AS trade_transactor_name,
(SELECT nick_name FROM sys_user WHERE user_id = apply_id) AS apply_name,
(SELECT dept_name FROM sys_dept WHERE dept_id = apply_dept_id) AS apply_dept_name,
(SELECT dept_name FROM sys_dept WHERE dept_id = trade_dept_id) AS trade_dept_name
FROM
t_trade_project
<where>
trade_status =3 and pending_payment>0
<if
test=
"applyDeptId != null"
>
and apply_dept_id = #{applyDeptId}
</if>
<if
test=
"tradeTransactor != null"
>
and trade_transactor = #{tradeTransactor}
</if>
<if
test=
"tradeDeptId != null"
>
and trade_dept_id = #{tradeDeptId}
</if>
</where>
order by create_time desc
</select>
</mapper>
\ No newline at end of file
precision-effect-system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
a3bc6699
precision-effect-system/src/main/resources/mapper/system/TBorrowingApplyForMapper.xml
0 → 100644
View file @
a3bc6699
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TBorrowingApplyForMapper"
>
<resultMap
type=
"TBorrowingApplyFor"
id=
"TBorrowingApplyForResult"
>
<result
property=
"borrowing"
column=
"borrowing"
/>
<result
property=
"feeName"
column=
"fee_name"
/>
<result
property=
"borrowingDeptId"
column=
"borrowing_dept_id"
/>
<result
property=
"handledByUserId"
column=
"handled_by_user_id"
/>
<result
property=
"applicationDescription"
column=
"application_description"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"totalWords"
column=
"total_words"
/>
<result
property=
"totalFigures"
column=
"total_figures"
/>
<result
property=
"approvedUserId"
column=
"approved_user_id"
/>
<result
property=
"registrationDate"
column=
"registration_date"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"attachmentUrl"
column=
"attachment_url"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"approvalStatus"
column=
"approval_status"
/>
</resultMap>
<sql
id=
"selectTBorrowingApplyForVo"
>
select borrowing, fee_name, borrowing_dept_id, handled_by_user_id, application_description, user_id, total_words, total_figures, approved_user_id, registration_date, remark, attachment_url, is_del, create_time, update_time,approval_status from t_borrowing_apply_for
</sql>
<select
id=
"selectTBorrowingApplyForList"
parameterType=
"TBorrowingApplyFor"
resultMap=
"TBorrowingApplyForResult"
>
SELECT a.*,b.nick_name handledByUserIdName,c.nick_name userIdName,d.nick_name ApprovedUserIdName FROM t_borrowing_apply_for a
left join sys_user b on a.handled_by_user_id=b.user_id
left join sys_user c on a.user_id=c.user_id
left join sys_user d on a.approved_user_id=d.user_id
<where>
<if
test=
"feeName != null and feeName != ''"
>
and a.fee_name like concat('%', #{feeName}, '%')
</if>
<if
test=
"borrowingDeptId != null "
>
and a.borrowing_dept_id = #{borrowingDeptId}
</if>
<if
test=
"handledByUserId != null "
>
and a.handled_by_user_id = #{handledByUserId}
</if>
<if
test=
"applicationDescription != null and applicationDescription != ''"
>
and a.application_description = #{applicationDescription}
</if>
<if
test=
"userId != null "
>
and a.user_id = #{userId}
</if>
<if
test=
"totalWords != null and totalWords != ''"
>
and a.total_words = #{totalWords}
</if>
<if
test=
"totalFigures != null "
>
and a.total_figures = #{totalFigures}
</if>
<if
test=
"approvedUserId != null "
>
and a.approved_user_id = #{approvedUserId}
</if>
<if
test=
"registrationDate != null "
>
and a.registration_date = #{registrationDate}
</if>
<if
test=
"attachmentUrl != null and attachmentUrl != ''"
>
and a.attachment_url = #{attachmentUrl}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and a.is_del = #{isDel}
</if>
</where>
order by a.borrowing desc
</select>
<select
id=
"selectTBorrowingApplyForById"
parameterType=
"Long"
resultMap=
"TBorrowingApplyForResult"
>
<include
refid=
"selectTBorrowingApplyForVo"
/>
where borrowing = #{borrowing}
</select>
<insert
id=
"insertTBorrowingApplyFor"
parameterType=
"TBorrowingApplyFor"
>
insert into t_borrowing_apply_for
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"borrowing != null"
>
borrowing,
</if>
<if
test=
"feeName != null"
>
fee_name,
</if>
<if
test=
"borrowingDeptId != null"
>
borrowing_dept_id,
</if>
<if
test=
"handledByUserId != null"
>
handled_by_user_id,
</if>
<if
test=
"applicationDescription != null"
>
application_description,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"totalWords != null"
>
total_words,
</if>
<if
test=
"totalFigures != null"
>
total_figures,
</if>
<if
test=
"approvedUserId != null"
>
approved_user_id,
</if>
<if
test=
"registrationDate != null"
>
registration_date,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"attachmentUrl != null"
>
attachment_url,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"borrowing != null"
>
#{borrowing},
</if>
<if
test=
"feeName != null"
>
#{feeName},
</if>
<if
test=
"borrowingDeptId != null"
>
#{borrowingDeptId},
</if>
<if
test=
"handledByUserId != null"
>
#{handledByUserId},
</if>
<if
test=
"applicationDescription != null"
>
#{applicationDescription},
</if>
<if
test=
"userId != null"
>
#{userId},
</if>
<if
test=
"totalWords != null"
>
#{totalWords},
</if>
<if
test=
"totalFigures != null"
>
#{totalFigures},
</if>
<if
test=
"approvedUserId != null"
>
#{approvedUserId},
</if>
<if
test=
"registrationDate != null"
>
#{registrationDate},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"attachmentUrl != null"
>
#{attachmentUrl},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
</trim>
</insert>
<update
id=
"updateTBorrowingApplyFor"
parameterType=
"TBorrowingApplyFor"
>
update t_borrowing_apply_for
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"feeName != null"
>
fee_name = #{feeName},
</if>
<if
test=
"borrowingDeptId != null"
>
borrowing_dept_id = #{borrowingDeptId},
</if>
<if
test=
"handledByUserId != null"
>
handled_by_user_id = #{handledByUserId},
</if>
<if
test=
"applicationDescription != null"
>
application_description = #{applicationDescription},
</if>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"totalWords != null"
>
total_words = #{totalWords},
</if>
<if
test=
"totalFigures != null"
>
total_figures = #{totalFigures},
</if>
<if
test=
"approvedUserId != null"
>
approved_user_id = #{approvedUserId},
</if>
<if
test=
"registrationDate != null"
>
registration_date = #{registrationDate},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"attachmentUrl != null"
>
attachment_url = #{attachmentUrl},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"approvalStatus != null"
>
approval_status = #{approvalStatus},
</if>
</trim>
where borrowing = #{borrowing}
</update>
<delete
id=
"deleteTBorrowingApplyForById"
parameterType=
"Long"
>
delete from t_borrowing_apply_for where borrowing = #{borrowing}
</delete>
<delete
id=
"deleteTBorrowingApplyForByIds"
parameterType=
"String"
>
delete from t_borrowing_apply_for where borrowing in
<foreach
item=
"borrowing"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{borrowing}
</foreach>
</delete>
<!--查询部门余额是否足够-->
<select
id=
"selectTacc"
resultType=
"java.lang.Integer"
>
select count(account_id) from t_account where dept_id=#{borrowingDeptId} and able_amount >= #{totalFigures}
</select>
<!--修改部门余额-->
<update
id=
"deletebBalance"
>
update t_account set able_amount= able_amount- #{totalFigures} where dept_id=#{borrowingDeptId}
</update>
</mapper>
precision-effect-web/src/api/system/for.js
0 → 100644
View file @
a3bc6699
import
request
from
'@/utils/request'
// 查询借支申请列表
export
function
listFor
(
query
)
{
return
request
({
url
:
'/system/for/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询借支申请详细
export
function
getFor
(
borrowing
)
{
return
request
({
url
:
'/system/for/'
+
borrowing
,
method
:
'get'
})
}
// 新增借支申请
export
function
addFor
(
data
)
{
return
request
({
url
:
'/system/for'
,
method
:
'post'
,
data
:
data
})
}
// 修改借支申请
export
function
updateFor
(
data
)
{
return
request
({
url
:
'/system/for'
,
method
:
'put'
,
data
:
data
})
}
// 删除借支申请
export
function
delFor
(
borrowing
)
{
return
request
({
url
:
'/system/for/'
+
borrowing
,
method
:
'delete'
})
}
// 导出借支申请
export
function
exportFor
(
query
)
{
return
request
({
url
:
'/system/for/export'
,
method
:
'get'
,
params
:
query
})
}
\ No newline at end of file
precision-effect-web/src/api/transaction/purchase.js
0 → 100644
View file @
a3bc6699
import
request
from
'@/utils/request'
// 查询外部采购(报销)申请列表
export
function
listPurchase
(
query
)
{
return
request
({
url
:
'/system/purchase/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询外部采购(报销)申请详细
export
function
getPurchase
(
purchaseId
)
{
return
request
({
url
:
'/system/purchase/'
+
purchaseId
,
method
:
'get'
})
}
// 新增外部采购(报销)申请
export
function
addPurchase
(
data
)
{
return
request
({
url
:
'/system/purchase'
,
method
:
'post'
,
data
:
data
})
}
// 修改外部采购(报销)申请
export
function
updatePurchase
(
data
)
{
return
request
({
url
:
'/system/purchase'
,
method
:
'put'
,
data
:
data
})
}
// 删除外部采购(报销)申请
export
function
delPurchase
(
purchaseId
)
{
return
request
({
url
:
'/system/purchase/'
+
purchaseId
,
method
:
'delete'
})
}
// 导出外部采购(报销)申请
export
function
exportPurchase
(
query
)
{
return
request
({
url
:
'/system/purchase/export'
,
method
:
'get'
,
params
:
query
})
}
\ No newline at end of file
precision-effect-web/src/views/account/component/MoneyTable.vue
View file @
a3bc6699
...
...
@@ -13,13 +13,15 @@
<el-table-column
label=
"交易项目"
align=
"center"
prop=
"
a
"
prop=
"
projectName
"
:formatter=
"formatter"
/>
<el-table-column
label=
"卖方
"
align=
"center"
prop=
"tradeTransactor
Name"
/>
<el-table-column
label=
"卖方
部门"
align=
"center"
prop=
"applyDept
Name"
/>
<el-table-column
label=
"申请人"
align=
"center"
prop=
"applyName"
/>
<el-table-column
label=
"买方"
align=
"center"
prop=
"applyDeptName"
/>
<el-table-column
label=
"买方经办人"
align=
"center"
prop=
"tradeDeptName"
/>
<el-table-column
label=
"申请时间"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"买方部门"
align=
"center"
prop=
"tradeDeptName"
/>
<el-table-column
label=
"买方经办人"
align=
"center"
prop=
"tradeTransactorName"
/>
<template
v-if=
"or === 'income'"
>
<el-table-column
label=
"应收金额"
...
...
precision-effect-web/src/views/for/index.vue
0 → 100644
View file @
a3bc6699
This diff is collapsed.
Click to expand it.
precision-effect-web/src/views/purchase/index.vue
0 → 100644
View file @
a3bc6699
This diff is collapsed.
Click to expand it.
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