| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.*; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.common.annotation.PersonalScope; |
| | | import com.ruoyi.inspect.dto.InsPlaceOrderDto; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.RawMaterialOrderTemplate; |
| | | import com.ruoyi.inspect.service.InsOrderService; |
| | | import com.ruoyi.inspect.service.RawMaterialOrderService; |
| | | import com.ruoyi.inspect.service.RawMaterialOrderTemplateService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | @Api(tags = "原材料下单") |
| | | public class RawMaterialOrderController { |
| | | |
| | | private InsOrderService insOrderService; |
| | | private RawMaterialOrderService rawMaterialOrderService; |
| | | private RawMaterialOrderTemplateService rawMaterialOrderTemplateService; |
| | | |
| | | @ApiOperation(value = "更具零件号获取标准树") |
| | | @GetMapping("/selectStandardTreeListByPartNo") |
| | | public Result selectStandardTreeListByPartNo(String partNo) { |
| | | return Result.success(rawMaterialOrderService.selectStandardTreeListByPartNo(partNo)); |
| | | return rawMaterialOrderService.selectStandardTreeListByPartNo(partNo); |
| | | } |
| | | |
| | | @ApiOperation(value = "原材料检验查询代下单") |
| | |
| | | |
| | | @ApiOperation(value = "原材料检验查询检验中") |
| | | @GetMapping("/getIfsByStateOne") |
| | | @PreAuthorize("@ss.hasPermi('business:order')") |
| | | @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantityDto.class, paramName = "createUser") |
| | | public Result getIfsByStateOne(Page page, IfsInventoryQuantityDto ifsInventoryQuantityDto){ |
| | | return Result.success(rawMaterialOrderService.getIfsByStateOne(page, ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "原材料检验查询已检验") |
| | | @GetMapping("/getIfsByOver") |
| | | @PreAuthorize("@ss.hasPermi('business:order')") |
| | | @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantitySupplierDto.class, paramName = "createUser") |
| | | public Result getIfsByOver(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){ |
| | | return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto)); |
| | | } |
| | |
| | | @ApiOperation(value = "通过原材料检验单模板id获取检验单模板内容") |
| | | @GetMapping("/selectRawMaterOrderTemplateById") |
| | | public Result<?> selectRawMaterOrderTemplateById(Integer id) { |
| | | return Result.success("成功", rawMaterialOrderTemplateService.selectRawMaterOrderTemplateById(id)); |
| | | return Result.success(rawMaterialOrderTemplateService.selectRawMaterOrderTemplateById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除原材料检验单模板") |
| | |
| | | |
| | | /** |
| | | * 取消报检 |
| | | * @param param 原材料下单 |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "撤销报检") |
| | |
| | | @ApiOperation(value = "获取铜产业链检测数据") |
| | | @GetMapping("/getIndustryChain") |
| | | public Result<?> getIndustryChain(Integer id) { |
| | | return Result.success("成功", rawMaterialOrderService.getIndustryChain(id)); |
| | | return Result.success(rawMaterialOrderService.getIndustryChain(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | @ApiOperation(value = "原材料下单免检") |
| | | @PostMapping("/addExemptionOrder") |
| | | public Result<?> addExemptionOrder(String str) { |
| | | Map<String, Object> map = JSON.parseObject(str, Map.class); |
| | | JSONArray jsonArray = JSON.parseArray(map.get("list")+""); |
| | | List<SampleProductDto> list = jsonArray.toJavaList(SampleProductDto.class); |
| | | InsOrder insOrder = JSON.parseObject(JSON.toJSONString(map.get("insOrder")), InsOrder.class); |
| | | return Result.success(rawMaterialOrderService.addExemptionOrder(list, insOrder)); |
| | | public Result<?> addExemptionOrder(@RequestBody InsPlaceOrderDto insPlaceOrderDto) { |
| | | return Result.success(rawMaterialOrderService.addExemptionOrder(insPlaceOrderDto.getSampleList(), insPlaceOrderDto.getInsOrder())); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | /** |
| | | * 取消报检 |
| | | * @param id 原材料下单 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "删除原材料报检信息") |
| | |
| | | |
| | | |
| | | @ApiOperation(value = "原材料报检查询全部") |
| | | @PreAuthorize("@ss.hasPermi('get:Ifs:ByAll')") |
| | | @GetMapping("/getIfsByAll") |
| | | public Result getIfsByAll(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){ |
| | | return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto)); |
| | |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "铜单丝下单") |
| | | @PostMapping("/addRawCopperOrder") |
| | | public Result<?> addRawCopperOrder(@RequestBody InsPlaceOrderDto insPlaceOrderDto) { |
| | | return Result.success(insOrderService.addRawCopperOrder(insPlaceOrderDto.getSampleList(), insPlaceOrderDto.getCopperInsOrder())); |
| | | } |
| | | |
| | | @ApiOperation(value = "铜单丝下单免检") |
| | | @PostMapping("/addRawCopperOrderExemptionOrder") |
| | | public Result<?> addRawCopperOrderExemptionOrder(String str) { |
| | | Map<String, Object> map = JSON.parseObject(str, Map.class); |
| | | JSONArray jsonArray = JSON.parseArray(map.get("list")+""); |
| | | List<SampleProductDto> list = jsonArray.toJavaList(SampleProductDto.class); |
| | | CopperInsOrderDto CopperInsOrder = JSON.parseObject(JSON.toJSONString(map.get("insOrder")), CopperInsOrderDto.class); |
| | | return Result.success(rawMaterialOrderService.addRawCopperOrderExemptionOrder(list, CopperInsOrder)); |
| | | public Result<?> addRawCopperOrderExemptionOrder(@RequestBody InsPlaceOrderDto insPlaceOrderDto) { |
| | | return Result.success(rawMaterialOrderService.addRawCopperOrderExemptionOrder(insPlaceOrderDto.getSampleList(), insPlaceOrderDto.getCopperInsOrder())); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | @ApiOperation(value = "原材料检验查询季度检验") |
| | | @GetMapping("/getIfsByQuarter") |
| | | @PreAuthorize("@ss.hasPermi('business:order')") |
| | | @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantitySupplierDto.class, paramName = "createUser") |
| | | public Result getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){ |
| | | return Result.success(rawMaterialOrderService.getIfsByQuarter(page, ifsInventoryQuantityDto)); |
| | | } |