|
|
@@ -1503,6 +1503,32 @@ func (this *OilGoodsAptitudeController) TruncateImport() {
|
|
|
|
|
|
}
|
|
|
|
|
|
+// @Title get 清空导入的信息
|
|
|
+// @Description get SampleType by token
|
|
|
+// @Success 200 {object} sampletype.SampleType
|
|
|
+// @router /create-contrast [get]
|
|
|
+func (this *OilGoodsAptitudeController) CreateContrast() {
|
|
|
+ svc := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
|
|
|
+ svc.TruncateTable("OilSupplierContrast")
|
|
|
+ // 插入对比列表
|
|
|
+ var list1 []supplier.OilSupplier
|
|
|
+ svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, 0, 0, "Id", false, &list1, " 1=1")
|
|
|
+ for _, item := range list1 {
|
|
|
+ var list []supplier.OilSupplierContrast
|
|
|
+ where := " b.SupplierTypeCode='01' and a.Id = " + strconv.Itoa(item.Id)
|
|
|
+ svc.GetPagingTmpCheckedEntities(&list, where)
|
|
|
+ if list != nil {
|
|
|
+ svc.InsertEntityBytbl("OilSupplierContrast", list[0])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var errorinfo ErrorInfo
|
|
|
+ errorinfo.Code = 0
|
|
|
+ errorinfo.Message = "成功!"
|
|
|
+ this.Data["json"] = &errorinfo
|
|
|
+ this.ServeJSON()
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
// @Title 将导入的数据 导入到正式表
|
|
|
// @Description 确认更新
|
|
|
// @Success 200 {object} sampletype.SampleType
|