Commit 3fdadfd8 by 张祺

修改任务审批插入数据项值的方法

parent 6092e7da
...@@ -18,7 +18,8 @@ public interface IndicatorsDataMapper extends BaseMapper<IndicatorsData>{ ...@@ -18,7 +18,8 @@ public interface IndicatorsDataMapper extends BaseMapper<IndicatorsData>{
void batchCreateIndData(@Param("datas") List<IndicatorsData> datas); void batchCreateIndData(@Param("datas") List<IndicatorsData> datas);
void deleteData(@Param("indId") String indId, @Param("dim1")String dim1, @Param("dim2")Integer dim2); void deleteData(@Param("indId") String indId, @Param("dim1")String dim1,
@Param("dim2")Integer dim2, @Param("code")String code);
public IndicatorsData getIndData(@Param("indId")String indId, public IndicatorsData getIndData(@Param("indId")String indId,
@Param("date")Integer date,@Param("compareObj")String compareObj,@Param("code")String code); @Param("date")Integer date,@Param("compareObj")String compareObj,@Param("code")String code);
......
...@@ -510,6 +510,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -510,6 +510,7 @@ public class TaskServiceImpl implements TaskService {
List<IndicatorsData> datas) { List<IndicatorsData> datas) {
IndicatorsData data = new IndicatorsData(); IndicatorsData data = new IndicatorsData();
data.setBatchNo(task.getId()); data.setBatchNo(task.getId());
data.setCode(task.getOrgNo());
data.setDataType("double"); data.setDataType("double");
data.setDim2(valueTime); data.setDim2(valueTime);
data.setDim1(value.getObjId()); data.setDim1(value.getObjId());
......
...@@ -64,7 +64,7 @@ public class BaseIndDataService { ...@@ -64,7 +64,7 @@ public class BaseIndDataService {
log.info("开始批量插入指标值数据项"); log.info("开始批量插入指标值数据项");
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();
for (IndicatorsData data : datas) { for (IndicatorsData data : datas) {
indicatorsDataMapper.deleteData(data.getIndId(), data.getDim1(), data.getDim2()); indicatorsDataMapper.deleteData(data.getIndId(), data.getDim1(), data.getDim2(), data.getCode());
} }
indicatorsDataMapper.batchCreateIndData(datas); indicatorsDataMapper.batchCreateIndData(datas);
time = (System.currentTimeMillis() - time)/1000; time = (System.currentTimeMillis() - time)/1000;
......
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
where ind_id = #{indId} where ind_id = #{indId}
and dim1 = #{dim1} and dim1 = #{dim1}
and dim2 = #{dim2} and dim2 = #{dim2}
<if test="code != null">
and code = #{code}
</if>
</delete> </delete>
<select id="getIndData" parameterType="map" resultType="com.keymobile.indicators.model.entity.indicators.IndicatorsData" > <select id="getIndData" parameterType="map" resultType="com.keymobile.indicators.model.entity.indicators.IndicatorsData" >
......
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