Selaa lähdekoodia

劳务费导出增加费用标准

tags/24080901
WendyYang 1 vuosi sitten
vanhempi
commit
3147111374
4 muutettua tiedostoa jossa 23 lisäystä ja 6 poistoa
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingExportController.java
  2. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/LaborFeeAuditTableDTO.java
  3. +19
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertExportManage.java
  4. +1
    -1
      pmapi/src/main/resources/template/劳务费发放.ftl

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingExportController.java Näytä tiedosto

@@ -29,7 +29,7 @@ public class MeetingExportController {
private final ExpertExportManage expertExportManage;


@GetMapping("/expertFee/{meetingId}")
@GetMapping("/expertFeeTable/{meetingId}")
@ApiOperation("专家费用单导出")
public void exportFeeForExpert(@PathVariable Long meetingId, HttpServletResponse response) {
expertExportManage.exportFeeForExpert(meetingId, response);


+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/LaborFeeAuditTableDTO.java Näytä tiedosto

@@ -23,4 +23,6 @@ public class LaborFeeAuditTableDTO {

private List<ExpertInfoDTO> experts;

private String meetingUsageTime;

}

+ 19
- 4
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertExportManage.java Näytä tiedosto

@@ -21,7 +21,7 @@ import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.ningdatech.pmapi.sms.utils.DateUtil;
import freemarker.template.TemplateException;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@@ -31,8 +31,8 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function;

/**
* <p>
@@ -44,7 +44,7 @@ import java.util.concurrent.atomic.AtomicInteger;
**/
@Slf4j
@Component
@AllArgsConstructor
@RequiredArgsConstructor
public class ExpertExportManage {

private final IMeetingService meetingService;
@@ -54,6 +54,20 @@ public class ExpertExportManage {
private final IExpertUserFullInfoService expertUserInfoService;
private final IProjectService projectService;

//==================================================================================================================

static Function<Integer, String> meetingUsageTime = (type) -> {
if (1 == type) {
return "半天";
}
if (2 == type) {
return "一天";
}
return StrUtil.EMPTY;
};

//==================================================================================================================

public void exportFeeForExpert(Long meetingId, HttpServletResponse response) {
final String template = "专家费.ftl";
String fileName = UUID.randomUUID().toString(true) + ".doc";
@@ -137,6 +151,7 @@ public class ExpertExportManage {
Meeting meeting = meetingService.getById(meetingId);
LaborFeeAuditTableDTO data = new LaborFeeAuditTableDTO();
data.setMeetingTime(DateUtil.localDateTimeFormat(meeting.getStartTime(), "yyyy-MM-dd HH:mm"));
data.setMeetingUsageTime(meetingUsageTime.apply(meeting.getMeetingUsageTime()));
List<String> projectNames = new ArrayList<>();
if (meeting.getIsInnerProject()) {
List<MeetingInnerProject> inners = meetingInnerProjectService.listByMeetingId(meetingId);
@@ -178,7 +193,7 @@ public class ExpertExportManage {
Meeting meeting = meetingService.getById(meetingId);
ExpertInviteTableDTO data = new ExpertInviteTableDTO();
data.setMeetingTime(DateUtil.localDateTimeFormat(meeting.getStartTime(), "yyyy-MM-dd HH:mm"));
data.setMeetingUsageTime(Objects.equals(1, meeting.getMeetingUsageTime()) ? "半天" : "一天");
data.setMeetingUsageTime(meetingUsageTime.apply(meeting.getMeetingUsageTime()));
data.setMeetingCreateBy(meeting.getCreator());
data.setMeetingAddress(meeting.getMeetingAddress());
if (meeting.getIsInnerProject()) {


+ 1
- 1
pmapi/src/main/resources/template/劳务费发放.ftl Näytä tiedosto

@@ -599,7 +599,7 @@
<w:sz-cs w:val="21"/></w:rPr></w:pPr>
<w:r><w:rPr><w:rFonts w:ascii="宋体" w:h-ansi="宋体" w:fareast="宋体" w:cs="宋体" w:hint="default"/><w:spacing
w:val="4"/><w:sz w:val="21"/><w:sz-cs w:val="21"/></w:rPr>
<w:t>半天</w:t></w:r></w:p></w:tc>
<w:t>${meetingUsageTime}</w:t></w:r></w:p></w:tc>
<w:tc><w:tcPr><w:tcW w:w="1538" w:type="dxa"/><w:shd w:val="clear" w:color="auto" w:fill="auto"/><w:vAlign
w:val="top"/></w:tcPr>
<w:p><w:pPr><w:spacing w:before="247" w:line="183" w:line-rule="auto"/><w:jc w:val="center"/><w:rPr><w:rFonts w:ascii="宋体" w:h-ansi="宋体" w:fareast="宋体" w:cs="宋体" w:hint="default"/>


Loading…
Peruuta
Tallenna