Переглянути джерело

新增产线模块+条码查询模块

luyanwen-001 3 роки тому
батько
коміт
0fa809a0ae
16 змінених файлів з 526 додано та 12 видалено
  1. 40 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/Demo.java
  2. 70 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/controller/wx/WxBreweryProductionLineController.java
  3. 41 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/controller/wx/WxQrBoxMappingController.java
  4. 11 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/mapper/QrBoxMappingMapper.java
  5. 28 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/vo/result/QueryWxQrBoxMappingDetailsVO.java
  6. 22 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/DeleteBreweryProductionLineReq.java
  7. 22 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/QueryListBreweryProductionLineReq.java
  8. 21 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/QueryWxQrBoxMappingDetailsWxReq.java
  9. 33 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/SaveBreweryProductionLineReq.java
  10. 37 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/QueryListBreweryProductionLineRes.java
  11. 29 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/QueryWxQrBoxMappingDetailsWxRes.java
  12. 38 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/BreweryProductionLineService.java
  13. 13 4
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/QrBoxMappingService.java
  14. 87 0
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/BreweryProductionLineServiceImpl.java
  15. 18 8
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/QrBoxMappingServiceImpl.java
  16. 16 0
      abi-cloud-qr-platform-server/src/main/resources/dao/mapper/QrBoxMappingMapper.xml

+ 40 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/Demo.java

@@ -0,0 +1,40 @@
+package com.abi.qms.platform;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 11:53
+ */
+public class Demo {
+    private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+    public static void main(String[] args) {
+        Date now = new Date();
+        System.out.println("当前日期:" + DATE_FORMAT.format(now));
+        LocalDateTime newDate = stepMonth(now, -4);
+        System.out.println(newDate+"======");
+        System.out.println("当前时间前4个月的日期:" + DATE_FORMAT.format(newDate));
+    }
+    /**
+     * 在给定的日期加上或减去指定月份后的日期
+     *
+     * @param sourceDate 原始时间
+     * @param month      要调整的月份,向前为负数,向后为正数
+     * @return
+     */
+    public static LocalDateTime stepMonth(Date sourceDate, int month) {
+        Calendar c = Calendar.getInstance();
+        c.setTime(sourceDate);
+        c.add(Calendar.MONTH, month);
+        Instant instant = c.getTime().toInstant();
+        ZoneId zoneId = ZoneId.systemDefault();
+        LocalDateTime localDateTime = instant.atZone(zoneId).toLocalDateTime();
+        return localDateTime;
+    }
+}

+ 70 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/controller/wx/WxBreweryProductionLineController.java

@@ -0,0 +1,70 @@
+package com.abi.qms.platform.controller.wx;
+
+import com.abi.qms.platform.dto.req.DeleteBreweryProductionLineReq;
+import com.abi.qms.platform.dto.req.QueryListBreweryProductionLineReq;
+import com.abi.qms.platform.dto.req.SaveBreweryProductionLineReq;
+import com.abi.qms.platform.dto.res.QueryListBreweryProductionLineRes;
+import com.abi.qms.platform.service.BreweryProductionLineService;
+import com.abi.task.common.api.base.BaseResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 14:02
+ */
+@Slf4j
+@RestController
+@RequestMapping("/wxBreweryProductionLine")
+@Api(tags = "产线管理")
+public class WxBreweryProductionLineController {
+
+    @Autowired
+    private BreweryProductionLineService breweryProductionLineService;
+
+    /**
+     * 新增接口
+     * @author lu
+     * @date 2021/6/9 14:37
+     * @param saveBreweryProductionLineReq
+     * @return com.abi.task.common.api.base.BaseResponse
+     */
+    @ApiOperation("新增产线")
+    @PostMapping("/saveBreweryProductionLine")
+    public BaseResponse saveBreweryProductionLine(@Validated @RequestBody SaveBreweryProductionLineReq saveBreweryProductionLineReq) {
+        breweryProductionLineService.saveBreweryProductionLine(saveBreweryProductionLineReq);
+        return BaseResponse.create();
+    }
+
+    /**
+     * 删除 接口
+     * @author lu
+     * @date 2021/6/9 14:37
+     * @param req
+     * @return com.abi.task.common.api.base.BaseResponse
+     */
+    @ApiOperation("删除产线")
+    @PostMapping("/deleteBreweryProductionLine")
+    public BaseResponse deleteBreweryProductionLine(@Validated @RequestBody DeleteBreweryProductionLineReq req) {
+        breweryProductionLineService.deleteBreweryProductionLine(req);
+        return BaseResponse.create();
+    }
+
+    /**
+     * 查询当前登陆人的产线列表
+     * @author lu
+     * @date 2021/6/9 14:52
+     * @param req 
+     * @return com.abi.task.common.api.base.BaseResponse
+     */
+    @ApiOperation("查询当前登陆人的产线列表")
+    @GetMapping("/queryListBreweryProductionLine")
+    public BaseResponse queryListBreweryProductionLine(@Validated QueryListBreweryProductionLineReq req) {
+        QueryListBreweryProductionLineRes res = breweryProductionLineService.queryListBreweryProductionLine(req);
+        return BaseResponse.create(res);
+    }
+}

