package com.mortals.xhx.module.doc.form.web;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.doc.form.model.DocFormEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonMappingController;
import com.mortals.xhx.module.doc.form.model.vo.DocFormVo;
import com.mortals.xhx.module.doc.form.service.DocFormService;
import java.util.Map;
import java.util.List;
/**
* DocFormController
*
* doc单 控制器
*
* @author zxfei
* @date 2021-10-16
*/
@RestController
@RequestMapping("doc/form")
public class DocFormController extends BaseCRUDJsonBodyMappingController<DocFormService, DocFormEntity,Long> {


    public DocFormController(){
        super.setFormClass(DocFormForm.class);
        super.setModuleDesc( "doc单");
    }

    @Override
    protected void init( Map<String, Object> model, Context context) {
        super.init(model, context);
    }


    public static void main(String[] args) {
        DocFormEntity docFormEntity = new DocFormEntity();
        docFormEntity.setFormContent("{\"i_1_标题\":\"测试标题\",\"date_1_会议时间\":\"2022 年 09 月 24 日\",\"i_1_会议地点\":\"人民北路\",\"dt_1_汇报\":[{\"汇报_i_1_汇报人\":\"张三\",\"汇报_date_1_汇报时间\":\"\",\"汇报_t_1_汇报内容\":\"今天出去吃饭了\",\"index\":0},{\"汇报_i_1_汇报人\":\"李四\",\"汇报_date_1_汇报时间\":\"\",\"汇报_t_1_汇报内容\":\"今天去拜访客户了\",\"index\":1}],\"i_1_记录人\":\"王五\",\"ck_1_政治面貌_<党员-非党员-党员先锋岗>\":[\"党员\"],\"r_1_证件类型_<身份证-军官证-残疾证>\":\"身份证\",\"s_1_设备类型_<呼叫器-窗口屏-评价器>\":\"窗口屏\",\"@image_1_照片\":\"/file/uploadfile/1663833519018.jpg\"}");
        docFormEntity.setTemplateId(1L);

        System.out.println(JSON.toJSONString(docFormEntity));

    }

}