feat:货物绑定解绑功能
parent
e6c646d0f8
commit
0d91d3710f
@ -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));
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
@ -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, '');
|
||||
@ -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 + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
|
||||
|
||||
}
|
||||
@ -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,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> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="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…
Reference in New Issue