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
383f5927
Commit
383f5927
authored
Jul 12, 2024
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
751612ab
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1419 additions
and
8 deletions
+1419
-8
qianhe-admin/src/main/java/com/qianhe/web/controller/system/SysDeptCbController.java
+119
-0
qianhe-framework/src/main/java/com/qianhe/framework/config/SecurityConfig.java
+1
-0
qianhe-system/src/main/java/com/qianhe/system/domain/SysDeptCb.java
+136
-0
qianhe-system/src/main/java/com/qianhe/system/mapper/SysDeptCbMapper.java
+68
-0
qianhe-system/src/main/java/com/qianhe/system/service/ISysDeptCbService.java
+65
-0
qianhe-system/src/main/java/com/qianhe/system/service/impl/SysDeptCbServiceImpl.java
+104
-0
qianhe-system/src/main/resources/mapper/system/SysDeptCbMapper.xml
+94
-0
qianhe-ydsj/src/main/java/com/qianhe/controller/SjFybpController.java
+12
-1
qianhe-ydsj/src/main/java/com/qianhe/controller/SjFybpZbController.java
+0
-0
qianhe-ydsj/src/main/java/com/qianhe/controller/SjLhscController.java
+71
-0
qianhe-ydsj/src/main/java/com/qianhe/domain/SjFybp.java
+4
-0
qianhe-ydsj/src/main/java/com/qianhe/domain/SjFybpZb.java
+285
-0
qianhe-ydsj/src/main/java/com/qianhe/domain/Vo/SjLhscVo.java
+3
-0
qianhe-ydsj/src/main/java/com/qianhe/mapper/SjFybpMapper.java
+9
-0
qianhe-ydsj/src/main/java/com/qianhe/mapper/SjFybpZbMapper.java
+87
-0
qianhe-ydsj/src/main/java/com/qianhe/mapper/SjLhscMapper.java
+2
-0
qianhe-ydsj/src/main/java/com/qianhe/service/ISjFybpService.java
+4
-0
qianhe-ydsj/src/main/java/com/qianhe/service/ISjFybpZbService.java
+64
-0
qianhe-ydsj/src/main/java/com/qianhe/service/ISjLhscService.java
+1
-0
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjFybpServiceImpl.java
+18
-0
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjFybpZbServiceImpl.java
+205
-0
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjLhscServiceImpl.java
+11
-5
qianhe-ydsj/src/main/resources/mapper/SjFybpMapper.xml
+41
-1
qianhe-ydsj/src/main/resources/mapper/SjFybpZbMapper.xml
+0
-0
qianhe-ydsj/src/main/resources/mapper/SjLhscMapper.xml
+15
-1
No files found.
qianhe-admin/src/main/java/com/qianhe/web/controller/system/SysDeptCbController.java
0 → 100644
View file @
383f5927
package
com
.
qianhe
.
web
.
controller
.
system
;
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.system.domain.SysDeptCb
;
import
com.qianhe.system.service.ISysDeptCbService
;
import
com.qianhe.common.utils.poi.ExcelUtil
;
import
com.qianhe.common.core.page.TableDataInfo
;
/**
* 单位从Controller
*
* @author qianhe
* @date 2024-07-10
*/
@RestController
@RequestMapping
(
"/system/sysDeptCb"
)
public
class
SysDeptCbController
extends
BaseController
{
@Autowired
private
ISysDeptCbService
sysDeptCbService
;
/**
* 查询单位从列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sysDeptCb:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SysDeptCb
sysDeptCb
)
{
startPage
();
List
<
SysDeptCb
>
list
=
sysDeptCbService
.
selectSysDeptCbList
(
sysDeptCb
);
return
getDataTable
(
list
);
}
/**
* 导出单位从列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sysDeptCb:export')"
)
@Log
(
title
=
"单位从"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SysDeptCb
sysDeptCb
)
{
List
<
SysDeptCb
>
list
=
sysDeptCbService
.
selectSysDeptCbList
(
sysDeptCb
);
ExcelUtil
<
SysDeptCb
>
util
=
new
ExcelUtil
<
SysDeptCb
>(
SysDeptCb
.
class
);
util
.
exportExcel
(
response
,
list
,
"单位从数据"
);
}
/**
* 获取单位从详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:sysDeptCb:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
sysDeptCbService
.
selectSysDeptCbById
(
id
));
}
/**
* 新增单位从
*/
@PreAuthorize
(
"@ss.hasPermi('system:sysDeptCb:add')"
)
@Log
(
title
=
"单位从"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SysDeptCb
sysDeptCb
)
{
return
toAjax
(
sysDeptCbService
.
insertSysDeptCb
(
sysDeptCb
));
}
/**
* 修改单位从
*/
@PreAuthorize
(
"@ss.hasPermi('system:sysDeptCb:edit')"
)
@Log
(
title
=
"单位从"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysDeptCb
sysDeptCb
)
{
return
toAjax
(
sysDeptCbService
.
updateSysDeptCb
(
sysDeptCb
));
}
/**
* 删除单位从
*/
@PreAuthorize
(
"@ss.hasPermi('system:sysDeptCb:remove')"
)
@Log
(
title
=
"单位从"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
sysDeptCbService
.
deleteSysDeptCbByIds
(
ids
));
}
/**
* 获取单位从详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:sysDeptCb:getInfoBydeptId')"
)
@GetMapping
(
value
=
"/getInfoBydeptId"
)
public
AjaxResult
getInfoBydeptId
(
SysDeptCb
sysDeptCb
)
{
return
success
(
sysDeptCbService
.
getInfoBydeptId
(
sysDeptCb
));
}
}
qianhe-framework/src/main/java/com/qianhe/framework/config/SecurityConfig.java
View file @
383f5927
...
...
@@ -115,6 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 静态资源,可匿名访问
.
antMatchers
(
HttpMethod
.
GET
,
"/"
,
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/profile/**"
).
permitAll
()
.
antMatchers
(
"/swagger-ui.html"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/*/api-docs"
,
"/druid/**"
).
permitAll
()
.
antMatchers
(
"/system/sjFybpZb/**"
,
"/system/sjFybp/**"
).
permitAll
()
// 除上面外的所有请求全部需要鉴权认证
.
anyRequest
().
authenticated
()
.
and
()
...
...
qianhe-system/src/main/java/com/qianhe/system/domain/SysDeptCb.java
0 → 100644
View file @
383f5927
package
com
.
qianhe
.
system
.
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
;
/**
* 单位从对象 sys_dept_cb
*
* @author qianhe
* @date 2024-07-10
*/
public
class
SysDeptCb
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
private
Long
id
;
/** 单位 */
@Excel
(
name
=
"单位"
)
private
String
deptId
;
/** 年度 */
@Excel
(
name
=
"年度"
)
private
String
nd
;
/** 单位类型(油气开发单位、主要专业化单位、科研、监督、服务协调单位) */
@Excel
(
name
=
"单位类型"
,
readConverterExp
=
"油=气开发单位、主要专业化单位、科研、监督、服务协调单位"
)
private
String
dwlx
;
/** 交油气量(万吨)/经营收入(万元) */
@Excel
(
name
=
"交油气量"
,
readConverterExp
=
"万=吨"
)
private
BigDecimal
jyqlhjysr
;
/** 基层人员数量 */
@Excel
(
name
=
"基层人员数量"
)
private
Long
jcrysl
;
/** 基层单位数量 */
@Excel
(
name
=
"基层单位数量"
)
private
Long
jcdwsl
;
/** 一线班站数量 */
@Excel
(
name
=
"一线班站数量"
)
private
Long
yxbzsl
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setDeptId
(
String
deptId
)
{
this
.
deptId
=
deptId
;
}
public
String
getDeptId
()
{
return
deptId
;
}
public
void
setNd
(
String
nd
)
{
this
.
nd
=
nd
;
}
public
String
getNd
()
{
return
nd
;
}
public
void
setDwlx
(
String
dwlx
)
{
this
.
dwlx
=
dwlx
;
}
public
String
getDwlx
()
{
return
dwlx
;
}
public
void
setJyqlhjysr
(
BigDecimal
jyqlhjysr
)
{
this
.
jyqlhjysr
=
jyqlhjysr
;
}
public
BigDecimal
getJyqlhjysr
()
{
return
jyqlhjysr
;
}
public
void
setJcrysl
(
Long
jcrysl
)
{
this
.
jcrysl
=
jcrysl
;
}
public
Long
getJcrysl
()
{
return
jcrysl
;
}
public
void
setJcdwsl
(
Long
jcdwsl
)
{
this
.
jcdwsl
=
jcdwsl
;
}
public
Long
getJcdwsl
()
{
return
jcdwsl
;
}
public
void
setYxbzsl
(
Long
yxbzsl
)
{
this
.
yxbzsl
=
yxbzsl
;
}
public
Long
getYxbzsl
()
{
return
yxbzsl
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"deptId"
,
getDeptId
())
.
append
(
"nd"
,
getNd
())
.
append
(
"dwlx"
,
getDwlx
())
.
append
(
"jyqlhjysr"
,
getJyqlhjysr
())
.
append
(
"jcrysl"
,
getJcrysl
())
.
append
(
"jcdwsl"
,
getJcdwsl
())
.
append
(
"yxbzsl"
,
getYxbzsl
())
.
toString
();
}
}
qianhe-system/src/main/java/com/qianhe/system/mapper/SysDeptCbMapper.java
0 → 100644
View file @
383f5927
package
com
.
qianhe
.
system
.
mapper
;
import
java.util.List
;
import
com.qianhe.system.domain.SysDeptCb
;
import
org.apache.ibatis.annotations.Param
;
/**
* 单位从Mapper接口
*
* @author qianhe
* @date 2024-07-10
*/
public
interface
SysDeptCbMapper
{
/**
* 查询单位从
*
* @param id 单位从主键
* @return 单位从
*/
public
SysDeptCb
selectSysDeptCbById
(
Long
id
);
/**
* 查询单位从列表
*
* @param sysDeptCb 单位从
* @return 单位从集合
*/
public
List
<
SysDeptCb
>
selectSysDeptCbList
(
SysDeptCb
sysDeptCb
);
/**
* 新增单位从
*
* @param sysDeptCb 单位从
* @return 结果
*/
public
int
insertSysDeptCb
(
SysDeptCb
sysDeptCb
);
/**
* 修改单位从
*
* @param sysDeptCb 单位从
* @return 结果
*/
public
int
updateSysDeptCb
(
SysDeptCb
sysDeptCb
);
/**
* 删除单位从
*
* @param id 单位从主键
* @return 结果
*/
public
int
deleteSysDeptCbById
(
Long
id
);
/**
* 批量删除单位从
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSysDeptCbByIds
(
Long
[]
ids
);
SysDeptCb
getInfoBydeptId
(
SysDeptCb
sysDeptCb
);
int
deleteSysDeptCbByDeptId
(
@Param
(
"deptId"
)
String
deptId
,
@Param
(
"nd"
)
String
nd
);
}
qianhe-system/src/main/java/com/qianhe/system/service/ISysDeptCbService.java
0 → 100644
View file @
383f5927
package
com
.
qianhe
.
system
.
service
;
import
java.util.List
;
import
com.qianhe.system.domain.SysDeptCb
;
/**
* 单位从Service接口
*
* @author qianhe
* @date 2024-07-10
*/
public
interface
ISysDeptCbService
{
/**
* 查询单位从
*
* @param id 单位从主键
* @return 单位从
*/
public
SysDeptCb
selectSysDeptCbById
(
Long
id
);
/**
* 查询单位从列表
*
* @param sysDeptCb 单位从
* @return 单位从集合
*/
public
List
<
SysDeptCb
>
selectSysDeptCbList
(
SysDeptCb
sysDeptCb
);
/**
* 新增单位从
*
* @param sysDeptCb 单位从
* @return 结果
*/
public
int
insertSysDeptCb
(
SysDeptCb
sysDeptCb
);
/**
* 修改单位从
*
* @param sysDeptCb 单位从
* @return 结果
*/
public
int
updateSysDeptCb
(
SysDeptCb
sysDeptCb
);
/**
* 批量删除单位从
*
* @param ids 需要删除的单位从主键集合
* @return 结果
*/
public
int
deleteSysDeptCbByIds
(
Long
[]
ids
);
/**
* 删除单位从信息
*
* @param id 单位从主键
* @return 结果
*/
public
int
deleteSysDeptCbById
(
Long
id
);
SysDeptCb
getInfoBydeptId
(
SysDeptCb
sysDeptCb
);
}
qianhe-system/src/main/java/com/qianhe/system/service/impl/SysDeptCbServiceImpl.java
0 → 100644
View file @
383f5927
package
com
.
qianhe
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.qianhe.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.qianhe.system.mapper.SysDeptCbMapper
;
import
com.qianhe.system.domain.SysDeptCb
;
import
com.qianhe.system.service.ISysDeptCbService
;
/**
* 单位从Service业务层处理
*
* @author qianhe
* @date 2024-07-10
*/
@Service
public
class
SysDeptCbServiceImpl
implements
ISysDeptCbService
{
@Autowired
private
SysDeptCbMapper
sysDeptCbMapper
;
/**
* 查询单位从
*
* @param id 单位从主键
* @return 单位从
*/
@Override
public
SysDeptCb
selectSysDeptCbById
(
Long
id
)
{
return
sysDeptCbMapper
.
selectSysDeptCbById
(
id
);
}
/**
* 查询单位从列表
*
* @param sysDeptCb 单位从
* @return 单位从
*/
@Override
public
List
<
SysDeptCb
>
selectSysDeptCbList
(
SysDeptCb
sysDeptCb
)
{
return
sysDeptCbMapper
.
selectSysDeptCbList
(
sysDeptCb
);
}
/**
* 新增单位从
*
* @param sysDeptCb 单位从
* @return 结果
*/
@Override
public
int
insertSysDeptCb
(
SysDeptCb
sysDeptCb
)
{
//根据部门id 删除
String
nd
=
DateUtils
.
parseDateToStr
(
"yyyy"
,
DateUtils
.
getNowDate
());
sysDeptCbMapper
.
deleteSysDeptCbByDeptId
(
sysDeptCb
.
getDeptId
(),
nd
);
sysDeptCb
.
setNd
(
nd
);
return
sysDeptCbMapper
.
insertSysDeptCb
(
sysDeptCb
);
}
/**
* 修改单位从
*
* @param sysDeptCb 单位从
* @return 结果
*/
@Override
public
int
updateSysDeptCb
(
SysDeptCb
sysDeptCb
)
{
return
sysDeptCbMapper
.
updateSysDeptCb
(
sysDeptCb
);
}
/**
* 批量删除单位从
*
* @param ids 需要删除的单位从主键
* @return 结果
*/
@Override
public
int
deleteSysDeptCbByIds
(
Long
[]
ids
)
{
return
sysDeptCbMapper
.
deleteSysDeptCbByIds
(
ids
);
}
/**
* 删除单位从信息
*
* @param id 单位从主键
* @return 结果
*/
@Override
public
int
deleteSysDeptCbById
(
Long
id
)
{
return
sysDeptCbMapper
.
deleteSysDeptCbById
(
id
);
}
@Override
public
SysDeptCb
getInfoBydeptId
(
SysDeptCb
sysDeptCb
)
{
return
sysDeptCbMapper
.
getInfoBydeptId
(
sysDeptCb
);
}
}
qianhe-system/src/main/resources/mapper/system/SysDeptCbMapper.xml
0 → 100644
View file @
383f5927
<?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.system.mapper.SysDeptCbMapper"
>
<resultMap
type=
"SysDeptCb"
id=
"SysDeptCbResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"nd"
column=
"nd"
/>
<result
property=
"dwlx"
column=
"dwlx"
/>
<result
property=
"jyqlhjysr"
column=
"jyqlhjysr"
/>
<result
property=
"jcrysl"
column=
"jcrysl"
/>
<result
property=
"jcdwsl"
column=
"jcdwsl"
/>
<result
property=
"yxbzsl"
column=
"yxbzsl"
/>
</resultMap>
<sql
id=
"selectSysDeptCbVo"
>
select id, dept_id, nd, dwlx, jyqlhjysr, jcrysl, jcdwsl, yxbzsl from sys_dept_cb
</sql>
<select
id=
"selectSysDeptCbList"
parameterType=
"SysDeptCb"
resultMap=
"SysDeptCbResult"
>
<include
refid=
"selectSysDeptCbVo"
/>
<where>
<if
test=
"deptId != null and deptId != ''"
>
and dept_id = #{deptId}
</if>
<if
test=
"nd != null and nd != ''"
>
and nd = #{nd}
</if>
<if
test=
"dwlx != null and dwlx != ''"
>
and dwlx = #{dwlx}
</if>
<if
test=
"jyqlhjysr != null "
>
and jyqlhjysr = #{jyqlhjysr}
</if>
<if
test=
"jcrysl != null "
>
and jcrysl = #{jcrysl}
</if>
<if
test=
"jcdwsl != null "
>
and jcdwsl = #{jcdwsl}
</if>
<if
test=
"yxbzsl != null "
>
and yxbzsl = #{yxbzsl}
</if>
</where>
</select>
<select
id=
"selectSysDeptCbById"
parameterType=
"Long"
resultMap=
"SysDeptCbResult"
>
<include
refid=
"selectSysDeptCbVo"
/>
where id = #{id}
</select>
<select
id=
"getInfoBydeptId"
resultMap=
"SysDeptCbResult"
>
<include
refid=
"selectSysDeptCbVo"
/>
where dept_id = #{deptId} and nd = #{nd}
</select>
<insert
id=
"insertSysDeptCb"
parameterType=
"SysDeptCb"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into sys_dept_cb
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"deptId != null"
>
dept_id,
</if>
<if
test=
"nd != null"
>
nd,
</if>
<if
test=
"dwlx != null"
>
dwlx,
</if>
<if
test=
"jyqlhjysr != null"
>
jyqlhjysr,
</if>
<if
test=
"jcrysl != null"
>
jcrysl,
</if>
<if
test=
"jcdwsl != null"
>
jcdwsl,
</if>
<if
test=
"yxbzsl != null"
>
yxbzsl,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"deptId != null"
>
#{deptId},
</if>
<if
test=
"nd != null"
>
#{nd},
</if>
<if
test=
"dwlx != null"
>
#{dwlx},
</if>
<if
test=
"jyqlhjysr != null"
>
#{jyqlhjysr},
</if>
<if
test=
"jcrysl != null"
>
#{jcrysl},
</if>
<if
test=
"jcdwsl != null"
>
#{jcdwsl},
</if>
<if
test=
"yxbzsl != null"
>
#{yxbzsl},
</if>
</trim>
</insert>
<update
id=
"updateSysDeptCb"
parameterType=
"SysDeptCb"
>
update sys_dept_cb
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"deptId != null"
>
dept_id = #{deptId},
</if>
<if
test=
"nd != null"
>
nd = #{nd},
</if>
<if
test=
"dwlx != null"
>
dwlx = #{dwlx},
</if>
<if
test=
"jyqlhjysr != null"
>
jyqlhjysr = #{jyqlhjysr},
</if>
<if
test=
"jcrysl != null"
>
jcrysl = #{jcrysl},
</if>
<if
test=
"jcdwsl != null"
>
jcdwsl = #{jcdwsl},
</if>
<if
test=
"yxbzsl != null"
>
yxbzsl = #{yxbzsl},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteSysDeptCbById"
parameterType=
"Long"
>
delete from sys_dept_cb where id = #{id}
</delete>
<delete
id=
"deleteSysDeptCbByIds"
parameterType=
"String"
>
delete from sys_dept_cb where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
<delete
id=
"deleteSysDeptCbByDeptId"
>
delete from sys_dept_cb where dept_id = #{deptId} and nd = #{nd}
</delete>
</mapper>
\ No newline at end of file
qianhe-ydsj/src/main/java/com/qianhe/controller/SjFybpController.java
View file @
383f5927
...
...
@@ -151,10 +151,21 @@ public class SjFybpController extends BaseController
public
TableDataInfo
zglist
(
SjFybp
sjFybp
)
{
startPage
();
List
<
SjFybp
>
list
=
sjFybpService
.
selectSjFybpList
(
sjFybp
);
List
<
SjFybp
>
list
=
sjFybpService
.
getFygz
(
sjFybp
);
return
getDataTable
(
list
);
}
/**
* 查询三基-费用报批列表
*/
@GetMapping
(
"/getFygzById/{id}"
)
public
AjaxResult
getFygz
(
@PathVariable
Long
id
)
{
return
AjaxResult
.
success
(
sjFybpService
.
getFygzById
(
id
));
}
/**
* 费用维护
*/
...
...
qianhe-ydsj/src/main/java/com/qianhe/controller/SjFybpZbController.java
0 → 100644
View file @
383f5927
This diff is collapsed.
Click to expand it.
qianhe-ydsj/src/main/java/com/qianhe/controller/SjLhscController.java
View file @
383f5927
...
...
@@ -217,5 +217,76 @@ public class SjLhscController extends BaseController
return
getDataTable
(
list
);
}
/**
* 统计解决问题数量(二级)
* @return
*/
@GetMapping
(
"/tjByEjJjwtSl"
)
public
TableDataInfo
tjByEjJjwtSl
(
SjLhscVo
vo
)
{
vo
.
setDwjb
(
"3"
);
String
nd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
vo
.
getNd
())){
nd
=
vo
.
getNd
();
}
String
startJd
=
""
;
String
endJd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
vo
.
getJb
())){
String
jd
=
vo
.
getJb
();
if
(
"1"
.
equals
(
jd
)){
startJd
=
nd
+
"-01"
;
endJd
=
nd
+
"-03"
;
}
else
if
(
"2"
.
equals
(
jd
)){
startJd
=
nd
+
"-04"
;
endJd
=
nd
+
"-06"
;
}
if
(
"3"
.
equals
(
jd
)){
startJd
=
nd
+
"-07"
;
endJd
=
nd
+
"-09"
;
}
if
(
"4"
.
equals
(
jd
)){
startJd
=
nd
+
"-10"
;
endJd
=
nd
+
"-12"
;
}
}
vo
.
setStartJd
(
startJd
);
vo
.
setEndJd
(
endJd
);
List
<
SjLhscVo
>
list
=
sjLhscService
.
tjByEjJjwtSl
(
vo
);
return
getDataTable
(
list
);
}
/**
* 统计解决问题数量(三级)
* @return
*/
@GetMapping
(
"/tjBySjJjwtSl"
)
public
TableDataInfo
tjBySjJjwtSl
(
SjLhscVo
vo
)
{
vo
.
setDwjb
(
"4"
);
String
nd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
vo
.
getNd
())){
nd
=
vo
.
getNd
();
}
String
startJd
=
""
;
String
endJd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
vo
.
getJb
())){
String
jd
=
vo
.
getJb
();
if
(
"1"
.
equals
(
jd
)){
startJd
=
nd
+
"-01"
;
endJd
=
nd
+
"-03"
;
}
else
if
(
"2"
.
equals
(
jd
)){
startJd
=
nd
+
"-04"
;
endJd
=
nd
+
"-06"
;
}
if
(
"3"
.
equals
(
jd
)){
startJd
=
nd
+
"-07"
;
endJd
=
nd
+
"-09"
;
}
if
(
"4"
.
equals
(
jd
)){
startJd
=
nd
+
"-10"
;
endJd
=
nd
+
"-12"
;
}
}
vo
.
setStartJd
(
startJd
);
vo
.
setEndJd
(
endJd
);
List
<
SjLhscVo
>
list
=
sjLhscService
.
tjByEjJjwtSl
(
vo
);
return
getDataTable
(
list
);
}
}
qianhe-ydsj/src/main/java/com/qianhe/domain/SjFybp.java
View file @
383f5927
...
...
@@ -23,6 +23,7 @@ public class SjFybp extends BaseEntity
/** 主键 */
private
Long
id
;
private
Long
zbId
;
/** 费用名称 */
@Excel
(
name
=
"费用名称"
)
...
...
@@ -116,6 +117,9 @@ public class SjFybp extends BaseEntity
//数量
private
Integer
sl
;
private
BigDecimal
fyzje
;
//批复金额总和
private
BigDecimal
pfjezh
;
//已使用金额总和
...
...
qianhe-ydsj/src/main/java/com/qianhe/domain/SjFybpZb.java
0 → 100644
View file @
383f5927
package
com
.
qianhe
.
domain
;
import
java.math.BigDecimal
;
import
java.util.List
;
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_zb
*
* @author qianhe
* @date 2024-07-11
*/
@Data
public
class
SjFybpZb
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
private
Long
id
;
/** 费用日期 */
@Excel
(
name
=
"费用日期"
)
private
String
fyrq
;
/** 单位 */
@Excel
(
name
=
"单位"
)
private
String
deptId
;
/** 费用金额 */
@Excel
(
name
=
"费用金额"
)
private
BigDecimal
fyje
;
/** 状态(未提交、待审批、已审批、已驳回) */
@Excel
(
name
=
"状态(未提交、待审批、已审批、已驳回)"
)
private
String
zt
;
/** 提交人 */
@Excel
(
name
=
"提交人"
)
private
String
tjr
;
/** 提交日期 */
@Excel
(
name
=
"提交日期"
)
private
String
tjrq
;
/** 审批日期 */
@Excel
(
name
=
"审批日期"
)
private
String
sprq
;
/** 审批人 */
@Excel
(
name
=
"审批人"
)
private
String
spr
;
/** 已使用金额 */
@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
;
/** 三基-费用报批信息 */
private
List
<
SjFybp
>
sjFybpList
;
private
List
<
WdWdxx
>
fileList
;
private
String
deptName
;
private
String
sprName
;
private
String
spcx
;
private
String
tqbz
;
private
String
jsbz
;
private
String
jl
;
private
Boolean
jlflag
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setFyrq
(
String
fyrq
)
{
this
.
fyrq
=
fyrq
;
}
public
String
getFyrq
()
{
return
fyrq
;
}
public
void
setDeptId
(
String
deptId
)
{
this
.
deptId
=
deptId
;
}
public
String
getDeptId
()
{
return
deptId
;
}
public
void
setFyje
(
BigDecimal
fyje
)
{
this
.
fyje
=
fyje
;
}
public
BigDecimal
getFyje
()
{
return
fyje
;
}
public
void
setZt
(
String
zt
)
{
this
.
zt
=
zt
;
}
public
String
getZt
()
{
return
zt
;
}
public
void
setTjr
(
String
tjr
)
{
this
.
tjr
=
tjr
;
}
public
String
getTjr
()
{
return
tjr
;
}
public
void
setTjrq
(
String
tjrq
)
{
this
.
tjrq
=
tjrq
;
}
public
String
getTjrq
()
{
return
tjrq
;
}
public
void
setSprq
(
String
sprq
)
{
this
.
sprq
=
sprq
;
}
public
String
getSprq
()
{
return
sprq
;
}
public
void
setSpr
(
String
spr
)
{
this
.
spr
=
spr
;
}
public
String
getSpr
()
{
return
spr
;
}
public
void
setYsyje
(
BigDecimal
ysyje
)
{
this
.
ysyje
=
ysyje
;
}
public
BigDecimal
getYsyje
()
{
return
ysyje
;
}
public
void
setSpyj
(
String
spyj
)
{
this
.
spyj
=
spyj
;
}
public
String
getSpyj
()
{
return
spyj
;
}
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
;
}
public
List
<
SjFybp
>
getSjFybpList
()
{
return
sjFybpList
;
}
public
void
setSjFybpList
(
List
<
SjFybp
>
sjFybpList
)
{
this
.
sjFybpList
=
sjFybpList
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"fyrq"
,
getFyrq
())
.
append
(
"deptId"
,
getDeptId
())
.
append
(
"fyje"
,
getFyje
())
.
append
(
"zt"
,
getZt
())
.
append
(
"tjr"
,
getTjr
())
.
append
(
"tjrq"
,
getTjrq
())
.
append
(
"sprq"
,
getSprq
())
.
append
(
"spr"
,
getSpr
())
.
append
(
"ysyje"
,
getYsyje
())
.
append
(
"spyj"
,
getSpyj
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
append
(
"yl1"
,
getYl1
())
.
append
(
"yl2"
,
getYl2
())
.
append
(
"yl3"
,
getYl3
())
.
append
(
"yl4"
,
getYl4
())
.
append
(
"yl5"
,
getYl5
())
.
append
(
"sjFybpList"
,
getSjFybpList
())
.
toString
();
}
}
qianhe-ydsj/src/main/java/com/qianhe/domain/Vo/SjLhscVo.java
View file @
383f5927
...
...
@@ -38,6 +38,9 @@ public class SjLhscVo extends BaseEntity
/** 状态(已提交、未提交) */
private
String
zt
;
//解决问题数量
private
Integer
jjwtsl
;
...
...
qianhe-ydsj/src/main/java/com/qianhe/mapper/SjFybpMapper.java
View file @
383f5927
...
...
@@ -88,4 +88,13 @@ public interface SjFybpMapper
List
<
SjFybp
>
tjtbByDept
(
SjFybp
sjFybp
);
List
<
SjFybp
>
tjtbByfylx
(
SjFybp
sjFybp
);
List
<
SjFybp
>
selectSjFybpByZbId
(
Long
zbid
);
List
<
SjFybp
>
getFygz
(
SjFybp
sjFybp
);
SjFybp
getFygzById
(
Long
id
);
}
qianhe-ydsj/src/main/java/com/qianhe/mapper/SjFybpZbMapper.java
0 → 100644
View file @
383f5927
package
com
.
qianhe
.
mapper
;
import
java.util.List
;
import
com.qianhe.domain.SjFybpZb
;
import
com.qianhe.domain.SjFybp
;
/**
* 三基-费用报批主Mapper接口
*
* @author qianhe
* @date 2024-07-11
*/
public
interface
SjFybpZbMapper
{
/**
* 查询三基-费用报批主
*
* @param id 三基-费用报批主主键
* @return 三基-费用报批主
*/
public
SjFybpZb
selectSjFybpZbById
(
Long
id
);
/**
* 查询三基-费用报批主列表
*
* @param sjFybpZb 三基-费用报批主
* @return 三基-费用报批主集合
*/
public
List
<
SjFybpZb
>
selectSjFybpZbList
(
SjFybpZb
sjFybpZb
);
/**
* 新增三基-费用报批主
*
* @param sjFybpZb 三基-费用报批主
* @return 结果
*/
public
int
insertSjFybpZb
(
SjFybpZb
sjFybpZb
);
/**
* 修改三基-费用报批主
*
* @param sjFybpZb 三基-费用报批主
* @return 结果
*/
public
int
updateSjFybpZb
(
SjFybpZb
sjFybpZb
);
/**
* 删除三基-费用报批主
*
* @param id 三基-费用报批主主键
* @return 结果
*/
public
int
deleteSjFybpZbById
(
Long
id
);
/**
* 批量删除三基-费用报批主
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSjFybpZbByIds
(
Long
[]
ids
);
/**
* 批量删除三基-费用报批
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSjFybpByZbIds
(
Long
[]
ids
);
/**
* 批量新增三基-费用报批
*
* @param sjFybpList 三基-费用报批列表
* @return 结果
*/
public
int
batchSjFybp
(
List
<
SjFybp
>
sjFybpList
);
/**
* 通过三基-费用报批主主键删除三基-费用报批信息
*
* @param id 三基-费用报批主ID
* @return 结果
*/
public
int
deleteSjFybpByZbId
(
Long
id
);
}
qianhe-ydsj/src/main/java/com/qianhe/mapper/SjLhscMapper.java
View file @
383f5927
...
...
@@ -93,4 +93,6 @@ public interface SjLhscMapper
List
<
SjLhscVo
>
tjBysfsc
(
SjLhscVo
vo
);
List
<
SjLhscVo
>
tjByEjJjwtSl
(
SjLhscVo
vo
);
}
qianhe-ydsj/src/main/java/com/qianhe/service/ISjFybpService.java
View file @
383f5927
...
...
@@ -69,4 +69,8 @@ public interface ISjFybpService
AjaxResult
tjtbByfylx
(
SjFybp
sjFybp
);
List
<
SjFybp
>
getFygz
(
SjFybp
sjFybp
);
SjFybp
getFygzById
(
Long
id
);
}
qianhe-ydsj/src/main/java/com/qianhe/service/ISjFybpZbService.java
0 → 100644
View file @
383f5927
package
com
.
qianhe
.
service
;
import
java.util.List
;
import
com.qianhe.domain.SjFybpZb
;
/**
* 三基-费用报批主Service接口
*
* @author qianhe
* @date 2024-07-11
*/
public
interface
ISjFybpZbService
{
/**
* 查询三基-费用报批主
*
* @param id 三基-费用报批主主键
* @return 三基-费用报批主
*/
public
SjFybpZb
selectSjFybpZbById
(
Long
id
);
/**
* 查询三基-费用报批主列表
*
* @param sjFybpZb 三基-费用报批主
* @return 三基-费用报批主集合
*/
public
List
<
SjFybpZb
>
selectSjFybpZbList
(
SjFybpZb
sjFybpZb
);
/**
* 新增三基-费用报批主
*
* @param sjFybpZb 三基-费用报批主
* @return 结果
*/
public
int
insertSjFybpZb
(
SjFybpZb
sjFybpZb
);
/**
* 修改三基-费用报批主
*
* @param sjFybpZb 三基-费用报批主
* @return 结果
*/
public
int
updateSjFybpZb
(
SjFybpZb
sjFybpZb
);
/**
* 批量删除三基-费用报批主
*
* @param ids 需要删除的三基-费用报批主主键集合
* @return 结果
*/
public
int
deleteSjFybpZbByIds
(
Long
[]
ids
);
/**
* 删除三基-费用报批主信息
*
* @param id 三基-费用报批主主键
* @return 结果
*/
public
int
deleteSjFybpZbById
(
Long
id
);
int
tj
(
SjFybpZb
sjFybpZb
);
}
qianhe-ydsj/src/main/java/com/qianhe/service/ISjLhscService.java
View file @
383f5927
...
...
@@ -64,4 +64,5 @@ public interface ISjLhscService
List
<
SjLhscVo
>
tjBysfsc
(
SjLhscVo
vo
);
List
<
SjLhscVo
>
tjByEjJjwtSl
(
SjLhscVo
vo
);
}
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjFybpServiceImpl.java
View file @
383f5927
...
...
@@ -53,6 +53,7 @@ public class SjFybpServiceImpl implements ISjFybpService
SjFybp
sjFybp
=
sjFybpMapper
.
selectSjFybpById
(
id
);
//查询费用维护
SjFybpWh
sjFybpWh
=
new
SjFybpWh
();
sjFybpWh
.
setFybpId
(
id
);
List
<
SjFybpWh
>
sjFybpWhs
=
sjFybpWhMapper
.
selectSjFybpWhList
(
sjFybpWh
);
sjFybp
.
setSjFybpWhList
(
sjFybpWhs
);
//查询文档
...
...
@@ -201,6 +202,23 @@ public class SjFybpServiceImpl implements ISjFybpService
return
AjaxResult
.
success
(
sjFybpMapper
.
tjtbByfylx
(
sjFybp
));
}
@Override
// @DataScope(deptAlias = "d")
public
List
<
SjFybp
>
getFygz
(
SjFybp
sjFybp
)
{
return
sjFybpMapper
.
getFygz
(
sjFybp
);
}
@Override
public
SjFybp
getFygzById
(
Long
id
)
{
SjFybp
sjFybp
=
sjFybpMapper
.
getFygzById
(
id
);
//查询费用维护
SjFybpWh
sjFybpWh
=
new
SjFybpWh
();
sjFybpWh
.
setFybpId
(
id
);
List
<
SjFybpWh
>
sjFybpWhs
=
sjFybpWhMapper
.
selectSjFybpWhList
(
sjFybpWh
);
sjFybp
.
setSjFybpWhList
(
sjFybpWhs
);
return
sjFybp
;
}
/**
* 新增三基-费用维护信息
*
...
...
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjFybpZbServiceImpl.java
0 → 100644
View file @
383f5927
package
com
.
qianhe
.
service
.
impl
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
com.qianhe.common.annotation.DataScope
;
import
com.qianhe.common.utils.DateUtils
;
import
com.qianhe.common.utils.SecurityUtils
;
import
com.qianhe.domain.SjFybpWh
;
import
com.qianhe.domain.WdWdxx
;
import
com.qianhe.mapper.SjFybpMapper
;
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.SjFybp
;
import
com.qianhe.mapper.SjFybpZbMapper
;
import
com.qianhe.domain.SjFybpZb
;
import
com.qianhe.service.ISjFybpZbService
;
/**
* 三基-费用报批主Service业务层处理
*
* @author qianhe
* @date 2024-07-11
*/
@Service
public
class
SjFybpZbServiceImpl
implements
ISjFybpZbService
{
@Autowired
private
SjFybpZbMapper
sjFybpZbMapper
;
@Autowired
private
SjFybpMapper
sjFybpMapper
;
@Autowired
private
WdWdxxMapper
wdWdxxMapper
;
/**
* 查询三基-费用报批主
*
* @param id 三基-费用报批主主键
* @return 三基-费用报批主
*/
@Override
public
SjFybpZb
selectSjFybpZbById
(
Long
id
)
{
SjFybpZb
sjFybpZb
=
sjFybpZbMapper
.
selectSjFybpZbById
(
id
);
//查询从表
List
<
SjFybp
>
sjFybpList
=
sjFybpMapper
.
selectSjFybpByZbId
(
id
);
sjFybpZb
.
setSjFybpList
(
sjFybpList
);
//查询文件
//查询文档
WdWdxx
wdWdxx
=
new
WdWdxx
();
wdWdxx
.
setGlId
(
sjFybpZb
.
getId
().
toString
());
wdWdxx
.
setMkmc
(
"费用报批"
);
wdWdxx
.
setFjlx
(
"费用上报"
);
List
<
WdWdxx
>
wdWdxxes
=
wdWdxxMapper
.
selectWdWdxxList
(
wdWdxx
);
sjFybpZb
.
setFileList
(
wdWdxxes
);
return
sjFybpZb
;
}
/**
* 查询三基-费用报批主列表
*
* @param sjFybpZb 三基-费用报批主
* @return 三基-费用报批主
*/
@Override
@DataScope
(
deptAlias
=
"d"
)
public
List
<
SjFybpZb
>
selectSjFybpZbList
(
SjFybpZb
sjFybpZb
)
{
return
sjFybpZbMapper
.
selectSjFybpZbList
(
sjFybpZb
);
}
/**
* 新增三基-费用报批主
*
* @param sjFybpZb 三基-费用报批主
* @return 结果
*/
@Transactional
@Override
public
int
insertSjFybpZb
(
SjFybpZb
sjFybpZb
)
{
//保存金额
if
(
StringUtils
.
isNotEmpty
(
sjFybpZb
.
getSjFybpList
())){
//统计已结算金额
BigDecimal
reduce
=
sjFybpZb
.
getSjFybpList
().
stream
().
map
(
SjFybp:
:
getFyje
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
sjFybpZb
.
setFyje
(
reduce
);
}
sjFybpZb
.
setCreateTime
(
DateUtils
.
getNowDate
());
int
rows
=
sjFybpZbMapper
.
insertSjFybpZb
(
sjFybpZb
);
insertSjFybp
(
sjFybpZb
);
//保存文件
if
(
StringUtils
.
isNotEmpty
(
sjFybpZb
.
getFileList
())){
if
(
sjFybpZb
.
getFileList
().
size
()>
0
){
sjFybpZb
.
getFileList
().
forEach
(
file
->{
file
.
setGlId
(
sjFybpZb
.
getId
().
toString
());
file
.
setMkmc
(
"费用报批"
);
file
.
setFjlx
(
"费用上报"
);
file
.
setLrr
(
SecurityUtils
.
getUsername
());
wdWdxxMapper
.
insertWdWdxx
(
file
);
});
}
}
return
rows
;
}
/**
* 修改三基-费用报批主
*
* @param sjFybpZb 三基-费用报批主
* @return 结果
*/
@Transactional
@Override
public
int
updateSjFybpZb
(
SjFybpZb
sjFybpZb
)
{
//先删除文件
wdWdxxMapper
.
deleteWdWdxxByGlIdAndMkmc
(
sjFybpZb
.
getId
()+
""
,
"费用报批"
);
//保存文件
if
(
StringUtils
.
isNotEmpty
(
sjFybpZb
.
getFileList
())){
if
(
sjFybpZb
.
getFileList
().
size
()>
0
){
sjFybpZb
.
getFileList
().
forEach
(
file
->{
file
.
setGlId
(
sjFybpZb
.
getId
().
toString
());
file
.
setMkmc
(
"费用报批"
);
file
.
setFjlx
(
"费用上报"
);
file
.
setLrr
(
SecurityUtils
.
getUsername
());
wdWdxxMapper
.
insertWdWdxx
(
file
);
});
}
}
//保存金额
if
(
StringUtils
.
isNotEmpty
(
sjFybpZb
.
getSjFybpList
())){
//统计已结算金额
BigDecimal
reduce
=
sjFybpZb
.
getSjFybpList
().
stream
().
map
(
SjFybp:
:
getFyje
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
sjFybpZb
.
setFyje
(
reduce
);
}
sjFybpZb
.
setUpdateTime
(
DateUtils
.
getNowDate
());
sjFybpZbMapper
.
deleteSjFybpByZbId
(
sjFybpZb
.
getId
());
insertSjFybp
(
sjFybpZb
);
return
sjFybpZbMapper
.
updateSjFybpZb
(
sjFybpZb
);
}
/**
* 批量删除三基-费用报批主
*
* @param ids 需要删除的三基-费用报批主主键
* @return 结果
*/
@Transactional
@Override
public
int
deleteSjFybpZbByIds
(
Long
[]
ids
)
{
sjFybpZbMapper
.
deleteSjFybpByZbIds
(
ids
);
return
sjFybpZbMapper
.
deleteSjFybpZbByIds
(
ids
);
}
/**
* 删除三基-费用报批主信息
*
* @param id 三基-费用报批主主键
* @return 结果
*/
@Transactional
@Override
public
int
deleteSjFybpZbById
(
Long
id
)
{
sjFybpZbMapper
.
deleteSjFybpByZbId
(
id
);
return
sjFybpZbMapper
.
deleteSjFybpZbById
(
id
);
}
@Override
public
int
tj
(
SjFybpZb
sjFybpZb
)
{
return
sjFybpZbMapper
.
updateSjFybpZb
(
sjFybpZb
);
}
/**
* 新增三基-费用报批信息
*
* @param sjFybpZb 三基-费用报批主对象
*/
public
void
insertSjFybp
(
SjFybpZb
sjFybpZb
)
{
List
<
SjFybp
>
sjFybpList
=
sjFybpZb
.
getSjFybpList
();
Long
id
=
sjFybpZb
.
getId
();
if
(
StringUtils
.
isNotNull
(
sjFybpList
))
{
List
<
SjFybp
>
list
=
new
ArrayList
<
SjFybp
>();
for
(
SjFybp
sjFybp
:
sjFybpList
)
{
sjFybp
.
setZbId
(
id
);
list
.
add
(
sjFybp
);
}
if
(
list
.
size
()
>
0
)
{
sjFybpZbMapper
.
batchSjFybp
(
list
);
}
}
}
}
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjLhscServiceImpl.java
View file @
383f5927
...
...
@@ -83,8 +83,8 @@ public class SjLhscServiceImpl implements ISjLhscService
sjLhsc
.
setCreateTime
(
DateUtils
.
getNowDate
());
sjLhsc
.
setCreateBy
(
SecurityUtils
.
getUsername
());
int
rows
=
sjLhscMapper
.
insertSjLhsc
(
sjLhsc
);
if
(
StringUtils
.
isNotEmpty
(
sjLhsc
.
get
Cz
wt
())){
String
[]
split
=
sjLhsc
.
get
Cz
wt
().
split
(
"/(?<=\\d)(?=[.:,、\\s])/"
);
if
(
StringUtils
.
isNotEmpty
(
sjLhsc
.
get
Jj
wt
())){
String
[]
split
=
sjLhsc
.
get
Jj
wt
().
split
(
"/(?<=\\d)(?=[.:,、\\s])/"
);
sjLhsc
.
setWtList
(
Arrays
.
asList
(
split
));
}
insertSjLhscWtString
(
sjLhsc
);
...
...
@@ -116,7 +116,7 @@ public class SjLhscServiceImpl implements ISjLhscService
{
//先删除文件
wdWdxxMapper
.
deleteWdWdxxByGlIdAndMkmc
(
sjLhsc
.
getId
()+
""
,
"
费用报批
"
);
wdWdxxMapper
.
deleteWdWdxxByGlIdAndMkmc
(
sjLhsc
.
getId
()+
""
,
"
例会上传
"
);
//保存文件
if
(
StringUtils
.
isNotEmpty
(
sjLhsc
.
getFileList
())){
if
(
sjLhsc
.
getFileList
().
size
()>
0
){
...
...
@@ -134,8 +134,8 @@ public class SjLhscServiceImpl implements ISjLhscService
sjLhsc
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
sjLhscMapper
.
deleteSjLhscWtByLhscId
(
sjLhsc
.
getId
());
// insertSjLhscWt(sjLhsc);
if
(
StringUtils
.
isNotEmpty
(
sjLhsc
.
get
Cz
wt
())){
String
[]
split
=
sjLhsc
.
get
Cz
wt
().
split
(
"/(?<=\\d)(?=[.:,、\\s])/"
);
if
(
StringUtils
.
isNotEmpty
(
sjLhsc
.
get
Jj
wt
())){
String
[]
split
=
sjLhsc
.
get
Jj
wt
().
split
(
"/(?<=\\d)(?=[.:,、\\s])/"
);
sjLhsc
.
setWtList
(
Arrays
.
asList
(
split
));
}
insertSjLhscWtString
(
sjLhsc
);
...
...
@@ -184,6 +184,12 @@ public class SjLhscServiceImpl implements ISjLhscService
return
sjLhscMapper
.
tjBysfsc
(
vo
);
}
@Override
@DataScope
(
deptAlias
=
"d"
)
public
List
<
SjLhscVo
>
tjByEjJjwtSl
(
SjLhscVo
vo
)
{
return
sjLhscMapper
.
tjByEjJjwtSl
(
vo
);
}
/**
* 新增三基-例会上传-存在问题信息
*
...
...
qianhe-ydsj/src/main/resources/mapper/SjFybpMapper.xml
View file @
383f5927
...
...
@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap
type=
"SjFybp"
id=
"SjFybpResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"zbId"
column=
"zb_id"
/>
<result
property=
"fymc"
column=
"fymc"
/>
<result
property=
"fyrq"
column=
"fyrq"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
...
...
@@ -37,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"ysyjezh"
column=
"ysyjezh"
/>
<result
property=
"sprName"
column=
"spr_name"
/>
<result
property=
"spzt"
column=
"spzt"
/>
<result
property=
"fyzje"
column=
"fyzje"
/>
</resultMap>
...
...
@@ -59,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql
id=
"selectSjFybpVo"
>
select id,
zb_id
fymc,
fyrq,
a.dept_id,
...
...
@@ -95,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include
refid=
"selectSjFybpVo"
/>
<where>
<if
test=
"fymc != null and fymc != ''"
>
and fymc like concat('%', #{fymc}, '%')
</if>
<if
test=
"zbId != null "
>
and zb_id = #{zbId}
</if>
<if
test=
"fyrq != null and fyrq != ''"
>
and fyrq = #{fyrq}
</if>
<if
test=
"deptId != null and deptId != ''"
>
and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))
</if>
<if
test=
"fylx != null and fylx != ''"
>
and fylx = #{fylx}
</if>
...
...
@@ -130,7 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.tjr, a.tjrq, a.sprq, a.spr, a.pfje,
a.ysyje, a.spyj, a.create_by,
a.create_time, a.update_by, a.update_time,
a.remark, a.yl1, a.yl2, a.yl3, a.yl4, a.yl5,d.dept_name
a.remark, a.yl1, a.yl2, a.yl3, a.yl4, a.yl5,d.dept_name
, a.zb_id
from sj_fybp a
left join sys_dept d on a.dept_id=d.dept_id
where a.id = #{id}
...
...
@@ -161,6 +165,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope}
group by a.fylx
</select>
<select
id=
"selectSjFybpByZbId"
resultMap=
"SjFybpResult"
>
select a.id, a.fymc, a.fyrq, a.dept_id,
a.fylx, a.fyms, a.fyje, a.fjid, a.zt,
a.tjr, a.tjrq, a.sprq, a.spr, a.pfje,
a.ysyje, a.spyj, a.create_by,
a.create_time, a.update_by, a.update_time,
a.remark, a.yl1, a.yl2, a.yl3, a.yl4, a.yl5, a.zb_id
from sj_fybp a
where a.zb_id = #{zbid}
</select>
<select
id=
"getFygz"
resultMap=
"SjFybpResult"
>
select a.id zb_id,a.dept_id,d.dept_name,a.fyrq,a.fyje fyzje,b.id,b.fymc,b.fylx,b.fyje,b.fyms,IFNULL(sum(c.syje),0) ysyje from sj_fybp_zb a
left join sj_fybp b on a.id=b.zb_id
left join sj_fybp_wh c on b.id=c.fybp_id
left join sys_dept d on a.dept_id=d.dept_id
where 1=1
<if
test=
"deptId != null and deptId != ''"
>
and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))
</if>
<if
test=
"fylx != null and fylx != ''"
>
and b.fylx = #{fylx}
</if>
<if
test=
"fymc != null and fymc != ''"
>
and b.fymc like concat('%', #{fymc}, '%')
</if>
<if
test=
"fyrq != null and fyrq != ''"
>
and a.fyrq = #{fyrq}
</if>
group by b.id
</select>
<select
id=
"getFygzById"
resultMap=
"SjFybpResult"
>
select a.id zb_id,a.dept_id,d.dept_name,a.fyrq,a.fyje fyzje,b.id,b.fymc,b.fylx,b.fyje,b.fyms,IFNULL(sum(c.syje),0) ysyje from sj_fybp_zb a
left join sj_fybp b on a.id=b.zb_id
left join sj_fybp_wh c on b.id=c.fybp_id
left join sys_dept d on a.dept_id=d.dept_id
where 1=1
and b.id=#{id}
group by b.id
</select>
<insert
id=
"insertSjFybp"
parameterType=
"SjFybp"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into sj_fybp
...
...
@@ -190,6 +227,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"yl4 != null"
>
yl4,
</if>
<if
test=
"yl5 != null"
>
yl5,
</if>
<if
test=
"tjrq != null"
>
tjrq,
</if>
<if
test=
"zbId != null"
>
zb_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fymc != null"
>
#{fymc},
</if>
...
...
@@ -217,6 +255,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"yl4 != null"
>
#{yl4},
</if>
<if
test=
"yl5 != null"
>
#{yl5},
</if>
<if
test=
"tjrq != null"
>
#{tjrq},
</if>
<if
test=
"zbId != null"
>
#{zbId},
</if>
</trim>
</insert>
...
...
@@ -248,6 +287,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"yl4 != null"
>
yl4 = #{yl4},
</if>
<if
test=
"yl5 != null"
>
yl5 = #{yl5},
</if>
<if
test=
"tjrq != null"
>
tjrq = #{tjrq},
</if>
<if
test=
"zbId != null"
>
zb_id = #{zbId},
</if>
</trim>
where id = #{id}
</update>
...
...
qianhe-ydsj/src/main/resources/mapper/SjFybpZbMapper.xml
0 → 100644
View file @
383f5927
This diff is collapsed.
Click to expand it.
qianhe-ydsj/src/main/resources/mapper/SjLhscMapper.xml
View file @
383f5927
...
...
@@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectSjLhscList"
parameterType=
"SjLhsc"
resultMap=
"SjLhscResult"
>
<include
refid=
"selectSjLhscVo"
/>
<where>
<if
test=
"hymc != null and hymc != ''"
>
and hymc
= #{hymc}
</if>
<if
test=
"hymc != null and hymc != ''"
>
and hymc
like concat('%', #{hymc}, '%')
</if>
<if
test=
"hyrq != null and hyrq != ''"
>
and hyrq = #{hyrq}
</if>
<if
test=
"deptId != null and deptId != ''"
>
and a.dept_id = #{deptId}
</if>
<if
test=
"hydd != null and hydd != ''"
>
and hydd = #{hydd}
</if>
...
...
@@ -108,6 +108,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope}
group by d.dept_id
</select>
<select
id=
"tjByEjJjwtSl"
resultType=
"com.qianhe.domain.Vo.SjLhscVo"
>
select d.dept_id,d.dept_name,count(wt.id) jjwtsl
from sys_dept d
left join sj_lhsc lh on d.dept_id =lh.dept_id
left join sj_lhsc_wt wt on lh.id=wt.lhsc_id
where d.dwjb =#{dwjb}
<if
test=
"deptId != null and deptId != ''"
>
and lh.dept_id = #{deptId}
</if>
<if
test=
"startJd !=null and startJd !=''"
>
and DATE_FORMAT(hyrq,'%Y-%m')>=#{startJd}
</if>
<if
test=
"endJd !=null and endJd !=''"
>
and DATE_FORMAT(hyrq,'%Y-%m')
<
=#{endJd}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
group by d.dept_id
</select>
<insert
id=
"insertSjLhsc"
parameterType=
"SjLhsc"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
...
...
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