|
|
@ -9,6 +9,7 @@ import java.io.UnsupportedEncodingException; |
|
|
|
import java.net.URLDecoder; |
|
|
|
import java.net.URLDecoder; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
import org.jeecg.common.util.oConvertUtils; |
|
|
|
import org.jeecg.common.util.oConvertUtils; |
|
|
@ -36,13 +37,13 @@ import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @Description: 制单管理 |
|
|
|
* @Description: 制单管理 |
|
|
|
* @Author: jeecg-boot |
|
|
|
* @Author: jeecg-boot |
|
|
|
* @Date: 2021-11-27 |
|
|
|
* @Date: 2021-11-27 |
|
|
|
* @Version: V1.0 |
|
|
|
* @Version: V1.0 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Api(tags="制单管理") |
|
|
|
@Api(tags = "制单管理") |
|
|
|
@RestController |
|
|
|
@RestController |
|
|
|
@RequestMapping("/maker/zyMaker") |
|
|
|
@RequestMapping("/maker/zyMaker") |
|
|
|
@Slf4j |
|
|
|
@Slf4j |
|
|
@ -60,15 +61,17 @@ public class ZyMakerController extends JeecgController<ZyMaker, IZyMakerService> |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@AutoLog(value = "制单管理-分页列表查询") |
|
|
|
@AutoLog(value = "制单管理-分页列表查询") |
|
|
|
@ApiOperation(value="制单管理-分页列表查询", notes="制单管理-分页列表查询") |
|
|
|
@ApiOperation(value = "制单管理-分页列表查询", notes = "制单管理-分页列表查询") |
|
|
|
@GetMapping(value = "/list") |
|
|
|
@GetMapping(value = "/list") |
|
|
|
public Result<?> queryPageList(ZyMaker zyMaker, |
|
|
|
public Result<?> queryPageList(ZyMaker zyMaker, |
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
|
|
HttpServletRequest req) { |
|
|
|
HttpServletRequest req) { |
|
|
|
QueryWrapper<ZyMaker> queryWrapper = QueryGenerator.initQueryWrapper(zyMaker, req.getParameterMap()); |
|
|
|
QueryWrapper<ZyMaker> queryWrapper = QueryGenerator.initQueryWrapper(zyMaker, req.getParameterMap()); |
|
|
|
Page<ZyMaker> page = new Page<ZyMaker>(pageNo, pageSize); |
|
|
|
Page<ZyMaker> page = new Page<ZyMaker>(pageNo, pageSize); |
|
|
|
IPage<ZyMaker> pageList = zyMakerService.page(page, queryWrapper); |
|
|
|
IPage<ZyMaker> pageList = zyMakerService.page(page, queryWrapper); |
|
|
|
|
|
|
|
List<ZyMaker> zyMakerList = zyMakerService.ZyMakerVo(pageList.getRecords()); |
|
|
|
|
|
|
|
pageList.setRecords(zyMakerList); |
|
|
|
return Result.OK(pageList); |
|
|
|
return Result.OK(pageList); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -79,13 +82,26 @@ public class ZyMakerController extends JeecgController<ZyMaker, IZyMakerService> |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@AutoLog(value = "制单管理-添加") |
|
|
|
@AutoLog(value = "制单管理-添加") |
|
|
|
@ApiOperation(value="制单管理-添加", notes="制单管理-添加") |
|
|
|
@ApiOperation(value = "制单管理-添加", notes = "制单管理-添加") |
|
|
|
@PostMapping(value = "/add") |
|
|
|
@PostMapping(value = "/add") |
|
|
|
public Result<?> add(@RequestBody ZyMaker zyMaker) { |
|
|
|
public Result<?> add(@RequestBody ZyMaker zyMaker) { |
|
|
|
zyMakerService.save(zyMaker); |
|
|
|
zyMakerService.save(zyMaker); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 制单 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@AutoLog(value = "制单管理-制单") |
|
|
|
|
|
|
|
@ApiOperation(value = "制单管理-制单", notes = "制单管理-制单") |
|
|
|
|
|
|
|
@PostMapping(value = "/listMakerAdd") |
|
|
|
|
|
|
|
public Result<?> listMakerAdd() { |
|
|
|
|
|
|
|
//点击制单 点击后按产品模块分解成制单写入制单表
|
|
|
|
|
|
|
|
zyMakerService.listMakerAdd(); |
|
|
|
|
|
|
|
//zyMakerService.save(zyMaker);
|
|
|
|
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 编辑 |
|
|
|
* 编辑 |
|
|
|
* |
|
|
|
* |
|
|
@ -93,7 +109,7 @@ public class ZyMakerController extends JeecgController<ZyMaker, IZyMakerService> |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@AutoLog(value = "制单管理-编辑") |
|
|
|
@AutoLog(value = "制单管理-编辑") |
|
|
|
@ApiOperation(value="制单管理-编辑", notes="制单管理-编辑") |
|
|
|
@ApiOperation(value = "制单管理-编辑", notes = "制单管理-编辑") |
|
|
|
@PutMapping(value = "/edit") |
|
|
|
@PutMapping(value = "/edit") |
|
|
|
public Result<?> edit(@RequestBody ZyMaker zyMaker) { |
|
|
|
public Result<?> edit(@RequestBody ZyMaker zyMaker) { |
|
|
|
zyMakerService.updateById(zyMaker); |
|
|
|
zyMakerService.updateById(zyMaker); |
|
|
@ -107,9 +123,9 @@ public class ZyMakerController extends JeecgController<ZyMaker, IZyMakerService> |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@AutoLog(value = "制单管理-通过id删除") |
|
|
|
@AutoLog(value = "制单管理-通过id删除") |
|
|
|
@ApiOperation(value="制单管理-通过id删除", notes="制单管理-通过id删除") |
|
|
|
@ApiOperation(value = "制单管理-通过id删除", notes = "制单管理-通过id删除") |
|
|
|
@DeleteMapping(value = "/delete") |
|
|
|
@DeleteMapping(value = "/delete") |
|
|
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
|
|
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
|
|
|
zyMakerService.removeById(id); |
|
|
|
zyMakerService.removeById(id); |
|
|
|
return Result.OK("删除成功!"); |
|
|
|
return Result.OK("删除成功!"); |
|
|
|
} |
|
|
|
} |
|
|
@ -121,9 +137,9 @@ public class ZyMakerController extends JeecgController<ZyMaker, IZyMakerService> |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@AutoLog(value = "制单管理-批量删除") |
|
|
|
@AutoLog(value = "制单管理-批量删除") |
|
|
|
@ApiOperation(value="制单管理-批量删除", notes="制单管理-批量删除") |
|
|
|
@ApiOperation(value = "制单管理-批量删除", notes = "制单管理-批量删除") |
|
|
|
@DeleteMapping(value = "/deleteBatch") |
|
|
|
@DeleteMapping(value = "/deleteBatch") |
|
|
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
|
|
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
|
|
|
this.zyMakerService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
this.zyMakerService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
} |
|
|
|
} |
|
|
@ -135,11 +151,11 @@ public class ZyMakerController extends JeecgController<ZyMaker, IZyMakerService> |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@AutoLog(value = "制单管理-通过id查询") |
|
|
|
@AutoLog(value = "制单管理-通过id查询") |
|
|
|
@ApiOperation(value="制单管理-通过id查询", notes="制单管理-通过id查询") |
|
|
|
@ApiOperation(value = "制单管理-通过id查询", notes = "制单管理-通过id查询") |
|
|
|
@GetMapping(value = "/queryById") |
|
|
|
@GetMapping(value = "/queryById") |
|
|
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { |
|
|
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { |
|
|
|
ZyMaker zyMaker = zyMakerService.getById(id); |
|
|
|
ZyMaker zyMaker = zyMakerService.getById(id); |
|
|
|
if(zyMaker==null) { |
|
|
|
if (zyMaker == null) { |
|
|
|
return Result.error("未找到对应数据"); |
|
|
|
return Result.error("未找到对应数据"); |
|
|
|
} |
|
|
|
} |
|
|
|
return Result.OK(zyMaker); |
|
|
|
return Result.OK(zyMaker); |
|
|
|