|
@@ -1,42 +1,30 @@
|
|
|
package org.jeecg.modules.jixiaoPersonPrice.controller;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
-import java.net.URLDecoder;
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import org.jeecg.common.api.vo.Result;
|
|
|
-import org.jeecg.common.system.query.QueryGenerator;
|
|
|
-import org.jeecg.common.util.oConvertUtils;
|
|
|
-import org.jeecg.modules.jixiaoPersonPrice.entity.JixiaoPersonPrice;
|
|
|
-import org.jeecg.modules.jixiaoPersonPrice.service.IJixiaoPersonPriceService;
|
|
|
-
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-
|
|
|
-import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
-import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
|
-import org.jeecgframework.poi.excel.entity.ImportParams;
|
|
|
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
+import org.jeecg.modules.jixiaoPersonPrice.convert.JixiaoPersonPriceConvert;
|
|
|
+import org.jeecg.modules.jixiaoPersonPrice.dto.JixiaoPersonPriceAddDTO;
|
|
|
+import org.jeecg.modules.jixiaoPersonPrice.entity.JixiaoPersonPrice;
|
|
|
+import org.jeecg.modules.jixiaoPersonPrice.service.IJixiaoPersonPriceService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
|
|
|
- /**
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+/**
|
|
|
* @Description: 人员绩效提成
|
|
|
* @Author: jeecg-boot
|
|
|
* @Date: 2023-09-04
|
|
@@ -49,7 +37,21 @@ import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
public class JixiaoPersonPriceController extends JeecgController<JixiaoPersonPrice, IJixiaoPersonPriceService> {
|
|
|
@Autowired
|
|
|
private IJixiaoPersonPriceService jixiaoPersonPriceService;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量新增人员绩效
|
|
|
+ */
|
|
|
+ @AutoLog(value = "批量新增人员绩效")
|
|
|
+ @ApiOperation(value="批量新增人员绩效", notes="批量新增人员绩效")
|
|
|
+ @PostMapping(value = "/addAllJX")
|
|
|
+ public Result<String> addAllJX(@RequestBody List<JixiaoPersonPriceAddDTO> list) {
|
|
|
+ List<JixiaoPersonPrice> list1 = list.stream().map(i-> JixiaoPersonPriceConvert.INSTANCE.convert(i)).collect(Collectors.toList());
|
|
|
+ //字符串转化成对象集合
|
|
|
+ jixiaoPersonPriceService.saveBatch(list1);
|
|
|
+ return Result.OK("添加成功!");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|
|
@@ -71,7 +73,7 @@ public class JixiaoPersonPriceController extends JeecgController<JixiaoPersonPri
|
|
|
IPage<JixiaoPersonPrice> pageList = jixiaoPersonPriceService.page(page, queryWrapper);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 添加
|
|
|
*
|
|
@@ -86,7 +88,7 @@ public class JixiaoPersonPriceController extends JeecgController<JixiaoPersonPri
|
|
|
jixiaoPersonPriceService.save(jixiaoPersonPrice);
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 编辑
|
|
|
*
|
|
@@ -101,7 +103,7 @@ public class JixiaoPersonPriceController extends JeecgController<JixiaoPersonPri
|
|
|
jixiaoPersonPriceService.updateById(jixiaoPersonPrice);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id删除
|
|
|
*
|
|
@@ -116,7 +118,7 @@ public class JixiaoPersonPriceController extends JeecgController<JixiaoPersonPri
|
|
|
jixiaoPersonPriceService.removeById(id);
|
|
|
return Result.OK("删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 批量删除
|
|
|
*
|
|
@@ -131,7 +133,7 @@ public class JixiaoPersonPriceController extends JeecgController<JixiaoPersonPri
|
|
|
this.jixiaoPersonPriceService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
return Result.OK("批量删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id查询
|
|
|
*
|