Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-health-science
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
徐俊
yn-health-science
Commits
20756404
Commit
20756404
authored
Dec 31, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3e520911
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
57 additions
and
724 deletions
+57
-724
ComBatchDAO.java
...in/src/main/java/com/yiboshi/science/dao/ComBatchDAO.java
+1
-5
ComYearDAO.java
...min/src/main/java/com/yiboshi/science/dao/ComYearDAO.java
+0
-19
ComBatch.java
...in/src/main/java/com/yiboshi/science/entity/ComBatch.java
+6
-12
CommonEnum.java
...main/java/com/yiboshi/science/enumeration/CommonEnum.java
+1
-1
ComBatchDTO.java
.../main/java/com/yiboshi/science/param/dto/ComBatchDTO.java
+7
-43
ComYearDTO.java
...c/main/java/com/yiboshi/science/param/dto/ComYearDTO.java
+0
-55
ComBatchQueryVO.java
...java/com/yiboshi/science/param/query/ComBatchQueryVO.java
+6
-35
ComYearQueryVO.java
.../java/com/yiboshi/science/param/query/ComYearQueryVO.java
+0
-46
ComBatchController.java
.../java/com/yiboshi/science/rest/v1/ComBatchController.java
+5
-11
ComYearController.java
...n/java/com/yiboshi/science/rest/v1/ComYearController.java
+0
-125
ComBatchService.java
...ain/java/com/yiboshi/science/service/ComBatchService.java
+3
-8
ComYearService.java
...main/java/com/yiboshi/science/service/ComYearService.java
+0
-61
ComBatchServiceImpl.java
...com/yiboshi/science/service/impl/ComBatchServiceImpl.java
+17
-57
ComProjectCheckServiceImpl.java
...oshi/science/service/impl/ComProjectCheckServiceImpl.java
+1
-3
ComProjectServiceImpl.java
...m/yiboshi/science/service/impl/ComProjectServiceImpl.java
+2
-2
ComYearServiceImpl.java
.../com/yiboshi/science/service/impl/ComYearServiceImpl.java
+0
-213
SystemParameterServiceImpl.java
...oshi/science/service/impl/SystemParameterServiceImpl.java
+0
-1
ComBatchDAO.xml
science-admin/src/main/resources/mapper/ComBatchDAO.xml
+8
-6
ComYearDAO.xml
science-admin/src/main/resources/mapper/ComYearDAO.xml
+0
-21
No files found.
science-admin/src/main/java/com/yiboshi/science/dao/ComBatchDAO.java
View file @
20756404
...
...
@@ -14,9 +14,5 @@ import org.apache.ibatis.annotations.Param;
* @version 2021-08-26
*/
public
interface
ComBatchDAO
extends
BaseMapper
<
ComBatch
>,
BaseDAO
<
ComBatchQueryVO
,
ComBatchDTO
,
ComBatch
>
{
Integer
getMaxBatch
(
@Param
(
value
=
"year"
)
int
year
,
Integer
projType
);
ComBatchDTO
getCurrentYearBatchByType
(
Integer
projType
);
ComBatchDTO
getCurrentYearBatch
();
ComBatchDTO
getCurrentBatch
(
Integer
projType
,
Integer
timeType
);
}
science-admin/src/main/java/com/yiboshi/science/dao/ComYearDAO.java
deleted
100644 → 0
View file @
3e520911
package
com
.
yiboshi
.
science
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yiboshi.science.base.BaseDAO
;
import
com.yiboshi.science.entity.ComYear
;
import
com.yiboshi.science.param.dto.ComYearDTO
;
import
com.yiboshi.science.param.query.ComYearQueryVO
;
import
org.apache.ibatis.annotations.Param
;
/**
* 年度设置表 DAO
*
* @author lkl
* @version 2021-08-26
*/
public
interface
ComYearDAO
extends
BaseMapper
<
ComYear
>,
BaseDAO
<
ComYearQueryVO
,
ComYearDTO
,
ComYear
>
{
Integer
getMaxYearByType
(
@Param
(
value
=
"yearType"
)
int
yearType
);
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/entity/ComBatch.java
View file @
20756404
...
...
@@ -19,24 +19,18 @@ public class ComBatch extends BaseEntity {
private
Integer
year
;
/** 批次 */
private
Integer
batch
;
/** 时间类型 1项目申报 2任务书上报 3中期考核 */
private
Integer
timeType
;
/** 批次类型 1科研项目申报 2重点学科申报 */
private
Integer
projType
;
/** 申报开始时间 */
private
Date
reportStart
;
/** 申报结束时间 */
private
Date
reportEnd
;
/** 单位上报到州市级行政单位开始时间 */
private
Date
unitStart
;
/** 单位上报到州市级行政单位结束时间 */
private
Date
unitEnd
;
/** 州市级行政单位报到省卫健委开始时间 */
private
Date
prefectureStart
;
/** 州市级行政单位报到省卫健委结束时间 */
private
Date
prefectureEnd
;
/** 省直单位报到省卫健委开始时间 */
private
Date
provinceStart
;
/** 省直单位报到省卫健委结束时间 */
private
Date
provinceEnd
;
/** 审核开始时间 */
private
Date
auditStart
;
/** 审核结束时间 */
private
Date
auditEnd
;
/** 专家审核开始时间 */
private
Date
expertStart
;
/** 专家审核结束时间 */
...
...
science-admin/src/main/java/com/yiboshi/science/enumeration/CommonEnum.java
View file @
20756404
...
...
@@ -613,7 +613,7 @@ public class CommonEnum {
expertAdd
(
"expertAdd"
,
"添加专家"
),
expertStateUpdate
(
"expertStateUpdate"
,
"专家状态修改"
),
expertUpdate
(
"expert
Add
"
,
"专家修改"
),
expertUpdate
(
"expert
Update
"
,
"专家修改"
),
expertDelete
(
"expertDelete"
,
"删除专家"
),
managerAdd
(
"managerAdd"
,
"添加管理员"
),
...
...
science-admin/src/main/java/com/yiboshi/science/param/dto/ComBatchDTO.java
View file @
20756404
...
...
@@ -21,73 +21,38 @@ import java.util.Date;
@ApiModel
(
description
=
"批次表DTO"
)
public
class
ComBatchDTO
extends
BaseDTO
{
/** 年度 */
@ApiModelProperty
(
value
=
"年度"
,
position
=
2
)
private
Integer
year
;
/** 批次 */
@ApiModelProperty
(
value
=
"批次"
,
position
=
3
)
private
Integer
batch
;
/** 时间类型 1项目申报 2任务书上报 3中期考核 */
private
Integer
timeType
;
/** 批次类型 1科研项目申报 2重点学科申报 */
@ApiModelProperty
(
value
=
"批次类型"
,
position
=
4
)
private
Integer
projType
;
/** 申报开始时间 */
@ApiModelProperty
(
value
=
"申报开始时间"
,
position
=
4
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
reportStart
;
/** 申报结束时间 */
@ApiModelProperty
(
value
=
"申报结束时间"
,
position
=
5
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
reportEnd
;
/** 单位上报到州市级行政单位开始时间 */
@ApiModelProperty
(
value
=
"单位上报到州市级行政单位开始时间"
,
position
=
6
)
/** 审核开始时间 */
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
unitStart
;
/** 单位上报到州市级行政单位结束时间 */
@ApiModelProperty
(
value
=
"单位上报到州市级行政单位结束时间"
,
position
=
7
)
private
Date
auditStart
;
/** 审核结束时间 */
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
unitEnd
;
/** 州市级行政单位报到省卫健委开始时间 */
@ApiModelProperty
(
value
=
"州市级行政单位报到省卫健委开始时间"
,
position
=
8
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
prefectureStart
;
/** 州市级行政单位报到省卫健委结束时间 */
@ApiModelProperty
(
value
=
"州市级行政单位报到省卫健委结束时间"
,
position
=
9
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
prefectureEnd
;
/** 省直单位报到省卫健委开始时间 */
@ApiModelProperty
(
value
=
"省直单位报到省卫健委开始时间"
,
position
=
10
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
provinceStart
;
/** 省直单位报到省卫健委结束时间 */
@ApiModelProperty
(
value
=
"省直单位报到省卫健委结束时间"
,
position
=
11
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
provinceEnd
;
private
Date
auditEnd
;
/** 专家审核开始时间 */
@ApiModelProperty
(
value
=
"专家审核开始时间"
,
position
=
12
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
expertStart
;
/** 专家审核结束时间 */
@ApiModelProperty
(
value
=
"专家审核结束时间"
,
position
=
13
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
expertEnd
;
/** 备注 */
@ApiModelProperty
(
value
=
"备注"
,
position
=
14
)
@Length
(
max
=
200
,
message
=
"备注长度不能大于200"
)
private
String
remark
;
/** description */
@ApiModelProperty
(
value
=
"description"
,
position
=
15
)
private
String
description
;
/** 获取或设置一个值,该值指示是否禁用 */
@ApiModelProperty
(
value
=
"是否禁用"
,
position
=
16
)
private
Boolean
disabled
;
/** 获取或设置一个值,该值指示审核通过按钮是否禁用 */
@ApiModelProperty
(
value
=
"审核通过按钮是否禁用"
,
position
=
17
)
private
Boolean
btnPassed
;
/** 获取或设置一个值,该值指示返回修改按钮是否禁用 */
@ApiModelProperty
(
value
=
"返回修改按钮是否禁用"
,
position
=
18
)
private
Boolean
btnReturn
;
/** 获取或设置一个值,该值指示审核不通过按钮是否禁用 */
@ApiModelProperty
(
value
=
"审核不通过按钮是否禁用"
,
position
=
19
)
private
Boolean
btnUnpassed
;
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/param/dto/ComYearDTO.java
deleted
100644 → 0
View file @
3e520911
package
com
.
yiboshi
.
science
.
param
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yiboshi.science.base.BaseDTO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
java.util.Date
;
/**
* 年度设置表DTO
*
* @author lkl
* @version 2021-08-26
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
description
=
"年度设置表DTO"
)
public
class
ComYearDTO
extends
BaseDTO
{
/** 年度 */
@ApiModelProperty
(
value
=
"年度"
)
private
Integer
reportYear
;
/** 单位code */
@ApiModelProperty
(
value
=
"单位code"
,
position
=
1
)
private
String
unitCode
;
/** 类型 1项目 2任务书 3中期考核 */
@ApiModelProperty
(
value
=
"类型 1项目 2任务书 3中期考核"
,
position
=
2
)
private
Integer
yearType
;
/** 开始时间 */
@ApiModelProperty
(
value
=
"开始时间"
,
position
=
3
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
startTime
;
/** 结束时间 */
@ApiModelProperty
(
value
=
"结束时间"
,
position
=
4
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
endTime
;
/** 备注 */
@ApiModelProperty
(
value
=
"备注"
,
position
=
5
)
@Length
(
max
=
200
,
message
=
"备注长度不能大于200"
)
private
String
remark
;
/** 中期考核年度 例:2018,2019 */
@ApiModelProperty
(
value
=
"中期考核年度 例:2018,2019"
,
position
=
6
)
private
String
checkYear
;
/** */
@ApiModelProperty
(
value
=
""
,
position
=
6
)
private
boolean
disabled
;
/** 提示语 */
@ApiModelProperty
(
value
=
"提示语"
,
position
=
6
)
private
String
description
;
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/param/query/ComBatchQueryVO.java
View file @
20756404
...
...
@@ -20,53 +20,24 @@ import java.util.Date;
@ApiModel
(
description
=
"批次表VO"
)
public
class
ComBatchQueryVO
extends
PaginationVO
{
/** 年度 */
@ApiModelProperty
(
value
=
"年度"
,
position
=
2
)
private
Integer
year
;
/** 批次 */
@ApiModelProperty
(
value
=
"批次"
,
position
=
3
)
private
Integer
batch
;
/** 时间类型 1项目申报 2任务书上报 3中期考核 */
private
Integer
timeType
;
/** 批次类型 1科研项目申报 2重点学科申报 */
@ApiModelProperty
(
value
=
"批次类型"
,
position
=
4
)
private
Integer
projType
;
/** 申报开始时间 */
@ApiModelProperty
(
value
=
"申报开始时间"
,
position
=
5
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
reportStart
;
/** 申报结束时间 */
@ApiModelProperty
(
value
=
"申报结束时间"
,
position
=
6
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
reportEnd
;
/** 单位上报到州市级行政单位开始时间 */
@ApiModelProperty
(
value
=
"单位上报到州市级行政单位开始时间"
,
position
=
7
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
unitStart
;
/** 单位上报到州市级行政单位结束时间 */
@ApiModelProperty
(
value
=
"单位上报到州市级行政单位结束时间"
,
position
=
8
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
unitEnd
;
/** 州市级行政单位报到省卫健委开始时间 */
@ApiModelProperty
(
value
=
"州市级行政单位报到省卫健委开始时间"
,
position
=
9
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
prefectureStart
;
/** 州市级行政单位报到省卫健委结束时间 */
@ApiModelProperty
(
value
=
"州市级行政单位报到省卫健委结束时间"
,
position
=
10
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
prefectureEnd
;
/** 省直单位报到省卫健委开始时间 */
@ApiModelProperty
(
value
=
"省直单位报到省卫健委开始时间"
,
position
=
11
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
provinceStart
;
/** 省直单位报到省卫健委结束时间 */
@ApiModelProperty
(
value
=
"省直单位报到省卫健委结束时间"
,
position
=
12
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
provinceEnd
;
/** 审核开始时间 */
private
Date
auditStart
;
/** 审核结束时间 */
private
Date
auditEnd
;
/** 专家审核开始时间 */
@ApiModelProperty
(
value
=
"专家审核开始时间"
,
position
=
13
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
expertStart
;
/** 专家审核结束时间 */
@ApiModelProperty
(
value
=
"专家审核结束时间"
,
position
=
14
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
expertEnd
;
/** 备注 */
private
String
remark
;
...
...
science-admin/src/main/java/com/yiboshi/science/param/query/ComYearQueryVO.java
deleted
100644 → 0
View file @
3e520911
package
com
.
yiboshi
.
science
.
param
.
query
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yiboshi.science.base.PaginationVO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 查询年度设置表VO
*
* @author lkl
* @version 2021-08-26
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
description
=
"查询年度设置表VO"
)
public
class
ComYearQueryVO
extends
PaginationVO
{
/** 年度 */
@ApiModelProperty
(
value
=
"年度"
)
private
Integer
reportYear
;
/** 单位code */
@ApiModelProperty
(
value
=
"单位code"
,
position
=
1
)
private
String
unitCode
;
/** 类型 1项目 2任务书 3中期考核 */
@ApiModelProperty
(
value
=
"类型 1项目 2任务书 3中期考核"
,
position
=
2
)
private
Integer
yearType
;
/** 开始时间 */
@ApiModelProperty
(
value
=
"开始时间"
,
position
=
3
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
startTime
;
/** 结束时间 */
@ApiModelProperty
(
value
=
"结束时间"
,
position
=
4
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
endTime
;
/** 备注 */
@ApiModelProperty
(
value
=
"备注"
,
position
=
5
)
private
String
remark
;
/** 中期考核年度 例:2018,2019 */
@ApiModelProperty
(
value
=
"中期考核年度 例:2018,2019"
,
position
=
6
)
private
String
checkYear
;
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/rest/v1/ComBatchController.java
View file @
20756404
...
...
@@ -34,8 +34,8 @@ public class ComBatchController extends BaseController<ComBatchService, ComBatch
@ApiOperation
(
value
=
"分页查询"
,
httpMethod
=
"GET"
,
notes
=
"根据参数获取列表"
)
@GetMapping
@RequestMapping
(
"/get
Batch
ListByPage"
)
public
ResponseDataModel
<
Pagination
<
ComBatchDTO
>>
get
Batch
ListByPage
(
@Validated
ComBatchQueryVO
vo
,
BindingResult
bindingResult
)
{
@RequestMapping
(
"/getListByPage"
)
public
ResponseDataModel
<
Pagination
<
ComBatchDTO
>>
getListByPage
(
@Validated
ComBatchQueryVO
vo
,
BindingResult
bindingResult
)
{
Pagination
<
ComBatchDTO
>
page
=
comBatchService
.
getListByPage
(
vo
);
return
ResponseDataModel
.
ok
(
page
);
}
...
...
@@ -70,18 +70,12 @@ public class ComBatchController extends BaseController<ComBatchService, ComBatch
return
ResponseDataModel
.
ok
(
comBatchService
.
deleteBatch
(
id
));
}
@ApiOperation
(
value
=
"根据年度获取最大批次"
,
httpMethod
=
"GET"
,
notes
=
"根据年度获取最大批次"
)
@GetMapping
@RequestMapping
(
"/getMaxBatch"
)
public
ResponseDataModel
<
Integer
>
getMaxBatch
(
int
year
,
int
projType
)
{
return
ResponseDataModel
.
ok
(
comBatchService
.
getMaxBatch
(
year
,
projType
));
}
@ApiOperation
(
value
=
"获取当前申报或审核时间"
,
httpMethod
=
"GET"
,
notes
=
"获取当前申报或审核时间"
)
@GetMapping
@RequestMapping
(
"/getCurrentYearBatch"
)
public
ResponseDataModel
<
ComBatchDTO
>
getCurrentYearBatch
(
int
type
,
Integer
proj
Type
)
{
return
ResponseDataModel
.
ok
(
comBatchService
.
getCurrentYearBatch
(
type
,
proj
Type
));
public
ResponseDataModel
<
ComBatchDTO
>
getCurrentYearBatch
(
int
type
,
Integer
projType
,
Integer
time
Type
)
{
return
ResponseDataModel
.
ok
(
comBatchService
.
getCurrentYearBatch
(
type
,
projType
,
time
Type
));
}
/**
...
...
@@ -91,7 +85,7 @@ public class ComBatchController extends BaseController<ComBatchService, ComBatch
@GetMapping
@RequestMapping
(
"/getCurrentReportYearList"
)
public
ResponseDataModel
<
Map
<
String
,
Object
>>
getCurrentReportYearList
(
Integer
projType
)
{
ComBatchDTO
comBatchDTO
=
comBatchService
.
getCurrent
YearBatchByType
(
projType
);
ComBatchDTO
comBatchDTO
=
comBatchService
.
getCurrent
Batch
(
projType
,
null
);
Integer
year
=
(
null
!=
comBatchDTO
&&
Objects
.
nonNull
(
comBatchDTO
.
getYear
()))
?
comBatchDTO
.
getYear
()
:
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
);
List
<
SelectListItem
>
list
=
new
ArrayList
<>();
for
(
Integer
i
=
year
;
i
>
year
-
10
;
i
--)
{
...
...
science-admin/src/main/java/com/yiboshi/science/rest/v1/ComYearController.java
deleted
100644 → 0
View file @
3e520911
package
com
.
yiboshi
.
science
.
rest
.
v1
;
import
com.yiboshi.arch.base.ResponseDataModel
;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.config.security.SecurityUserHolder
;
import
com.yiboshi.science.entity.ComYear
;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.param.dto.ComYearDTO
;
import
com.yiboshi.science.param.query.ComYearQueryVO
;
import
com.yiboshi.science.rest.BaseController
;
import
com.yiboshi.science.service.ComYearService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.*
;
/**
* 功能:年度设置表 接口
*
* @author lkl
* @version 2021-08-26
*/
@Api
(
tags
=
"com-year"
,
description
=
"年度设置表"
)
@RestController
@RequestMapping
(
"/v1/science-admin/com-year"
)
public
class
ComYearController
extends
BaseController
<
ComYearService
,
ComYearQueryVO
,
ComYearDTO
,
ComYear
>
{
@Autowired
private
ComYearService
comYearService
;
/**
* 功能:分页查询
*
* @param vo 查询条件
*/
@ApiOperation
(
value
=
"分页查询"
,
httpMethod
=
"GET"
,
notes
=
"根据参数获取列表"
)
@GetMapping
@RequestMapping
(
"/getListByPage"
)
public
ResponseDataModel
<
Pagination
<
ComYearDTO
>>
getListByPage
(
@Validated
ComYearQueryVO
vo
,
BindingResult
bindingResult
)
{
vo
.
setUnitCode
(
SecurityUserHolder
.
getUnitCode
());
Pagination
<
ComYearDTO
>
page
=
comYearService
.
getListByPage
(
vo
);
return
ResponseDataModel
.
ok
(
page
);
}
/**
* 添加/更新年度设置
*
* @param vo
*/
@ApiOperation
(
value
=
"添加/更新年度设置"
,
httpMethod
=
"POST"
,
notes
=
"添加年度"
)
@RequestMapping
(
"/addOrUpdateYearInfo"
)
@PostMapping
public
ResponseDataModel
<
ComYearDTO
>
addOrUpdateYearInfo
(
@RequestBody
ComYear
vo
)
{
comYearService
.
addOrUpdateYearInfo
(
vo
);
return
ResponseDataModel
.
ok
();
}
/**
* 功能:获取最大年度
*/
@ApiOperation
(
value
=
"获取项目申报年度"
,
httpMethod
=
"GET"
,
notes
=
"获取项目申报年度"
)
@GetMapping
@RequestMapping
(
"/getReportYear"
)
public
ResponseDataModel
<
Map
<
String
,
Object
>>
getReportYear
()
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>(
1
)
{
{
put
(
"reportYear"
,
comYearService
.
getReportYear
());
}
};
return
ResponseDataModel
.
ok
(
data
);
}
/**
* 功能:获取申报年度下拉列表
*/
@ApiOperation
(
value
=
"获取申报年度下拉列表"
,
httpMethod
=
"GET"
,
notes
=
"获取申报年度下拉列表"
)
@GetMapping
@RequestMapping
(
"/getYearSelectItem"
)
public
ResponseDataModel
<
List
<
SelectListItem
>>
getYearSelectItem
()
{
Integer
reportYear
=
comYearService
.
getReportYear
();
Integer
year
=
reportYear
.
equals
(
0
)
?
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
)
:
reportYear
;
List
<
SelectListItem
>
list
=
new
ArrayList
<>();
SelectListItem
item
;
for
(
Integer
i
=
year
;
i
>
year
-
10
;
i
--)
{
item
=
new
SelectListItem
();
item
.
setTitle
(
i
+
"年"
);
item
.
setKey
(
i
.
toString
());
list
.
add
(
item
);
}
return
ResponseDataModel
.
ok
(
list
);
}
@ApiOperation
(
value
=
"获取项目申报时间"
,
httpMethod
=
"GET"
,
notes
=
"获取项目申报时间"
)
@GetMapping
@RequestMapping
(
"/getYearByTreeCode"
)
public
ResponseDataModel
<
ComYearDTO
>
getYearByTreeCode
(
int
type
)
{
ComYearDTO
comYear
=
new
ComYearDTO
();
Integer
reportYear
=
0
;
switch
(
type
)
{
case
1
:
reportYear
=
comYearService
.
getReportYear
();
break
;
case
2
:
reportYear
=
comYearService
.
getTestYear
();
break
;
case
3
:
reportYear
=
comYearService
.
getCheckYear
();
break
;
}
comYear
=
comYearService
.
getYearByTreeCode
(
SecurityUserHolder
.
getUnitCode
(),
reportYear
.
equals
(
0
)
?
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
)
:
reportYear
,
type
);
return
ResponseDataModel
.
ok
(
comYear
);
}
@ApiOperation
(
value
=
"获取上级单位申报时间"
,
httpMethod
=
"GET"
,
notes
=
"获取上级单位申报时间"
)
@GetMapping
@RequestMapping
(
"/getYearInfo"
)
public
ResponseDataModel
<
ComYearDTO
>
getYearInfo
(
int
type
)
{
return
ResponseDataModel
.
ok
(
comYearService
.
getYearInfo
(
type
));
}
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/service/ComBatchService.java
View file @
20756404
...
...
@@ -35,12 +35,6 @@ public interface ComBatchService extends BaseService<ComBatchQueryVO, ComBatchDT
* @param
*/
String
deleteBatch
(
String
id
);
/**
* 获取年度最大批次
*
* @param year
*/
Integer
getMaxBatch
(
int
year
,
Integer
projType
);
/**
* 根据Id获取批次
*
...
...
@@ -53,13 +47,14 @@ public interface ComBatchService extends BaseService<ComBatchQueryVO, ComBatchDT
* @param type
* @param projType
*/
ComBatchDTO
getCurrentYearBatch
(
int
type
,
Integer
projType
);
ComBatchDTO
getCurrentYearBatch
(
int
type
,
Integer
projType
,
Integer
timeType
);
/**
* 获取当前申报批次
*
* @param timeType
* @param projType
*/
ComBatchDTO
getCurrent
YearBatchByType
(
Integer
proj
Type
);
ComBatchDTO
getCurrent
Batch
(
Integer
projType
,
Integer
time
Type
);
/**
* 获取当前申报年度
*
...
...
science-admin/src/main/java/com/yiboshi/science/service/ComYearService.java
deleted
100644 → 0
View file @
3e520911
package
com
.
yiboshi
.
science
.
service
;
import
com.yiboshi.science.base.BaseService
;
import
com.yiboshi.science.entity.ComYear
;
import
com.yiboshi.science.param.dto.ComYearDTO
;
import
com.yiboshi.science.param.query.ComYearQueryVO
;
/**
* 年度设置表 Service
*
* @author lkl
* @version 2021-08-26
*/
public
interface
ComYearService
extends
BaseService
<
ComYearQueryVO
,
ComYearDTO
,
ComYear
>
{
/** 获取中期考核申报年度
*
* @return
*/
Integer
getCheckYear
();
/** 获取任务书申报年度
*
* @return
*/
Integer
getTestYear
();
/** 获取申报年度
*
* @return
*/
Integer
getReportYear
();
/** 根据单位树获取申报时间
*
* @param treeCode
* @param reportYear
* @param yearType
* @return
*/
ComYearDTO
getYearByTreeCode
(
String
treeCode
,
int
reportYear
,
int
yearType
);
/** 获取申报时间
*
* @param type
* @return
*/
ComYearDTO
getYearInfo
(
int
type
);
/** 获取中期考核年度
*
* @return
*/
String
getCheckYear
(
int
year
);
/** 添加/更新年度设置
*
* @param vo
* @return
*/
void
addOrUpdateYearInfo
(
ComYear
vo
);
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/service/impl/ComBatchServiceImpl.java
View file @
20756404
...
...
@@ -47,6 +47,9 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
if
(
Objects
.
nonNull
(
vo
.
getBatch
()))
{
criteria
.
eq
(
"batch"
,
vo
.
getBatch
());
}
if
(
Objects
.
nonNull
(
vo
.
getTimeType
()))
{
criteria
.
eq
(
"time_type"
,
vo
.
getTimeType
());
}
if
(
Objects
.
nonNull
(
vo
.
getProjType
()))
{
criteria
.
eq
(
"proj_type"
,
vo
.
getProjType
());
}
...
...
@@ -56,25 +59,6 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
if
(
Objects
.
nonNull
(
vo
.
getReportEnd
()))
{
criteria
.
eq
(
"report_end"
,
vo
.
getReportEnd
());
}
if
(
Objects
.
nonNull
(
vo
.
getUnitStart
()))
{
criteria
.
eq
(
"unit_start"
,
vo
.
getUnitStart
());
}
if
(
Objects
.
nonNull
(
vo
.
getUnitEnd
()))
{
criteria
.
eq
(
"unit_end"
,
vo
.
getUnitEnd
());
}
if
(
Objects
.
nonNull
(
vo
.
getPrefectureStart
()))
{
criteria
.
eq
(
"prefecture_start"
,
vo
.
getPrefectureStart
());
}
if
(
Objects
.
nonNull
(
vo
.
getPrefectureEnd
()))
{
criteria
.
eq
(
"prefecture_end"
,
vo
.
getPrefectureEnd
());
}
if
(
Objects
.
nonNull
(
vo
.
getProvinceStart
()))
{
criteria
.
eq
(
"province_start"
,
vo
.
getProvinceStart
());
}
if
(
Objects
.
nonNull
(
vo
.
getProvinceEnd
()))
{
criteria
.
eq
(
"province_end"
,
vo
.
getProvinceEnd
());
}
if
(
Objects
.
nonNull
(
vo
.
getExpertStart
()))
{
criteria
.
eq
(
"expert_start"
,
vo
.
getReportStart
());
}
...
...
@@ -130,10 +114,6 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
return
this
.
update
(
vo
);
}
public
Integer
getMaxBatch
(
int
year
,
Integer
projType
)
{
return
comBatchDAO
.
getMaxBatch
(
year
,
projType
);
}
public
String
deleteBatch
(
String
id
)
{
ComBatchDTO
dto
=
this
.
dtoById
(
id
);
String
msg
=
""
;
...
...
@@ -155,12 +135,12 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
/**
* 获取当前申报或审核时间
*
* @param type 1:项目申报时间 2:州市级及以下单位上报时间 3:州市级行政单位审核时间 4:省直单位上报时间 5:专家评审时间
* @param type
1:项目申报时间 2:州市级及以下单位上报时间 3:州市级行政单位审核时间 4:省直单位上报时间 5:专家评审时间
* @param projType 1.科研项目申报 2.重点项目申报
* @return
*/
public
ComBatchDTO
getCurrentYearBatch
(
int
type
,
Integer
projType
)
{
ComBatchDTO
comBatch
=
this
.
getCurrent
YearBatchByType
(
proj
Type
);
public
ComBatchDTO
getCurrentYearBatch
(
int
type
,
Integer
projType
,
Integer
timeType
)
{
ComBatchDTO
comBatch
=
this
.
getCurrent
Batch
(
projType
,
time
Type
);
Date
date
=
new
Date
();
// 获取当前时间
boolean
flag
=
false
;
if
(
null
!=
comBatch
)
{
...
...
@@ -169,29 +149,10 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
comBatch
.
setDisabled
(
judgementDateTimeDisabled
(
date
,
comBatch
.
getReportStart
(),
comBatch
.
getReportEnd
()));
comBatch
.
setDescription
(
judgementDateTimeStr
(
date
,
comBatch
.
getReportStart
(),
comBatch
.
getReportEnd
(),
comBatch
.
getBatch
(),
comBatch
.
getYear
()));
break
;
case
2
:
//州市级及以下单位上报时间(州市级及以下单位项目上报州市级行政单位时间)
flag
=
judgementDateTimeDisabled
(
date
,
comBatch
.
getUnitStart
(),
comBatch
.
getUnitEnd
());
comBatch
.
setDisabled
(
flag
);
comBatch
.
setDescription
(
judgementDateTimeStr
(
date
,
comBatch
.
getUnitStart
(),
comBatch
.
getUnitEnd
(),
comBatch
.
getBatch
(),
comBatch
.
getYear
()));
comBatch
.
setBtnPassed
(!
flag
);
comBatch
.
setBtnReturn
(!
flag
);
comBatch
.
setBtnUnpassed
(
false
);
break
;
case
3
:
//州市级行政单位审核时间(州市级行政单位项目上报省卫健委时间)
flag
=
judgementDateTimeDisabled
(
date
,
comBatch
.
getPrefectureStart
(),
comBatch
.
getPrefectureEnd
());
comBatch
.
setDisabled
(
flag
);
comBatch
.
setDescription
(
judgementDateTimeStr
(
date
,
comBatch
.
getPrefectureStart
(),
comBatch
.
getPrefectureEnd
(),
comBatch
.
getBatch
(),
comBatch
.
getYear
()));
comBatch
.
setBtnPassed
(!
flag
);
comBatch
.
setBtnReturn
(
true
);
comBatch
.
setBtnUnpassed
(
false
);
break
;
case
4
:
//省直单位上报时间(省直单位项目上报省卫健委时间)
flag
=
judgementDateTimeDisabled
(
date
,
comBatch
.
getProvinceStart
(),
comBatch
.
getProvinceEnd
());
case
2
:
// 审核时间
flag
=
judgementDateTimeDisabled
(
date
,
comBatch
.
getAuditStart
(),
comBatch
.
getAuditEnd
());
comBatch
.
setDisabled
(
flag
);
comBatch
.
setDescription
(
judgementDateTimeStr
(
date
,
comBatch
.
getProvinceStart
(),
comBatch
.
getProvinceEnd
(),
comBatch
.
getBatch
(),
comBatch
.
getYear
()));
comBatch
.
setBtnPassed
(!
flag
);
comBatch
.
setBtnReturn
(!
flag
);
comBatch
.
setBtnUnpassed
(
false
);
comBatch
.
setDescription
(
judgementDateTimeStr
(
date
,
comBatch
.
getAuditStart
(),
comBatch
.
getAuditEnd
(),
comBatch
.
getBatch
(),
comBatch
.
getYear
()));
break
;
case
5
:
//专家评审时间
comBatch
.
setDisabled
(
judgementDateTimeDisabled
(
date
,
comBatch
.
getExpertStart
(),
comBatch
.
getExpertEnd
()));
...
...
@@ -212,19 +173,17 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
}
public
Integer
getReportYear
(
Integer
projType
)
{
ComBatchDTO
comBatch
=
this
.
getCurrent
YearBatchByType
(
projType
);
ComBatchDTO
comBatch
=
this
.
getCurrent
Batch
(
projType
,
null
);
if
(
null
!=
comBatch
)
return
comBatch
.
getYear
();
else
return
0
;
}
public
ComBatchDTO
getCurrentYearBatchByType
(
Integer
projType
)
{
if
(
Objects
.
nonNull
(
projType
))
return
comBatchDAO
.
getCurrentYearBatchByType
(
projType
);
else
return
comBatchDAO
.
getCurrentYearBatch
();
public
ComBatchDTO
getCurrentBatch
(
Integer
projType
,
Integer
timeType
)
{
if
(
Objects
.
isNull
(
timeType
))
timeType
=
1
;
return
comBatchDAO
.
getCurrentBatch
(
projType
,
timeType
);
}
private
String
judgementDateTimeStr
(
Date
currentDate
,
Date
startDate
,
Date
endDate
,
int
Batch
,
Integer
year
)
{
...
...
@@ -244,9 +203,10 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
/**
* 判断时间范围,在时间范围内:true,在时间范围外:false
*
* @param currentDate 当前时间
* @param startDate 开始时间
* @param endDate 结束时间
* @param startDate
开始时间
* @param endDate
结束时间
* @return
*/
private
boolean
judgementDateTimeDisabled
(
Date
currentDate
,
Date
startDate
,
Date
endDate
)
{
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectCheckServiceImpl.java
View file @
20756404
...
...
@@ -40,8 +40,6 @@ public class ComProjectCheckServiceImpl extends BaseServiceImpl<ComProjectCheckD
@Autowired
private
ComProjectTaskService
ComProjectTaskService
;
@Autowired
private
ComYearService
comYearService
;
@Autowired
private
ComProjectService
comProjectService
;
@Autowired
private
CreateCodeUtil
createCodeUtil
;
...
...
@@ -194,7 +192,7 @@ public class ComProjectCheckServiceImpl extends BaseServiceImpl<ComProjectCheckD
ComProjectTask
test
=
ComProjectTaskService
.
entityById
(
testId
);
if
(
null
==
test
)
return
;
String
checkYear
=
comYearService
.
getCheckYear
(
test
.
getReportYear
())
;
String
checkYear
=
""
;
if
(
checkYear
.
equals
(
""
))
return
;
String
[]
arr
=
checkYear
.
split
(
","
);
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectServiceImpl.java
View file @
20756404
...
...
@@ -934,7 +934,7 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
}
private
String
InsertProjectBaseInfo
(
ComProjectDTO
dto
)
{
ComBatchDTO
comBatchDTO
=
comBatchService
.
getCurrent
YearBatchByType
(
dto
.
getProjType
()
);
ComBatchDTO
comBatchDTO
=
comBatchService
.
getCurrent
Batch
(
dto
.
getProjType
(),
null
);
ComProject
comProject
=
convert2Entity
(
dto
);
comProject
.
setAppNo
(
getAppNo
());
comProject
.
setReportYear
(
comBatchDTO
.
getYear
());
...
...
@@ -967,7 +967,7 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
@Transactional
//插入
public
String
projectInsert
(
ComProjectDTO
dto
)
{
ComBatchDTO
comBatchDTO
=
comBatchService
.
getCurrent
YearBatchByType
(
dto
.
getProjType
()
);
ComBatchDTO
comBatchDTO
=
comBatchService
.
getCurrent
Batch
(
dto
.
getProjType
(),
null
);
ComProject
comProject
=
convert2Entity
(
dto
);
comProject
.
setAppNo
(
getAppNo
());
comProject
.
setReportYear
(
comBatchDTO
.
getYear
());
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComYearServiceImpl.java
deleted
100644 → 0
View file @
3e520911
package
com
.
yiboshi
.
science
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yiboshi.science.base.BaseServiceImpl
;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.config.bean.SystemProperties
;
import
com.yiboshi.science.config.security.SecurityUserHolder
;
import
com.yiboshi.science.dao.ComYearDAO
;
import
com.yiboshi.science.entity.ComYear
;
import
com.yiboshi.science.param.dto.ComYearDTO
;
import
com.yiboshi.science.param.query.ComYearQueryVO
;
import
com.yiboshi.science.service.ComYearService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
/**
* 年度设置表 Service 实现类
*
* @author lkl
* @version 2021-08-26
*/
@Service
public
class
ComYearServiceImpl
extends
BaseServiceImpl
<
ComYearDAO
,
ComYearQueryVO
,
ComYearDTO
,
ComYear
>
implements
ComYearService
{
@Autowired
private
ComYearDAO
comYearDAO
;
private
final
SystemProperties
properties
;
public
ComYearServiceImpl
(
SystemProperties
properties
)
{
this
.
properties
=
properties
;
}
@Override
protected
void
setCriteriaForQuery
(
ComYearQueryVO
vo
,
QueryWrapper
<
ComYearQueryVO
>
criteria
)
{
if
(
Objects
.
nonNull
(
vo
.
getReportYear
()))
{
criteria
.
eq
(
"report_year"
,
vo
.
getReportYear
());
}
if
(
Objects
.
nonNull
(
vo
.
getUnitCode
()))
{
criteria
.
eq
(
"unit_code"
,
vo
.
getUnitCode
());
}
if
(
Objects
.
nonNull
(
vo
.
getYearType
()))
{
criteria
.
eq
(
"year_type"
,
vo
.
getYearType
());
}
if
(
Objects
.
nonNull
(
vo
.
getStartTime
()))
{
criteria
.
eq
(
"start_time"
,
vo
.
getStartTime
());
}
if
(
Objects
.
nonNull
(
vo
.
getEndTime
()))
{
criteria
.
eq
(
"end_time"
,
vo
.
getEndTime
());
}
if
(
Objects
.
nonNull
(
vo
.
getRemark
()))
{
criteria
.
eq
(
"remark"
,
vo
.
getRemark
());
}
if
(
Objects
.
nonNull
(
vo
.
getCheckYear
()))
{
criteria
.
eq
(
"check_year"
,
vo
.
getCheckYear
());
}
}
@Override
public
Pagination
<
ComYearDTO
>
getListByPage
(
ComYearQueryVO
vo
)
{
QueryWrapper
criteria
=
new
QueryWrapper
();
setCriteriaForQuery
(
vo
,
criteria
);
Page
<
ComYearQueryVO
>
page
=
new
Page
<>(
vo
.
getPageIndex
(),
vo
.
getPageSize
());
List
<
ComYearDTO
>
dtoList
=
comYearDAO
.
getListByPage
(
page
,
criteria
).
getRecords
();
return
new
Pagination
<>(
dtoList
,
page
.
getTotal
(),
vo
.
getPageSize
());
}
@Override
public
Integer
getCheckYear
()
{
return
comYearDAO
.
getMaxYearByType
(
3
);
}
@Override
public
Integer
getTestYear
()
{
return
comYearDAO
.
getMaxYearByType
(
2
);
}
@Override
public
Integer
getReportYear
()
{
return
comYearDAO
.
getMaxYearByType
(
1
);
}
@Override
public
ComYearDTO
getYearByTreeCode
(
String
treeCode
,
int
reportYear
,
int
yearType
)
{
ComYearDTO
comYearDTO
=
new
ComYearDTO
();
ComYear
comYear
=
this
.
getByTreeCode
(
treeCode
,
reportYear
,
yearType
);
Date
Date
=
Calendar
.
getInstance
().
getTime
();
SimpleDateFormat
time
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
comYear
)
{
comYearDTO
=
convert2DTO
(
comYear
);
String
start
=
time
.
format
(
comYear
.
getStartTime
());
String
end
=
time
.
format
(
comYear
.
getEndTime
());
if
(
Date
.
before
(
comYear
.
getStartTime
()))
{
comYearDTO
.
setDisabled
(
false
);
comYearDTO
.
setDescription
(
start
+
"--"
+
end
+
"(时间未到)"
);
}
else
if
(
Date
.
after
(
comYear
.
getEndTime
()))
{
comYearDTO
.
setDisabled
(
false
);
comYearDTO
.
setDescription
(
start
+
"--"
+
end
+
"(已过期)"
);
}
else
{
comYearDTO
.
setDisabled
(
true
);
comYearDTO
.
setDescription
(
start
+
"--"
+
end
);
}
}
else
{
comYearDTO
.
setDisabled
(
false
);
comYearDTO
.
setDescription
(
"未设置时间"
);
}
if
(
treeCode
.
length
()
==
4
)
{
comYearDTO
.
setDisabled
(
true
);
}
comYearDTO
.
setReportYear
(
reportYear
);
return
comYearDTO
;
}
public
String
getCheckYear
(
int
year
)
{
ComYear
comYear
=
new
ComYear
();
comYear
.
setYearType
(
1
);
comYear
.
setReportYear
(
year
);
comYear
=
this
.
getEntity
(
comYear
);
return
comYear
==
null
?
""
:
comYear
.
getCheckYear
();
}
@Override
public
ComYearDTO
getYearInfo
(
int
type
)
{
ComYearDTO
comYearDTO
=
new
ComYearDTO
();
Integer
reportYear
=
0
;
switch
(
type
){
case
1
:
reportYear
=
this
.
getReportYear
();
break
;
case
2
:
reportYear
=
this
.
getTestYear
();
break
;
case
3
:
reportYear
=
this
.
getCheckYear
();
break
;
}
if
(
SecurityUserHolder
.
getUnitCode
().
length
()
!=
properties
.
getDefaultCodeLength
())
{
comYearDTO
=
this
.
getYearInfo
(
SecurityUserHolder
.
getUnitCode
(),
reportYear
,
type
);
}
else
{
comYearDTO
.
setUnitCode
(
SecurityUserHolder
.
getUnitCode
());
comYearDTO
.
setYearType
(
type
);
comYearDTO
.
setDisabled
(
true
);
comYearDTO
.
setReportYear
(
reportYear
.
equals
(
0
)
?
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
)
:
reportYear
+
1
);
}
return
comYearDTO
;
}
public
ComYearDTO
getYearInfo
(
String
treeCode
,
int
reportYear
,
int
yearType
)
{
ComYearDTO
comYearDTO
=
new
ComYearDTO
();
ComYear
comYear
=
this
.
getByTreeCode
(
treeCode
,
reportYear
,
yearType
);
SimpleDateFormat
time
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
comYear
)
{
comYearDTO
=
convert2DTO
(
comYear
);
String
start
=
time
.
format
(
comYear
.
getStartTime
());
String
end
=
time
.
format
(
comYear
.
getEndTime
());
comYearDTO
.
setDescription
(
"当前填报年度:"
+
comYear
.
getReportYear
()
+
", 上级单位设置起止时间:"
+
start
+
"--"
+
end
);
ComYear
year
=
new
ComYear
();
year
.
setUnitCode
(
treeCode
);
year
.
setReportYear
(
reportYear
);
year
.
setYearType
(
yearType
);
year
=
this
.
getEntity
(
year
);
if
(
year
==
null
)
comYearDTO
.
setDisabled
(
true
);
}
else
{
comYearDTO
.
setDescription
(
"上级单位未设置填报时间"
);
}
comYearDTO
.
setUnitCode
(
treeCode
);
return
comYearDTO
;
}
/**
* 添加/更新年度设置
*
* @param vo
* @return
*/
@Override
public
void
addOrUpdateYearInfo
(
ComYear
vo
)
{
ComYear
comYear
=
new
ComYear
();
comYear
.
setUnitCode
(
vo
.
getUnitCode
());
comYear
.
setReportYear
(
vo
.
getReportYear
());
comYear
.
setYearType
(
vo
.
getYearType
());
comYear
=
this
.
getEntity
(
comYear
);
if
(
comYear
==
null
)
{
this
.
insert
(
vo
);
}
else
{
comYear
.
setStartTime
(
vo
.
getStartTime
());
comYear
.
setEndTime
(
vo
.
getEndTime
());
comYear
.
setCheckYear
(
vo
.
getCheckYear
());
comYear
.
setRemark
(
vo
.
getRemark
());
this
.
update
(
comYear
);
}
}
private
ComYear
getByTreeCode
(
String
treeCode
,
int
reportYear
,
int
yearType
)
{
if
(
treeCode
.
length
()
!=
properties
.
getDefaultCodeLength
())
treeCode
=
treeCode
.
substring
(
0
,
treeCode
.
length
()
-
properties
.
getDefaultCodeLength
());
ComYear
comYear
=
new
ComYear
();
comYear
.
setUnitCode
(
treeCode
);
comYear
.
setReportYear
(
reportYear
);
comYear
.
setYearType
(
yearType
);
comYear
=
this
.
getEntity
(
comYear
);
if
(
null
==
comYear
&&
((
treeCode
.
length
()
/
properties
.
getDefaultCodeLength
())
>
1
))
{
comYear
=
getByTreeCode
(
treeCode
,
reportYear
,
yearType
);
}
return
comYear
;
}
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/service/impl/SystemParameterServiceImpl.java
View file @
20756404
...
...
@@ -430,7 +430,6 @@ public class SystemParameterServiceImpl extends BaseServiceImpl<SystemParameterD
public
List
<
SpecDTO
>
getSpecArray
()
{
List
<
SpecDTO
>
list
=
null
;
Object
obj
=
redisUtils
.
get
(
RedisKey
.
SpecArrayList
);
if
(
null
!=
obj
)
list
=
(
List
<
SpecDTO
>)
redisUtils
.
get
(
RedisKey
.
SpecArrayList
);
if
(
null
==
list
||
list
.
size
()
==
0
)
{
...
...
science-admin/src/main/resources/mapper/ComBatchDAO.xml
View file @
20756404
...
...
@@ -15,12 +15,13 @@
ORDER BY year desc, batch desc
</select>
<select
id=
"getMaxBatch"
resultType=
"java.lang.Integer"
>
select ifnull(max(batch), 0) from com_batch where year = #{year} and proj_type = #{projType}
select ifnull(max(batch), 0)
from com_batch
where year = #{year} and proj_type = #{projType}
</select>
<select
id=
"getCurrentYearBatchByType"
resultType=
"com.yiboshi.science.param.dto.ComBatchDTO"
>
select * from com_batch where proj_type = #{projType} order by year desc, batch desc limit 1
</select>
<select
id=
"getCurrentYearBatch"
resultType=
"com.yiboshi.science.param.dto.ComBatchDTO"
>
select * from com_batch order by year desc, batch desc limit 1
<select
id=
"getCurrentBatch"
parameterType=
"java.util.Map"
resultType=
"com.yiboshi.science.param.dto.ComBatchDTO"
>
select *
from com_batch
where proj_type = #{projType} and time_type=#{timeType} order by year desc, batch desc limit 1
</select>
</mapper>
\ No newline at end of file
science-admin/src/main/resources/mapper/ComYearDAO.xml
deleted
100644 → 0
View file @
3e520911
<?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.yiboshi.science.dao.ComYearDAO"
>
<sql
id=
"allColumns"
>
t.report_year as reportYear, t.unit_code as unitCode, t.year_type as yearType, t.start_time as startTime, t.end_time as endTime, t.remark as remark, t.check_year as checkYear, t.created as created,
t.updated as updated
</sql>
<select
id=
"getMaxYearByType"
parameterType=
"int"
resultType=
"java.lang.Integer"
>
select ifnull(max(report_year),0) as report_year from com_year where year_type=#{yearType}
</select>
<select
id=
"getListByPage"
resultType=
"com.yiboshi.science.param.dto.ComYearDTO"
>
select c.* from com_year c
<where>
${ew.sqlSegment}
</where>
order by c.report_year desc
</select>
</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