package com.gkhy.hazmat.admin.controller.web; import com.gkhy.hazmat.common.annotation.ThirdPartyToken; import com.gkhy.hazmat.common.api.CommonResult; import com.gkhy.hazmat.system.domain.HzHazmat; import com.gkhy.hazmat.system.domain.HzHazmatFlow; import com.gkhy.hazmat.system.domain.HzWarehouse; import com.gkhy.hazmat.system.domain.dto.ChemicalLedger; import com.gkhy.hazmat.system.domain.dto.HazmatDto; import com.gkhy.hazmat.system.domain.vo.HzHazmatOrder; import com.gkhy.hazmat.system.service.HzHazmatFlowService; import com.gkhy.hazmat.system.service.HzHazmatService; import com.gkhy.hazmat.system.service.HzWarehouseService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @RequestMapping("/hazmat/zkd/data") @Api(tags = "第三放调用") public class ThirdPartController { @Autowired private HzWarehouseService warehouseService; @Autowired private HzHazmatService hazmatService; @Autowired private HzHazmatFlowService hazmatFlowService; @ApiOperation(value = "zkd仓库列表") @GetMapping("/getWarehouse") @ThirdPartyToken public CommonResult Thirdlist(HzWarehouse warehouse){ return CommonResult.success(warehouseService.selectzkdWarehouseList(warehouse)); } @ApiOperation(value = "zkd根据仓库id和存储柜id查询入库订单相关危化品") @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "warehouseId", dataType = "long", required = true, value = "仓库id"), @ApiImplicitParam(paramType = "query", name = "cupboardId", dataType = "long", required = true, value = "存储柜id") }) @GetMapping("/getEntryRecord") @ThirdPartyToken public CommonResult listByWarehouseAndCupboard(@RequestBody HazmatDto hazmat) { List hazmatList = hazmatService.selectByWarehouseAndCupboard(hazmat); return CommonResult.success(hazmatList); } @ApiOperation(value = "第三方平台推送流向数据") @PostMapping("/pushFlowData") @ThirdPartyToken public CommonResult pushFlowData(@RequestBody List flowDTO) { return hazmatFlowService.pushFlowFromThirdParty(flowDTO); } }