Compare commits

...

1 Commits

Author SHA1 Message Date
SoulStar d9c814fb78 add - 添加条码关系查询存储过程调用页面 3 weeks ago

@ -0,0 +1,60 @@
package com.ruoyi.web.controller.nanjing;
import java.util.List;
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.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.nanjing.domain.BarCodeRelationship;
import com.ruoyi.nanjing.service.IBarcodeRelationshipService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author limy
* @date 2024-08-27
*/
@Controller
@RequestMapping("/nanjing/BarcodeRelationshipSelect")
public class BarcodeRelationshipController extends BaseController
{
private String prefix = "nanjing/BarcodeRelationshipSelect";
@Autowired
private IBarcodeRelationshipService barcodeRelationshipService;
@RequiresPermissions("nanjing:BarcodeRelationshipSelect:view")
@GetMapping()
public String BarcodeRelationship()
{
return prefix + "/BarcodeRelationshipSelect";
}
/**
*
*/
@RequiresPermissions("nanjing:BarcodeRelationshipSelect:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(String barcode)
{
List<BarCodeRelationship> list = barcodeRelationshipService.selectBarcodeRelationshipByBarcode(barcode);
if(barcode==null||barcode==""){
list.clear();
list.add(new BarCodeRelationship());
}
return getDataTable(list);
}
}

@ -38,6 +38,7 @@ public class SelectParaAllController extends BaseController {
{
return prefix + "/ParaAllShow";
}
@RequiresPermissions("nanjing:ParaAllShow:list")
@PostMapping("/paraAllShow")
@ResponseBody

@ -13,7 +13,7 @@ spring:
# username: sa
## password: 123456
master:
url: jdbc:sqlserver://192.168.3.109:1433;SelectMethod=cursor;DatabaseName=JYD_shengjie
url: jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=JYD_shengjie
username: sa
password: 123456
# 从库数据源

@ -0,0 +1,145 @@
<!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>
<label>产品条码:</label>
<input type="text" name="barcode"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></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">
var prefix = ctx + "nanjing/BarcodeRelationshipSelect";
$(function() {
var options = {
url: prefix + "/list",
modalName: "条码关系",
columns: [{
checkbox: true
},
{
field: 'productBarcode',
title: '产品条码'
},
{
field: 'semiBarcode',
title: 'semi'
},
{
field: 'type',
title: '条码类型'
},
{
field: 'insertTime',
title: '插入时间'
}]
};
$.table.init(options);
});
</script>
</body>
</html>
<!--<!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>-->
<!-- <label>产品条码:</label>-->
<!-- <input type="text" name="productBarcode"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <a class="btn btn-primary btn-rounded btn-sm" onclick="search()"><i class="fa fa-search"></i>&nbsp;搜索</a>-->
<!-- <a class="btn btn-warning btn-rounded btn-sm" onclick="reset()"><i class="fa fa-refresh"></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">-->
<!-- var prefix = ctx + "nanjing/BarcodeRelationshipSelect";-->
<!-- // 表格初始化-->
<!-- $(function() {-->
<!-- var options = {-->
<!-- url: prefix + "/list", // 这个 URL 是表格数据的获取地址-->
<!-- method: 'post', // 请求方法-->
<!-- queryParams: queryParams, // 传递给后端的参数-->
<!-- pagination: true, // 启用分页-->
<!-- sidePagination: "server", // 服务器端分页-->
<!-- columns: [-->
<!-- { checkbox: true },-->
<!-- { field: 'productBarcode', title: '产品条码' },-->
<!-- { field: 'semiBarcode', title: 'semi' },-->
<!-- { field: 'type', title: '条码类型' },-->
<!-- { field: 'insertTime', title: '插入时间' }-->
<!-- ]-->
<!-- };-->
<!-- $('#bootstrap-table').bootstrapTable(options);-->
<!-- });-->
<!-- // 搜索功能-->
<!-- function search() {-->
<!-- $('#bootstrap-table').bootstrapTable('refresh', { query: queryParams() });-->
<!-- }-->
<!-- // 重置功能-->
<!-- function reset() {-->
<!-- $('#formId')[0].reset(); // 重置表单-->
<!-- search(); // 重置后重新搜索(可以选择刷新页面或重新加载表格数据)-->
<!-- }-->
<!-- // 获取查询参数-->
<!-- function queryParams(params) {-->
<!-- var formData = $('#formId').serializeArray();-->
<!-- var queryData = {};-->
<!-- // 将表单数据序列化为键值对对象-->
<!-- $.each(formData, function(i, field) {-->
<!-- queryData[field.name] = field.value;-->
<!-- });-->
<!-- // 传递分页参数-->
<!-- queryData.limit = params.limit; // 每页数量-->
<!-- queryData.offset = params.offset; // 当前页偏移量-->
<!-- return queryData;-->
<!-- }-->
<!--</script>-->
<!--</body>-->
<!--</html>-->

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增条码关系')" />
</head>
<body class="white-bg">
</body>
</html>

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改条码关系')" />
</head>
<body class="white-bg">
</body>
</html>

@ -6,6 +6,6 @@ gen:
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.ruoyi.nanjing
# 自动去除表前缀默认是false
autoRemovePre: false
autoRemovePre: true
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
tablePrefix: sys_

@ -0,0 +1,94 @@
package com.ruoyi.nanjing.domain;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* sys_BarcodeRelationship
*
* @author limy
* @date 2024-08-27
*/
public class BarCodeRelationship extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
// private Long id;
/** 产品条码 */
//@Excel(name = "产品条码")
private String ProductBarcode;
/** 设备条码 */
//@Excel(name = "设备条码")
private String SemiBarcode;
/** 条码类型 */
//@Excel(name = "条码类型")
private String Type;
/** 插入时间 */
//@Excel(name = "插入时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date InsertTime;
// public void setId(Long id)
// {
// this.id = id;
// }
//
// public Long getId()
// {
// return id;
// }
public void setProductBarcode(String productBarcode)
{
this.ProductBarcode = productBarcode;
}
public String getProductBarcode()
{
return ProductBarcode;
}
public void setSemiBarcode(String semiBarcode)
{
this.SemiBarcode = semiBarcode;
}
public String getSemiBarcode()
{
return SemiBarcode;
}
public void setType(String type)
{
this.Type = type;
}
public String getType()
{
return Type;
}
public void setInsertTime(Date insertTime)
{
this.InsertTime = insertTime;
}
public Date getInsertTime()
{
return InsertTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
// .append("id", getId())
.append("ProductBarcode", getProductBarcode())
.append("SemiBarcode", getSemiBarcode())
.append("Type", getType())
.append("InsertTime", getInsertTime())
.toString();
}
}

@ -0,0 +1,18 @@
package com.ruoyi.nanjing.mapper;
import java.util.List;
import com.ruoyi.nanjing.domain.BarCodeRelationship;
/**
* Mapper
*
* @author limy
* @date 2024-08-27
*/
public interface BarcodeRelationshipMapper
{
public List<BarCodeRelationship> getBarcodeRelationshipByBarcode(String barcode);
}

@ -70,11 +70,13 @@ public interface TSyTracestateMapper
@ResultMap({"col1","col2"})
@Options(statementType = StatementType.CALLABLE)
List<List<HashMap<String,String>>> selectAllPara(Map map);
List<ProRpList> getInfo(Object semiBarcode);
List selectStationPara(Map map);
List selectStationPara2(Map map);
String selectSemi(String productBarcode);

@ -0,0 +1,17 @@
package com.ruoyi.nanjing.service;
import java.util.List;
import com.ruoyi.nanjing.domain.BarCodeRelationship;
/**
* Service
*
* @author limy
* @date 2024-08-27
*/
public interface IBarcodeRelationshipService
{
public List<BarCodeRelationship> selectBarcodeRelationshipByBarcode(String barcode);
}

@ -0,0 +1,29 @@
package com.ruoyi.nanjing.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.nanjing.mapper.BarcodeRelationshipMapper;
import com.ruoyi.nanjing.domain.BarCodeRelationship;
import com.ruoyi.nanjing.service.IBarcodeRelationshipService;
import com.ruoyi.common.core.text.Convert;
/**
* Service
*
* @author limy
* @date 2024-08-27
*/
@Service
public class BarcodeRelationshipServiceImpl implements IBarcodeRelationshipService
{
@Autowired
private BarcodeRelationshipMapper barcodeRelationshipMapper;
@Override
public List<BarCodeRelationship> selectBarcodeRelationshipByBarcode(String barcode)
{
return barcodeRelationshipMapper.getBarcodeRelationshipByBarcode(barcode);
}
}

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!--suppress SqlDialectInspection -->
<mapper namespace="com.ruoyi.nanjing.mapper.BarcodeRelationshipMapper">
<select id="getBarcodeRelationshipByBarcode" statementType="CALLABLE" parameterType="map" resultType="BarCodeRelationship" >
{
call GetBarcodeRelationShip
(
#{barcode,mode=IN,jdbcType=VARCHAR}
)
}
</select>
</mapper>
Loading…
Cancel
Save