完成 废品入库

master
wangh 9 months ago
parent b457399d61
commit bb6ec4c7ef

@ -1,18 +1,79 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--360浏览器优先以webkit内核解析-->
<title>若依介绍</title>
<title></title>
<link rel="shortcut icon" href="favicon.ico">
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link href="../static/css/style.min.css" th:href="@{/css/style.min.css}" rel="stylesheet"/>
<th:block th:include="include :: header('模态窗口')"/>
</head>
<body class="gray-bg">
<img alt="[ BGS ]" src="../static/img/main.jpg" th:src="@{/img/main_bg.png}" width="100%" height="100%" id="img_main">
<!--<div class="ibox-content">-->
<!-- <div class="text-center">-->
<!-- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">打开示例窗口</button>-->
<!-- </div>-->
<div class="modal inmodal" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content animated bounceInRight">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" onclick="test()"><span
aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
</button>
<i class="fa fa-laptop modal-icon"></i>
<h4 class="modal-title">报废轮挡处理提醒</h4>
</div>
<div class="modal-body" >
<p >轮挡报废数量:<strong id="tt1"></strong> ,超过仓库设定存储数量 </p>
<!-- <div class="form-group">-->
<!-- <label>Email</label>-->
<!-- <input type="email" placeholder="请输入您的Email" class="form-control">-->
<!-- </div>-->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-white" data-dismiss="modal" onclick="test()">关闭</button>
<!-- <button type="button" class="btn btn-primary">保存</button>-->
</div>
</div>
</div>
</div>
<!--</div>-->
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
// $(document).ready(function() {
// 页面加载完成后执行的操作
var data;
$(function () {
$.ajax({
url: '/manage/ledger_rfid/selectWasteNumber',
method: 'POST',
dataType: 'json',
success: function(response) {
console.log(response)
data = response.data;
if (data==1){
// document.getElementById("tt1").innerText=data
$("#tt1").text(data)
$("#myModal").show();
}
},
error: function(xhr, status, error) {
// 请求出错,可以在这里处理错误信息
console.error('请求出错');
}
});
});
function test() {
console.log("关闭")
$("#myModal").hide();
}
</script>
</body>
</html>

@ -9,6 +9,15 @@ public class StockDto {
private String epcCode;
private String locationCode;
private String state;
private String createTime;
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getState() {
return state;

@ -58,19 +58,17 @@
</foreach>
</insert>
<select id="xjSelect" resultMap="com.ruoyi.manage.mapper.LedgerRfidMapper.LedgerRfidResult">
select lf.objid,
lf.manufacturer_id,
rifd_code,
lf.batch_code,
location_type,
lf.location_code,
is_scrap
<select id="xjSelect" resultType="com.ruoyi.api.domain.StockDto">
select row_number() over (order by lf.location_code) as 'index',
rifd_code as epcCode,
lf.location_code as locationCode,
lf.create_time as createTime,
'未检' as state
from ledger_rfid lf
left join bg_wheel_chocks.base_location bl on lf.location_code = bl.location_code
left join bg_wheel_chocks.base_area_user bau on bl.store_id = bau.area_id
left join bg_wheel_chocks.sys_user su on bau.user_id = su.user_id
where su.login_name=#{user} and lf.is_scrap=1
left join base_location bl on lf.location_code = bl.location_code
left join base_area_user bau on bl.store_id = bau.area_id
where user_id=#{user}
and is_scrap = 1
</select>
<select id="bfSelect" resultMap="com.ruoyi.manage.mapper.LedgerRfidMapper.LedgerRfidResult">

@ -110,6 +110,7 @@ public class BaseAreaUserController extends BaseController
@ResponseBody
public AjaxResult editSave(BaseAreaUser baseAreaUser)
{
return toAjax(baseAreaUserService.updateBaseAreaUser(baseAreaUser));
}

@ -124,4 +124,11 @@ public class LedgerRfidController extends BaseController
{
return toAjax(ledgerRfidService.deleteLedgerRfidByObjids(ids));
}
@PostMapping("/selectWasteNumber")
@ResponseBody
public AjaxResult selectWasteNumber(){
int number=ledgerRfidService.countWasteNumber();
return success(number);
}
}

@ -56,6 +56,22 @@ public class BaseAreaUser extends BaseEntity
return areaId;
}
public SysUser getSysUser() {
return sysUser;
}
public void setSysUser(SysUser sysUser) {
this.sysUser = sysUser;
}
public BaseStore getBaseStore() {
return baseStore;
}
public void setBaseStore(BaseStore baseStore) {
this.baseStore = baseStore;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -59,4 +59,6 @@ public interface LedgerRfidMapper
* @return
*/
public int deleteLedgerRfidByObjids(String[] objids);
int countWasteNumber();
}