+ 41 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/controller/wx/WxQrBoxMappingController.java

@@ -0,0 +1,41 @@
+package com.abi.qms.platform.controller.wx;
+
+import com.abi.qms.platform.dto.req.QueryWxQrBoxMappingDetailsWxReq;
+import com.abi.qms.platform.dto.res.QueryWxQrBoxMappingDetailsWxRes;
+import com.abi.qms.platform.service.QrBoxMappingService;
+import com.abi.task.common.api.base.BaseResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 10:10
+ */
+@Slf4j
+@RestController
+@RequestMapping("/wxQrBoxMapping")
+@Api(tags = "条码查询")
+public class WxQrBoxMappingController {
+
+    @Autowired
+    private QrBoxMappingService qrBoxMappingService;
+
+    /**
+     * 微信 - 箱码/条码详情
+     * @author lu
+     * @date 2021/6/9 11:24
+     * @param queryWxQrBoxMappingDetailsWxReq 
+     * @return com.abi.task.common.api.base.BaseResponse<com.abi.qms.platform.dto.res.QueryWxQrBoxMappingDetailsWxRes>
+     */
+    @ApiOperation("激活详情")
+    @PostMapping("queryWxQrBoxMappingDetails")
+    public BaseResponse<QueryWxQrBoxMappingDetailsWxRes> queryWxQrBoxMappingDetails(@Validated @RequestBody QueryWxQrBoxMappingDetailsWxReq queryWxQrBoxMappingDetailsWxReq) {
+        QueryWxQrBoxMappingDetailsWxRes res = qrBoxMappingService.queryWxQrBoxMappingDetails(queryWxQrBoxMappingDetailsWxReq);
+        return BaseResponse.create(res);
+    }
+
+}

+ 11 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/mapper/QrBoxMappingMapper.java

@@ -3,8 +3,10 @@ package com.abi.qms.platform.dao.mapper;
 import com.abi.qms.platform.dao.entity.QrBoxMapping;
 import com.abi.qms.platform.dao.vo.result.PrintingDetailVO;
 import com.abi.qms.platform.dao.vo.result.QrBoxMappingVO;
+import com.abi.qms.platform.dao.vo.result.QueryWxQrBoxMappingDetailsVO;
 import com.abi.qms.platform.dto.req.ListQrBoxCodeMappingReq;
 import com.abi.qms.platform.dto.req.QrOneBoxCodeMappingReq;
+import com.abi.qms.platform.dto.req.QueryWxQrBoxMappingDetailsWxReq;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
@@ -41,4 +43,13 @@ public interface QrBoxMappingMapper extends BaseMapper<QrBoxMapping> {
      * @return
      */
     QrBoxMappingVO getIndexQrBoxCodeMappingOne(@Param("req") QrOneBoxCodeMappingReq req);
+
+    /**
+     * 微信 - 箱码/条码详情
+     * @author lu
+     * @date 2021/6/9 11:25
+     * @param req
+     * @return com.abi.qms.platform.dao.vo.result.QueryWxQrBoxMappingDetailsVO
+     */
+    QueryWxQrBoxMappingDetailsVO queryWxQrBoxMappingDetails(@Param("req") QueryWxQrBoxMappingDetailsWxReq req);
 }

+ 28 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/vo/result/QueryWxQrBoxMappingDetailsVO.java

