|
@@ -84,10 +84,19 @@ public class SyPlanStatisticsController extends JeecgController<SyPlanStatistics
|
|
|
@ApiOperation(value="计划单统计表补充-添加", notes="计划单统计表补充-添加")
|
|
|
@PostMapping(value = "/add")
|
|
|
public Result<String> add(@RequestBody SyPlanStatistics syPlanStatistics) {
|
|
|
- Date date = new Date();
|
|
|
- SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd :hh:mm:ss");
|
|
|
- syPlanStatistics.setId(dateFormat.format(date));
|
|
|
- syPlanStatisticsService.save(syPlanStatistics);
|
|
|
+// Date date = new Date();
|
|
|
+// SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd :hh:mm:ss");
|
|
|
+// syPlanStatistics.setId(dateFormat.format(date));
|
|
|
+// QueryWrapper<SyPlanStatistics> queryWrapper = QueryGenerator.initQueryWrapper(syPlanStatistics,null);
|
|
|
+// Page<SyPlanStatistics> page = new Page<SyPlanStatistics>(0, 10);
|
|
|
+// queryWrapper.eq("del_flag",0);
|
|
|
+// IPage<SyPlanStatistics> pageList = syPlanStatisticsService.page(page, queryWrapper);
|
|
|
+ if(syPlanStatistics.getId()==null){
|
|
|
+ syPlanStatisticsService.save(syPlanStatistics);
|
|
|
+ }else {
|
|
|
+ syPlanStatisticsService.updateById(syPlanStatistics);
|
|
|
+ }
|
|
|
+
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
|
|