feat:绑定及提交字段验证
parent
58dd4ecc7f
commit
e6c646d0f8
@ -0,0 +1,128 @@
|
||||
package com.ruoyi.manager.controller;
|
||||
|
||||
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.manager.domain.RecordtRfidBinding;
|
||||
import com.ruoyi.manager.service.IRecordtRfidBindingService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 货筐RFID绑定记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/manager/recordtRfidBinding")
|
||||
public class RecordtRfidBindingController extends BaseController
|
||||
{
|
||||
private String prefix = "manager/recordtRfidBinding";
|
||||
|
||||
@Autowired
|
||||
private IRecordtRfidBindingService recordtRfidBindingService;
|
||||
|
||||
@RequiresPermissions("manager:recordtRfidBinding:view")
|
||||
@GetMapping()
|
||||
public String recordtRfidBinding()
|
||||
{
|
||||
return prefix + "/recordtRfidBinding";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询货筐RFID绑定记录列表
|
||||
*/
|
||||
@RequiresPermissions("manager:recordtRfidBinding:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(RecordtRfidBinding recordtRfidBinding)
|
||||
{
|
||||
startPage();
|
||||
List<RecordtRfidBinding> list = recordtRfidBindingService.selectRecordtRfidBindingList(recordtRfidBinding);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出货筐RFID绑定记录列表
|
||||
*/
|
||||
@RequiresPermissions("manager:recordtRfidBinding:export")
|
||||
@Log(title = "货筐RFID绑定记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(RecordtRfidBinding recordtRfidBinding)
|
||||
{
|
||||
List<RecordtRfidBinding> list = recordtRfidBindingService.selectRecordtRfidBindingList(recordtRfidBinding);
|
||||
ExcelUtil<RecordtRfidBinding> util = new ExcelUtil<RecordtRfidBinding>(RecordtRfidBinding.class);
|
||||
return util.exportExcel(list, "货筐RFID绑定记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增货筐RFID绑定记录
|
||||
*/
|
||||
@RequiresPermissions("manager:recordtRfidBinding:add")
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存货筐RFID绑定记录
|
||||
*/
|
||||
@RequiresPermissions("manager:recordtRfidBinding:add")
|
||||
@Log(title = "货筐RFID绑定记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(RecordtRfidBinding recordtRfidBinding)
|
||||
{
|
||||
return toAjax(recordtRfidBindingService.insertRecordtRfidBinding(recordtRfidBinding));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改货筐RFID绑定记录
|
||||
*/
|
||||
@RequiresPermissions("manager:recordtRfidBinding:edit")
|
||||
@GetMapping("/edit/{rfidBindingId}")
|
||||
public String edit(@PathVariable("rfidBindingId") Long rfidBindingId, ModelMap mmap)
|
||||
{
|
||||
RecordtRfidBinding recordtRfidBinding = recordtRfidBindingService.selectRecordtRfidBindingByRfidBindingId(rfidBindingId);
|
||||
mmap.put("recordtRfidBinding", recordtRfidBinding);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存货筐RFID绑定记录
|
||||
*/
|
||||
@RequiresPermissions("manager:recordtRfidBinding:edit")
|
||||
@Log(title = "货筐RFID绑定记录", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(RecordtRfidBinding recordtRfidBinding)
|
||||
{
|
||||
return toAjax(recordtRfidBindingService.updateRecordtRfidBinding(recordtRfidBinding));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除货筐RFID绑定记录
|
||||
*/
|
||||
@RequiresPermissions("manager:recordtRfidBinding:remove")
|
||||
@Log(title = "货筐RFID绑定记录", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(recordtRfidBindingService.deleteRecordtRfidBindingByRfidBindingIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
package com.ruoyi.manager.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 货筐RFID绑定记录对象 base_basket_rfid_binding_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public class RecordtRfidBinding extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 标识ID */
|
||||
private Long rfidBindingId;
|
||||
|
||||
/** 资产ID */
|
||||
@Excel(name = "资产ID")
|
||||
private Long baseBasketId;
|
||||
|
||||
/** 货筐RFID */
|
||||
@Excel(name = "货筐RFID")
|
||||
private String basketEpc;
|
||||
|
||||
/** 货筐RFID(副) */
|
||||
@Excel(name = "货筐RFID(副)")
|
||||
private String basketEpc2;
|
||||
|
||||
/** 绑定人 */
|
||||
@Excel(name = "绑定人")
|
||||
private String createdBy;
|
||||
private String filePath;
|
||||
|
||||
|
||||
/** 绑定时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "绑定时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createdTime;
|
||||
|
||||
private BaseBasketInfo baseBasketInfo;
|
||||
|
||||
public BaseBasketInfo getBaseBasketInfo() {
|
||||
return baseBasketInfo;
|
||||
}
|
||||
|
||||
public void setBaseBasketInfo(BaseBasketInfo baseBasketInfo) {
|
||||
this.baseBasketInfo = baseBasketInfo;
|
||||
}
|
||||
|
||||
public String getFilePath() {
|
||||
return filePath;
|
||||
}
|
||||
|
||||
public void setFilePath(String filePath) {
|
||||
this.filePath = filePath;
|
||||
}
|
||||
|
||||
public void setRfidBindingId(Long rfidBindingId)
|
||||
{
|
||||
this.rfidBindingId = rfidBindingId;
|
||||
}
|
||||
|
||||
public Long getRfidBindingId()
|
||||
{
|
||||
return rfidBindingId;
|
||||
}
|
||||
|
||||
public void setBaseBasketId(Long baseBasketId)
|
||||
{
|
||||
this.baseBasketId = baseBasketId;
|
||||
}
|
||||
|
||||
public Long getBaseBasketId()
|
||||
{
|
||||
return baseBasketId;
|
||||
}
|
||||
|
||||
public void setBasketEpc(String basketEpc)
|
||||
{
|
||||
this.basketEpc = basketEpc;
|
||||
}
|
||||
|
||||
public String getBasketEpc()
|
||||
{
|
||||
return basketEpc;
|
||||
}
|
||||
|
||||
public void setBasketEpc2(String basketEpc2)
|
||||
{
|
||||
this.basketEpc2 = basketEpc2;
|
||||
}
|
||||
|
||||
public String getBasketEpc2()
|
||||
{
|
||||
return basketEpc2;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedTime(Date createdTime)
|
||||
{
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
public Date getCreatedTime()
|
||||
{
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("rfidBindingId", getRfidBindingId())
|
||||
.append("baseBasketId", getBaseBasketId())
|
||||
.append("basketEpc", getBasketEpc())
|
||||
.append("basketEpc2", getBasketEpc2())
|
||||
.append("createdBy", getCreatedBy())
|
||||
.append("createdTime", getCreatedTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.manager.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manager.domain.RecordtRfidBinding;
|
||||
|
||||
/**
|
||||
* 货筐RFID绑定记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public interface RecordtRfidBindingMapper
|
||||
{
|
||||
/**
|
||||
* 查询货筐RFID绑定记录
|
||||
*
|
||||
* @param rfidBindingId 货筐RFID绑定记录主键
|
||||
* @return 货筐RFID绑定记录
|
||||
*/
|
||||
public RecordtRfidBinding selectRecordtRfidBindingByRfidBindingId(Long rfidBindingId);
|
||||
|
||||
/**
|
||||
* 查询货筐RFID绑定记录列表
|
||||
*
|
||||
* @param recordtRfidBinding 货筐RFID绑定记录
|
||||
* @return 货筐RFID绑定记录集合
|
||||
*/
|
||||
public List<RecordtRfidBinding> selectRecordtRfidBindingList(RecordtRfidBinding recordtRfidBinding);
|
||||
|
||||
/**
|
||||
* 新增货筐RFID绑定记录
|
||||
*
|
||||
* @param recordtRfidBinding 货筐RFID绑定记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordtRfidBinding(RecordtRfidBinding recordtRfidBinding);
|
||||
|
||||
/**
|
||||
* 修改货筐RFID绑定记录
|
||||
*
|
||||
* @param recordtRfidBinding 货筐RFID绑定记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordtRfidBinding(RecordtRfidBinding recordtRfidBinding);
|
||||
|
||||
/**
|
||||
* 删除货筐RFID绑定记录
|
||||
*
|
||||
* @param rfidBindingId 货筐RFID绑定记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordtRfidBindingByRfidBindingId(Long rfidBindingId);
|
||||
|
||||
/**
|
||||
* 批量删除货筐RFID绑定记录
|
||||
*
|
||||
* @param rfidBindingIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordtRfidBindingByRfidBindingIds(String[] rfidBindingIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.manager.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manager.domain.RecordtRfidBinding;
|
||||
|
||||
/**
|
||||
* 货筐RFID绑定记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public interface IRecordtRfidBindingService
|
||||
{
|
||||
/**
|
||||
* 查询货筐RFID绑定记录
|
||||
*
|
||||
* @param rfidBindingId 货筐RFID绑定记录主键
|
||||
* @return 货筐RFID绑定记录
|
||||
*/
|
||||
public RecordtRfidBinding selectRecordtRfidBindingByRfidBindingId(Long rfidBindingId);
|
||||
|
||||
/**
|
||||
* 查询货筐RFID绑定记录列表
|
||||
*
|
||||
* @param recordtRfidBinding 货筐RFID绑定记录
|
||||
* @return 货筐RFID绑定记录集合
|
||||
*/
|
||||
public List<RecordtRfidBinding> selectRecordtRfidBindingList(RecordtRfidBinding recordtRfidBinding);
|
||||
|
||||
/**
|
||||
* 新增货筐RFID绑定记录
|
||||
*
|
||||
* @param recordtRfidBinding 货筐RFID绑定记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordtRfidBinding(RecordtRfidBinding recordtRfidBinding);
|
||||
|
||||
/**
|
||||
* 修改货筐RFID绑定记录
|
||||
*
|
||||
* @param recordtRfidBinding 货筐RFID绑定记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordtRfidBinding(RecordtRfidBinding recordtRfidBinding);
|
||||
|
||||
/**
|
||||
* 批量删除货筐RFID绑定记录
|
||||
*
|
||||
* @param rfidBindingIds 需要删除的货筐RFID绑定记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordtRfidBindingByRfidBindingIds(String rfidBindingIds);
|
||||
|
||||
/**
|
||||
* 删除货筐RFID绑定记录信息
|
||||
*
|
||||
* @param rfidBindingId 货筐RFID绑定记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordtRfidBindingByRfidBindingId(Long rfidBindingId);
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package com.ruoyi.manager.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.manager.domain.RecordtRfidBinding;
|
||||
import com.ruoyi.manager.mapper.RecordtRfidBindingMapper;
|
||||
import com.ruoyi.manager.service.IRecordtRfidBindingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 货筐RFID绑定记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
@Service
|
||||
public class RecordtRfidBindingServiceImpl implements IRecordtRfidBindingService {
|
||||
@Autowired
|
||||
private RecordtRfidBindingMapper recordtRfidBindingMapper;
|
||||
|
||||
/**
|
||||
* 查询货筐RFID绑定记录
|
||||
*
|
||||
* @param rfidBindingId 货筐RFID绑定记录主键
|
||||
* @return 货筐RFID绑定记录
|
||||
*/
|
||||
@Override
|
||||
public RecordtRfidBinding selectRecordtRfidBindingByRfidBindingId(Long rfidBindingId) {
|
||||
return recordtRfidBindingMapper.selectRecordtRfidBindingByRfidBindingId(rfidBindingId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询货筐RFID绑定记录列表
|
||||
*
|
||||
* @param recordtRfidBinding 货筐RFID绑定记录
|
||||
* @return 货筐RFID绑定记录
|
||||
*/
|
||||
@Override
|
||||
public List<RecordtRfidBinding> selectRecordtRfidBindingList(RecordtRfidBinding recordtRfidBinding) {
|
||||
return recordtRfidBindingMapper.selectRecordtRfidBindingList(recordtRfidBinding);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增货筐RFID绑定记录
|
||||
*
|
||||
* @param recordtRfidBinding 货筐RFID绑定记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRecordtRfidBinding(RecordtRfidBinding recordtRfidBinding) {
|
||||
recordtRfidBinding.setCreatedTime(DateUtils.getNowDate());
|
||||
return recordtRfidBindingMapper.insertRecordtRfidBinding(recordtRfidBinding);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改货筐RFID绑定记录
|
||||
*
|
||||
* @param recordtRfidBinding 货筐RFID绑定记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRecordtRfidBinding(RecordtRfidBinding recordtRfidBinding) {
|
||||
return recordtRfidBindingMapper.updateRecordtRfidBinding(recordtRfidBinding);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除货筐RFID绑定记录
|
||||
*
|
||||
* @param rfidBindingIds 需要删除的货筐RFID绑定记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordtRfidBindingByRfidBindingIds(String rfidBindingIds) {
|
||||
return recordtRfidBindingMapper.deleteRecordtRfidBindingByRfidBindingIds(Convert.toStrArray(rfidBindingIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除货筐RFID绑定记录信息
|
||||
*
|
||||
* @param rfidBindingId 货筐RFID绑定记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordtRfidBindingByRfidBindingId(Long rfidBindingId) {
|
||||
return recordtRfidBindingMapper.deleteRecordtRfidBindingByRfidBindingId(rfidBindingId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,102 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ruoyi.manager.mapper.RecordtRfidBindingMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.manager.domain.RecordtRfidBinding" id="RecordtRfidBindingResult">
|
||||
<result property="rfidBindingId" column="RFID_binding_id"/>
|
||||
<result property="baseBasketId" column="base_basket_id"/>
|
||||
<result property="basketEpc" column="basket_epc"/>
|
||||
<result property="basketEpc2" column="basket_epc2"/>
|
||||
<result property="createdBy" column="created_by"/>
|
||||
<result property="createdTime" column="created_time"/>
|
||||
<result property="filePath" column="file_path"/>
|
||||
<association property="baseBasketInfo"
|
||||
resultMap="com.ruoyi.manager.mapper.BaseBasketInfoMapper.BaseBasketInfoResult"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRecordtRfidBindingListSql">
|
||||
select RFID_binding_id,
|
||||
base_basket_id,
|
||||
base.basket_epc,
|
||||
base.basket_epc2,
|
||||
base.created_by,
|
||||
base.created_time,
|
||||
file_path,
|
||||
basket_code,
|
||||
steel_grade,
|
||||
self_code,
|
||||
basket_type
|
||||
from base_basket_rfid_binding_record base
|
||||
left join base_basket_info bbi on base.base_basket_id = bbi.obj_id
|
||||
</sql>
|
||||
<sql id="selectRecordtRfidBindingVo">
|
||||
select RFID_binding_id, base_basket_id, basket_epc, basket_epc2, created_by, created_time
|
||||
from base_basket_rfid_binding_record
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectRecordtRfidBindingList" parameterType="RecordtRfidBinding" resultMap="RecordtRfidBindingResult">
|
||||
<include refid="selectRecordtRfidBindingListSql"/>
|
||||
<where>
|
||||
<if test="createdBy != null and createdBy != ''">and base.created_by = #{createdBy}</if>
|
||||
<if test="params.beginCreatedTime != null and params.beginCreatedTime != ''
|
||||
and params.endCreatedTime != null and params.endCreatedTime != ''">
|
||||
and base.created_time between #{params.beginCreatedTime} and #{params.endCreatedTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRecordtRfidBindingByRfidBindingId" parameterType="Long" resultMap="RecordtRfidBindingResult">
|
||||
<include refid="selectRecordtRfidBindingVo"/>
|
||||
where RFID_binding_id = #{rfidBindingId}
|
||||
</select>
|
||||
|
||||
<insert id="insertRecordtRfidBinding" parameterType="RecordtRfidBinding" useGeneratedKeys="true"
|
||||
keyProperty="rfidBindingId">
|
||||
insert into base_basket_rfid_binding_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="baseBasketId != null">base_basket_id,</if>
|
||||
<if test="basketEpc != null">basket_epc,</if>
|
||||
<if test="basketEpc2 != null">basket_epc2,</if>
|
||||
<if test="createdBy != null">created_by,</if>
|
||||
<if test="createdTime != null">created_time,</if>
|
||||
<if test="filePath != null">file_path,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="baseBasketId != null">#{baseBasketId},</if>
|
||||
<if test="basketEpc != null">#{basketEpc},</if>
|
||||
<if test="basketEpc2 != null">#{basketEpc2},</if>
|
||||
<if test="createdBy != null">#{createdBy},</if>
|
||||
<if test="createdTime != null">#{createdTime},</if>
|
||||
<if test="filePath != null">#{filePath},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRecordtRfidBinding" parameterType="RecordtRfidBinding">
|
||||
update base_basket_rfid_binding_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="baseBasketId != null">base_basket_id = #{baseBasketId},</if>
|
||||
<if test="basketEpc != null">basket_epc = #{basketEpc},</if>
|
||||
<if test="basketEpc2 != null">basket_epc2 = #{basketEpc2},</if>
|
||||
<if test="createdBy != null">created_by = #{createdBy},</if>
|
||||
<if test="createdTime != null">created_time = #{createdTime},</if>
|
||||
</trim>
|
||||
where RFID_binding_id = #{rfidBindingId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRecordtRfidBindingByRfidBindingId" parameterType="Long">
|
||||
delete
|
||||
from base_basket_rfid_binding_record
|
||||
where RFID_binding_id = #{rfidBindingId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRecordtRfidBindingByRfidBindingIds" parameterType="String">
|
||||
delete from base_basket_rfid_binding_record where RFID_binding_id in
|
||||
<foreach item="rfidBindingId" collection="array" open="(" separator="," close=")">
|
||||
#{rfidBindingId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,22 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('货筐RFID绑定记录', '2044', '1', '/manager/recordtRfidBinding', 'C', '0', 'manager:recordtRfidBinding:view', '#', 'admin', sysdate(), '', null, '货筐RFID绑定记录菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('货筐RFID绑定记录查询', @parentId, '1', '#', 'F', '0', 'manager:recordtRfidBinding:list', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('货筐RFID绑定记录新增', @parentId, '2', '#', 'F', '0', 'manager:recordtRfidBinding:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('货筐RFID绑定记录修改', @parentId, '3', '#', 'F', '0', 'manager:recordtRfidBinding:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('货筐RFID绑定记录删除', @parentId, '4', '#', 'F', '0', 'manager:recordtRfidBinding:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('货筐RFID绑定记录导出', @parentId, '5', '#', 'F', '0', 'manager:recordtRfidBinding:export', '#', 'admin', sysdate(), '', null, '');
|
||||
@ -0,0 +1,163 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<th:block th:include="include :: header('货筐RFID绑定记录列表')"/>
|
||||
</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 name="createdBy" type="text"/>
|
||||
</li>
|
||||
<li class="select-time">
|
||||
<label>绑定时间:</label>
|
||||
<input class="time-input" id="startTime" name="params[beginCreatedTime]"
|
||||
placeholder="开始时间"
|
||||
type="text"/>
|
||||
<span>-</span>
|
||||
<input class="time-input" id="endTime" name="params[endCreatedTime]" placeholder="结束时间"
|
||||
type="text"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
||||
class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
||||
class="fa fa-refresh"></i> 重置</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="manager:recordtRfidBinding:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
|
||||
shiro:hasPermission="manager:recordtRfidBinding:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
|
||||
shiro:hasPermission="manager:recordtRfidBinding:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()"
|
||||
shiro:hasPermission="manager:recordtRfidBinding: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>
|
||||
</div>
|
||||
<th:block th:include="include :: footer"/>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('manager:recordtRfidBinding:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('manager:recordtRfidBinding:remove')}]];
|
||||
var basketTypeDatas = [[${@dict.getType('basket_type')}]];
|
||||
var prefix = ctx + "manager/recordtRfidBinding";
|
||||
|
||||
$(function () {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "货筐RFID绑定记录",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'rfidBindingId',
|
||||
title: '标识ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'baseBasketId',
|
||||
title: '资产ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'baseBasketInfo.basketCode',
|
||||
title: '资产编号'
|
||||
},
|
||||
{
|
||||
field: 'baseBasketInfo.steelGrade',
|
||||
title: '钢号'
|
||||
},
|
||||
{
|
||||
field: 'baseBasketInfo.selfCode',
|
||||
title: '自编号'
|
||||
},
|
||||
{
|
||||
field: 'baseBasketInfo.basketType',
|
||||
title: '资产类型',
|
||||
formatter: function (value, row, index) {
|
||||
return $.table.selectDictLabel(basketTypeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'basketEpc',
|
||||
title: '货筐RFID'
|
||||
},
|
||||
{
|
||||
field: 'basketEpc2',
|
||||
title: '货筐RFID(副)'
|
||||
},
|
||||
{
|
||||
field: 'filePath',
|
||||
title: '绑定照片',
|
||||
formatter: function (value, row, index) {
|
||||
// return '<img src="' + ctx + value + '" alt="绑定照片" style="max-width: 100px; max-height: 100px;">';
|
||||
return imageView(value, 540);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createdBy',
|
||||
title: '绑定人'
|
||||
},
|
||||
{
|
||||
field: 'createdTime',
|
||||
title: '绑定时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
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.rfidBindingId + '\')"><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.rfidBindingId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
//加载图片
|
||||
function imageView(value, h, m) {
|
||||
|
||||
if (value != null) {
|
||||
var url = value.split(',')
|
||||
var ht = ''
|
||||
url.forEach(function (value, i) {
|
||||
// console.log('第'+i+"="+value)
|
||||
// console.log('第'+i+"="+value == '')
|
||||
ht += "<img class='img-circle img-xs' data-height='540px' data-width='324px' data-target='self' src='" + value + "'/>"
|
||||
})
|
||||
|
||||
return ht
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue