|
|
@ -49,7 +49,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZyStyleModularService> { |
|
|
|
public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZyStyleModularService> { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private IZyStyleModularService zyStyleModularService; |
|
|
|
private IZyStyleModularService zyStyleModularService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 分页列表查询 |
|
|
|
* 分页列表查询 |
|
|
|
* |
|
|
|
* |
|
|
@ -71,7 +71,7 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ |
|
|
|
IPage<ZyStyleModular> pageList = zyStyleModularService.page(page, queryWrapper); |
|
|
|
IPage<ZyStyleModular> pageList = zyStyleModularService.page(page, queryWrapper); |
|
|
|
return Result.OK(pageList); |
|
|
|
return Result.OK(pageList); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 添加 |
|
|
|
* 添加 |
|
|
|
* |
|
|
|
* |
|
|
@ -82,10 +82,21 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ |
|
|
|
@ApiOperation(value="款式工序表-添加", notes="款式工序表-添加") |
|
|
|
@ApiOperation(value="款式工序表-添加", notes="款式工序表-添加") |
|
|
|
@PostMapping(value = "/add") |
|
|
|
@PostMapping(value = "/add") |
|
|
|
public Result<?> add(@RequestBody ZyStyleModular zyStyleModular) { |
|
|
|
public Result<?> add(@RequestBody ZyStyleModular zyStyleModular) { |
|
|
|
zyStyleModularService.save(zyStyleModular); |
|
|
|
String[] split = zyStyleModular.getProcessId().split(","); |
|
|
|
|
|
|
|
QueryWrapper queryWrapper=new QueryWrapper(); |
|
|
|
|
|
|
|
queryWrapper.eq("style_id",zyStyleModular.getStyleId()); |
|
|
|
|
|
|
|
for (String s : split) { |
|
|
|
|
|
|
|
zyStyleModular.setProcessId(s); |
|
|
|
|
|
|
|
zyStyleModular.setId(null); |
|
|
|
|
|
|
|
queryWrapper.eq("process_id",zyStyleModular.getProcessId()); |
|
|
|
|
|
|
|
int a=zyStyleModularService.count(queryWrapper); |
|
|
|
|
|
|
|
if(a>=1) |
|
|
|
|
|
|
|
return Result.error("存在以添加过的数据!!!"); |
|
|
|
|
|
|
|
zyStyleModularService.save(zyStyleModular); |
|
|
|
|
|
|
|
} |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 编辑 |
|
|
|
* 编辑 |
|
|
|
* |
|
|
|
* |
|
|
@ -99,7 +110,7 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ |
|
|
|
zyStyleModularService.updateById(zyStyleModular); |
|
|
|
zyStyleModularService.updateById(zyStyleModular); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 通过id删除 |
|
|
|
* 通过id删除 |
|
|
|
* |
|
|
|
* |
|
|
@ -113,7 +124,7 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ |
|
|
|
zyStyleModularService.removeById(id); |
|
|
|
zyStyleModularService.removeById(id); |
|
|
|
return Result.OK("删除成功!"); |
|
|
|
return Result.OK("删除成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 批量删除 |
|
|
|
* 批量删除 |
|
|
|
* |
|
|
|
* |
|
|
@ -127,7 +138,7 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ |
|
|
|
this.zyStyleModularService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
this.zyStyleModularService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 通过id查询 |
|
|
|
* 通过id查询 |
|
|
|
* |
|
|
|
* |
|
|
|