From efa1e480fd211314f14b8d91d521b7b42fc1cd92 Mon Sep 17 00:00:00 2001 From: gaowdong Date: Thu, 13 Feb 2025 17:34:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20mq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/bonus/mq/MQTemplate.java | 4 +- .../rabbit/RabbitListenerConfiguration.java | 2 +- .../com/bonus/mq/rabbit/RabbitTemplate.java | 5 - .../bonus/mq/rabbit/tx/TxCheckJobHandler.java | 2 +- .../com/bonus/mq/rocket/RocketTemplate.java | 2 +- .../constants/AllocFunctionTypeEnum.java | 53 ++++ .../BasicsCanteenEvaluateController.java | 101 +++++++ .../allocation/advise/dto/EvaluateAddDTO.java | 142 ++++++++++ .../mapper/AllocPageDecorationMapper.java | 20 ++ .../mapper/BasicsCanteenEvaluateMapper.java | 24 ++ .../advise/model/AllocPageDecoration.java | 125 +++++++++ .../model/AllocPageDecorationModel.java | 56 ++++ .../advise/model/BasicsCanteenEvaluate.java | 260 ++++++++++++++++++ .../service/AllocPageDecorationService.java | 69 +++++ .../service/BasicsCanteenEvaluateService.java | 15 + .../BasicsCanteenEvaluateServiceImpl.java | 109 ++++++++ .../constants/CanteenConstants.java | 8 + .../RoutingDataSourceAutoConfiguration.java | 107 +++++++ .../tx/XDataSourceTransactionManager.java | 27 ++ .../dataset/tx/XJdbcTransactionManager.java | 27 ++ .../core/menu/vo/MenuEvaluateOrderPageVO.java | 6 +- .../merchant/constant/MerchantStatusEnum.java | 60 ++++ .../merchant/entity/MercMerchantInSystem.java | 255 +++++++++++++++++ .../mapper/MercMerchantInSystemMapper.java | 19 ++ .../mapper/HealthCustMedicalReportMapper.java | 14 + .../mapper/HealthMedicalReportTmplMapper.java | 14 + .../common/model/HealthCustMedicalReport.java | 117 ++++++++ .../model/HealthMedicalReportTemplate.java | 96 +++++++ .../HealthCustMedicalReportService.java | 38 +++ .../HealthMedicalReportTmplService.java | 30 ++ .../vo/HealthCustMedicalReportDetailVO.java | 58 ++++ .../vo/HealthCustMedicalReportProjectVO.java | 40 +++ .../common/vo/HealthCustMedicalReportVO.java | 72 +++++ .../common/vo/HealthMedicalReportTmplVO.java | 39 +++ .../HealthMobileMedicalReportController.java | 54 ++++ .../java/com/bonus/core/order/mq/MqUtil.java | 2 +- .../starter/data/DefaultDataSourceLoader.java | 84 ++++++ .../HealthCustMedicalReportMapper.xml | 15 + .../HealthMedicalReportTmplMapper.xml | 14 + 39 files changed, 2172 insertions(+), 13 deletions(-) create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/constants/AllocFunctionTypeEnum.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/controller/BasicsCanteenEvaluateController.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/dto/EvaluateAddDTO.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/mapper/AllocPageDecorationMapper.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/mapper/BasicsCanteenEvaluateMapper.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/AllocPageDecoration.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/AllocPageDecorationModel.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/BasicsCanteenEvaluate.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/AllocPageDecorationService.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/BasicsCanteenEvaluateService.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/impl/BasicsCanteenEvaluateServiceImpl.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/constants/CanteenConstants.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/RoutingDataSourceAutoConfiguration.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/tx/XDataSourceTransactionManager.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/tx/XJdbcTransactionManager.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/constant/MerchantStatusEnum.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/entity/MercMerchantInSystem.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/mapper/MercMerchantInSystemMapper.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/mapper/HealthCustMedicalReportMapper.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/mapper/HealthMedicalReportTmplMapper.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/model/HealthCustMedicalReport.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/model/HealthMedicalReportTemplate.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/service/HealthCustMedicalReportService.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/service/HealthMedicalReportTmplService.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportDetailVO.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportProjectVO.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportVO.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthMedicalReportTmplVO.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/mobile/controller/HealthMobileMedicalReportController.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/starter/data/DefaultDataSourceLoader.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/resources/mapper/nutrition.common/HealthCustMedicalReportMapper.xml create mode 100644 bonus-modules/bonus-smart-canteen/src/main/resources/mapper/nutrition.common/HealthMedicalReportTmplMapper.xml diff --git a/bonus-common-biz/src/main/java/com/bonus/mq/MQTemplate.java b/bonus-common-biz/src/main/java/com/bonus/mq/MQTemplate.java index 3d2a76ff..92405c65 100644 --- a/bonus-common-biz/src/main/java/com/bonus/mq/MQTemplate.java +++ b/bonus-common-biz/src/main/java/com/bonus/mq/MQTemplate.java @@ -27,12 +27,12 @@ public abstract class MQTemplate { return existTraceId == null ? UUID.randomUUID().toString() : existTraceId; } - public void sendDelay(String destination, Object payload, long delayTime) { + public void sendDelay(String destination, Object payload, int delayTime) { this.checkTopic(destination); this.sendDelayImpl(destination, payload, delayTime); } - protected abstract void sendDelayImpl(String destination, Object payload, long delayTime); + protected abstract void sendDelayImpl(String destination, Object payload, int delayTime); public void send(String destination, Object payload) { this.checkTopic(destination); diff --git a/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/RabbitListenerConfiguration.java b/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/RabbitListenerConfiguration.java index 8d3cbd16..c0b79a03 100644 --- a/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/RabbitListenerConfiguration.java +++ b/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/RabbitListenerConfiguration.java @@ -41,7 +41,7 @@ import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; import java.util.*; -//@Configuration +@Configuration public class RabbitListenerConfiguration implements RabbitListenerConfigurer { private static final Logger log = LoggerFactory.getLogger(RabbitListenerConfiguration.class); public static final String REDELIVERED_TIMES_HEADER_NAME = "__redelivered_times"; diff --git a/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/RabbitTemplate.java b/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/RabbitTemplate.java index 55092c56..a28636d2 100644 --- a/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/RabbitTemplate.java +++ b/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/RabbitTemplate.java @@ -62,11 +62,6 @@ public class RabbitTemplate extends MQTemplate { this.sendInternal(false, destination, payload, (Map)null, (String)null, delayTime, false); } - @Override - protected void sendDelayImpl(String destination, Object payload, long delayTime) { - - } - public void sendImpl(String destination, Object payload) { this.sendInternal(true, destination, payload, (Map)null, (String)null, (Integer) null, false); } diff --git a/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/tx/TxCheckJobHandler.java b/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/tx/TxCheckJobHandler.java index 24e30250..e764a340 100644 --- a/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/tx/TxCheckJobHandler.java +++ b/bonus-common-biz/src/main/java/com/bonus/mq/rabbit/tx/TxCheckJobHandler.java @@ -63,7 +63,7 @@ public class TxCheckJobHandler extends IJobHandler { if (transactionState == LocalTransactionState.COMMIT_MESSAGE) { if (message.getDelay() != null) { - long time2Delay = LocalDateTime.now().until(message.getCreateTime().plus(message.getDelay(), ChronoUnit.MILLIS), ChronoUnit.MILLIS); + int time2Delay = (int) LocalDateTime.now().until(message.getCreateTime().plus(message.getDelay(), ChronoUnit.MILLIS), ChronoUnit.MILLIS); if (time2Delay > 0L) { this.mqTemplate.sendDelay(message.getRoutingKey(), message.getPayload(), time2Delay); this.txMessageManager.afterSendSuccess(message.getId()); diff --git a/bonus-common-biz/src/main/java/com/bonus/mq/rocket/RocketTemplate.java b/bonus-common-biz/src/main/java/com/bonus/mq/rocket/RocketTemplate.java index 926495f2..92c68df5 100644 --- a/bonus-common-biz/src/main/java/com/bonus/mq/rocket/RocketTemplate.java +++ b/bonus-common-biz/src/main/java/com/bonus/mq/rocket/RocketTemplate.java @@ -42,7 +42,7 @@ public class RocketTemplate extends MQTemplate { this.converter = messageConverter; } - public void sendDelayImpl(String destination, Object payload, long delayTime) { + public void sendDelayImpl(String destination, Object payload, int delayTime) { Message message = MessageBuilder.withPayload(payload).setHeader("X-Trace-Id", this.getTraceId()).build(); SendResult sendResult = this.rocketMQTemplate.syncSendDelayTimeMills(destination, message, delayTime); if (sendResult.getSendStatus() != SendStatus.SEND_OK) { diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/constants/AllocFunctionTypeEnum.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/constants/AllocFunctionTypeEnum.java new file mode 100644 index 00000000..148c3683 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/constants/AllocFunctionTypeEnum.java @@ -0,0 +1,53 @@ +package com.bonus.core.allocation.advise.constants; + +public enum AllocFunctionTypeEnum { + FIRST_EDITION(1, "初版"), + CUSTOM(2, "自定义"); + + private final Integer key; + private final String value; + + private AllocFunctionTypeEnum(Integer key, String value) { + this.key = key; + this.value = value; + } + + public static Integer getKey(String value) { + AllocFunctionTypeEnum[] enums = values(); + AllocFunctionTypeEnum[] var2 = enums; + int var3 = enums.length; + + for(int var4 = 0; var4 < var3; ++var4) { + AllocFunctionTypeEnum temp = var2[var4]; + if (temp.getValue().equals(value)) { + return temp.getKey(); + } + } + + return null; + } + + public static String getValue(Integer key) { + AllocFunctionTypeEnum[] enums = values(); + AllocFunctionTypeEnum[] var2 = enums; + int var3 = enums.length; + + for(int var4 = 0; var4 < var3; ++var4) { + AllocFunctionTypeEnum temp = var2[var4]; + if (temp.getKey().equals(key)) { + return temp.getValue(); + } + } + + return null; + } + + public Integer getKey() { + return this.key; + } + + public String getValue() { + return this.value; + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/controller/BasicsCanteenEvaluateController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/controller/BasicsCanteenEvaluateController.java new file mode 100644 index 00000000..1c36cc8b --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/controller/BasicsCanteenEvaluateController.java @@ -0,0 +1,101 @@ +package com.bonus.core.allocation.advise.controller; + +import com.bonus.core.allocation.advise.dto.EvaluateAddDTO; +import com.bonus.core.allocation.advise.model.AllocPageDecorationModel; +import com.bonus.core.allocation.advise.service.AllocPageDecorationService; +import com.bonus.core.allocation.advise.service.BasicsCanteenEvaluateService; +import com.bonus.core.allocation.constants.CanteenConstants; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; +import java.io.IOException; +import java.util.Collections; +import java.util.List; + +@RestController +@RequestMapping({"/api/v1/canteen/evaluate"}) +@Api("食堂档口评价控制") +public class BasicsCanteenEvaluateController { + private static final Logger log = LoggerFactory.getLogger(BasicsCanteenEvaluateController.class); + @Lazy + @Autowired + private BasicsCanteenEvaluateService basicsCanteenEvaluateService; + @Autowired + @Lazy + private AllocPageDecorationService allocPageDecorationService; +// @Autowired +// @Lazy +// protected ExportApi exportApi; + +// @ApiOperation("分页查询评价信息") +// @PostMapping({"/page"}) +// @RequiresAuthentication +// public PageVO queryEvaluateByPage(@RequestBody @Valid LeRequest request) { +// return this.basicsCanteenEvaluateService.queryEvaluateByPage((EvaluateQueryDTO)request.getContent()); +// } +// +// @ApiOperation("导出查询评价信息") +// @PostMapping({"/export/page"}) +// public void exportEvaluateByPage(@RequestBody @Valid LeRequest request, HttpServletResponse response) throws IOException { +// ((EvaluateQueryDTO)request.getContent()).setSize(-1L); +// PageVO evaluateQueryVOPage = this.basicsCanteenEvaluateService.queryEvaluateByPage((EvaluateQueryDTO)request.getContent()); +// EasyExcelUtil.writeExcelByDownLoad(response, "食堂评价", EvaluateQueryVO.class, "详情", evaluateQueryVOPage.getRecords(), Collections.singletonList(new CustomLocalDateConverter())); +// } +// +// @ApiOperation("查询单条食堂评价详情") +// @PostMapping({"/get-evaluate-detail"}) +// public CanteenEvaluateDetailModel getEvaluateDetail(@RequestBody LeRequest request) { +// return this.basicsCanteenEvaluateService.getEvaluateDetail((Long)request.getContent()); +// } +// +// @ApiOperation("分页查询食堂评价统计") +// @PostMapping({"/page-evaluate-count"}) +// public CanteenEvaluateCountModel pageEvaluateCount(@RequestBody LeRequest request) { +// return this.basicsCanteenEvaluateService.pageEvaluateCount((EvaluateQueryDTO)request.getContent()); +// } + + @ApiOperation("新增食堂评价") + @PostMapping({"/addEvaluate"}) +// @RequiresGuest + public void addEvaluate(@RequestBody @Valid EvaluateAddDTO request) { + this.basicsCanteenEvaluateService.addEvaluate(request); + } + + @ApiOperation("查询食堂评价页面装修") + @PostMapping({"/query-page-decoration"}) + public List queryPageDecoration() { + return this.allocPageDecorationService.queryPageDecoration(CanteenConstants.PAGE_CANTEEN_EVALUATE); + } + +// @ApiOperation("查询食堂评价页面装修初版数据") +// @PostMapping({"/query-init-page-first"}) +// public List queryFirstPageDecoration(@RequestBody LeRequest request) { +// return this.allocPageDecorationService.queryFirstPageDecoration(CanteenConstants.PAGE_CANTEEN_EVALUATE); +// } +// +// @ApiOperation("保存食堂评价页面装修") +// @PostMapping({"/save-page-decoration"}) +// public void savePageDecoration(@RequestBody @Valid LeRequest> request) { +// this.allocPageDecorationService.savePageDecoration((List)request.getContent()); +// } +// +// @ApiOperation("食堂评价异步导出") +// @PostMapping({"/export/async"}) +// public LeResponse backStaffEmployeeExport(@RequestBody @Valid LeRequest request) { +// PageDTO page = (PageDTO)request.getContent(); +// EvaluateQueryDTO evaluateQueryDTO = (EvaluateQueryDTO)request.getContent(); +// this.exportApi.startExcelExportTaskByPage("评价管理", "食堂评价", EvaluateQueryVO.class, evaluateQueryDTO.getExportCols(), page, (Object)null, () -> { +// return this.basicsCanteenEvaluateService.queryEvaluateByPage((EvaluateQueryDTO)request.getContent()); +// }); +// return LeResponse.succ(); +// } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/dto/EvaluateAddDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/dto/EvaluateAddDTO.java new file mode 100644 index 00000000..d2fe018f --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/dto/EvaluateAddDTO.java @@ -0,0 +1,142 @@ +package com.bonus.core.allocation.advise.dto; + +import com.bonus.core.allocation.advise.model.BasicsCanteenEvaluate; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import javax.validation.constraints.NotNull; +import java.math.BigDecimal; +import java.util.Iterator; +import java.util.List; + +@ApiModel("食堂评价入参") +public class EvaluateAddDTO { + @ApiModelProperty("人员id") + private @NotNull( + message = "人员id, 不能为空" +) Long custId; + @ApiModelProperty("食堂id") + private @NotNull( + message = "食堂id, 不能为空" +) Long canteenId; + @ApiModelProperty("档口id") + private @NotNull( + message = "档口id, 不能为空" +) Long shopstallId; + @ApiModelProperty("食堂评价详情集合") + private List evaluateDetailList; + @ApiModelProperty("意见和建议") + private String proposal; + + public void convertData(BasicsCanteenEvaluate basicsCanteenEvaluate) { + Iterator var2 = this.getEvaluateDetailList().iterator(); + + while(var2.hasNext()) { + AddCanteenEvaluateDetailDTO detailModel = (AddCanteenEvaluateDetailDTO)var2.next(); + switch (detailModel.getFunctionId()) { + case 1: + basicsCanteenEvaluate.setAppearance(new BigDecimal(detailModel.getContent())); + break; + case 2: + basicsCanteenEvaluate.setAttitude(new BigDecimal(detailModel.getContent())); + break; + case 3: + basicsCanteenEvaluate.setTaste(new BigDecimal(detailModel.getContent())); + break; + case 4: + basicsCanteenEvaluate.setVarieties(new BigDecimal(detailModel.getContent())); + break; + case 5: + basicsCanteenEvaluate.setHygiene(new BigDecimal(detailModel.getContent())); + break; + case 6: + basicsCanteenEvaluate.setPrice(new BigDecimal(detailModel.getContent())); + break; + case 7: + basicsCanteenEvaluate.setWeight(new BigDecimal(detailModel.getContent())); + break; + case 8: + basicsCanteenEvaluate.setCustomize1(new BigDecimal(detailModel.getContent())); + break; + case 9: + basicsCanteenEvaluate.setCustomize2(new BigDecimal(detailModel.getContent())); + break; + case 10: + basicsCanteenEvaluate.setCustomize3(new BigDecimal(detailModel.getContent())); + break; + case 11: + basicsCanteenEvaluate.setCustomizeText1(detailModel.getContent()); + break; + case 12: + basicsCanteenEvaluate.setCustomizeText2(detailModel.getContent()); + } + } + + } + + public Long getCustId() { + return this.custId; + } + + public Long getCanteenId() { + return this.canteenId; + } + + public Long getShopstallId() { + return this.shopstallId; + } + + public List getEvaluateDetailList() { + return this.evaluateDetailList; + } + + public String getProposal() { + return this.proposal; + } + + public void setCustId(final Long custId) { + this.custId = custId; + } + + public void setCanteenId(final Long canteenId) { + this.canteenId = canteenId; + } + + public void setShopstallId(final Long shopstallId) { + this.shopstallId = shopstallId; + } + + public void setEvaluateDetailList(final List evaluateDetailList) { + this.evaluateDetailList = evaluateDetailList; + } + + public void setProposal(final String proposal) { + this.proposal = proposal; + } + + + @ApiModel("食堂评价详情 Model") + public static class AddCanteenEvaluateDetailDTO { + @ApiModelProperty("功能标识") + private Integer functionId; + @ApiModelProperty("内容") + private String content; + + public Integer getFunctionId() { + return this.functionId; + } + + public String getContent() { + return this.content; + } + + public void setFunctionId(final Integer functionId) { + this.functionId = functionId; + } + + public void setContent(final String content) { + this.content = content; + } + + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/mapper/AllocPageDecorationMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/mapper/AllocPageDecorationMapper.java new file mode 100644 index 00000000..4d07d878 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/mapper/AllocPageDecorationMapper.java @@ -0,0 +1,20 @@ +package com.bonus.core.allocation.advise.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.bonus.core.allocation.advise.model.AllocPageDecoration; +import com.bonus.core.allocation.advise.model.AllocPageDecorationModel; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +@Mapper +public interface AllocPageDecorationMapper extends BaseMapper { + @Select({"SELECT position_id, function_id, function_name, content_type FROM alloc_page_decoration WHERE apply_page = #{applyPage} AND function_type = #{functionType}"}) + List queryPageDecoration(@Param("applyPage") Integer applyPage, @Param("functionType") Integer functionType); + + @Delete({"DELETE FROM alloc_page_decoration WHERE apply_page = #{applyPage} AND function_type = #{functionType}"}) + void removeByApplyPage(@Param("applyPage") Integer applyPage, @Param("functionType") Integer functionType); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/mapper/BasicsCanteenEvaluateMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/mapper/BasicsCanteenEvaluateMapper.java new file mode 100644 index 00000000..77187483 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/mapper/BasicsCanteenEvaluateMapper.java @@ -0,0 +1,24 @@ +package com.bonus.core.allocation.advise.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.bonus.core.allocation.advise.model.BasicsCanteenEvaluate; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface BasicsCanteenEvaluateMapper extends BaseMapper { +// @LeNiuDataPermission( +// alias = "t4", +// permissionType = DataPermissionTypeEnum.PERMISSION_CANTEEN_STALL +// ) +// List queryEvaluateByPage(@Param("dto") EvaluateQueryDTO evaluateQueryDTO); +// +// @LeNiuDataPermission( +// alias = "t3", +// permissionType = DataPermissionTypeEnum.PERMISSION_CANTEEN_STALL +// ) +// Page pageEvaluateCount(Page page, @Param("dto") EvaluateQueryDTO pageDTO); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/AllocPageDecoration.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/AllocPageDecoration.java new file mode 100644 index 00000000..71c08a47 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/AllocPageDecoration.java @@ -0,0 +1,125 @@ +package com.bonus.core.allocation.advise.model; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDateTime; + +@TableName("alloc_page_decoration") +@ApiModel("页面装修表") +public class AllocPageDecoration { + @TableId + @ApiModelProperty("主键id") + private Long decorationId; + @ApiModelProperty("位置id") + private Integer positionId; + @ApiModelProperty("功能标识") + private Integer functionId; + @ApiModelProperty("功能名称") + private String functionName; + @ApiModelProperty("数据类型") + private Integer functionType; + @ApiModelProperty("内容类型") + private Integer contentType; + @ApiModelProperty("适用页面") + private Integer applyPage; + @ApiModelProperty("创建人") + private String crby; + @ApiModelProperty("创建时间") + private LocalDateTime crtime; + @ApiModelProperty("更新人") + private String upby; + @ApiModelProperty("更新时间") + private LocalDateTime uptime; + + public Long getDecorationId() { + return this.decorationId; + } + + public Integer getPositionId() { + return this.positionId; + } + + public Integer getFunctionId() { + return this.functionId; + } + + public String getFunctionName() { + return this.functionName; + } + + public Integer getFunctionType() { + return this.functionType; + } + + public Integer getContentType() { + return this.contentType; + } + + public Integer getApplyPage() { + return this.applyPage; + } + + public String getCrby() { + return this.crby; + } + + public LocalDateTime getCrtime() { + return this.crtime; + } + + public String getUpby() { + return this.upby; + } + + public LocalDateTime getUptime() { + return this.uptime; + } + + public void setDecorationId(final Long decorationId) { + this.decorationId = decorationId; + } + + public void setPositionId(final Integer positionId) { + this.positionId = positionId; + } + + public void setFunctionId(final Integer functionId) { + this.functionId = functionId; + } + + public void setFunctionName(final String functionName) { + this.functionName = functionName; + } + + public void setFunctionType(final Integer functionType) { + this.functionType = functionType; + } + + public void setContentType(final Integer contentType) { + this.contentType = contentType; + } + + public void setApplyPage(final Integer applyPage) { + this.applyPage = applyPage; + } + + public void setCrby(final String crby) { + this.crby = crby; + } + + public void setCrtime(final LocalDateTime crtime) { + this.crtime = crtime; + } + + public void setUpby(final String upby) { + this.upby = upby; + } + + public void setUptime(final LocalDateTime uptime) { + this.uptime = uptime; + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/AllocPageDecorationModel.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/AllocPageDecorationModel.java new file mode 100644 index 00000000..af6c29a9 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/AllocPageDecorationModel.java @@ -0,0 +1,56 @@ +package com.bonus.core.allocation.advise.model; + +import io.swagger.annotations.ApiModelProperty; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +public class AllocPageDecorationModel { + @ApiModelProperty("位置id") + private @NotNull( + message = "位置id 不能为空" +) Integer positionId; + @ApiModelProperty("功能标识") + private @NotNull( + message = "功能标识 不能为空" +) Integer functionId; + @ApiModelProperty("功能名称") + private @NotBlank( + message = "功能名称 不能为空" +) String functionName; + @ApiModelProperty("内容类型") + private Integer contentType; + + public Integer getPositionId() { + return this.positionId; + } + + public Integer getFunctionId() { + return this.functionId; + } + + public String getFunctionName() { + return this.functionName; + } + + public Integer getContentType() { + return this.contentType; + } + + public void setPositionId(final Integer positionId) { + this.positionId = positionId; + } + + public void setFunctionId(final Integer functionId) { + this.functionId = functionId; + } + + public void setFunctionName(final String functionName) { + this.functionName = functionName; + } + + public void setContentType(final Integer contentType) { + this.contentType = contentType; + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/BasicsCanteenEvaluate.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/BasicsCanteenEvaluate.java new file mode 100644 index 00000000..64305d01 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/model/BasicsCanteenEvaluate.java @@ -0,0 +1,260 @@ +package com.bonus.core.allocation.advise.model; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +@TableName("basics_canteen_evaluate") +@ApiModel("食堂评价") +public class BasicsCanteenEvaluate { + @ApiModelProperty("主键ID") + private Long id; + @ApiModelProperty("评价ID") + private Long evaluateId; + @ApiModelProperty("人员ID") + private Long custId; + @ApiModelProperty("食堂ID") + private Long canteenId; + @ApiModelProperty("档口ID") + private Long shopstallId; + @ApiModelProperty("评价日期") + private LocalDate evaluateDate; + @ApiModelProperty(" 仪容仪表评分") + private BigDecimal appearance; + @ApiModelProperty("员工服务态度评分") + private BigDecimal attitude; + @ApiModelProperty("菜品口味评分") + private BigDecimal taste; + @ApiModelProperty("菜肴花色品种评分") + private BigDecimal varieties; + @ApiModelProperty("菜肴食品卫生评分") + private BigDecimal hygiene; + @ApiModelProperty("饭菜价格评分") + private BigDecimal price; + @ApiModelProperty("饭菜份量评分") + private BigDecimal weight; + @ApiModelProperty("自定义评分1") + private BigDecimal customize1; + @ApiModelProperty("自定义评分2") + private BigDecimal customize2; + @ApiModelProperty("自定义评分3") + private BigDecimal customize3; + @ApiModelProperty("自定义文本1") + private String customizeText1; + @ApiModelProperty("自定义文本2") + private String customizeText2; + @ApiModelProperty("意见和建议") + private String proposal; + private Integer revision; + @TableField( + value = "crby", + fill = FieldFill.INSERT + ) + private String crby; + private LocalDateTime crtime; + @TableField( + value = "upby", + fill = FieldFill.UPDATE + ) + private String upby; + private LocalDateTime uptime; + + public Long getId() { + return this.id; + } + + public Long getEvaluateId() { + return this.evaluateId; + } + + public Long getCustId() { + return this.custId; + } + + public Long getCanteenId() { + return this.canteenId; + } + + public Long getShopstallId() { + return this.shopstallId; + } + + public LocalDate getEvaluateDate() { + return this.evaluateDate; + } + + public BigDecimal getAppearance() { + return this.appearance; + } + + public BigDecimal getAttitude() { + return this.attitude; + } + + public BigDecimal getTaste() { + return this.taste; + } + + public BigDecimal getVarieties() { + return this.varieties; + } + + public BigDecimal getHygiene() { + return this.hygiene; + } + + public BigDecimal getPrice() { + return this.price; + } + + public BigDecimal getWeight() { + return this.weight; + } + + public BigDecimal getCustomize1() { + return this.customize1; + } + + public BigDecimal getCustomize2() { + return this.customize2; + } + + public BigDecimal getCustomize3() { + return this.customize3; + } + + public String getCustomizeText1() { + return this.customizeText1; + } + + public String getCustomizeText2() { + return this.customizeText2; + } + + public String getProposal() { + return this.proposal; + } + + public Integer getRevision() { + return this.revision; + } + + public String getCrby() { + return this.crby; + } + + public LocalDateTime getCrtime() { + return this.crtime; + } + + public String getUpby() { + return this.upby; + } + + public LocalDateTime getUptime() { + return this.uptime; + } + + public void setId(final Long id) { + this.id = id; + } + + public void setEvaluateId(final Long evaluateId) { + this.evaluateId = evaluateId; + } + + public void setCustId(final Long custId) { + this.custId = custId; + } + + public void setCanteenId(final Long canteenId) { + this.canteenId = canteenId; + } + + public void setShopstallId(final Long shopstallId) { + this.shopstallId = shopstallId; + } + + public void setEvaluateDate(final LocalDate evaluateDate) { + this.evaluateDate = evaluateDate; + } + + public void setAppearance(final BigDecimal appearance) { + this.appearance = appearance; + } + + public void setAttitude(final BigDecimal attitude) { + this.attitude = attitude; + } + + public void setTaste(final BigDecimal taste) { + this.taste = taste; + } + + public void setVarieties(final BigDecimal varieties) { + this.varieties = varieties; + } + + public void setHygiene(final BigDecimal hygiene) { + this.hygiene = hygiene; + } + + public void setPrice(final BigDecimal price) { + this.price = price; + } + + public void setWeight(final BigDecimal weight) { + this.weight = weight; + } + + public void setCustomize1(final BigDecimal customize1) { + this.customize1 = customize1; + } + + public void setCustomize2(final BigDecimal customize2) { + this.customize2 = customize2; + } + + public void setCustomize3(final BigDecimal customize3) { + this.customize3 = customize3; + } + + public void setCustomizeText1(final String customizeText1) { + this.customizeText1 = customizeText1; + } + + public void setCustomizeText2(final String customizeText2) { + this.customizeText2 = customizeText2; + } + + public void setProposal(final String proposal) { + this.proposal = proposal; + } + + public void setRevision(final Integer revision) { + this.revision = revision; + } + + public void setCrby(final String crby) { + this.crby = crby; + } + + public void setCrtime(final LocalDateTime crtime) { + this.crtime = crtime; + } + + public void setUpby(final String upby) { + this.upby = upby; + } + + public void setUptime(final LocalDateTime uptime) { + this.uptime = uptime; + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/AllocPageDecorationService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/AllocPageDecorationService.java new file mode 100644 index 00000000..7d5b5c32 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/AllocPageDecorationService.java @@ -0,0 +1,69 @@ +package com.bonus.core.allocation.advise.service; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.bonus.core.allocation.advise.constants.AllocFunctionTypeEnum; +import com.bonus.core.allocation.advise.mapper.AllocPageDecorationMapper; +import com.bonus.core.allocation.advise.model.AllocPageDecoration; +import com.bonus.core.allocation.advise.model.AllocPageDecorationModel; +import com.google.common.collect.Lists; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import java.lang.invoke.SerializedLambda; +import java.util.Iterator; +import java.util.List; + +@Service +public class AllocPageDecorationService extends ServiceImpl { + private static final Logger log = LoggerFactory.getLogger(AllocPageDecorationService.class); + + public List queryPageDecoration(Integer applyPage) { + List decorationModelList = ((AllocPageDecorationMapper)this.baseMapper) + .queryPageDecoration(applyPage, AllocFunctionTypeEnum.CUSTOM.getKey()); + return CollUtil.isNotEmpty(decorationModelList) ? decorationModelList : this.getInitModelList(applyPage, true); + } + +// public List queryFirstPageDecoration(Integer applyPage) { +// return this.getInitModelList(applyPage, false); +// } + + private List getInitModelList(Integer applyPage, boolean filterFlag) { + List initModelList = ((AllocPageDecorationMapper)this.baseMapper) + .queryPageDecoration(applyPage, AllocFunctionTypeEnum.FIRST_EDITION.getKey()); + if (!filterFlag) { + return initModelList; + } else { + initModelList.removeIf((decorationModel) -> { + return decorationModel.getFunctionName().contains("自定义"); + }); + return initModelList; + } + } +// +// public void savePageDecoration(List decorationModelList) { +// if (CollUtil.isEmpty(decorationModelList)) { +// throw new LeException(I18n.getMessage("alloc_page_decoration_no_content", new Object[0])); +// } else { +// ((AllocPageDecorationMapper)this.baseMapper).removeByApplyPage(CanteenConstants.PAGE_CANTEEN_EVALUATE, AllocFunctionTypeEnum.CUSTOM.getKey()); +// List addList = Lists.newArrayList(); +// Iterator var3 = decorationModelList.iterator(); +// +// while(var3.hasNext()) { +// AllocPageDecorationModel decorationModel = (AllocPageDecorationModel)var3.next(); +// AllocPageDecoration addDecoration = new AllocPageDecoration(); +// LeBeanUtil.copyProperties(decorationModel, addDecoration); +// addDecoration.setDecorationId(Id.next()); +// addDecoration.setFunctionType(AllocFunctionTypeEnum.CUSTOM.getKey()); +// addList.add(addDecoration); +// this.update((Wrapper)((LambdaUpdateWrapper)((LambdaUpdateWrapper)((LambdaUpdateWrapper)Wrappers.lambdaUpdate(AllocPageDecoration.class).set(AllocPageDecoration::getFunctionName, decorationModel.getFunctionName())).eq(AllocPageDecoration::getApplyPage, CanteenConstants.PAGE_CANTEEN_EVALUATE)).eq(AllocPageDecoration::getFunctionType, AllocFunctionTypeEnum.FIRST_EDITION.getKey())).eq(AllocPageDecoration::getFunctionId, decorationModel.getFunctionId())); +// } +// +// this.saveBatch(addList); +// } +// } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/BasicsCanteenEvaluateService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/BasicsCanteenEvaluateService.java new file mode 100644 index 00000000..f1a3e161 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/BasicsCanteenEvaluateService.java @@ -0,0 +1,15 @@ +package com.bonus.core.allocation.advise.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.bonus.core.allocation.advise.dto.EvaluateAddDTO; +import com.bonus.core.allocation.advise.model.BasicsCanteenEvaluate; + +public interface BasicsCanteenEvaluateService extends IService { +// PageVO queryEvaluateByPage(EvaluateQueryDTO evaluateQueryDTO); +// +// CanteenEvaluateDetailModel getEvaluateDetail(Long evaluateId); +// +// CanteenEvaluateCountModel pageEvaluateCount(EvaluateQueryDTO pageDTO); + + void addEvaluate(EvaluateAddDTO addDTO); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/impl/BasicsCanteenEvaluateServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/impl/BasicsCanteenEvaluateServiceImpl.java new file mode 100644 index 00000000..e3361625 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/advise/service/impl/BasicsCanteenEvaluateServiceImpl.java @@ -0,0 +1,109 @@ +package com.bonus.core.allocation.advise.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.bonus.core.allocation.advise.dto.EvaluateAddDTO; +import com.bonus.core.allocation.advise.mapper.BasicsCanteenEvaluateMapper; +import com.bonus.core.allocation.advise.model.BasicsCanteenEvaluate; +import com.bonus.core.allocation.advise.service.BasicsCanteenEvaluateService; +import com.bonus.utils.id.Id; +import com.github.pagehelper.PageHelper; +import io.swagger.annotations.ApiModelProperty; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; + +import java.lang.invoke.SerializedLambda; +import java.time.LocalDate; +import java.util.Iterator; +import java.util.List; + +@Service +public class BasicsCanteenEvaluateServiceImpl extends ServiceImpl implements BasicsCanteenEvaluateService { + private static final Logger log = LoggerFactory.getLogger(BasicsCanteenEvaluateServiceImpl.class); +// @Autowired +// @Lazy +// private AllocPageDecorationService allocPageDecorationService; +// @ApiModelProperty +// @Autowired +// private AllocCanteenApi allocCanteenApi; + +// public PageVO queryEvaluateByPage(EvaluateQueryDTO evaluateQueryDTO) { +// if (CollUtil.isNotEmpty(evaluateQueryDTO.getAreaIdList()) && ObjectUtil.isEmpty(evaluateQueryDTO.getCanteenIdList())) { +// evaluateQueryDTO.setCanteenIdList(this.allocCanteenApi.getCanteenIdListByAreaIdList((List)evaluateQueryDTO.getAreaIdList())); +// } +// +// PageHelper.startPage(evaluateQueryDTO); +// List resultList = ((BasicsCanteenEvaluateMapper)this.baseMapper).queryEvaluateByPage(evaluateQueryDTO); +// return PageVO.of(resultList); +// } +// +// public CanteenEvaluateDetailModel getEvaluateDetail(Long evaluateId) { +// BasicsCanteenEvaluate canteenEvaluate = (BasicsCanteenEvaluate)this.getOne((Wrapper)Wrappers.lambdaQuery(BasicsCanteenEvaluate.class).eq(BasicsCanteenEvaluate::getEvaluateId, evaluateId)); +// List decorationList = this.allocPageDecorationService.queryPageDecoration(CanteenConstants.PAGE_CANTEEN_EVALUATE); +// CanteenEvaluateDetailModel detailModel = new CanteenEvaluateDetailModel(); +// detailModel.convertTitle(decorationList); +// detailModel.convertData(canteenEvaluate); +// return detailModel; +// } +// +// public CanteenEvaluateCountModel pageEvaluateCount(EvaluateQueryDTO pageDTO) { +// if (CollUtil.isNotEmpty(pageDTO.getAreaIdList()) && ObjectUtil.isEmpty(pageDTO.getCanteenIdList())) { +// List canteenIdListByAreaIdList = this.allocCanteenApi.getCanteenIdListByAreaIdList((List)pageDTO.getAreaIdList()); +// if (ObjectUtil.isEmpty(canteenIdListByAreaIdList)) { +// return null; +// } +// +// pageDTO.setCanteenIdList(this.allocCanteenApi.getCanteenIdListByAreaIdList((List)pageDTO.getAreaIdList())); +// } +// +// Page page = new Page(pageDTO.getCurrent(), pageDTO.getSize()); +// Page countVOPage = ((BasicsCanteenEvaluateMapper)this.baseMapper).pageEvaluateCount(page, pageDTO); +// CanteenEvaluateCountModel countModel = new CanteenEvaluateCountModel(); +// if (CollUtil.isEmpty(countVOPage.getRecords())) { +// return countModel; +// } else { +// List decorationList = this.allocPageDecorationService.queryPageDecoration(CanteenConstants.PAGE_CANTEEN_EVALUATE); +// Iterator it = decorationList.iterator(); +// +// while(it.hasNext()) { +// AllocPageDecorationModel decorationModel = (AllocPageDecorationModel)it.next(); +// if (LeConstants.COMMON_NO.equals(decorationModel.getContentType())) { +// it.remove(); +// } +// } +// +// countModel.convertTitle(decorationList); +// countModel.convertData(countVOPage); +// return countModel; +// } +// } + + public void addEvaluate(EvaluateAddDTO addDTO) { + BasicsCanteenEvaluate basicsCanteenEvaluate = new BasicsCanteenEvaluate(); + BeanUtils.copyProperties(addDTO, basicsCanteenEvaluate); + basicsCanteenEvaluate.setEvaluateId(Id.next()); + basicsCanteenEvaluate.setEvaluateDate(LocalDate.now()); + addDTO.convertData(basicsCanteenEvaluate); + this.save(basicsCanteenEvaluate); + } + + // $FF: synthetic method +// private static Object $deserializeLambda$(SerializedLambda lambda) { +// switch (lambda.getImplMethodName()) { +// case "getEvaluateId": +// if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/advise/model/BasicsCanteenEvaluate") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { +// return BasicsCanteenEvaluate::getEvaluateId; +// } +// default: +// throw new IllegalArgumentException("Invalid lambda deserialization"); +// } +// } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/constants/CanteenConstants.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/constants/CanteenConstants.java new file mode 100644 index 00000000..7e521d10 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/allocation/constants/CanteenConstants.java @@ -0,0 +1,8 @@ +package com.bonus.core.allocation.constants; + +public interface CanteenConstants { + String INIT_NUM = "01"; + String LINE_THROUGH = "-"; + Integer PAGE_CANTEEN_EVALUATE = 1; + String DEFAULT_AREA_NUM = "99"; +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/RoutingDataSourceAutoConfiguration.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/RoutingDataSourceAutoConfiguration.java new file mode 100644 index 00000000..afe76c72 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/RoutingDataSourceAutoConfiguration.java @@ -0,0 +1,107 @@ +package com.bonus.core.data.dataset; + +import com.bonus.core.data.dataset.rule.RoutingRule; +import com.bonus.core.data.dataset.rule.loader.RouterLoader; +import com.bonus.core.data.dataset.tx.XDataSourceTransactionManager; +import com.bonus.core.data.dataset.tx.XJdbcTransactionManager; +import com.bonus.core.tenant.TenantLoader; +import com.google.common.collect.Sets; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.ObjectProvider; +import org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.core.env.Environment; +import org.springframework.jdbc.datasource.DataSourceTransactionManager; +import org.springframework.transaction.support.TransactionTemplate; + +import javax.sql.DataSource; + +//@AutoConfiguration( +// before = {DataSourceAutoConfiguration.class} +//) +//@EnableConfigurationProperties({RoutingDataSourceProperties.class}) +@Configuration +public class RoutingDataSourceAutoConfiguration implements ApplicationContextAware { + private static ApplicationContext applicationContext; + + public RoutingDataSourceAutoConfiguration(ObjectProvider routerLoaderProvider, + ObjectProvider tenantLoaderObjectProvider + ) { + RoutingRule.setRouterLoader(routerLoaderProvider.getIfAvailable(() -> { + return (key) -> { + return null; + }; + })); + Executors.tenantLoader = tenantLoaderObjectProvider.getIfAvailable(() -> { + return () -> { + return Sets.newHashSetWithExpectedSize(0); + }; + }); +// DatasetMigration.redissonClient = redissonClient; + } + +// @ConditionalOnMissingBean +// @Bean +// public RoutingDataSource routingDataSource(RoutingDataSourceProperties routingDataSourceProperties, ObjectProvider dataSourceLoaderProviderLoaderProvider, ObjectProvider migrationProviderObjectProvider, ObjectProvider> dataMigrateObjectProvider) { +// RoutingDataSource routingDataSource = new RoutingDataSource(routingDataSourceProperties.systemDatasource(), routingDataSourceProperties.globalTsDatasource(), routingDataSourceProperties.businessDatasource(), routingDataSourceProperties.getDynamicBusinessConfig(), (DataSourceLoader)dataSourceLoaderProviderLoaderProvider.getIfAvailable(() -> { +// return null; +// })); +// DatasetMigration.routingDataSource = routingDataSource; +// DatasetMigration.migrationProvider = (MigrationProvider)migrationProviderObjectProvider.getIfUnique(DefaultMigrationProvider::new); +// DatasetMigration.locationRefDataMigrates = dataMigrateObjectProvider.getIfAvailable() == null ? Collections.emptyMap() : (Map)((List)dataMigrateObjectProvider.getIfAvailable()).stream().collect(Collectors.groupingBy(AbstractDataMigrator::getLocation)); +// return routingDataSource; +// } +// +// @Bean +// @ConditionalOnMissingBean({TransactionManager.class}) +// public DataSourceTransactionManager transactionManager(Environment environment, DataSource dataSource, ObjectProvider transactionManagerCustomizers) { +// return this.newTransactionManager(environment, dataSource, transactionManagerCustomizers); +// } + + private DataSourceTransactionManager newTransactionManager(Environment environment, DataSource dataSource, ObjectProvider transactionManagerCustomizers) { + DataSourceTransactionManager transactionManager = this.createTransactionManager(environment, dataSource); + transactionManagerCustomizers.ifAvailable((customizers) -> { + customizers.customize(transactionManager); + }); + return transactionManager; + } + + private DataSourceTransactionManager createTransactionManager(Environment environment, DataSource dataSource) { + return environment.getProperty("spring.dao.exceptiontranslation.enabled", Boolean.class, Boolean.TRUE) + ? new XJdbcTransactionManager(dataSource) : new XDataSourceTransactionManager(dataSource); + } + + @Bean + @Primary + public TransactionTemplate transactionTemplate(DataSourceTransactionManager transactionManager) { + TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager); + transactionTemplate.setPropagationBehavior(3); + transactionTemplate.setIsolationLevel(2); + transactionTemplate.setTimeout(transactionManager.getDefaultTimeout()); + Executors.transactionTemplate = transactionTemplate; + return transactionTemplate; + } + + @Bean + public TransactionTemplate notSupportedTransactionTemplate(Environment environment, DataSource dataSource, ObjectProvider transactionManagerCustomizers) { + DataSourceTransactionManager transactionManager = this.newTransactionManager(environment, dataSource, transactionManagerCustomizers); + transactionManager.setTransactionSynchronization(2); + TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager); + transactionTemplate.setPropagationBehavior(4); + transactionTemplate.setTimeout(transactionManager.getDefaultTimeout()); + Executors.notSupportedTransactionTemplate = transactionTemplate; + return transactionTemplate; + } + + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + RoutingDataSourceAutoConfiguration.applicationContext = applicationContext; + } + + public static ApplicationContext getApplicationContext() { + return applicationContext; + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/tx/XDataSourceTransactionManager.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/tx/XDataSourceTransactionManager.java new file mode 100644 index 00000000..92e806ad --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/tx/XDataSourceTransactionManager.java @@ -0,0 +1,27 @@ +package com.bonus.core.data.dataset.tx; + +import com.bonus.core.data.dataset.rule.RoutingRule; +import org.springframework.jdbc.datasource.DataSourceTransactionManager; +import org.springframework.transaction.TransactionDefinition; + +import javax.sql.DataSource; + +public class XDataSourceTransactionManager extends DataSourceTransactionManager { + public XDataSourceTransactionManager(DataSource dataSource) { + super(dataSource); + } + + protected void doBegin(Object transaction, TransactionDefinition definition) { + RoutingRule.accessMaster(); + super.doBegin(transaction, definition); + } + + protected void doCleanupAfterCompletion(Object transaction) { + try { + super.doCleanupAfterCompletion(transaction); + } finally { + RoutingRule.resetAccess(); + } + + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/tx/XJdbcTransactionManager.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/tx/XJdbcTransactionManager.java new file mode 100644 index 00000000..eb633f26 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/data/dataset/tx/XJdbcTransactionManager.java @@ -0,0 +1,27 @@ +package com.bonus.core.data.dataset.tx; + +import com.bonus.core.data.dataset.rule.RoutingRule; +import org.springframework.jdbc.support.JdbcTransactionManager; +import org.springframework.transaction.TransactionDefinition; + +import javax.sql.DataSource; + +public class XJdbcTransactionManager extends JdbcTransactionManager { + public XJdbcTransactionManager(DataSource dataSource) { + super(dataSource); + } + + protected void doBegin(Object transaction, TransactionDefinition definition) { + RoutingRule.accessMaster(); + super.doBegin(transaction, definition); + } + + protected void doCleanupAfterCompletion(Object transaction) { + try { + super.doCleanupAfterCompletion(transaction); + } finally { + RoutingRule.resetAccess(); + } + + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/menu/vo/MenuEvaluateOrderPageVO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/menu/vo/MenuEvaluateOrderPageVO.java index 81adc724..d93b3e54 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/menu/vo/MenuEvaluateOrderPageVO.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/menu/vo/MenuEvaluateOrderPageVO.java @@ -4,6 +4,8 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; +import com.bonus.core.common.encrypt.LeNiuDecryptDataProcess; +import com.bonus.core.common.encrypt.LeNiuDecryptField; import com.bonus.core.common.utils.CustomLocalDateTimeConverter; import com.bonus.core.common.utils.DishesConverter; import com.bonus.core.common.utils.SysUtil; @@ -15,7 +17,7 @@ import java.time.LocalDateTime; import java.util.List; @ApiModel("获取评价列表(pc端)") -//@LeNiuDecryptDataProcess +@LeNiuDecryptDataProcess public class MenuEvaluateOrderPageVO { @ExcelIgnore @ApiModelProperty("评价id") @@ -31,7 +33,7 @@ public class MenuEvaluateOrderPageVO { order = 1 ) @ApiModelProperty("用户姓名") -// @LeNiuDecryptField + @LeNiuDecryptField private String custName; @ExcelProperty( value = {"所属区域"}, diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/constant/MerchantStatusEnum.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/constant/MerchantStatusEnum.java new file mode 100644 index 00000000..a1245108 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/constant/MerchantStatusEnum.java @@ -0,0 +1,60 @@ +package com.bonus.core.merchant.constant; + +public enum MerchantStatusEnum { + NORMAL(1, "正常"), + PULL_BLACK(2, "拉黑"), + MATURITY(3, "到期"), + UNAUDITED(4, "未审核"), + INITIALIZING(5, "初始化中"); + + private final Integer key; + private final String value; + + private MerchantStatusEnum(Integer key, String value) { + this.key = key; + this.value = value; + } + + public static Integer getKey(String value) { + MerchantStatusEnum[] enums = values(); + MerchantStatusEnum[] var2 = enums; + int var3 = enums.length; + + for(int var4 = 0; var4 < var3; ++var4) { + MerchantStatusEnum item = var2[var4]; + if (item.value().equals(value)) { + return item.key(); + } + } + + return null; + } + + public static String getValue(Integer key) { + MerchantStatusEnum[] enums = values(); + MerchantStatusEnum[] var2 = enums; + int var3 = enums.length; + + for(int var4 = 0; var4 < var3; ++var4) { + MerchantStatusEnum item = var2[var4]; + if (item.key().equals(key)) { + return item.value(); + } + } + + return null; + } + + public Integer key() { + return this.key; + } + + public String value() { + return this.value; + } + + // $FF: synthetic method + private static MerchantStatusEnum[] $values() { + return new MerchantStatusEnum[]{NORMAL, PULL_BLACK, MATURITY, UNAUDITED, INITIALIZING}; + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/entity/MercMerchantInSystem.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/entity/MercMerchantInSystem.java new file mode 100644 index 00000000..144eedf7 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/entity/MercMerchantInSystem.java @@ -0,0 +1,255 @@ +package com.bonus.core.merchant.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDateTime; + +@TableName("merc_merchant") +public class MercMerchantInSystem extends Model { + private static final long serialVersionUID = 1L; + @TableId + @ApiModelProperty("商家id") + private Long tenantId; + @ApiModelProperty("第三方商户id") + private String thirdMerchantId; + @ApiModelProperty("公司名称") + private String merchantName; + @ApiModelProperty("食堂或餐厅名称") + private String canteenName; + @ApiModelProperty("联系人姓名") + private String linkman; + @ApiModelProperty("手机号") + private String linkmanNumber; + @ApiModelProperty("登录密码") + private String password; + @ApiModelProperty("区域省市区详细地址") + private String address; + @ApiModelProperty("入驻日期") + private LocalDateTime startTime; + @ApiModelProperty("授权用户数") + private Integer userCount; + @ApiModelProperty("授权截止日期") + private LocalDateTime endTime; + @ApiModelProperty("管理员名称") + private String adminName; + @ApiModelProperty("邮箱") + private String email; + @ApiModelProperty("微信") + private String wechat; + @ApiModelProperty("状态") + private Integer status; + @ApiModelProperty("乐观锁") + private Integer revision; + @ApiModelProperty("创建人") + private String crby; + @ApiModelProperty("创建时间") + private LocalDateTime crtime; + @ApiModelProperty("更新人") + private String upby; + @ApiModelProperty("更新时间") + private LocalDateTime uptime; + private String dataset; + @TableField("`schema`") + private String schema; + @ApiModelProperty("人员id限制标识,1:开启,2:关闭") + private Integer limitFlag; + @ApiModelProperty("展示服务器信息,1:开启,2:关闭") + private Integer serverFlag; + + public Long getTenantId() { + return this.tenantId; + } + + public String getThirdMerchantId() { + return this.thirdMerchantId; + } + + public String getMerchantName() { + return this.merchantName; + } + + public String getCanteenName() { + return this.canteenName; + } + + public String getLinkman() { + return this.linkman; + } + + public String getLinkmanNumber() { + return this.linkmanNumber; + } + + public String getPassword() { + return this.password; + } + + public String getAddress() { + return this.address; + } + + public LocalDateTime getStartTime() { + return this.startTime; + } + + public Integer getUserCount() { + return this.userCount; + } + + public LocalDateTime getEndTime() { + return this.endTime; + } + + public String getAdminName() { + return this.adminName; + } + + public String getEmail() { + return this.email; + } + + public String getWechat() { + return this.wechat; + } + + public Integer getStatus() { + return this.status; + } + + public Integer getRevision() { + return this.revision; + } + + public String getCrby() { + return this.crby; + } + + public LocalDateTime getCrtime() { + return this.crtime; + } + + public String getUpby() { + return this.upby; + } + + public LocalDateTime getUptime() { + return this.uptime; + } + + public String getDataset() { + return this.dataset; + } + + public String getSchema() { + return this.schema; + } + + public Integer getLimitFlag() { + return this.limitFlag; + } + + public Integer getServerFlag() { + return this.serverFlag; + } + + public void setTenantId(final Long tenantId) { + this.tenantId = tenantId; + } + + public void setThirdMerchantId(final String thirdMerchantId) { + this.thirdMerchantId = thirdMerchantId; + } + + public void setMerchantName(final String merchantName) { + this.merchantName = merchantName; + } + + public void setCanteenName(final String canteenName) { + this.canteenName = canteenName; + } + + public void setLinkman(final String linkman) { + this.linkman = linkman; + } + + public void setLinkmanNumber(final String linkmanNumber) { + this.linkmanNumber = linkmanNumber; + } + + public void setPassword(final String password) { + this.password = password; + } + + public void setAddress(final String address) { + this.address = address; + } + + public void setStartTime(final LocalDateTime startTime) { + this.startTime = startTime; + } + + public void setUserCount(final Integer userCount) { + this.userCount = userCount; + } + + public void setEndTime(final LocalDateTime endTime) { + this.endTime = endTime; + } + + public void setAdminName(final String adminName) { + this.adminName = adminName; + } + + public void setEmail(final String email) { + this.email = email; + } + + public void setWechat(final String wechat) { + this.wechat = wechat; + } + + public void setStatus(final Integer status) { + this.status = status; + } + + public void setRevision(final Integer revision) { + this.revision = revision; + } + + public void setCrby(final String crby) { + this.crby = crby; + } + + public void setCrtime(final LocalDateTime crtime) { + this.crtime = crtime; + } + + public void setUpby(final String upby) { + this.upby = upby; + } + + public void setUptime(final LocalDateTime uptime) { + this.uptime = uptime; + } + + public void setDataset(final String dataset) { + this.dataset = dataset; + } + + public void setSchema(final String schema) { + this.schema = schema; + } + + public void setLimitFlag(final Integer limitFlag) { + this.limitFlag = limitFlag; + } + + public void setServerFlag(final Integer serverFlag) { + this.serverFlag = serverFlag; + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/mapper/MercMerchantInSystemMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/mapper/MercMerchantInSystemMapper.java new file mode 100644 index 00000000..6fd48c85 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/merchant/mapper/MercMerchantInSystemMapper.java @@ -0,0 +1,19 @@ +package com.bonus.core.merchant.mapper; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.bonus.core.merchant.entity.MercMerchantInSystem; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +@Mapper +public interface MercMerchantInSystemMapper extends BaseMapper { + @Select({"select tenant_id from merc_merchant where status = #{status}"}) + List selectAllMerchantId(@Param("status") Integer status); + + @Select({"select tenant_id, merchant_name from merc_merchant ${ew.customSqlSegment}"}) + List selectMerchantIdAndNameListByWrapper(@Param("ew") Wrapper wrapper); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/mapper/HealthCustMedicalReportMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/mapper/HealthCustMedicalReportMapper.java new file mode 100644 index 00000000..82300479 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/mapper/HealthCustMedicalReportMapper.java @@ -0,0 +1,14 @@ +package com.bonus.core.nutrition.common.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.bonus.core.nutrition.common.model.HealthCustMedicalReport; +import com.bonus.core.nutrition.common.vo.HealthCustMedicalReportVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface HealthCustMedicalReportMapper extends BaseMapper { + List listMedicalReport(@Param("custId") Long custId); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/mapper/HealthMedicalReportTmplMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/mapper/HealthMedicalReportTmplMapper.java new file mode 100644 index 00000000..7c880d56 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/mapper/HealthMedicalReportTmplMapper.java @@ -0,0 +1,14 @@ +package com.bonus.core.nutrition.common.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.bonus.core.nutrition.common.model.HealthMedicalReportTemplate; +import com.bonus.core.nutrition.common.vo.HealthMedicalReportTmplVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface HealthMedicalReportTmplMapper extends BaseMapper { + List listTemplate(); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/model/HealthCustMedicalReport.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/model/HealthCustMedicalReport.java new file mode 100644 index 00000000..8dc2609d --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/model/HealthCustMedicalReport.java @@ -0,0 +1,117 @@ +package com.bonus.core.nutrition.common.model; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.time.LocalDate; +import java.time.LocalDateTime; + +@TableName("health_cust_medical_report") +@ApiModel("人员体检报告表") +public class HealthCustMedicalReport implements Serializable { + @TableId + @ApiModelProperty("主键自增") + private Long id; + @ApiModelProperty("体检id") + private Long medicalId; + @ApiModelProperty("人员id") + private Long custId; + @ApiModelProperty("体检日期") + private LocalDate medicalDate; + @ApiModelProperty("体检机构") + private String medicalMechanism; + @ApiModelProperty("体检模板id") + private Long medicalTemplateId; + @ApiModelProperty("创建人") + private String crby; + @ApiModelProperty("创建时间") + private LocalDateTime crtime; + @ApiModelProperty("更新人") + private String upby; + @ApiModelProperty("更新时间") + private LocalDateTime uptime; + + public Long getId() { + return this.id; + } + + public Long getMedicalId() { + return this.medicalId; + } + + public Long getCustId() { + return this.custId; + } + + public LocalDate getMedicalDate() { + return this.medicalDate; + } + + public String getMedicalMechanism() { + return this.medicalMechanism; + } + + public Long getMedicalTemplateId() { + return this.medicalTemplateId; + } + + public String getCrby() { + return this.crby; + } + + public LocalDateTime getCrtime() { + return this.crtime; + } + + public String getUpby() { + return this.upby; + } + + public LocalDateTime getUptime() { + return this.uptime; + } + + public void setId(final Long id) { + this.id = id; + } + + public void setMedicalId(final Long medicalId) { + this.medicalId = medicalId; + } + + public void setCustId(final Long custId) { + this.custId = custId; + } + + public void setMedicalDate(final LocalDate medicalDate) { + this.medicalDate = medicalDate; + } + + public void setMedicalMechanism(final String medicalMechanism) { + this.medicalMechanism = medicalMechanism; + } + + public void setMedicalTemplateId(final Long medicalTemplateId) { + this.medicalTemplateId = medicalTemplateId; + } + + public void setCrby(final String crby) { + this.crby = crby; + } + + public void setCrtime(final LocalDateTime crtime) { + this.crtime = crtime; + } + + public void setUpby(final String upby) { + this.upby = upby; + } + + public void setUptime(final LocalDateTime uptime) { + this.uptime = uptime; + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/model/HealthMedicalReportTemplate.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/model/HealthMedicalReportTemplate.java new file mode 100644 index 00000000..cefc8044 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/model/HealthMedicalReportTemplate.java @@ -0,0 +1,96 @@ +package com.bonus.core.nutrition.common.model; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.time.LocalDateTime; + +@TableName("health_medical_report_template") +@ApiModel("体检报告模板") +public class HealthMedicalReportTemplate implements Serializable { + @TableId + @ApiModelProperty("主键自增") + private Long id; + @ApiModelProperty("体检模板id") + private Long medicalTemplateId; + @ApiModelProperty("体检模板名称") + private String medicalTemplateName; + @ApiModelProperty("备注") + private String remark; + @ApiModelProperty("创建人") + private String crby; + @ApiModelProperty("创建时间") + private LocalDateTime crtime; + @ApiModelProperty("更新人") + private String upby; + @ApiModelProperty("更新时间") + private LocalDateTime uptime; + + public Long getId() { + return this.id; + } + + public Long getMedicalTemplateId() { + return this.medicalTemplateId; + } + + public String getMedicalTemplateName() { + return this.medicalTemplateName; + } + + public String getRemark() { + return this.remark; + } + + public String getCrby() { + return this.crby; + } + + public LocalDateTime getCrtime() { + return this.crtime; + } + + public String getUpby() { + return this.upby; + } + + public LocalDateTime getUptime() { + return this.uptime; + } + + public void setId(final Long id) { + this.id = id; + } + + public void setMedicalTemplateId(final Long medicalTemplateId) { + this.medicalTemplateId = medicalTemplateId; + } + + public void setMedicalTemplateName(final String medicalTemplateName) { + this.medicalTemplateName = medicalTemplateName; + } + + public void setRemark(final String remark) { + this.remark = remark; + } + + public void setCrby(final String crby) { + this.crby = crby; + } + + public void setCrtime(final LocalDateTime crtime) { + this.crtime = crtime; + } + + public void setUpby(final String upby) { + this.upby = upby; + } + + public void setUptime(final LocalDateTime uptime) { + this.uptime = uptime; + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/service/HealthCustMedicalReportService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/service/HealthCustMedicalReportService.java new file mode 100644 index 00000000..13b8bfec --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/service/HealthCustMedicalReportService.java @@ -0,0 +1,38 @@ +package com.bonus.core.nutrition.common.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.bonus.common.core.exception.ServiceException; +import com.bonus.core.customer.api.CustCasualApi; +import com.bonus.core.nutrition.common.mapper.HealthCustMedicalReportMapper; +import com.bonus.core.nutrition.common.vo.HealthCustMedicalReportVO; +import com.bonus.i18n.I18n; +import com.github.pagehelper.PageHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.lang.invoke.SerializedLambda; +import java.util.Iterator; +import java.util.List; + +@Service +public class HealthCustMedicalReportService { + @Autowired + private CustCasualApi custCasualApi; + @Resource + private HealthCustMedicalReportMapper healthCustMedicalReportMapper; + + public List listMedicalReport(String openid, Integer sourceType) { + Long custId = this.custCasualApi.getCustIdByOpenidAndSourceType(openid, sourceType); + if (ObjectUtil.isEmpty(custId)) { + throw new ServiceException(I18n.getMessage("nutrition.no-cust", new Object[0])); + } else { + List reportVOList = this.healthCustMedicalReportMapper.listMedicalReport(custId); + return reportVOList; + } + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/service/HealthMedicalReportTmplService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/service/HealthMedicalReportTmplService.java new file mode 100644 index 00000000..f5c6d102 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/service/HealthMedicalReportTmplService.java @@ -0,0 +1,30 @@ +package com.bonus.core.nutrition.common.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.bonus.core.nutrition.common.mapper.HealthMedicalReportTmplMapper; +import com.bonus.core.nutrition.common.vo.HealthMedicalReportTmplVO; +import com.github.pagehelper.PageHelper; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.lang.invoke.SerializedLambda; +import java.util.Iterator; +import java.util.List; +import java.util.Objects; + +@Service +public class HealthMedicalReportTmplService { + @Resource + private HealthMedicalReportTmplMapper healthMedicalReportTmplMapper; + + public List listTemplate() { + return this.healthMedicalReportTmplMapper.listTemplate(); + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportDetailVO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportDetailVO.java new file mode 100644 index 00000000..212b13b8 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportDetailVO.java @@ -0,0 +1,58 @@ +package com.bonus.core.nutrition.common.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +@ApiModel("人员体检报告结果") +public class HealthCustMedicalReportDetailVO { + @ApiModelProperty("体检项目明细id") + private Long medicalProjectDetailId; + @ApiModelProperty("体检项目明细名称") + private String medicalProjectDetailName; + @ApiModelProperty("检查结果") + private String result; + @ApiModelProperty("单位") + private String medicalProjectDetailUnit; + @ApiModelProperty("参考值") + private String medicalProjectDetailReference; + + public Long getMedicalProjectDetailId() { + return this.medicalProjectDetailId; + } + + public String getMedicalProjectDetailName() { + return this.medicalProjectDetailName; + } + + public String getResult() { + return this.result; + } + + public String getMedicalProjectDetailUnit() { + return this.medicalProjectDetailUnit; + } + + public String getMedicalProjectDetailReference() { + return this.medicalProjectDetailReference; + } + + public void setMedicalProjectDetailId(final Long medicalProjectDetailId) { + this.medicalProjectDetailId = medicalProjectDetailId; + } + + public void setMedicalProjectDetailName(final String medicalProjectDetailName) { + this.medicalProjectDetailName = medicalProjectDetailName; + } + + public void setResult(final String result) { + this.result = result; + } + + public void setMedicalProjectDetailUnit(final String medicalProjectDetailUnit) { + this.medicalProjectDetailUnit = medicalProjectDetailUnit; + } + + public void setMedicalProjectDetailReference(final String medicalProjectDetailReference) { + this.medicalProjectDetailReference = medicalProjectDetailReference; + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportProjectVO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportProjectVO.java new file mode 100644 index 00000000..4f035bf6 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportProjectVO.java @@ -0,0 +1,40 @@ +package com.bonus.core.nutrition.common.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +@ApiModel("人员体检报告项目") +public class HealthCustMedicalReportProjectVO { + @ApiModelProperty("体检项目id") + private Long medicalProjectId; + @ApiModelProperty("体检项目名称") + private String medicalProjectName; + @ApiModelProperty("体检项目结果") + private List medicalReportDetailVOList; + + public Long getMedicalProjectId() { + return this.medicalProjectId; + } + + public String getMedicalProjectName() { + return this.medicalProjectName; + } + + public List getMedicalReportDetailVOList() { + return this.medicalReportDetailVOList; + } + + public void setMedicalProjectId(final Long medicalProjectId) { + this.medicalProjectId = medicalProjectId; + } + + public void setMedicalProjectName(final String medicalProjectName) { + this.medicalProjectName = medicalProjectName; + } + + public void setMedicalReportDetailVOList(final List medicalReportDetailVOList) { + this.medicalReportDetailVOList = medicalReportDetailVOList; + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportVO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportVO.java new file mode 100644 index 00000000..6f70e259 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthCustMedicalReportVO.java @@ -0,0 +1,72 @@ +package com.bonus.core.nutrition.common.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.List; + +@ApiModel("人员体检报告详情") +public class HealthCustMedicalReportVO { + @ApiModelProperty("体检id") + private Long medicalId; + @ApiModelProperty("人员id") + private Long custId; + @ApiModelProperty("体检日期") + private LocalDate medicalDate; + @ApiModelProperty("体检机构") + private String medicalMechanism; + @ApiModelProperty("体检模板id") + private Long medicalTemplateId; + @ApiModelProperty("体检项目结果") + private List reportProjectVOS; + + public Long getMedicalId() { + return this.medicalId; + } + + public Long getCustId() { + return this.custId; + } + + public LocalDate getMedicalDate() { + return this.medicalDate; + } + + public String getMedicalMechanism() { + return this.medicalMechanism; + } + + public Long getMedicalTemplateId() { + return this.medicalTemplateId; + } + + public List getReportProjectVOS() { + return this.reportProjectVOS; + } + + public void setMedicalId(final Long medicalId) { + this.medicalId = medicalId; + } + + public void setCustId(final Long custId) { + this.custId = custId; + } + + public void setMedicalDate(final LocalDate medicalDate) { + this.medicalDate = medicalDate; + } + + public void setMedicalMechanism(final String medicalMechanism) { + this.medicalMechanism = medicalMechanism; + } + + public void setMedicalTemplateId(final Long medicalTemplateId) { + this.medicalTemplateId = medicalTemplateId; + } + + public void setReportProjectVOS(final List reportProjectVOS) { + this.reportProjectVOS = reportProjectVOS; + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthMedicalReportTmplVO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthMedicalReportTmplVO.java new file mode 100644 index 00000000..d9c6832f --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/common/vo/HealthMedicalReportTmplVO.java @@ -0,0 +1,39 @@ +package com.bonus.core.nutrition.common.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +@ApiModel("体检报告模板出参") +public class HealthMedicalReportTmplVO { + @ApiModelProperty("体检模板id") + private Long medicalTemplateId; + @ApiModelProperty("体检模板名称") + private String medicalTemplateName; + @ApiModelProperty("备注") + private String remark; + + public Long getMedicalTemplateId() { + return this.medicalTemplateId; + } + + public String getMedicalTemplateName() { + return this.medicalTemplateName; + } + + public String getRemark() { + return this.remark; + } + + public void setMedicalTemplateId(final Long medicalTemplateId) { + this.medicalTemplateId = medicalTemplateId; + } + + public void setMedicalTemplateName(final String medicalTemplateName) { + this.medicalTemplateName = medicalTemplateName; + } + + public void setRemark(final String remark) { + this.remark = remark; + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/mobile/controller/HealthMobileMedicalReportController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/mobile/controller/HealthMobileMedicalReportController.java new file mode 100644 index 00000000..dafbfa28 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/nutrition/mobile/controller/HealthMobileMedicalReportController.java @@ -0,0 +1,54 @@ +package com.bonus.core.nutrition.mobile.controller; + +import cn.hutool.core.text.CharSequenceUtil; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.core.common.utils.HeaderFetchUtil; +import com.bonus.core.nutrition.common.service.HealthCustMedicalReportService; +import com.bonus.core.nutrition.common.service.HealthMedicalReportTmplService; +import com.bonus.core.nutrition.common.vo.HealthCustMedicalReportVO; +import com.bonus.core.nutrition.common.vo.HealthMedicalReportTmplVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping({"/health/mobile/medicalreport"}) +@Api( + tags = {"mobile-移动端人员体检报告"} +) +public class HealthMobileMedicalReportController { + @Autowired + @Lazy + private HealthCustMedicalReportService healthCustMedicalReportService; + @Autowired + @Lazy + private HealthMedicalReportTmplService healthMedicalReportTmplService; + + @PostMapping({"/list-medicalreport"}) +// @RequiresGuest + @ApiOperation("查询人员体检报告记录") + public List listMedicalReport(@RequestHeader Map headers) { + return this.healthCustMedicalReportService.listMedicalReport(this.getOpenidByHeaders(headers), this.getSourceTypeByHeaders(headers)); + } + + @PostMapping({"/list-template"}) +// @RequiresGuest + @ApiOperation("查询体检报告模板") + public List listTemplate() { + return this.healthMedicalReportTmplService.listTemplate(); + } + + protected String getOpenidByHeaders(Map headers) { + return HeaderFetchUtil.getValueFromHeadersIgnoreCase(headers, "openid"); + } + + protected Integer getSourceTypeByHeaders(Map headers) { + String value = HeaderFetchUtil.getValueFromHeadersIgnoreCase(headers, "source-type"); + return CharSequenceUtil.isNotBlank(value) ? Integer.valueOf(value) : null; + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/order/mq/MqUtil.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/order/mq/MqUtil.java index 9c884c4f..a117eb87 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/order/mq/MqUtil.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/order/mq/MqUtil.java @@ -70,7 +70,7 @@ public class MqUtil { log.info("发送延迟消息,topic:{},delayMileSecond:{}", topic.getKey(), delayMileSecond); LogUtil.printArgs("消息体", data); String routing = topic.getKey(); - mqTemplate.sendDelay(routing, MqPayload.of(data, topic, routing), (long)delayMileSecond); + mqTemplate.sendDelay(routing, MqPayload.of(data, topic, routing), (int)delayMileSecond); } catch (Exception var4) { log.error("发送事务MQ消息失败", var4); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/starter/data/DefaultDataSourceLoader.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/starter/data/DefaultDataSourceLoader.java new file mode 100644 index 00000000..90b8100e --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/core/starter/data/DefaultDataSourceLoader.java @@ -0,0 +1,84 @@ +package com.bonus.core.starter.data; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.bonus.common.core.exception.ServiceException; +import com.bonus.core.data.dataset.Executors; +import com.bonus.core.data.dataset.rule.loader.RouterLoader; +import com.bonus.core.merchant.constant.MerchantStatusEnum; +import com.bonus.core.merchant.entity.MercMerchantInSystem; +import com.bonus.core.merchant.mapper.MercMerchantInSystemMapper; +import com.bonus.core.tenant.TenantLoader; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; + +import java.util.Set; +import java.util.stream.Collectors; + + +//public class DefaultDataSourceLoader implements RouterLoader, DataSourceLoader, TenantLoader { +@Component +public class DefaultDataSourceLoader implements RouterLoader, TenantLoader { +// @Autowired +// @Lazy +// DataSetMapper dataSetMapper; + @Autowired + @Lazy + MercMerchantInSystemMapper mercMerchantInSystemMapper; +// @Value("${system.dataset:dataset}") +// private String dataset; + + public RouterLoader.Router load(Object key) { + MercMerchantInSystem merchant = (MercMerchantInSystem)Executors.readInSystem(() -> { + return (MercMerchantInSystem)this.mercMerchantInSystemMapper.selectById((Long)key); + }); + if (merchant == null) { + throw new ServiceException("商户[" + String.valueOf(key) + "]不存在"); + } else { + return new RouterLoader.Router(merchant.getDataset(), merchant.getSchema()); + } + } + +// public DataSourceLoader.DataSet load(String name) { +// DS dset = (DS)Executors.readInSystem(() -> { +// return this.dataSetMapper.queryById(this.dataset, name); +// }); +// List mercMerchantInSystems = (List)Executors.readInSystem(() -> { +// return this.mercMerchantInSystemMapper.selectList((Wrapper)((LambdaQueryWrapper)Wrappers.lambdaQuery(MercMerchantInSystem.class).eq(MercMerchantInSystem::getDataset, name)).eq(MercMerchantInSystem::getStatus, MerchantStatusEnum.NORMAL.key())); +// }); +// Map schemas = null; +// if (CollectionUtil.isNotEmpty(mercMerchantInSystems)) { +// schemas = (Map)mercMerchantInSystems.stream().collect(Collectors.toMap(MercMerchantInSystem::getSchema, MercMerchantInSystem::getTenantId)); +// } +// +// return new DataSourceLoader.DataSet(name, dset.getMaster(), schemas, dset.getSlave()); +// } +// +// public List load() { +// List dset = (List)Executors.readInSystem(() -> { +// return this.dataSetMapper.list(this.dataset); +// }); +// List mercMerchantInSystems = (List)Executors.readInSystem(() -> { +// return this.mercMerchantInSystemMapper.selectList((Wrapper)Wrappers.lambdaQuery(MercMerchantInSystem.class).eq(MercMerchantInSystem::getStatus, MerchantStatusEnum.NORMAL.key())); +// }); +// Map> ds_schemas = Maps.newHashMap(); +// if (CollectionUtil.isNotEmpty(mercMerchantInSystems)) { +// ds_schemas = (Map)mercMerchantInSystems.stream().collect(Collectors.groupingBy(MercMerchantInSystem::getDataset, Collectors.toMap(MercMerchantInSystem::getSchema, MercMerchantInSystem::getTenantId))); +// } +// +// return (List)dset.stream().map((ds) -> { +// return new DataSourceLoader.DataSet(ds.getName(), ds.getMaster(), (Map)ds_schemas.get(ds.getName()), ds.getSlave()); +// }).collect(Collectors.toList()); +// } + + public Set listTenant() { + return Executors.readInSystem(() -> { + return (Set)this.mercMerchantInSystemMapper + .selectList(Wrappers.lambdaQuery(MercMerchantInSystem.class) + .select(MercMerchantInSystem::getTenantId) + .eq(MercMerchantInSystem::getStatus, MerchantStatusEnum.NORMAL.key())) + .stream().mapToLong(MercMerchantInSystem::getTenantId).boxed().collect(Collectors.toSet()); + }); + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/nutrition.common/HealthCustMedicalReportMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/nutrition.common/HealthCustMedicalReportMapper.xml new file mode 100644 index 00000000..fb1ff9bc --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/nutrition.common/HealthCustMedicalReportMapper.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/nutrition.common/HealthMedicalReportTmplMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/nutrition.common/HealthMedicalReportTmplMapper.xml new file mode 100644 index 00000000..f4b9e6ce --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/nutrition.common/HealthMedicalReportTmplMapper.xml @@ -0,0 +1,14 @@ + + + + + + +