Commit 83ca9adc by zhangkb

整理衡阳对标系统代码,新建基础项和指标项实体保存,将之前的实体映射改为新的实体映射

parent 51d94765
......@@ -19,11 +19,9 @@ import com.keymobile.indicators.akka.message.IndGetValueMsg;
import com.keymobile.indicators.akka.message.IndValueMsg;
import com.keymobile.indicators.akka.message.specific.DriveIndAverageAndRankMsg;
import com.keymobile.indicators.model.entity.DriveIndCalResult;
import com.keymobile.indicators.model.entity.IndAcsDef;
import com.keymobile.indicators.model.entity.IndAcsScoreInfo;
import com.keymobile.indicators.service.cmbkpi.IndAcsDefService;
import com.keymobile.indicators.service.cmbkpi.IndAcsScoreInfoService;
import com.keymobile.indicators.model.entity.indicators.DriveIndDef;
import com.keymobile.indicators.service.hytobacco.DriveIndCalResultService;
import com.keymobile.indicators.service.hytobacco.DriveIndDefService;
import com.keymobile.indicators.utils.SpringUtil;
import akka.actor.AbstractActor;
......@@ -34,9 +32,7 @@ public class DriveIndCalculateActor extends AbstractActor{
private Logger logger = LoggerFactory.getLogger(DriveIndCalculateActor.class);
private IndAcsDefService indAcsDefService = SpringUtil.getBean(IndAcsDefService.class);
private IndAcsScoreInfoService indAcsScoreInfoService = SpringUtil.getBean(IndAcsScoreInfoService.class);
private DriveIndDefService driveIndDefService = SpringUtil.getBean(DriveIndDefService.class);
private DriveIndCalResultService driveIndCalResultService = SpringUtil.getBean(DriveIndCalResultService.class);
......@@ -90,16 +86,14 @@ public class DriveIndCalculateActor extends AbstractActor{
List<String> indIdList = new ArrayList<>();
IndAcsDef indAcsDef = indAcsDefService.getById(driveIndId);
unit = indAcsDef.getUnt();
indType = indAcsDef.getIndType();
markType = indAcsDef.getMarkType();
DriveIndDef driveIndDef = driveIndDefService.getById(driveIndId);
unit = driveIndDef.getIndUnit();//指标单位
indType = driveIndDef.getIndType();//指标类型:正向 反向
markType = driveIndDef.getIndCalScoreRule();//指标评分规则
List<IndAcsScoreInfo> acsSoreInfoList = indAcsScoreInfoService.getListByIndId(
driveIndId);
//获取考核指标的公式
driveIndFormula = acsSoreInfoList.get(0).getScoreFormula();
averageDriveIndFormula = acsSoreInfoList.get(0).getScoreFormula();
driveIndFormula = driveIndDef.getIndFormat();
averageDriveIndFormula = driveIndDef.getIndFormat();
Pattern p = Pattern.compile("(\\[[^\\]]*\\])");
Matcher m = p.matcher(driveIndFormula);
......
......@@ -12,8 +12,8 @@ import com.keymobile.indicators.akka.message.specific.DriveIndAverageAndRankMsg;
import com.keymobile.indicators.akka.message.specific.DriveIndCalculateRegionMsg;
import com.keymobile.indicators.model.entity.DimValue;
import com.keymobile.indicators.model.entity.DriveIndCalResult;
import com.keymobile.indicators.service.cmbkpi.IndAcsScoreInfoService;
import com.keymobile.indicators.service.hytobacco.DriveIndCalResultService;
import com.keymobile.indicators.service.hytobacco.DriveIndDefService;
import com.keymobile.indicators.service.hytobacco.IndScorecardService;
import com.keymobile.indicators.utils.CalculateUtils;
import com.keymobile.indicators.utils.SpringUtil;
......@@ -28,7 +28,7 @@ public class DriveIndCalculateRegionActor extends AbstractActor{
private IndScorecardService indScorecardService = SpringUtil.getBean(IndScorecardService.class);
private IndAcsScoreInfoService indAcsScoreInfoService = SpringUtil.getBean(IndAcsScoreInfoService.class);
private DriveIndDefService driveIndDefService = SpringUtil.getBean(DriveIndDefService.class);
private int numberOfConfirm = 0;//定义返回确认消息的子actor
......@@ -88,7 +88,7 @@ public class DriveIndCalculateRegionActor extends AbstractActor{
}
//算组内平均数
//String average = CalculateUtils.averageValue(values);
String average = indAcsScoreInfoService.calGroupAverage(
String average = driveIndDefService.calGroupAverage(
driveIndAverageAndRankMsg.getIndFormula(), compareObjs,
driveIndAverageAndRankMsg.getDate());
......
package com.keymobile.indicators.api.cmbkpi;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.keymobile.indicators.model.entity.IndAcsDef;
import com.keymobile.indicators.service.cmbkpi.IndAcsDefService;
import com.keymobile.indicators.utils.DateUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@Api(tags={"考核指标接口"})
@RestController
@RequestMapping(value = "/indAcs")
public class IndAcsDefCtrl {
@Autowired
private IndAcsDefService indAcsDefService;
@ApiOperation(value = "获取所有考核指标定义", notes = "获取所有考核指标定义")
@PostMapping(value = "/getAll")
public List<IndAcsDef> getAll()throws Exception{
return indAcsDefService.getAll();
}
@ApiOperation(value = "根据指标id(编码)获取分析指标", notes = "根据指标id(编码)获取分析指标")
@PostMapping(value = "/getById")
public IndAcsDef getById(@RequestParam("id")String id){
return indAcsDefService.getById(id);
}
@ApiOperation(value = "保存或修改分析指标", notes = "保存或修改分析指标")
@PostMapping(value = "/saveOrUpdate")
public String saveOrUpdate(@RequestBody IndAcsDef indAcsDef,
@RequestParam(required=false) String defTime,
@RequestParam(required=false) String updTime) throws Exception{
if(StringUtils.isNotBlank(defTime)) {
Date defDate = DateUtils.getDate(defTime, "yyyy-MM-dd HH:mm:ss");
indAcsDef.setDefTime(defDate);
}
if(StringUtils.isNotBlank(updTime)) {
Date updDate = DateUtils.getDate(updTime, "yyyy-MM-dd HH:mm:ss");
indAcsDef.setUpdTime(updDate);
}
return indAcsDefService.saveOrUpdate(indAcsDef);
}
@ApiOperation(value = "删除考核指标", notes = "删除考核指标")
@PostMapping(value = "/delete")
public void delete(@RequestParam String indId) throws Exception{
indAcsDefService.delete(indId);
}
@ApiOperation(value = "根据关键字分页获取考核指标列表(page:0 开始)", notes = "根据关键字分页获取考核指标列表(page:0 开始)")
@PostMapping(value = "/getPageListByKeyword")
public Map<String,Object> getPageListByKeyword(
@RequestParam(required=false) String keyword,
@RequestParam int page,
@RequestParam int rows) throws Exception{
return indAcsDefService.getByPageAndKeyword(keyword, page, rows);
}
}
package com.keymobile.indicators.api.cmbkpi;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.keymobile.indicators.model.entity.IndAcsScoreInfo;
import com.keymobile.indicators.model.entity.IndRelTree;
import com.keymobile.indicators.service.cmbkpi.IndAcsScoreInfoService;
import com.keymobile.indicators.utils.DateUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@Api(tags={"考核指标计分信息接口"})
@RestController
@RequestMapping(value = "/indAcsScore")
public class IndAcsScoreInfoCtrl {
@Autowired
private IndAcsScoreInfoService indAscScoreService;
@ApiOperation(value = "保存考核指标计分信息", notes = "保存考核指标计分信息")
@PostMapping(value = "/save")
public String save(@RequestBody IndAcsScoreInfo indAcsScoreInfo,
@RequestParam String updTime) throws Exception{
if(StringUtils.isNotBlank(updTime)) {
Date updDate = DateUtils.getDate(updTime, "yyyy-MM-dd HH:mm:ss");
indAcsScoreInfo.setUpdateTime(updDate);
}
return indAscScoreService.save(indAcsScoreInfo);
}
@ApiOperation(value = "删除考核指标计分信息", notes = "删除考核指标计分信息")
@PostMapping(value = "/delete")
public void delete(@RequestParam String orgId,
@RequestParam String indId,@RequestParam String indAttrId) throws Exception{
indAscScoreService.delete(orgId, indId, indAttrId);
}
@ApiOperation(value = "根据考核指标编号获取计分信息", notes = "根据考核指标编号获取计分信息")
@PostMapping(value = "/getListByIndId")
public List<IndAcsScoreInfo> getListByIndId(@RequestParam String indId) throws Exception{
return indAscScoreService.getListByIndId(indId);
}
@ApiOperation(value = "根据组织机构,指标id和指标类型获取考核指标计分信息", notes = "根据组织机构,指标id和指标类型获取考核指标计分信息")
@PostMapping(value = "/selectOne")
public IndAcsScoreInfo selectOne(@RequestParam String orgId,
@RequestParam String indId,@RequestParam String indAttrId) throws Exception{
return indAscScoreService.selectOneByOrgIdAndIndidAndIndtype(orgId, indId, indAttrId);
}
@ApiOperation(value = "根据关键字和类型获取考核指标或者分析指标(type:0 分析指标;1 考核指标)",
notes = "根据关键字和类型获取考核指标或者分析指标(type:0 分析指标;1 考核指标)")
@PostMapping(value = "/getIndByKeywordAndType")
public List<Map<String,Object>> getIndByKeywordAndType(
@RequestParam(required=false) String keyword,
@RequestParam(required=false) String type) throws Exception{
return indAscScoreService.getIndByKeywordAndType(keyword, type);
}
@ApiOperation(value = "分析考核指标公式脑图",notes = "分析考核指标公式脑图")
@PostMapping(value = "/analysisIndTree")
public IndRelTree analysisIndTree(@RequestParam String orgId,
@RequestParam String indId,@RequestParam String indAttrId) throws Exception{
return indAscScoreService.analysisIndTree(orgId, indId, indAttrId);
}
}
package com.keymobile.indicators.api.cmbkpi;
import java.util.Date;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.keymobile.indicators.model.entity.IndAnaDef;
import com.keymobile.indicators.service.cmbkpi.IndAnaDefService;
import com.keymobile.indicators.utils.DateUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@Api(tags={"分析指标接口"})
@RestController
@RequestMapping(value = "/indAna")
public class IndAnaDefCtrl {
@Autowired
private IndAnaDefService indAnaDefService;
@ApiOperation(value = "保存或修改分析指标(defTime和updTime格式:yyyy-MM-dd HH:mm:ss)",
notes = "保存或修改分析指标(defTime和updTime格式:yyyy-MM-dd HH:mm:ss)")
@PostMapping(value = "/saveOrUpdate")
public String saveOrUpdate(@RequestBody IndAnaDef indAnaDef,
@RequestParam(required=false) String defTime,
@RequestParam(required=false) String updTime) throws Exception{
if(StringUtils.isNotBlank(defTime)) {
Date defDate = DateUtils.getDate(defTime, "yyyy-MM-dd HH:mm:ss");
indAnaDef.setDefTime(defDate);
}
if(StringUtils.isNotBlank(updTime)) {
Date updDate = DateUtils.getDate(updTime, "yyyy-MM-dd HH:mm:ss");
indAnaDef.setUpdTime(updDate);
}
return indAnaDefService.saveOrUpdate(indAnaDef);
}
@ApiOperation(value = "删除分析指标", notes = "删除分析指标")
@PostMapping(value = "/delete")
public void delete(@RequestParam String indId) throws Exception{
indAnaDefService.delete(indId);
}
@ApiOperation(value = "根据关键字分页获取分析指标列表(page:0 开始)", notes = "根据关键字分页获取分析指标列表(page:0 开始)")
@PostMapping(value = "/getPageListByKeyword")
public Map<String,Object> getPageListByKeyword(
@RequestParam(required=false) String keyword,
@RequestParam int page,
@RequestParam int rows) throws Exception{
return indAnaDefService.getByPageAndKeyword(keyword, page, rows);
}
}
package com.keymobile.indicators.api.hytobacco;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -52,7 +51,7 @@ public class IndScorecardCtrl {
@PostMapping(value = "/calculateIndiScore")
public Map<String,String> calculateIndiScore(@RequestParam String indId,@RequestParam int date,
@RequestParam String compareObj,@RequestParam String indScorecardId,
@RequestParam String compareId,@RequestBody List<String> compareObjs) {
@RequestParam String compareId,@RequestBody List<String> compareObjs) throws Exception{
return indScorecardService.calculateIndiScore(indId, date, compareObj,
indScorecardId,compareId,compareObjs);
}
......
package com.keymobile.indicators.model.entity;
import java.util.Date;
import javax.persistence.Table;
import lombok.Data;
/**
* author:zhangkb time:2020-4-15 desc:系统通用参数表
*/
@Data
@Table(name="gen_general_parm")
public class GeneralParm {
private String rootParmId;//根参数ID
private String prnParmId;//父参数ID
private String subParmId;//子参数ID
private String parmNm;//参数名
private String cmt;//备注
private String updUserId;//更新人用户编号
private Date updTime;//更新时间
}
package com.keymobile.indicators.model.entity;
import javax.persistence.Table;
import lombok.Data;
/**
* author:zhangkb time:2020-4-15 desc:考核指标数据表
*/
@Data
@Table(name="ind_acs_ind_data_stat")
public class IndAcsData {
private String dwStatDt;//统计日期
private Integer statMonId;//统计月份
private String orgId;//机构编号
private String indId;//指标编号
private String indName;//指标名称
private String indType;//指标类型
private Double statVal;//统计值
}
package com.keymobile.indicators.model.entity;
import lombok.Data;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
/**
* author:zhangkb time:2020-4-15 desc:考核指标定义表
*/
@Table(name="ind_acs_ind_def_inf")
@Data
public class IndAcsDef {
@Id
private String indId;//指标编号
private String indName;//指标名称
private String indTypeCd;//指标类型代码1 纯系统直接出数2 系统+手工3 纯手工上传4.系统衍生(从关系类)
private String indType;//指标类型1 纯系统直接出数2 系统+手工3 纯手工上传4.系统衍生(从关系类)
private String acsSysCd;//考核体系代码
private String acsSysName;//考核体系
private String acsDimCd;//考核维度代码
private String acsDimName;//考核维度
private String undType;//单位类型
private String unt;//单位
private String markTypeCd;//计分类型代码
private String markType;//计分类型
private String freqCd;//频率代码
private String freqName;//频率名称
private Double weight;//权重
private String cltCmt;//口径说明(汉字描述)
private String markRule;//计分规则(汉字描述)
private String dataSrc;//数据来源
private String dataHbr;//数据粒度
private String isValid;//是否有效
private String defUserId;//定义人用户编号
private Date defTime;//定义时间
private String updUserId;//更新人用户编号
private Date updTime;//更新时间
}
package com.keymobile.indicators.model.entity;
import java.util.Date;
import javax.persistence.Table;
import lombok.Data;
/**
* author:zhangkb time:2020-4-15 desc:考核指标计分信息表
*/
@Data
@Table(name="indsch_kpi_score_info")
public class IndAcsScoreInfo {
private Integer appraisalsDate;//考核月份
private String orgId;//机构编号
private String orgName;//机构名称
private String indexId;//考核指标编号
private String indexAttrId;//指标属性编号001 目标002 市场003 实际值004 参考值…
private String scoreMode;//计分方式
private String scoreFormula;//计分公式
private Double weight;// double comment "权重"
private String isValid;//是否有效Y N
private String updateUserId;//更新人id
private String updateUserName;//更新人姓名
private Date updateTime;//更新时间
}
package com.keymobile.indicators.model.entity;
import java.util.Date;
import javax.persistence.Table;
import lombok.Data;
/**
* author:zhangkb time:2020-4-15 desc:分析指标数据表
*/
@Data
@Table(name="ind_ana_ind_data_stat")
public class IndAnaData {
private Date dwStatDt;//统计日期
private Integer statMonId;//统计月份
private String indId;//指标编号
private String indType;//指标类型
private String indName;//指标名称
private String orgId;//机构编号
private Double statVal;//统计值
}
package com.keymobile.indicators.model.entity;
import java.util.Date;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.Data;
/**
* author:zhangkb time:2020-4-15 desc:分析指标定义表
*/
@Data
@Table(name="ind_ana_ind_def_inf")
public class IndAnaDef {
@Id
private String indId;//指标编号
private String indName;//指标名称
private String indTypeCd;//指标类型代码
private String indType;//指标类型
private String cltCmt;//口径说明(汉字描述)
private String undType;//单位类型
private String unt;//单位
private String dataHbr;//数据粒度
private String isValid;//是否有效
private String defUserId;//定义人用户编号
private Date defTime;//定义时间
private String updUserId;//更新人用户编号
private Date updTime;//更新时间
private Integer defStaTime;//生效开始年月
private Integer defEndTime;//生效结束年月
private String srcTypCd;//来源类型
}
package com.keymobile.indicators.model.entity;
import javax.persistence.Table;
import lombok.Data;
/**
* author:zhangkb time:2020-4-15 desc:指标层级关系表
*/
@Data
@Table(name="ind_index_hbr_rel_inf")
public class IndRelInf {
private Integer relId;//关系id
private String subIndId;//子指标编号
private String subIndName;//子指标名称
private String subIndType;//子指标类型
private String parIndId;//父指标编号
private String parIndName;//父指标名称
private String parIndType;//父指标类型
private Integer relHbr;//关系层级
}
package com.keymobile.indicators.model.entity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class IndRelTree {
private Double weight;
private String indId;
private String indName;
private String indAttrId;
private String type;
private List<IndRelTree> children = new ArrayList<>();
}
package com.keymobile.indicators.model.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import com.keymobile.indicators.model.entity.GeneralParm;
@Mapper
public interface GeneralParmMapper {
public List<GeneralParm> getAll();
}
package com.keymobile.indicators.model.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface IndAcsDataMapper {
}
package com.keymobile.indicators.model.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import com.keymobile.indicators.model.entity.IndAcsDef;
import tk.mybatis.mapper.common.BaseMapper;
@Mapper
public interface IndAcsDefMapper extends BaseMapper<IndAcsDef> {
public List<IndAcsDef> getAll();
public List<IndAcsDef> getPageByKeyword(Map<String,Object> param);
public int getByKeywordCount(Map<String,Object> param);
public List<IndAcsDef> getByKeyword(Map<String,Object> param);
}
package com.keymobile.indicators.model.mapper;
import org.apache.ibatis.annotations.Mapper;
import com.keymobile.indicators.model.entity.IndAcsScoreInfo;
import tk.mybatis.mapper.common.BaseMapper;
@Mapper
public interface IndAcsScoreInfoMapper extends BaseMapper<IndAcsScoreInfo>{
}
package com.keymobile.indicators.model.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface IndAnaDataMapper {
}
package com.keymobile.indicators.model.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import com.keymobile.indicators.model.entity.IndAnaDef;
import tk.mybatis.mapper.common.BaseMapper;
@Mapper
public interface IndAnaDefMapper extends BaseMapper<IndAnaDef>{
public List<IndAnaDef> getPageByKeyword(Map<String,Object> param);
public int getByKeywordCount(Map<String,Object> param);
public List<IndAnaDef> getByKeyword(Map<String,Object> param);
}
package com.keymobile.indicators.model.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface IndRelInfMapper {
}
package com.keymobile.indicators.service.cmbkpi;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.keymobile.indicators.model.entity.GeneralParm;
import com.keymobile.indicators.model.mapper.GeneralParmMapper;
@Service
public class GeneralParmService {
@Autowired
private GeneralParmMapper genrealParmMapper;
public List<GeneralParm> getAll(){
return genrealParmMapper.getAll();
}
}
package com.keymobile.indicators.service.cmbkpi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.keymobile.indicators.model.mapper.IndAcsDataMapper;
@Service
public class IndAcsDataService {
@Autowired
private IndAcsDataMapper indAcsDataMapper;
}
package com.keymobile.indicators.service.cmbkpi;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.keymobile.indicators.model.entity.IndAcsDef;
import com.keymobile.indicators.model.entity.IndAcsScoreInfo;
import com.keymobile.indicators.model.mapper.IndAcsDefMapper;
@Service
public class IndAcsDefService {
@Autowired
private IndAcsDefMapper indAcsDefMapper;
@Autowired
private IndAcsScoreInfoService indAcsScoreService;
public List<IndAcsDef> getAll(){
return indAcsDefMapper.getAll();
}
public IndAcsDef getById(String id) {
IndAcsDef def = new IndAcsDef();
def.setIndId(id);
return indAcsDefMapper.selectOne(def);
}
public String saveOrUpdate(IndAcsDef indAcsDef) throws Exception{
if(StringUtils.isBlank(indAcsDef.getIndId())) {
return "indId is not be null";
}
//根据考核指标编号判断是否已存在
IndAcsDef dbIndAcsDef = this.getById(indAcsDef.getIndId());
if(dbIndAcsDef==null) {
indAcsDefMapper.insert(indAcsDef);
}else {
indAcsDefMapper.updateByPrimaryKey(indAcsDef);
}
return indAcsDef.getIndId();
}
public Map<String,Object> getByPageAndKeyword(String keyword,int page,int rows)throws Exception{
Map<String,Object> paramMap = new HashMap<>();
Map<String,Object> resultMap = new HashMap<>();
if(StringUtils.isBlank(keyword)) {
paramMap.put("keyword", null);
}else {
paramMap.put("keyword", "%"+keyword+"%");
}
//计算总数
int count = indAcsDefMapper.getByKeywordCount(paramMap);
//计算start
int start = page*rows;
paramMap.put("start", start);
paramMap.put("end", rows);
List<IndAcsDef> resultList = indAcsDefMapper.getPageByKeyword(paramMap);
resultMap.put("resultList", resultList);
resultMap.put("total", count);
return resultMap;
}
public void delete(String indId) throws Exception{
indAcsDefMapper.deleteByPrimaryKey(indId);
//删除考核指标关联的公式
List<IndAcsScoreInfo> indAcsScoreInfos = indAcsScoreService.getListByIndId(indId);
if(!indAcsScoreInfos.isEmpty()) {
for(IndAcsScoreInfo acsScore : indAcsScoreInfos) {
indAcsScoreService.delete(acsScore.getOrgId(), acsScore.getIndexId(), acsScore.getIndexAttrId());
}
}
}
}
package com.keymobile.indicators.service.cmbkpi;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.google.common.collect.Maps;
import com.googlecode.aviator.AviatorEvaluator;
import com.keymobile.indicators.model.entity.IndAcsDef;
import com.keymobile.indicators.model.entity.IndAcsScoreInfo;
import com.keymobile.indicators.model.entity.IndAnaDef;
import com.keymobile.indicators.model.entity.IndRelTree;
import com.keymobile.indicators.model.mapper.IndAcsDefMapper;
import com.keymobile.indicators.model.mapper.IndAcsScoreInfoMapper;
import com.keymobile.indicators.model.mapper.IndAnaDefMapper;
import com.keymobile.indicators.service.hytobacco.BaseIndDataService;
import com.keymobile.indicators.utils.CalculateUtils;
import com.keymobile.indicators.utils.FormulaUtils;
@Service
public class IndAcsScoreInfoService {
@Autowired
private IndAcsScoreInfoMapper indAcsScoreInfoMapper;
@Autowired
private IndAnaDefMapper indAnaDefMapper;
@Autowired
private IndAcsDefMapper indAcsDefMapper;
@Autowired
private BaseIndDataService baseIndDataService;
public String save(IndAcsScoreInfo indAcsScoreInfo) throws Exception{
// if(StringUtils.isBlank(indAcsScoreInfo.getOrgId())||
// StringUtils.isBlank(indAcsScoreInfo.getIndexId())||
// StringUtils.isBlank(indAcsScoreInfo.getIndexAttrId())) {
// return "orgId,indexId,indexAttrId can not be null";
// }else {
// //根据组织机构id,指标编号和指标类型判断是否有公式存在
// IndAcsScoreInfo dbIndAcsScoreInfo = this.selectOneByOrgIdAndIndidAndIndtype(
// indAcsScoreInfo.getOrgId(),indAcsScoreInfo.getIndexId(),indAcsScoreInfo.getIndexAttrId());
// if(dbIndAcsScoreInfo!=null) {
// return "the indicators have exist,can not save to the database";
// }else {
indAcsScoreInfoMapper.insert(indAcsScoreInfo);
// }
// }
return "save success";
}
public void delete(String orgId,String indId,String indAttrId) throws Exception{
IndAcsScoreInfo indAcsScoreInfo = this.selectOneByOrgIdAndIndidAndIndtype(orgId, indId, indAttrId);
if(indAcsScoreInfo!=null) {
indAcsScoreInfoMapper.delete(indAcsScoreInfo);
}
}
public List<IndAcsScoreInfo> getListByIndId(String indId)throws Exception{
IndAcsScoreInfo indAcsScoreInfo = new IndAcsScoreInfo();
indAcsScoreInfo.setIndexId(indId);
return indAcsScoreInfoMapper.select(indAcsScoreInfo);
}
public IndAcsScoreInfo selectOneByOrgIdAndIndidAndIndtype(
String orgId,String indId,String indAttrId) throws Exception{
IndAcsScoreInfo indAcsScoreInfo = new IndAcsScoreInfo();
indAcsScoreInfo.setOrgId(orgId);
indAcsScoreInfo.setIndexId(indId);
indAcsScoreInfo.setIndexAttrId(indAttrId);
return indAcsScoreInfoMapper.selectOne(indAcsScoreInfo);
}
//type:0 分析指标 ;1 考核指标
public List<Map<String,Object>> getIndByKeywordAndType(String keyword,String type) throws Exception{
List<Map<String,Object>> resultList = new ArrayList<>();
Map<String,Object> paramMap = new HashMap<>();
if(StringUtils.isBlank(keyword)) {
paramMap.put("keyword", null);
}else {
paramMap.put("keyword", "%"+keyword+"%");
}
if(StringUtils.isNotBlank(type)) {
if("0".equals(type)) {
List<IndAnaDef> indAnaDefs = indAnaDefMapper.getByKeyword(paramMap);
if(!indAnaDefs.isEmpty()) {
for(IndAnaDef indAnaDef : indAnaDefs) {
Map<String,Object> map = new HashMap<>();
map.put("indId",indAnaDef.getIndId());
map.put("indName", indAnaDef.getIndName());
map.put("type", "0");
resultList.add(map);
}
}
}else {
List<IndAcsDef> indAcsDefs = indAcsDefMapper.getByKeyword(paramMap);
if(!indAcsDefs.isEmpty()) {
for(IndAcsDef indAcsDef : indAcsDefs) {
Map<String,Object> map = new HashMap<>();
map.put("indId",indAcsDef.getIndId());
map.put("indName", indAcsDef.getIndName());
map.put("type", "1");
resultList.add(map);
}
}
}
}else {
List<IndAnaDef> indAnaDefs = indAnaDefMapper.getByKeyword(paramMap);
List<IndAcsDef> indAcsDefs = indAcsDefMapper.getByKeyword(paramMap);
if(!indAnaDefs.isEmpty()) {
for(IndAnaDef indAnaDef : indAnaDefs) {
Map<String,Object> map = new HashMap<>();
map.put("indId",indAnaDef.getIndId());
map.put("indName", indAnaDef.getIndName());
map.put("type", "0");
resultList.add(map);
}
}
if(!indAcsDefs.isEmpty()) {
for(IndAcsDef indAcsDef : indAcsDefs) {
Map<String,Object> map = new HashMap<>();
map.put("indId",indAcsDef.getIndId());
map.put("indName", indAcsDef.getIndName());
map.put("type", "1");
resultList.add(map);
}
}
}
return resultList;
}
public Map<String,String> getIndicatorByInId(String indId){
Map<String,String> result = new HashMap<>();
IndAcsDef indAscDef = new IndAcsDef();
indAscDef.setIndId(indId);
IndAnaDef indAnaDef = new IndAnaDef();
indAnaDef.setIndId(indId);
IndAcsDef ascDef = indAcsDefMapper.selectOne(indAscDef);
if(ascDef!=null) {
result.put("indId", ascDef.getIndId());
result.put("indName", ascDef.getIndName());
result.put("type", "1");
}else {
IndAnaDef anaDef = indAnaDefMapper.selectOne(indAnaDef);
if(anaDef!=null) {
result.put("indId", anaDef.getIndId());
result.put("indName", anaDef.getIndName());
result.put("type", "0");
}
}
return result;
}
public IndRelTree analysisIndTree(String orgId,String indId,String indAttrId) throws Exception{
IndRelTree indRelTree = new IndRelTree();
//获取指标信息
Map<String,String> indInfo = this.getIndicatorByInId(indId);
if(indInfo.isEmpty()) {
indRelTree.setIndId(indId+" has been deleted");
indRelTree.setIndName(indId+" 被删除");
indRelTree.setType(indInfo.get("unknown"));
}else {
indRelTree.setIndId(indInfo.get("indId"));
indRelTree.setIndName(indInfo.get("indName"));
indRelTree.setType(indInfo.get("type"));
}
indRelTree.setChildren(new ArrayList<IndRelTree>());
//根据机构id,指标id和指标类型获取考核指标
IndAcsScoreInfo indAcsScoreInfo = this.selectOneByOrgIdAndIndidAndIndtype(orgId,
indId, indAttrId);
if(indAcsScoreInfo!=null) {
indRelTree.setIndAttrId(indAcsScoreInfo.getIndexAttrId());
indRelTree.setWeight(indAcsScoreInfo.getWeight());
//分析公式
String formula = indAcsScoreInfo.getScoreFormula();
if(StringUtils.isNotBlank(formula)) {
List<Map<String,String>> formulaInfo = FormulaUtils.analysisFormula(formula);
for(Map<String,String> map : formulaInfo) {
indRelTree.getChildren().add(analysisIndTree(orgId,
map.get("indId"),map.get("indAttrId")));
}
}
}
return indRelTree;
}
public String calGroupAverage(String driveIndFormula,List<String> compareObjs,int date) throws Exception{
String result = "0.0";
List<String> indIdList = new ArrayList<>();
if(StringUtils.isNotBlank(driveIndFormula)) {
Pattern p = Pattern.compile("(\\[[^\\]]*\\])");
Matcher m = p.matcher(driveIndFormula);
while(m.find()){
indIdList.add(m.group().substring(1, m.group().length()-1));
}
//获取公式中的基础指标id
int indIdSize =indIdList.size();
if(indIdSize!=0) {
if(indIdSize==1) {
List<String> indDateList = baseIndDataService.getIndData(indIdList.get(0), date, compareObjs);
result = CalculateUtils.averageValue(indDateList,0);
}else {
Map<String, Object> env = Maps.newHashMap();
for(String indId : indIdList) {
List<String> indDateList = baseIndDataService.getIndData(indId,date,compareObjs);
String sumValue = CalculateUtils.sumValue(indDateList);
env.put(indId, Double.valueOf(sumValue));
driveIndFormula = driveIndFormula.replace("["+indId+"]", indId);
}
result = AviatorEvaluator.execute(driveIndFormula,env).toString();
//保留四位小数
if(!result.equals("NaN")) {
result = String.format("%.4f",
new BigDecimal(Double.valueOf(result)));
}
}
}
}
return result;
}
}
package com.keymobile.indicators.service.cmbkpi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.keymobile.indicators.model.mapper.IndAnaDataMapper;
@Service
public class IndAnaDataService {
@Autowired
private IndAnaDataMapper indAnaDataMapper;
}
package com.keymobile.indicators.service.cmbkpi;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.keymobile.indicators.model.entity.IndAnaDef;
import com.keymobile.indicators.model.mapper.IndAnaDefMapper;
@Service
public class IndAnaDefService {
@Autowired
private IndAnaDefMapper indAnaDefMapper;
public String saveOrUpdate(IndAnaDef indAnaDef) throws Exception{
if(StringUtils.isBlank(indAnaDef.getIndId())) {
return "indId can not be null";
}
//根据指标编号判断分析指标是否已存在
IndAnaDef dbIndAnaDef = this.getById(indAnaDef.getIndId());
if(dbIndAnaDef==null) {
indAnaDefMapper.insert(indAnaDef);
}else {
indAnaDefMapper.updateByPrimaryKey(indAnaDef);
}
return indAnaDef.getIndId();
}
public void delete(String indId) throws Exception{
indAnaDefMapper.deleteByPrimaryKey(indId);
}
public IndAnaDef getById(String id) throws Exception{
IndAnaDef anaDef = new IndAnaDef();
anaDef.setIndId(id);
return indAnaDefMapper.selectOne(anaDef);
}
public Map<String,Object> getByPageAndKeyword(String keyword,int page,int rows)throws Exception{
Map<String,Object> paramMap = new HashMap<>();
Map<String,Object> resultMap = new HashMap<>();
if(StringUtils.isBlank(keyword)) {
paramMap.put("keyword", null);
}else {
paramMap.put("keyword", "%"+keyword+"%");
}
//计算总数
int count = indAnaDefMapper.getByKeywordCount(paramMap);
//计算start
int start = page*rows;
paramMap.put("start", start);
paramMap.put("end", rows);
List<IndAnaDef> resultList = indAnaDefMapper.getPageByKeyword(paramMap);
resultMap.put("resultList", resultList);
resultMap.put("total", count);
return resultMap;
}
}
package com.keymobile.indicators.service.cmbkpi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.keymobile.indicators.model.mapper.IndRelInfMapper;
@Service
public class IndRelInfService {
@Autowired
private IndRelInfMapper indRelInfMapper;
}
package com.keymobile.indicators.service.hytobacco;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.google.common.collect.Maps;
import com.googlecode.aviator.AviatorEvaluator;
import com.keymobile.indicators.model.entity.indicators.DriveIndDef;
import com.keymobile.indicators.model.mapper.indicators.DriveIndDefMapper;
import com.keymobile.indicators.utils.CalculateUtils;
@Service
public class DriveIndDefService {
......@@ -18,6 +25,8 @@ public class DriveIndDefService {
private DriveIndDefMapper driveIndDefMapper;
@Autowired
private DriveIndDefVersionService driveIndDefVersionService;
@Autowired
private BaseIndDataService baseIndDataService;
public String saveOrUpdate(DriveIndDef driveIndDef,String catalogId,String catalogIdPath,String user)
throws Exception{
......@@ -87,4 +96,39 @@ public class DriveIndDefService {
return resultMap;
}
public String calGroupAverage(String driveIndFormula,List<String> compareObjs,int date) throws Exception{
String result = "0.0";
List<String> indIdList = new ArrayList<>();
if(StringUtils.isNotBlank(driveIndFormula)) {
Pattern p = Pattern.compile("(\\[[^\\]]*\\])");
Matcher m = p.matcher(driveIndFormula);
while(m.find()){
indIdList.add(m.group().substring(1, m.group().length()-1));
}
//获取公式中的基础指标id
int indIdSize =indIdList.size();
if(indIdSize!=0) {
if(indIdSize==1) {
List<String> indDateList = baseIndDataService.getIndData(indIdList.get(0), date, compareObjs);
result = CalculateUtils.averageValue(indDateList,0);
}else {
Map<String, Object> env = Maps.newHashMap();
for(String indId : indIdList) {
List<String> indDateList = baseIndDataService.getIndData(indId,date,compareObjs);
String sumValue = CalculateUtils.sumValue(indDateList);
env.put(indId, Double.valueOf(sumValue));
driveIndFormula = driveIndFormula.replace("["+indId+"]", indId);
}
result = AviatorEvaluator.execute(driveIndFormula,env).toString();
//保留四位小数
if(!result.equals("NaN")) {
result = String.format("%.4f",
new BigDecimal(Double.valueOf(result)));
}
}
}
}
return result;
}
}
......@@ -17,13 +17,12 @@ import org.springframework.stereotype.Service;
import com.google.common.collect.Maps;
import com.googlecode.aviator.AviatorEvaluator;
import com.keymobile.indicators.model.entity.DriveIndCalResult;
import com.keymobile.indicators.model.entity.IndAcsDef;
import com.keymobile.indicators.model.entity.indicators.DriveIndDef;
import com.keymobile.indicators.model.entity.scorecard.ImproveScoreDef;
import com.keymobile.indicators.model.entity.scorecard.IndScorecard;
import com.keymobile.indicators.model.entity.scorecard.RankScoreDef;
import com.keymobile.indicators.persistence.hyindicators.DriveIndCalResultRepository;
import com.keymobile.indicators.persistence.hyindicators.IndScorecardRepository;
import com.keymobile.indicators.service.cmbkpi.IndAcsDefService;
import com.keymobile.indicators.utils.CalculateUtils;
@Service
......@@ -35,7 +34,7 @@ public class IndScorecardService {
@Autowired
private DriveIndCalResultRepository driveIndResultRepo;
@Autowired
private IndAcsDefService indAcsDefService;
private DriveIndDefService driveIndDefService;
//id不为空为修改,为空为新增
public String saveOrUpdate(IndScorecard indScorecard) {
......@@ -62,7 +61,7 @@ public class IndScorecardService {
}
public Map<String,String> calculateIndiScore(String indId,int date,String compareObj,
String indScorecardId,String compareId,List<String> compareObjs) {
String indScorecardId,String compareId,List<String> compareObjs) throws Exception{
Map<String,String> result = new HashMap<>();
String indScoreValue = "0.0";
String indImproveScoreValue = "0.0";
......@@ -74,10 +73,10 @@ public class IndScorecardService {
IndScorecard scoreCard = this.findById(indScorecardId);
double baseScoreValue = 0;
if(scoreCard!=null) {
IndAcsDef acsDef = indAcsDefService.getById(indId);
DriveIndDef driveIndDef = driveIndDefService.getById(indId);
//获取指标是正向还是反向类型
String acsType = acsDef.getIndType();
String unit = acsDef.getUnt();
String acsType = driveIndDef.getIndType();
String unit = driveIndDef.getIndUnit();
List<DriveIndCalResult> currentDriveResult = driveIndResultRepo
.findByIndIdAndDateAndCompareId(indId, date,compareId,
......
......@@ -35,9 +35,8 @@ import org.springframework.stereotype.Service;
import com.keymobile.indicators.conf.MongoDBConfig;
import com.keymobile.indicators.model.entity.DimValue;
import com.keymobile.indicators.model.entity.DriveIndCalResult;
import com.keymobile.indicators.model.entity.IndAcsDef;
import com.keymobile.indicators.model.entity.indicators.DriveIndDef;
import com.keymobile.indicators.persistence.hyindicators.DriveIndCalResultRepository;
import com.keymobile.indicators.service.cmbkpi.IndAcsDefService;
import com.keymobile.indicators.utils.CalculateUtils;
import com.mongodb.BasicDBObject;
import com.mongodb.DB;
......@@ -54,7 +53,7 @@ public class IndicatorsValueService {
@Autowired
private DriveIndCalResultRepository driveIndResultRepo;
@Autowired
private IndAcsDefService indAcsDefService;
private DriveIndDefService driveIndDefService;
@Value("${mongodb.database}")
private String database;
......@@ -187,7 +186,7 @@ public class IndicatorsValueService {
String[] compareObjs = compareObjString.split(";");
Map<String,Object> result = new HashMap<>();
for(String indId : indIds) {
IndAcsDef indAcsDef = indAcsDefService.getById(indId);
DriveIndDef deiveIndDef = driveIndDefService.getById(indId);
//计算同期排名
Map<String,String> valueMap = new HashMap<>();
//计算增幅排名
......@@ -211,7 +210,7 @@ public class IndicatorsValueService {
dataMap.put("currentValue",driveIndCalResult.get().getValue());
dataMap.put("currentRank", String.valueOf(driveIndCalResult.get().getRank()));
dataMap.put("sameValue", sameDriveIndCalResult.get().getValue());
String calGowth = CalculateUtils.calGowth(indAcsDef.getUnt(),
String calGowth = CalculateUtils.calGowth(deiveIndDef.getIndUnit(),
driveIndCalResult.get().getValue(), sameDriveIndCalResult.get().getValue(), "1");
dataMap.put("calGowth", calGowth);
......@@ -219,9 +218,9 @@ public class IndicatorsValueService {
allComObjDataMap.put(compareObj, dataMap);
}
//排列同期指标值
Map<String,Integer> sameValueRank = CalculateUtils.rankValue(valueMap, indAcsDef.getIndType());
Map<String,Integer> sameValueRank = CalculateUtils.rankValue(valueMap, deiveIndDef.getIndType());
//排名增幅排名
Map<String,Integer> gowthValueRank = CalculateUtils.rankValue(gowthMap, indAcsDef.getIndType());
Map<String,Integer> gowthValueRank = CalculateUtils.rankValue(gowthMap, deiveIndDef.getIndType());
for(Entry<String,Object> entry: allComObjDataMap.entrySet()) {
Map<String,String> dataMap = (Map<String,String>)entry.getValue();
Integer sameRank = sameValueRank.get(entry.getKey());
......@@ -428,15 +427,15 @@ public class IndicatorsValueService {
}
}
//根据指标id获取指标信息
IndAcsDef acs = indAcsDefService.getById(indId);
rate = CalculateUtils.calGowth(acs.getUnt(),currentValue, sameValue,"0");
DriveIndDef driveIndDef = driveIndDefService.getById(indId);
rate = CalculateUtils.calGowth(driveIndDef.getIndUnit(),currentValue, sameValue,"0");
XSSFRow row = excelSheet.getRow(rowMap.get(indId));
row.getCell(3).setCellValue(currentValue);
row.getCell(4).setCellValue(sameValue);
row.getCell(5).setCellValue(rate);
String acsType = acs.getIndType();
String acsType = driveIndDef.getIndType();
if("0".equals(acsType)) {
if(Double.valueOf(rate)>0) {
row.getCell(6).setCellValue("同比趋好");
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.keymobile.indicators.model.mapper.GeneralParmMapper">
<select id="getAll" resultType="com.keymobile.indicators.model.entity.GeneralParm">
select * from gen_general_parm
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.keymobile.indicators.model.mapper.IndAcsDataMapper">
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.keymobile.indicators.model.mapper.IndAcsDefMapper">
<select id="getAll" resultType="com.keymobile.indicators.model.entity.IndAcsDef">
select * from ind_acs_ind_def_inf
</select>
<select id="getPageByKeyword" parameterType="map" resultType="com.keymobile.indicators.model.entity.IndAcsDef" >
select * from ind_acs_ind_def_inf
<if test="keyword!=null">
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
limit #{start},#{end}
</select>
<select id="getByKeywordCount" parameterType="map" resultType="java.lang.Integer">
select count(1) from ind_acs_ind_def_inf
<if test="keyword!=null">
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
</select>
<select id="getByKeyword" parameterType="map" resultType="com.keymobile.indicators.model.entity.IndAcsDef" >
select * from ind_acs_ind_def_inf
<if test="keyword!=null">
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.keymobile.indicators.model.mapper.IndAcsScoreInfoMapper">
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.keymobile.indicators.model.mapper.IndAnaDataMapper">
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.keymobile.indicators.model.mapper.IndAnaDefMapper">
<select id="getPageByKeyword" parameterType="map" resultType="com.keymobile.indicators.model.entity.IndAnaDef" >
select * from ind_ana_ind_def_inf
<if test="keyword!=null">
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
limit #{start},#{end}
</select>
<select id="getByKeywordCount" parameterType="map" resultType="java.lang.Integer">
select count(1) from ind_ana_ind_def_inf
<if test="keyword!=null">
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
</select>
<select id="getByKeyword" parameterType="map" resultType="com.keymobile.indicators.model.entity.IndAnaDef" >
select * from ind_ana_ind_def_inf
<if test="keyword!=null">
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.keymobile.indicators.model.mapper.IndRelInfMapper">
</mapper>
\ No newline at end of file
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