Commit c2a88c93 by 李小惠

111

parent 4fb0c675
......@@ -7,11 +7,13 @@ import com.junmp.jyzb.entity.InventorySummary;
import com.junmp.jyzb.service.InventoryService;
import com.junmp.jyzb.service.InventorySummaryService;
import com.junmp.jyzb.utils.ResponseResult;
import com.junmp.v2.common.bean.request.ValidationApi;
import com.junmp.v2.common.bean.response.ApiRes;
import com.junmp.v2.db.api.page.PageResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -32,7 +34,7 @@ public class InventoryController {
@PostMapping("/GetEquipmentInfo")
@ApiOperation("根据组织机构查询库存信息")
public ApiRes<PageResult<InventorySummary>> getEquipmentInfo(@RequestBody InventorySumReq req) {
public ApiRes<PageResult<InventorySummary>> getEquipmentInfo(@RequestBody @Validated(ValidationApi.edit.class) InventorySumReq req) {
return ApiRes.success(inventorySummaryService.getEquipmentInfo(req));
}
......
......@@ -198,7 +198,7 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
}
String locationType = msg.get("locationType").toString();
if (!locationType.equals("warehouse") && !locationType.equals("cabinet")){
return new ResponseResult(HttpStatus.ERROR, ReturnMsg.ERROR,"输入的locationType值有");
return new ResponseResult(HttpStatus.ERROR, ReturnMsg.ERROR,"输入的locationType值有");
}else if(locationType.equals("warehouse")){
warehouseService.setWarehouseInventory(msg);
}else if(locationType.equals("cabinet")){
......
......@@ -42,7 +42,6 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
//号型
wrapper.eq(ObjectUtil.isNotEmpty(req.getSizeId()), InventorySummary::getSizeId, req.getSizeId());
wrapper.orderByDesc(InventorySummary::getUpdateTime);
return wrapper;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论