fix
This commit is contained in:
parent
b57fcd6943
commit
54efb3c559
@ -4,6 +4,7 @@ package com.lz.modules.performance.controller;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.common.utils.StringUtil;
|
||||
import com.lz.modules.performance.dto.IndicatorLibraryDto;
|
||||
import com.lz.modules.performance.dto.IndicatorLibraryMoveDto;
|
||||
import com.lz.modules.performance.res.StatisticalIndicatorTypeRes;
|
||||
@ -54,7 +55,9 @@ public class IndicatorLibraryController {
|
||||
public R save(@RequestBody IndicatorLibraryDto dto) {
|
||||
IndicatorLibrary indicatorLibrary = new IndicatorLibrary();
|
||||
BeanUtil.copyProperties(dto,indicatorLibrary);
|
||||
indicatorLibrary.setWeight(new BigDecimal(dto.getWeight()));
|
||||
if(StringUtil.isNotBlank(dto.getWeight())){
|
||||
indicatorLibrary.setWeight(new BigDecimal(dto.getWeight()));
|
||||
}
|
||||
boolean success = indicatorLibraryService.saveOrUpdate(indicatorLibrary);
|
||||
|
||||
return success ? R.ok():R.error();
|
||||
|
||||
@ -153,6 +153,7 @@
|
||||
|
||||
<select id="countIndicatorLibrarysByIndicatorType" resultType="java.lang.Integer">
|
||||
select COUNT(1) from lz_indicator_library where indicator_type=#{indicatorType} and is_delete = 0
|
||||
and type in (SELECT id from lz_indicator_type where is_delete = 0)
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user