|
@@ -4,7 +4,7 @@ package com.syjy.calculate.conotroller;
|
|
|
import com.syjy.calculate.entity.CalculationFormula;
|
|
|
import com.syjy.calculate.repository.CalculationFormulaRepository;
|
|
|
import com.syjy.calculate.service.AccuracyPassRateCalculateService;
|
|
|
-import com.syjy.calculate.vo.ResponseVO;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
|
@@ -23,7 +23,7 @@ import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
@Controller
|
|
|
-@RequestMapping("jarCalculate")
|
|
|
+@RequestMapping("calculateView/jarCalculate")
|
|
|
public class JarCalculate {
|
|
|
@Resource
|
|
|
public JdbcTemplate jdbcTemplate;
|
|
@@ -38,7 +38,7 @@ public class JarCalculate {
|
|
|
}
|
|
|
@GetMapping("select")
|
|
|
@ResponseBody
|
|
|
- public ResponseVO select() {
|
|
|
+ public List<CalculationFormula> select() {
|
|
|
String sql = "SELECT * from t_calculation_formula";
|
|
|
|
|
|
List<CalculationFormula> calculationFormulaList = new ArrayList<>();
|
|
@@ -47,11 +47,12 @@ public class JarCalculate {
|
|
|
} catch (DataAccessException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- return ResponseVO.success(calculationFormulaList);
|
|
|
+ return calculationFormulaList;
|
|
|
}
|
|
|
@PostMapping("edit")
|
|
|
@ResponseBody
|
|
|
- public ResponseVO edit(@RequestBody CalculationFormula calculationFormula ) {
|
|
|
+ public String edit(@RequestBody CalculationFormula calculationFormula ) {
|
|
|
+
|
|
|
Integer id =calculationFormula.getId();
|
|
|
String type =calculationFormula.getType();
|
|
|
Integer orderNo =calculationFormula.getOrderNo();
|
|
@@ -63,11 +64,11 @@ public class JarCalculate {
|
|
|
} catch (DataAccessException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- return ResponseVO.success("修改成功");
|
|
|
+ return "修改成功" ;
|
|
|
}
|
|
|
@PostMapping("add")
|
|
|
@ResponseBody
|
|
|
- public ResponseVO add(@RequestBody CalculationFormula calculationFormula) {
|
|
|
+ public String add(@RequestBody CalculationFormula calculationFormula) {
|
|
|
System.out.println("sss"+calculationFormula);
|
|
|
|
|
|
String type =calculationFormula.getType();
|
|
@@ -84,12 +85,12 @@ public class JarCalculate {
|
|
|
} catch (DataAccessException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- return ResponseVO.success("新增成功");
|
|
|
+ return "新增成功" ;
|
|
|
}
|
|
|
|
|
|
@PostMapping( "delet")
|
|
|
@ResponseBody
|
|
|
- public ResponseVO delete(@RequestBody CalculationFormula calculationFormula) {
|
|
|
+ public String delete(@RequestBody CalculationFormula calculationFormula) {
|
|
|
System.out.println("id"+calculationFormula.getId());
|
|
|
Integer id =calculationFormula.getId();
|
|
|
try {
|
|
@@ -97,7 +98,7 @@ public class JarCalculate {
|
|
|
} catch (DataAccessException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- return ResponseVO.success("删除成功");
|
|
|
+ return "删除成功";
|
|
|
}
|
|
|
|
|
|
}
|