feat:进港交接
parent
f2060df134
commit
5addf337d1
@ -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.RecordDeliveryTaskWaybill;
|
||||
import com.ruoyi.manager.service.IRecordDeliveryTaskWaybillService;
|
||||
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-05-14
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/manager/task_waybill")
|
||||
public class RecordDeliveryTaskWaybillController extends BaseController
|
||||
{
|
||||
private String prefix = "manager/task_waybill";
|
||||
|
||||
@Autowired
|
||||
private IRecordDeliveryTaskWaybillService recordDeliveryTaskWaybillService;
|
||||
|
||||
@RequiresPermissions("manager:task_waybill:view")
|
||||
@GetMapping()
|
||||
public String task_waybill()
|
||||
{
|
||||
return prefix + "/task_waybill";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交接资产列表
|
||||
*/
|
||||
// @RequiresPermissions("manager:task_waybill:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill)
|
||||
{
|
||||
startPage();
|
||||
List<RecordDeliveryTaskWaybill> list = recordDeliveryTaskWaybillService.selectRecordDeliveryTaskWaybillList(recordDeliveryTaskWaybill);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交接资产列表
|
||||
*/
|
||||
@RequiresPermissions("manager:task_waybill:export")
|
||||
@Log(title = "交接资产", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill)
|
||||
{
|
||||
List<RecordDeliveryTaskWaybill> list = recordDeliveryTaskWaybillService.selectRecordDeliveryTaskWaybillList(recordDeliveryTaskWaybill);
|
||||
ExcelUtil<RecordDeliveryTaskWaybill> util = new ExcelUtil<RecordDeliveryTaskWaybill>(RecordDeliveryTaskWaybill.class);
|
||||
return util.exportExcel(list, "交接资产数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交接资产
|
||||
*/
|
||||
@RequiresPermissions("manager:task_waybill:add")
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存交接资产
|
||||
*/
|
||||
@RequiresPermissions("manager:task_waybill:add")
|
||||
@Log(title = "交接资产", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill)
|
||||
{
|
||||
return toAjax(recordDeliveryTaskWaybillService.insertRecordDeliveryTaskWaybill(recordDeliveryTaskWaybill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交接资产
|
||||
*/
|
||||
@RequiresPermissions("manager:task_waybill:edit")
|
||||
@GetMapping("/edit/{objid}")
|
||||
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
|
||||
{
|
||||
RecordDeliveryTaskWaybill recordDeliveryTaskWaybill = recordDeliveryTaskWaybillService.selectRecordDeliveryTaskWaybillByObjid(objid);
|
||||
mmap.put("recordDeliveryTaskWaybill", recordDeliveryTaskWaybill);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存交接资产
|
||||
*/
|
||||
@RequiresPermissions("manager:task_waybill:edit")
|
||||
@Log(title = "交接资产", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill)
|
||||
{
|
||||
return toAjax(recordDeliveryTaskWaybillService.updateRecordDeliveryTaskWaybill(recordDeliveryTaskWaybill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交接资产
|
||||
*/
|
||||
@RequiresPermissions("manager:task_waybill:remove")
|
||||
@Log(title = "交接资产", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(recordDeliveryTaskWaybillService.deleteRecordDeliveryTaskWaybillByObjids(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
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_delivery_task_waybill
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-05-14
|
||||
*/
|
||||
public class RecordDeliveryTaskWaybill extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键 */
|
||||
private Long objid;
|
||||
|
||||
/** 绑定条码 */
|
||||
@Excel(name = "绑定条码")
|
||||
private String waybillNumber;
|
||||
|
||||
/** 资产ID */
|
||||
@Excel(name = "资产ID")
|
||||
private Long basketId;
|
||||
|
||||
/** 扫描RFID */
|
||||
@Excel(name = "扫描RFID")
|
||||
private String basketEpc;
|
||||
|
||||
/** 交接码 */
|
||||
@Excel(name = "交接码")
|
||||
private String taskCode;
|
||||
|
||||
public void setObjid(Long objid)
|
||||
{
|
||||
this.objid = objid;
|
||||
}
|
||||
|
||||
public Long getObjid()
|
||||
{
|
||||
return objid;
|
||||
}
|
||||
|
||||
public void setWaybillNumber(String waybillNumber)
|
||||
{
|
||||
this.waybillNumber = waybillNumber;
|
||||
}
|
||||
|
||||
public String getWaybillNumber()
|
||||
{
|
||||
return waybillNumber;
|
||||
}
|
||||
|
||||
public void setBasketId(Long basketId)
|
||||
{
|
||||
this.basketId = basketId;
|
||||
}
|
||||
|
||||
public Long getBasketId()
|
||||
{
|
||||
return basketId;
|
||||
}
|
||||
|
||||
public void setBasketEpc(String basketEpc)
|
||||
{
|
||||
this.basketEpc = basketEpc;
|
||||
}
|
||||
|
||||
public String getBasketEpc()
|
||||
{
|
||||
return basketEpc;
|
||||
}
|
||||
|
||||
public void setTaskCode(String taskCode)
|
||||
{
|
||||
this.taskCode = taskCode;
|
||||
}
|
||||
|
||||
public String getTaskCode()
|
||||
{
|
||||
return taskCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("objid", getObjid())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("waybillNumber", getWaybillNumber())
|
||||
.append("basketId", getBasketId())
|
||||
.append("basketEpc", getBasketEpc())
|
||||
.append("taskCode", getTaskCode())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.manager.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manager.domain.RecordDeliveryTaskWaybill;
|
||||
|
||||
/**
|
||||
* 交接资产Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-05-14
|
||||
*/
|
||||
public interface RecordDeliveryTaskWaybillMapper
|
||||
{
|
||||
/**
|
||||
* 查询交接资产
|
||||
*
|
||||
* @param objid 交接资产主键
|
||||
* @return 交接资产
|
||||
*/
|
||||
public RecordDeliveryTaskWaybill selectRecordDeliveryTaskWaybillByObjid(Long objid);
|
||||
|
||||
/**
|
||||
* 查询交接资产列表
|
||||
*
|
||||
* @param recordDeliveryTaskWaybill 交接资产
|
||||
* @return 交接资产集合
|
||||
*/
|
||||
public List<RecordDeliveryTaskWaybill> selectRecordDeliveryTaskWaybillList(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill);
|
||||
|
||||
/**
|
||||
* 新增交接资产
|
||||
*
|
||||
* @param recordDeliveryTaskWaybill 交接资产
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordDeliveryTaskWaybill(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill);
|
||||
|
||||
/**
|
||||
* 修改交接资产
|
||||
*
|
||||
* @param recordDeliveryTaskWaybill 交接资产
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordDeliveryTaskWaybill(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill);
|
||||
|
||||
/**
|
||||
* 删除交接资产
|
||||
*
|
||||
* @param objid 交接资产主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordDeliveryTaskWaybillByObjid(Long objid);
|
||||
|
||||
/**
|
||||
* 批量删除交接资产
|
||||
*
|
||||
* @param objids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordDeliveryTaskWaybillByObjids(String[] objids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.manager.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manager.domain.RecordDeliveryTaskWaybill;
|
||||
|
||||
/**
|
||||
* 交接资产Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-05-14
|
||||
*/
|
||||
public interface IRecordDeliveryTaskWaybillService
|
||||
{
|
||||
/**
|
||||
* 查询交接资产
|
||||
*
|
||||
* @param objid 交接资产主键
|
||||
* @return 交接资产
|
||||
*/
|
||||
public RecordDeliveryTaskWaybill selectRecordDeliveryTaskWaybillByObjid(Long objid);
|
||||
|
||||
/**
|
||||
* 查询交接资产列表
|
||||
*
|
||||
* @param recordDeliveryTaskWaybill 交接资产
|
||||
* @return 交接资产集合
|
||||
*/
|
||||
public List<RecordDeliveryTaskWaybill> selectRecordDeliveryTaskWaybillList(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill);
|
||||
|
||||
/**
|
||||
* 新增交接资产
|
||||
*
|
||||
* @param recordDeliveryTaskWaybill 交接资产
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordDeliveryTaskWaybill(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill);
|
||||
|
||||
/**
|
||||
* 修改交接资产
|
||||
*
|
||||
* @param recordDeliveryTaskWaybill 交接资产
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordDeliveryTaskWaybill(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill);
|
||||
|
||||
/**
|
||||
* 批量删除交接资产
|
||||
*
|
||||
* @param objids 需要删除的交接资产主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordDeliveryTaskWaybillByObjids(String objids);
|
||||
|
||||
/**
|
||||
* 删除交接资产信息
|
||||
*
|
||||
* @param objid 交接资产主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordDeliveryTaskWaybillByObjid(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.RecordDeliveryTaskWaybillMapper;
|
||||
import com.ruoyi.manager.domain.RecordDeliveryTaskWaybill;
|
||||
import com.ruoyi.manager.service.IRecordDeliveryTaskWaybillService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 交接资产Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-05-14
|
||||
*/
|
||||
@Service
|
||||
public class RecordDeliveryTaskWaybillServiceImpl implements IRecordDeliveryTaskWaybillService
|
||||
{
|
||||
@Autowired
|
||||
private RecordDeliveryTaskWaybillMapper recordDeliveryTaskWaybillMapper;
|
||||
|
||||
/**
|
||||
* 查询交接资产
|
||||
*
|
||||
* @param objid 交接资产主键
|
||||
* @return 交接资产
|
||||
*/
|
||||
@Override
|
||||
public RecordDeliveryTaskWaybill selectRecordDeliveryTaskWaybillByObjid(Long objid)
|
||||
{
|
||||
return recordDeliveryTaskWaybillMapper.selectRecordDeliveryTaskWaybillByObjid(objid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交接资产列表
|
||||
*
|
||||
* @param recordDeliveryTaskWaybill 交接资产
|
||||
* @return 交接资产
|
||||
*/
|
||||
@Override
|
||||
public List<RecordDeliveryTaskWaybill> selectRecordDeliveryTaskWaybillList(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill)
|
||||
{
|
||||
return recordDeliveryTaskWaybillMapper.selectRecordDeliveryTaskWaybillList(recordDeliveryTaskWaybill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交接资产
|
||||
*
|
||||
* @param recordDeliveryTaskWaybill 交接资产
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRecordDeliveryTaskWaybill(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill)
|
||||
{
|
||||
recordDeliveryTaskWaybill.setCreateTime(DateUtils.getNowDate());
|
||||
return recordDeliveryTaskWaybillMapper.insertRecordDeliveryTaskWaybill(recordDeliveryTaskWaybill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交接资产
|
||||
*
|
||||
* @param recordDeliveryTaskWaybill 交接资产
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRecordDeliveryTaskWaybill(RecordDeliveryTaskWaybill recordDeliveryTaskWaybill)
|
||||
{
|
||||
return recordDeliveryTaskWaybillMapper.updateRecordDeliveryTaskWaybill(recordDeliveryTaskWaybill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除交接资产
|
||||
*
|
||||
* @param objids 需要删除的交接资产主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordDeliveryTaskWaybillByObjids(String objids)
|
||||
{
|
||||
return recordDeliveryTaskWaybillMapper.deleteRecordDeliveryTaskWaybillByObjids(Convert.toStrArray(objids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交接资产信息
|
||||
*
|
||||
* @param objid 交接资产主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordDeliveryTaskWaybillByObjid(Long objid)
|
||||
{
|
||||
return recordDeliveryTaskWaybillMapper.deleteRecordDeliveryTaskWaybillByObjid(objid);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
<?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.RecordDeliveryTaskWaybillMapper">
|
||||
|
||||
<resultMap type="RecordDeliveryTaskWaybill" id="RecordDeliveryTaskWaybillResult">
|
||||
<result property="objid" column="objid" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="waybillNumber" column="waybill_number" />
|
||||
<result property="basketId" column="basket_id" />
|
||||
<result property="basketEpc" column="basket_epc" />
|
||||
<result property="taskCode" column="task_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRecordDeliveryTaskWaybillVo">
|
||||
select objid, create_time, waybill_number, basket_id, basket_epc, task_code from record_delivery_task_waybill
|
||||
</sql>
|
||||
|
||||
<select id="selectRecordDeliveryTaskWaybillList" parameterType="RecordDeliveryTaskWaybill" resultMap="RecordDeliveryTaskWaybillResult">
|
||||
<include refid="selectRecordDeliveryTaskWaybillVo"/>
|
||||
<where>
|
||||
<if test="waybillNumber != null and waybillNumber != ''"> and waybill_number = #{waybillNumber}</if>
|
||||
<if test="basketId != null "> and basket_id = #{basketId}</if>
|
||||
<if test="basketEpc != null and basketEpc != ''"> and basket_epc = #{basketEpc}</if>
|
||||
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRecordDeliveryTaskWaybillByObjid" parameterType="Long" resultMap="RecordDeliveryTaskWaybillResult">
|
||||
<include refid="selectRecordDeliveryTaskWaybillVo"/>
|
||||
where objid = #{objid}
|
||||
</select>
|
||||
|
||||
<insert id="insertRecordDeliveryTaskWaybill" parameterType="RecordDeliveryTaskWaybill" useGeneratedKeys="true" keyProperty="objid">
|
||||
insert into record_delivery_task_waybill
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="waybillNumber != null">waybill_number,</if>
|
||||
<if test="basketId != null">basket_id,</if>
|
||||
<if test="basketEpc != null">basket_epc,</if>
|
||||
<if test="taskCode != null">task_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="waybillNumber != null">#{waybillNumber},</if>
|
||||
<if test="basketId != null">#{basketId},</if>
|
||||
<if test="basketEpc != null">#{basketEpc},</if>
|
||||
<if test="taskCode != null">#{taskCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRecordDeliveryTaskWaybill" parameterType="RecordDeliveryTaskWaybill">
|
||||
update record_delivery_task_waybill
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="waybillNumber != null">waybill_number = #{waybillNumber},</if>
|
||||
<if test="basketId != null">basket_id = #{basketId},</if>
|
||||
<if test="basketEpc != null">basket_epc = #{basketEpc},</if>
|
||||
<if test="taskCode != null">task_code = #{taskCode},</if>
|
||||
</trim>
|
||||
where objid = #{objid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRecordDeliveryTaskWaybillByObjid" parameterType="Long">
|
||||
delete from record_delivery_task_waybill where objid = #{objid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRecordDeliveryTaskWaybillByObjids" parameterType="String">
|
||||
delete from record_delivery_task_waybill where objid in
|
||||
<foreach item="objid" collection="array" open="(" separator="," close=")">
|
||||
#{objid}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue