|
@@ -43,6 +43,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.io.FileInputStream;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
@@ -612,7 +613,25 @@ public class SystemController extends BaseController {
|
|
|
return "hello";
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/addItem")
|
|
|
+ public void addItem(String fileName,String flag){
|
|
|
+ File file = new File("C:\\Users\\Administrator\\Desktop\\推广量表\\"+fileName+".xlsx");
|
|
|
+ try {
|
|
|
+ List<List<List<Object>>> datas = ExcelUtil.getBankListByExcelSheet(new FileInputStream(file.getAbsolutePath()), file.getName());
|
|
|
+ List<ScaleEntity> scaleEntities = scaleService.getScaleByFlag(flag);
|
|
|
+ List<List<Object>> an = datas.get(5);
|
|
|
+ for (int i=5;i<scaleEntities.size();i++){
|
|
|
+ ScaleEntity entity = scaleEntities.get(i);
|
|
|
+ entity.setCheckItems(an.get(i-5).get(2).toString());
|
|
|
+ log.info(entity.toString());
|
|
|
+ //scaleService.saveScale(entity);
|
|
|
+
|
|
|
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
@GetMapping("/updateItem")
|
|
|
public void updateItem(String fileName,String flag){
|
|
@@ -670,17 +689,16 @@ public class SystemController extends BaseController {
|
|
|
|
|
|
@GetMapping("updateMarks")
|
|
|
public void updateMarks(String fileName,String flag){
|
|
|
- File file = new File("C:\\Users\\Administrator\\Desktop\\推广量表\\"+fileName+".xlsx");
|
|
|
+ File file = new File("C:\\Users\\Administrator\\Desktop\\"+fileName+".xlsx");
|
|
|
try {
|
|
|
List<List<List<Object>>> datas = ExcelUtil.getBankListByExcelSheet(new FileInputStream(file.getAbsolutePath()), file.getName());
|
|
|
List<ScaleMarksEntity> scaleMarksEntities = scaleMarksService.getScaleMarksByFlag(flag);
|
|
|
List<List<Object>> markObj = datas.get(2);
|
|
|
for (int i =0;i<scaleMarksEntities.size();i++){
|
|
|
ScaleMarksEntity entity = scaleMarksEntities.get(i);
|
|
|
- entity.setSymptom(markObj.get(i).get(3).toString());
|
|
|
entity.setImprovementSuggestions(markObj.get(i).get(4).toString());
|
|
|
log.info(entity.toString());
|
|
|
- // scaleMarksService.saveScaleMarks(entity);
|
|
|
+ //scaleMarksService.saveScaleMarks(entity);
|
|
|
}
|
|
|
|
|
|
}catch (Exception e){
|