func (c *JobController) DelJobFile() { postData := make(map[string]interface{}) postData["id"] = c.GetString("id") err := upload.NewQueryFile().SetCondition("id", c.GetString("id")).DelFile() c.SetJsonResponse("error", err.Error()) c.GetJsonResponse().ServeJson() }
func (c *JobClaimController) Get() { id := c.Ctx.Input.Param(":id") c.Data["error"] = "" c.TplNames = "produce/job_claim.tpl" c.getJobCards(id) c.Data["JobFiles"], _ = upload.NewQueryFile().SetCondition("rel_id", id).SetCondition("type", upload.FT_Claim).GetFiles() }
func (c *JobSubmitController) Get() { id := c.Ctx.Input.Param(":id") c.Data["error"] = "" c.Data["status"], _ = c.GetInt("status") c.TplNames = "produce/job_submit.tpl" c.getJobCards(id) c.Data["JobFiles"], _ = upload.NewQueryFile().SetCondition("rel_id", id).SetCondition("type", upload.FT_Submit).GetFiles() }
func (c *JobController) ViewJob() { id := c.Ctx.Input.Param(":id") c.Data["error"] = "" c.TplNames = "job/view.tpl" c.getJobCards(id) filter := make(map[string]interface{}) filter["id"] = id c.Data["JobFiles"], _ = upload.NewQueryFile().SetCondition("rel_id", id).GetJobAllFiles() }
//回复页面 func (c *ReplyController) Show() { c.TplNames = "complaint/reply_show.tpl" jobId := c.GetString("jobid") c.getJobCards(jobId) id := c.Ctx.Input.Param(":id") c.Data["error"] = "" c.Data["Id"] = id c.Data["JobFiles"], _ = upload.NewQueryFile().SetCondition("type", upload.FT_ComplainReplay).SetCondition("rel_id", id).GetFiles() }
//根据编号进行查询一个job func (c *ComplaintController) GetJob() { defer func() { c.GetJsonResponse().ServeJson() }() id := c.Input().Get("id") if id == "" { return } filter := make(map[string]interface{}) filter["code"] = id jobModel, err := complaint.GetOneJob(filter) c.SetJsonResponse("Job", jobModel) if err != nil { c.SetJsonResponse("error", err.Error()) return } jobFiles, err := upload.NewQueryFile().SetCondition("rel_id", id).GetJobAllFiles() c.SetJsonResponse("JobFiles", jobFiles) }
func (r *JobHistoryRender) SetData(data *models.JobHistory) { r.data = data r.files, _ = upload.NewQueryFile().SetCondition("type__lte", upload.FT_Modify).SetCondition("rel_id", r.data.Id).GetFiles() }
func (r *JobSubmitRender) SetData(data *models.JobSubmit) { r.data = data r.files, _ = upload.NewQueryFile().SetCondition("type", upload.FT_Submit).SetCondition("rel_id", r.data.Id).GetFiles() }
func (r *JobComplaintReplyRender) SetData(data *models.JobComplaintReply) { r.data = data r.files, _ = upload.NewQueryFile().SetCondition("type", upload.FT_ComplainReplay).SetCondition("rel_id", r.data.Id).GetFiles() }