Commit 189775df by hzc

指标新增排序号和考核类别

parent ab22ba49
......@@ -115,6 +115,7 @@ public class DataEnterCtrl {
//查同期(精确值
List<TaskIndValue> indLastCorrectValues =
taskService.findDefaultValues(sameTermValueTimeStr,sameTermValueTimeStr, indIds);
list = genernateEditObjects(task, defaultValues, defaultLastValueValues,indLastCorrectValues, objs, groupObj.getObjType());
} else {
//查询精确值
......
......@@ -37,7 +37,7 @@ public class BaseIndDef {
private String code;//标识编码
private Integer catalogId;//挂靠目录id
private String catalogIdPath;//挂靠目录idPath,方便用目录类别找到对应的挂靠指标
private List<BaseIndDef> childrens = new ArrayList<>();//子基础项
private String formulaInfo;
......
......@@ -40,6 +40,8 @@ public class DriveIndDef {
private Date updateTime;
private Integer defStaTime;
private Integer defEndTime;
private Integer indNum;//指标序号 - 2021/8/17 hzc
private String checkType;//考核类型- 2021/8/17 hzc
private String formulaInfo;
}
......@@ -9,6 +9,9 @@ import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.keymobile.indicators.constant.Constants;
import com.keymobile.indicators.model.entity.indicators.DriveIndCatalog;
import com.keymobile.indicators.model.mapper.indmapper.DriveIndCatalogMapper;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -37,6 +40,9 @@ public class DriveIndDefService {
private ShortboardRuleMapper shortboardRuleMapper;
@Autowired
private IndicatorsRelService indRelService;
@Autowired
private DriveIndCatalogMapper driveIndCatalogMapper;
public String saveOrUpdate(DriveIndDef driveIndDef,String code,Integer catalogId,String catalogIdPath,
String user,String isUpdate,String shortboardIds)throws Exception{
//判断公式合法性
......@@ -47,6 +53,15 @@ public class DriveIndDefService {
if(StringUtils.isBlank(driveIndDef.getIndId())) {
throw new Exception("指标编号不能为空");
}
String[] idPathArr = catalogIdPath.split(Constants.SEP_NOUN);
String catalogPid = idPathArr[0];
if(idPathArr.length>1){
//上一级目录id
catalogPid=idPathArr[idPathArr.length-2];
}
DriveIndCatalog driveIndCatalog = driveIndCatalogMapper.selectByPrimaryKey(catalogPid);
driveIndDef.setIndLevel(driveIndCatalog.getCatalogName());
if("0".equals(isUpdate)) {//新建
DriveIndDef dbDriveIndDef = this.getById(driveIndDef.getIndId());
if(dbDriveIndDef!=null) {
......
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