@ -58,4 +58,6 @@ public interface ILedgerRfidService
* @return
*/
public int deleteLedgerRfidByObjid(Long objid);
int countWasteNumber();
}

@ -88,4 +88,9 @@ public class LedgerRfidServiceImpl implements ILedgerRfidService {
public int deleteLedgerRfidByObjid(Long objid) {
return ledgerRfidMapper.deleteLedgerRfidByObjid(objid);
}
@Override
public int countWasteNumber() {
return ledgerRfidMapper.countWasteNumber();
}
}

@ -1,47 +1,49 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.manage.mapper.BaseAreaUserMapper">
<resultMap type="com.ruoyi.manage.domain.BaseAreaUser" id="BaseAreaUserResult">
<result property="objid" column="objid" />
<result property="userId" column="user_id" />
<result property="areaId" column="area_id" />
<association property="sysUser" resultMap="com.ruoyi.system.mapper.SysUserMapper.SysUserResult"/>
<result property="objid" column="objid"/>
<result property="userId" column="user_id"/>
<result property="areaId" column="area_id"/>
<association property="sysUser" javaType="com.ruoyi.common.core.domain.entity.SysUser">
<result property="userName" column="user_name"/>
</association>
<association property="baseStore" resultMap="com.ruoyi.manage.mapper.BaseStoreMapper.BaseStoreResult"/>
</resultMap>
<sql id="selectBaseAreaUserVo">
select objid, bau.user_id, area_id, su.login_name, su.user_name ,bs.store_name
select objid, bau.user_id, area_id, su.user_name, bs.store_name
from base_area_user bau
left join sys_user su on bau.user_id = su.user_id
left join sys_user su on bau.user_id = su.login_name
left join base_store bs on bs.store_id = area_id
</sql>
<select id="selectBaseAreaUserList" parameterType="BaseAreaUser" resultMap="BaseAreaUserResult">
<include refid="selectBaseAreaUserVo"/>
<where>
<if test="userId != null and userId != ''"> and bau.user_id = #{userId}</if>
<if test="areaId != null "> and area_id = #{areaId}</if>
<where>
<if test="userId != null and userId != ''">and bau.user_id = #{userId}</if>
<if test="areaId != null ">and area_id = #{areaId}</if>
</where>
</select>
<select id="selectBaseAreaUserByObjid" parameterType="Long" resultMap="BaseAreaUserResult">
<include refid="selectBaseAreaUserVo"/>
where objid = #{objid}
</select>
<insert id="insertBaseAreaUser" parameterType="BaseAreaUser" useGeneratedKeys="true" keyProperty="objid">
insert into base_area_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="areaId != null">area_id,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="areaId != null">#{areaId},</if>
</trim>
</trim>
</insert>
<update id="updateBaseAreaUser" parameterType="BaseAreaUser">
@ -54,11 +56,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteBaseAreaUserByObjid" parameterType="Long">
delete from base_area_user where objid = #{objid}
delete
from base_area_user
where objid = #{objid}
</delete>
<delete id="deleteBaseAreaUserByObjids" parameterType="String">
delete from base_area_user where objid in
delete from base_area_user where objid in
<foreach item="objid" collection="array" open="(" separator="," close=")">
#{objid}
</foreach>
@ -67,7 +71,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSysUser" resultMap="com.ruoyi.system.mapper.SysUserMapper.SysUserResult">
select login_name,
user_name
from sys_user where status=0;
from sys_user
where status = 0;
</select>
</mapper>

