Browse Source

电签列表

hongchuangyanfa 2 years ago
parent
commit
812419c4e1

+ 7 - 66
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TableFileController.java

@@ -26,6 +26,7 @@ import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.manager.entity.TableFile;
 import org.springblade.manager.entity.TableFile;
 import org.springblade.manager.entity.WbsTreeContract;
 import org.springblade.manager.entity.WbsTreeContract;
+import org.springblade.manager.service.IExcelTabService;
 import org.springblade.manager.service.IWbsTreeContractService;
 import org.springblade.manager.service.IWbsTreeContractService;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -50,78 +51,16 @@ public class TableFileController extends BladeController {
 	private final ITableFileService tableFileService;
 	private final ITableFileService tableFileService;
 
 
 	private final IWbsTreeContractService wbsTreeContractService;
 	private final IWbsTreeContractService wbsTreeContractService;
-/*
-	*//**
-	 * 详情
-	 *//*
-	@GetMapping("/detail")
-	@ApiOperationSupport(order = 1)
-	@ApiOperation(value = "详情", notes = "传入tableFile")
-	public R<TableFile> detail(TableFile tableFile) {
-		TableFile detail = tableFileService.getOne(Condition.getQueryWrapper(tableFile));
-		return R.data(detail);
-	}
-
-	*//**
-	 * 分页 表单附件信息
-	 *//*
-	@GetMapping("/list")
-	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "分页", notes = "传入tableFile")
-	public R<IPage<TableFile>> list(TableFile tableFile, Query query) {
-		IPage<TableFile> pages = tableFileService.page(Condition.getPage(query), Condition.getQueryWrapper(tableFile));
-		return R.data(pages);
-	}
-
-	*//**
-	 * 自定义分页 表单附件信息
-	 *//*
-	@GetMapping("/page")
-	@ApiOperationSupport(order = 3)
-	@ApiOperation(value = "分页", notes = "传入tableFile")
-	public R<IPage<TableFileVO>> page(TableFileVO tableFile, Query query) {
-		IPage<TableFileVO> pages = tableFileService.selectTableFilePage(Condition.getPage(query), tableFile);
-		return R.data(pages);
-	}
 
 
-	*//**
-	 * 新增 表单附件信息
-	 *//*
-	@PostMapping("/save")
-	@ApiOperationSupport(order = 4)
-	@ApiOperation(value = "新增", notes = "传入tableFile")
-	public R save(@Valid @RequestBody TableFile tableFile) {
-		return R.status(tableFileService.save(tableFile));
-	}
-
-	*//**
-	 * 修改 表单附件信息
-	 *//*
-	@PostMapping("/update")
-	@ApiOperationSupport(order = 5)
-	@ApiOperation(value = "修改", notes = "传入tableFile")
-	public R update(@Valid @RequestBody TableFile tableFile) {
-		return R.status(tableFileService.updateById(tableFile));
-	}
-
-	*//**
-	 * 新增或修改 表单附件信息
-	 *//*
-	@PostMapping("/submit")
-	@ApiOperationSupport(order = 6)
-	@ApiOperation(value = "新增或修改", notes = "传入tableFile")
-	public R submit(@Valid @RequestBody TableFile tableFile) {
-		return R.status(tableFileService.saveOrUpdate(tableFile));
-	}
-
-	*/
+	// excel 基本信息表
+	private final IExcelTabService excelTabService;
 	/**
 	/**
 	 * 删除 表单附件信息
 	 * 删除 表单附件信息
 	 */
 	 */
 	@PostMapping("/remove")
 	@PostMapping("/remove")
 	@ApiOperationSupport(order = 1)
 	@ApiOperationSupport(order = 1)
 	@ApiOperation(value = "逻辑删除", notes = "传入ids")
 	@ApiOperation(value = "逻辑删除", notes = "传入ids")
-	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) throws Exception {
 		// 查出基本信息
 		// 查出基本信息
 		TableFile tableFile = tableFileService.getById(ids);
 		TableFile tableFile = tableFileService.getById(ids);
 
 
@@ -129,13 +68,15 @@ public class TableFileController extends BladeController {
 		tableFileService.removeByIds(Func.toLongList(ids));
 		tableFileService.removeByIds(Func.toLongList(ids));
 
 
 		List<TableFileVO> fileVOList = tableFileService.selectTableFileList(Long.parseLong(tableFile.getTabId()));
 		List<TableFileVO> fileVOList = tableFileService.selectTableFileList(Long.parseLong(tableFile.getTabId()));
-
+		// 该文本无附件
 		if(fileVOList==null || fileVOList.size()<=0){
 		if(fileVOList==null || fileVOList.size()<=0){
 			UpdateWrapper<WbsTreeContract> updateWrapper = new UpdateWrapper<>();
 			UpdateWrapper<WbsTreeContract> updateWrapper = new UpdateWrapper<>();
 			updateWrapper.in("p_key_id",tableFile.getTabId());
 			updateWrapper.in("p_key_id",tableFile.getTabId());
 			updateWrapper.set("tab_file_type",1);
 			updateWrapper.set("tab_file_type",1);
 			wbsTreeContractService.update(updateWrapper);
 			wbsTreeContractService.update(updateWrapper);
 		}
 		}
+		excelTabService.getBussPdfInfo(Long.parseLong(tableFile.getTabId()+""));
+		//excelTabService
 		return R.status(true);
 		return R.status(true);
 	}
 	}
 
 

+ 310 - 304
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TextdictInfoController.java

@@ -24,6 +24,7 @@ import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import io.swagger.annotations.ApiParam;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
 import lombok.AllArgsConstructor;
