Commit 189775df by hzc

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

parent ab22ba49
...@@ -115,6 +115,7 @@ public class DataEnterCtrl { ...@@ -115,6 +115,7 @@ public class DataEnterCtrl {
//查同期(精确值 //查同期(精确值
List<TaskIndValue> indLastCorrectValues = List<TaskIndValue> indLastCorrectValues =
taskService.findDefaultValues(sameTermValueTimeStr,sameTermValueTimeStr, indIds); taskService.findDefaultValues(sameTermValueTimeStr,sameTermValueTimeStr, indIds);
list = genernateEditObjects(task, defaultValues, defaultLastValueValues,indLastCorrectValues, objs, groupObj.getObjType()); list = genernateEditObjects(task, defaultValues, defaultLastValueValues,indLastCorrectValues, objs, groupObj.getObjType());
} else { } else {
//查询精确值 //查询精确值
......
...@@ -41,5 +41,7 @@ public class DriveIndDef { ...@@ -41,5 +41,7 @@ public class DriveIndDef {
private Integer defStaTime; private Integer defStaTime;
private Integer defEndTime; private Integer defEndTime;
private Integer indNum;//指标序号 - 2021/8/17 hzc
private String checkType;//考核类型- 2021/8/17 hzc
private String formulaInfo; private String formulaInfo;
} }
...@@ -9,6 +9,9 @@ import java.util.Map; ...@@ -9,6 +9,9 @@ import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; 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.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -37,6 +40,9 @@ public class DriveIndDefService { ...@@ -37,6 +40,9 @@ public class DriveIndDefService {
private ShortboardRuleMapper shortboardRuleMapper; private ShortboardRuleMapper shortboardRuleMapper;
@Autowired @Autowired
private IndicatorsRelService indRelService; private IndicatorsRelService indRelService;
@Autowired
private DriveIndCatalogMapper driveIndCatalogMapper;
public String saveOrUpdate(DriveIndDef driveIndDef,String code,Integer catalogId,String catalogIdPath, public String saveOrUpdate(DriveIndDef driveIndDef,String code,Integer catalogId,String catalogIdPath,
String user,String isUpdate,String shortboardIds)throws Exception{ String user,String isUpdate,String shortboardIds)throws Exception{
//判断公式合法性 //判断公式合法性
...@@ -47,6 +53,15 @@ public class DriveIndDefService { ...@@ -47,6 +53,15 @@ public class DriveIndDefService {
if(StringUtils.isBlank(driveIndDef.getIndId())) { if(StringUtils.isBlank(driveIndDef.getIndId())) {
throw new Exception("指标编号不能为空"); 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)) {//新建 if("0".equals(isUpdate)) {//新建
DriveIndDef dbDriveIndDef = this.getById(driveIndDef.getIndId()); DriveIndDef dbDriveIndDef = this.getById(driveIndDef.getIndId());
if(dbDriveIndDef!=null) { 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