QuoteController.java 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. package com.ydtech.modules.order.controller;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.JSONObject;
  4. import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  5. import com.fasterxml.jackson.core.JsonProcessingException;
  6. import com.ydtech.aop.request.RequestSingleParam;
  7. import com.ydtech.core.page.HttpResult;
  8. import com.ydtech.exception.SystemException;
  9. import com.ydtech.modules.base.controller.BaseController;
  10. import com.ydtech.modules.ins.model.vo.KindInfoVo;
  11. import com.ydtech.modules.ins.model.vo.QuoteRespVo;
  12. import com.ydtech.modules.order.aop.QuoteVerification;
  13. import com.ydtech.modules.order.components.InsOrdersComponents;
  14. import com.ydtech.modules.order.entity.InsAreaCompany;
  15. import com.ydtech.modules.order.entity.InsDrivingIntentionInsurance;
  16. import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
  17. import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
  18. import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
  19. import com.ydtech.modules.order.entity.vo.QuoteAccidentalDrivingVo;
  20. import com.ydtech.modules.order.entity.vo.bohai.BoHaiQuoteAccidentVo;
  21. import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
  22. import com.ydtech.modules.order.entity.vo.guoren.GuorenAccidentalDrivingVo;
  23. import com.ydtech.modules.order.entity.vo.yangguang.YgQuoteAccidentVo;
  24. import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
  25. import com.ydtech.modules.order.service.*;
  26. import com.ydtech.modules.protocol.dao.PtlTaxSourceNewMapper;
  27. import com.ydtech.modules.protocol.entity.constants.PtlApiType;
  28. import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
  29. import com.ydtech.modules.protocol.entity.vo.PtlAgreementQueryVo;
  30. import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
  31. import com.ydtech.modules.protocol.service.PtlAgreementService;
  32. import com.ydtech.modules.protocol.service.PtlTaxSourceNewService;
  33. import com.ydtech.modules.protocol.service.impl.TaxSourceExcludeServiceImpl;
  34. import com.ydtech.utils.StringUtils;
  35. import io.swagger.annotations.Api;
  36. import org.springframework.beans.BeanUtils;
  37. import org.springframework.beans.factory.annotation.Autowired;
  38. import org.springframework.util.ObjectUtils;
  39. import org.springframework.web.bind.annotation.PostMapping;
  40. import org.springframework.web.bind.annotation.RequestBody;
  41. import org.springframework.web.bind.annotation.RequestMapping;
  42. import org.springframework.web.bind.annotation.RestController;
  43. import java.time.LocalDateTime;
  44. import java.time.format.DateTimeFormatter;
  45. import java.util.ArrayList;
  46. import java.util.List;
  47. import java.util.Objects;
  48. @Api(tags = "报价")
  49. @RestController
  50. @RequestMapping(value = "/quote")
  51. public class QuoteController extends BaseController {
  52. @Autowired
  53. TaxSourceExcludeServiceImpl taxSourceExcludeService;
  54. @Autowired
  55. PtlTaxSourceNewService ptlTaxSourceNewService;
  56. @Autowired
  57. PtlTaxSourceNewMapper ptlTaxSourceNewMapper;
  58. @Autowired
  59. InsOrdersComponents insOrdersComponents;
  60. @Autowired
  61. PtlAgreementAttributionService ptlAgreementAttributionService;
  62. @Autowired
  63. InsCrawlerOrderService insCrawlerOrderService;
  64. @Autowired
  65. ZhongMeiOrderApiService zhongMeiOrderApiService;
  66. @Autowired
  67. ZijinOrderApiService zijinOrderApiService;
  68. @Autowired
  69. YongchengOrderApiService yongchengOrderApiService;
  70. @Autowired
  71. HuaTaiOrderApiService huaTaiOrderApiService;
  72. @Autowired
  73. GuorenOrderApiService guorenOrderApiService;
  74. @Autowired
  75. DaJiaOrderService daJiaOrderService;
  76. @Autowired
  77. BoHaiOrderApiService boHaiOrderApiService;
  78. @Autowired
  79. PingAnOrderApiService pingAnOrderApiService;
  80. @Autowired
  81. InsOrdersService insOrdersService;
  82. @Autowired
  83. InsAreaCompanyService insAreaCompanyService;
  84. @Autowired
  85. ChengTaiOrderApiService chengTaiOrderApiService;
  86. @Autowired
  87. YongAnOrderService yongAnOrderService;
  88. @Autowired
  89. YangGuangOrderApiService yangGuangOrderApiService;
  90. @Autowired
  91. PtlAgreementService ptlAgreementService;
  92. @Autowired
  93. InsDrivingIntentionInsuranceService insDrivingIntentionInsuranceService;
  94. @QuoteVerification("报价授权")
  95. @PostMapping(value = "/quote")
  96. public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<Object> quoteVo) throws Exception {
  97. //处理商业险 为空的去掉
  98. List<KindInfoVo> kinds = quoteVo.getKinds();
  99. kinds.removeIf(item->Double.compare(item.getAmount(),0) == 0 && Double.compare(item.getUnitAmount(),0) == 0 && item.getServiceTimes() == 0);
  100. BaseQuoteInfoVo quoteInfo = insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo(), quoteVo.getAgreementId(),quoteVo.getKinds());
  101. quoteInfo.setKindList(kinds);
  102. //设置座位数 驾意险需要传
  103. quoteVo.setSeatNum(quoteInfo.getCarInfo().getSeatCount());
  104. HttpResult<QuoteRespVo> respVo = null;
  105. DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
  106. HttpResult<PtlAgreementQueryVo> byAgreementId = ptlAgreementService.getByAgreementId(quoteVo.getAgreementId());
  107. LocalDateTime currentDate = LocalDateTime.now();
  108. if(byAgreementId.getData().getAgreement().getIsValid().equals("0") //是否有效
  109. || byAgreementId.getData().getAgreement().getValidStatus().equals("0") //是否有效
  110. || !(currentDate.isAfter(byAgreementId.getData().getAgreement().getStartDate()) && currentDate.isBefore(byAgreementId.getData().getAgreement().getEndDate()))){
  111. throw new SystemException("协议失效,请检查调度");
  112. }
  113. PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(quoteVo.getAgreementId());
  114. if (PtlApiType.PTL_API_2.getCode() == ptlAgreementAttribution.getApiType()) {
  115. BaseQuoteVo<QuoteAccidentalDrivingVo> quoteVo1 = new BaseQuoteVo<>();
  116. JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
  117. QuoteAccidentalDrivingVo javaObject = jsonObject.toJavaObject(QuoteAccidentalDrivingVo.class);
  118. BeanUtils.copyProperties(quoteVo, quoteVo1);
  119. quoteVo1.setAccidentalDrivingVo(javaObject);
  120. quoteVo1.setSeatNum(quoteInfo.getCarInfo().getSeatCount());
  121. BaseQuoteVo baseQuoteVo = insOrdersService.convertDriving(quoteVo1);
  122. respVo = insCrawlerOrderService.quote(quoteInfo, baseQuoteVo);
  123. }
  124. if("ZMBX1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
  125. BaseQuoteVo<AccidentalDrivingVo> quoteVo1 = new BaseQuoteVo<>();
  126. JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
  127. BeanUtils.copyProperties(quoteVo, quoteVo1);
  128. if(jsonObject.size() > 0) {
  129. AccidentalDrivingVo javaObject = jsonObject.toJavaObject(AccidentalDrivingVo.class);
  130. quoteVo1.setAccidentalDrivingVo(javaObject);
  131. }else{
  132. quoteVo1.setAccidentalDrivingVo(null);
  133. }
  134. respVo = zhongMeiOrderApiService.quote(quoteInfo, quoteVo1);
  135. }
  136. if("AICS1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
  137. BaseQuoteVo<QuoteAccidentalDrivingVo> quoteVo1 = new BaseQuoteVo<>();
  138. JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
  139. QuoteAccidentalDrivingVo javaObject = jsonObject.toJavaObject(QuoteAccidentalDrivingVo.class);
  140. BeanUtils.copyProperties(quoteVo, quoteVo1);
  141. quoteVo1.setAccidentalDrivingVo(javaObject);
  142. //转换类型
  143. BaseQuoteVo<AccidentalDrivingVo> baseQuoteVo = insOrdersService.convertDriving(quoteVo1);
  144. respVo = yongchengOrderApiService.quoteApi(baseQuoteVo);
  145. }
  146. if("YAIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
  147. }
  148. if("ZKIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
  149. BaseQuoteVo<List<ZjQuoteAccidentVo>> quoteVo1 = new BaseQuoteVo<>();
  150. JSONArray jsonObject = JSONArray.parseArray(JSONArray.toJSONString(quoteVo.getAccidentalDrivingVo()));
  151. List<ZjQuoteAccidentVo> javaObject = jsonObject.toJavaList(ZjQuoteAccidentVo.class);
  152. BeanUtils.copyProperties(quoteVo, quoteVo1);
  153. quoteVo1.setAccidentalDrivingVo(javaObject);
  154. respVo = zijinOrderApiService.quote(quoteInfo, quoteVo1);
  155. }
  156. if("XDCX1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
  157. GuoRenQuoteVo<QuoteAccidentalDrivingVo> quoteVo1 = new GuoRenQuoteVo<>();
  158. JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
  159. QuoteAccidentalDrivingVo javaObject = jsonObject.toJavaObject(QuoteAccidentalDrivingVo.class);
  160. BeanUtils.copyProperties(quoteVo, quoteVo1);
  161. quoteVo1.setAccidentalDrivingVo(javaObject);
  162. // quoteVo1.setSeatNum();
  163. BaseQuoteVo<GuorenAccidentalDrivingVo> baseQuoteVo = insOrdersService.convertDriving(quoteVo1);
  164. GuoRenQuoteVo guoRenQuoteVo = new GuoRenQuoteVo();
  165. BeanUtils.copyProperties(baseQuoteVo, guoRenQuoteVo);
  166. guoRenQuoteVo.setGuoRenSpecialAgreementVo(baseQuoteVo.getGuoRenSpecialAgreementVo());
  167. respVo = guorenOrderApiService.quoteApi(guoRenQuoteVo);
  168. }
  169. if("HTIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
  170. BaseQuoteVo<AccidentalDrivingVo> quoteVo1 = new BaseQuoteVo<>();
  171. AccidentalDrivingVo javaObject = new AccidentalDrivingVo();
  172. if(!Objects.isNull(quoteVo.getAccidentalDrivingVo())) {
  173. JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
  174. javaObject= jsonObject.toJavaObject(AccidentalDrivingVo.class);
  175. }
  176. BeanUtils.copyProperties(quoteVo,quoteVo1);
  177. quoteVo1.setAccidentalDrivingVo(javaObject);
  178. respVo = huaTaiOrderApiService.quote(quoteInfo, quoteVo1);
  179. }
  180. if("DJPC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
  181. respVo = daJiaOrderService.quote(quoteInfo, quoteVo);
  182. }
  183. if("BPIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
  184. BaseQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo1 = new BaseQuoteVo<>();
  185. JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
  186. BeanUtils.copyProperties(quoteVo, quoteVo1);
  187. if(jsonObject.size() > 0) {
  188. BoHaiQuoteAccidentVo javaObject = new BoHaiQuoteAccidentVo();
  189. javaObject.setPackageCode(jsonObject.getString("projectCode"));
  190. javaObject.setProductCode(jsonObject.getString("riskCode"));
  191. javaObject.setCopies(jsonObject.getString("quantity"));
  192. List<BoHaiQuoteAccidentVo> javaObjectList = new ArrayList<>();
  193. javaObjectList.add(javaObject);
  194. quoteVo1.setAccidentalDrivingVo(javaObjectList);
  195. }else{
  196. quoteVo1.setAccidentalDrivingVo(new ArrayList<>());
  197. }
  198. respVo = boHaiOrderApiService.quote(quoteInfo, quoteVo1);
  199. }
  200. if("CHAC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
  201. BaseQuoteVo<InsDrivingIntentionInsurance> quoteVo1 = new BaseQuoteVo<>();
  202. InsDrivingIntentionInsurance javaObject = new InsDrivingIntentionInsurance();
  203. if(!Objects.isNull(quoteVo.getAccidentalDrivingVo())) {
  204. JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
  205. javaObject = jsonObject.toJavaObject(InsDrivingIntentionInsurance.class);
  206. BeanUtils.copyProperties(quoteVo,quoteVo1);
  207. if(StringUtils.isNotBlank(javaObject.getProjectCode())){
  208. LambdaQueryWrapper<InsDrivingIntentionInsurance> wrapper = new LambdaQueryWrapper<>();
  209. wrapper.eq(InsDrivingIntentionInsurance::getProjectCode,javaObject.getProjectCode());
  210. InsDrivingIntentionInsurance insDrivingIntentionInsurance = insDrivingIntentionInsuranceService.getOne(wrapper);
  211. if (StringUtils.isNotBlank(insDrivingIntentionInsurance.getRelateCode())){
  212. javaObject.setProjectCode(insDrivingIntentionInsurance.getRelateCode());
  213. quoteVo1.setAccidentalDrivingVo(javaObject);
  214. }else{
  215. throw new SystemException("驾意险失效,请检查方案配置");
  216. }
  217. }else{
  218. quoteVo1.setAccidentalDrivingVo(javaObject);
  219. }
  220. }
  221. respVo = chengTaiOrderApiService.quoteApi(quoteInfo, quoteVo1);
  222. }
  223. if ("YGBX1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)) {
  224. BaseQuoteVo<List<YgQuoteAccidentVo>> quoteVo1 = new BaseQuoteVo<>();
  225. JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
  226. BeanUtils.copyProperties(quoteVo, quoteVo1);
  227. if(jsonObject.size() > 0) {
  228. YgQuoteAccidentVo ygQuoteAccidentVo = new YgQuoteAccidentVo();
  229. ygQuoteAccidentVo.setProductCode(jsonObject.getString("projectCode"));
  230. ygQuoteAccidentVo.setQuantityCasualty(jsonObject.getString("quantity"));
  231. List<YgQuoteAccidentVo> javaObjectList = new ArrayList<>();
  232. javaObjectList.add(ygQuoteAccidentVo);
  233. quoteVo1.setAccidentalDrivingVo(javaObjectList);
  234. } else {
  235. quoteVo1.setAccidentalDrivingVo(new ArrayList<>());
  236. }
  237. respVo = yangGuangOrderApiService.quote(quoteInfo, quoteVo1);
  238. }
  239. if("PAIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
  240. // BaseQuoteVo<AccidentalDrivingVo> quoteVo1 = new BaseQuoteVo<>();
  241. // JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
  242. // AccidentalDrivingVo javaObject = jsonObject.toJavaObject(AccidentalDrivingVo.class);
  243. // BeanUtils.copyProperties(quoteVo,quoteVo1);
  244. // quoteVo1.setAccidentalDrivingVo(javaObject);
  245. // return pingAnOrderApiService.quote(quoteInfo, quoteVo1);
  246. }
  247. PtlAgreementAttribution byId = ptlAgreementAttributionService.getById(quoteVo.getAgreementId());
  248. if( respVo != null && !ObjectUtils.isEmpty( respVo.getData() )){
  249. respVo.getData().setApiType(byId.getApiType());
  250. respVo.getData().setOrderstatus("0");
  251. }
  252. return respVo;
  253. }
  254. @PostMapping(value = "submitImage")
  255. public HttpResult submitImage(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
  256. InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
  257. PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
  258. if(Objects.isNull(ptlAgreementAttribution) || Objects.isNull(ptlAgreementAttribution.getApiType())){
  259. throw new SystemException("协议数据出错,请联系管理员");
  260. }
  261. HttpResult httpResult = null;
  262. //判断是否是爬虫
  263. if(ptlAgreementAttribution.getApiType() == 2){
  264. httpResult = insCrawlerOrderService.submitImage(companyId);
  265. }else if(ptlAgreementAttribution.getApiType() == 1){
  266. //渤海
  267. if(insAreaCompany.getCompanyId().equals("BPIC1000000")){
  268. httpResult = boHaiOrderApiService.submitImage(companyId);
  269. }
  270. //大家
  271. if(insAreaCompany.getCompanyId().equals("DJPC1000000")){
  272. httpResult = daJiaOrderService.submitImage(companyId);
  273. }
  274. //国任
  275. if(insAreaCompany.getCompanyId().equals("XDCX1000000")){
  276. httpResult = guorenOrderApiService.uploadImageApi(companyId);
  277. }
  278. //华泰
  279. if(insAreaCompany.getCompanyId().equals("HTIC1000000")){
  280. httpResult = huaTaiOrderApiService.submitImage(companyId);
  281. }
  282. //永安
  283. if(insAreaCompany.getCompanyId().equals("YAIC1000000")){
  284. httpResult = yongAnOrderService.submitImage(companyId);
  285. }
  286. //永诚
  287. if(insAreaCompany.getCompanyId().equals("AICS1000000")){
  288. httpResult = yongchengOrderApiService.uploadImageApi(companyId);
  289. }
  290. //中煤
  291. if(insAreaCompany.getCompanyId().equals("ZMBX1000000")){
  292. httpResult = zhongMeiOrderApiService.submitImage(companyId);
  293. }
  294. //紫金
  295. if(insAreaCompany.getCompanyId().equals("ZKIC1000000")){
  296. httpResult = zijinOrderApiService.submitImage(companyId);
  297. }
  298. //诚泰
  299. if(insAreaCompany.getCompanyId().equals("CHAC1000000")){
  300. httpResult = chengTaiOrderApiService.submitImages(companyId);
  301. }
  302. //阳光
  303. if (insAreaCompany.getCompanyId().equals("YGBX1000000")) {
  304. httpResult = yangGuangOrderApiService.upload(companyId);
  305. }
  306. }
  307. return httpResult;
  308. }
  309. @PostMapping(value = "batchOrderStatus")
  310. public HttpResult batchOrderStatus(@RequestSingleParam("orderNos") List<String> orderNos) throws Exception {
  311. List<InsAreaCompany> list = insAreaCompanyService.list(new LambdaQueryWrapper<InsAreaCompany>()
  312. .in(InsAreaCompany::getId, orderNos));
  313. list.forEach(item -> {
  314. //如果是爬虫的 先调用爬虫的查询订单状态
  315. if (Objects.isNull(item.getApiType()) || item.getApiType() == 2) {
  316. try {
  317. insCrawlerOrderService.verifyPayment(item.getId());
  318. }catch (Exception e){
  319. }
  320. }
  321. if (item.getCompanyId().equals("AICS1000000") && item.getApiType() == 1) {
  322. try {
  323. yongchengOrderApiService.callbackAnOrder(item.getId());
  324. }catch (Exception e){
  325. }
  326. } else if (item.getCompanyId().equals("ZMBX1000000") && item.getApiType() == 1) {
  327. try {
  328. zhongMeiOrderApiService.paymentEnquiry(item.getId());
  329. }catch (Exception e){}
  330. } else if (item.getCompanyId().equals("ZKIC1000000")) {
  331. try {
  332. zijinOrderApiService.auditStatusQuery(item.getId());
  333. }catch (Exception e){}
  334. } else if (item.getCompanyId().equals("XDCX1000000")) {
  335. try {
  336. guorenOrderApiService.pay(item.getId());
  337. }catch (Exception e){}
  338. } else if (item.getCompanyId().equals("YGBX1000000")) {
  339. try {
  340. yangGuangOrderApiService.paymentCallback(item.getId());
  341. } catch (JsonProcessingException e) {
  342. throw new RuntimeException(e);
  343. }
  344. } else if (item.getCompanyId().equals("HTIC1000000")) {
  345. try {
  346. huaTaiOrderApiService.paymentEnquiry(item.getId());
  347. }catch (Exception e){}
  348. } else if (item.getCompanyId().equals("DJPC1000000")) {
  349. try {
  350. daJiaOrderService.verifyPayment(item.getId());
  351. }catch (Exception e){}
  352. } else if (item.getCompanyId().equals("CHAC1000000")) {
  353. try {
  354. chengTaiOrderApiService.getPayUrl(item.getId());
  355. } catch (Exception e) {
  356. throw new RuntimeException(e);
  357. }
  358. } else if (item.getCompanyId().equals("BPIC1000000")) {
  359. try {
  360. boHaiOrderApiService.auditStatusQuery(item.getId());
  361. } catch (Exception e) {
  362. throw new RuntimeException(e);
  363. }
  364. }
  365. });
  366. return HttpResult.ok("查询成功");
  367. }
  368. }