+
 import javax.validation.Valid;
 import javax.validation.Valid;
 
 
 import org.jsoup.Jsoup;
 import org.jsoup.Jsoup;
@@ -71,317 +72,322 @@ import java.util.Map;
 @Api(value = "参数信息表", tags = "参数信息表接口")
 @Api(value = "参数信息表", tags = "参数信息表接口")
 public class TextdictInfoController extends BladeController {
 public class TextdictInfoController extends BladeController {
 
 
-	private final ITextdictInfoService textdictInfoService;
-	private final WbsTreePrivateMapper wbsTreePrivateMapper;
-
-	private final JdbcTemplate jdbcTemplate;
-
-	/**
-	 * 详情
-	 */
-	@GetMapping("/detail")
-	@ApiOperationSupport(order = 1)
-	@ApiOperation(value = "详情", notes = "传入textdictInfo")
-	public R<TextdictInfo> detail(TextdictInfo textdictInfo) {
-		TextdictInfo detail = textdictInfoService.getOne(Condition.getQueryWrapper(textdictInfo));
-		return R.data(detail);
-	}
-
-	/**
-	 * 分页 参数信息表
-	 */
-	@GetMapping("/list")
-	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "分页", notes = "传入textdictInfo")
-	public R<IPage<TextdictInfo>> list(TextdictInfo textdictInfo, Query query) {
-		IPage<TextdictInfo> pages = textdictInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(textdictInfo));
-		return R.data(pages);
-	}
-
-	/**
-	 * 自定义分页 参数信息表
-	 */
-	@GetMapping("/page")
-	@ApiOperationSupport(order = 3)
-	@ApiOperation(value = "分页", notes = "传入textdictInfo")
-	public R<IPage<TextdictInfoVO>> page(TextdictInfoVO textdictInfo, Query query) {
-		IPage<TextdictInfoVO> pages = textdictInfoService.selectTextdictInfoPage(Condition.getPage(query), textdictInfo);
-		return R.data(pages);
-	}
-
-	/**
-	 * 新增 参数信息表
-	 */
-	@PostMapping("/save")
-	@ApiOperationSupport(order = 4)
-	@ApiOperation(value = "新增", notes = "传入textdictInfo")
-	public R save(@Valid @RequestBody TextdictInfo textdictInfo) {
-		return R.status(textdictInfoService.save(textdictInfo));
-	}
-
-	/**
-	 * 修改 参数信息表
-	 */
-	@PostMapping("/update")
-	@ApiOperationSupport(order = 5)
-	@ApiOperation(value = "修改", notes = "传入textdictInfo")
-	public R update(@Valid @RequestBody TextdictInfo textdictInfo) {
-		return R.status(textdictInfoService.updateById(textdictInfo));
+    private final ITextdictInfoService textdictInfoService;
+    private final WbsTreePrivateMapper wbsTreePrivateMapper;
+
+    private final JdbcTemplate jdbcTemplate;
+
+    /**
+     * 详情
+     */
+    @GetMapping("/detail")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入textdictInfo")
+    public R<TextdictInfo> detail(TextdictInfo textdictInfo) {
+        TextdictInfo detail = textdictInfoService.getOne(Condition.getQueryWrapper(textdictInfo));
+        return R.data(detail);
+    }
+
+    /**
+     * 分页 参数信息表
+     */
+    @GetMapping("/list")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "分页", notes = "传入textdictInfo")
+    public R<IPage<TextdictInfo>> list(TextdictInfo textdictInfo, Query query) {
+        IPage<TextdictInfo> pages = textdictInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(textdictInfo));
+        return R.data(pages);
+    }
+
+    /**
+     * 自定义分页 参数信息表
+     */
+    @GetMapping("/page")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入textdictInfo")
+    public R<IPage<TextdictInfoVO>> page(TextdictInfoVO textdictInfo, Query query) {
+        IPage<TextdictInfoVO> pages = textdictInfoService.selectTextdictInfoPage(Condition.getPage(query), textdictInfo);
+        return R.data(pages);
+    }
+
+    /**
+     * 新增 参数信息表
+     */
+    @PostMapping("/save")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "新增", notes = "传入textdictInfo")
+    public R save(@Valid @RequestBody TextdictInfo textdictInfo) {
+        return R.status(textdictInfoService.save(textdictInfo));
+    }
+
+    /**
+     * 修改 参数信息表
+     */
+    @PostMapping("/update")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "修改", notes = "传入textdictInfo")
+    public R update(@Valid @RequestBody TextdictInfo textdictInfo) {
+        return R.status(textdictInfoService.updateById(textdictInfo));
+    }
+
+    /**
+     * 新增或修改 参数信息表
+     */
+    @PostMapping("/submit")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "新增或修改", notes = "传入textdictInfo")
+    public R submit(@Valid @RequestBody TextdictInfo textdictInfo) {
+        return R.status(textdictInfoService.saveOrUpdate(textdictInfo));
+    }
+
+
+    /**
+     * 删除 参数信息表
+     */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String id) {
+        textdictInfoService.deleDataInfoById(id);
+		return R.success("成功");
 	}
 	}
 
 
