|
@@ -29,7 +29,6 @@ type OilContractReviewController struct {
|
|
|
// @Success 200 {object} []contractReview.OilContractReviewWorkFlow
|
|
// @Success 200 {object} []contractReview.OilContractReviewWorkFlow
|
|
|
// @router /list [get]
|
|
// @router /list [get]
|
|
|
func (this *OilContractReviewController) GetEntityList() {
|
|
func (this *OilContractReviewController) GetEntityList() {
|
|
|
-
|
|
|
|
|
//获取分页信息
|
|
//获取分页信息
|
|
|
page := this.GetPageInfoForm()
|
|
page := this.GetPageInfoForm()
|
|
|
where := " 1=1 "
|
|
where := " 1=1 "
|
|
@@ -50,14 +49,11 @@ func (this *OilContractReviewController) GetEntityList() {
|
|
|
ProcessKey := this.GetString("ProcessKey")
|
|
ProcessKey := this.GetString("ProcessKey")
|
|
|
BackRemark := this.GetString("BackRemark")
|
|
BackRemark := this.GetString("BackRemark")
|
|
|
CreateOn := this.GetString("CreateOn")
|
|
CreateOn := this.GetString("CreateOn")
|
|
|
- CreateUserId := this.GetString("CreateUserId")
|
|
|
|
|
- CreateBy := this.GetString("CreateBy")
|
|
|
|
|
|
|
|
|
|
if Id != "" {
|
|
if Id != "" {
|
|
|
where = where + " and r.Id like '%" + Id + "%'"
|
|
where = where + " and r.Id like '%" + Id + "%'"
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
if ContractClass != "" {
|
|
if ContractClass != "" {
|
|
|
where = where + " and c.ContractClass = '" + ContractClass + "'"
|
|
where = where + " and c.ContractClass = '" + ContractClass + "'"
|
|
|
}
|
|
}
|
|
@@ -83,15 +79,6 @@ func (this *OilContractReviewController) GetEntityList() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- if CreateUserId != "" {
|
|
|
|
|
- where = where + " and r.CreateUserId like '%" + CreateUserId + "%'"
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- if CreateBy != "" {
|
|
|
|
|
- where = where + " and r.CreateBy like '%" + CreateBy + "%'"
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
if CreateOn != "" {
|
|
if CreateOn != "" {
|
|
|
dates := strings.Split(CreateOn, ",")
|
|
dates := strings.Split(CreateOn, ",")
|
|
|
if len(dates) == 2 {
|
|
if len(dates) == 2 {
|
|
@@ -100,6 +87,15 @@ func (this *OilContractReviewController) GetEntityList() {
|
|
|
where = where + " and r.CreateOn>='" + minDate + "' and r.CreateOn<='" + maxDate + "'"
|
|
where = where + " and r.CreateOn>='" + minDate + "' and r.CreateOn<='" + maxDate + "'"
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 权限过滤 自己创建的评价 ,同二级部门创建的评价 ,企管法规处能看
|
|
|
|
|
+ where = where + " ( r.CreateUserId = '" + this.User.Id + "' "
|
|
|
|
|
+ where = where + " or r.UnitId = '" + strconv.Itoa(this.User.UnitId) + "' "
|
|
|
|
|
+
|
|
|
|
|
+ // 还少个企管法规处
|
|
|
|
|
+
|
|
|
|
|
+ where = where + " )"
|
|
|
|
|
+
|
|
|
svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
var list []contractReview.OilContractReviewListVo
|
|
var list []contractReview.OilContractReviewListVo
|
|
|
total := svc.GetContractReviewList(page.CurrentPage, page.Size, orderby, asc, &list, where)
|
|
total := svc.GetContractReviewList(page.CurrentPage, page.Size, orderby, asc, &list, where)
|
|
@@ -166,6 +162,8 @@ func (this *OilContractReviewController) AddEntity() {
|
|
|
var reviewMode contractReview.OilContractReview
|
|
var reviewMode contractReview.OilContractReview
|
|
|
reviewMode.ContractId = modeVO.ContractId
|
|
reviewMode.ContractId = modeVO.ContractId
|
|
|
reviewMode.Status = "0"
|
|
reviewMode.Status = "0"
|
|
|
|
|
+ reviewMode.Unit = this.User.Unit
|
|
|
|
|
+ reviewMode.UnitId = this.User.UnitId
|
|
|
reviewMode.CreateOn = time.Now()
|
|
reviewMode.CreateOn = time.Now()
|
|
|
reviewMode.CreateBy = this.User.Realname
|
|
reviewMode.CreateBy = this.User.Realname
|
|
|
reviewMode.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
|
|
reviewMode.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
|