完成 废品入库

master
wangh 8 months ago
parent b457399d61
commit bb6ec4c7ef

@ -4,15 +4,76 @@
<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();
}
}

@ -8,14 +8,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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"/>
<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>
@ -54,7 +56,9 @@ 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">
@ -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>

@ -14,19 +14,23 @@
<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>
<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>
<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>
<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>
@ -37,13 +41,16 @@
<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">
<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">
<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">
<a class="btn btn-warning" onclick="$.table.exportExcel()"
shiro:hasPermission="manage:base_area_user:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
@ -76,13 +83,9 @@
},
{
field: 'userId',
title: '账号',
visible: false
},
{
field: 'sysUser.loginName',
title: '用户账号',
title: '用户账号'
},
{
field: 'sysUser.userName',
title: '用户名称',

@ -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