Browse Source

打印历史记录 2022-05-15 sxm

master
[li_she] 4 years ago
parent
commit
6dffc9d7a2
  1. 35
      src/main/java/com/gaotao/modules/print/controller/LabelprinthistController.java
  2. 11
      src/main/java/com/gaotao/modules/print/dao/LabelprinthistMapper.java
  3. 97
      src/main/java/com/gaotao/modules/print/entity/vo/LabelprinthistVo.java
  4. 11
      src/main/java/com/gaotao/modules/print/service/LabelprinthistService.java
  5. 6
      src/main/java/com/gaotao/modules/print/service/impl/LabelprinthistServiceImpl.java
  6. 32
      src/main/resources/mapper/print/LabelprinthistMapper.xml

35
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<Labelprinthist> labelprinthists = labelprinthistService.getLabelPrintHistList(labelprinthist);
return R.ok().put("dataList", labelprinthists);
}
}

11
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<Labelprinthist> {
/**
* @Author SXM
* @Description 获取打印例是记录
* @Date 15:01 2022/5/15
* @Param [labelprinthist]
* @return java.util.List<com.gaotao.modules.print.entity.Labelprinthist>
**/
List<Labelprinthist> getLabelPrintHistList(LabelprinthistVo labelprinthist);
}

97
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;
}
}

11
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<Labelprinthist> {
* @return void
**/
void insertBatch(List<Labelprinthist> histsList);
/**
* @Author SXM
* @Description 获取标签打印历史
* @Date 14:58 2022/5/15
* @Param [LabelprinthistVo]
* @return List<Labelprinthist>
**/
List<Labelprinthist> getLabelPrintHistList(LabelprinthistVo labelprinthist);
}

6
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<LabelprinthistMapper,
}
}
@Override
public List<Labelprinthist> getLabelPrintHistList(LabelprinthistVo labelprinthist) {
return this.baseMapper.getLabelPrintHistList(labelprinthist);
}
}

32
src/main/resources/mapper/print/LabelprinthistMapper.xml

@ -2,8 +2,34 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gaotao.modules.print.dao.LabelprinthistMapper">
<sql id="Base_Column_List">
id, Printfrom, ReportID, KeyInfo, UserID, CreateDate, PrintDetail
</sql>
<sql id="Base_Column_List">
id
, Printfrom, ReportID, KeyInfo, UserID, CreateDate, PrintDetail
</sql>
<select id="getLabelPrintHistList" resultType="com.gaotao.modules.print.entity.Labelprinthist">
select id, Printfrom, ReportID, KeyInfo, UserID, CreateDate, PrintDetail
from Labelprinthist
<where>
<if test=" keyinfo != null and keyinfo != ''">
KeyInfo like #{keyinfo}
</if>
<if test=" userid != null and userid != ''">
and UserID like #{userid}
</if>
<if test=" reportid != null and reportid != ''">
and ReportID like #{reportid}
</if>
<if test=" printfrom != null and printfrom != ''">
and Printfrom like #{printfrom}
</if>
<if test=" startDate != null">
and CreateDate &gt;= #{startDate}
</if>
<if test=" endDate != null ">
and CreateDate &lt;= #{endDate}
</if>
</where>
</select>
</mapper>
Loading…
Cancel
Save