Commit 1f85b706 by hzc

测试运算时改善提升报错

parent 1cabeffc
......@@ -374,7 +374,10 @@ public class DataEnterCtrl {
String indName=ind.getIndName();
//模板保存时指标名字加上了单位,去掉 hzc
if(StringUtils.isNotBlank(ind.getIndName())){
indName= indName.substring(0,indName.lastIndexOf("("));
int i = indName.lastIndexOf("(");
if(i!=-1){
indName= indName.substring(0,i);
}
}
value.setIndName(indName);
value.setIndSource(ind.getIndSource());
......@@ -573,6 +576,19 @@ public class DataEnterCtrl {
@ApiOperation("查询中间表的值(填报点击获取中间数据)")
@PostMapping("findOldValueToEdit")
public List<TaskIndValue> findOldValueToEdit(@RequestBody List<TaskIndValue> values,@RequestParam("taskId") String taskId) {
Set<String> indIds = new HashSet<>();
Set<String> objIds = new HashSet<>();
for (TaskIndValue value : values) {
indIds.add(value.getIndId());
objIds.add(value.getObjId());
}
//通过指标id和单位id去查填报值
Map<String,Object> maps = new HashMap<>();
maps.put("indIds",indIds);
maps.put("objIds",objIds);
//taskid不能保存、、要换
List<TaskIndValueTmp> tmpValues= taskService.findOldValueToEdit(taskId);
for (TaskIndValue value : values) {
for (TaskIndValueTmp tmpValue : tmpValues) {
......
......@@ -266,12 +266,12 @@ public class ExcelTempCtrl {
// .autoCloseStream(false).sheet(0,"数据填报").doWrite(datas);
WriteSheet one = EasyExcel.writerSheet(0, "数据填报").head(headers).build();
Map<String,List<List<String>>> towDataMap = getTwoData(template);
// Map<String,List<List<String>>> towDataMap = getTwoData(template);
List<List<String>> headers2 = towDataMap.get("headers");
WriteSheet two = EasyExcel.writerSheet(1, "同期历史口径值").head(headers2).build();
// List<List<String>> headers2 = towDataMap.get("headers");
// WriteSheet two = EasyExcel.writerSheet(1, "同期历史口径值").head(headers2).build();
build.write(datas,one);
build.write(towDataMap.get("datas"),two);
//build.write(towDataMap.get("datas"),two);
build.finish();
} catch (Exception e) {
log.error("生成excel模板出错" , e);
......
......@@ -39,7 +39,7 @@ public class QueryTaskParam {
@ApiModelProperty("任务状态:1、填报中 2、审批中 3、审核通过 4、驳回")
private Integer status;
@ApiModelProperty("任务状态数组:1、填报中 2、审批中 3、审核通过 4、驳回 5 任务下发")
@ApiModelProperty("任务状态数组:1、填报中 2、审批中 3、审核通过 4、确认通过 5 任务下发")
private List<Integer> statusArr;
@ApiModelProperty("归属部门,对应数据项的归属部门")
......
......@@ -325,9 +325,12 @@ public class IndScorecardService {
//考虑同期分组有变的情况,把组内成原同期的指标值拿出来再进行排名
Map<String,String> values = new HashMap<>();
for(String compareObj : compareObjs) {
// DriveIndCalResultDef sameCompareObjResult = driveIndCalResultDefMapper
// .findByIndIdAndDateAndCompareObj(current.getIndId(),
// (current.getDate()-100), compareObj,code);
DriveIndCalResultDef sameCompareObjResult = driveIndCalResultDefMapper
.findByIndIdAndDateAndCompareObj(current.getIndId(),
(current.getDate()-100), compareObj,code);
.findByIndIdAndDateAndCompareObjAndCompareCatalog(current.getIndId(),
(current.getDate()-100), compareObj,code,current.getCompareCatalog(),current.getDateMark());
if(sameCompareObjResult!=null) {
values.put(compareObj, sameCompareObjResult.getValue());
}else {
......
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