Commit fe1956fa authored by wangxl's avatar wangxl

1

parent b5004ee8
...@@ -13,7 +13,7 @@ import java.util.Date; ...@@ -13,7 +13,7 @@ import java.util.Date;
/** /**
* 项目表VO * 项目表VO
* *
* @author lkl * @author lkl
* @version 2021-08-26 * @version 2021-08-26
*/ */
......
...@@ -13,7 +13,7 @@ import java.util.Date; ...@@ -13,7 +13,7 @@ import java.util.Date;
/** /**
* 任务书表VO * 任务书表VO
* *
* @author lkl * @author lkl
* @version 2021-08-26 * @version 2021-08-26
*/ */
...@@ -135,4 +135,11 @@ public class ComProjectTask extends BaseEntity { ...@@ -135,4 +135,11 @@ public class ComProjectTask extends BaseEntity {
/** 最终报告 */ /** 最终报告 */
@ApiModelProperty(value = "最终报告", position = 2 ) @ApiModelProperty(value = "最终报告", position = 2 )
private Integer finalReport; private Integer finalReport;
} /** 合同书(附件Id) */
\ No newline at end of file @ApiModelProperty(value = "合同书(附件Id)", position = 1 )
@Length(max=150, message = "合同书(附件Id)不能大于36")
private String contract;
/** 单位是否审核通过 0 否 1 通过 */
@ApiModelProperty(value = "单位是否审核通过 0 否 1 通过", position = 1 )
private Integer isUnitAuditPass;
}
...@@ -125,6 +125,19 @@ public class ComProjectAuditDTO extends BaseDTO { ...@@ -125,6 +125,19 @@ public class ComProjectAuditDTO extends BaseDTO {
private String knowledgeName; private String knowledgeName;
/** 学科Id */ /** 学科Id */
private String knowledgeCode; private String knowledgeCode;
/** 合同书(附件Id) */
@ApiModelProperty(value = "合同书(附件Id)", position = 1 )
@Length(max=36, message = "合同书(附件Id)不能大于36")
private String contract;
/** 附件名 */
@ApiModelProperty(value = "附件名", position = 6)
private String contractName;
/** URL */
@ApiModelProperty(value = "URL", position = 7)
private String contractUrl;
/** 单位是否审核通过 0 否 1 通过 */
@ApiModelProperty(value = "单位是否审核通过 0 否 1 通过", position = 1 )
private Integer isUnitAuditPass;
/** 现从事专业 */ /** 现从事专业 */
@ApiModelProperty(value = "现从事专业", position = 11 ) @ApiModelProperty(value = "现从事专业", position = 11 )
@Length(max=36, message = "现从事专业不能大于36") @Length(max=36, message = "现从事专业不能大于36")
......
...@@ -14,7 +14,7 @@ import java.util.List; ...@@ -14,7 +14,7 @@ import java.util.List;
/** /**
* 项目表DTO * 项目表DTO
* *
* @author lkl * @author lkl
* @version 2021-08-26 * @version 2021-08-26
*/ */
......
...@@ -14,7 +14,7 @@ import java.util.List; ...@@ -14,7 +14,7 @@ import java.util.List;
/** /**
* 任务书表DTO * 任务书表DTO
* *
* @author lkl * @author lkl
* @version 2021-08-26 * @version 2021-08-26
*/ */
...@@ -138,6 +138,10 @@ public class ComProjectTaskDTO extends BaseDTO { ...@@ -138,6 +138,10 @@ public class ComProjectTaskDTO extends BaseDTO {
@ApiModelProperty(value = "最终报告", position = 2 ) @ApiModelProperty(value = "最终报告", position = 2 )
private Integer finalReport; private Integer finalReport;
/** 单位是否审核通过 0 否 1 通过 */
@ApiModelProperty(value = "单位是否审核通过 0 否 1 通过", position = 1 )
private Integer isUnitAuditPass;
/** 合同书状态 0 未 填,-10 起 草, 10 待提交,20 审核中,30 返回修改,40 审核不通过, 50 审核通过*/ /** 合同书状态 0 未 填,-10 起 草, 10 待提交,20 审核中,30 返回修改,40 审核不通过, 50 审核通过*/
private String taskStateName; private String taskStateName;
...@@ -176,7 +180,20 @@ public class ComProjectTaskDTO extends BaseDTO { ...@@ -176,7 +180,20 @@ public class ComProjectTaskDTO extends BaseDTO {
/** 其他应考核的指标 */ /** 其他应考核的指标 */
@ApiModelProperty(value = "其他应考核的指标", position = 35 ) @ApiModelProperty(value = "其他应考核的指标", position = 35 )
private String otherTarget; private String otherTarget;
/** 合同书(附件Id) */
@ApiModelProperty(value = "合同书(附件Id)", position = 1 )
@Length(max=150, message = "合同书(附件Id)不能大于36")
private String contract;
/** 附件Id */
@ApiModelProperty(value = "附件Id", position = 1 )
private String contractId;
/** 附件名 */
@ApiModelProperty(value = "附件名", position = 6)
private String contractName;
/** URL */
@ApiModelProperty(value = "URL", position = 7)
private String contractUrl;
/** 项目总经费(万元) */ /** 项目总经费(万元) */
@ApiModelProperty(value = "项目总经费(万元)", position = 39) @ApiModelProperty(value = "项目总经费(万元)", position = 39)
......
...@@ -20,10 +20,10 @@ import java.util.List; ...@@ -20,10 +20,10 @@ import java.util.List;
@EqualsAndHashCode(callSuper=true) @EqualsAndHashCode(callSuper=true)
@ApiModel(description = "人才申请表DTO") @ApiModel(description = "人才申请表DTO")
public class ComTalentApplyDTO extends BaseDTO { public class ComTalentApplyDTO extends BaseDTO {
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private String id; private String id;
@ApiModelProperty(value = "人员ID") @ApiModelProperty(value = "人员ID")
private String personId; private String personId;
...@@ -49,66 +49,66 @@ public class ComTalentApplyDTO extends BaseDTO { ...@@ -49,66 +49,66 @@ public class ComTalentApplyDTO extends BaseDTO {
@ApiModelProperty(value = "是否是省级或省级以上人才") @ApiModelProperty(value = "是否是省级或省级以上人才")
private Integer isProvincialTalent; private Integer isProvincialTalent;
@ApiModelProperty(value = "人才类型") @ApiModelProperty(value = "人才类型")
private String talentType; private String talentType;
@ApiModelProperty(value = "荣誉称号") @ApiModelProperty(value = "荣誉称号")
private String honoraryTitle; private String honoraryTitle;
@ApiModelProperty(value = "任职情况1") @ApiModelProperty(value = "任职情况1")
private String holdPost1; private String holdPost1;
@ApiModelProperty(value = "任职情况2") @ApiModelProperty(value = "任职情况2")
private String holdPost2; private String holdPost2;
@ApiModelProperty(value = "任职情况3") @ApiModelProperty(value = "任职情况3")
private String holdPost3; private String holdPost3;
@ApiModelProperty(value = "支持条件") @ApiModelProperty(value = "支持条件")
private String supportingConditions; private String supportingConditions;
@ApiModelProperty(value = "研究类型") @ApiModelProperty(value = "研究类型")
private String researchType; private String researchType;
@ApiModelProperty(value = "研究开始时间") @ApiModelProperty(value = "研究开始时间")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date researchStart; private Date researchStart;
@ApiModelProperty(value = "研究结束时间") @ApiModelProperty(value = "研究结束时间")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date researchEnd; private Date researchEnd;
@ApiModelProperty(value = "资助经费") @ApiModelProperty(value = "资助经费")
private BigDecimal supportFund; private BigDecimal supportFund;
@ApiModelProperty(value = "研究内容") @ApiModelProperty(value = "研究内容")
private String researchContent; private String researchContent;
@ApiModelProperty(value = "技术特点") @ApiModelProperty(value = "技术特点")
private String technicalSkill; private String technicalSkill;
@ApiModelProperty(value = "量化指标") @ApiModelProperty(value = "量化指标")
private String qualityTarget; private String qualityTarget;
@ApiModelProperty(value = "研究条件") @ApiModelProperty(value = "研究条件")
private String researchCondition; private String researchCondition;
@ApiModelProperty(value = "研究进度") @ApiModelProperty(value = "研究进度")
private String researchProgress; private String researchProgress;
@ApiModelProperty(value = "计划目标") @ApiModelProperty(value = "计划目标")
private String planTarget; private String planTarget;
@ApiModelProperty(value = "单位意见") @ApiModelProperty(value = "单位意见")
private String unitAdvice; private String unitAdvice;
@ApiModelProperty(value = "申请经费") @ApiModelProperty(value = "申请经费")
private BigDecimal applyFund; private BigDecimal applyFund;
@ApiModelProperty(value = "其他经费") @ApiModelProperty(value = "其他经费")
private BigDecimal otherFund; private BigDecimal otherFund;
@ApiModelProperty(value = "总经费") @ApiModelProperty(value = "总经费")
private BigDecimal totalFund; private BigDecimal totalFund;
...@@ -204,6 +204,9 @@ public class ComTalentApplyDTO extends BaseDTO { ...@@ -204,6 +204,9 @@ public class ComTalentApplyDTO extends BaseDTO {
/** 职务名称 */ /** 职务名称 */
@ApiModelProperty(value = "职务名称", position = 15) @ApiModelProperty(value = "职务名称", position = 15)
private String dutyName; private String dutyName;
/** 单位名称 */
@ApiModelProperty(value = "单位名称", position = 41)
private String appUnitName;
/** 团队成员列表 */ /** 团队成员列表 */
private List<ComTalentMembersDTO> membersList; private List<ComTalentMembersDTO> membersList;
...@@ -221,4 +224,4 @@ public class ComTalentApplyDTO extends BaseDTO { ...@@ -221,4 +224,4 @@ public class ComTalentApplyDTO extends BaseDTO {
private List<ComFileDTO> fileList; private List<ComFileDTO> fileList;
private List<ComProjectAuditNoteDTO> auditList; private List<ComProjectAuditNoteDTO> auditList;
} }
\ No newline at end of file
...@@ -13,7 +13,7 @@ import java.util.Date; ...@@ -13,7 +13,7 @@ import java.util.Date;
/** /**
* 查询项目表VO * 查询项目表VO
* *
* @author lkl * @author lkl
* @version 2021-08-26 * @version 2021-08-26
*/ */
...@@ -79,6 +79,7 @@ public class ComProjectQueryVO extends PaginationVO{ ...@@ -79,6 +79,7 @@ public class ComProjectQueryVO extends PaginationVO{
@ApiModelProperty(value = "学科Id", position = 16 ) @ApiModelProperty(value = "学科Id", position = 16 )
@Length(max=36, message = "学科Id不能大于36") @Length(max=36, message = "学科Id不能大于36")
private String knowledgeId; private String knowledgeId;
/** 专家/专家组是否评审完成 0否 1是 */ /** 专家/专家组是否评审完成 0否 1是 */
@ApiModelProperty(value = "是否评审完成", position = 6 ) @ApiModelProperty(value = "是否评审完成", position = 6 )
private Integer completed; private Integer completed;
......
...@@ -13,7 +13,7 @@ import java.util.Date; ...@@ -13,7 +13,7 @@ import java.util.Date;
/** /**
* 查询任务书表VO * 查询任务书表VO
* *
* @author lkl * @author lkl
* @version 2021-08-26 * @version 2021-08-26
*/ */
...@@ -136,6 +136,13 @@ public class ComProjectTaskQueryVO extends PaginationVO{ ...@@ -136,6 +136,13 @@ public class ComProjectTaskQueryVO extends PaginationVO{
/** 最终报告 */ /** 最终报告 */
@ApiModelProperty(value = "最终报告", position = 2 ) @ApiModelProperty(value = "最终报告", position = 2 )
private Integer finalReport; private Integer finalReport;
/** 合同书(附件Id) */
@ApiModelProperty(value = "合同书(附件Id)", position = 1 )
@Length(max=150, message = "合同书(附件Id)不能大于36")
private String contract;
/** 单位是否审核通过 0 否 1 通过 */
@ApiModelProperty(value = "单位是否审核通过 0 否 1 通过", position = 1 )
private Integer isUnitAuditPass;
/** 项目名称 */ /** 项目名称 */
@ApiModelProperty(value = "项目名称", position = 1 ) @ApiModelProperty(value = "项目名称", position = 1 )
......
package com.yiboshi.science.rest.v1; package com.yiboshi.science.rest.v1;
import com.itextpdf.text.DocumentException;
import com.yiboshi.arch.base.ResponseDataModel; import com.yiboshi.arch.base.ResponseDataModel;
import com.yiboshi.science.base.Pagination; import com.yiboshi.science.base.Pagination;
import com.yiboshi.science.config.annotation.Logs; import com.yiboshi.science.config.annotation.Logs;
import com.yiboshi.science.config.security.SecurityUserHolder; import com.yiboshi.science.config.security.SecurityUserHolder;
import com.yiboshi.science.entity.ComProjectAudit; import com.yiboshi.science.entity.ComProjectAudit;
import com.yiboshi.science.entity.ComTalentApply; import com.yiboshi.science.entity.ComTalentApply;
import com.yiboshi.science.entity.SystemParameter;
import com.yiboshi.science.enumeration.CommonEnum; import com.yiboshi.science.enumeration.CommonEnum;
import com.yiboshi.science.param.dto.ComProjectAuditDTO; import com.yiboshi.science.param.dto.ComProjectAuditDTO;
import com.yiboshi.science.param.dto.ComProjectDTO;
import com.yiboshi.science.param.dto.ComTalentApplyDTO; import com.yiboshi.science.param.dto.ComTalentApplyDTO;
import com.yiboshi.science.param.dto.DataStatisticsDTO; import com.yiboshi.science.param.dto.DataStatisticsDTO;
import com.yiboshi.science.param.query.ComTalentApplyQueryVO; import com.yiboshi.science.param.query.ComTalentApplyQueryVO;
...@@ -15,7 +18,9 @@ import com.yiboshi.science.rest.BaseController; ...@@ -15,7 +18,9 @@ import com.yiboshi.science.rest.BaseController;
import com.yiboshi.science.service.ComProjectService; import com.yiboshi.science.service.ComProjectService;
import com.yiboshi.science.service.ComTalentApplyService; import com.yiboshi.science.service.ComTalentApplyService;
import com.yiboshi.science.service.SystemParameterService; import com.yiboshi.science.service.SystemParameterService;
import com.yiboshi.science.utils.ProjectInfoToPDF;
import com.yiboshi.science.utils.StringUtil; import com.yiboshi.science.utils.StringUtil;
import com.yiboshi.science.utils.TalentToPDF;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -24,6 +29,10 @@ import org.springframework.validation.BindingResult; ...@@ -24,6 +29,10 @@ import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.ServletOutputStream;
import java.io.IOException;
import java.util.List;
import static com.yiboshi.science.utils.StringUtil.hideAllIdCardNum; import static com.yiboshi.science.utils.StringUtil.hideAllIdCardNum;
import static com.yiboshi.science.utils.StringUtil.hideAllPhoneNum; import static com.yiboshi.science.utils.StringUtil.hideAllPhoneNum;
...@@ -162,10 +171,37 @@ public class ComTalentApplyController extends BaseController<ComTalentApplyServi ...@@ -162,10 +171,37 @@ public class ComTalentApplyController extends BaseController<ComTalentApplyServi
@ApiOperation(value = "人才申报信息审核", httpMethod = "POST", notes = "人才申报信息审核") @ApiOperation(value = "人才申报信息审核", httpMethod = "POST", notes = "人才申报信息审核")
@PostMapping @PostMapping
@RequestMapping("/batchAudit") @RequestMapping("/batchAudit")
@Logs(value = CommonEnum.logType.projectAudit) @Logs(value = CommonEnum.logType.talentApplyAudit)
public ResponseDataModel<String> batchAudit(@Validated @RequestBody ComProjectAuditDTO comProjectAudit, BindingResult bindingResult) { public ResponseDataModel<String> batchAudit(@Validated @RequestBody ComProjectAuditDTO comProjectAudit, BindingResult bindingResult) {
comTalentApplyService.batchAudit(comProjectAudit, SecurityUserHolder.getUnitId(), SecurityUserHolder.getUnitCode()); comTalentApplyService.batchAudit(comProjectAudit, SecurityUserHolder.getUnitId(), SecurityUserHolder.getUnitCode());
return ResponseDataModel.ok("审核成功"); return ResponseDataModel.ok("审核成功");
} }
@ApiOperation(value = "项目信息导出", httpMethod = "POST", notes = "项目信息导出")
@RequestMapping("/export/{id}")
@PostMapping
public void export(@PathVariable String id) throws DocumentException, IOException {
try {
ComTalentApplyDTO dto =comTalentApplyService.getTalentApplyById(id);
// 生成PDF文件字节数组
byte[] pdfBytes = TalentToPDF.createContractPdf(dto);
// 设置响应头
response.setContentType("application/pdf");
String fileName = new String((dto.getPersonName() + ".pdf").getBytes("UTF-8"), "ISO-8859-1");
response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
response.setContentLength(pdfBytes.length);
// 写入响应流
try (ServletOutputStream out = response.getOutputStream()) {
out.write(pdfBytes);
out.flush();
}
} catch (Exception e) {
response.setContentType("text/plain;charset=UTF-8");
response.getWriter().write("导出PDF失败:" + e.getMessage());
}
}
} }
...@@ -24,7 +24,7 @@ public interface ComProjectTaskService extends BaseService<ComProjectTaskQueryVO ...@@ -24,7 +24,7 @@ public interface ComProjectTaskService extends BaseService<ComProjectTaskQueryVO
* @param id * @param id
* @param state * @param state
*/ */
void updateState(String id,Integer state); void updateState(String id,Integer state, Integer auditState);
/** 根据id获取任务书信息 /** 根据id获取任务书信息
* *
* @param id * @param id
......
...@@ -148,10 +148,11 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO ...@@ -148,10 +148,11 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
return ComProjectTaskDAO.getCount(criteria); return ComProjectTaskDAO.getCount(criteria);
} }
public void updateState(String id, Integer state) { public void updateState(String id, Integer state, Integer auditState) {
ComProjectTask ComProjectTask = new ComProjectTask(); ComProjectTask ComProjectTask = new ComProjectTask();
ComProjectTask.setId(id); ComProjectTask.setId(id);
ComProjectTask.setTaskState(state); ComProjectTask.setTaskState(state);
ComProjectTask.setIsUnitAuditPass(auditState);
this.update(ComProjectTask); this.update(ComProjectTask);
} }
...@@ -425,8 +426,10 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO ...@@ -425,8 +426,10 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
task = convert2Entity(dto); task = convert2Entity(dto);
id = this.insert(task); id = this.insert(task);
} else { } else {
id = task.getId();
task = convert2Entity(dto); task = convert2Entity(dto);
id = this.update(task); task.setId(id);
this.update(task);
} }
// 附件 // 附件
ComFileService.insertList(dto.getFileList(), id, CommonEnum.fileType.projectTask.getCode()); ComFileService.insertList(dto.getFileList(), id, CommonEnum.fileType.projectTask.getCode());
...@@ -444,7 +447,7 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO ...@@ -444,7 +447,7 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
throw new BusinessException("合同书已上报"); throw new BusinessException("合同书已上报");
comProjectAuditService.report(ComProjectTask.getReportYear(), model.getAuditObjectId(), model.getAuditType(), null, unitId, treeCode); comProjectAuditService.report(ComProjectTask.getReportYear(), model.getAuditObjectId(), model.getAuditType(), null, unitId, treeCode);
// 更新任务书状态 // 更新任务书状态
this.updateState(model.getAuditObjectId(), CommonEnum.taskState.review.getCode()); this.updateState(model.getAuditObjectId(), CommonEnum.taskState.review.getCode(), null);
} }
@Transactional @Transactional
...@@ -463,17 +466,21 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO ...@@ -463,17 +466,21 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
String unitId = comProjectAuditService.audit(audit, appUnit.getTreeCode(), treeCode); String unitId = comProjectAuditService.audit(audit, appUnit.getTreeCode(), treeCode);
// 处理项目状态 // 处理项目状态
Integer taskState = null; Integer taskState = null;
Integer auditState = 0;
if (audit.getAuditResult().equals(CommonEnum.auditResult.pass.getCode())) { if (audit.getAuditResult().equals(CommonEnum.auditResult.pass.getCode())) {
if (unitId == null) { if (unitId == null) {
taskState = CommonEnum.taskState.pass.getCode(); taskState = CommonEnum.taskState.pass.getCode();
} }
if (appUnit.getId().equals(auditUnitId)) {
auditState = 1;
}
} else if (audit.getAuditResult().equals(CommonEnum.auditResult.returnModify.getCode())) { } else if (audit.getAuditResult().equals(CommonEnum.auditResult.returnModify.getCode())) {
if (unitId == null) if (unitId == null)
taskState = CommonEnum.taskState.returnModify.getCode(); taskState = CommonEnum.taskState.returnModify.getCode();
} else { } else {
taskState = CommonEnum.taskState.failed.getCode(); taskState = CommonEnum.taskState.failed.getCode();
} }
if (null != taskState) if (null != taskState || auditState != null)
this.updateState(dto.getAuditObjectId(), taskState); this.updateState(dto.getAuditObjectId(), taskState, auditState);
} }
} }
...@@ -17,6 +17,7 @@ import com.itextpdf.layout.properties.*; ...@@ -17,6 +17,7 @@ import com.itextpdf.layout.properties.*;
import com.itextpdf.text.DocumentException; import com.itextpdf.text.DocumentException;
import com.yiboshi.science.param.dto.ComProjectCooperativeUnitsDTO; import com.yiboshi.science.param.dto.ComProjectCooperativeUnitsDTO;
import com.yiboshi.science.param.dto.ComProjectTaskDTO; import com.yiboshi.science.param.dto.ComProjectTaskDTO;
import com.yiboshi.science.param.dto.ComTalentApplyDTO;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -60,7 +61,7 @@ public class TalentToPDF { ...@@ -60,7 +61,7 @@ public class TalentToPDF {
* @param dto 项目任务信息 * @param dto 项目任务信息
* @return PDF文件字节数组 * @return PDF文件字节数组
*/ */
public static byte[] createContractPdf(ComProjectTaskDTO dto) throws DocumentException { public static byte[] createContractPdf(ComTalentApplyDTO dto) throws DocumentException {
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
PdfDocument pdfDoc = new PdfDocument(new PdfWriter(baos)); PdfDocument pdfDoc = new PdfDocument(new PdfWriter(baos));
Document document = new Document(pdfDoc); Document document = new Document(pdfDoc);
...@@ -88,7 +89,7 @@ public class TalentToPDF { ...@@ -88,7 +89,7 @@ public class TalentToPDF {
} }
} }
private static void firstPageInfo(Document document, ComProjectTaskDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException { private static void firstPageInfo(Document document, ComTalentApplyDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException {
// 附件编号 // 附件编号
Paragraph paragraph = new Paragraph("附件3").setFont(bfChinese).setFontSize(16).setBold(); Paragraph paragraph = new Paragraph("附件3").setFont(bfChinese).setFontSize(16).setBold();
paragraph.setTextAlignment(TextAlignment.LEFT); paragraph.setTextAlignment(TextAlignment.LEFT);
...@@ -110,14 +111,14 @@ public class TalentToPDF { ...@@ -110,14 +111,14 @@ public class TalentToPDF {
// table.setBorder(unitedBorder); // table.setBorder(unitedBorder);
// 添加表格内容 // 添加表格内容
addTablePageCell(table, "申报人姓名:", dto.getProjName(), 2, null, bfChinese); addTablePageCell(table, "申报人姓名:", dto.getPersonName(), 2, null, bfChinese);
addTablePageCell(table, "从事专业:", dto.getAppUnitName(), null, 2, bfChinese); addTablePageCell(table, "从事专业:", dto.getProfessionName(), null, 2, bfChinese);
addTablePageCell(table, "单位名称:", dto.getAppUnitName(), null, 2, bfChinese); addTablePageCell(table, "单位名称:", dto.getAppUnitName(), null, 2, bfChinese);
addTablePageCell(table, "单位公章:", dto.getAppPersonName(), null, 2, bfChinese); addTablePageCell(table, "单位公章:","", null, 2, bfChinese);
document.add(table); document.add(table);
} }
private static void tableDescription(Document document, ComProjectTaskDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException { private static void tableDescription(Document document, ComTalentApplyDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException {
// 添加新页面 // 添加新页面
document.add(new AreaBreak()); document.add(new AreaBreak());
// 添加标题 // 添加标题
...@@ -145,7 +146,7 @@ public class TalentToPDF { ...@@ -145,7 +146,7 @@ public class TalentToPDF {
} }
} }
private static void basicInformation(Document document, ComProjectTaskDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException { private static void basicInformation(Document document, ComTalentApplyDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException {
// 添加新页面 // 添加新页面
document.add(new AreaBreak()); document.add(new AreaBreak());
// 添加段落标题 // 添加段落标题
...@@ -231,7 +232,7 @@ public class TalentToPDF { ...@@ -231,7 +232,7 @@ public class TalentToPDF {
document.add(table); document.add(table);
} }
private static void basicInformation1(Document document, ComProjectTaskDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException { private static void basicInformation1(Document document, ComTalentApplyDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException {
// 添加新页面 // 添加新页面
document.add(new AreaBreak()); document.add(new AreaBreak());
// 添加段落标题 // 添加段落标题
...@@ -245,7 +246,7 @@ public class TalentToPDF { ...@@ -245,7 +246,7 @@ public class TalentToPDF {
setParagraph(document, "申报人基本情况", bfChinese, 12f, true); setParagraph(document, "申报人基本情况", bfChinese, 12f, true);
} }
private static void basicInformation3(Document document, ComProjectTaskDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException { private static void basicInformation3(Document document, ComTalentApplyDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException {
// 添加新页面 // 添加新页面
document.add(new AreaBreak()); document.add(new AreaBreak());
// 添加段落标题 // 添加段落标题
...@@ -259,42 +260,42 @@ public class TalentToPDF { ...@@ -259,42 +260,42 @@ public class TalentToPDF {
setParagraph(document, "申报人基本情况", bfChinese, 12f, true); setParagraph(document, "申报人基本情况", bfChinese, 12f, true);
} }
private static void basicInformation5(Document document, ComProjectTaskDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException { private static void basicInformation5(Document document, ComTalentApplyDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException {
// 添加新页面 // 添加新页面
document.add(new AreaBreak()); document.add(new AreaBreak());
// 添加段落标题 // 添加段落标题
setParagraph(document, "申报人基本情况", bfChinese, 12f, true); setParagraph(document, "申报人基本情况", bfChinese, 12f, true);
} }
private static void basicInformation6(Document document, ComProjectTaskDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException { private static void basicInformation6(Document document, ComTalentApplyDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException {
// 添加新页面 // 添加新页面
document.add(new AreaBreak()); document.add(new AreaBreak());
// 添加段落标题 // 添加段落标题
setParagraph(document, "申报人基本情况", bfChinese, 12f, true); setParagraph(document, "申报人基本情况", bfChinese, 12f, true);
} }
private static void basicInformation7(Document document, ComProjectTaskDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException { private static void basicInformation7(Document document, ComTalentApplyDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException {
// 添加新页面 // 添加新页面
document.add(new AreaBreak()); document.add(new AreaBreak());
// 添加段落标题 // 添加段落标题
setParagraph(document, "申报人基本情况", bfChinese, 12f, true); setParagraph(document, "申报人基本情况", bfChinese, 12f, true);
} }
private static void basicInformation8(Document document, ComProjectTaskDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException { private static void basicInformation8(Document document, ComTalentApplyDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException {
// 添加新页面 // 添加新页面
document.add(new AreaBreak()); document.add(new AreaBreak());
// 添加段落标题 // 添加段落标题
setParagraph(document, "申报人基本情况", bfChinese, 12f, true); setParagraph(document, "申报人基本情况", bfChinese, 12f, true);
} }
private static void basicInformation9(Document document, ComProjectTaskDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException { private static void basicInformation9(Document document, ComTalentApplyDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException {
// 添加新页面 // 添加新页面
document.add(new AreaBreak()); document.add(new AreaBreak());
// 添加段落标题 // 添加段落标题
setParagraph(document, "申报人基本情况", bfChinese, 12f, true); setParagraph(document, "申报人基本情况", bfChinese, 12f, true);
} }
private static void basicInformation10(Document document, ComProjectTaskDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException { private static void basicInformation10(Document document, ComTalentApplyDTO dto, PdfFont bfChinese, PdfFont fsChinese) throws DocumentException {
// 添加新页面 // 添加新页面
document.add(new AreaBreak()); document.add(new AreaBreak());
// 添加段落标题 // 添加段落标题
......
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
<select id="getTaskAuditListByPage" resultType="com.yiboshi.science.param.dto.ComProjectAuditDTO"> <select id="getTaskAuditListByPage" resultType="com.yiboshi.science.param.dto.ComProjectAuditDTO">
SELECT SELECT
a.*,c.id proj_id,c.proj_name,c.proj_no,c.version_no,c.app_no,c.proj_class,b.start_date,b.end_date, a.*,c.id proj_id,c.proj_name,c.proj_no,c.version_no,c.app_no,c.proj_class,b.start_date,b.end_date,
c.proj_state, c.proj_state,b.contract,cd.download_url contractUrl,cd.file_name contractName,
b.is_unit_audit_pass,
d.unit_name app_unit_name,e.person_name app_person_name, d.unit_name app_unit_name,e.person_name app_person_name,
f.total_funding, f.gov_funding f.total_funding, f.gov_funding
FROM com_project_audit a FROM com_project_audit a
...@@ -51,6 +52,7 @@ ...@@ -51,6 +52,7 @@
left join com_project_basic f on c.id = f.proj_id left join com_project_basic f on c.id = f.proj_id
left join com_unit d on c.app_unit_id=d.id left join com_unit d on c.app_unit_id=d.id
left join com_person e on c.app_person_id=e.id left join com_person e on c.app_person_id=e.id
left join com_download cd on b.contract=cd.id
<where> <where>
${ew.sqlSegment} ${ew.sqlSegment}
</where> </where>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</sql> </sql>
<select id="getListByPage" resultType="com.yiboshi.science.param.dto.ComProjectTaskDTO"> <select id="getListByPage" resultType="com.yiboshi.science.param.dto.ComProjectTaskDTO">
select b.id,ifnull(b.task_state,0) task_state,b.start_date,b.end_date, select b.id,ifnull(b.task_state,0) task_state,b.start_date,b.end_date,
c.id as proj_id,c.proj_name,c.proj_no,c.version_no,c.proj_class,b.report_year,c.start_date proj_start,c.end_date proj_end, c.id as proj_id,b.contract,b.is_unit_audit_pass,c.proj_name,c.proj_no,c.version_no,c.proj_class,b.report_year,c.start_date proj_start,c.end_date proj_end,
c.proj_state,d.unit_name app_unit_name,e.person_name app_person_name c.proj_state,d.unit_name app_unit_name,e.person_name app_person_name
from com_project c from com_project c
left join com_project_task b on b.proj_id=c.id left join com_project_task b on b.proj_id=c.id
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
pt.id,pt.report_year,pt.start_date,pt.end_date,pt.unit_type,pt.organization_code,pt.unit_address,pt.registered_address,pt.post_code, pt.id,pt.report_year,pt.start_date,pt.end_date,pt.unit_type,pt.organization_code,pt.unit_address,pt.registered_address,pt.post_code,
pt.legal_person,pt.workforce,pt.specialized_personnel,pt.research_personnel, pt.legal_person,pt.workforce,pt.specialized_personnel,pt.research_personnel,
pt.deposit_bank,pt.bank_account,pt.deposit_bank_address,pt.interbank_number, pt.deposit_bank,pt.bank_account,pt.deposit_bank_address,pt.interbank_number,
pt.key_areas,pt.proj_work,pt.telephone,pt.fax, pt.key_areas,pt.proj_work,pt.telephone,pt.fax,pt.contract,co.id contractId,co.download_url contractUrl,co.file_name contractName,
pt.link_name,pt.link_mobile,pt.link_fax,pt.link_email, pt.link_name,pt.link_mobile,pt.link_fax,pt.link_email,
pt.is_technology_report,pt.project_report,pt.progress_report,pt.special_report,pt.final_report, pt.is_technology_report,pt.project_report,pt.progress_report,pt.special_report,pt.final_report,
a.proj_name,a.proj_no,a.start_date projStart,a.end_date projEnd,a.app_person_id,a.app_unit_id,a.system_type, a.proj_name,a.proj_no,a.start_date projStart,a.end_date projEnd,a.app_person_id,a.app_unit_id,a.system_type,
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
left join system_parameter b on a.knowledge_id=b.id and b.type_id=68 left join system_parameter b on a.knowledge_id=b.id and b.type_id=68
left join com_download c on ic.file_id=c.id left join com_download c on ic.file_id=c.id
left join com_person e on a.app_person_id=e.id left join com_person e on a.app_person_id=e.id
left join com_download co on pt.contract=co.id
where a.id = #{id} where a.id = #{id}
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment