条码查询报表完成

dep_wangsr
Limy 4 years ago
parent 6c5eb31f94
commit 655f2ef2ae

@ -0,0 +1,45 @@
package com.ruoyi.web.controller.nanjing;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.nanjing.domain.ReportData;
import com.ruoyi.nanjing.domain.TBdProductinfo;
import com.ruoyi.nanjing.service.ITBdProducttypeService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/nanjing/reportData")
public class ReportDataController extends BaseController {
private String prefix = "nanjing/Report";
@Autowired
private ITBdProducttypeService producttypeService;
@RequiresPermissions("nanjing:report:view")
@GetMapping()
public String stationProduct(ModelMap map)
{
return prefix + "/Report";
}
@PostMapping("/report")
@ResponseBody
public List<ReportData> reportData(String begin,String end,String barcode)
{
Map map = new HashMap<String,Object>();
map.put("begin",begin);
map.put("end",end);
map.put("barcode",barcode);
List<ReportData> reportDataList = producttypeService.selectReport(map);
return reportDataList;
}
}

@ -2,6 +2,7 @@ package com.ruoyi.web.controller.nanjing;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.nanjing.domain.QsStation; import com.ruoyi.nanjing.domain.QsStation;
import com.ruoyi.nanjing.domain.ReportData;
import com.ruoyi.nanjing.domain.TBdProductinfo; import com.ruoyi.nanjing.domain.TBdProductinfo;
import com.ruoyi.nanjing.service.ITBdProductinfoService; import com.ruoyi.nanjing.service.ITBdProductinfoService;
import com.ruoyi.nanjing.service.ITBdProducttypeService; import com.ruoyi.nanjing.service.ITBdProducttypeService;

@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('产品条码信息')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li class="select-time">
<label>时间区间: </label>
<input type="text" class="time-input" id="beginTime" placeholder="开始时间" name="beginTime"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
</li>
<li>
<label>产品条码:</label>
<input type="text" id="barcode" name="barcode"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="searchAll()"><i class="fa fa-search"></i>&nbsp;搜索</a>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
function searchAll(){
// console.log("点击查询按钮事件执行...");
var url = ctx + "nanjing/reportData/report";
$('#bootstrap-table').bootstrapTable('destroy');
$('#bootstrap-table').bootstrapTable({
method:"post",
url: url,
pagination: true,
search: true,
contentType : "application/x-www-form-urlencoded",
queryParams: {
begin:$('#beginTime').val(),
end:$('#endTime').val(),
barcode:$('#barcode').val()
},
modalName: "条码信息查询",
columns: [
{
field: 'id',
title: '序号'
},
{
field: 'barcode',
title: '系统条码'
},
{
field: 'parameaning',
title: '参数名'
},
{
field:'value',
title:'参数值'
},
]
})
}
</script>
</body>
</html>

@ -0,0 +1,74 @@
package com.ruoyi.nanjing.domain;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
public class ReportData extends BaseEntity {
private static final long serialVersionUID = 1L;
private String barcode;
private String parameaning;
private String value;
private long id;
private Date beginTime;
private Date endTime;
public String getBarcode() {
return barcode;
}
public void setBarcode(String barcode) {
this.barcode = barcode;
}
public String getParameaning() {
return parameaning;
}
public void setParameaning(String parameaning) {
this.parameaning = parameaning;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public Date getBeginTime() {
return beginTime;
}
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
@Override
public String toString() {
return "ReportData{" +
"barcode='" + barcode + '\'' +
", parameaning='" + parameaning + '\'' +
", value='" + value + '\'' +
", id=" + id +
'}';
}
}

@ -35,4 +35,6 @@ public interface TBdProducttypeMapper
List<QsStation> selectStationQs(Map map); List<QsStation> selectStationQs(Map map);
List<QsStation> selectAllQs(Map map); List<QsStation> selectAllQs(Map map);
List<ReportData> selectReport(Map map);
} }

@ -39,4 +39,6 @@ public interface ITBdProducttypeService
List<QsStation> selectAllQs(Map map); List<QsStation> selectAllQs(Map map);
List<QsStation> selectNodeQs(Map map); List<QsStation> selectNodeQs(Map map);
List<ReportData> selectReport(Map map);
} }

@ -81,4 +81,9 @@ public class TBdProducttypeServiceImpl implements ITBdProducttypeService
public List<QsStation> selectNodeQs(Map map) { public List<QsStation> selectNodeQs(Map map) {
return tBdProducttypeMapper.selectStationQs(map); return tBdProducttypeMapper.selectStationQs(map);
} }
@Override
public List<ReportData> selectReport(Map map) {
return tBdProducttypeMapper.selectReport(map);
}
} }

@ -51,6 +51,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="ero" column="异常数量"/> <result property="ero" column="异常数量"/>
<result property="allRate" column="合格率"/> <result property="allRate" column="合格率"/>
</resultMap> </resultMap>
<resultMap id="repo" type="com.ruoyi.nanjing.domain.ReportData">
<result property="id" column="id"/>
<result property="barcode" column="Barcode"/>
<result property="parameaning" column="parameaning"/>
<result property="value" column="value"/>
</resultMap>
<sql id="selectTBdProducttypeVo"> <sql id="selectTBdProducttypeVo">
select ID, ProductTypeID, ProductTypeName from T_BD_ProductType select ID, ProductTypeID, ProductTypeName from T_BD_ProductType
</sql> </sql>
@ -142,6 +149,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
} }
</select> </select>
<select id="selectReport" parameterType="map" statementType="CALLABLE" resultMap="repo">
{
call begin_date3
(
#{begin,mode=IN,jdbcType=DATE},
#{end,mode=IN,jdbcType=DATE},
#{barcode,mode=IN,jdbcType=VARCHAR}
)
}
</select>
<!-- <insert id="insertTBdProducttype" parameterType="TBdProducttype">--> <!-- <insert id="insertTBdProducttype" parameterType="TBdProducttype">-->
<!-- insert into T_BD_ProductType--> <!-- insert into T_BD_ProductType-->

Loading…
Cancel
Save