From 6dffc9d7a265d05a3996aca03b3ba05acc814780 Mon Sep 17 00:00:00 2001 From: "[li_she]" <[li.she@xujiesoft.com]> Date: Sun, 15 May 2022 15:32:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=8E=86=E5=8F=B2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=202022-05-15=20sxm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/LabelprinthistController.java | 35 +++++++ .../print/dao/LabelprinthistMapper.java | 11 +++ .../print/entity/vo/LabelprinthistVo.java | 97 +++++++++++++++++++ .../print/service/LabelprinthistService.java | 11 +++ .../impl/LabelprinthistServiceImpl.java | 6 ++ .../mapper/print/LabelprinthistMapper.xml | 32 +++++- 6 files changed, 189 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/gaotao/modules/print/controller/LabelprinthistController.java create mode 100644 src/main/java/com/gaotao/modules/print/entity/vo/LabelprinthistVo.java diff --git a/src/main/java/com/gaotao/modules/print/controller/LabelprinthistController.java b/src/main/java/com/gaotao/modules/print/controller/LabelprinthistController.java new file mode 100644 index 0000000..f8f13c2 --- /dev/null +++ b/src/main/java/com/gaotao/modules/print/controller/LabelprinthistController.java @@ -0,0 +1,35 @@ +package com.gaotao.modules.print.controller; + +import com.gaotao.common.utils.R; +import com.gaotao.modules.print.entity.Labelprinthist; +import com.gaotao.modules.print.entity.vo.LabelprinthistVo; +import com.gaotao.modules.print.service.LabelprinthistService; +import org.springframework.beans.factory.annotation.Autowired; +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 java.util.List; + +@RequestMapping("/labelHist") +@RestController +public class LabelprinthistController { + + @Autowired + private LabelprinthistService labelprinthistService; + + + /** + * @Author SXM + * @Description 获取标签打印历史 + * @Date 14:58 2022/5/15 + * @Param [labelprinthist] + * @return com.gaotao.common.utils.R + **/ + @PostMapping("getLabelPrintHistList") + public R getLabelPrintHistList(@RequestBody LabelprinthistVo labelprinthist){ + List labelprinthists = labelprinthistService.getLabelPrintHistList(labelprinthist); + return R.ok().put("dataList", labelprinthists); + } +} diff --git a/src/main/java/com/gaotao/modules/print/dao/LabelprinthistMapper.java b/src/main/java/com/gaotao/modules/print/dao/LabelprinthistMapper.java index 2bd4ec0..29b7702 100644 --- a/src/main/java/com/gaotao/modules/print/dao/LabelprinthistMapper.java +++ b/src/main/java/com/gaotao/modules/print/dao/LabelprinthistMapper.java @@ -2,9 +2,20 @@ package com.gaotao.modules.print.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.gaotao.modules.print.entity.Labelprinthist; +import com.gaotao.modules.print.entity.vo.LabelprinthistVo; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + @Mapper public interface LabelprinthistMapper extends BaseMapper { + /** + * @Author SXM + * @Description 获取打印例是记录 + * @Date 15:01 2022/5/15 + * @Param [labelprinthist] + * @return java.util.List + **/ + List getLabelPrintHistList(LabelprinthistVo labelprinthist); } \ No newline at end of file diff --git a/src/main/java/com/gaotao/modules/print/entity/vo/LabelprinthistVo.java b/src/main/java/com/gaotao/modules/print/entity/vo/LabelprinthistVo.java new file mode 100644 index 0000000..4e6a619 --- /dev/null +++ b/src/main/java/com/gaotao/modules/print/entity/vo/LabelprinthistVo.java @@ -0,0 +1,97 @@ +package com.gaotao.modules.print.entity.vo; + +import java.util.Date; + +public class LabelprinthistVo { + private Integer id; + + private String printfrom; + + private String reportid; + + private String keyinfo; + + private String userid; + + private Date createdate; + + private String printdetail; + + private Date startDate; + + private Date endDate; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public Date getStartDate() { + return startDate; + } + + public void setStartDate(Date startDate) { + this.startDate = startDate; + } + + public Date getEndDate() { + return endDate; + } + + public void setEndDate(Date endDate) { + this.endDate = endDate; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getPrintfrom() { + return printfrom; + } + + public void setPrintfrom(String printfrom) { + this.printfrom = printfrom; + } + + public String getReportid() { + return reportid; + } + + public void setReportid(String reportid) { + this.reportid = reportid; + } + + public String getKeyinfo() { + return keyinfo; + } + + public void setKeyinfo(String keyinfo) { + this.keyinfo = keyinfo; + } + + public String getUserid() { + return userid; + } + + public void setUserid(String userid) { + this.userid = userid; + } + + public Date getCreatedate() { + return createdate; + } + + public void setCreatedate(Date createdate) { + this.createdate = createdate; + } + + public String getPrintdetail() { + return printdetail; + } + + public void setPrintdetail(String printdetail) { + this.printdetail = printdetail; + } +} diff --git a/src/main/java/com/gaotao/modules/print/service/LabelprinthistService.java b/src/main/java/com/gaotao/modules/print/service/LabelprinthistService.java index 7e4cd75..33b6851 100644 --- a/src/main/java/com/gaotao/modules/print/service/LabelprinthistService.java +++ b/src/main/java/com/gaotao/modules/print/service/LabelprinthistService.java @@ -2,6 +2,7 @@ package com.gaotao.modules.print.service; import com.baomidou.mybatisplus.extension.service.IService; import com.gaotao.modules.print.entity.Labelprinthist; +import com.gaotao.modules.print.entity.vo.LabelprinthistVo; import java.util.List; @@ -15,4 +16,14 @@ public interface LabelprinthistService extends IService { * @return void **/ void insertBatch(List histsList); + + /** + * @Author SXM + * @Description 获取标签打印历史 + * @Date 14:58 2022/5/15 + * @Param [LabelprinthistVo] + * @return List + **/ + List getLabelPrintHistList(LabelprinthistVo labelprinthist); + } diff --git a/src/main/java/com/gaotao/modules/print/service/impl/LabelprinthistServiceImpl.java b/src/main/java/com/gaotao/modules/print/service/impl/LabelprinthistServiceImpl.java index 2e349ff..ef5ba3b 100644 --- a/src/main/java/com/gaotao/modules/print/service/impl/LabelprinthistServiceImpl.java +++ b/src/main/java/com/gaotao/modules/print/service/impl/LabelprinthistServiceImpl.java @@ -3,6 +3,7 @@ package com.gaotao.modules.print.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.gaotao.modules.print.dao.LabelprinthistMapper; import com.gaotao.modules.print.entity.Labelprinthist; +import com.gaotao.modules.print.entity.vo.LabelprinthistVo; import com.gaotao.modules.print.service.LabelprinthistService; import lombok.extern.slf4j.Slf4j; import org.springframework.jdbc.UncategorizedSQLException; @@ -28,4 +29,9 @@ public class LabelprinthistServiceImpl extends ServiceImpl getLabelPrintHistList(LabelprinthistVo labelprinthist) { + return this.baseMapper.getLabelPrintHistList(labelprinthist); + } } diff --git a/src/main/resources/mapper/print/LabelprinthistMapper.xml b/src/main/resources/mapper/print/LabelprinthistMapper.xml index 09a1072..d3233df 100644 --- a/src/main/resources/mapper/print/LabelprinthistMapper.xml +++ b/src/main/resources/mapper/print/LabelprinthistMapper.xml @@ -2,8 +2,34 @@ - - id, Printfrom, ReportID, KeyInfo, UserID, CreateDate, PrintDetail - + + id + , Printfrom, ReportID, KeyInfo, UserID, CreateDate, PrintDetail + + \ No newline at end of file