|
|
@@ -102,11 +102,13 @@ public class ProductController {
|
|
|
|
|
|
/**
|
|
|
* 根据ids绑定至个人产品库
|
|
|
- * @param ids
|
|
|
+ * @param ids 物料id
|
|
|
* @param isAll 是否将该企业下的所有添加至个人下
|
|
|
+ * @param isStardand 是否是标准产品
|
|
|
+ * @return ResultMap 返回值
|
|
|
*/
|
|
|
@RequestMapping(value = "/person", method = RequestMethod.POST)
|
|
|
- ResultMap setAllProductsByPerson(@RequestBody String ids, Integer isAll, Integer isStardand) {
|
|
|
+ public ResultMap setAllProductsByPerson(@RequestBody String ids, Integer isAll, Integer isStardand) {
|
|
|
Integer count = productService.setAllProductsByProductIds(ids, isAll, isStardand);
|
|
|
if (count == 0) {
|
|
|
return new ResultMap(CodeType.SAVED, "个人产品库已存在产品");
|
|
|
@@ -117,9 +119,11 @@ public class ProductController {
|
|
|
/**
|
|
|
* 批量保存个人替代物料信息
|
|
|
* @param productReplaceList 替代物料数组
|
|
|
+ * @param productId 物料id
|
|
|
+ * @return ResultMap 返回值
|
|
|
*/
|
|
|
@RequestMapping(value = "/productReplace", method = RequestMethod.POST)
|
|
|
- ResultMap setProductReplacesByPerson(@RequestParam("productId") Long productId, @RequestBody String productReplaceList) {
|
|
|
+ public ResultMap setProductReplacesByPerson(@RequestParam("productId") Long productId, @RequestBody String productReplaceList) {
|
|
|
List<ProductReplace> productReplaces = JSON.parseArray(productReplaceList,ProductReplace.class);
|
|
|
productService.setProductReplacesByPerson(productId, productReplaces);
|
|
|
return ResultMap.success("success");
|
|
|
@@ -183,9 +187,11 @@ public class ProductController {
|
|
|
* 批量删除产品
|
|
|
*
|
|
|
* @param ids the ids
|
|
|
+ * @param isPerson 是否是个人
|
|
|
+ * @return ResultMap
|
|
|
*/
|
|
|
@RequestMapping(value = "/{ids}", method = RequestMethod.DELETE)
|
|
|
- public ResultMap deleteBatch(@PathVariable("ids") String ids , Integer isPerson) {
|
|
|
+ public ResultMap deleteBatch(@PathVariable("ids") String ids, Integer isPerson) {
|
|
|
String[] idstrs = ids.split(SplitChar.COMMA);
|
|
|
List<Long> idsLong = new ArrayList<Long>();
|
|
|
for (String id : idstrs) {
|