Forráskód Böngészése

前后:注册审批页面;已缴费展示2021年后的;新增已入库数据

dubch 4 éve
szülő
commit
590880ab4b

+ 5 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplier.go

@@ -395,6 +395,11 @@ type ManualDelete struct {
 	Operation string
 }
 
+type TmpZcgf struct {
+	Sub      string
+	Code      string
+}
+
 type ExpireFileList struct {
 	Id               int
 	SupplierName     string

+ 5 - 0
src/dashoo.cn/backend/api/business/oilsupplier/technologyservice/oiltechnologyserviceService.go

@@ -369,4 +369,9 @@ func (s *OilTechnologyServiceService) GetEntityJoin(tableName string, tableName2
 	sql := "SELECT class.Id, class.Code, class.Name FROM " + tableName + " a LEFT JOIN " + tableName2 + " class ON a.ClassId = class.Id "
 	s.DBE.SQL(sql).Find(entityPtr)
 	return
+}
+
+func (s *OilTechnologyServiceService) GetEntityByOrderbyWhere(where string, entityPtr interface{}) {
+	sql := "SELECT 准入范围 as Sub,准入类别 as Code FROM tmp_T_在册供方查询 WHERE " + where + " order by 准入证号 desc"
+	s.DBE.SQL(sql).Get(entityPtr)
 }

+ 2 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/paymentinfo.go

@@ -81,6 +81,8 @@ func (this *PaymentInfoController) GetEntityList() {
 		where = where + " and (p.CreateUserId = '" + this.User.Id + "' or s.CommercialNo='" + registerUser.CommercialNo + "') "
 	}
 
+	where += " and p.CreateOn >= '2021-01-01'"
+
 	var paylist []paymentinfo.PaymentinfoList
 	svc := paymentinfo.GetPaymentService(utils.DBE)
 	total := svc.GetPaymentinfoList(page.CurrentPage, page.Size, orderby, asc, &paylist, where)

+ 85 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/technologyservice.go

@@ -2302,3 +2302,88 @@ func (this *OilTechnologyServiceController) ManualDelete() {
 	this.Data["json"] = &errinfo
 	this.ServeJSON()
 }
+
+// @Title 2021-01-28 新增准入企业
+// @Description 修改实体
+// @Success	200	{object} controllers.Request
+// @router /insertSupplierNew [get]
+func (this *OilTechnologyServiceController) InsertSupplierNew() {
+	SupplierName := this.GetString("SupplierName")
+	var zcgf supplier.TmpZcgf
+	svc := technologyservice.GetOilTechnologyServiceService(utils.DBE)
+	svc.GetEntityByOrderbyWhere("企业名称 = '" + SupplierName + "'", &zcgf)
+	var errinfo ErrorInfo
+	if zcgf.Sub != ""{
+		subs := strings.Split(zcgf.Sub, ";")
+		for _,sub := range subs {
+			if sub == "" {
+				continue
+			}
+			s := strings.Split(sub, " ")
+			var tecDifferent supplier.ManualDelete
+			svc.GetEntityByWhere("TecDifferent", "Name = '" + s[1] + "'", &tecDifferent)
+
+			var supp supplier.OilSupplier
+			svc.GetEntityByWhere (OilSupplierName, "SupplierName = '" + SupplierName + "'", &supp)
+
+			var cert suppliercert.OilSupplierCert
+			svc.GetEntityByWhere (OilSupplierCertName, "SupplierId = " + strconv.Itoa(supp.Id), &cert)
+
+			var sub1 suppliercertsub.OilSupplierCertSub
+
+			if zcgf.Code == "物资类" {
+				var class technologyserviceclass.OilTechnologyServiceClass
+				s1 := strings.TrimLeft (s[0], "BM")
+				svc.GetEntityByWhere(OilTechnologyServiceClassName, "Code = '" + s1 + "'", &class)
+			}
+			if zcgf.Code == "基建类" {
+				var class technologyserviceclass.OilTechnologyServiceClass
+				svc.GetEntityByWhere(OilTechnologyServiceClassName, "Name = '" + s[1] + "'", &class)
+			}
+			if zcgf.Code == "技术服务类" {
+				var class technologyserviceclass.OilTechnologyServiceClass
+				svc.GetEntityByWhere(OilTechnologyServiceClassName, "Name = '" + s[1] + "'", &class)
+				if tecDifferent.Code == "" {
+					sub1.Code = class.Code
+					sub1.Name = s[1]
+					sub1.SupplierId = supp.Id
+					sub1.SupplierCertId = cert.Id
+					sub1.SupplierTypeCode = "03"
+					sub1.SubClassId = class.Id
+					sub1.CertSubStatus = "1"
+					sub1.Type = "1"
+					sub1.CreateOn = time.Now()
+					sub1.CreateBy = "导入1"
+					svc.InsertEntityBytbl("OilSupplierCertSub", &sub1)
+				} else {
+					var sub1 suppliercertsub.OilSupplierCertSub
+					var class technologyserviceclass.OilTechnologyServiceClass
+					if tecDifferent.Operation == "删除" || tecDifferent.Operation == "" || tecDifferent.Operation == "维持不动" {
+
+					} else {
+						code := strings.Split(tecDifferent.Operation, ",")
+						for _, c := range code {
+							svc.GetEntityByWhere(OilTechnologyServiceClassName, "Code = '"+c+"'", &class)
+							sub1.Code = class.Code
+							sub1.Name = class.Name
+							sub1.SupplierId = supp.Id
+							sub1.SubClassId = class.Id
+							sub1.SupplierCertId = cert.Id
+							sub1.SupplierTypeCode = "03"
+							sub1.CertSubStatus = "1"
+							sub1.Type = "1"
+							sub1.CreateOn = time.Now()
+							sub1.CreateBy = "导入1"
+							svc.InsertEntityBytbl("OilSupplierCertSub", &sub1)
+						}
+					}
+				}
+			}
+		}
+	}
+
+	errinfo.Message = "更新成功!"
+	errinfo.Code = 0
+	this.Data["json"] = &errinfo
+	this.ServeJSON()
+}

+ 5 - 0
src/dashoo.cn/frontend_web/src/pages/index.vue

@@ -214,6 +214,11 @@
               <el-input v-model="formData.CommercialNo" readonly></el-input>
             </el-form-item>
           </el-col>
+          <el-col :span="24">
+            <el-form-item label="法定代表人姓名" label-width="150px" style="width: 100%" prop="LegalPerson">
+              <el-input v-model="formData.LegalPerson" readonly></el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="24">
             <el-form-item label="有效证件类型" label-width="150px" style="width: 100%;">
               <el-select  v-model="formData.CardNoType1" disabled placeholder="请选择有效证件类型" label-width="150px" style="width: 100%">