物料操作代码生成
This commit is contained in:
parent
1e9e126b44
commit
0e7731f7b6
|
|
@ -0,0 +1,126 @@
|
||||||
|
package com.ruoyi.busi.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.busi.domain.BusiMaterialOperate;
|
||||||
|
import com.ruoyi.busi.service.IBusiMaterialOperateService;
|
||||||
|
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 WangCL
|
||||||
|
* @date 2021-12-24
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/busi/materialperate")
|
||||||
|
public class BusiMaterialOperateController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "busi/materialperate";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBusiMaterialOperateService busiMaterialOperateService;
|
||||||
|
|
||||||
|
@RequiresPermissions("busi:materialperate:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String materialperate()
|
||||||
|
{
|
||||||
|
return prefix + "/materialperate";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料操作流水列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("busi:materialperate:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(BusiMaterialOperate busiMaterialOperate)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<BusiMaterialOperate> list = busiMaterialOperateService.selectBusiMaterialOperateList(busiMaterialOperate);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出物料操作流水列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("busi:materialperate:export")
|
||||||
|
@Log(title = "物料操作流水", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(BusiMaterialOperate busiMaterialOperate)
|
||||||
|
{
|
||||||
|
List<BusiMaterialOperate> list = busiMaterialOperateService.selectBusiMaterialOperateList(busiMaterialOperate);
|
||||||
|
ExcelUtil<BusiMaterialOperate> util = new ExcelUtil<BusiMaterialOperate>(BusiMaterialOperate.class);
|
||||||
|
return util.exportExcel(list, "物料操作流水数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料操作流水
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存物料操作流水
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("busi:materialperate:add")
|
||||||
|
@Log(title = "物料操作流水", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(BusiMaterialOperate busiMaterialOperate)
|
||||||
|
{
|
||||||
|
return toAjax(busiMaterialOperateService.insertBusiMaterialOperate(busiMaterialOperate));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料操作流水
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
BusiMaterialOperate busiMaterialOperate = busiMaterialOperateService.selectBusiMaterialOperateById(id);
|
||||||
|
mmap.put("busiMaterialOperate", busiMaterialOperate);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存物料操作流水
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("busi:materialperate:edit")
|
||||||
|
@Log(title = "物料操作流水", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(BusiMaterialOperate busiMaterialOperate)
|
||||||
|
{
|
||||||
|
return toAjax(busiMaterialOperateService.updateBusiMaterialOperate(busiMaterialOperate));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料操作流水
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("busi:materialperate:remove")
|
||||||
|
@Log(title = "物料操作流水", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(busiMaterialOperateService.deleteBusiMaterialOperateByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.ruoyi.busi.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料操作流水对象 busi_material_operate
|
||||||
|
*
|
||||||
|
* @author WangCL
|
||||||
|
* @date 2021-12-24
|
||||||
|
*/
|
||||||
|
public class BusiMaterialOperate extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** ID主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 订单 */
|
||||||
|
@Excel(name = "订单")
|
||||||
|
private String materialStockId;
|
||||||
|
|
||||||
|
/** 操作数量 */
|
||||||
|
@Excel(name = "操作数量")
|
||||||
|
private Long amount;
|
||||||
|
|
||||||
|
/** 操作类型 */
|
||||||
|
@Excel(name = "操作类型")
|
||||||
|
private String oprateType;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setMaterialStockId(String materialStockId)
|
||||||
|
{
|
||||||
|
this.materialStockId = materialStockId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialStockId()
|
||||||
|
{
|
||||||
|
return materialStockId;
|
||||||
|
}
|
||||||
|
public void setAmount(Long amount)
|
||||||
|
{
|
||||||
|
this.amount = amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAmount()
|
||||||
|
{
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
|
public void setOprateType(String oprateType)
|
||||||
|
{
|
||||||
|
this.oprateType = oprateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOprateType()
|
||||||
|
{
|
||||||
|
return oprateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("materialStockId", getMaterialStockId())
|
||||||
|
.append("amount", getAmount())
|
||||||
|
.append("oprateType", getOprateType())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.busi.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.busi.domain.BusiMaterialOperate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料操作流水Mapper接口
|
||||||
|
*
|
||||||
|
* @author WangCL
|
||||||
|
* @date 2021-12-24
|
||||||
|
*/
|
||||||
|
public interface BusiMaterialOperateMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询物料操作流水
|
||||||
|
*
|
||||||
|
* @param id 物料操作流水主键
|
||||||
|
* @return 物料操作流水
|
||||||
|
*/
|
||||||
|
public BusiMaterialOperate selectBusiMaterialOperateById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料操作流水列表
|
||||||
|
*
|
||||||
|
* @param busiMaterialOperate 物料操作流水
|
||||||
|
* @return 物料操作流水集合
|
||||||
|
*/
|
||||||
|
public List<BusiMaterialOperate> selectBusiMaterialOperateList(BusiMaterialOperate busiMaterialOperate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料操作流水
|
||||||
|
*
|
||||||
|
* @param busiMaterialOperate 物料操作流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBusiMaterialOperate(BusiMaterialOperate busiMaterialOperate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料操作流水
|
||||||
|
*
|
||||||
|
* @param busiMaterialOperate 物料操作流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBusiMaterialOperate(BusiMaterialOperate busiMaterialOperate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料操作流水
|
||||||
|
*
|
||||||
|
* @param id 物料操作流水主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBusiMaterialOperateById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料操作流水
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBusiMaterialOperateByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.busi.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.busi.domain.BusiMaterialOperate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料操作流水Service接口
|
||||||
|
*
|
||||||
|
* @author WangCL
|
||||||
|
* @date 2021-12-24
|
||||||
|
*/
|
||||||
|
public interface IBusiMaterialOperateService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询物料操作流水
|
||||||
|
*
|
||||||
|
* @param id 物料操作流水主键
|
||||||
|
* @return 物料操作流水
|
||||||
|
*/
|
||||||
|
public BusiMaterialOperate selectBusiMaterialOperateById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料操作流水列表
|
||||||
|
*
|
||||||
|
* @param busiMaterialOperate 物料操作流水
|
||||||
|
* @return 物料操作流水集合
|
||||||
|
*/
|
||||||
|
public List<BusiMaterialOperate> selectBusiMaterialOperateList(BusiMaterialOperate busiMaterialOperate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料操作流水
|
||||||
|
*
|
||||||
|
* @param busiMaterialOperate 物料操作流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBusiMaterialOperate(BusiMaterialOperate busiMaterialOperate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料操作流水
|
||||||
|
*
|
||||||
|
* @param busiMaterialOperate 物料操作流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBusiMaterialOperate(BusiMaterialOperate busiMaterialOperate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料操作流水
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的物料操作流水主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBusiMaterialOperateByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料操作流水信息
|
||||||
|
*
|
||||||
|
* @param id 物料操作流水主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBusiMaterialOperateById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
package com.ruoyi.busi.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.busi.mapper.BusiMaterialOperateMapper;
|
||||||
|
import com.ruoyi.busi.domain.BusiMaterialOperate;
|
||||||
|
import com.ruoyi.busi.service.IBusiMaterialOperateService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料操作流水Service业务层处理
|
||||||
|
*
|
||||||
|
* @author WangCL
|
||||||
|
* @date 2021-12-24
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BusiMaterialOperateServiceImpl implements IBusiMaterialOperateService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private BusiMaterialOperateMapper busiMaterialOperateMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料操作流水
|
||||||
|
*
|
||||||
|
* @param id 物料操作流水主键
|
||||||
|
* @return 物料操作流水
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BusiMaterialOperate selectBusiMaterialOperateById(Long id)
|
||||||
|
{
|
||||||
|
return busiMaterialOperateMapper.selectBusiMaterialOperateById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料操作流水列表
|
||||||
|
*
|
||||||
|
* @param busiMaterialOperate 物料操作流水
|
||||||
|
* @return 物料操作流水
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BusiMaterialOperate> selectBusiMaterialOperateList(BusiMaterialOperate busiMaterialOperate)
|
||||||
|
{
|
||||||
|
return busiMaterialOperateMapper.selectBusiMaterialOperateList(busiMaterialOperate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料操作流水
|
||||||
|
*
|
||||||
|
* @param busiMaterialOperate 物料操作流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBusiMaterialOperate(BusiMaterialOperate busiMaterialOperate)
|
||||||
|
{
|
||||||
|
busiMaterialOperate.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return busiMaterialOperateMapper.insertBusiMaterialOperate(busiMaterialOperate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料操作流水
|
||||||
|
*
|
||||||
|
* @param busiMaterialOperate 物料操作流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBusiMaterialOperate(BusiMaterialOperate busiMaterialOperate)
|
||||||
|
{
|
||||||
|
return busiMaterialOperateMapper.updateBusiMaterialOperate(busiMaterialOperate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料操作流水
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的物料操作流水主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBusiMaterialOperateByIds(String ids)
|
||||||
|
{
|
||||||
|
return busiMaterialOperateMapper.deleteBusiMaterialOperateByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料操作流水信息
|
||||||
|
*
|
||||||
|
* @param id 物料操作流水主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBusiMaterialOperateById(Long id)
|
||||||
|
{
|
||||||
|
return busiMaterialOperateMapper.deleteBusiMaterialOperateById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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.busi.mapper.BusiMaterialOperateMapper">
|
||||||
|
|
||||||
|
<resultMap type="BusiMaterialOperate" id="BusiMaterialOperateResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="materialStockId" column="material_stock_id" />
|
||||||
|
<result property="amount" column="amount" />
|
||||||
|
<result property="oprateType" column="oprate_type" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectBusiMaterialOperateVo">
|
||||||
|
select id, material_stock_id, amount, oprate_type, create_by, create_time, remark from busi_material_operate
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectBusiMaterialOperateList" parameterType="BusiMaterialOperate" resultMap="BusiMaterialOperateResult">
|
||||||
|
<include refid="selectBusiMaterialOperateVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="materialStockId != null and materialStockId != ''"> and material_stock_id = #{materialStockId}</if>
|
||||||
|
<if test="oprateType != null and oprateType != ''"> and oprate_type = #{oprateType}</if>
|
||||||
|
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
||||||
|
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectBusiMaterialOperateById" parameterType="Long" resultMap="BusiMaterialOperateResult">
|
||||||
|
<include refid="selectBusiMaterialOperateVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertBusiMaterialOperate" parameterType="BusiMaterialOperate" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into busi_material_operate
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="materialStockId != null">material_stock_id,</if>
|
||||||
|
<if test="amount != null">amount,</if>
|
||||||
|
<if test="oprateType != null">oprate_type,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="materialStockId != null">#{materialStockId},</if>
|
||||||
|
<if test="amount != null">#{amount},</if>
|
||||||
|
<if test="oprateType != null">#{oprateType},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateBusiMaterialOperate" parameterType="BusiMaterialOperate">
|
||||||
|
update busi_material_operate
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="materialStockId != null">material_stock_id = #{materialStockId},</if>
|
||||||
|
<if test="amount != null">amount = #{amount},</if>
|
||||||
|
<if test="oprateType != null">oprate_type = #{oprateType},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteBusiMaterialOperateById" parameterType="Long">
|
||||||
|
delete from busi_material_operate where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteBusiMaterialOperateByIds" parameterType="String">
|
||||||
|
delete from busi_material_operate where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<!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-materialperate-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">订单:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="materialStockId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">操作数量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="amount" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">操作类型:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="oprateType" class="form-control m-b">
|
||||||
|
<option value="">所有</option>
|
||||||
|
</select>
|
||||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注信息:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea name="remark" class="form-control"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "busi/materialperate"
|
||||||
|
$("#form-materialperate-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-materialperate-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
<!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-materialperate-edit" th:object="${busiMaterialOperate}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">订单:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="materialStockId" th:field="*{materialStockId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">操作数量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="amount" th:field="*{amount}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">操作类型:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="oprateType" class="form-control m-b">
|
||||||
|
<option value="">所有</option>
|
||||||
|
</select>
|
||||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注信息:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "busi/materialperate";
|
||||||
|
$("#form-materialperate-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-materialperate-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
<!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="materialStockId"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>操作类型:</label>
|
||||||
|
<select name="oprateType">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option value="-1">代码生成请选择字典属性</option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>操作人:</label>
|
||||||
|
<input type="text" name="createBy"/>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>操作时间:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
|
||||||
|
</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="busi:materialperate:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="busi:materialperate:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="busi:materialperate:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="busi:materialperate: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('busi:materialperate:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('busi:materialperate:remove')}]];
|
||||||
|
var prefix = ctx + "busi/materialperate";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "物料操作流水",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: 'ID主键',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'materialStockId',
|
||||||
|
title: '订单'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'amount',
|
||||||
|
title: '操作数量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'oprateType',
|
||||||
|
title: '操作类型'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'createBy',
|
||||||
|
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.id + '\')"><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.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
26
sql/tmp.sql
26
sql/tmp.sql
|
|
@ -119,3 +119,29 @@ values('产品需求删除', @parentId, '4', '#', 'F', '0', 'busi:productRequi
|
||||||
|
|
||||||
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)
|
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', 'busi:productRequire:export', '#', 'admin', sysdate(), '', null, '');
|
values('产品需求导出', @parentId, '5', '#', 'F', '0', 'busi:productRequire:export', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- 菜单 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('物料操作流水', '118', '1', '/busi/materialperate', 'C', '0', 'busi:materialperate: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', 'busi:materialperate: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', 'busi:materialperate: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', 'busi:materialperate: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', 'busi:materialperate: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', 'busi:materialperate:export', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue