feat:货物绑定解绑功能

master
wanghao 4 months ago
parent e6c646d0f8
commit 0d91d3710f

@ -5,13 +5,13 @@ ruoyi:
# 版本
version: 4.8.1
# 版权年份
copyrightYear: 2025
copyrightYear: 2026
# 实例演示开关
demoEnabled: false
demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: F:/ruoyi/uploadPath
# 获取ip地址开关
addressEnabled: false
addressEnabled: true
# 开发环境配置
server:

@ -2,11 +2,10 @@ package com.ruoyi.common.utils.file;
/**
*
*
*
* @author ruoyi
*/
public class MimeTypeUtils
{
public class MimeTypeUtils {
public static final String IMAGE_PNG = "image/png";
public static final String IMAGE_JPG = "image/jpg";
@ -17,14 +16,14 @@ public class MimeTypeUtils
public static final String IMAGE_GIF = "image/gif";
public static final String[] IMAGE_EXTENSION = { "bmp", "gif", "jpg", "jpeg", "png" };
public static final String[] IMAGE_EXTENSION = {"bmp", "gif", "jpg", "jpeg", "png"};
public static final String[] FLASH_EXTENSION = { "swf", "flv" };
public static final String[] FLASH_EXTENSION = {"swf", "flv"};
public static final String[] MEDIA_EXTENSION = { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg",
"asf", "rm", "rmvb" };
public static final String[] MEDIA_EXTENSION = {"swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg",
"asf", "rm", "rmvb"};
public static final String[] VIDEO_EXTENSION = { "mp4", "avi", "rmvb" };
public static final String[] VIDEO_EXTENSION = {"mp4", "avi", "rmvb"};
public static final String[] DEFAULT_ALLOWED_EXTENSION = {
// 图片
@ -36,12 +35,11 @@ public class MimeTypeUtils
// 视频格式
"mp4", "avi", "rmvb",
// pdf
"pdf" };
"pdf",
"apk"};
public static String getExtension(String prefix)
{
switch (prefix)
{
public static String getExtension(String prefix) {
switch (prefix) {
case IMAGE_PNG:
return "png";
case IMAGE_JPG:

@ -315,6 +315,7 @@ public class ShiroConfig
filterChainDefinitionMap.put("/ruoyi/**", "anon");
filterChainDefinitionMap.put("/api/**", "anon");
filterChainDefinitionMap.put("/captcha/captchaImage**", "anon");
filterChainDefinitionMap.put("/profile/upload/**", "anon");
// 匿名访问不鉴权注解列表
List<String> permitAllUrl = SpringUtils.getBean(PermitAllUrlProperties.class).getUrls();
if (StringUtils.isNotEmpty(permitAllUrl))

@ -18,14 +18,13 @@ import java.util.List;
/**
* Controller
*
*
* @author wenjy
* @date 2024-07-15
*/
@Controller
@RequestMapping("/base/LedgerInstant")
public class LedgerInstantBindingController extends BaseController
{
public class LedgerInstantBindingController extends BaseController {
private String prefix = "base/LedgerInstant";
@Autowired
@ -33,8 +32,7 @@ public class LedgerInstantBindingController extends BaseController
@RequiresPermissions("base:LedgerInstant:view")
@GetMapping()
public String LedgerInstant()
{
public String LedgerInstant() {
return prefix + "/LedgerInstant";
}
@ -44,10 +42,19 @@ public class LedgerInstantBindingController extends BaseController
@RequiresPermissions("base:LedgerInstant:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(LedgerInstantBinding ledgerInstantBinding)
{
public TableDataInfo list(LedgerInstantBinding ledgerInstantBinding) {
startPage();
List<LedgerInstantBinding> list = ledgerInstantBindingService.selectLedgerInstantBindingList(ledgerInstantBinding);
// List<LedgerInstantBinding> list = ledgerInstantBindingService.selectLedgerInstantBindingList(ledgerInstantBinding);
List<LedgerInstantBinding> list = ledgerInstantBindingService.selectList(ledgerInstantBinding);
return getDataTable(list);
}
@PostMapping("/childTablelist")
@ResponseBody
public TableDataInfo childTablelist(LedgerInstantBinding ledgerInstantBinding) {
// startPage();
List<LedgerInstantBinding> list = ledgerInstantBindingService.selectLedgerChildTablelist(ledgerInstantBinding);
// List<LedgerInstantBinding> list = ledgerInstantBindingService.selectList(ledgerInstantBinding);
return getDataTable(list);
}
@ -58,8 +65,7 @@ public class LedgerInstantBindingController extends BaseController
@Log(title = "实时绑定台账", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(LedgerInstantBinding ledgerInstantBinding)
{
public AjaxResult export(LedgerInstantBinding ledgerInstantBinding) {
List<LedgerInstantBinding> list = ledgerInstantBindingService.selectLedgerInstantBindingList(ledgerInstantBinding);
ExcelUtil<LedgerInstantBinding> util = new ExcelUtil<LedgerInstantBinding>(LedgerInstantBinding.class);
return util.exportExcel(list, "实时绑定台账数据");
@ -69,8 +75,7 @@ public class LedgerInstantBindingController extends BaseController
*
*/
@GetMapping("/add")
public String add()
{
public String add() {
return prefix + "/add";
}
@ -81,8 +86,7 @@ public class LedgerInstantBindingController extends BaseController
@Log(title = "实时绑定台账", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(LedgerInstantBinding ledgerInstantBinding)
{
public AjaxResult addSave(LedgerInstantBinding ledgerInstantBinding) {
return toAjax(ledgerInstantBindingService.insertLedgerInstantBinding(ledgerInstantBinding));
}
@ -91,8 +95,7 @@ public class LedgerInstantBindingController extends BaseController
*/
@RequiresPermissions("base:LedgerInstant:edit")
@GetMapping("/edit/{objid}")
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
{
public String edit(@PathVariable("objid") Long objid, ModelMap mmap) {
LedgerInstantBinding ledgerInstantBinding = ledgerInstantBindingService.selectLedgerInstantBindingByObjid(objid);
mmap.put("ledgerInstantBinding", ledgerInstantBinding);
return prefix + "/edit";
@ -105,8 +108,7 @@ public class LedgerInstantBindingController extends BaseController
@Log(title = "实时绑定台账", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(LedgerInstantBinding ledgerInstantBinding)
{
public AjaxResult editSave(LedgerInstantBinding ledgerInstantBinding) {
return toAjax(ledgerInstantBindingService.updateLedgerInstantBinding(ledgerInstantBinding));
}
@ -115,10 +117,9 @@ public class LedgerInstantBindingController extends BaseController
*/
@RequiresPermissions("base:LedgerInstant:remove")
@Log(title = "实时绑定台账", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
public AjaxResult remove(String ids) {
return toAjax(ledgerInstantBindingService.deleteLedgerInstantBindingByObjids(ids));
}
}

@ -0,0 +1,123 @@
package com.ruoyi.manager.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.manager.domain.RecordBasketRepairSpareParts;
import com.ruoyi.manager.service.IRecordBasketRepairSparePartsService;
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.*;
import java.util.List;
/**
* -Controller
*
* @author ruoyi
* @date 2026-02-05
*/
@Controller
@RequestMapping("/manager/parts")
public class RecordBasketRepairSparePartsController extends BaseController {
private String prefix = "manager/parts" ;
@Autowired
private IRecordBasketRepairSparePartsService recordBasketRepairSparePartsService;
@RequiresPermissions("manager:parts:view")
@GetMapping()
public String parts() {
return prefix + "/parts" ;
}
/**
* -
*/
@RequiresPermissions("manager:parts:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(RecordBasketRepairSpareParts recordBasketRepairSpareParts) {
startPage();
List<RecordBasketRepairSpareParts> list = recordBasketRepairSparePartsService.selectRecordBasketRepairSparePartsList(recordBasketRepairSpareParts);
return getDataTable(list);
}
@PostMapping("/childTablelist")
@ResponseBody
public TableDataInfo childTablelist(RecordBasketRepairSpareParts recordBasketRepairSpareParts) {
List<RecordBasketRepairSpareParts> list = recordBasketRepairSparePartsService.selectRecordBasketRepairSparePartsList(recordBasketRepairSpareParts);
return getDataTable(list);
}
/**
* -
*/
@RequiresPermissions("manager:parts:export")
@Log(title = "维修记录-添加备件", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(RecordBasketRepairSpareParts recordBasketRepairSpareParts) {
List<RecordBasketRepairSpareParts> list = recordBasketRepairSparePartsService.selectRecordBasketRepairSparePartsList(recordBasketRepairSpareParts);
ExcelUtil<RecordBasketRepairSpareParts> util = new ExcelUtil<RecordBasketRepairSpareParts>(RecordBasketRepairSpareParts.class);
return util.exportExcel(list, "维修记录-添加备件数据");
}
/**
* -
*/
@RequiresPermissions("manager:parts:add")
@GetMapping("/add")
public String add() {
return prefix + "/add" ;
}
/**
* -
*/
@RequiresPermissions("manager:parts:add")
@Log(title = "维修记录-添加备件", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(RecordBasketRepairSpareParts recordBasketRepairSpareParts) {
return toAjax(recordBasketRepairSparePartsService.insertRecordBasketRepairSpareParts(recordBasketRepairSpareParts));
}
/**
* -
*/
@RequiresPermissions("manager:parts:edit")
@GetMapping("/edit/{recordRepairSparePartsId}")
public String edit(@PathVariable("recordRepairSparePartsId") Long recordRepairSparePartsId, ModelMap mmap) {
RecordBasketRepairSpareParts recordBasketRepairSpareParts = recordBasketRepairSparePartsService.selectRecordBasketRepairSparePartsByRecordRepairSparePartsId(recordRepairSparePartsId);
mmap.put("recordBasketRepairSpareParts", recordBasketRepairSpareParts);
return prefix + "/edit" ;
}
/**
* -
*/
@RequiresPermissions("manager:parts:edit")
@Log(title = "维修记录-添加备件", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(RecordBasketRepairSpareParts recordBasketRepairSpareParts) {
return toAjax(recordBasketRepairSparePartsService.updateRecordBasketRepairSpareParts(recordBasketRepairSpareParts));
}
/**
* -
*/
@RequiresPermissions("manager:parts:remove")
@Log(title = "维修记录-添加备件", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(recordBasketRepairSparePartsService.deleteRecordBasketRepairSparePartsByRecordRepairSparePartsIds(ids));
}
}

@ -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.RecordCargoBinding;
import com.ruoyi.manager.service.IRecordCargoBindingService;
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 ruoyi
* @date 2026-02-28
*/
@Controller
@RequestMapping("/manager/recordCargoBinding")
public class RecordCargoBindingController extends BaseController
{
private String prefix = "manager/recordCargoBinding";
@Autowired
private IRecordCargoBindingService recordCargoBindingService;
@RequiresPermissions("manager:recordCargoBinding:view")
@GetMapping()
public String recordCargoBinding()
{
return prefix + "/recordCargoBinding";
}
/**
*
*/
@RequiresPermissions("manager:recordCargoBinding:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(RecordCargoBinding recordCargoBinding)
{
startPage();
List<RecordCargoBinding> list = recordCargoBindingService.selectRecordCargoBindingList(recordCargoBinding);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("manager:recordCargoBinding:export")
@Log(title = "货物绑定记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(RecordCargoBinding recordCargoBinding)
{
List<RecordCargoBinding> list = recordCargoBindingService.selectRecordCargoBindingList(recordCargoBinding);
ExcelUtil<RecordCargoBinding> util = new ExcelUtil<RecordCargoBinding>(RecordCargoBinding.class);
return util.exportExcel(list, "货物绑定记录数据");
}
/**
*
*/
@RequiresPermissions("manager:recordCargoBinding:add")
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("manager:recordCargoBinding:add")
@Log(title = "货物绑定记录", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(RecordCargoBinding recordCargoBinding)
{
return toAjax(recordCargoBindingService.insertRecordCargoBinding(recordCargoBinding));
}
/**
*
*/
@RequiresPermissions("manager:recordCargoBinding:edit")
@GetMapping("/edit/{objid}")
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
{
RecordCargoBinding recordCargoBinding = recordCargoBindingService.selectRecordCargoBindingByObjid(objid);
mmap.put("recordCargoBinding", recordCargoBinding);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("manager:recordCargoBinding:edit")
@Log(title = "货物绑定记录", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(RecordCargoBinding recordCargoBinding)
{
return toAjax(recordCargoBindingService.updateRecordCargoBinding(recordCargoBinding));
}
/**
*
*/
@RequiresPermissions("manager:recordCargoBinding:remove")
@Log(title = "货物绑定记录", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(recordCargoBindingService.deleteRecordCargoBindingByObjids(ids));
}
}

@ -7,6 +7,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
import java.util.List;
/**
* base_basket_info
@ -77,6 +78,10 @@ public class BaseBasketInfo extends BaseEntity {
private String updatedBy;
private Long manufacturerId;
private List<LedgerInstantBinding> ledgerInstantBindings;
/**
*
*/
@ -87,6 +92,15 @@ public class BaseBasketInfo extends BaseEntity {
// @Excel(name = "生产厂家", targetAttr = "manufacturerName", type = Excel.Type.EXPORT)
private BaseManufacturer baseManufacturer;
public List<LedgerInstantBinding> getLedgerInstantBindings() {
return ledgerInstantBindings;
}
public void setLedgerInstantBindings(List<LedgerInstantBinding> ledgerInstantBindings) {
this.ledgerInstantBindings = ledgerInstantBindings;
}
public String getDepartment() {
return department;
}

@ -37,6 +37,27 @@ public class LedgerInstantBinding extends BaseEntity
private String locationCode;
private String basketCode;
private Long basketId;
private BaseBasketInfo baseBasketInfo;
public Long getBasketId() {
return basketId;
}
public void setBasketId(Long basketId) {
this.basketId = basketId;
}
public BaseBasketInfo getBaseBasketInfo() {
return baseBasketInfo;
}
public void setBaseBasketInfo(BaseBasketInfo baseBasketInfo) {
this.baseBasketInfo = baseBasketInfo;
}
public void setObjid(Long objid)
{

@ -0,0 +1,99 @@
package com.ruoyi.manager.domain;
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;
/**
* - record_basket_repair_spare_parts
*
* @author ruoyi
* @date 2026-02-05
*/
public class RecordBasketRepairSpareParts extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 标识ID */
private Long recordRepairSparePartsId;
/** 维修记录表id */
@Excel(name = "维修记录表id")
private Long repairId;
/** 物料名称 */
@Excel(name = "物料名称")
private String partName;
/** 规格型号 */
@Excel(name = "规格型号")
private String partSpecifications;
/** 使用数量 */
@Excel(name = "使用数量")
private String amount;
public void setRecordRepairSparePartsId(Long recordRepairSparePartsId)
{
this.recordRepairSparePartsId = recordRepairSparePartsId;
}
public Long getRecordRepairSparePartsId()
{
return recordRepairSparePartsId;
}
public void setRepairId(Long repairId)
{
this.repairId = repairId;
}
public Long getRepairId()
{
return repairId;
}
public void setPartName(String partName)
{
this.partName = partName;
}
public String getPartName()
{
return partName;
}
public void setPartSpecifications(String partSpecifications)
{
this.partSpecifications = partSpecifications;
}
public String getPartSpecifications()
{
return partSpecifications;
}
public void setAmount(String amount)
{
this.amount = amount;
}
public String getAmount()
{
return amount;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("recordRepairSparePartsId", getRecordRepairSparePartsId())
.append("repairId", getRepairId())
.append("partName", getPartName())
.append("partSpecifications", getPartSpecifications())
.append("amount", getAmount())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

@ -0,0 +1,116 @@
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;
/**
* record_cargo_binding
*
* @author ruoyi
* @date 2026-02-28
*/
public class RecordCargoBinding extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 自增主键 */
private Long objid;
/** 扫描RFID */
@Excel(name = "扫描RFID")
private String cargoFrameEpc;
/** 货物条码 */
@Excel(name = "货物条码")
private String waybillNumber;
/** 绑定时间 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@Excel(name = "绑定时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date crateTime;
/** 资产ID */
@Excel(name = "资产ID")
private Long basketId;
/** 位置信息 */
@Excel(name = "位置信息")
private String locationInfo;
public void setObjid(Long objid)
{
this.objid = objid;
}
public Long getObjid()
{
return objid;
}
public void setCargoFrameEpc(String cargoFrameEpc)
{
this.cargoFrameEpc = cargoFrameEpc;
}
public String getCargoFrameEpc()
{
return cargoFrameEpc;
}
public void setWaybillNumber(String waybillNumber)
{
this.waybillNumber = waybillNumber;
}
public String getWaybillNumber()
{
return waybillNumber;
}
public void setCrateTime(Date crateTime)
{
this.crateTime = crateTime;
}
public Date getCrateTime()
{
return crateTime;
}
public void setBasketId(Long basketId)
{
this.basketId = basketId;
}
public Long getBasketId()
{
return basketId;
}
public void setLocationInfo(String locationInfo)
{
this.locationInfo = locationInfo;
}
public String getLocationInfo()
{
return locationInfo;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("objid", getObjid())
.append("cargoFrameEpc", getCargoFrameEpc())
.append("waybillNumber", getWaybillNumber())
.append("crateTime", getCrateTime())
.append("createBy", getCreateBy())
.append("basketId", getBasketId())
.append("locationInfo", getLocationInfo())
.toString();
}
}

@ -25,11 +25,11 @@ public class RecordtRfidBinding extends BaseEntity
private Long baseBasketId;
/** 货筐RFID */
@Excel(name = "货筐RFID")
@Excel(name = "RFID标签1")
private String basketEpc;
/** 货筐RFID(副) */
@Excel(name = "货筐RFID(副)")
@Excel(name = "RFID标签2")
private String basketEpc2;
/** 绑定人 */

@ -59,4 +59,10 @@ public interface LedgerInstantBindingMapper
* @return
*/
public int deleteLedgerInstantBindingByObjids(String[] objids);
List<LedgerInstantBinding> selectList(LedgerInstantBinding ledgerInstantBinding);
List<LedgerInstantBinding> selectLedgerChildTablelist(LedgerInstantBinding ledgerInstantBinding);
int unbindingCargoDeleteLedger(Long basketId);
}

@ -0,0 +1,61 @@
package com.ruoyi.manager.mapper;
import java.util.List;
import com.ruoyi.manager.domain.RecordBasketRepairSpareParts;
/**
* -Mapper
*
* @author ruoyi
* @date 2026-02-05
*/
public interface RecordBasketRepairSparePartsMapper
{
/**
* -
*
* @param recordRepairSparePartsId -
* @return -
*/
public RecordBasketRepairSpareParts selectRecordBasketRepairSparePartsByRecordRepairSparePartsId(Long recordRepairSparePartsId);
/**
* -
*
* @param recordBasketRepairSpareParts -
* @return -
*/
public List<RecordBasketRepairSpareParts> selectRecordBasketRepairSparePartsList(RecordBasketRepairSpareParts recordBasketRepairSpareParts);
/**
* -
*
* @param recordBasketRepairSpareParts -
* @return
*/
public int insertRecordBasketRepairSpareParts(RecordBasketRepairSpareParts recordBasketRepairSpareParts);
/**
* -
*
* @param recordBasketRepairSpareParts -
* @return
*/
public int updateRecordBasketRepairSpareParts(RecordBasketRepairSpareParts recordBasketRepairSpareParts);
/**
* -
*
* @param recordRepairSparePartsId -
* @return
*/
public int deleteRecordBasketRepairSparePartsByRecordRepairSparePartsId(Long recordRepairSparePartsId);
/**
* -
*
* @param recordRepairSparePartsIds
* @return
*/
public int deleteRecordBasketRepairSparePartsByRecordRepairSparePartsIds(String[] recordRepairSparePartsIds);
}

@ -0,0 +1,61 @@
package com.ruoyi.manager.mapper;
import java.util.List;
import com.ruoyi.manager.domain.RecordCargoBinding;
/**
* Mapper
*
* @author ruoyi
* @date 2026-02-28
*/
public interface RecordCargoBindingMapper
{
/**
*
*
* @param objid
* @return
*/
public RecordCargoBinding selectRecordCargoBindingByObjid(Long objid);
/**
*
*
* @param recordCargoBinding
* @return
*/
public List<RecordCargoBinding> selectRecordCargoBindingList(RecordCargoBinding recordCargoBinding);
/**
*
*
* @param recordCargoBinding
* @return
*/
public int insertRecordCargoBinding(RecordCargoBinding recordCargoBinding);
/**
*
*
* @param recordCargoBinding
* @return
*/
public int updateRecordCargoBinding(RecordCargoBinding recordCargoBinding);
/**
*
*
* @param objid
* @return
*/
public int deleteRecordCargoBindingByObjid(Long objid);
/**
*
*
* @param objids
* @return
*/
public int deleteRecordCargoBindingByObjids(String[] objids);
}

@ -59,4 +59,10 @@ public interface ILedgerInstantBindingService
* @return
*/
public int deleteLedgerInstantBindingByObjid(Long objid);
List<LedgerInstantBinding> selectList(LedgerInstantBinding ledgerInstantBinding);
List<LedgerInstantBinding> selectLedgerChildTablelist(LedgerInstantBinding ledgerInstantBinding);
int unbindingCargoDeleteLedger(Long basketId);
}

@ -0,0 +1,61 @@
package com.ruoyi.manager.service;
import java.util.List;
import com.ruoyi.manager.domain.RecordBasketRepairSpareParts;
/**
* -Service
*
* @author ruoyi
* @date 2026-02-05
*/
public interface IRecordBasketRepairSparePartsService
{
/**
* -
*
* @param recordRepairSparePartsId -
* @return -
*/
public RecordBasketRepairSpareParts selectRecordBasketRepairSparePartsByRecordRepairSparePartsId(Long recordRepairSparePartsId);
/**
* -
*
* @param recordBasketRepairSpareParts -
* @return -
*/
public List<RecordBasketRepairSpareParts> selectRecordBasketRepairSparePartsList(RecordBasketRepairSpareParts recordBasketRepairSpareParts);
/**
* -
*
* @param recordBasketRepairSpareParts -
* @return
*/
public int insertRecordBasketRepairSpareParts(RecordBasketRepairSpareParts recordBasketRepairSpareParts);
/**
* -
*
* @param recordBasketRepairSpareParts -
* @return
*/
public int updateRecordBasketRepairSpareParts(RecordBasketRepairSpareParts recordBasketRepairSpareParts);
/**
* -
*
* @param recordRepairSparePartsIds -
* @return
*/
public int deleteRecordBasketRepairSparePartsByRecordRepairSparePartsIds(String recordRepairSparePartsIds);
/**
* -
*
* @param recordRepairSparePartsId -
* @return
*/
public int deleteRecordBasketRepairSparePartsByRecordRepairSparePartsId(Long recordRepairSparePartsId);
}

@ -0,0 +1,61 @@
package com.ruoyi.manager.service;
import java.util.List;
import com.ruoyi.manager.domain.RecordCargoBinding;
/**
* Service
*
* @author ruoyi
* @date 2026-02-28
*/
public interface IRecordCargoBindingService
{
/**
*
*
* @param objid
* @return
*/
public RecordCargoBinding selectRecordCargoBindingByObjid(Long objid);
/**
*
*
* @param recordCargoBinding
* @return
*/
public List<RecordCargoBinding> selectRecordCargoBindingList(RecordCargoBinding recordCargoBinding);
/**
*
*
* @param recordCargoBinding
* @return
*/
public int insertRecordCargoBinding(RecordCargoBinding recordCargoBinding);
/**
*
*
* @param recordCargoBinding
* @return
*/
public int updateRecordCargoBinding(RecordCargoBinding recordCargoBinding);
/**
*
*
* @param objids
* @return
*/
public int deleteRecordCargoBindingByObjids(String objids);
/**
*
*
* @param objid
* @return
*/
public int deleteRecordCargoBindingByObjid(Long objid);
}

@ -95,4 +95,19 @@ public class LedgerInstantBindingServiceImpl implements ILedgerInstantBindingSer
{
return ledgerInstantBindingMapper.deleteLedgerInstantBindingByObjid(objid);
}
@Override
public List<LedgerInstantBinding> selectList(LedgerInstantBinding ledgerInstantBinding) {
return ledgerInstantBindingMapper.selectList(ledgerInstantBinding);
}
@Override
public List<LedgerInstantBinding> selectLedgerChildTablelist(LedgerInstantBinding ledgerInstantBinding) {
return ledgerInstantBindingMapper.selectLedgerChildTablelist(ledgerInstantBinding);
}
@Override
public int unbindingCargoDeleteLedger(Long basketId) {
return ledgerInstantBindingMapper.unbindingCargoDeleteLedger(basketId);
}
}

@ -0,0 +1,96 @@
package com.ruoyi.manager.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manager.mapper.RecordBasketRepairSparePartsMapper;
import com.ruoyi.manager.domain.RecordBasketRepairSpareParts;
import com.ruoyi.manager.service.IRecordBasketRepairSparePartsService;
import com.ruoyi.common.core.text.Convert;
/**
* -Service
*
* @author ruoyi
* @date 2026-02-05
*/
@Service
public class RecordBasketRepairSparePartsServiceImpl implements IRecordBasketRepairSparePartsService
{
@Autowired
private RecordBasketRepairSparePartsMapper recordBasketRepairSparePartsMapper;
/**
* -
*
* @param recordRepairSparePartsId -
* @return -
*/
@Override
public RecordBasketRepairSpareParts selectRecordBasketRepairSparePartsByRecordRepairSparePartsId(Long recordRepairSparePartsId)
{
return recordBasketRepairSparePartsMapper.selectRecordBasketRepairSparePartsByRecordRepairSparePartsId(recordRepairSparePartsId);
}
/**
* -
*
* @param recordBasketRepairSpareParts -
* @return -
*/
@Override
public List<RecordBasketRepairSpareParts> selectRecordBasketRepairSparePartsList(RecordBasketRepairSpareParts recordBasketRepairSpareParts)
{
return recordBasketRepairSparePartsMapper.selectRecordBasketRepairSparePartsList(recordBasketRepairSpareParts);
}
/**
* -
*
* @param recordBasketRepairSpareParts -
* @return
*/
@Override
public int insertRecordBasketRepairSpareParts(RecordBasketRepairSpareParts recordBasketRepairSpareParts)
{
recordBasketRepairSpareParts.setCreateTime(DateUtils.getNowDate());
return recordBasketRepairSparePartsMapper.insertRecordBasketRepairSpareParts(recordBasketRepairSpareParts);
}
/**
* -
*
* @param recordBasketRepairSpareParts -
* @return
*/
@Override
public int updateRecordBasketRepairSpareParts(RecordBasketRepairSpareParts recordBasketRepairSpareParts)
{
return recordBasketRepairSparePartsMapper.updateRecordBasketRepairSpareParts(recordBasketRepairSpareParts);
}
/**
* -
*
* @param recordRepairSparePartsIds -
* @return
*/
@Override
public int deleteRecordBasketRepairSparePartsByRecordRepairSparePartsIds(String recordRepairSparePartsIds)
{
return recordBasketRepairSparePartsMapper.deleteRecordBasketRepairSparePartsByRecordRepairSparePartsIds(Convert.toStrArray(recordRepairSparePartsIds));
}
/**
* -
*
* @param recordRepairSparePartsId -
* @return
*/
@Override
public int deleteRecordBasketRepairSparePartsByRecordRepairSparePartsId(Long recordRepairSparePartsId)
{
return recordBasketRepairSparePartsMapper.deleteRecordBasketRepairSparePartsByRecordRepairSparePartsId(recordRepairSparePartsId);
}
}

@ -0,0 +1,94 @@
package com.ruoyi.manager.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manager.mapper.RecordCargoBindingMapper;
import com.ruoyi.manager.domain.RecordCargoBinding;
import com.ruoyi.manager.service.IRecordCargoBindingService;
import com.ruoyi.common.core.text.Convert;
/**
* Service
*
* @author ruoyi
* @date 2026-02-28
*/
@Service
public class RecordCargoBindingServiceImpl implements IRecordCargoBindingService
{
@Autowired
private RecordCargoBindingMapper recordCargoBindingMapper;
/**
*
*
* @param objid
* @return
*/
@Override
public RecordCargoBinding selectRecordCargoBindingByObjid(Long objid)
{
return recordCargoBindingMapper.selectRecordCargoBindingByObjid(objid);
}
/**
*
*
* @param recordCargoBinding
* @return
*/
@Override
public List<RecordCargoBinding> selectRecordCargoBindingList(RecordCargoBinding recordCargoBinding)
{
return recordCargoBindingMapper.selectRecordCargoBindingList(recordCargoBinding);
}
/**
*
*
* @param recordCargoBinding
* @return
*/
@Override
public int insertRecordCargoBinding(RecordCargoBinding recordCargoBinding)
{
return recordCargoBindingMapper.insertRecordCargoBinding(recordCargoBinding);
}
/**
*
*
* @param recordCargoBinding
* @return
*/
@Override
public int updateRecordCargoBinding(RecordCargoBinding recordCargoBinding)
{
return recordCargoBindingMapper.updateRecordCargoBinding(recordCargoBinding);
}
/**
*
*
* @param objids
* @return
*/
@Override
public int deleteRecordCargoBindingByObjids(String objids)
{
return recordCargoBindingMapper.deleteRecordCargoBindingByObjids(Convert.toStrArray(objids));
}
/**
*
*
* @param objid
* @return
*/
@Override
public int deleteRecordCargoBindingByObjid(Long objid)
{
return recordCargoBindingMapper.deleteRecordCargoBindingByObjid(objid);
}
}

@ -12,12 +12,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="locationCode" column="location_code" />
<result property="basketCode" column="basket_code" />
<result property="createBy" column="create_by" />
<result property="basketId" column="basket_id" />
<association property="baseBasketInfo" resultMap="com.ruoyi.manager.mapper.BaseBasketInfoMapper.BaseBasketInfoResult"/>
</resultMap>
<sql id="selectLedgerInstantBindingVo">
select objid, cargo_frame_epc, waybill_number, crate_time from ledger_instant_binding
select objid, cargo_frame_epc, waybill_number, crate_time,basket_id from ledger_instant_binding
</sql>
<select id="selectList" resultMap="LedgerInstantBindingResult">
select basket_id,
basket_code,
basket_spe,
basket_type,
steel_grade,
self_code
from ledger_instant_binding lib
left join base_basket_info bbi on lib.basket_id = bbi.obj_id
group by basket_id
</select>
<select id="selectLedgerChildTablelist" parameterType="com.ruoyi.manager.domain.LedgerInstantBinding" resultMap="LedgerInstantBindingResult">
<include refid="selectLedgerInstantBindingVo"/>
where basket_id=#{basketId}
</select>
<select id="selectLedgerInstantBindingList" parameterType="com.ruoyi.manager.domain.LedgerInstantBinding" resultMap="LedgerInstantBindingResult">
select t2.objid, t2.cargo_frame_epc, t1.basket_code, t3.location_code, t2.waybill_number, t2.crate_time,t2.create_by
from base_basket_info t1
@ -70,4 +88,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<delete id="unbindingCargoDeleteLedger" parameterType="Long">
delete from ledger_instant_binding where basket_id = #{basketId}
</delete>
</mapper>

@ -56,12 +56,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="repairInfo != null">repair_info,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="baseBasketId != null">base_basket_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="basketEpc != null">#{basketEpc},</if>
<if test="repairInfo != null">#{repairInfo},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="baseBasketId != null">#{baseBasketId},</if>
</trim>
</insert>

@ -0,0 +1,80 @@
<?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.RecordBasketRepairSparePartsMapper">
<resultMap type="RecordBasketRepairSpareParts" id="RecordBasketRepairSparePartsResult">
<result property="recordRepairSparePartsId" column="record_repair_spare_parts_id" />
<result property="repairId" column="repair_id" />
<result property="partName" column="part_name" />
<result property="partSpecifications" column="part_specifications" />
<result property="amount" column="amount" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectRecordBasketRepairSparePartsVo">
select record_repair_spare_parts_id, repair_id, part_name, part_specifications, amount, create_by, create_time from record_basket_repair_spare_parts
</sql>
<select id="selectRecordBasketRepairSparePartsList" parameterType="RecordBasketRepairSpareParts" resultMap="RecordBasketRepairSparePartsResult">
<include refid="selectRecordBasketRepairSparePartsVo"/>
<where>
<if test="repairId != null "> and repair_id = #{repairId}</if>
<if test="partName != null and partName != ''"> and part_name like concat('%', #{partName}, '%')</if>
<if test="partSpecifications != null and partSpecifications != ''"> and part_specifications = #{partSpecifications}</if>
<if test="amount != null and amount != ''"> and amount = #{amount}</if>
</where>
</select>
<select id="selectRecordBasketRepairSparePartsByRecordRepairSparePartsId" parameterType="Long" resultMap="RecordBasketRepairSparePartsResult">
<include refid="selectRecordBasketRepairSparePartsVo"/>
where record_repair_spare_parts_id = #{recordRepairSparePartsId}
</select>
<insert id="insertRecordBasketRepairSpareParts" parameterType="RecordBasketRepairSpareParts" useGeneratedKeys="true" keyProperty="recordRepairSparePartsId">
insert into record_basket_repair_spare_parts
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="repairId != null">repair_id,</if>
<if test="partName != null">part_name,</if>
<if test="partSpecifications != null">part_specifications,</if>
<if test="amount != null">amount,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="repairId != null">#{repairId},</if>
<if test="partName != null">#{partName},</if>
<if test="partSpecifications != null">#{partSpecifications},</if>
<if test="amount != null">#{amount},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateRecordBasketRepairSpareParts" parameterType="RecordBasketRepairSpareParts">
update record_basket_repair_spare_parts
<trim prefix="SET" suffixOverrides=",">
<if test="repairId != null">repair_id = #{repairId},</if>
<if test="partName != null">part_name = #{partName},</if>
<if test="partSpecifications != null">part_specifications = #{partSpecifications},</if>
<if test="amount != null">amount = #{amount},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where record_repair_spare_parts_id = #{recordRepairSparePartsId}
</update>
<delete id="deleteRecordBasketRepairSparePartsByRecordRepairSparePartsId" parameterType="Long">
delete from record_basket_repair_spare_parts where record_repair_spare_parts_id = #{recordRepairSparePartsId}
</delete>
<delete id="deleteRecordBasketRepairSparePartsByRecordRepairSparePartsIds" parameterType="String">
delete from record_basket_repair_spare_parts where record_repair_spare_parts_id in
<foreach item="recordRepairSparePartsId" collection="array" open="(" separator="," close=")">
#{recordRepairSparePartsId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,81 @@
<?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.RecordCargoBindingMapper">
<resultMap type="RecordCargoBinding" id="RecordCargoBindingResult">
<result property="objid" column="objid" />
<result property="cargoFrameEpc" column="cargo_frame_epc" />
<result property="waybillNumber" column="waybill_number" />
<result property="crateTime" column="crate_time" />
<result property="createBy" column="create_by" />
<result property="basketId" column="basket_id" />
<result property="locationInfo" column="location_info" />
</resultMap>
<sql id="selectRecordCargoBindingVo">
select objid, cargo_frame_epc, waybill_number, crate_time, create_by, basket_id, location_info from record_cargo_binding
</sql>
<select id="selectRecordCargoBindingList" parameterType="RecordCargoBinding" resultMap="RecordCargoBindingResult">
<include refid="selectRecordCargoBindingVo"/>
<where>
<if test="cargoFrameEpc != null and cargoFrameEpc != ''"> and cargo_frame_epc = #{cargoFrameEpc}</if>
<if test="waybillNumber != null and waybillNumber != ''"> and waybill_number = #{waybillNumber}</if>
<if test="params.beginCrateTime != null and params.beginCrateTime != '' and params.endCrateTime != null and params.endCrateTime != ''"> and crate_time between #{params.beginCrateTime} and #{params.endCrateTime}</if>
<if test="basketId != null "> and basket_id = #{basketId}</if>
<if test="locationInfo != null and locationInfo != ''"> and location_info = #{locationInfo}</if>
</where>
</select>
<select id="selectRecordCargoBindingByObjid" parameterType="Long" resultMap="RecordCargoBindingResult">
<include refid="selectRecordCargoBindingVo"/>
where objid = #{objid}
</select>
<insert id="insertRecordCargoBinding" parameterType="RecordCargoBinding" useGeneratedKeys="true" keyProperty="objid">
insert into record_cargo_binding
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cargoFrameEpc != null">cargo_frame_epc,</if>
<if test="waybillNumber != null">waybill_number,</if>
<if test="crateTime != null">crate_time,</if>
<if test="createBy != null">create_by,</if>
<if test="basketId != null">basket_id,</if>
<if test="locationInfo != null">location_info,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cargoFrameEpc != null">#{cargoFrameEpc},</if>
<if test="waybillNumber != null">#{waybillNumber},</if>
<if test="crateTime != null">#{crateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="basketId != null">#{basketId},</if>
<if test="locationInfo != null">#{locationInfo},</if>
</trim>
</insert>
<update id="updateRecordCargoBinding" parameterType="RecordCargoBinding">
update record_cargo_binding
<trim prefix="SET" suffixOverrides=",">
<if test="cargoFrameEpc != null">cargo_frame_epc = #{cargoFrameEpc},</if>
<if test="waybillNumber != null">waybill_number = #{waybillNumber},</if>
<if test="crateTime != null">crate_time = #{crateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="basketId != null">basket_id = #{basketId},</if>
<if test="locationInfo != null">location_info = #{locationInfo},</if>
</trim>
where objid = #{objid}
</update>
<delete id="deleteRecordCargoBindingByObjid" parameterType="Long">
delete from record_cargo_binding where objid = #{objid}
</delete>
<delete id="deleteRecordCargoBindingByObjids" parameterType="String">
delete from record_cargo_binding where objid in
<foreach item="objid" collection="array" open="(" separator="," close=")">
#{objid}
</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('维修记录-添加备件', '2044', '1', '/manager/parts', 'C', '0', 'manager:parts:view', '#', 'admin', sysdate(), '', null, '维修记录-添加备件菜单');
-- 按钮父菜单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('维修记录-添加备件查询', @parentId, '1', '#', 'F', '0', 'manager:parts: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('维修记录-添加备件新增', @parentId, '2', '#', 'F', '0', 'manager:parts: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('维修记录-添加备件修改', @parentId, '3', '#', 'F', '0', 'manager:parts: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('维修记录-添加备件删除', @parentId, '4', '#', 'F', '0', 'manager:parts: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('维修记录-添加备件导出', @parentId, '5', '#', 'F', '0', 'manager:parts:export', '#', 'admin', sysdate(), '', null, '');

@ -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('货物绑定记录', '2051', '1', '/manager/recordCargoBinding', 'C', '0', 'manager:recordCargoBinding:view', '#', 'admin', sysdate(), '', null, '货物绑定记录菜单');
-- 按钮父菜单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('货物绑定记录查询', @parentId, '1', '#', 'F', '0', 'manager:recordCargoBinding: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('货物绑定记录新增', @parentId, '2', '#', 'F', '0', 'manager:recordCargoBinding: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('货物绑定记录修改', @parentId, '3', '#', 'F', '0', 'manager:recordCargoBinding: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('货物绑定记录删除', @parentId, '4', '#', 'F', '0', 'manager:recordCargoBinding: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('货物绑定记录导出', @parentId, '5', '#', 'F', '0', 'manager:recordCargoBinding:export', '#', 'admin', sysdate(), '', null, '');

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('实时绑定台账列表')"/>
</head>
@ -12,19 +12,20 @@
<ul>
<li>
资产RFID
<input type="text" name="cargoFrameEpc"/>
<input name="cargoFrameEpc" type="text"/>
</li>
<li>
<label>运单号:</label>
<input type="text" name="waybillNumber"/>
<input name="waybillNumber" type="text"/>
</li>
<li class="select-time">
<label>绑定时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间"
name="params[beginCrateTime]"/>
<input class="time-input" id="startTime" name="params[beginCrateTime]"
placeholder="开始时间"
type="text"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间"
name="params[endCrateTime]"/>
<input class="time-input" id="endTime" name="params[endCrateTime]" placeholder="结束时间"
type="text"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
@ -37,7 +38,7 @@
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<!-- <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="base:LedgerInstant:add">
<i class="fa fa-plus"></i> 添加
</a>
@ -52,7 +53,7 @@
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="base:LedgerInstant:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
</div> -->
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
@ -63,7 +64,7 @@
var editFlag = [[${@permission.hasPermi('base:LedgerInstant:edit')}]];
var removeFlag = [[${@permission.hasPermi('base:LedgerInstant:remove')}]];
var prefix = ctx + "base/LedgerInstant";
var basketTypeDatas = [[${@dict.getType('basket_type')}]];
$(function () {
var options = {
url: prefix + "/list",
@ -72,47 +73,77 @@
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "实时绑定台账",
detailView: true,
onExpandRow: function (index, row, $detail) {
ledgerInitChildTable(index, row, $detail);
},
columns: [{
checkbox: true
},
{
field: 'objid',
title: '自增主键',
field: 'basketId',
title: '资产ID',
visible: false
},
{
field: 'cargoFrameEpc',
title: '资产RFID'
},
{
field: 'waybillNumber',
title: '运单号'
},
{
field: 'locationCode',
title: '库位码'
},
{
field: 'createBy',
title: '绑定人'
}, {
field: 'crateTime',
title: '绑定时间'
},
{
title: '操作',
align: 'center',
field: 'baseBasketInfo.basketCode',
title: '资产编号'
},
{
field: 'baseBasketInfo.basketType',
title: '资产类型',
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('');
return $.table.selectDictLabel(basketTypeDatas, value);
}
}]
},
{
field: 'baseBasketInfo.steelGrade',
title: '钢号'
},
{
field: 'baseBasketInfo.selfCode',
title: '自编号'
},
]
};
$.table.init(options);
});
})
ledgerInitChildTable = function (index, row, $detail) {
var childTable = $detail.html('<table style="table-layout:fixed"></table>').find('table');
$(childTable).bootstrapTable({
url: prefix + "/childTablelist",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams: {
basketId: row.basketId
},
columns: [
{
title: '序号',
align: 'center',
formatter: function (value, row, index) {
return index + 1;
}
},
{
title: '扫描RFID',
field: 'cargoFrameEpc',
},
{
title: '货物条码',
field: 'waybillNumber'
},
{
title: '绑定时间',
field: 'crateTime'
}
]
});
};
</script>
</body>
</html>

@ -85,7 +85,7 @@
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">资产RFID</label>
<label class="col-sm-4 control-label">RFID标签1</label>
<div class="col-sm-8">
<input class="form-control" name="basketEpc" type="text">
</div>
@ -93,7 +93,7 @@
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">资产RFID(副)</label>
<label class="col-sm-4 control-label">RFID标签2</label>
<div class="col-sm-8">
<input class="form-control" name="basketEpc2" type="text">
</div>

@ -80,7 +80,7 @@
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">资产RFID</label>
<label class="col-sm-4 control-label">RFID标签1</label>
<div class="col-sm-8">
<input name="basketEpc" th:field="*{basketEpc}" class="form-control" type="text">
</div>
@ -88,7 +88,7 @@
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">资产RFID(副)</label>
<label class="col-sm-4 control-label">RFID标签2</label>
<div class="col-sm-8">
<input name="basketEpc2" th:field="*{basketEpc2}" class="form-control" type="text">
</div>

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增维修记录-添加备件')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-parts-add">
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">维修记录表id</label>
<div class="col-sm-8">
<input name="repairId" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="partName" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">规格型号:</label>
<div class="col-sm-8">
<input name="partSpecifications" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">使用数量:</label>
<div class="col-sm-8">
<input name="amount" class="form-control" type="text">
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "manager/parts"
$("#form-parts-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-parts-add').serialize());
}
}
</script>
</body>
</html>

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改维修记录-添加备件')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-parts-edit" th:object="${recordBasketRepairSpareParts}">
<input name="recordRepairSparePartsId" th:field="*{recordRepairSparePartsId}" type="hidden">
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">维修记录表id</label>
<div class="col-sm-8">
<input name="repairId" th:field="*{repairId}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="partName" th:field="*{partName}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">规格型号:</label>
<div class="col-sm-8">
<input name="partSpecifications" th:field="*{partSpecifications}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">使用数量:</label>
<div class="col-sm-8">
<input name="amount" th:field="*{amount}" class="form-control" type="text">
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "manager/parts";
$("#form-parts-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-parts-edit').serialize());
}
}
</script>
</body>
</html>

@ -0,0 +1,110 @@
<!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>维修记录表id</label>
<input type="text" name="repairId"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="partName"/>
</li>
<li>
<label>规格型号:</label>
<input type="text" name="partSpecifications"/>
</li>
<li>
<label>使用数量:</label>
<input type="text" name="amount"/>
</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="manager:parts:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manager:parts:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="manager:parts:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="manager:parts: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:parts:edit')}]];
var removeFlag = [[${@permission.hasPermi('manager:parts:remove')}]];
var prefix = ctx + "manager/parts";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "维修记录-添加备件",
columns: [{
checkbox: true
},
{
field: 'recordRepairSparePartsId',
title: '标识ID',
visible: false
},
{
field: 'repairId',
title: '维修记录表id'
},
{
field: 'partName',
title: '物料名称'
},
{
field: 'partSpecifications',
title: '规格型号'
},
{
field: 'amount',
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.recordRepairSparePartsId + '\')"><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.recordRepairSparePartsId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增货物绑定记录')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-recordCargoBinding-add">
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">扫描RFID</label>
<div class="col-sm-8">
<input name="cargoFrameEpc" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">货物条码:</label>
<div class="col-sm-8">
<input name="waybillNumber" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">绑定时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="crateTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">资产ID</label>
<div class="col-sm-8">
<input name="basketId" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">位置信息:</label>
<div class="col-sm-8">
<input name="locationInfo" class="form-control" type="text">
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "manager/recordCargoBinding"
$("#form-recordCargoBinding-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-recordCargoBinding-add').serialize());
}
}
$("input[name='crateTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -0,0 +1,77 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改货物绑定记录')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-recordCargoBinding-edit" th:object="${recordCargoBinding}">
<input name="objid" th:field="*{objid}" type="hidden">
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">扫描RFID</label>
<div class="col-sm-8">
<input name="cargoFrameEpc" th:field="*{cargoFrameEpc}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">货物条码:</label>
<div class="col-sm-8">
<input name="waybillNumber" th:field="*{waybillNumber}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">绑定时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="crateTime" th:value="${#dates.format(recordCargoBinding.crateTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">资产ID</label>
<div class="col-sm-8">
<input name="basketId" th:field="*{basketId}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">位置信息:</label>
<div class="col-sm-8">
<input name="locationInfo" th:field="*{locationInfo}" class="form-control" type="text">
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "manager/recordCargoBinding";
$("#form-recordCargoBinding-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-recordCargoBinding-edit').serialize());
}
}
$("input[name='crateTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -0,0 +1,124 @@
<!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>扫描RFID</label>
<input type="text" name="cargoFrameEpc"/>
</li>
<li>
<label>货物条码:</label>
<input type="text" name="waybillNumber"/>
</li>
<li class="select-time">
<label>绑定时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCrateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCrateTime]"/>
</li>
<li>
<label>资产ID</label>
<input type="text" name="basketId"/>
</li>
<li>
<label>位置信息:</label>
<input type="text" name="locationInfo"/>
</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="manager:recordCargoBinding:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manager:recordCargoBinding:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="manager:recordCargoBinding:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="manager:recordCargoBinding: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:recordCargoBinding:edit')}]];
var removeFlag = [[${@permission.hasPermi('manager:recordCargoBinding:remove')}]];
var prefix = ctx + "manager/recordCargoBinding";
$(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: '自增主键',
visible: false
},
{
field: 'cargoFrameEpc',
title: '扫描RFID'
},
{
field: 'waybillNumber',
title: '货物条码'
},
{
field: 'crateTime',
title: '绑定时间'
},
{
field: 'createBy',
title: '绑定人'
},
{
field: 'basketId',
title: '资产ID'
},
{
field: 'locationInfo',
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.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>
</body>
</html>

@ -18,7 +18,7 @@
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">货筐RFID</label>
<label class="col-sm-3 control-label">RFID标签1</label>
<div class="col-sm-8">
<input name="basketEpc" th:field="*{basketEpc}" class="form-control" type="text">
</div>
@ -26,7 +26,7 @@
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">货筐RFID(副)</label>
<label class="col-sm-3 control-label">RFID标签2</label>
<div class="col-sm-8">
<input name="basketEpc2" th:field="*{basketEpc2}" class="form-control" type="text">
</div>

@ -71,9 +71,10 @@
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "货筐RFID绑定记录",
columns: [{
checkbox: true
},
columns: [
{
checkbox: true
},
{
field: 'rfidBindingId',
title: '标识ID',
@ -105,11 +106,11 @@
},
{
field: 'basketEpc',
title: '货筐RFID'
title: 'RFID标签1'
},
{
field: 'basketEpc2',
title: '货筐RFID(副)'
title: 'RFID标签2'
},
{
field: 'filePath',
@ -143,16 +144,12 @@
//加载图片
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 '-'

@ -52,7 +52,7 @@
var editFlag = [[${@permission.hasPermi('system:repair:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:repair:remove')}]];
var prefix = ctx + "system/repair";
var basketTypeDatas = [[${ @dict.getType('basket_type') }]];
var basketTypeDatas = [[${@dict.getType('basket_type')}]];
$(function () {
var options = {
url: prefix + "/list",
@ -61,6 +61,10 @@
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "维修记录",
detailView: true,
onExpandRow: function (index, row, $detail) {
repairInitChildTable(index, row, $detail);
},
columns: [{
checkbox: true
},
@ -126,7 +130,39 @@
};
$.table.init(options);
});
repairInitChildTable = function (index, row, $detail) {
var childTable = $detail.html('<table style="table-layout:fixed"></table>').find('table');
$(childTable).bootstrapTable({
url: ctx + "manager/parts/childTablelist",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams: {
repairId: row.objId
},
columns: [
{
title: '序号',
align: 'center',
formatter: function (value, row, index) {
return index + 1;
}
},
{
field: 'partName',
title: '物料名称'
},
{
field: 'partSpecifications',
title: '规格型号'
},
{
field: 'amount',
title: '使用数量'
}
]
});
};
</script>
</body>
</html>

@ -1,14 +1,13 @@
package com.ruoyi.webapi.controller;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.manager.domain.*;
import com.ruoyi.manager.service.IBaseBasketInfoService;
import com.ruoyi.manager.service.IBaseManufacturerService;
import com.ruoyi.manager.service.IRecordBasketRepairService;
import com.ruoyi.manager.service.IRecordtRfidBindingService;
import com.ruoyi.manager.service.*;
import com.ruoyi.webapi.doman.APKVersion;
import com.ruoyi.webapi.doman.BindingSubmitBeen;
import com.ruoyi.webapi.doman.JoinSubmitBeen;
import com.ruoyi.webapi.service.ApiService;
@ -36,20 +35,9 @@ public class ApiController {
private IRecordBasketRepairService recordBasketRepairService;
@Autowired
private IRecordtRfidBindingService recordtRfidBindingService;
@Autowired
private ILedgerInstantBindingService ledgerInstantBindingService;//货物实时绑定信息
@PostMapping("/bindingSubmit")
public AjaxResult bindingSubmit(@RequestBody BindingSubmitBeen submitBeen) {
List<String> watBills = submitBeen.getWatBills();
String user = submitBeen.getUser();
watBills.forEach(code -> {
String epc = service.selectEpcByWaybill(code);
if (epc == null) {
int i = service.insertLedgerBinding(submitBeen.getEpc(), code, user);
}
});
return AjaxResult.success();
}
@PostMapping("/findBindingList")
public AjaxResult findBindingList(String epc) {
@ -60,17 +48,18 @@ public class ApiController {
}
@PostMapping("/deleteBindingList")
public AjaxResult deleteBindingList(String epc) {
int i = service.deleteBindingList(epc);
public AjaxResult deleteBindingList(String objids) {
int i = ledgerInstantBindingService.deleteLedgerInstantBindingByObjids( objids);
if (i > 0) return AjaxResult.success("全部解绑成功");
return AjaxResult.error();
}
@PostMapping("/deleteBindingItem")
public AjaxResult deleteBindingItem(String epc, String code) {
int i = service.deleteBindingItem(epc, code);
if (i == 1) return AjaxResult.success("运单:" + code + "解绑成功");
public AjaxResult deleteBindingItem(Long ledgerId) {
// int i = service.deleteBindingItem(epc, code);
int i = ledgerInstantBindingService.deleteLedgerInstantBindingByObjid(ledgerId);
if (i == 1) return AjaxResult.success("解绑成功");
return AjaxResult.error();
}
@ -135,16 +124,16 @@ public class ApiController {
*/
@PostMapping("/saveBasketInfo")
public AjaxResult saveBasketInfo(@RequestBody BaseBasketInfo baseBasketInfo) {
int tagCount=baseBasketInfoService.selectCountBasketByEpc(baseBasketInfo.getBasketEpc());
if (tagCount>0){
int tagCount = baseBasketInfoService.selectCountBasketByEpc(baseBasketInfo.getBasketEpc());
if (tagCount > 0) {
return AjaxResult.error("RFID标签1已绑定");
}
tagCount=baseBasketInfoService.selectCountBasketByEpc(baseBasketInfo.getBasketEpc2());
if (tagCount>0){
tagCount = baseBasketInfoService.selectCountBasketByEpc(baseBasketInfo.getBasketEpc2());
if (tagCount > 0) {
return AjaxResult.error("RFID标签2已绑定");
}
List<BaseBasketInfo> list = baseBasketInfoService.checkBasketInfoBySteelGradeAndSelfCode(baseBasketInfo);
if (list!=null && !list.isEmpty()){
List<BaseBasketInfo> list = baseBasketInfoService.checkBasketInfoBySteelGradeAndSelfCode(baseBasketInfo);
if (list != null && !list.isEmpty()) {
return AjaxResult.error("钢号或自编号已存在");
}
@ -196,18 +185,16 @@ public class ApiController {
*
*/
@PostMapping("/submitBindingRecord")
public AjaxResult submitBindingRecord(Long baseBasketId, String basketEpc, String basketEpc2, String createdBy, List<MultipartFile> files) {
int tagCount=baseBasketInfoService.selectCountBasketByEpc(basketEpc);
if (tagCount>0){
public AjaxResult submitBindingRecord(Long baseBasketId, String basketEpc, String basketEpc2, String localWeight, String createdBy, List<MultipartFile> files) {
int tagCount = baseBasketInfoService.selectCountBasketByEpc(basketEpc);
if (tagCount > 0) {
return AjaxResult.error("RFID标签1已绑定");
}
tagCount=baseBasketInfoService.selectCountBasketByEpc(basketEpc2);
if (tagCount>0){
tagCount = baseBasketInfoService.selectCountBasketByEpc(basketEpc2);
if (tagCount > 0) {
return AjaxResult.error("RFID标签2已绑定");
}
// 验证钢号与自编号重复
String filePath = RuoYiConfig.getUploadPath();
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < files.size(); i++) {
@ -240,30 +227,81 @@ public class ApiController {
baseBasketInfo.setUpdatedTime(new Date());
baseBasketInfo.setUpdatedBy(createdBy);
baseBasketInfo.setObjId(baseBasketId);
baseBasketInfo.setLocalWeight(Double.parseDouble(localWeight));
int i1 = baseBasketInfoService.updateBaseBasketInfo(baseBasketInfo);
if (i > 0 ) return AjaxResult.success();
if (i > 0) return AjaxResult.success();
return AjaxResult.error();
}
/* @GetMapping("/getVersion")
public String getVersion(){
APKVersion apkVersion=service.getVersion();
/**
* -使
*
* @param epc
* @return
*/
@PostMapping("/binding/findBasketByEpc")
public AjaxResult findBasketByEpc(String epc) {
BaseBasketInfo baseBasketInfo = baseBasketInfoService.selectBaseBasketInfoByEpc(epc);
if (baseBasketInfo == null) return AjaxResult.error("RFID查询失败没有维护该资产");
LedgerInstantBinding ledgerInstantBinding = new LedgerInstantBinding();
ledgerInstantBinding.setBasketId(baseBasketInfo.getObjId());
List<LedgerInstantBinding> ledgerInstantBindings = ledgerInstantBindingService.selectLedgerChildTablelist(ledgerInstantBinding);
baseBasketInfo.setLedgerInstantBindings(ledgerInstantBindings);
return AjaxResult.success(baseBasketInfo);
}
// 解绑货物和货框
@PostMapping("/unbindingCargo")
public AjaxResult unbindingCargo(Long basketId) {
int i = ledgerInstantBindingService.unbindingCargoDeleteLedger(basketId);
if (i > 0) return AjaxResult.success();
return AjaxResult.error();
}
@Autowired
private IRecordCargoBindingService recordCargoBindingService;
// 货物绑定货框
@PostMapping("/bindingSubmit")
public AjaxResult bindingSubmit(@RequestBody BindingSubmitBeen submitBeen) {
List<String> watBills = submitBeen.getWatBills();
String user = submitBeen.getUser();
String epc1 = submitBeen.getEpc();
Long basketId = submitBeen.getBasketId();
watBills.forEach(code -> {
String epc = service.selectEpcByWaybill(code, basketId);
if (epc == null) {
int i = service.insertLedgerBinding(epc1, code, user, basketId);
RecordCargoBinding recordCargoBinding=new RecordCargoBinding();
recordCargoBinding.setBasketId(basketId);
recordCargoBinding.setCargoFrameEpc(epc1);
recordCargoBinding.setWaybillNumber(code);
recordCargoBinding.setCreateBy(user);
recordCargoBindingService.insertRecordCargoBinding(recordCargoBinding);
}
});
return AjaxResult.success();
}
@GetMapping("/getVersion")
public String getVersion() {
APKVersion apkVersion = service.getVersion();
apkVersion.setCode(0);
apkVersion.setMsg("");
if (apkVersion==null){
apkVersion=new APKVersion();
if (apkVersion == null) {
apkVersion = new APKVersion();
apkVersion.setUpdateStatus(0);
}else {
} else {
apkVersion.setUpdateStatus(1);
}
String s = JSONObject.toJSONString(apkVersion);
System.out.println("请求版本信息"+s);
System.out.println("请求版本信息" + s);
return s;
}*/
}
}

@ -0,0 +1,158 @@
package com.ruoyi.webapi.controller;
import com.ruoyi.common.utils.IpUtils;
import com.ruoyi.webapi.doman.PdaApkVersion;
import com.ruoyi.webapi.service.IPdaApkVersionService;
import com.ruoyi.webapi.utils.Md5Utils;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.IOException;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2023-04-06
*/
@Controller
@RequestMapping("/pda/pda_version")
public class PdaApkVersionController extends BaseController {
private final String prefix = "pda/pda_version";
@Autowired
private IPdaApkVersionService pdaApkVersionService;
@RequiresPermissions("pda:pda_version:view")
@GetMapping()
public String pda_version() {
return prefix + "/pda_version";
}
/**
*
*/
@RequiresPermissions("pda:pda_version:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(PdaApkVersion pdaApkVersion) {
startPage();
List<PdaApkVersion> list = pdaApkVersionService.selectPdaApkVersionList(pdaApkVersion);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("pda:pda_version:export")
@Log(title = "手持版本升级", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(PdaApkVersion pdaApkVersion) {
List<PdaApkVersion> list = pdaApkVersionService.selectPdaApkVersionList(pdaApkVersion);
ExcelUtil<PdaApkVersion> util = new ExcelUtil<>(PdaApkVersion.class);
return util.exportExcel(list, "手持版本升级数据");
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("pda:pda_version:add")
@Log(title = "手持版本升级", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(MultipartFile file, PdaApkVersion pdaApkVersion) {
// 上传文件路径
String filePath = RuoYiConfig.getUploadPath() + "/apk";
// 上传并返回新文件名称
try {
String fileName = FileUploadUtils.upload(filePath, file);
String pathname = filePath + fileName;
System.out.println("地址1" + pathname);
pathname = pathname.replace("/profile/upload/apk", "");
System.out.println("地址2" + pathname);
File file1 = new File(pathname);
System.out.println("文件获取:" + file1.exists());
System.out.println(file1.length() / 1024);
pdaApkVersion.setApkSize(file1.length() / 1024);
pdaApkVersion.setApkMd5(Md5Utils.getFileMD5(file1));
pdaApkVersion.setDownloadUrl( "http://"+IpUtils.getHostIp()+":8091"+fileName);
} catch (IOException e) {
e.printStackTrace();
}
return toAjax(pdaApkVersionService.insertPdaApkVersion(pdaApkVersion));
}
/**
*
*/
@RequiresPermissions("pda:pda_version:edit")
@GetMapping("/edit/{objid}")
@ResponseBody
public AjaxResult edit(@PathVariable("objid") Long objid) {
PdaApkVersion pdaApkVersion = pdaApkVersionService.selectPdaApkVersionByObjid(objid);
String downloadUrl = pdaApkVersion.getDownloadUrl();
String substring = downloadUrl.substring(downloadUrl.indexOf("/apk"));
try {
FileUtils.deleteFile(RuoYiConfig.getUploadPath() + substring);
}catch (Exception e){
}
return toAjax(pdaApkVersionService.deletePdaApkVersionByObjid(objid));
}
/**
*
*/
@RequiresPermissions("pda:pda_version:edit")
@Log(title = "手持版本升级", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(PdaApkVersion pdaApkVersion) {
return toAjax(pdaApkVersionService.updatePdaApkVersion(pdaApkVersion));
}
/**
*
*/
@RequiresPermissions("pda:pda_version:remove")
@Log(title = "手持版本升级", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
System.out.println(ids);
PdaApkVersion pdaApkVersion = pdaApkVersionService.selectPdaApkVersionByObjid(Long.valueOf(ids));
String downloadUrl = pdaApkVersion.getDownloadUrl();
if (downloadUrl!=null&&!downloadUrl.isEmpty()){
String substring = downloadUrl.substring(downloadUrl.indexOf("/apk"));
FileUtils.deleteFile(RuoYiConfig.getUploadPath() + substring);
}
return toAjax(pdaApkVersionService.deletePdaApkVersionByObjids(ids));
}
}

@ -0,0 +1,117 @@
package com.ruoyi.webapi.doman;
import com.alibaba.fastjson.annotation.JSONField;
/**
* pda_apk_version
*
* @author ruoyi
* @date 2023-04-06
*/
public class APKVersion {
@JSONField(name = "Code")
private int Code;
@JSONField(name = "Msg")
private String Msg;
@JSONField(name = "UpdateStatus")
private int UpdateStatus;
@JSONField(name = "VersionCode")
private Long VersionCode;
@JSONField(name = "VersionName")
private String VersionName;
@JSONField(name = "ModifyContent")
private String ModifyContent;
@JSONField(name = "DownloadUrl")
private String DownloadUrl;
@JSONField(name = "ApkSize")
private int ApkSize;
@JSONField(name = "ApkMd5")
private String ApkMd5;
public int getCode() {
return Code;
}
public void setCode(int code) {
Code = code;
}
public String getMsg() {
return Msg;
}
public void setMsg(String msg) {
Msg = msg;
}
public int getUpdateStatus() {
return UpdateStatus;
}
public void setUpdateStatus(int updateStatus) {
UpdateStatus = updateStatus;
}
public Long getVersionCode() {
return VersionCode;
}
public void setVersionCode(Long versionCode) {
VersionCode = versionCode;
}
public String getVersionName() {
return VersionName;
}
public void setVersionName(String versionName) {
VersionName = versionName;
}
public String getModifyContent() {
return ModifyContent;
}
public void setModifyContent(String modifyContent) {
ModifyContent = modifyContent;
}
public String getDownloadUrl() {
return DownloadUrl;
}
public void setDownloadUrl(String downloadUrl) {
DownloadUrl = downloadUrl;
}
public int getApkSize() {
return ApkSize;
}
public void setApkSize(int apkSize) {
ApkSize = apkSize;
}
public String getApkMd5() {
return ApkMd5;
}
public void setApkMd5(String apkMd5) {
ApkMd5 = apkMd5;
}
@Override
public String toString() {
return "APKVersion{" +
"Code=" + Code +
", Msg='" + Msg + '\'' +
", UpdateStatus=" + UpdateStatus +
", VersionCode=" + VersionCode +
", VersionName='" + VersionName + '\'' +
", ModifyContent='" + ModifyContent + '\'' +
", DownloadUrl='" + DownloadUrl + '\'' +
", ApkSize=" + ApkSize +
", ApkMd5='" + ApkMd5 + '\'' +
'}';
}
}

@ -14,6 +14,15 @@ public class BindingSubmitBeen {
private String weight;
private List<String> watBills;
private String user;
private Long basketId;
public Long getBasketId() {
return basketId;
}
public void setBasketId(Long basketId) {
this.basketId = basketId;
}
public String getUser() {
return user;

@ -0,0 +1,122 @@
package com.ruoyi.webapi.doman;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* pda_apk_version
*
* @author ruoyi
* @date 2023-04-06
*/
public class PdaApkVersion extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键标识 */
private Long objid;
/** 版本号 */
@Excel(name = "版本号")
private Long versionCode;
/** 版本名 */
@Excel(name = "版本名")
private String versionName;
/** 信息 */
@Excel(name = "信息")
private String modifyContent;
/** 位置 */
@Excel(name = "位置")
private String downloadUrl;
/** 文件大小 */
@Excel(name = "文件大小")
private Long apkSize;
/** 文件标识 */
@Excel(name = "文件标识")
private String apkMd5;
public void setObjid(Long objid)
{
this.objid = objid;
}
public Long getObjid()
{
return objid;
}
public void setVersionCode(Long versionCode)
{
this.versionCode = versionCode;
}
public Long getVersionCode()
{
return versionCode;
}
public void setVersionName(String versionName)
{
this.versionName = versionName;
}
public String getVersionName()
{
return versionName;
}
public void setModifyContent(String modifyContent)
{
this.modifyContent = modifyContent;
}
public String getModifyContent()
{
return modifyContent;
}
public void setDownloadUrl(String downloadUrl)
{
this.downloadUrl = downloadUrl;
}
public String getDownloadUrl()
{
return downloadUrl;
}
public void setApkSize(Long apkSize)
{
this.apkSize = apkSize;
}
public Long getApkSize()
{
return apkSize;
}
public void setApkMd5(String apkMd5)
{
this.apkMd5 = apkMd5;
}
public String getApkMd5()
{
return apkMd5;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("objid", getObjid())
.append("versionCode", getVersionCode())
.append("versionName", getVersionName())
.append("modifyContent", getModifyContent())
.append("downloadUrl", getDownloadUrl())
.append("apkSize", getApkSize())
.append("apkMd5", getApkMd5())
.append("createTime", getCreateTime())
.toString();
}
}

@ -2,6 +2,7 @@ package com.ruoyi.webapi.mapper;
import com.ruoyi.manager.domain.LedgerInstantBinding;
import com.ruoyi.webapi.doman.APKVersion;
import com.ruoyi.webapi.doman.JoinSubmitBeen;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@ -14,12 +15,10 @@ import java.util.List;
@Repository
public interface ApiMapper {
String selectEpcByWaybill(String code);
int insertLedgerBinding(String epc, String code,String user);
String selectEpcByWaybill(@Param("code") String code,@Param("basketId") Long basketId);
int insertLedgerBinding(String epc, String code, String user, Long basketId);
// 查询绑定列表
List<String> findBindingList(String epc);
int deleteBindingList(String epc);
@ -34,4 +33,6 @@ public interface ApiMapper {
int joinShouSubmit(JoinSubmitBeen been);
int joinSelectByUser(JoinSubmitBeen been);
APKVersion getVersion();
}

@ -0,0 +1,66 @@
package com.ruoyi.webapi.mapper;
import com.ruoyi.webapi.doman.PdaApkVersion;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2023-04-06
*/
@Repository
public interface PdaApkVersionMapper
{
/**
*
*
* @param objid
* @return
*/
public PdaApkVersion selectPdaApkVersionByObjid(Long objid);
/**
*
*
* @param pdaApkVersion
* @return
*/
public List<PdaApkVersion> selectPdaApkVersionList(PdaApkVersion pdaApkVersion);
/**
*
*
* @param pdaApkVersion
* @return
*/
public int insertPdaApkVersion(PdaApkVersion pdaApkVersion);
/**
*
*
* @param pdaApkVersion
* @return
*/
public int updatePdaApkVersion(PdaApkVersion pdaApkVersion);
/**
*
*
* @param objid
* @return
*/
public int deletePdaApkVersionByObjid(Long objid);
/**
*
*
* @param objids
* @return
*/
public int deletePdaApkVersionByObjids(String[] objids);
}

@ -1,6 +1,7 @@
package com.ruoyi.webapi.service;
import com.ruoyi.manager.domain.LedgerInstantBinding;
import com.ruoyi.webapi.doman.APKVersion;
import com.ruoyi.webapi.doman.JoinSubmitBeen;
import com.ruoyi.webapi.mapper.ApiMapper;
import org.springframework.beans.factory.annotation.Autowired;
@ -17,12 +18,12 @@ public class ApiService {
@Autowired
ApiMapper mapper;
public String selectEpcByWaybill(String code) {
return mapper.selectEpcByWaybill(code);
public String selectEpcByWaybill(String code, Long basketId) {
return mapper.selectEpcByWaybill(code,basketId);
}
public int insertLedgerBinding(String epc, String code, String user) {
return mapper.insertLedgerBinding(epc,code,user);
public int insertLedgerBinding(String epc, String code, String user, Long basketId) {
return mapper.insertLedgerBinding(epc,code,user,basketId);
}
@ -58,4 +59,8 @@ public class ApiService {
public int delectLocationInfoRemarkByDbCode(String dbCode, String hkCode) {
return mapper.delectLocationInfoRemarkByDbCode(dbCode);
}
public APKVersion getVersion() {
return mapper.getVersion();
}
}

@ -0,0 +1,64 @@
package com.ruoyi.webapi.service;
import com.ruoyi.webapi.doman.PdaApkVersion;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-04-06
*/
public interface IPdaApkVersionService {
/**
*
*
* @param objid
* @return
*/
public PdaApkVersion selectPdaApkVersionByObjid(Long objid);
/**
*
*
* @param pdaApkVersion
* @return
*/
public List<PdaApkVersion> selectPdaApkVersionList(PdaApkVersion pdaApkVersion);
/**
*
*
* @param pdaApkVersion
* @return
*/
public int insertPdaApkVersion(PdaApkVersion pdaApkVersion);
/**
*
*
* @param pdaApkVersion
* @return
*/
public int updatePdaApkVersion(PdaApkVersion pdaApkVersion);
/**
*
*
* @param objids
* @return
*/
public int deletePdaApkVersionByObjids(String objids);
/**
*
*
* @param objid
* @return
*/
public int deletePdaApkVersionByObjid(Long objid);
}

@ -0,0 +1,99 @@
package com.ruoyi.webapi.service.impl;
import com.ruoyi.webapi.doman.PdaApkVersion;
import com.ruoyi.webapi.mapper.PdaApkVersionMapper;
import com.ruoyi.webapi.service.IPdaApkVersionService;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-04-06
*/
@Service
public class PdaApkVersionServiceImpl implements IPdaApkVersionService
{
@Autowired
private PdaApkVersionMapper pdaApkVersionMapper;
/**
*
*
* @param objid
* @return
*/
@Override
public PdaApkVersion selectPdaApkVersionByObjid(Long objid)
{
return pdaApkVersionMapper.selectPdaApkVersionByObjid(objid);
}
/**
*
*
* @param pdaApkVersion
* @return
*/
@Override
public List<PdaApkVersion> selectPdaApkVersionList(PdaApkVersion pdaApkVersion)
{
return pdaApkVersionMapper.selectPdaApkVersionList(pdaApkVersion);
}
/**
*
*
* @param pdaApkVersion
* @return
*/
@Override
public int insertPdaApkVersion(PdaApkVersion pdaApkVersion)
{
pdaApkVersion.setCreateTime(DateUtils.getNowDate());
return pdaApkVersionMapper.insertPdaApkVersion(pdaApkVersion);
}
/**
*
*
* @param pdaApkVersion
* @return
*/
@Override
public int updatePdaApkVersion(PdaApkVersion pdaApkVersion)
{
return pdaApkVersionMapper.updatePdaApkVersion(pdaApkVersion);
}
/**
*
*
* @param objids
* @return
*/
@Override
public int deletePdaApkVersionByObjids(String objids)
{
return pdaApkVersionMapper.deletePdaApkVersionByObjids(Convert.toStrArray(objids));
}
/**
*
*
* @param objid
* @return
*/
@Override
public int deletePdaApkVersionByObjid(Long objid)
{
return pdaApkVersionMapper.deletePdaApkVersionByObjid(objid);
}
}

@ -0,0 +1,93 @@
/*
* Copyright (C) 2018 xuexiangjys(xuexiangjys@163.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ruoyi.webapi.utils;
import org.apache.commons.lang3.StringUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* MD5
*
* @author xuexiang
* @since 2018/7/2 3:14
*/
public final class Md5Utils {
private Md5Utils() {
throw new UnsupportedOperationException("cannot be instantiated");
}
public static String getFileMD5(File file) {
if (!file.exists()) {
return "";
}
FileInputStream in = null;
try {
in = new FileInputStream(file);
FileChannel channel = in.getChannel();
MappedByteBuffer buffer = channel.map(FileChannel.MapMode.READ_ONLY, 0, file.length());
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(buffer);
return bytes2Hex(md.digest());
} catch (NoSuchAlgorithmException | IOException e) {
e.printStackTrace();
} finally {
if (in != null) {
try {
in.close();
} catch (IOException ignored) {
}
}
}
return "";
}
/**
* MD5
*
* @param md5 md5true
* @param file
* @return
*/
public static boolean isFileValid(String md5, File file) {
return StringUtils.isEmpty(md5) || md5.equals(Md5Utils.getFileMD5(file));
}
/**
* byte2hex
*
* @param src byte
* @return 16
*/
private static String bytes2Hex(byte[] src) {
char[] res = new char[src.length << 1];
final char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
for (int i = 0, j = 0; i < src.length; i++) {
res[j++] = hexDigits[src[i] >>> 4 & 0x0f];
res[j++] = hexDigits[src[i] & 0x0f];
}
return new String(res);
}
}

@ -4,14 +4,17 @@
<select id="selectEpcByWaybill" resultType="string">
select cargo_frame_epc from ledger_instant_binding where waybill_number=#{code} limit 1
select cargo_frame_epc from ledger_instant_binding where waybill_number=#{code} and basket_id =#{basketId} limit 1
</select>
<insert id="insertLedgerBinding">
INSERT INTO ledger_instant_binding (cargo_frame_epc, waybill_number,create_by) VALUES (#{param1}, #{param2},#{param3});
INSERT INTO ledger_instant_binding (cargo_frame_epc, waybill_number,create_by,basket_id) VALUES (#{param1}, #{param2},#{param3},#{param4});
</insert>
<select id="findBindingList" resultType="string">
select waybill_number from ledger_instant_binding WHERE cargo_frame_epc = #{epc}
select waybill_number
from ledger_instant_binding lib
left join base_basket_info bbi on lib.basket_id=bbi.obj_id
WHERE basket_epc = #{epc} or basket_epc2 = #{epc}
</select>
<delete id="deleteBindingList">
delete from ledger_instant_binding WHERE cargo_frame_epc = #{epc}
@ -50,4 +53,20 @@
</where>
</select>
<resultMap type="com.ruoyi.webapi.doman.APKVersion" id="PdaApkVersionResult">
<result property="VersionCode" column="version_code" />
<result property="VersionName" column="version_name" />
<result property="ModifyContent" column="modify_content" />
<result property="DownloadUrl" column="download_url" />
<result property="ApkSize" column="apk_size" />
<result property="ApkMd5" column="apk_md5" />
</resultMap>
<select id="getVersion" resultMap="PdaApkVersionResult">
select version_code, version_name, modify_content, download_url, apk_size, apk_md5 from pda_apk_version order by create_time desc limit 1
</select>
</mapper>

@ -0,0 +1,82 @@
<?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.webapi.mapper.PdaApkVersionMapper">
<resultMap type="com.ruoyi.webapi.doman.PdaApkVersion" id="PdaApkVersionResult">
<result property="objid" column="objid"/>
<result property="versionCode" column="version_code"/>
<result property="versionName" column="version_name"/>
<result property="modifyContent" column="modify_content"/>
<result property="downloadUrl" column="download_url"/>
<result property="apkSize" column="apk_size"/>
<result property="apkMd5" column="apk_md5"/>
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="selectPdaApkVersionVo">
select objid, version_code, version_name, modify_content, download_url, apk_size, apk_md5, create_time from pda_apk_version
</sql>
<select id="selectPdaApkVersionList" parameterType="com.ruoyi.webapi.doman.PdaApkVersion" resultMap="PdaApkVersionResult">
<include refid="selectPdaApkVersionVo"/>
<where>
<if test="versionCode != null ">and version_code = #{versionCode}</if>
</where>
</select>
<select id="selectPdaApkVersionByObjid" parameterType="Long" resultMap="PdaApkVersionResult">
<include refid="selectPdaApkVersionVo"/>
where objid = #{objid}
</select>
<insert id="insertPdaApkVersion" parameterType="com.ruoyi.webapi.doman.PdaApkVersion" useGeneratedKeys="true" keyProperty="objid">
insert into pda_apk_version
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="versionCode != null">version_code,</if>
<if test="versionName != null">version_name,</if>
<if test="modifyContent != null">modify_content,</if>
<if test="downloadUrl != null">download_url,</if>
<if test="apkSize != null">apk_size,</if>
<if test="apkMd5 != null">apk_md5,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="versionCode != null">#{versionCode},</if>
<if test="versionName != null">#{versionName},</if>
<if test="modifyContent != null">#{modifyContent},</if>
<if test="downloadUrl != null">#{downloadUrl},</if>
<if test="apkSize != null">#{apkSize},</if>
<if test="apkMd5 != null">#{apkMd5},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updatePdaApkVersion" parameterType="com.ruoyi.webapi.doman.PdaApkVersion">
update pda_apk_version
<trim prefix="SET" suffixOverrides=",">
<if test="versionCode != null">version_code = #{versionCode},</if>
<if test="versionName != null">version_name = #{versionName},</if>
<if test="modifyContent != null">modify_content = #{modifyContent},</if>
<if test="downloadUrl != null">download_url = #{downloadUrl},</if>
<if test="apkSize != null">apk_size = #{apkSize},</if>
<if test="apkMd5 != null">apk_md5 = #{apkMd5},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where objid = #{objid}
</update>
<delete id="deletePdaApkVersionByObjid" parameterType="Long">
delete from pda_apk_version where objid = #{objid}
</delete>
<delete id="deletePdaApkVersionByObjids" parameterType="String">
delete from pda_apk_version where objid in
<foreach item="objid" collection="array" open="(" separator="," close=")">
#{objid}
</foreach>
</delete>
</mapper>

@ -0,0 +1,125 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增手持版本升级')" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-pda_version-add">
<div class="form-group">
<label class="col-sm-3 control-label">版本号:</label>
<div class="col-sm-8">
<input name="versionCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">版本名:</label>
<div class="col-sm-8">
<input name="versionName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">信息:</label>
<div class="col-sm-8">
<input type="hidden" class="form-control" name="modifyContent">
<div class="summernote" id="modifyContent"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">位置:</label>
<div class="col-sm-8">
<!-- <input type="hidden" name="downloadUrl">-->
<!-- <div class="file-loading">-->
<!-- <input class="form-control file-upload" id="downloadUrl" name="file" type="file">-->
<input id="filePath" name="filePath" class="form-control" type="file">
<!-- </div>-->
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript">
var prefix = ctx + "pda/pda_version"
$("#form-pda_version-add").validate({
focusCleanup: true
});
function submitHandler() {
// if ($.validate.form()) {
// $.operate.save(prefix + "/add", $('#form-pda_version-add').serialize());
// }
var formData = new FormData();
if ($('#filePath')[0].files[0] == null) {
$.modal.alertWarning("请先选择文件路径");
return false;
}
formData.append('versionCode', $("input[name='versionCode']").val());
formData.append('versionName', $("input[name='versionName']").val());
formData.append('modifyContent', $("input[name='modifyContent']").val());
formData.append('file', $('#filePath')[0].files[0]);
$.ajax({
url: prefix + "/add",
type: 'post',
cache: false,
data: formData,
processData: false,
contentType: false,
dataType: "json",
success: function(result) {
$.operate.successCallback(result);
}
});
}
// $(".file-upload").fileinput({
// uploadUrl: ctx + 'common/upload',
// maxFileCount: 1,
// autoReplace: true
// }).on('fileuploaded', function (event, data, previewId, index) {
// $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
// }).on('fileremoved', function (event, id, index) {
// $("input[name='" + event.currentTarget.id + "']").val('')
// })
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
});
</script>
</body>
</html>

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改手持版本升级')" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-pda_version-edit" th:object="${pdaApkVersion}">
<input name="objid" th:field="*{objid}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">版本号:</label>
<div class="col-sm-8">
<input name="versionCode" th:field="*{versionCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">版本名:</label>
<div class="col-sm-8">
<input name="versionName" th:field="*{versionName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">信息:</label>
<div class="col-sm-8">
<input type="hidden" class="form-control" th:field="*{modifyContent}">
<div class="summernote" id="modifyContent"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">位置:</label>
<div class="col-sm-8">
<input type="hidden" name="downloadUrl" th:field="*{downloadUrl}">
<div class="file-loading">
<input class="form-control file-upload" id="downloadUrl" name="file" type="file">
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript">
var prefix = ctx + "pda/pda_version";
$("#form-pda_version-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-pda_version-edit').serialize());
}
}
$(".file-upload").each(function (i) {
var val = $("input[name='" + this.id + "']").val()
$(this).fileinput({
'uploadUrl': ctx + 'common/upload',
initialPreviewAsData: true,
initialPreview: [val],
maxFileCount: 1,
autoReplace: true
}).on('fileuploaded', function (event, data, previewId, index) {
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
}).on('fileremoved', function (event, id, index) {
$("input[name='" + event.currentTarget.id + "']").val('')
})
$(this).fileinput('_initFileActions');
});
$(function() {
$('.summernote').each(function(i) {
$('#' + this.id).summernote({
lang: 'zh-CN',
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
var content = $("input[name='" + this.id + "']").val();
$('#' + this.id).summernote('code', content);
})
});
</script>
</body>
</html>

@ -0,0 +1,112 @@
<!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="versionCode"/>
</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="pda:pda_version:add">
<i class="fa fa-plus"></i> 添加
</a>
<!--<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="pda:pda_version:edit">
<i class="fa fa-edit"></i> 删除
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="pda:pda_version:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="pda:pda_version: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('pda:pda_version:edit')}]];
var removeFlag = [[${@permission.hasPermi('pda:pda_version:remove')}]];
var prefix = ctx + "pda/pda_version";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "手持版本升级",
sortName: "versionCode",
sortOrder: "desc",
columns: [{
checkbox: true
},
{
field: 'objid',
title: '主键标识',
visible: false
},
{
field: 'versionCode',
title: '版本号'
},
{
field: 'versionName',
title: '版本名'
},
{
field: 'modifyContent',
title: '信息'
},
{
field: 'downloadUrl',
title: '位置'
},
{
field: 'apkSize',
title: '文件大小'
},
{
field: 'apkMd5',
title: '文件标识'
},
{
field: 'createTime',
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.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>
</body>
</html>
Loading…
Cancel
Save