|
|
|
@ -51,6 +51,14 @@ public class KhKhrwResultController extends BaseController {
|
|
|
|
@PreAuthorize("@ss.hasPermi('kaohe:kh_result:generate')")
|
|
|
|
@PreAuthorize("@ss.hasPermi('kaohe:kh_result:generate')")
|
|
|
|
@PostMapping("/generateResult")
|
|
|
|
@PostMapping("/generateResult")
|
|
|
|
public AjaxResult generateResult(KhPingce pc) { //传递参数 id、pcTitle、bkhdxtype
|
|
|
|
public AjaxResult generateResult(KhPingce pc) { //传递参数 id、pcTitle、bkhdxtype
|
|
|
|
|
|
|
|
//查询是否已经生成结果
|
|
|
|
|
|
|
|
KhKhrwResult resultQuery = new KhKhrwResult();
|
|
|
|
|
|
|
|
resultQuery.setPcId(pc.getId());
|
|
|
|
|
|
|
|
List<KhKhrwResult> khKhrwResults = khKhrwResultService.selectKhKhrwResultList(resultQuery);
|
|
|
|
|
|
|
|
if(khKhrwResults!=null&&khKhrwResults.size()>0){
|
|
|
|
|
|
|
|
return AjaxResult.error("该考核任务已有生成结果!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
JSONArray header = new JSONArray();//存放表头及表格关联数据
|
|
|
|
JSONArray header = new JSONArray();//存放表头及表格关联数据
|
|
|
|
JSONObject headerData = new JSONObject();
|
|
|
|
JSONObject headerData = new JSONObject();
|
|
|
|
headerData.put("name", null);
|
|
|
|
headerData.put("name", null);
|
|
|
|
@ -207,7 +215,7 @@ public class KhKhrwResultController extends BaseController {
|
|
|
|
pcResult.setTableHeader(header.toJSONString());
|
|
|
|
pcResult.setTableHeader(header.toJSONString());
|
|
|
|
pcResult.setTableData(endData.toJSONString());
|
|
|
|
pcResult.setTableData(endData.toJSONString());
|
|
|
|
khKhrwResultService.insertKhKhrwResult(pcResult);
|
|
|
|
khKhrwResultService.insertKhKhrwResult(pcResult);
|
|
|
|
return AjaxResult.success(header);
|
|
|
|
return AjaxResult.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|