Browse Source

修改客户权重信息v2

dev_shibei_match
yinzuomei 5 years ago
parent
commit
cbac5e8ca8
  1. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java
  2. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java
  3. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java

@ -49,5 +49,5 @@ public interface IndexGroupDetailDao extends BaseDao<IndexGroupDetailEntity> {
*/
List<IndexGroupDetailEntity> selectSelfSubIndex(@Param("customerId") String customerId, @Param("allIndexCodePath") String allIndexCodePath);
int updateWeight(@Param("indexCode") String indexCode, @Param("customerId") String customerId, @Param("weight") BigDecimal weight);
int updateWeight(@Param("indexCode") String indexCode, @Param("customerId") String customerId, @Param("weight") BigDecimal weight,@Param("allParentIndexCode")String allParentIndexCode);
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java

@ -93,7 +93,7 @@ public class IndexGroupDetailServiceImpl extends BaseServiceImpl<IndexGroupDetai
public void updateCustomerIndexGroupDetail(Collection<IndexGroupDetailTemplateEntity> values, String customerId) {
int updatedNum=0;
for(IndexGroupDetailTemplateEntity entity:values){
updatedNum+=baseDao.updateWeight(entity.getIndexCode(),customerId,entity.getWeight());
updatedNum+=baseDao.updateWeight(entity.getIndexCode(),customerId,entity.getWeight(),entity.getAllParentIndexCode());
}
log.info("修改客户权重信息,影响行数="+updatedNum);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml

@ -34,10 +34,11 @@
<update id="updateWeight" parameterType="map">
UPDATE index_group_detail
SET WEIGHT =#{weight}
SET WEIGHT =#{weight},UPDATED_TIME=NOW()
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
AND INDEX_CODE = #{indexCode}
and ALL_INDEX_CODE_PATH=#{allParentIndexCode}
</update>
</mapper>
Loading…
Cancel
Save