|
|
@ -28,8 +28,11 @@ func RegisterRouteMappingOfCustomizedQuery(party router.Party) { |
|
|
|
|
|
|
|
var service = svr.NewCustomizedQueryService() |
|
|
|
RegisterRouteOfProductFamilyInventoryQueryInCustomizedQuery(party, service) |
|
|
|
RegisterRouteOfProductFamilyInventoryExportExcelInCustomizedQuery(party, service) |
|
|
|
RegisterRouteMappingOfSeatQueryInCustomizedQuery(party, service) |
|
|
|
RegisterRouteMappingOfSeatExportExcelInCustomizedQuery(party, service) |
|
|
|
RegisterRouteMappingOfPackingRecordQueryInCustomizedQuery(party, service) |
|
|
|
RegisterRouteMappingOfPackingRecordExportExcelInCustomizedQuery(party, service) |
|
|
|
} |
|
|
|
|
|
|
|
/****************************************************************************** |
|
|
@ -76,6 +79,50 @@ func RegisterRouteOfProductFamilyInventoryQueryInCustomizedQuery(party router.Pa |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/****************************************************************************** |
|
|
|
* |
|
|
|
* @Function Name : RegisterRouteOfProductFamilyInventoryExportExcelInCustomizedQuery |
|
|
|
*----------------------------------------------------------------------------- |
|
|
|
* |
|
|
|
* @Description : 注册自定义查询中导出派生库存查询结果的路由 |
|
|
|
* |
|
|
|
* @Function Parameters : 路由分组 |
|
|
|
* |
|
|
|
* @Author : chenglei.wei@le-it.com.cn |
|
|
|
* |
|
|
|
* @Date : 2022-03-09 16:52 |
|
|
|
* |
|
|
|
******************************************************************************/ |
|
|
|
func RegisterRouteOfProductFamilyInventoryExportExcelInCustomizedQuery(party router.Party, service svr.CustomizedQueryService) { |
|
|
|
|
|
|
|
party.Get("/productfamilyinventoryquery_exportexcel", func(ctx iris.Context) { |
|
|
|
user, ok := jwts.ParseToken(ctx) |
|
|
|
if !ok { |
|
|
|
return |
|
|
|
} |
|
|
|
urlParameters := ctx.URLParams() |
|
|
|
var productFamilyId string |
|
|
|
if productFamilyId, ok = urlParameters["productfamilyid"]; !ok { |
|
|
|
productFamilyId = "" |
|
|
|
} |
|
|
|
var projectId string |
|
|
|
if projectId, ok = urlParameters["projectid"]; !ok { |
|
|
|
projectId = "" |
|
|
|
} |
|
|
|
var serialOrderId string |
|
|
|
if serialOrderId, ok = urlParameters["serialorderid"]; !ok { |
|
|
|
serialOrderId = "" |
|
|
|
} |
|
|
|
result, err := service.ProductFamilyInventoryExportExcel(user, productFamilyId, projectId, serialOrderId) |
|
|
|
if err != nil { |
|
|
|
supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) |
|
|
|
return |
|
|
|
} |
|
|
|
supports.Ok(ctx, supports.OptionSuccess, result) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/****************************************************************************** |
|
|
|
* |
|
|
|
* @Function Name : RegisterRouteMappingOfSeatQueryInCustomizedQuery |
|
|
@ -115,6 +162,45 @@ func RegisterRouteMappingOfSeatQueryInCustomizedQuery(party router.Party, servic |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
/****************************************************************************** |
|
|
|
* |
|
|
|
* @Function Name : RegisterRouteMappingOfSeatExportExcelInCustomizedQuery |
|
|
|
*----------------------------------------------------------------------------- |
|
|
|
* |
|
|
|
* @Description : 注册自定义导出座椅查询结果的路由 |
|
|
|
* |
|
|
|
* @Function Parameters : 路由分组 |
|
|
|
* |
|
|
|
* @Author : chenglei.wei@le-it.com.cn |
|
|
|
* |
|
|
|
* @Date : 2022-03-09 16:52 |
|
|
|
* |
|
|
|
******************************************************************************/ |
|
|
|
func RegisterRouteMappingOfSeatExportExcelInCustomizedQuery(party router.Party, service svr.CustomizedQueryService) { |
|
|
|
|
|
|
|
party.Get("/seatquery_exportexcel", func(ctx iris.Context) { |
|
|
|
user, ok := jwts.ParseToken(ctx) |
|
|
|
if !ok { |
|
|
|
return |
|
|
|
} |
|
|
|
urlParameters := ctx.URLParams() |
|
|
|
var status string |
|
|
|
if status, ok = urlParameters["serialorderid"]; !ok { |
|
|
|
status = "" |
|
|
|
} |
|
|
|
var serialOrderId string |
|
|
|
if serialOrderId, ok = urlParameters["serialorderid"]; !ok { |
|
|
|
serialOrderId = "" |
|
|
|
} |
|
|
|
result, err := service.SeatExportExcel(user, serialOrderId, status) |
|
|
|
if err != nil { |
|
|
|
supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) |
|
|
|
return |
|
|
|
} |
|
|
|
supports.Ok(ctx, supports.OptionSuccess, result) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
/****************************************************************************** |
|
|
|
* |
|
|
|
* @Function Name : RegisterRouteMappingOfPackingRecordQueryInCustomizedQuery |
|
|
@ -149,3 +235,38 @@ func RegisterRouteMappingOfPackingRecordQueryInCustomizedQuery(party router.Part |
|
|
|
supports.Ok(ctx, supports.OptionSuccess, result) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
/****************************************************************************** |
|
|
|
* |
|
|
|
* @Function Name : RegisterRouteMappingOfPackingRecordExportExcelInCustomizedQuery |
|
|
|
*----------------------------------------------------------------------------- |
|
|
|
* |
|
|
|
* @Description : 注册自定义查询中导出打包记录查询结果的路由 |
|
|
|
* |
|
|
|
* @Function Parameters : 路由分组 |
|
|
|
* |
|
|
|
* @Author : chenglei.wei@le-it.com.cn |
|
|
|
* |
|
|
|
* @Date : 2022-03-10 17:38 |
|
|
|
* |
|
|
|
******************************************************************************/ |
|
|
|
func RegisterRouteMappingOfPackingRecordExportExcelInCustomizedQuery(party router.Party, service svr.CustomizedQueryService) { |
|
|
|
|
|
|
|
party.Get("/packingrecordquery_exportexcel", func(ctx iris.Context) { |
|
|
|
user, ok := jwts.ParseToken(ctx) |
|
|
|
if !ok { |
|
|
|
return |
|
|
|
} |
|
|
|
urlParameters := ctx.URLParams() |
|
|
|
var serialOrderId string |
|
|
|
if serialOrderId, ok = urlParameters["serialorderid"]; !ok { |
|
|
|
serialOrderId = "" |
|
|
|
} |
|
|
|
result, err := service.PackingRecordExportExcel(user, serialOrderId) |
|
|
|
if err != nil { |
|
|
|
supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) |
|
|
|
return |
|
|
|
} |
|
|
|
supports.Ok(ctx, supports.OptionSuccess, result) |
|
|
|
}) |
|
|
|
} |