fix
This commit is contained in:
parent
53b4bfb153
commit
4d760b8775
@ -1,5 +1,6 @@
|
||||
package com.lz.modules.app.controller;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.lz.common.emun.ChartFlowType;
|
||||
import com.lz.common.emun.WorkMsgTypeEnum;
|
||||
@ -24,10 +25,13 @@ import com.lz.modules.flow.req.ResultDetailReq;
|
||||
import com.lz.modules.flow.service.*;
|
||||
import com.lz.modules.job.business.DingtalkBusiness;
|
||||
import com.lz.modules.sys.controller.AbstractController;
|
||||
import com.lz.modules.sys.entity.Print;
|
||||
import com.lz.modules.sys.entity.SysUserEntity;
|
||||
import com.lz.modules.sys.entity.app.ResultComment;
|
||||
import com.lz.modules.sys.entity.app.ResultDetail;
|
||||
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||
import com.lz.modules.sys.service.PrintService;
|
||||
import com.lz.modules.sys.service.ResourceService;
|
||||
import com.lz.modules.sys.service.app.ResultCommentService;
|
||||
import com.lz.modules.sys.service.app.ResultDetailService;
|
||||
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||
@ -45,7 +49,9 @@ import java.lang.reflect.Method;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -111,6 +117,12 @@ public class ResultRecordController extends AbstractController {
|
||||
@Autowired
|
||||
private DingtalkBusiness dingtalkBusiness;
|
||||
|
||||
@Autowired
|
||||
private PrintService printService;
|
||||
|
||||
@Autowired
|
||||
private ResourceService resourceService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@ -1242,12 +1254,26 @@ public class ResultRecordController extends AbstractController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("导出绩效详情报表计划")
|
||||
@ApiOperation("保存绩效详情报表计划")
|
||||
@PostMapping("/recordDetailExplan")
|
||||
public R recordDetailExport(@RequestBody List<RecordDetailExplanReq> reqs){
|
||||
if(CollectionUtils.isEmpty(reqs)){
|
||||
return R.error("添加数据为空");
|
||||
}
|
||||
String time = LocalDate.now().toString();
|
||||
List<Print> prints = Lists.newArrayList();
|
||||
int i =1;
|
||||
for(RecordDetailExplanReq recordDetailExplanReq:reqs){
|
||||
Print print = new Print();
|
||||
BeanUtils.copyProperties(recordDetailExplanReq,print);
|
||||
print.setBatchNo(time + "_" + recordDetailExplanReq.getRecordId() + "_" + i++);
|
||||
print.setUrl("");
|
||||
prints.add(print);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*if(!printService.saveBatch(prints)){
|
||||
return R.error("保存失败");
|
||||
}*/
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.lz.modules.app.req;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@ -8,13 +10,15 @@ import lombok.Data;
|
||||
* @Date: 2020/12/4 11:27
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("保存导出计划")
|
||||
public class RecordDetailExplanReq {
|
||||
//绩效id
|
||||
@ApiModelProperty(value = "绩效id", name = "recordId")
|
||||
private Long recordId;
|
||||
|
||||
//是否导出图片
|
||||
private int image;
|
||||
|
||||
//是否打印
|
||||
private int print;
|
||||
//0不生成图片,1生成图片
|
||||
@ApiModelProperty(value = "0不生成图片,1生成图片", name = "isImage")
|
||||
private Integer isImage;
|
||||
//0不打印,1 打印
|
||||
@ApiModelProperty(value = "0不打印,1 打印", name = "isPrint")
|
||||
private Integer isPrint;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user