|
|
@@ -114,16 +114,16 @@ func (this *OilSupplierCertAppendController) GetList() {
|
|
|
svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
var registerUser register.OilCorporateInfo
|
|
|
sql := " UserName='" + this.User.Username + "'"
|
|
|
- svc.GetEntity(®isterUser,sql)
|
|
|
+ svc.GetEntity(®isterUser, sql)
|
|
|
//企业用户必须加创建人条件
|
|
|
if this.User.IsCompanyUser == 1 {
|
|
|
- where = where + " and (b.CreateUserId = '" + this.User.Id + "' or a.CommercialNo='"+registerUser.CommercialNo+"')"
|
|
|
+ where = where + " and (b.CreateUserId = '" + this.User.Id + "' or a.CommercialNo='" + registerUser.CommercialNo + "')"
|
|
|
} else {
|
|
|
//超级管理员和有查看所有数据权限的用户不加条件
|
|
|
svcPerm := permission.GetPermissionService(utils.DBE)
|
|
|
isauth := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.append.AllRecord")
|
|
|
if !svcPerm.IsAdmin(this.User.Id) && !isauth {
|
|
|
- where = where + " and (b.CreateUserId = '" + this.User.Id + "' or a.CommercialNo='"+registerUser.CommercialNo+"')"
|
|
|
+ where = where + " and (b.CreateUserId = '" + this.User.Id + "' or a.CommercialNo='" + registerUser.CommercialNo + "')"
|
|
|
}
|
|
|
}
|
|
|
var list []suppliercertappend.OilSupplierCertAppend
|
|
|
@@ -164,17 +164,17 @@ func (this *OilSupplierCertAppendController) GetSupplier() {
|
|
|
where := "1=1 "
|
|
|
if SuppTypeCode != "" {
|
|
|
where = " WHERE b.Id is NOT NULL AND a.SupplierTypeCode = '" + SuppTypeCode + "' and a.InFlag='1'"
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
where = " WHERE b.Id is NOT NULL AND a.InFlag='1'"
|
|
|
}
|
|
|
var registerUser register.OilCorporateInfo
|
|
|
sql := " UserName='" + this.User.Username + "'"
|
|
|
- svc.GetEntity(®isterUser,sql)
|
|
|
+ svc.GetEntity(®isterUser, sql)
|
|
|
//企业用户必须加创建人条件
|
|
|
if this.User.IsCompanyUser == 1 {
|
|
|
- where = where + " and (b.CreateUserId = '" + this.User.Id + "' or b.CommercialNo='"+registerUser.CommercialNo+"')"
|
|
|
- //if this.User.IsCompanyUser == 1 {
|
|
|
- // where = where + " and b.CreateUserId = '" + this.User.Id + "'"
|
|
|
+ where = where + " and (b.CreateUserId = '" + this.User.Id + "' or b.CommercialNo='" + registerUser.CommercialNo + "')"
|
|
|
+ //if this.User.IsCompanyUser == 1 {
|
|
|
+ // where = where + " and b.CreateUserId = '" + this.User.Id + "'"
|
|
|
}
|
|
|
|
|
|
sqlStr := "SELECT b.Id AS SupplierId, a.Id AS SupplierCertId, b.SupplierName AS SupplierName FROM OilSupplierCert AS a LEFT JOIN OilSupplier AS b ON a.SupplierId = b.Id "
|
|
|
@@ -196,9 +196,9 @@ func (this *OilSupplierCertAppendController) AddAppend() {
|
|
|
var cermodel suppliercert.OilSupplierCert
|
|
|
var model suppliercertappend.OilSupplierCertAppend
|
|
|
json.Unmarshal(jsonblob, &model)
|
|
|
- where := " Id = "+ utils.ToStr(model.SupplierCertId)+ " and SupplierTypeCode = '"+ model.AppendType +"'"
|
|
|
+ where := " Id = " + utils.ToStr(model.SupplierCertId) + " and SupplierTypeCode = '" + model.AppendType + "'"
|
|
|
svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
- where_app := " SupplierCertId = "+ utils.ToStr(model.SupplierCertId)+ " and SupplierId = "+ utils.ToStr(model.SupplierId)+ " and AppendType = '"+ model.AppendType +"'"
|
|
|
+ where_app := " SupplierCertId = " + utils.ToStr(model.SupplierCertId) + " and SupplierId = " + utils.ToStr(model.SupplierId) + " and AppendType = '" + model.AppendType + "'"
|
|
|
//where_app += " and Status < 11"
|
|
|
orderby := "ApplyDate DESC"
|
|
|
var modeltmp []suppliercertappend.OilSupplierCertAppend
|
|
|
@@ -252,7 +252,7 @@ func (this *OilSupplierCertAppendController) AddAppend() {
|
|
|
_, err := svc.InsertEntityBytbl(OilSupplierCertAppendName, &model)
|
|
|
//查询准入范围
|
|
|
var certsublist []suppliercertsub.OilSupplierCertSub
|
|
|
- suwhere := " SupplierCertId = "+ utils.ToStr(model.SupplierCertId)+ " and SupplierTypeCode = "+ model.AppendType
|
|
|
+ suwhere := " SupplierCertId = " + utils.ToStr(model.SupplierCertId) + " and SupplierTypeCode = " + model.AppendType
|
|
|
svc.GetEntitysByWhere(OilSupplierCertSubName, suwhere, &certsublist)
|
|
|
if err == nil {
|
|
|
errinfo.Message = "操作成功!"
|
|
|
@@ -353,9 +353,9 @@ func (this *OilSupplierCertAppendController) DeleteEntity() {
|
|
|
where := "SupplierCertAppendId = " + Id
|
|
|
//删除资质表信息
|
|
|
var submodel []suppliercertsub.OilSupplierCertSub
|
|
|
- svc.GetEntitysByWhere(OilSupplierCertSubName,where,&submodel)
|
|
|
+ svc.GetEntitysByWhere(OilSupplierCertSubName, where, &submodel)
|
|
|
if len(submodel) > 0 {
|
|
|
- filewhere := " SupplierId = "+ utils.ToStr(submodel[0].SupplierId) + " and SupType = 2 and SupplierTypeCode = '"+ submodel[0].SupplierTypeCode +"'"
|
|
|
+ filewhere := " SupplierId = " + utils.ToStr(submodel[0].SupplierId) + " and SupType = 2 and SupplierTypeCode = '" + submodel[0].SupplierTypeCode + "'"
|
|
|
err = svcSub.DeleteEntityBytbl(OilSupplierFileName, filewhere)
|
|
|
if err != nil {
|
|
|
//回滚操作
|
|
|
@@ -471,15 +471,15 @@ func (this *OilSupplierCertAppendController) GetMyTaskEntityList() {
|
|
|
appendIdList = strings.Trim(appendIdList, ",")
|
|
|
appendIdarr := strings.Split(appendIdList, ",")
|
|
|
for i, item := range appendIdarr {
|
|
|
- idx := strings.Index(item,"-")
|
|
|
- if (idx >= 0 ) {
|
|
|
+ idx := strings.Index(item, "-")
|
|
|
+ if idx >= 0 {
|
|
|
appendIdarr[i] = strings.Split(item, "-")[0]
|
|
|
}
|
|
|
}
|
|
|
appendIdList = strings.Join(appendIdarr, ",")
|
|
|
var list []suppliercertappend.OilSupplierCertAppend
|
|
|
var total int64 = 0
|
|
|
- if (appendIdList != "") {
|
|
|
+ if appendIdList != "" {
|
|
|
where += " and Id in (" + appendIdList + ")"
|
|
|
svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
total = svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
|
|
|
@@ -536,7 +536,6 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
|
|
|
firstAudit = strings.Trim(userIds, ",")
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//取出审批列表
|
|
|
certSrv := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
var supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend
|
|
|
@@ -576,7 +575,7 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
|
|
|
result := strconv.Itoa(this.User.IsCompanyUser)
|
|
|
if supplierCertAppendEntity.WorkFlowId == "0" || len(supplierCertAppendEntity.WorkFlowId) <= 0 {
|
|
|
//启动工作流
|
|
|
- businessKey = certappendId + "-" + strconv.Itoa(supplierCertAppendEntity.AuditIndex)
|
|
|
+ businessKey = certappendId + "-" + strconv.Itoa(supplierCertAppendEntity.AuditIndex)
|
|
|
processInstanceId = svcActiviti.StartProcess2(workflow.OIL_ENUSER_APPEND_APPLY, businessKey, this.User.Id, result, supplierCertAppendEntity.AppendType, supplierCertAppendEntity.SupplierName)
|
|
|
}
|
|
|
var ActiComplete workflow.ActiCompleteVM
|
|
|
@@ -630,7 +629,7 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
|
|
|
model.WorkFlowId = processInstanceId
|
|
|
if this.User.IsCompanyUser == 1 {
|
|
|
model.Status = suppliercert.FEN_TRIAL_STATUS //分办
|
|
|
- }else if this.User.IsCompanyUser == 0 {
|
|
|
+ } else if this.User.IsCompanyUser == 0 {
|
|
|
model.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
|
|
|
}
|
|
|
model.FirstAudit, _ = strconv.Atoi(firstAudit)
|
|
|
@@ -653,6 +652,103 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
|
|
|
certSrv.UpdateEntityByIdCols(certappendId, model, cols)
|
|
|
}
|
|
|
|
|
|
+// @Title 企业用户提交审批----启动工作流
|
|
|
+// @Description 企业用户提交按钮
|
|
|
+// @Success 200 {object} controllers.Request
|
|
|
+// @router /company-audit/:id [post]
|
|
|
+func (this *OilSupplierCertAppendController) companySubmitAuditEntity() {
|
|
|
+ certId := this.Ctx.Input.Param(":id")
|
|
|
+ unitId := this.GetString("UnitId") // 分办单位id
|
|
|
+ AuditRemark := this.GetString("AuditRemark")
|
|
|
+}
|
|
|
+
|
|
|
+// @Title 二级分办单位提交审批----启动工作流
|
|
|
+// @Description 二级分办单位提交审批按钮
|
|
|
+// @Success 200 {object} controllers.Request
|
|
|
+// @router /unit-audit/:id [post]
|
|
|
+func (this *OilSupplierCertAppendController) separateUnitSubmitAuditEntity() {
|
|
|
+ certAppendId := this.Ctx.Input.Param(":id")
|
|
|
+ firstAudit := this.GetString("firstAudit")
|
|
|
+ secondAudit := this.GetString("SecondAudit")
|
|
|
+ thirdAudit := this.GetString("ThirdAudit")
|
|
|
+ auditRemark := this.GetString("AuditRemark")
|
|
|
+
|
|
|
+ userId := this.User.Id
|
|
|
+ var baseUserInfo userRole.Base_User
|
|
|
+ userService := userRole.GetUserService(utils.DBE)
|
|
|
+ userService.GetEntityById(userId, &baseUserInfo)
|
|
|
+ unitId := baseUserInfo.UnitId
|
|
|
+
|
|
|
+ var errinfo ErrorDataInfo
|
|
|
+ defer func() { //finally处理失败的异常
|
|
|
+ if err := recover(); err != nil {
|
|
|
+ errinfo.Message = err.(string)
|
|
|
+ errinfo.Code = -1
|
|
|
+ this.Data["json"] = &errinfo
|
|
|
+ this.ServeJSON()
|
|
|
+ } else {
|
|
|
+ //返回正确结果
|
|
|
+ errinfo.Message = "审核提交成功"
|
|
|
+ errinfo.Code = 0
|
|
|
+ this.Data["json"] = &errinfo
|
|
|
+ this.ServeJSON()
|
|
|
+ }
|
|
|
+ }()
|
|
|
+
|
|
|
+ certSrv := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
+ var supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend
|
|
|
+ certSrv.GetEntityById(certAppendId, &supplierCertAppendEntity)
|
|
|
+ var supplierEntity supplier.OilSupplier
|
|
|
+ certSrv.GetEntityById(supplierCertAppendEntity.SupplierId, &supplierEntity)
|
|
|
+
|
|
|
+ svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
|
+ //启动工作流
|
|
|
+ businessKey := certAppendId + "-" + strconv.Itoa(supplierCertAppendEntity.AuditIndex)
|
|
|
+ processInstanceId := supplierCertAppendEntity.WorkFlowId
|
|
|
+ // 如果被驳回,不再新启工作流
|
|
|
+ if processInstanceId == "" {
|
|
|
+ processInstanceId = svcActiviti.StartProcess2(workflow.OIL_ENUSER_APPEND_APPLY, businessKey, this.User.Id, "1", supplierCertAppendEntity.AppendType, supplierEntity.SupplierName)
|
|
|
+ if len(processInstanceId) <= 0 {
|
|
|
+ panic("工作流启动失败!")
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 将启动和工作流,选择的初审和复审人员保存下来
|
|
|
+ cols := []string{
|
|
|
+ "Id",
|
|
|
+ "FirstAudit",
|
|
|
+ "SecondAudit",
|
|
|
+ "thirdAudit",
|
|
|
+ "WorkFlowId",
|
|
|
+ "BusinessKey",
|
|
|
+ "ProcessKey",
|
|
|
+ "CommitComId",
|
|
|
+ "AuditIndex",
|
|
|
+ }
|
|
|
+ supplierCertAppendEntity.ProcessKey = workflow.OIL_ENUSER_SUPPLIER_APPLY
|
|
|
+ supplierCertAppendEntity.BusinessKey = businessKey
|
|
|
+ supplierCertAppendEntity.WorkFlowId = processInstanceId
|
|
|
+ supplierCertAppendEntity.FirstAudit, _ = strconv.Atoi(firstAudit)
|
|
|
+ supplierCertAppendEntity.SecondAudit, _ = strconv.Atoi(secondAudit)
|
|
|
+ supplierCertAppendEntity.ThirdAudit, _ = strconv.Atoi(thirdAudit)
|
|
|
+ supplierCertAppendEntity.CommitComId = strconv.Itoa(unitId)
|
|
|
+ supplierCertAppendEntity.AuditIndex += 1
|
|
|
+ certSrv.UpdateEntityByIdCols(certAppendId, supplierCertAppendEntity, cols)
|
|
|
+
|
|
|
+ var ActiComplete workflow.ActiCompleteVM
|
|
|
+ ActiComplete.ProcessKey = workflow.OIL_ENUSER_SUPPLIER_APPLY
|
|
|
+ ActiComplete.BusinessKey = supplierCertAppendEntity.BusinessKey
|
|
|
+ ActiComplete.UserId = this.User.Id // 当前审批操作人员
|
|
|
+ //ActiComplete.UserNames = secondAudit // 当前审批操作人员
|
|
|
+ ActiComplete.Result = "2" //分办提交给二级单位初审
|
|
|
+ ActiComplete.Remarks = auditRemark
|
|
|
+ ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
|
|
|
+ receiveVal := svcActiviti.TaskComplete(ActiComplete)
|
|
|
+ if receiveVal != "true" {
|
|
|
+ panic("工作流异常,请联系管理员!" + receiveVal)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// @Title 审批
|
|
|
// @Description 审批
|
|
|
// @Param body body suppliercert.OilSupplierCert
|
|
|
@@ -702,8 +798,8 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
|
|
|
step = 2
|
|
|
if dataother.SuccessStatus == 1 {
|
|
|
supplierCertAppendEntity.FirstAudit, _ = strconv.Atoi(firstAudit)
|
|
|
- supplierCertAppendEntity.SecondAudit,_ = strconv.Atoi(secondAudit)
|
|
|
- supplierCertAppendEntity.ThirdAudit,_ = strconv.Atoi(thirdAudit)
|
|
|
+ supplierCertAppendEntity.SecondAudit, _ = strconv.Atoi(secondAudit)
|
|
|
+ supplierCertAppendEntity.ThirdAudit, _ = strconv.Atoi(thirdAudit)
|
|
|
cols := []string{
|
|
|
"Id",
|
|
|
"FirstAudit",
|
|
|
@@ -853,18 +949,18 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
|
|
|
|
|
|
wheresup := " SupplierCertAppendId=" + strconv.Itoa(supplierCertAppendEntity.Id) + " and Type='2'"
|
|
|
var sup []suppliercertsub.OilSupplierCertSub
|
|
|
- total := svc.GetPagingEntitiesWithOrder(1,10,"Id",true,&sup,wheresup)
|
|
|
+ total := svc.GetPagingEntitiesWithOrder(1, 10, "Id", true, &sup, wheresup)
|
|
|
|
|
|
dictSvc := items.GetItemsService(utils.DBE)
|
|
|
appendAmt := dictSvc.GetKeyValueItems("SupplierAppend")
|
|
|
- appendi,_ := strconv.Atoi(appendAmt[0].Value)
|
|
|
+ appendi, _ := strconv.Atoi(appendAmt[0].Value)
|
|
|
if supplierCertAppendEntity.AppendType == suppliercert.DOOGS_TYPECODE && total <= int64(appendi) { // 物资类 小于等于50条不交费
|
|
|
status = suppliercert.ALL_PASE_STATUS
|
|
|
} else {
|
|
|
paysvc := paymentinfo.GetPaymentService(utils.DBE)
|
|
|
var Amount float64
|
|
|
asvc := oilcostmanage.GetOilCostManageService(utils.DBE)
|
|
|
- Amount = asvc.GetAmount("APPEND",supplierCertAppendEntity.AppendType)
|
|
|
+ Amount = asvc.GetAmount("APPEND", supplierCertAppendEntity.AppendType)
|
|
|
var payinfo paymentinfo.OilPaymentInfo
|
|
|
payinfo.SrcId = supplierCertAppendEntity.Id
|
|
|
payinfo.SupplierId = supplierCertAppendEntity.SupplierId
|
|
|
@@ -874,24 +970,24 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
|
|
|
payinfo.PayType = "3"
|
|
|
payinfo.IsPay = "0"
|
|
|
payinfo.IsInvoice = "0"
|
|
|
- payinfo.Amount = strconv.FormatFloat(Amount,'E',-1,64)
|
|
|
+ payinfo.Amount = strconv.FormatFloat(Amount, 'E', -1, 64)
|
|
|
payinfo.CreateUserId = supplierCertAppendEntity.CreateUserId
|
|
|
payinfo.CreateBy = supplierCertAppendEntity.CreateBy
|
|
|
payinfo.CreateOn = time.Now()
|
|
|
paysvc.InsertEntity(&payinfo)
|
|
|
//发短信
|
|
|
toMobile := supplierEntity.Mobile
|
|
|
- bFlag:=""
|
|
|
- if supplierCertAppendEntity.AppendType == "01"{
|
|
|
- bFlag="物资类"
|
|
|
- }else if supplierCertAppendEntity.AppendType == "02"{
|
|
|
- bFlag="基建类"
|
|
|
- }else{
|
|
|
- bFlag="服务类"
|
|
|
+ bFlag := ""
|
|
|
+ if supplierCertAppendEntity.AppendType == "01" {
|
|
|
+ bFlag = "物资类"
|
|
|
+ } else if supplierCertAppendEntity.AppendType == "02" {
|
|
|
+ bFlag = "基建类"
|
|
|
+ } else {
|
|
|
+ bFlag = "服务类"
|
|
|
}
|
|
|
- msg:= "您的"+ bFlag + "增项审核通过,请及时确认信息并交费!"
|
|
|
+ msg := "您的" + bFlag + "增项审核通过,请及时确认信息并交费!"
|
|
|
msgService := msg2.GetMsgService(utils.DBE)
|
|
|
- msgService.HandleMsg(toMobile,msg,"4-1",supplierCertAppendEntity.CreateBy,supplierEntity.ContactName,strconv.Itoa(supplierCertAppendEntity.CreateUserId), this.User.Username)
|
|
|
+ msgService.HandleMsg(toMobile, msg, "4-1", supplierCertAppendEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertAppendEntity.CreateUserId), this.User.Username)
|
|
|
}
|
|
|
|
|
|
//var model suppliercertsub.OilSupplierCertSub
|
|
|
@@ -905,7 +1001,7 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
|
|
|
// "ModifiedUserId",
|
|
|
// "ModifiedBy",
|
|
|
//}
|
|
|
- //svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &model, colssup, wheresup)
|
|
|
+ //svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &model, colssup, wheresup)
|
|
|
|
|
|
//paysvc.AddPaymentinfo(supplierCertAppendEntity.SupplierId, supplierCertAppendEntity.Id, Amount, "3")
|
|
|
} else {
|
|
|
@@ -913,7 +1009,7 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
|
|
|
}
|
|
|
// 信息变更
|
|
|
var infoitems []suppliercertappendsub.OilAppendChangeItem
|
|
|
- where := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) +" and InfoId = " +utils.ToStr(supplierCertAppendEntity.Id)
|
|
|
+ where := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) + " and InfoId = " + utils.ToStr(supplierCertAppendEntity.Id)
|
|
|
svc.GetEntities(&infoitems, where)
|
|
|
this.updatesupplier(OilSupplierName, supplierCertAppendEntity.SupplierId, infoitems)
|
|
|
// 更新资质
|
|
|
@@ -949,7 +1045,7 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
|
|
|
appsvc.UpdateEntityBywheretbl(OilSupplierCertAppendName, &appendmodel, []string{"Status"}, appdwhere)
|
|
|
// 信息变更
|
|
|
var infoitems []suppliercertappendsub.OilAppendChangeItem
|
|
|
- where := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) +" and InfoId = " +utils.ToStr(supplierCertAppendEntity.Id)
|
|
|
+ where := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) + " and InfoId = " + utils.ToStr(supplierCertAppendEntity.Id)
|
|
|
svc.GetEntities(&infoitems, where)
|
|
|
this.updatesupplier(OilSupplierName, supplierCertAppendEntity.SupplierId, infoitems)
|
|
|
// 更新资质
|
|
|
@@ -994,7 +1090,7 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
|
|
|
supplierCertAppendEntity.Status = backstatus
|
|
|
supplierCertAppendEntity.Step = step
|
|
|
supplierCertAppendEntity.AuditIndex = supplierCertAppendEntity.AuditIndex + 1
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
supplierCertAppendEntity.Status = backstatus
|
|
|
supplierCertAppendEntity.Step = 1
|
|
|
supplierCertAppendEntity.AuditIndex = supplierCertAppendEntity.AuditIndex + 1
|
|
|
@@ -1004,27 +1100,27 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
|
|
|
"Step",
|
|
|
"AuditIndex",
|
|
|
}
|
|
|
- _,err := svc.UpdateEntityByIdCols(appendId, supplierCertAppendEntity, cols)
|
|
|
+ _, err := svc.UpdateEntityByIdCols(appendId, supplierCertAppendEntity, cols)
|
|
|
|
|
|
toMobile := supplierEntity.Mobile
|
|
|
- bFlag:=""
|
|
|
- if supplierCertAppendEntity.AppendType == "01"{
|
|
|
- bFlag="物资类"
|
|
|
- }else if supplierCertAppendEntity.AppendType == "02"{
|
|
|
- bFlag="基建类"
|
|
|
- }else{
|
|
|
- bFlag="服务类"
|
|
|
+ bFlag := ""
|
|
|
+ if supplierCertAppendEntity.AppendType == "01" {
|
|
|
+ bFlag = "物资类"
|
|
|
+ } else if supplierCertAppendEntity.AppendType == "02" {
|
|
|
+ bFlag = "基建类"
|
|
|
+ } else {
|
|
|
+ bFlag = "服务类"
|
|
|
}
|
|
|
- msg:= "您的"+ bFlag + "增项审核未通过,请及时查看!"
|
|
|
+ msg := "您的" + bFlag + "增项审核未通过,请及时查看!"
|
|
|
msgService := msg2.GetMsgService(utils.DBE)
|
|
|
- msgService.HandleMsg(toMobile,msg,"5-1",supplierCertAppendEntity.CreateBy,supplierEntity.ContactName,strconv.Itoa(supplierCertAppendEntity.CreateUserId), this.User.Username)
|
|
|
+ msgService.HandleMsg(toMobile, msg, "5-1", supplierCertAppendEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertAppendEntity.CreateUserId), this.User.Username)
|
|
|
|
|
|
if err == nil {
|
|
|
errinfo.Message = "提交成功!"
|
|
|
errinfo.Code = 0
|
|
|
this.Data["json"] = &errinfo
|
|
|
this.ServeJSON()
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
errinfo.Message = "提交失败!"
|
|
|
errinfo.Code = -1
|
|
|
this.Data["json"] = &errinfo
|
|
|
@@ -1041,7 +1137,6 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//更新供方信息表
|
|
|
func (this *OilSupplierCertAppendController) updatesupplier(supname string, suppid int, infoitems []suppliercertappendsub.OilAppendChangeItem) error {
|
|
|
svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
@@ -1053,7 +1148,7 @@ func (this *OilSupplierCertAppendController) updatesupplier(supname string, supp
|
|
|
where := " Id = " + utils.ToStr(suppid)
|
|
|
var sql string
|
|
|
if infoitems[i].SelectItem == "SetupTime" {
|
|
|
- sql = `UPDATE ` + supname + ` set ` + infoitems[i].SelectItem + ` = '` + infoitems[i].ChangeInfo[0: 10] + `' where ` + where
|
|
|
+ sql = `UPDATE ` + supname + ` set ` + infoitems[i].SelectItem + ` = '` + infoitems[i].ChangeInfo[0:10] + `' where ` + where
|
|
|
} else {
|
|
|
sql = `UPDATE ` + supname + ` set ` + infoitems[i].SelectItem + ` = '` + infoitems[i].ChangeInfo + `' where ` + where
|
|
|
}
|
|
|
@@ -1169,7 +1264,6 @@ func (this *OilSupplierCertAppendController) DeleteNewFile() {
|
|
|
where1 := "Id=" + Id
|
|
|
err = svc.DeleteEntityBytbl(OilSupplierFileName, where1)
|
|
|
|
|
|
-
|
|
|
if err == nil {
|
|
|
errinfo.Message = "删除成功"
|
|
|
errinfo.Code = 0
|
|
|
@@ -1181,4 +1275,4 @@ func (this *OilSupplierCertAppendController) DeleteNewFile() {
|
|
|
this.Data["json"] = &errinfo
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
-}
|
|
|
+}
|