You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.5 KiB
62 lines
2.5 KiB
package com.nov.KgLowDurable.controller; |
|
import com.nov.KgLowDurable.pojo.entity.LdConsumerForm; |
|
import com.nov.KgLowDurable.pojo.entity.LdOneOutStorageDetail; |
|
import com.nov.KgLowDurable.pojo.vo.DepartmentVO; |
|
import com.nov.KgLowDurable.pojo.vo.QuarterVO; |
|
import com.nov.KgLowDurable.service.ILdConsumerFormService; |
|
import com.nov.KgLowDurable.service.ILdDemandEndService; |
|
import com.nov.KgLowDurable.util.Result; |
|
import io.swagger.annotations.*; |
|
import lombok.AllArgsConstructor; |
|
import org.springframework.beans.factory.annotation.Autowired; |
|
import org.springframework.web.bind.annotation.GetMapping; |
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
import org.springframework.web.bind.annotation.RequestParam; |
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import java.util.List; |
|
|
|
|
|
/** |
|
* @author liweidong |
|
*/ |
|
@RestController |
|
@AllArgsConstructor |
|
@RequestMapping("/consumerForm") |
|
public class LdConsumerFormController { |
|
|
|
@Autowired |
|
ILdConsumerFormService consumerFormService; |
|
|
|
|
|
@GetMapping("/list") |
|
@ApiOperationSort(1) |
|
@ApiOperation(value = "二级易耗品列表", notes = "获取二级易耗列表,支持条件筛选", httpMethod = "GET", response = Result.class) |
|
@ApiImplicitParams({ |
|
@ApiImplicitParam(name = "departmentId", value = "部门ID", dataType = "string", paramType = "query"), |
|
@ApiImplicitParam(name = "materialName", value = "物资名称", dataType = "string", paramType = "query") |
|
|
|
}) |
|
public Result list(@ApiParam(hidden = true) |
|
@RequestParam(required = false) String departmentId, |
|
@RequestParam(required = false) String materialName, |
|
@RequestParam(required = false ,defaultValue = "1") Integer pageNum, |
|
@RequestParam(required = false ,defaultValue = "10") Integer pageSize) { |
|
|
|
return Result.OK(consumerFormService.getConsumerFormList(departmentId,materialName,pageNum,pageSize)); |
|
} |
|
|
|
@GetMapping("/getConsumerFormList") |
|
@ApiOperationSort(2) |
|
@ApiOperation(value = "获取二级出库物资列表", notes = "根据部门获取二级出库物资列表", httpMethod = "GET", response = Result.class) |
|
public Result getConsumerFormList(@RequestParam String departmentId) { |
|
try { |
|
List<LdConsumerForm> quarters = consumerFormService.getConsumerFormByDeptId(departmentId); |
|
return Result.OK(quarters); |
|
} catch (Exception e) { |
|
return Result.error("获取二级出库物资列表失败"); |
|
} |
|
} |
|
|
|
|
|
}
|
|
|