增加气站合同附件受控上传与预览
This commit is contained in:
@@ -73,6 +73,33 @@ func GetGasorderContract(ctx *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// UploadGasorderContractAttachment 为当前气站账号提供受控 PDF 临时上传。
|
||||
func UploadGasorderContractAttachment(ctx *gin.Context) {
|
||||
if _, ok := currentGas(ctx); !ok {
|
||||
return
|
||||
}
|
||||
platformgasorder.UploadGasorderContractAttachment(ctx)
|
||||
}
|
||||
|
||||
// CleanupGasorderContractAttachment 清理当前气站账号尚未绑定的临时附件。
|
||||
func CleanupGasorderContractAttachment(ctx *gin.Context) {
|
||||
if _, ok := currentGas(ctx); !ok {
|
||||
return
|
||||
}
|
||||
platformgasorder.CleanupGasorderContractAttachment(ctx)
|
||||
}
|
||||
|
||||
// ServeGasorderContractAttachment 仅预览当前气站合同范围内的正式附件。
|
||||
func ServeGasorderContractAttachment(ctx *gin.Context) {
|
||||
station, ok := currentGas(ctx)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
if _, ok := scopedContract(ctx, ctx.Param("identity"), station.ID); ok {
|
||||
platformgasorder.ServeGasorderContractAttachment(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
func CreateGasorderContract(ctx *gin.Context) {
|
||||
station, ok := currentGas(ctx)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user