Commit 48d8f735 authored by wangxl's avatar wangxl

1

parent 363094b2
......@@ -61,6 +61,10 @@ public class ComProjectAuditDTO extends BaseDTO {
@Length(max=36, message = "审核人不能大于36")
private String comPerson;
/** 审核人 */
@ApiModelProperty(value = "审核人", position = 10 )
@Length(max=36, message = "审核人不能大于36")
private String auditPersonName;
/** 审核类型 */
@ApiModelProperty(value = "项目状态", position = 41)
private String auditTypeName;
......@@ -78,6 +82,9 @@ public class ComProjectAuditDTO extends BaseDTO {
private String sex;
/** 职称名称 */
@ApiModelProperty(value = "职称名称", position = 13)
private String title;
/** 职称名称 */
@ApiModelProperty(value = "职称名称", position = 13)
private String titleName;
/** 专业名称 */
@ApiModelProperty(value = "专业名称", position = 14)
......
......@@ -15,6 +15,7 @@ import com.yiboshi.science.rest.BaseController;
import com.yiboshi.science.service.ComProjectAssignService;
import com.yiboshi.science.service.ComProjectAuditService;
import com.yiboshi.science.service.ComUnitService;
import com.yiboshi.science.service.SystemParameterService;
import com.yiboshi.science.utils.IDCardUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -49,6 +50,9 @@ public class ComProjectAuditController extends BaseController<ComProjectAuditSer
private final SystemProperties properties;
@Autowired
private SystemParameterService systemParameterService;
@Autowired
private ComUnitService comUnitService;
......@@ -139,7 +143,10 @@ public class ComProjectAuditController extends BaseController<ComProjectAuditSer
e.setCertId(hideAllIdCardNum(e.getCertId()));
if (null != e.getAuditResult())
e.setAuditResultName(CommonEnum.auditResult.getEnum(e.getAuditResult()).getDescription());
if (vo.getAuditMethod().equals(CommonEnum.auditMethod.last.getCode())) {
e.setTalentCategoryName(systemParameterService.getParaName(e.getTalentCategory()));
e.setTitleName(systemParameterService.getParaName(e.getTitle()));
e.setProfessionName(systemParameterService.getParaName(e.getProfession()));
if (vo.getAuditMethod().equals(CommonEnum.auditMethod.last.getCode()) && vo.getAuditType().equals(CommonEnum.auditType.project.getCode())) {
// e.setAssignList(comProjectAssignService.getAssignExpertList(e.getAuditObjectId()));
e.setAge(IDCardUtil.getAge(e.getCertId()));
BigDecimal total = new BigDecimal(0);
......
......@@ -146,17 +146,12 @@ public class ComProjectTaskController extends BaseController<ComProjectTaskServi
@PostMapping
public void export(@PathVariable String id) throws DocumentException, IOException {
try {
ComProjectTaskDTO dto = ComProjectTaskService.getTaskByProjId(id);
// WordUtils.getHtmlContent(dto, "C:\\Users\\kylin\\Desktop\\导出Pdf\\output.docx");
// 生成PDF文件字节数组
// byte[] pdfBytes = TaskInfoToPDFUtil.createContractPdf(dto);
// byte[] pdfBytes = TaskToPDF.createContractPdf(dto);
byte[] pdfBytes = TalentToPDF.createContractPdf(dto);
byte[] pdfBytes = TaskInfoToPDFUtil.createContractPdf(dto);
// byte[] pdfBytes = TaskToPDF.createContractPdf(dto);
// byte[] pdfBytes = TalentToPDF.createContractPdf(dto);
// 设置响应头
response.setContentType("application/pdf");
String fileName = new String((dto.getProjName() + ".pdf").getBytes("UTF-8"), "ISO-8859-1");
......
......@@ -51,9 +51,13 @@ public class ComTalentApplyController extends BaseController<ComTalentApplyServi
page.getDataList().forEach((e) -> {
e.setCertId(hideAllIdCardNum(e.getCertId()));
e.setMobile(hideAllPhoneNum(e.getMobile()));
//e.setCertId(AesHelper.encrypt(e.getCertId()));
if (null != e.getTalentState())
if (null != e.getTalentState()) {
e.setTalentStateName(CommonEnum.talentState.getEnum(e.getTalentState()).getDescription());
if (e.getTalentState() >= 20 && !e.getTalentState().equals(30)) {
e.setTalentStateName("已上报");
e.setTalentState(20);
}
}
});
}
......
......@@ -88,7 +88,7 @@ public class ComProjectAuditNoteServiceImpl extends BaseServiceImpl<ComProjectAu
comProjectAuditNote.setAuditDate(auditDate);
comProjectAuditNote.setUnitLevel(unitLevel);
comProjectAuditNote.setShowIndex(showIndex);
comProjectAuditNote.setComPerson(comPerson);
// comProjectAuditNote.setComPerson(comPerson);
this.insert(comProjectAuditNote);
}
......
......@@ -460,7 +460,7 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
comProjectAudit.setAuditDate(auditDate);
comProjectAudit.setUnitLevel(unitLevel);
comProjectAudit.setShowIndex(showIndex);
comProjectAudit.setComPerson(comPerson);
// comProjectAudit.setComPerson(comPerson);
this.insert(comProjectAudit);
}
......
......@@ -154,6 +154,17 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
public ComProjectTaskDTO getTaskByProjId(String projId) {
ComProjectTaskDTO dto = ComProjectTaskDAO.getByProjId(projId);
BigDecimal total = new BigDecimal(0);
BigDecimal gov = new BigDecimal(0);
BigDecimal self = new BigDecimal(0);
if (Objects.nonNull(dto.getTotalFunding())) {
total = dto.getTotalFunding();
}
if (Objects.nonNull(dto.getGovFunding())) {
gov = dto.getGovFunding();
}
self = total.subtract(gov);
dto.setSelfFunding(self);
//申报单位
ComUnitDTO comUnitDTO = comUnitService.getUnitById(dto.getAppUnitId());
if (null != comUnitDTO) {
......
......@@ -12,6 +12,7 @@ import com.yiboshi.science.enumeration.CommonEnum;
import com.yiboshi.science.param.dto.*;
import com.yiboshi.science.param.query.ComTalentApplyQueryVO;
import com.yiboshi.science.service.*;
import com.yiboshi.science.utils.StringUtil;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -300,8 +301,12 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
//审核记录列表
List<ComProjectAuditNoteDTO> auditList = comProjectAuditNoteService.getListByObjectId(dto.getId());
if (!StringUtil.isContainsRole(SecurityUserHolder.getRoles(), CommonEnum.systemRole.topGov.getCode().toString())) {
List<ComProjectAuditNoteDTO> filterList = auditList.stream().filter(e -> !e.getUnitLevel().equals(1) || (e.getUnitLevel().equals(1) && e.getAuditResult().equals(CommonEnum.auditResult.returnModify.getCode()))).collect(Collectors.toList());
dto.setAuditList(filterList);
return dto;
}
dto.setAuditList(auditList);
return dto;
}
......
......@@ -82,9 +82,11 @@ public class SystemParameterServiceImpl extends BaseServiceImpl<SystemParameterD
@Override
public String getParaName(String Id) {
String name = "";
SystemParameter systemParameter = getParameterById(Id);
if (null != systemParameter && Objects.nonNull(systemParameter.getName()))
name = systemParameter.getName();
if (Objects.nonNull(Id)) {
SystemParameter systemParameter = getParameterById(Id);
if (null != systemParameter && Objects.nonNull(systemParameter.getName()))
name = systemParameter.getName();
}
return name;
}
......
......@@ -97,17 +97,18 @@
<select id="getTalentAuditListByPage" resultType="com.yiboshi.science.param.dto.ComProjectAuditDTO">
SELECT
a.*,c.id talent_id,c.total_score,c.average_score,c.total_fund totalFunding,c.talent_category,l.name as talent_category_name,
e.cert_id, e.person_name, e.sex, e.mobile, e.duty, e.title, e.spec, i.name as title_name, j.name as profession_name,
a.*,c.id talent_id,c.total_score,c.average_score,c.total_fund totalFunding,c.talent_category,
e.cert_id, e.person_name, e.sex, e.mobile, e.duty, e.title, e.spec, e.profession,
cp.person_name audit_person_name,
d.unit_name app_unit_name, (case when g.unit_name = d.unit_name then '直属' else REPLACE(g.unit_name,'卫生健康局','') end) as upUnitName
FROM com_project_audit a
left join com_talent_apply c on a.audit_object_id = c.id
left join com_person e on c.person_id = e.id
left join com_unit d on c.app_unit_id = d.id
left join com_unit g on substring(d.tree_code, 1, 10) = g.tree_code
left join system_parameter i on e.title = i.id and i.type_id = 7
left join system_parameter j on e.profession = j.id and j.type_id = 69
left join system_parameter l on c.talent_category = l.id and l.type_id = 21
left join system_parameter p on e.profession = p.id
left join system_parameter p1 on p.parent_id = p1.id
left join com_person cp on a.com_person=cp.id
<where>
${ew.sqlSegment}
</where>
......
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