-	/**
-	 * 新增或修改 参数信息表
-	 */
-	@PostMapping("/submit")
-	@ApiOperationSupport(order = 6)
-	@ApiOperation(value = "新增或修改", notes = "传入textdictInfo")
-	public R submit(@Valid @RequestBody TextdictInfo textdictInfo) {
-		return R.status(textdictInfoService.saveOrUpdate(textdictInfo));
-	}
 
 
-	
-	/**
-	 * 删除 参数信息表
-	 */
-//	@PostMapping("/remove")
-//	@ApiOperationSupport(order = 7)
-//	@ApiOperation(value = "逻辑删除", notes = "传入ids")
-//	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-//		return R.status(textdictInfoService.deleteLogic(Func.toLongList(ids)));
-//	}
-
-
-	/**
-	 * 保存字段信息
-	 */
-	@PostMapping("/saveTextInfo")
-	@ApiOperationSupport(order = 6)
-	@ApiOperation(value = "新增或修改", notes = "传入textdictInfo")
-	public R saveTextInfo(@Valid @RequestBody TextdictDataInfoVO textdictInfo) throws FileNotFoundException, InterruptedException {
-
-		// 获取 节点信息
-		WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.getByPKeyId(textdictInfo.getTableId());
-
-		// 读取html页面信息
-		File file1 = ResourceUtil.getFile(wbsTreePrivate.getHtmlUrl());
-		String htmlString =  IoUtil.readToString(new FileInputStream(file1));
-		// 样式集合
-		Document doc = Jsoup.parse(htmlString);
-
-		//解析
-		Element table = doc.select("table").first();
-		Elements trs = table.select("tr");
-		Element element = trs.get(textdictInfo.getTrIndex()).select("td").get(textdictInfo.getTdIndex());
-
-		String trindex = element.children().get(0).attr("trindex");
-		String tdindex = element.children().get(0).attr("tdindex");
-		String x1 = element.children().get(0).attr("x1");
-		String x2 = element.children().get(0).attr("x2");
-		String y1 = element.children().get(0).attr("y1");
-		String y2 = element.children().get(0).attr("y2");
-		String placeholder = element.children().get(0).attr("placeholder").replaceAll("[^(\u4E00-\u9FA5_)]", "");
-		String keyname = element.children().get(0).attr("keyname");
-		String weighing = element.children().get(0).attr("weighing");
-
-		String parm = trindex+","+tdindex+","+x1+","+x2+","+y1+","+y2+",$event";
-		String oncklickText ="'"+ placeholder +"',"+trindex+","+tdindex;
-
-		String vmode = "formData."+keyname;
-		if(textdictInfo.getTextId().equals("input")){ // 单选框
-			element.empty().append("<el-input type='text' v-model="+vmode+" placeholder="+placeholder+" keyname="+keyname+" weighing="+weighing+"  @contextmenu.prevent.native='RightClick("+parm+")' trIndex="+trindex+" tdIndex="+tdindex+"  x1="+x1+" x2="+x2+" y1="+y1+" y2="+y2+" style='width:100%;height:100%' > </el-input>");
-			element.children().get(0).attr("@focus","getInformation("+oncklickText+")");
-		}else if(textdictInfo.getTextId().equals("textarea")){ // 文本域
-			int rowspan = element.attr("ROWSPAN").equals("") ? 0 : Integer.parseInt(element.attr("ROWSPAN"));
-			//@focus='getInformation("+oncklickText+")'
-			element.empty().append("<el-input :rows="+rowspan*2+"  type='textarea' placeholder="+placeholder+" v-model="+vmode+"    keyname="+keyname+" weighing="+weighing+"  @contextmenu.prevent.native='RightClick("+parm+")' trIndex="+trindex+" tdIndex="+tdindex+"  x1="+x1+" x2="+x2+" y1="+y1+" y2="+y2+" style='width:100%;height:100%'  > </el-input>");
-			element.children().get(0).attr("@focus","getInformation("+oncklickText+")");
-		}else if(textdictInfo.getTextId().equals("select")){ // 下拉框
-			String selectText = " <el-select v-model="+vmode+" keyname="+keyname+" weighing="+weighing+" placeholder="+placeholder+" trIndex="+trindex+" tdIndex="+tdindex+"  x1="+x1+" x2="+x2+" y1="+y1+" y2="+y2+">"; //v-model="+keyname+"
-			List<TextdictInfo_vo> optionList = textdictInfo.getTextInfo();
-			if(optionList!=null && optionList.size()>=1){
-				for (int i= 0 ; i<optionList.size();i++)
-				selectText +="<el-option  :key='"+i+"' :label='"+optionList.get(i).getDictValue()+"'   :value='"+i+"' > </el-option>";
-			}
-			selectText += "</el-select>";
-			element.empty().append(selectText);
-			element.children().get(0).attr("@focus","getInformation("+oncklickText+")");
-		}else if(textdictInfo.getTextId().equals("radio")){ // 单选按钮
-
-			String radioText = "<template v-model="+vmode+" keyname="+keyname+" weighing="+weighing+" placeholder="+placeholder+" trIndex="+trindex+" tdIndex="+tdindex+"  x1="+x1+" x2="+x2+" y1="+y1+" y2="+y2+">";
-			List<TextdictInfo_vo> optionList = textdictInfo.getTextInfo();
-			if(optionList!=null && optionList.size()>=1){
-				for (int i= 0 ; i<optionList.size();i++)
-					radioText +=" <el-radio v-model="+vmode+"  label="+i+">"+optionList.get(i).getDictValue()+"</el-radio>";
-			}
-			radioText += "</template>";
-			element.empty().append(radioText);
-			element.children().get(0).attr("v-on:click","getInformation("+oncklickText+")");
-			element.attr("tabindex","-1");
-		}else if(textdictInfo.getTextId().equals("checkbox")){ // 多选框
-
-			String checkbox = "<template v-model="+vmode+" keyname="+keyname+" weighing="+weighing+" placeholder="+placeholder+" trIndex="+trindex+" tdIndex="+tdindex+"  x1="+x1+" x2="+x2+" y1="+y1+" y2="+y2+">";
-			List<TextdictInfo_vo> optionList = textdictInfo.getTextInfo();
-			if(optionList!=null && optionList.size()>=1){
-				for (int i= 0 ; i<optionList.size();i++)
-					checkbox +="<el-checkbox>"+optionList.get(i).getDictValue()+"</el-checkbox>";
-			}
-			checkbox += "</template>";
-			element.empty().append(checkbox);
-			element.children().get(0).attr("@focus","getInformation("+oncklickText+")");
-			element.attr("tabindex","-1");
-		}else if(textdictInfo.getTextId().equals("date")){ // 日期
-
-			element.empty().append("<el-date-picker v-model="+vmode+" type='date' format='YYYY年MM月DD日' placeholder="+placeholder+" keyname="+keyname+" weighing="+weighing+"  @contextmenu.prevent.native='RightClick("+parm+")' trIndex="+trindex+" tdIndex="+tdindex+"  x1="+x1+" x2="+x2+" y1="+y1+" y2="+y2+" style='width:100%;height:100%'   placeholder='"+placeholder+"'> </el-date-picker>");
-			element.children().get(0).attr("@focus","getInformation("+oncklickText+")");
-
-		}else if(textdictInfo.getTextId().equals("daterange")){ // 时间段
-			element.empty().append("<el-date-picker  v-model="+vmode+" type='datetimerange' placeholder="+placeholder+"  start-placeholder='开始日期'  end-placeholder='结束日期' format='YYYY年MM月DD日' trIndex="+trindex+" keyname="+keyname+" weighing="+weighing+" tdIndex="+tdindex+"  x1="+x1+" x2="+x2+" y1="+y1+" y2="+y2+">");
-			element.children().get(0).attr("@focus","getInformation("+oncklickText+")");
-			element.children().get(0).attr("@change","datePickerChange($event,'"+keyname+"')");
-		}else if(textdictInfo.getTextId().equals("img")){
+    /**
+     * 保存字段信息
+     */
+    @PostMapping("/saveTextInfo")
+    @ApiOperationSupport(order = 9)
+    @ApiOperation(value = "新增或修改", notes = "传入textdictInfo")
+    public R saveTextInfo(@Valid @RequestBody TextdictDataInfoVO textdictInfo) throws FileNotFoundException, InterruptedException {
+
+        // 获取 节点信息
+        WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.getByPKeyId(textdictInfo.getTableId());
+
+        // 读取html页面信息
+        File file1 = ResourceUtil.getFile(wbsTreePrivate.getHtmlUrl());
+        String htmlString = IoUtil.readToString(new FileInputStream(file1));
+        // 样式集合
+        Document doc = Jsoup.parse(htmlString);
+
+        //解析
+        Element table = doc.select("table").first();
+        Elements trs = table.select("tr");
+        Element element = trs.get(textdictInfo.getTrIndex()).select("td").get(textdictInfo.getTdIndex());
+
+        String trindex = element.children().get(0).attr("trindex");
+        String tdindex = element.children().get(0).attr("tdindex");
+        String x1 = element.children().get(0).attr("x1");
+        String x2 = element.children().get(0).attr("x2");
+        String y1 = element.children().get(0).attr("y1");
+        String y2 = element.children().get(0).attr("y2");
+        String placeholder = element.children().get(0).attr("placeholder").replaceAll("[^(\u4E00-\u9FA5_)]", "");
+        String keyname = element.children().get(0).attr("keyname");
+        String weighing = element.children().get(0).attr("weighing");
+
+        String parm = trindex + "," + tdindex + "," + x1 + "," + x2 + "," + y1 + "," + y2 + ",$event";
+        String oncklickText = "'" + placeholder + "'," + trindex + "," + tdindex;
+
+        String vmode = "formData." + keyname;
+        if (textdictInfo.getTextId().equals("input")) { // 单选框
+            element.empty().append("<el-input type='text' v-model=" + vmode + " placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%' > </el-input>");
+            element.children().get(0).attr("@focus", "getInformation(" + oncklickText + ")");
+        } else if (textdictInfo.getTextId().equals("textarea")) { // 文本域
+            int rowspan = element.attr("ROWSPAN").equals("") ? 0 : Integer.parseInt(element.attr("ROWSPAN"));
+            //@focus='getInformation("+oncklickText+")'
+            element.empty().append("<el-input :rows=" + rowspan * 2 + "  type='textarea' placeholder=" + placeholder + " v-model=" + vmode + "    keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'  > </el-input>");
+            element.children().get(0).attr("@focus", "getInformation(" + oncklickText + ")");
+        } else if (textdictInfo.getTextId().equals("select")) { // 下拉框
+            String selectText = " <el-select v-model=" + vmode + " keyname=" + keyname + " weighing=" + weighing + " placeholder=" + placeholder + " trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">"; //v-model="+keyname+"
+            List<TextdictInfo_vo> optionList = textdictInfo.getTextInfo();
+            if (optionList != null && optionList.size() >= 1) {
+                for (int i = 0; i < optionList.size(); i++)
+                    selectText += "<el-option  :key='" + i + "' :label='" + optionList.get(i).getDictValue() + "'   :value='" + i + "' > </el-option>";
+            }
+            selectText += "</el-select>";
+            element.empty().append(selectText);
+            element.children().get(0).attr("@focus", "getInformation(" + oncklickText + ")");
+        } else if (textdictInfo.getTextId().equals("radio")) { // 单选按钮
+
+            String radioText = "<template v-model=" + vmode + " keyname=" + keyname + " weighing=" + weighing + " placeholder=" + placeholder + " trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">";
+            List<TextdictInfo_vo> optionList = textdictInfo.getTextInfo();
+            if (optionList != null && optionList.size() >= 1) {
+                for (int i = 0; i < optionList.size(); i++)
+                    radioText += " <el-radio v-model=" + vmode + "  label=" + i + ">" + optionList.get(i).getDictValue() + "</el-radio>";
+            }
+            radioText += "</template>";
+            element.empty().append(radioText);
+            element.children().get(0).attr("v-on:click", "getInformation(" + oncklickText + ")");
+            element.attr("tabindex", "-1");
+        } else if (textdictInfo.getTextId().equals("checkbox")) { // 多选框
+
+            String checkbox = "<template v-model=" + vmode + " keyname=" + keyname + " weighing=" + weighing + " placeholder=" + placeholder + " trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">";
+            List<TextdictInfo_vo> optionList = textdictInfo.getTextInfo();
+            if (optionList != null && optionList.size() >= 1) {
+                for (int i = 0; i < optionList.size(); i++)
+                    checkbox += "<el-checkbox>" + optionList.get(i).getDictValue() + "</el-checkbox>";
+            }
+            checkbox += "</template>";
+            element.empty().append(checkbox);
+            element.children().get(0).attr("@focus", "getInformation(" + oncklickText + ")");
+            element.attr("tabindex", "-1");
+        } else if (textdictInfo.getTextId().equals("date")) { // 日期
+
+            element.empty().append("<el-date-picker v-model=" + vmode + " type='date' format='YYYY年MM月DD日' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
+            element.children().get(0).attr("@focus", "getInformation(" + oncklickText + ")");
+
+        } else if (textdictInfo.getTextId().equals("daterange")) { // 时间段
+            element.empty().append("<el-date-picker  v-model=" + vmode + " type='datetimerange' placeholder=" + placeholder + "  start-placeholder='开始日期'  end-placeholder='结束日期' format='YYYY年MM月DD日' trIndex=" + trindex + " keyname=" + keyname + " weighing=" + weighing + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">");
+            element.children().get(0).attr("@focus", "getInformation(" + oncklickText + ")");
+            element.children().get(0).attr("@change", "datePickerChange($event,'" + keyname + "')");
+        } else if (textdictInfo.getTextId().equals("img")) {
 			/*element.empty().append("<el-upload :disabled='formUploadLoading' v-loading='formUploadLoading' element-loading-text='上传中...' :on-progress='uploadprogress' @exceed='formUploadExceed' :on-error='formUploadError' placeholder="+placeholder+" v-model="+vmode+" keyname="+keyname+" weighing="+weighing+"  class='hc-upload-table-form' action='/api/blade-resource/oss/endpoint/put-file' trIndex="+trindex+" tdIndex="+tdindex+"  x1="+x1+" x2="+x2+" y1="+y1+" y2="+y2+"  accept='image/png,image/jpg,image/jpeg' :headers='getTokenHeader' :show-file-list='false' > <img v-if='"+vmode+"' :src="+vmode+" class='hc-table-form-img' /> <div class='hc-table-form-icon' v-else> 点此选择文件并上传 </div> <div v-if="+vmode+" class='hc-table-form-del' >" +
 			/*element.empty().append("<el-upload :disabled='formUploadLoading' v-loading='formUploadLoading' element-loading-text='上传中...' :on-progress='uploadprogress' @exceed='formUploadExceed' :on-error='formUploadError' placeholder="+placeholder+" v-model="+vmode+" keyname="+keyname+" weighing="+weighing+"  class='hc-upload-table-form' action='/api/blade-resource/oss/endpoint/put-file' trIndex="+trindex+" tdIndex="+tdindex+"  x1="+x1+" x2="+x2+" y1="+y1+" y2="+y2+"  accept='image/png,image/jpg,image/jpeg' :headers='getTokenHeader' :show-file-list='false' > <img v-if='"+vmode+"' :src="+vmode+" class='hc-table-form-img' /> <div class='hc-table-form-icon' v-else> 点此选择文件并上传 </div> <div v-if="+vmode+" class='hc-table-form-del' >" +
 					"        <el-button type='danger'"+ " plain @click.stop=delTableFormFile('"+keyname+"')>删除当前文件</el-button> " +
 					"        <el-button type='danger'"+ " plain @click.stop=delTableFormFile('"+keyname+"')>删除当前文件</el-button> " +
 					"    </div></el-upload>");*/
 					"    </div></el-upload>");*/
 
 
-			element.empty().append("<HcTableFormUpload :src='"+vmode+"' placeholder="+placeholder+" v-model="+vmode+"  keyName="+keyname+" weighing="+weighing+"  @success='formUploadSuccess' @del='delTableFormFile' trIndex="+trindex+" tdIndex="+tdindex+"  x1="+x1+" x2="+x2+" y1="+y1+" y2="+y2+"/>");
-
-			//element.children().get(0);
-			element.attr("@focus","getInformation("+oncklickText+")");
-			element.attr("tabindex","-1");
-		}
-			File writefile = new File(wbsTreePrivate.getHtmlUrl());
-		FileUtil.writeToFile(writefile, doc.html(), Boolean.parseBoolean("UTF-8"));
-		Thread.sleep(300);
-
-		// 清空相关的保存数据
-		String tabName = wbsTreePrivate.getInitTableName();
-		String isExitSql = " select * from information_schema.TABLES where TABLE_NAME='"+tabName+"'";
-		List<Map<String, Object>> tablist = jdbcTemplate.queryForList(isExitSql);
-		if(tablist!=null && tablist.size()>0){
-			String clarSql = "update  "+tabName+" set "+keyname.split("__")[0]+"=null where p_key_id in(SELECT p_key_id FROM m_wbs_tree_contract WHERE id ='"+wbsTreePrivate.getId()+"' and project_id='"+wbsTreePrivate.getProjectId()+"' )";
-			jdbcTemplate.execute(clarSql);
-		}
-		return R.success("操作成功");
-	}
-
-	/**
-	 *保存电签
-	 */
-	@PostMapping("/save_sigInfo")
-	@ApiOperationSupport(order = 7)
-	@ApiOperation(value = "保存电签", notes = "保存电签")
-	public R<String> saveSigInfo(@Valid @RequestBody JSONObject dataInfo) throws IOException {
-
-		JSONArray jsonArray = dataInfo.getJSONArray("dataInfo");
-		Long tableId = jsonArray.getJSONObject(0).getLong("tabId");
-
-		// 删除
-		textdictInfoService.getBaseMapper().delete(Wrappers.<TextdictInfo>query().lambda()
-				.eq(TextdictInfo::getTabId, tableId));
-
-		WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.getByPKeyId(tableId);
-		// 读取html页面信息
-		File file1 = ResourceUtil.getFile(wbsTreePrivate.getHtmlUrl());
-		String htmlString =  IoUtil.readToString(new FileInputStream(file1));
-		// 样式集合
-		Document doc = Jsoup.parse(htmlString);
-		//解析
-		Element table = doc.select("table").first();
-		Elements trs = table.select("tr");
-
-		List<TextdictInfo> textdictInfos = new ArrayList<>();
-
-		for (int i =0 ; i<jsonArray.size();i++){
-			JSONObject jsonObject = jsonArray.getJSONObject(i);
-			TextdictInfo textdictInfo = new TextdictInfo();
-			String[] trtd = jsonObject.getString("colKey").split("__")[1].split("_");
-			Element element = trs.get(Integer.parseInt(trtd[0])).select("td").get(Integer.parseInt(trtd[1]));
-
-			String id = element.children().get(0).attr("keyname");
-			textdictInfo.setName("电签位置配置");
-			textdictInfo.setType(2);
-			textdictInfo.setColKey(id);
-			textdictInfo.setSigRoleId(jsonObject.getString("sigRoleId"));
-			textdictInfo.setTabId(jsonObject.getString("tabId"));
-			textdictInfo.setColName(jsonObject.getString("colName"));
-			textdictInfo.setSigRoleName(jsonObject.getString("sigRoleName"));
-			textdictInfo.setPyzbx(jsonObject.getDouble("pyzbx"));
-			textdictInfo.setPyzby(jsonObject.getDouble("pyzby"));
-			textdictInfo.setIsDeleted(0);
-			textdictInfoService.saveOrUpdate(textdictInfo);
-			element.attr("dqId",textdictInfo.getId()+"");
-			element.children().get(0).attr("readonly",true);
-		}
-
-		// 写入 excel
-		File writefile = new File(wbsTreePrivate.getHtmlUrl());
-		FileUtil.writeToFile(writefile, doc.html(), Boolean.parseBoolean("UTF-8"));
-		return R.success("操作成功");
-	}
-
-	/**
-	 *保存电签
-	 */
-	@PostMapping("/save_defaulVal")
-	@ApiOperationSupport(order = 7)
-	@ApiOperation(value = "保存默认值", notes = "保存默认值")
-	public R<String> saveDefaulVal(@Valid @RequestBody TextdictBy345VO textdictInfo) throws IOException {
-		WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.getByPKeyId(textdictInfo.getTableId());
-
-		// 读取html页面信息
-		File file1 = ResourceUtil.getFile(wbsTreePrivate.getHtmlUrl());
-		String htmlString =  IoUtil.readToString(new FileInputStream(file1));
-		// 样式集合
-		Document doc = Jsoup.parse(htmlString);
-		//解析
-		Element table = doc.select("table").first();
-		Elements trs = table.select("tr");
-		Element element = trs.get(textdictInfo.getTrIndex()).select("td").get(textdictInfo.getTdIndex());
-
-		//
-		String placeholder = "";
-		String id = element.children().get(0).attr("keyname");
-		if(element.html().indexOf("el-tooltip")>=0){
-			placeholder = element.children().get(0).children().get(0).attr("placeholder").replaceAll("[^(\u4E00-\u9FA5_)]", "");
-			id = element.children().get(0).children().get(0).attr("keyname");
-		}else{
-			placeholder = element.children().get(0).attr("placeholder").replaceAll("[^(\u4E00-\u9FA5_)]", "");
-			id = element.children().get(0).attr("keyname");
-		}
-
-		TextdictInfo textdictBean = new TextdictInfo();
-		textdictBean.setIsDeleted(0);
-		textdictBean.setTabId(textdictInfo.getTableId()+"");
-
-		textdictBean.setColKey(id);
-		textdictBean.setColName(placeholder);
-		textdictBean.setSigRoleName(textdictInfo.getTextId());
-
-		if(textdictInfo.getType()==4){ //默认值
-			textdictBean.setType(4);
-			textdictBean.setName("编辑默认值");
-		}
-		if(textdictInfo.getType()==5){ // 提示语
-			textdictBean.setType(5);
-			textdictBean.setName("提示信息");
-			String lastHmtl ="";
-			if(element.html().indexOf("el-tooltip")>=0){
-				element.children().attr("content",textdictInfo.getTextId());
-			}else{
-				lastHmtl = " <el-tooltip content='"+textdictInfo.getTextId()+"' placement='top' effect='customized'>"+element.html()+"</el-tooltip>";
-				element.empty().append(lastHmtl);
-			}
-			File writefile = new File(wbsTreePrivate.getHtmlUrl());
-			FileUtil.writeToFile(writefile, doc.html(), Boolean.parseBoolean("UTF-8"));
-		}
-
-		// 删除
-		textdictInfoService.getBaseMapper().delete(Wrappers.<TextdictInfo>query().lambda().eq(TextdictInfo::getTabId, textdictInfo.getTableId())
-				.eq(TextdictInfo::getType,textdictInfo.getType()).eq(TextdictInfo::getColKey,id));
-
-		textdictInfoService.saveOrUpdate(textdictBean);
-		return R.success("操作成功");
-	}
+            element.empty().append("<hc-table-form-upload :src='" + vmode + "' placeholder=" + placeholder + " v-model=" + vmode + "  keyName=" + keyname + " weighing=" + weighing + "  @success='formUploadSuccess' @del='delTableFormFile' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + "/> ");
+
+            //element.children().get(0);
+            element.attr("@focus", "getInformation(" + oncklickText + ")");
+            element.attr("tabindex", "-1");
+        }
+        File writefile = new File(wbsTreePrivate.getHtmlUrl());
+        FileUtil.writeToFile(writefile, doc.html(), Boolean.parseBoolean("UTF-8"));
+        Thread.sleep(300);
+
+        // 清空相关的保存数据
+        String tabName = wbsTreePrivate.getInitTableName();
+        String isExitSql = " select * from information_schema.TABLES where TABLE_NAME='" + tabName + "'";
+        List<Map<String, Object>> tablist = jdbcTemplate.queryForList(isExitSql);
+        if (tablist != null && tablist.size() > 0) {
+            String clarSql = "update  " + tabName + " set " + keyname.split("__")[0] + "=null where p_key_id in(SELECT p_key_id FROM m_wbs_tree_contract WHERE id ='" + wbsTreePrivate.getId() + "' and project_id='" + wbsTreePrivate.getProjectId() + "' )";
+            jdbcTemplate.execute(clarSql);
+        }
+        return R.success("操作成功");
+    }
+
+    /**
+     * 保存电签
+     */
+    @PostMapping("/save_sigInfo")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "保存电签", notes = "保存电签")
+    public R<String> saveSigInfo(@Valid @RequestBody JSONObject dataInfo) throws IOException {
+
+        JSONArray jsonArray = dataInfo.getJSONArray("dataInfo");
+        if(jsonArray==null || jsonArray.size()==0){
+            return R.fail("保存列表无任何数据");
+        }
+        Long tableId = jsonArray.getJSONObject(0).getLong("tabId");
+
+        // 删除
+        textdictInfoService.getBaseMapper().delete(Wrappers.<TextdictInfo>query().lambda()
+                .eq(TextdictInfo::getTabId, tableId));
+
+        WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.getByPKeyId(tableId);
+        // 读取html页面信息
+        File file1 = ResourceUtil.getFile(wbsTreePrivate.getHtmlUrl());
+        String htmlString = IoUtil.readToString(new FileInputStream(file1));
+        // 样式集合
+        Document doc = Jsoup.parse(htmlString);
+        //解析
+        Element table = doc.select("table").first();
+        Elements trs = table.select("tr");
+
+        List<TextdictInfo> textdictInfos = new ArrayList<>();
+
+        for (int i = 0; i < jsonArray.size(); i++) {
+            JSONObject jsonObject = jsonArray.getJSONObject(i);
+            TextdictInfo textdictInfo = new TextdictInfo();
+            String[] trtd = jsonObject.getString("colKey").split("__")[1].split("_");
+            Element element = trs.get(Integer.parseInt(trtd[0])).select("td").get(Integer.parseInt(trtd[1]));
+
+            String id = element.children().get(0).attr("keyname");
+            textdictInfo.setName("电签位置配置");
+            textdictInfo.setType(2);
+            textdictInfo.setColKey(id);
+            textdictInfo.setSigRoleId(jsonObject.getString("sigRoleId"));
+            textdictInfo.setTabId(jsonObject.getString("tabId"));
+            textdictInfo.setColName(jsonObject.getString("colName"));
+            textdictInfo.setSigRoleName(jsonObject.getString("sigRoleName"));
+            textdictInfo.setPyzbx(jsonObject.getDouble("pyzbx"));
+            textdictInfo.setPyzby(jsonObject.getDouble("pyzby"));
+            textdictInfo.setIsDeleted(0);
+            textdictInfoService.saveOrUpdate(textdictInfo);
+            element.removeAttr("dqId");
+            element.attr("dqId", textdictInfo.getId() + "");
+            element.children().get(0).attr("readonly", true);
+        }
+
+        // 写入 excel
+        File writefile = new File(wbsTreePrivate.getHtmlUrl());
+        FileUtil.writeToFile(writefile, doc.html(), Boolean.parseBoolean("UTF-8"));
+        return R.success("操作成功");
+    }
+
+    /**
+     * 保存电签
+     */
+    @PostMapping("/save_defaulVal")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "保存默认值", notes = "保存默认值")
+    public R<String> saveDefaulVal(@Valid @RequestBody TextdictBy345VO textdictInfo) throws IOException {
+        WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.getByPKeyId(textdictInfo.getTableId());
+
+        // 读取html页面信息
+        File file1 = ResourceUtil.getFile(wbsTreePrivate.getHtmlUrl());
+        String htmlString = IoUtil.readToString(new FileInputStream(file1));
+        // 样式集合
+        Document doc = Jsoup.parse(htmlString);
+        //解析
+        Element table = doc.select("table").first();
+        Elements trs = table.select("tr");
+        Element element = trs.get(textdictInfo.getTrIndex()).select("td").get(textdictInfo.getTdIndex());
+
+        //
+        String placeholder = "";
+        String id = element.children().get(0).attr("keyname");
+        if (element.html().indexOf("el-tooltip") >= 0) {
+            placeholder = element.children().get(0).children().get(0).attr("placeholder").replaceAll("[^(\u4E00-\u9FA5_)]", "");
+            id = element.children().get(0).children().get(0).attr("keyname");
+        } else {
+            placeholder = element.children().get(0).attr("placeholder").replaceAll("[^(\u4E00-\u9FA5_)]", "");
+            id = element.children().get(0).attr("keyname");
+        }
+
+        TextdictInfo textdictBean = new TextdictInfo();
+        textdictBean.setIsDeleted(0);
+        textdictBean.setTabId(textdictInfo.getTableId() + "");
+
+        textdictBean.setColKey(id);
+        textdictBean.setColName(placeholder);
+        textdictBean.setSigRoleName(textdictInfo.getTextId());
+
+        if (textdictInfo.getType() == 4) { //默认值
+            textdictBean.setType(4);
+            textdictBean.setName("编辑默认值");
+        }
+        if (textdictInfo.getType() == 5) { // 提示语
+            textdictBean.setType(5);
+            textdictBean.setName("提示信息");
+            String lastHmtl = "";
+            if (element.html().indexOf("el-tooltip") >= 0) {
+                element.children().attr("content", textdictInfo.getTextId());
+            } else {
+                lastHmtl = " <el-tooltip content='" + textdictInfo.getTextId() + "' placement='top' effect='customized'>" + element.html() + "</el-tooltip>";
+                element.empty().append(lastHmtl);
+            }
+            File writefile = new File(wbsTreePrivate.getHtmlUrl());
+            FileUtil.writeToFile(writefile, doc.html(), Boolean.parseBoolean("UTF-8"));
+        }
+
+        // 删除
+        textdictInfoService.getBaseMapper().delete(Wrappers.<TextdictInfo>query().lambda().eq(TextdictInfo::getTabId, textdictInfo.getTableId())
+                .eq(TextdictInfo::getType, textdictInfo.getType()).eq(TextdictInfo::getColKey, id));
+
+        textdictInfoService.saveOrUpdate(textdictBean);
+        return R.success("操作成功");
+    }
 
 
 /*	public static void main(String[] args) throws FileNotFoundException {
 /*	public static void main(String[] args) throws FileNotFoundException {
 		File file1 = ResourceUtil.getFile("/Users/hongchuangyanfa/Desktop/privateUrl/1567789917445029888.html");
 		File file1 = ResourceUtil.getFile("/Users/hongchuangyanfa/Desktop/privateUrl/1567789917445029888.html");

+ 8 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IExcelTabService.java

@@ -19,6 +19,7 @@ package org.springblade.manager.service;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import org.springblade.core.oss.model.BladeFile;
 import org.springblade.core.oss.model.BladeFile;
+import org.springblade.core.tool.api.R;
 import org.springblade.manager.bean.TableInfo;
 import org.springblade.manager.bean.TableInfo;
 import org.springblade.manager.entity.ExcelTab;
 import org.springblade.manager.entity.ExcelTab;
 import org.springblade.manager.vo.ExceTabTreVO;
 import org.springblade.manager.vo.ExceTabTreVO;
@@ -82,10 +83,6 @@ public interface IExcelTabService extends BaseService<ExcelTab> {
 
 
 	boolean removeBussTabInfoById(String pkeyid);
 	boolean removeBussTabInfoById(String pkeyid);
 
 
-	/**
-	 *  单个pdf预览
-	 */
-	BladeFile getBussPdfInfo(Long pkeyId);
 
 
 	/**
 	/**
 	 *  表格数据封装
 	 *  表格数据封装
@@ -102,5 +99,12 @@ public interface IExcelTabService extends BaseService<ExcelTab> {
 
 
 	 Map<String,String> getTablbCols(String pkeyid, String colkey) throws FileNotFoundException;
 	 Map<String,String> getTablbCols(String pkeyid, String colkey) throws FileNotFoundException;
 
 
+	 // 单个pdf 生成
+	R getBussPdfInfo(Long pkeyId) throws Exception;
+
+	// 多个pdf 合并
+	void getBussPdfs(String nodeId, String classify, String contractId, String projectId) throws Exception;
 
 
+	// 获取用户端 单个表单接口数据
+	R getBussDataInfo(Long pkeyId);
 }
 }

+ 2 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/ITextdictInfoService.java

@@ -41,6 +41,8 @@ public interface ITextdictInfoService extends IService<TextdictInfo> {
 	 */
 	 */
 	IPage<TextdictInfoVO> selectTextdictInfoPage(IPage<TextdictInfoVO> page, TextdictInfoVO textdictInfo);
 	IPage<TextdictInfoVO> selectTextdictInfoPage(IPage<TextdictInfoVO> page, TextdictInfoVO textdictInfo);
 
 
+	void deleDataInfoById(String id);
+
 
 
 
 
 }
 }

+ 5 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TextdictInfoServiceImpl.java

@@ -41,4 +41,9 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
 		return page.setRecords(baseMapper.selectTextdictInfoPage(page, textdictInfo));
 		return page.setRecords(baseMapper.selectTextdictInfoPage(page, textdictInfo));
 	}
 	}
 
 
+	@Override
+	public void deleDataInfoById(String id) {
+		baseMapper.deleteById(id);
+	}
+
 }
 }