|
|
|
@ -6,6 +6,7 @@ import com.github.pagehelper.PageInfo; |
|
|
|
|
import com.hfkj.channel.gas.newlink.NewLinkGasService; |
|
|
|
|
import com.hfkj.channel.gas.newlink.NewLinkRequestService; |
|
|
|
|
import com.hfkj.channel.gas.shell.CqShellPetroleumGasService; |
|
|
|
|
import com.hfkj.channel.gas.shell.CqShellPetroleumRequestService; |
|
|
|
|
import com.hfkj.common.exception.ErrorCode; |
|
|
|
|
import com.hfkj.common.exception.ErrorHelp; |
|
|
|
|
import com.hfkj.common.exception.SysCode; |
|
|
|
@ -17,6 +18,7 @@ import com.hfkj.model.GasModel; |
|
|
|
|
import com.hfkj.model.ResponseData; |
|
|
|
|
import com.hfkj.service.agent.BsAgentPriceService; |
|
|
|
|
import com.hfkj.service.gas.BsGasService; |
|
|
|
|
import com.hfkj.sysenum.MerchantSourceTypeEnum; |
|
|
|
|
import com.hfkj.sysenum.agent.AgentPriceTypeEnum; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
@ -45,12 +47,15 @@ public class BsGasController { |
|
|
|
|
@RequestMapping(value="/refresh",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "refresh") |
|
|
|
|
public ResponseData refresh() { |
|
|
|
|
public ResponseData refresh(@RequestParam(name = "type", required = true) Integer type) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
// newLinkGasService.refresh();
|
|
|
|
|
cqShellPetroleumGasService.refresh(); |
|
|
|
|
if (MerchantSourceTypeEnum.type2.getNumber().equals(type)) { |
|
|
|
|
newLinkGasService.refresh(); |
|
|
|
|
|
|
|
|
|
} else if (MerchantSourceTypeEnum.type3.getNumber().equals(type)) { |
|
|
|
|
cqShellPetroleumGasService.refresh(); |
|
|
|
|
} |
|
|
|
|
return ResponseMsgUtil.success(""); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
@ -60,11 +65,18 @@ public class BsGasController { |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/queryGasInfoByGasId",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "queryGasInfoByGasId") |
|
|
|
|
public ResponseData queryGasInfoByGasId(@RequestParam(name = "gasId", required = true) String gasId) { |
|
|
|
|
@ApiOperation(value = "queryGasInfoByMerNo") |
|
|
|
|
public ResponseData queryGasInfoByMerNo(@RequestParam(name = "type", required = true) Integer type, |
|
|
|
|
@RequestParam(name = "merNo", required = true) String merNo) { |
|
|
|
|
try { |
|
|
|
|
JSONObject data = null; |
|
|
|
|
if (MerchantSourceTypeEnum.type2.getNumber().equals(type)) { |
|
|
|
|
data = NewLinkRequestService.queryGasInfoByGasId(merNo); |
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(NewLinkRequestService.queryGasInfoByGasId(gasId)); |
|
|
|
|
} else if (MerchantSourceTypeEnum.type3.getNumber().equals(type)) { |
|
|
|
|
data = CqShellPetroleumRequestService.gasStationQueryDetail(merNo); |
|
|
|
|
} |
|
|
|
|
return ResponseMsgUtil.success(data); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|