作者 Your Name

更新

... ... @@ -11,8 +11,8 @@ type SaveEmployeeProductRecordCmd struct {
WorkerId int `cname:"工人ID" json:"workerId" valid:"Required"`
//产量重量
Weigh float64 `cname:"重量" json:"weigh" valid:"Required" `
//产品编码
ProductPlanId int `json:"productCode"`
//计划id
ProductPlanId int `json:"productPlanId"`
// 参与类型 1:正常 2:支援
ParticipateType int `json:"participateType"`
//日期
... ...
... ... @@ -27,7 +27,7 @@ type ProductCapacitiesInfo struct {
WorkerId int `json:"workerId" ` //员工
WorkerName string `json:"workerName"` //
Weigh float64 `json:"weigh"` //产量重量
ProductCode string `json:"productCode"` //产品编码
BatchNumber string `json:"batchNumber"` //批次号
ProductName string `json:"productName"` //产品名称
ParticipateType int `json:"participateType"` //参与类型 1:正常 2:支援
RecordDate string `json:"recordDate"` //日期
... ...
... ... @@ -18,7 +18,7 @@ func init() {
web.BConfig.AppName = "project"
web.BConfig.CopyRequestBody = true
web.BConfig.RunMode = "dev"
web.BConfig.Listen.HTTPPort = 8080
web.BConfig.Listen.HTTPPort = 8083
web.BConfig.Listen.EnableAdmin = false
web.BConfig.WebConfig.CommentRouterPath = "/pkg/port/beego/routers"
if os.Getenv("RUN_MODE") != "" {
... ... @@ -31,7 +31,7 @@ func init() {
}
}
//https支持
web.BConfig.Listen.EnableHTTPS = true
web.BConfig.Listen.EnableHTTPS = false
web.BConfig.Listen.HTTPSPort = 443
//进程内监控
... ...
... ... @@ -6,6 +6,7 @@ import (
"path/filepath"
"github.com/beego/beego/v2/server/web/context"
"github.com/linmadan/egglib-go/core/application"
"github.com/linmadan/egglib-go/utils/excel"
"github.com/linmadan/egglib-go/web/beego"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/application/ecelData/command"
... ... @@ -41,7 +42,8 @@ func (controller *ExcelDataController) FileImport() {
excelService := service.NewExcelDataService(nil)
r, ext, err = controller.GetFileWithExt()
if err != nil {
controller.Response(nil, err)
e := application.ThrowError(application.BUSINESS_ERROR, err.Error())
controller.Response(nil, e)
return
}
cmd := &command.ImportDataCommand{}
... ... @@ -63,7 +65,7 @@ func (controller *ExcelDataController) FileImport() {
case "ImportAttendance":
data, err = excelService.ImportDataAttendance(cmd)
default:
err = fmt.Errorf("导入不存在 Code:%v", cmd.Code)
err = application.ThrowError(application.BUSINESS_ERROR, fmt.Sprintf("导入不存在 Code:%v", cmd.Code))
}
controller.Response(data, err)
}
... ...