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