|
@@ -141,9 +141,7 @@ func (this *ContractAllocationController) CompanyContractList() {
|
|
|
if startDate == "" {
|
|
|
startDate = "2015-01-01"
|
|
|
}
|
|
|
- if endDate == "" {
|
|
|
- endDate = time.Now().Format(utils.FormatDate)
|
|
|
- }
|
|
|
+
|
|
|
var startSize int
|
|
|
if pageSize <= 0 {
|
|
|
pageSize = utils.PageSize20
|
|
@@ -162,8 +160,10 @@ func (this *ContractAllocationController) CompanyContractList() {
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
|
|
|
|
- condition += ` AND a.start_date >= ? AND a.start_date <= ? `
|
|
|
- pars = append(pars, startDate+" 00:00:01", endDate+" 23:59:59")
|
|
|
+ if endDate != "" {
|
|
|
+ condition += ` AND a.start_date >= ? AND a.start_date <= ? `
|
|
|
+ pars = append(pars, startDate+" 00:00:01", endDate+" 23:59:59")
|
|
|
+ }
|
|
|
|
|
|
//条件
|
|
|
if adminId != "" {
|
|
@@ -777,7 +777,7 @@ func (this *ContractAllocationController) CompanyContracUpdate() {
|
|
|
|
|
|
for _, v2 := range v.List {
|
|
|
if v2.Proportion < -20 {
|
|
|
- br.Msg = "研究员占比值不得小于总额的20%"
|
|
|
+ br.Msg = "研究员占比值不得小于总额的-20%"
|
|
|
br.ErrMsg = "研究员占比值不得小于总额的20%,Err:" + fmt.Sprint(proportionSum)
|
|
|
return
|
|
|
}
|
|
@@ -854,9 +854,6 @@ func (this *ContractAllocationController) CompanyContractStatistics() {
|
|
|
if startDate == "" {
|
|
|
startDate = "2015-01-01"
|
|
|
}
|
|
|
- if endDate == "" {
|
|
|
- endDate = time.Now().Format(utils.FormatDate)
|
|
|
- }
|
|
|
|
|
|
//是否导出报表
|
|
|
isExport, _ := this.GetBool("IsExport")
|
|
@@ -864,8 +861,10 @@ func (this *ContractAllocationController) CompanyContractStatistics() {
|
|
|
var condition string
|
|
|
|
|
|
var pars []interface{}
|
|
|
- condition += ` AND a.start_date >= ? AND a.start_date <= ? `
|
|
|
- pars = append(pars, startDate+" 00:00:01", endDate+" 23:59:59")
|
|
|
+ if endDate != "" {
|
|
|
+ condition += ` AND a.start_date >= ? AND a.start_date <= ? `
|
|
|
+ pars = append(pars, startDate+" 00:00:01", endDate+" 23:59:59")
|
|
|
+ }
|
|
|
//根据当前角色来获取查询条件
|
|
|
//condition, pars = getQueryParams(condition, pars, sysUser, "c.")
|
|
|
|