Beispiel #1
0
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()
}
Beispiel #2
0
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()
}
Beispiel #3
0
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()
}
Beispiel #4
0
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()
}
Beispiel #5
0
//回复页面
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()
}
Beispiel #6
0
//根据编号进行查询一个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)
}
Beispiel #7
0
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()
}
Beispiel #8
0
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()
}