@@ -0,0 +1,28 @@
+package com.abi.qms.platform.dao.vo.result;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 11:11
+ */
+@Data
+@ApiModel
+public class QueryWxQrBoxMappingDetailsVO implements Serializable {
+
+    @ApiModelProperty(value = "条码序号")
+    private String boxCode;
+
+    @ApiModelProperty(value = "物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "活动名称")
+    private String activeName;
+
+    @ApiModelProperty(value = "盖码数量")
+    private Long qrCodeCount;
+}

+ 22 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/DeleteBreweryProductionLineReq.java

@@ -0,0 +1,22 @@
+package com.abi.qms.platform.dto.req;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 14:31
+ */
+@Data
+@ApiModel
+public class DeleteBreweryProductionLineReq implements Serializable {
+
+    @NotNull(message = "产线ID为空")
+    @ApiModelProperty(value = "产线ID")
+    private Long id;
+
+}

+ 22 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/QueryListBreweryProductionLineReq.java

@@ -0,0 +1,22 @@
+package com.abi.qms.platform.dto.req;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 14:40
+ */
+@Data
+@ApiModel
+public class QueryListBreweryProductionLineReq implements Serializable {
+
+    @NotNull(message = "用户ID")
+    @ApiModelProperty(value = "用户ID")
+    private Long userId;
+
+}

+ 21 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/QueryWxQrBoxMappingDetailsWxReq.java

@@ -0,0 +1,21 @@
+package com.abi.qms.platform.dto.req;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 11:00
+ */
+@Data
+@ApiModel
+public class QueryWxQrBoxMappingDetailsWxReq implements Serializable {
+
+    @NotNull(message = "条码序号为空")
+    @ApiModelProperty(value = "条码序号")
+    private String boxCode;
+}

+ 33 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/SaveBreweryProductionLineReq.java

@@ -0,0 +1,33 @@
+package com.abi.qms.platform.dto.req;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 14:10
+ */
+@Data
+@ApiModel
+public class SaveBreweryProductionLineReq implements Serializable {
+
+    @NotNull(message = "啤酒厂ID为空")
+    @ApiModelProperty(value = "啤酒厂ID")
+    private Long beerFactoryId;
+
+    @NotNull(message = "用户ID为空")
+    @ApiModelProperty(value = "用户ID")
+    private Long userId;
+
+    @NotNull(message = "用户名为空")
+    @ApiModelProperty(value = "用户名")
+    private String userName;
+
+    @NotNull(message = "产线名称为空")
+    @ApiModelProperty(value = "产线名称")
+    private String productionLineName;
+}

+ 37 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/QueryListBreweryProductionLineRes.java

@@ -0,0 +1,37 @@
+package com.abi.qms.platform.dto.res;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 14:46
+ */
+@Data
+@ApiModel
+public class QueryListBreweryProductionLineRes implements Serializable {
+
+    @ApiModelProperty("产线列表")
+    private List<BreweryProductionLineBean> roleBeanList;
+
+    @Data
+    @NoArgsConstructor
+    @AllArgsConstructor
+    @ToString
+    @ApiModel(value = "QueryListBreweryProductionLineRes_BreweryProductionLineBean")
+    public static class BreweryProductionLineBean implements Serializable {
+
+        @ApiModelProperty(value = "产线ID")
+        private Long id;
+
+        @ApiModelProperty(value = "产线名称")
+        private String productionLineName;
+    }
+}

+ 29 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/QueryWxQrBoxMappingDetailsWxRes.java

@@ -0,0 +1,29 @@
+package com.abi.qms.platform.dto.res;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 11:08
+ */
+@Data
+@ApiModel
+public class QueryWxQrBoxMappingDetailsWxRes implements Serializable {
+
+    @ApiModelProperty(value = "条码序号")
+    private String boxCode;
+
+    @ApiModelProperty(value = "物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "活动名称")
+    private String activeName;
+
+    @ApiModelProperty(value = "盖码数量")
+    private Long qrCodeCount;
+
+}

+ 38 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/BreweryProductionLineService.java

@@ -0,0 +1,38 @@
+package com.abi.qms.platform.service;
+
+import com.abi.qms.platform.dto.req.DeleteBreweryProductionLineReq;
+import com.abi.qms.platform.dto.req.QueryListBreweryProductionLineReq;
+import com.abi.qms.platform.dto.req.SaveBreweryProductionLineReq;
+import com.abi.qms.platform.dto.res.QueryListBreweryProductionLineRes;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 14:04
+ */
+public interface BreweryProductionLineService {
+
+    /**
+     * 新增接口
+     * @author lu
+     * @date 2021/6/9 14:37
+     * @param saveBreweryProductionLineReq
+     */
+    void saveBreweryProductionLine(SaveBreweryProductionLineReq saveBreweryProductionLineReq);
+
+    /**
+     * 删除接口
+     * @author lu
+     * @date 2021/6/9 14:38
+     * @param req
+     */
+    void deleteBreweryProductionLine(DeleteBreweryProductionLineReq req);
+
+    /**
+     * 查询当前登陆人的产线列表
+     * @author lu
+     * @date 2021/6/9 14:52
+     * @param req
+     * @return com.abi.qms.platform.dto.res.QueryListBreweryProductionLineRes
+     */
+    QueryListBreweryProductionLineRes queryListBreweryProductionLine(QueryListBreweryProductionLineReq req);
+}

+ 13 - 4
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/QrBoxMappingService.java

@@ -1,12 +1,10 @@
 package com.abi.qms.platform.service;
 
-import com.abi.qms.platform.dto.req.ActiveBoxCodeReq;
-import com.abi.qms.platform.dto.req.GenerateBarCodeReq;
-import com.abi.qms.platform.dto.req.ListQrBoxCodeMappingReq;
-import com.abi.qms.platform.dto.req.PrintingDetailReq;
+import com.abi.qms.platform.dto.req.*;
 import com.abi.qms.platform.dto.res.ListQrBoxCodeMappingRes;
 import com.abi.qms.platform.dto.res.PrintingDetailRes;
 import com.abi.qms.platform.dto.res.QrBoxCodeUploadRes;
+import com.abi.qms.platform.dto.res.QueryWxQrBoxMappingDetailsWxRes;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.util.Map;
@@ -62,4 +60,15 @@ public interface QrBoxMappingService {
      * @param activeBoxCodeReq
      */
     void invalidBoxCode(ActiveBoxCodeReq activeBoxCodeReq);
+
+
+    /**
+     * 微信 - 箱码/条码详情
+     * @author lu
+     * @date 2021/6/9 11:24
+     * @param queryWxQrBoxMappingDetailsWxReq
+     * @return com.abi.qms.platform.dto.res.QueryWxQrBoxMappingDetailsWxRes
+     */
+    QueryWxQrBoxMappingDetailsWxRes queryWxQrBoxMappingDetails(QueryWxQrBoxMappingDetailsWxReq queryWxQrBoxMappingDetailsWxReq);
+
 }

+ 87 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/BreweryProductionLineServiceImpl.java

@@ -0,0 +1,87 @@
+package com.abi.qms.platform.service.impl;
+
+import com.abi.qms.platform.dao.entity.BreweryProductionLine;
+import com.abi.qms.platform.dao.mapper.BreweryProductionLineMapper;
+import com.abi.qms.platform.dto.req.DeleteBreweryProductionLineReq;
+import com.abi.qms.platform.dto.req.QueryListBreweryProductionLineReq;
+import com.abi.qms.platform.dto.req.SaveBreweryProductionLineReq;
+import com.abi.qms.platform.dto.res.QueryListBreweryProductionLineRes;
+import com.abi.qms.platform.infrastructure.util.AssertUtil;
+import com.abi.qms.platform.service.BreweryProductionLineService;
+import com.abi.task.common.api.exception.BusinessException;
+import com.abi.task.common.utils.PojoConverterUtils;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author lu
+ * @date 2021年06月09日 14:04
+ */
+@Service
+public class BreweryProductionLineServiceImpl implements BreweryProductionLineService {
+
+    @Autowired
+    private BreweryProductionLineMapper breweryProductionLineMapper;
+
+    /**
+     * 新增接口
+     * @author lu
+     * @date 2021/6/9 14:38
+     * @param req
+     */
+    @Override
+    public void saveBreweryProductionLine(SaveBreweryProductionLineReq req) {
+        QueryWrapper<BreweryProductionLine> insert = new QueryWrapper<>();
+        insert.eq("production_line_name",req.getProductionLineName());
+        insert.eq("user_id",req.getUserId());
+        insert.eq("is_delete",0);
+        //该用户下的产线名 不可以重复
+        Integer count = breweryProductionLineMapper.selectCount(insert);
+        if (!count.equals(0)) {
+            throw new BusinessException("产线名称已存在");
+        }
+        BreweryProductionLine parameter = new BreweryProductionLine();
+        parameter.setBeerFactoryId(req.getBeerFactoryId());
+        parameter.setUserId(req.getUserId());
+        parameter.setUserName(req.getUserName());
+        parameter.setProductionLineName(req.getProductionLineName());
+        breweryProductionLineMapper.insert(parameter);
+    }
+
+    /**
+     * 新增接口
+     * @author lu
+     * @date 2021/6/9 14:38
+     * @param req
+     */
+    @Override
+    public void deleteBreweryProductionLine(DeleteBreweryProductionLineReq req) {
+        BreweryProductionLine breweryProductionLine = breweryProductionLineMapper.selectById(req.getId());
+        AssertUtil.isNull(breweryProductionLine,"产线信息不存在");
+        breweryProductionLine.setIsDelete(1);
+        breweryProductionLineMapper.updateById(breweryProductionLine);
+    }
+
+    /**
+     * 查询当前登陆人的产线列表
+     * @author lu
+     * @date 2021/6/9 14:52
+     * @param req
+     * @return com.abi.qms.platform.dto.res.QueryListBreweryProductionLineRes
+     */
+    @Override
+    public QueryListBreweryProductionLineRes queryListBreweryProductionLine(QueryListBreweryProductionLineReq req) {
+        QueryWrapper<BreweryProductionLine> query = new QueryWrapper<>();
+        query.eq("user_id",req.getUserId());
+        query.eq("is_delete",0);
+        List<BreweryProductionLine> breweryProductionLines = breweryProductionLineMapper.selectList(query);
+        //封装出参
+        QueryListBreweryProductionLineRes res = new QueryListBreweryProductionLineRes();
+        List<QueryListBreweryProductionLineRes.BreweryProductionLineBean> breweryProductionLineBeans = PojoConverterUtils.copyList(breweryProductionLines, QueryListBreweryProductionLineRes.BreweryProductionLineBean.class);
+        res.setRoleBeanList(breweryProductionLineBeans);
+        return res;
+    }
+}

+ 18 - 8
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/QrBoxMappingServiceImpl.java

@@ -10,14 +10,9 @@ import com.abi.qms.platform.dao.mapper.QrBoxMappingMapper;
 import com.abi.qms.platform.dao.tablestore.entity.QrCode;
 import com.abi.qms.platform.dao.vo.result.PrintingDetailVO;
 import com.abi.qms.platform.dao.vo.result.QrBoxMappingVO;
-import com.abi.qms.platform.dto.req.ActiveBoxCodeReq;
-import com.abi.qms.platform.dto.req.GenerateBarCodeReq;
-import com.abi.qms.platform.dto.req.ListQrBoxCodeMappingReq;
-import com.abi.qms.platform.dto.req.PrintingDetailReq;
-import com.abi.qms.platform.dto.res.ListQrBoxCodeMappingRes;
-import com.abi.qms.platform.dto.res.PrintingDetailRes;
-import com.abi.qms.platform.dto.res.QrBoxCodeUploadRes;
-import com.abi.qms.platform.dto.res.UploadFileRes;
+import com.abi.qms.platform.dao.vo.result.QueryWxQrBoxMappingDetailsVO;
+import com.abi.qms.platform.dto.req.*;
+import com.abi.qms.platform.dto.res.*;
 import com.abi.qms.platform.infrastructure.util.AssertUtil;
 import com.abi.qms.platform.infrastructure.util.PageUtil;
 import com.abi.qms.platform.infrastructure.util.UserUtil;
@@ -192,6 +187,21 @@ public class QrBoxMappingServiceImpl implements QrBoxMappingService {
         qrBoxMappingMapper.updateById(qrBoxMapping);
     }
 
+    /**
+     * 微信 - 箱码/条码详情
+     * @author lu
+     * @date 2021/6/9 11:24
+     * @param queryWxQrBoxMappingDetailsWxReq
+     * @return com.abi.qms.platform.dto.res.QueryWxQrBoxMappingDetailsWxRes
+     */
+    @Override
+    public QueryWxQrBoxMappingDetailsWxRes queryWxQrBoxMappingDetails(QueryWxQrBoxMappingDetailsWxReq queryWxQrBoxMappingDetailsWxReq) {
+        QueryWxQrBoxMappingDetailsVO query = qrBoxMappingMapper.queryWxQrBoxMappingDetails(queryWxQrBoxMappingDetailsWxReq);
+        AssertUtil.isNull(query,"条码序号查询为空");
+        //封装出参
+        return PojoConverterUtils.copy(query, QueryWxQrBoxMappingDetailsWxRes.class);
+    }
+
 
     /**
      * 根据主键查询已生成码包位置

+ 16 - 0
abi-cloud-qr-platform-server/src/main/resources/dao/mapper/QrBoxMappingMapper.xml

@@ -83,4 +83,20 @@
         LIMIT 1
     </select>
 
+
+    <select id="queryWxQrBoxMappingDetails" resultType="com.abi.qms.platform.dao.vo.result.QueryWxQrBoxMappingDetailsVO">
+        SELECT
+            mapping.box_code ,
+            material.material_name,
+            active.active_name,
+            mapping.qr_code_count
+        FROM
+            qr_box_mapping AS mapping
+            LEFT JOIN qr_package AS qpckage on qpckage.id=mapping.package_id
+            LEFT JOIN base_material AS material ON material.id = qpckage.material_id
+            LEFT JOIN base_active_qr_package_mapping AS active_package ON active_package.qr_package_id = qpckage.id
+            LEFT JOIN base_active AS active ON active.id = active_package.active_id
+            WHERE mapping.box_code = #{req.boxCode} AND mapping.is_delete = 0
+    </select>
+
 </mapper>