@ -27,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
location_code,
is_scrap,
lr.update_time,
lr.create_time,
bm.manufacturer_code,
bm.manufacturer_name
from ledger_rfid lr
@ -97,4 +98,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<select id="countWasteNumber" resultType="int">
select count(objid) from ledger_rfid where location_type=1 and is_scrap=2
</select>
</mapper>

@ -10,7 +10,7 @@
<label class="col-sm-3 control-label">选择账号:</label>
<div class="col-sm-8">
<select name="userId" class="form-control m-b" th:with="type=${@baseAreaUserServiceImpl.selectSysUser()}">
<option th:each="dict : ${type}" th:text="${dict.userName}" th:value="${dict.userId}"></option>
<option th:each="dict : ${type}" th:text="${dict.userName}" th:value="${dict.loginName}"></option>
</select>
</div>
</div>

@ -1,74 +1,81 @@
<!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('机场区域用户绑定列表')" />
<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>
<select name="userId" th:with="type=${@baseAreaUserServiceImpl.selectSysUser()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.userName}" th:value="${dict.userId}"></option>
</select>
</li>
<li>
<label>选择区域:</label>
<select name="areaId" th:with="type=${@storeService.selectArea()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.storeName}" th:value="${dict.storeId}"></option>
</select>
</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="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>账号名称:</label>
<select name="userId" th:with="type=${@baseAreaUserServiceImpl.selectSysUser()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.userName}"
th:value="${dict.loginName}"></option>
</select>
</li>
<li>
<label>选择区域:</label>
<select name="areaId" th:with="type=${@storeService.selectArea()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.storeName}"
th:value="${dict.storeId}"></option>
</select>
</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="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="manage:base_area_user:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manage:base_area_user:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="manage:base_area_user:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="manage:base_area_user:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="manage:base_area_user:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
shiro:hasPermission="manage:base_area_user:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="manage:base_area_user:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()"
shiro:hasPermission="manage:base_area_user:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('manage:base_area_user:edit')}]];
var removeFlag = [[${@permission.hasPermi('manage:base_area_user:remove')}]];
var prefix = ctx + "manage/base_area_user";
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('manage:base_area_user:edit')}]];
var removeFlag = [[${@permission.hasPermi('manage:base_area_user:remove')}]];
var prefix = ctx + "manage/base_area_user";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "机场区域用户绑定",
columns: [{
checkbox: true
},
$(function () {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "机场区域用户绑定",
columns: [{
checkbox: true
},
{
field: 'objid',
title: '主键',
@ -76,19 +83,15 @@
},
{
field: 'userId',
title: '账号',
visible: false
title: '用户账号'
},
{
field: 'sysUser.loginName',
title: '用户账号',
},
{
{
field: 'sysUser.userName',
title: '用户名称',
},
{
{
field: 'baseStore.storeName',
title: '区域名称',
},
@ -102,16 +105,16 @@
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.objid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
};
$.table.init(options);
});
</script>
</body>
</html>

@ -11,7 +11,7 @@
<label class="col-sm-3 control-label">账号名称:</label>
<div class="col-sm-8">
<select name="userId" class="form-control m-b" th:with="type=${@baseAreaUserServiceImpl.selectSysUser()}">
<option th:each="dict : ${type}" th:text="${dict.userName}" th:value="${dict.userId}" th:field="*{userId}"></option>
<option th:each="dict : ${type}" th:text="${dict.userName}" th:value="${dict.loginName}" th:field="*{userId}"></option>
</select>
</div>
</div>

@ -139,7 +139,12 @@
{
field: 'updateTime',
title: '更新时间'
}/*,
},
{
field: 'createTime',
title: '入场时间'
}
/*,
{
title: '操作',
align: 'center',

Loading…
Cancel
Save