|
|
@@ -29,6 +29,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
import java.io.BufferedInputStream;
|
|
|
import java.io.InputStream;
|
|
|
import java.io.OutputStream;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
@@ -62,7 +63,7 @@ public class YsZbtsysyfyServiceImpl extends BaseServiceImpl<YsZbtsysyfyMapper, Y
|
|
|
if(baseMapper.selectCount(Wrappers.<YsZbtsysyfyEntity>lambdaQuery().eq(YsZbtsysyfyEntity::getFyje, ysZbtsysyfy.getYsje()).eq(YsZbtsysyfyEntity::getXmId, ysZbtsysyfy.getXmId())) > 0){
|
|
|
throw new ServiceException("费用内容已存在");
|
|
|
}
|
|
|
- ysZbtsysyfy.setYsje(ysZbtsysyfy.getYsje() * 10000);
|
|
|
+ ysZbtsysyfy.setYsje(ysZbtsysyfy.getYsje().multiply(BigDecimal.valueOf(10000)));
|
|
|
return save(ysZbtsysyfy);
|
|
|
}
|
|
|
|
|
|
@@ -71,7 +72,7 @@ public class YsZbtsysyfyServiceImpl extends BaseServiceImpl<YsZbtsysyfyMapper, Y
|
|
|
if (ysZbtsysyfy.getXmId() == null) {
|
|
|
throw new ServiceException("请选择科研项目");
|
|
|
}
|
|
|
- ysZbtsysyfy.setYsje(ysZbtsysyfy.getYsje()*10000);
|
|
|
+ ysZbtsysyfy.setYsje(ysZbtsysyfy.getYsje().multiply(BigDecimal.valueOf(10000)));
|
|
|
return this.updateById(ysZbtsysyfy);
|
|
|
}
|
|
|
|
|
|
@@ -121,7 +122,7 @@ public class YsZbtsysyfyServiceImpl extends BaseServiceImpl<YsZbtsysyfyMapper, Y
|
|
|
for (YsZbtsysyfyVO temp : list) {
|
|
|
temp.setXh(index.getAndIncrement() + "");
|
|
|
if (temp.getYsje() != null) {
|
|
|
- temp.setYsje(temp.getYsje() / 10000);
|
|
|
+ temp.setYsje(temp.getYsje().multiply(BigDecimal.valueOf(0.0001)));
|
|
|
}
|
|
|
}
|
|
|
InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/研发项目管理/预算编制/装备调试费用与试验费用.xls");
|