Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qianhe-ydsj
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
qianhe-ydsj
Commits
03d515cf
Commit
03d515cf
authored
Jul 05, 2024
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
724f862c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1156 additions
and
0 deletions
+1156
-0
qianhe-ydsj/src/main/java/com/qianhe/controller/SjFybpController.java
+142
-0
qianhe-ydsj/src/main/java/com/qianhe/controller/SjFybpWhController.java
+104
-0
qianhe-ydsj/src/main/java/com/qianhe/domain/SjFybp.java
+109
-0
qianhe-ydsj/src/main/java/com/qianhe/domain/SjFybpWh.java
+151
-0
qianhe-ydsj/src/main/java/com/qianhe/mapper/SjFybpMapper.java
+87
-0
qianhe-ydsj/src/main/java/com/qianhe/mapper/SjFybpWhMapper.java
+61
-0
qianhe-ydsj/src/main/java/com/qianhe/service/ISjFybpService.java
+66
-0
qianhe-ydsj/src/main/java/com/qianhe/service/ISjFybpWhService.java
+61
-0
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjFybpServiceImpl.java
+186
-0
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjFybpWhServiceImpl.java
+93
-0
qianhe-ydsj/src/main/resources/mapper/SjFybpMapper.xml
+0
-0
qianhe-ydsj/src/main/resources/mapper/SjFybpWhMapper.xml
+96
-0
No files found.
qianhe-ydsj/src/main/java/com/qianhe/controller/SjFybpController.java
0 → 100644
View file @
03d515cf
package
com
.
qianhe
.
controller
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
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.qianhe.common.annotation.Log
;
import
com.qianhe.common.core.controller.BaseController
;
import
com.qianhe.common.core.domain.AjaxResult
;
import
com.qianhe.common.enums.BusinessType
;
import
com.qianhe.domain.SjFybp
;
import
com.qianhe.service.ISjFybpService
;
import
com.qianhe.common.utils.poi.ExcelUtil
;
import
com.qianhe.common.core.page.TableDataInfo
;
/**
* 三基-费用报批Controller
*
* @author qianhe
* @date 2024-07-05
*/
@RestController
@RequestMapping
(
"/system/sjFybp"
)
public
class
SjFybpController
extends
BaseController
{
@Autowired
private
ISjFybpService
sjFybpService
;
/**
* 查询三基-费用报批列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybp:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SjFybp
sjFybp
)
{
startPage
();
List
<
SjFybp
>
list
=
sjFybpService
.
selectSjFybpList
(
sjFybp
);
return
getDataTable
(
list
);
}
/**
* 导出三基-费用报批列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybp:export')"
)
@Log
(
title
=
"三基-费用报批"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjFybp
sjFybp
)
{
List
<
SjFybp
>
list
=
sjFybpService
.
selectSjFybpList
(
sjFybp
);
ExcelUtil
<
SjFybp
>
util
=
new
ExcelUtil
<
SjFybp
>(
SjFybp
.
class
);
util
.
exportExcel
(
response
,
list
,
"三基-费用报批数据"
);
}
/**
* 获取三基-费用报批详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybp:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
sjFybpService
.
selectSjFybpById
(
id
));
}
/**
* 新增三基-费用报批
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybp:add')"
)
@Log
(
title
=
"三基-费用报批"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SjFybp
sjFybp
)
{
return
toAjax
(
sjFybpService
.
insertSjFybp
(
sjFybp
));
}
/**
* 修改三基-费用报批
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybp:edit')"
)
@Log
(
title
=
"三基-费用报批"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SjFybp
sjFybp
)
{
return
toAjax
(
sjFybpService
.
updateSjFybp
(
sjFybp
));
}
/**
* 删除三基-费用报批
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybp:remove')"
)
@Log
(
title
=
"三基-费用报批"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
sjFybpService
.
deleteSjFybpByIds
(
ids
));
}
/**
* 提交或审批
*/
// @PreAuthorize("@ss.hasPermi('system:sjFybp:tj')")
@Log
(
title
=
"三基-费用报批"
,
businessType
=
BusinessType
.
UPDATE
)
@PostMapping
(
"/tj"
)
public
AjaxResult
tj
(
@RequestBody
SjFybp
sjFybp
)
{
return
toAjax
(
sjFybpService
.
tj
(
sjFybp
));
}
/**
* 查询三基-费用报批列表
*/
@GetMapping
(
"/splist"
)
public
TableDataInfo
splist
(
SjFybp
sjFybp
)
{
startPage
();
List
<
SjFybp
>
list
=
sjFybpService
.
selectSjFybpList
(
sjFybp
);
return
getDataTable
(
list
);
}
/**
* 费用维护
*/
// @PreAuthorize("@ss.hasPermi('system:sjFybp:fywh')")
@Log
(
title
=
"三基-费用报批"
,
businessType
=
BusinessType
.
UPDATE
)
@PostMapping
(
"fywh"
)
public
AjaxResult
fywh
(
@RequestBody
SjFybp
sjFybp
)
{
return
toAjax
(
sjFybpService
.
fywh
(
sjFybp
));
}
}
qianhe-ydsj/src/main/java/com/qianhe/controller/SjFybpWhController.java
0 → 100644
View file @
03d515cf
package
com
.
qianhe
.
controller
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
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.qianhe.common.annotation.Log
;
import
com.qianhe.common.core.controller.BaseController
;
import
com.qianhe.common.core.domain.AjaxResult
;
import
com.qianhe.common.enums.BusinessType
;
import
com.qianhe.domain.SjFybpWh
;
import
com.qianhe.service.ISjFybpWhService
;
import
com.qianhe.common.utils.poi.ExcelUtil
;
import
com.qianhe.common.core.page.TableDataInfo
;
/**
* 三基-费用维护Controller
*
* @author qianhe
* @date 2024-07-05
*/
@RestController
@RequestMapping
(
"/system/sjFybpWh"
)
public
class
SjFybpWhController
extends
BaseController
{
@Autowired
private
ISjFybpWhService
sjFybpWhService
;
/**
* 查询三基-费用维护列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybpWh:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SjFybpWh
sjFybpWh
)
{
// startPage();
List
<
SjFybpWh
>
list
=
sjFybpWhService
.
selectSjFybpWhList
(
sjFybpWh
);
return
getDataTable
(
list
);
}
/**
* 导出三基-费用维护列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybpWh:export')"
)
@Log
(
title
=
"三基-费用维护"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjFybpWh
sjFybpWh
)
{
List
<
SjFybpWh
>
list
=
sjFybpWhService
.
selectSjFybpWhList
(
sjFybpWh
);
ExcelUtil
<
SjFybpWh
>
util
=
new
ExcelUtil
<
SjFybpWh
>(
SjFybpWh
.
class
);
util
.
exportExcel
(
response
,
list
,
"三基-费用维护数据"
);
}
/**
* 获取三基-费用维护详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybpWh:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
sjFybpWhService
.
selectSjFybpWhById
(
id
));
}
/**
* 新增三基-费用维护
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybpWh:add')"
)
@Log
(
title
=
"三基-费用维护"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SjFybpWh
sjFybpWh
)
{
return
toAjax
(
sjFybpWhService
.
insertSjFybpWh
(
sjFybpWh
));
}
/**
* 修改三基-费用维护
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybpWh:edit')"
)
@Log
(
title
=
"三基-费用维护"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SjFybpWh
sjFybpWh
)
{
return
toAjax
(
sjFybpWhService
.
updateSjFybpWh
(
sjFybpWh
));
}
/**
* 删除三基-费用维护
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFybpWh:remove')"
)
@Log
(
title
=
"三基-费用维护"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
sjFybpWhService
.
deleteSjFybpWhByIds
(
ids
));
}
}
qianhe-ydsj/src/main/java/com/qianhe/domain/SjFybp.java
0 → 100644
View file @
03d515cf
package
com
.
qianhe
.
domain
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
com.qianhe.domain.SjFybpWh
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.qianhe.common.annotation.Excel
;
import
com.qianhe.common.core.domain.BaseEntity
;
/**
* 三基-费用报批对象 sj_fybp
*
* @author qianhe
* @date 2024-07-05
*/
@Data
public
class
SjFybp
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
private
Long
id
;
/** 费用名称 */
@Excel
(
name
=
"费用名称"
)
private
String
fymc
;
/** 费用日期 */
@Excel
(
name
=
"费用日期"
)
private
String
fyrq
;
/** 单位 */
@Excel
(
name
=
"单位"
)
private
String
deptId
;
/** 费用类型 */
@Excel
(
name
=
"费用类型"
)
private
String
fylx
;
/** 费用描述 */
@Excel
(
name
=
"费用描述"
)
private
String
fyms
;
/** 费用金额 */
@Excel
(
name
=
"费用金额"
)
private
BigDecimal
fyje
;
/** 文件关联id */
@Excel
(
name
=
"文件关联id"
)
private
String
fjid
;
/** 状态(未提交、待审批、已审批、已驳回) */
@Excel
(
name
=
"状态(未提交、待审批、已审批、已驳回)"
)
private
String
zt
;
/** 提交人 */
@Excel
(
name
=
"提交人"
)
private
String
tjr
;
/** 审批日期 */
@Excel
(
name
=
"审批日期"
)
private
String
sprq
;
/** 审批人 */
@Excel
(
name
=
"审批人"
)
private
String
spr
;
/** 批复金额 */
@Excel
(
name
=
"批复金额"
)
private
BigDecimal
pfje
;
/** 已使用金额 */
@Excel
(
name
=
"已使用金额"
)
private
BigDecimal
ysyje
;
/** 审批意见 */
@Excel
(
name
=
"审批意见"
)
private
String
spyj
;
/** 预留1 */
@Excel
(
name
=
"预留1"
)
private
String
yl1
;
/** 预留2 */
@Excel
(
name
=
"预留2"
)
private
String
yl2
;
/** 预留3 */
@Excel
(
name
=
"预留3"
)
private
String
yl3
;
/** 预留4 */
@Excel
(
name
=
"预留4"
)
private
String
yl4
;
/** 预留5 */
@Excel
(
name
=
"预留5"
)
private
String
yl5
;
//费用审批查询 (传1 查不等于未提交的数据,2查等于已批复的数据)
private
String
spcx
;
/** 三基-费用维护信息 */
private
List
<
SjFybpWh
>
sjFybpWhList
;
private
List
<
WdWdxx
>
fileList
;
}
qianhe-ydsj/src/main/java/com/qianhe/domain/SjFybpWh.java
0 → 100644
View file @
03d515cf
package
com
.
qianhe
.
domain
;
import
java.math.BigDecimal
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.qianhe.common.annotation.Excel
;
import
com.qianhe.common.core.domain.BaseEntity
;
/**
* 三基-费用维护对象 sj_fybp_wh
*
* @author qianhe
* @date 2024-07-05
*/
public
class
SjFybpWh
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
private
Long
id
;
/** 费用报批id */
@Excel
(
name
=
"费用报批id"
)
private
Long
fybpId
;
/** 使用日期 */
@Excel
(
name
=
"使用日期"
)
private
String
syrq
;
/** 费用金额 */
@Excel
(
name
=
"费用金额"
)
private
BigDecimal
syje
;
/** 预留1 */
@Excel
(
name
=
"预留1"
)
private
String
yl1
;
/** 预留2 */
@Excel
(
name
=
"预留2"
)
private
String
yl2
;
/** 预留3 */
@Excel
(
name
=
"预留3"
)
private
String
yl3
;
/** 预留4 */
@Excel
(
name
=
"预留4"
)
private
String
yl4
;
/** 预留5 */
@Excel
(
name
=
"预留5"
)
private
String
yl5
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setFybpId
(
Long
fybpId
)
{
this
.
fybpId
=
fybpId
;
}
public
Long
getFybpId
()
{
return
fybpId
;
}
public
void
setSyrq
(
String
syrq
)
{
this
.
syrq
=
syrq
;
}
public
String
getSyrq
()
{
return
syrq
;
}
public
void
setSyje
(
BigDecimal
syje
)
{
this
.
syje
=
syje
;
}
public
BigDecimal
getSyje
()
{
return
syje
;
}
public
void
setYl1
(
String
yl1
)
{
this
.
yl1
=
yl1
;
}
public
String
getYl1
()
{
return
yl1
;
}
public
void
setYl2
(
String
yl2
)
{
this
.
yl2
=
yl2
;
}
public
String
getYl2
()
{
return
yl2
;
}
public
void
setYl3
(
String
yl3
)
{
this
.
yl3
=
yl3
;
}
public
String
getYl3
()
{
return
yl3
;
}
public
void
setYl4
(
String
yl4
)
{
this
.
yl4
=
yl4
;
}
public
String
getYl4
()
{
return
yl4
;
}
public
void
setYl5
(
String
yl5
)
{
this
.
yl5
=
yl5
;
}
public
String
getYl5
()
{
return
yl5
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"fybpId"
,
getFybpId
())
.
append
(
"syrq"
,
getSyrq
())
.
append
(
"syje"
,
getSyje
())
.
append
(
"remark"
,
getRemark
())
.
append
(
"yl1"
,
getYl1
())
.
append
(
"yl2"
,
getYl2
())
.
append
(
"yl3"
,
getYl3
())
.
append
(
"yl4"
,
getYl4
())
.
append
(
"yl5"
,
getYl5
())
.
toString
();
}
}
qianhe-ydsj/src/main/java/com/qianhe/mapper/SjFybpMapper.java
0 → 100644
View file @
03d515cf
package
com
.
qianhe
.
mapper
;
import
java.util.List
;
import
com.qianhe.domain.SjFybp
;
import
com.qianhe.domain.SjFybpWh
;
/**
* 三基-费用报批Mapper接口
*
* @author qianhe
* @date 2024-07-05
*/
public
interface
SjFybpMapper
{
/**
* 查询三基-费用报批
*
* @param id 三基-费用报批主键
* @return 三基-费用报批
*/
public
SjFybp
selectSjFybpById
(
Long
id
);
/**
* 查询三基-费用报批列表
*
* @param sjFybp 三基-费用报批
* @return 三基-费用报批集合
*/
public
List
<
SjFybp
>
selectSjFybpList
(
SjFybp
sjFybp
);
/**
* 新增三基-费用报批
*
* @param sjFybp 三基-费用报批
* @return 结果
*/
public
int
insertSjFybp
(
SjFybp
sjFybp
);
/**
* 修改三基-费用报批
*
* @param sjFybp 三基-费用报批
* @return 结果
*/
public
int
updateSjFybp
(
SjFybp
sjFybp
);
/**
* 删除三基-费用报批
*
* @param id 三基-费用报批主键
* @return 结果
*/
public
int
deleteSjFybpById
(
Long
id
);
/**
* 批量删除三基-费用报批
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSjFybpByIds
(
Long
[]
ids
);
/**
* 批量删除三基-费用维护
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSjFybpWhByFybpIds
(
Long
[]
ids
);
/**
* 批量新增三基-费用维护
*
* @param sjFybpWhList 三基-费用维护列表
* @return 结果
*/
public
int
batchSjFybpWh
(
List
<
SjFybpWh
>
sjFybpWhList
);
/**
* 通过三基-费用报批主键删除三基-费用维护信息
*
* @param id 三基-费用报批ID
* @return 结果
*/
public
int
deleteSjFybpWhByFybpId
(
Long
id
);
}
qianhe-ydsj/src/main/java/com/qianhe/mapper/SjFybpWhMapper.java
0 → 100644
View file @
03d515cf
package
com
.
qianhe
.
mapper
;
import
java.util.List
;
import
com.qianhe.domain.SjFybpWh
;
/**
* 三基-费用维护Mapper接口
*
* @author qianhe
* @date 2024-07-05
*/
public
interface
SjFybpWhMapper
{
/**
* 查询三基-费用维护
*
* @param id 三基-费用维护主键
* @return 三基-费用维护
*/
public
SjFybpWh
selectSjFybpWhById
(
Long
id
);
/**
* 查询三基-费用维护列表
*
* @param sjFybpWh 三基-费用维护
* @return 三基-费用维护集合
*/
public
List
<
SjFybpWh
>
selectSjFybpWhList
(
SjFybpWh
sjFybpWh
);
/**
* 新增三基-费用维护
*
* @param sjFybpWh 三基-费用维护
* @return 结果
*/
public
int
insertSjFybpWh
(
SjFybpWh
sjFybpWh
);
/**
* 修改三基-费用维护
*
* @param sjFybpWh 三基-费用维护
* @return 结果
*/
public
int
updateSjFybpWh
(
SjFybpWh
sjFybpWh
);
/**
* 删除三基-费用维护
*
* @param id 三基-费用维护主键
* @return 结果
*/
public
int
deleteSjFybpWhById
(
Long
id
);
/**
* 批量删除三基-费用维护
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSjFybpWhByIds
(
Long
[]
ids
);
}
qianhe-ydsj/src/main/java/com/qianhe/service/ISjFybpService.java
0 → 100644
View file @
03d515cf
package
com
.
qianhe
.
service
;
import
java.util.List
;
import
com.qianhe.domain.SjFybp
;
/**
* 三基-费用报批Service接口
*
* @author qianhe
* @date 2024-07-05
*/
public
interface
ISjFybpService
{
/**
* 查询三基-费用报批
*
* @param id 三基-费用报批主键
* @return 三基-费用报批
*/
public
SjFybp
selectSjFybpById
(
Long
id
);
/**
* 查询三基-费用报批列表
*
* @param sjFybp 三基-费用报批
* @return 三基-费用报批集合
*/
public
List
<
SjFybp
>
selectSjFybpList
(
SjFybp
sjFybp
);
/**
* 新增三基-费用报批
*
* @param sjFybp 三基-费用报批
* @return 结果
*/
public
int
insertSjFybp
(
SjFybp
sjFybp
);
/**
* 修改三基-费用报批
*
* @param sjFybp 三基-费用报批
* @return 结果
*/
public
int
updateSjFybp
(
SjFybp
sjFybp
);
/**
* 批量删除三基-费用报批
*
* @param ids 需要删除的三基-费用报批主键集合
* @return 结果
*/
public
int
deleteSjFybpByIds
(
Long
[]
ids
);
/**
* 删除三基-费用报批信息
*
* @param id 三基-费用报批主键
* @return 结果
*/
public
int
deleteSjFybpById
(
Long
id
);
int
tj
(
SjFybp
sjFybp
);
int
fywh
(
SjFybp
sjFybp
);
}
qianhe-ydsj/src/main/java/com/qianhe/service/ISjFybpWhService.java
0 → 100644
View file @
03d515cf
package
com
.
qianhe
.
service
;
import
java.util.List
;
import
com.qianhe.domain.SjFybpWh
;
/**
* 三基-费用维护Service接口
*
* @author qianhe
* @date 2024-07-05
*/
public
interface
ISjFybpWhService
{
/**
* 查询三基-费用维护
*
* @param id 三基-费用维护主键
* @return 三基-费用维护
*/
public
SjFybpWh
selectSjFybpWhById
(
Long
id
);
/**
* 查询三基-费用维护列表
*
* @param sjFybpWh 三基-费用维护
* @return 三基-费用维护集合
*/
public
List
<
SjFybpWh
>
selectSjFybpWhList
(
SjFybpWh
sjFybpWh
);
/**
* 新增三基-费用维护
*
* @param sjFybpWh 三基-费用维护
* @return 结果
*/
public
int
insertSjFybpWh
(
SjFybpWh
sjFybpWh
);
/**
* 修改三基-费用维护
*
* @param sjFybpWh 三基-费用维护
* @return 结果
*/
public
int
updateSjFybpWh
(
SjFybpWh
sjFybpWh
);
/**
* 批量删除三基-费用维护
*
* @param ids 需要删除的三基-费用维护主键集合
* @return 结果
*/
public
int
deleteSjFybpWhByIds
(
Long
[]
ids
);
/**
* 删除三基-费用维护信息
*
* @param id 三基-费用维护主键
* @return 结果
*/
public
int
deleteSjFybpWhById
(
Long
id
);
}
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjFybpServiceImpl.java
0 → 100644
View file @
03d515cf
package
com
.
qianhe
.
service
.
impl
;
import
java.util.List
;
import
com.qianhe.common.annotation.DataScope
;
import
com.qianhe.common.core.domain.entity.SysDept
;
import
com.qianhe.common.utils.DateUtils
;
import
com.qianhe.common.utils.SecurityUtils
;
import
com.qianhe.domain.WdLxwh
;
import
com.qianhe.mapper.SjFybpWhMapper
;
import
com.qianhe.mapper.WdWdxxMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
com.qianhe.common.utils.StringUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.qianhe.domain.SjFybpWh
;
import
com.qianhe.mapper.SjFybpMapper
;
import
com.qianhe.domain.SjFybp
;
import
com.qianhe.service.ISjFybpService
;
/**
* 三基-费用报批Service业务层处理
*
* @author qianhe
* @date 2024-07-05
*/
@Service
public
class
SjFybpServiceImpl
implements
ISjFybpService
{
@Autowired
private
SjFybpMapper
sjFybpMapper
;
@Autowired
private
SjFybpWhMapper
sjFybpWhMapper
;
@Autowired
private
WdWdxxMapper
wdWdxxMapper
;
/**
* 查询三基-费用报批
*
* @param id 三基-费用报批主键
* @return 三基-费用报批
*/
@Override
public
SjFybp
selectSjFybpById
(
Long
id
)
{
SjFybp
sjFybp
=
sjFybpMapper
.
selectSjFybpById
(
id
);
//查询费用维护
SjFybpWh
sjFybpWh
=
new
SjFybpWh
();
List
<
SjFybpWh
>
sjFybpWhs
=
sjFybpWhMapper
.
selectSjFybpWhList
(
sjFybpWh
);
sjFybp
.
setSjFybpWhList
(
sjFybpWhs
);
return
sjFybp
;
}
/**
* 查询三基-费用报批列表
*
* @param sjFybp 三基-费用报批
* @return 三基-费用报批
*/
@Override
@DataScope
(
deptAlias
=
"d"
)
public
List
<
SjFybp
>
selectSjFybpList
(
SjFybp
sjFybp
)
{
return
sjFybpMapper
.
selectSjFybpList
(
sjFybp
);
}
/**
* 新增三基-费用报批
*
* @param sjFybp 三基-费用报批
* @return 结果
*/
@Transactional
@Override
public
int
insertSjFybp
(
SjFybp
sjFybp
)
{
sjFybp
.
setCreateTime
(
DateUtils
.
getNowDate
());
sjFybp
.
setCreateBy
(
SecurityUtils
.
getUsername
());
int
rows
=
sjFybpMapper
.
insertSjFybp
(
sjFybp
);
//保存文件
if
(
sjFybp
.
getFileList
().
size
()>
0
){
sjFybp
.
getFileList
().
forEach
(
file
->{
file
.
setGlId
(
sjFybp
.
getId
().
toString
());
file
.
setMkmc
(
"费用报批"
);
file
.
setFjlx
(
"费用上报"
);
file
.
setLrr
(
SecurityUtils
.
getUsername
());
wdWdxxMapper
.
insertWdWdxx
(
file
);
});
}
return
rows
;
}
/**
* 修改三基-费用报批
*
* @param sjFybp 三基-费用报批
* @return 结果
*/
@Transactional
@Override
public
int
updateSjFybp
(
SjFybp
sjFybp
)
{
//先删除文件
wdWdxxMapper
.
deleteWdWdxxByGlIdAndMkmc
(
sjFybp
.
getId
()+
""
,
"费用报批"
);
//保存文件
if
(
sjFybp
.
getFileList
().
size
()>
0
){
sjFybp
.
getFileList
().
forEach
(
file
->{
file
.
setGlId
(
sjFybp
.
getId
().
toString
());
file
.
setMkmc
(
"费用报批"
);
file
.
setFjlx
(
"费用上报"
);
file
.
setLrr
(
SecurityUtils
.
getUsername
());
wdWdxxMapper
.
insertWdWdxx
(
file
);
});
}
sjFybp
.
setUpdateTime
(
DateUtils
.
getNowDate
());
sjFybp
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
return
sjFybpMapper
.
updateSjFybp
(
sjFybp
);
}
/**
* 批量删除三基-费用报批
*
* @param ids 需要删除的三基-费用报批主键
* @return 结果
*/
@Transactional
@Override
public
int
deleteSjFybpByIds
(
Long
[]
ids
)
{
sjFybpMapper
.
deleteSjFybpWhByFybpIds
(
ids
);
return
sjFybpMapper
.
deleteSjFybpByIds
(
ids
);
}
/**
* 删除三基-费用报批信息
*
* @param id 三基-费用报批主键
* @return 结果
*/
@Transactional
@Override
public
int
deleteSjFybpById
(
Long
id
)
{
sjFybpMapper
.
deleteSjFybpWhByFybpId
(
id
);
return
sjFybpMapper
.
deleteSjFybpById
(
id
);
}
@Override
public
int
tj
(
SjFybp
sjFybp
)
{
return
sjFybpMapper
.
updateSjFybp
(
sjFybp
);
}
@Override
public
int
fywh
(
SjFybp
sjFybp
)
{
sjFybpMapper
.
deleteSjFybpWhByFybpId
(
sjFybp
.
getId
());
insertSjFybpWh
(
sjFybp
);
return
1
;
}
/**
* 新增三基-费用维护信息
*
* @param sjFybp 三基-费用报批对象
*/
public
void
insertSjFybpWh
(
SjFybp
sjFybp
)
{
List
<
SjFybpWh
>
sjFybpWhList
=
sjFybp
.
getSjFybpWhList
();
Long
id
=
sjFybp
.
getId
();
if
(
StringUtils
.
isNotNull
(
sjFybpWhList
))
{
List
<
SjFybpWh
>
list
=
new
ArrayList
<
SjFybpWh
>();
for
(
SjFybpWh
sjFybpWh
:
sjFybpWhList
)
{
sjFybpWh
.
setFybpId
(
id
);
list
.
add
(
sjFybpWh
);
}
if
(
list
.
size
()
>
0
)
{
sjFybpMapper
.
batchSjFybpWh
(
list
);
}
}
}
}
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjFybpWhServiceImpl.java
0 → 100644
View file @
03d515cf
package
com
.
qianhe
.
service
.
impl
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.qianhe.mapper.SjFybpWhMapper
;
import
com.qianhe.domain.SjFybpWh
;
import
com.qianhe.service.ISjFybpWhService
;
/**
* 三基-费用维护Service业务层处理
*
* @author qianhe
* @date 2024-07-05
*/
@Service
public
class
SjFybpWhServiceImpl
implements
ISjFybpWhService
{
@Autowired
private
SjFybpWhMapper
sjFybpWhMapper
;
/**
* 查询三基-费用维护
*
* @param id 三基-费用维护主键
* @return 三基-费用维护
*/
@Override
public
SjFybpWh
selectSjFybpWhById
(
Long
id
)
{
return
sjFybpWhMapper
.
selectSjFybpWhById
(
id
);
}
/**
* 查询三基-费用维护列表
*
* @param sjFybpWh 三基-费用维护
* @return 三基-费用维护
*/
@Override
public
List
<
SjFybpWh
>
selectSjFybpWhList
(
SjFybpWh
sjFybpWh
)
{
return
sjFybpWhMapper
.
selectSjFybpWhList
(
sjFybpWh
);
}
/**
* 新增三基-费用维护
*
* @param sjFybpWh 三基-费用维护
* @return 结果
*/
@Override
public
int
insertSjFybpWh
(
SjFybpWh
sjFybpWh
)
{
return
sjFybpWhMapper
.
insertSjFybpWh
(
sjFybpWh
);
}
/**
* 修改三基-费用维护
*
* @param sjFybpWh 三基-费用维护
* @return 结果
*/
@Override
public
int
updateSjFybpWh
(
SjFybpWh
sjFybpWh
)
{
return
sjFybpWhMapper
.
updateSjFybpWh
(
sjFybpWh
);
}
/**
* 批量删除三基-费用维护
*
* @param ids 需要删除的三基-费用维护主键
* @return 结果
*/
@Override
public
int
deleteSjFybpWhByIds
(
Long
[]
ids
)
{
return
sjFybpWhMapper
.
deleteSjFybpWhByIds
(
ids
);
}
/**
* 删除三基-费用维护信息
*
* @param id 三基-费用维护主键
* @return 结果
*/
@Override
public
int
deleteSjFybpWhById
(
Long
id
)
{
return
sjFybpWhMapper
.
deleteSjFybpWhById
(
id
);
}
}
qianhe-ydsj/src/main/resources/mapper/SjFybpMapper.xml
0 → 100644
View file @
03d515cf
This diff is collapsed.
Click to expand it.
qianhe-ydsj/src/main/resources/mapper/SjFybpWhMapper.xml
0 → 100644
View file @
03d515cf
<?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.qianhe.mapper.SjFybpWhMapper"
>
<resultMap
type=
"SjFybpWh"
id=
"SjFybpWhResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"fybpId"
column=
"fybp_id"
/>
<result
property=
"syrq"
column=
"syrq"
/>
<result
property=
"syje"
column=
"syje"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"yl1"
column=
"yl1"
/>
<result
property=
"yl2"
column=
"yl2"
/>
<result
property=
"yl3"
column=
"yl3"
/>
<result
property=
"yl4"
column=
"yl4"
/>
<result
property=
"yl5"
column=
"yl5"
/>
</resultMap>
<sql
id=
"selectSjFybpWhVo"
>
select id, fybp_id, syrq, syje, remark, yl1, yl2, yl3, yl4, yl5 from sj_fybp_wh
</sql>
<select
id=
"selectSjFybpWhList"
parameterType=
"SjFybpWh"
resultMap=
"SjFybpWhResult"
>
<include
refid=
"selectSjFybpWhVo"
/>
<where>
<if
test=
"fybpId != null "
>
and fybp_id = #{fybpId}
</if>
<if
test=
"syrq != null and syrq != ''"
>
and syrq = #{syrq}
</if>
<if
test=
"syje != null "
>
and syje = #{syje}
</if>
<if
test=
"yl1 != null and yl1 != ''"
>
and yl1 = #{yl1}
</if>
<if
test=
"yl2 != null and yl2 != ''"
>
and yl2 = #{yl2}
</if>
<if
test=
"yl3 != null and yl3 != ''"
>
and yl3 = #{yl3}
</if>
<if
test=
"yl4 != null and yl4 != ''"
>
and yl4 = #{yl4}
</if>
<if
test=
"yl5 != null and yl5 != ''"
>
and yl5 = #{yl5}
</if>
</where>
</select>
<select
id=
"selectSjFybpWhById"
parameterType=
"Long"
resultMap=
"SjFybpWhResult"
>
<include
refid=
"selectSjFybpWhVo"
/>
where id = #{id}
</select>
<insert
id=
"insertSjFybpWh"
parameterType=
"SjFybpWh"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into sj_fybp_wh
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fybpId != null"
>
fybp_id,
</if>
<if
test=
"syrq != null"
>
syrq,
</if>
<if
test=
"syje != null"
>
syje,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"yl1 != null"
>
yl1,
</if>
<if
test=
"yl2 != null"
>
yl2,
</if>
<if
test=
"yl3 != null"
>
yl3,
</if>
<if
test=
"yl4 != null"
>
yl4,
</if>
<if
test=
"yl5 != null"
>
yl5,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fybpId != null"
>
#{fybpId},
</if>
<if
test=
"syrq != null"
>
#{syrq},
</if>
<if
test=
"syje != null"
>
#{syje},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"yl1 != null"
>
#{yl1},
</if>
<if
test=
"yl2 != null"
>
#{yl2},
</if>
<if
test=
"yl3 != null"
>
#{yl3},
</if>
<if
test=
"yl4 != null"
>
#{yl4},
</if>
<if
test=
"yl5 != null"
>
#{yl5},
</if>
</trim>
</insert>
<update
id=
"updateSjFybpWh"
parameterType=
"SjFybpWh"
>
update sj_fybp_wh
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"fybpId != null"
>
fybp_id = #{fybpId},
</if>
<if
test=
"syrq != null"
>
syrq = #{syrq},
</if>
<if
test=
"syje != null"
>
syje = #{syje},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"yl1 != null"
>
yl1 = #{yl1},
</if>
<if
test=
"yl2 != null"
>
yl2 = #{yl2},
</if>
<if
test=
"yl3 != null"
>
yl3 = #{yl3},
</if>
<if
test=
"yl4 != null"
>
yl4 = #{yl4},
</if>
<if
test=
"yl5 != null"
>
yl5 = #{yl5},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteSjFybpWhById"
parameterType=
"Long"
>
delete from sj_fybp_wh where id = #{id}
</delete>
<delete
id=
"deleteSjFybpWhByIds"
parameterType=
"String"
>
delete from sj_fybp_wh where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ 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