成品库存和成品操作初始化
This commit is contained in:
parent
eaf166c99c
commit
0fd63bebae
|
|
@ -0,0 +1,135 @@
|
|||
package com.ruoyi.busi.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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 com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.busi.domain.BusiProductOperate;
|
||||
import com.ruoyi.busi.service.IBusiProductOperateService;
|
||||
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 2022-01-08
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/busi/productOperate")
|
||||
public class BusiProductOperateController extends BaseController {
|
||||
private String prefix = "busi/productOperate";
|
||||
|
||||
@Autowired
|
||||
private IBusiProductOperateService busiProductOperateService;
|
||||
|
||||
@RequiresPermissions("busi:productOperate:view")
|
||||
@GetMapping()
|
||||
public String productOperate() {
|
||||
return prefix + "/productOperate";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成品操作流水列表
|
||||
*/
|
||||
@RequiresPermissions("busi:productOperate:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(BusiProductOperate busiProductOperate) {
|
||||
startPage();
|
||||
List<BusiProductOperate> list = busiProductOperateService.selectBusiProductOperateList(busiProductOperate);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出成品操作流水列表
|
||||
*/
|
||||
@RequiresPermissions("busi:productOperate:export")
|
||||
@Log(title = "成品操作流水", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BusiProductOperate busiProductOperate) {
|
||||
List<BusiProductOperate> list = busiProductOperateService.selectBusiProductOperateList(busiProductOperate);
|
||||
ExcelUtil<BusiProductOperate> util = new ExcelUtil<BusiProductOperate>(BusiProductOperate.class);
|
||||
return util.exportExcel(list, "成品操作流水数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成品操作流水
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add() {
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存成品操作流水
|
||||
*/
|
||||
@RequiresPermissions("busi:productOperate:add")
|
||||
@Log(title = "成品操作流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(BusiProductOperate busiProductOperate) {
|
||||
return toAjax(busiProductOperateService.insertBusiProductOperate(busiProductOperate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成品操作流水
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") String id, ModelMap mmap) {
|
||||
BusiProductOperate busiProductOperate = busiProductOperateService.selectBusiProductOperateById(id);
|
||||
mmap.put("busiProductOperate", busiProductOperate);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存成品操作流水
|
||||
*/
|
||||
@RequiresPermissions("busi:productOperate:edit")
|
||||
@Log(title = "成品操作流水", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BusiProductOperate busiProductOperate) {
|
||||
return toAjax(busiProductOperateService.updateBusiProductOperate(busiProductOperate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成品操作流水
|
||||
*/
|
||||
@RequiresPermissions("busi:productOperate:remove")
|
||||
@Log(title = "成品操作流水", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids) {
|
||||
return toAjax(busiProductOperateService.deleteBusiProductOperateByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过产线ID查询产品任务尺码列表
|
||||
*/
|
||||
@PostMapping("/selProductSizeByLineId")
|
||||
@ResponseBody
|
||||
public AjaxResult selProductSizeByLineId(@RequestParam(name = "lineId", required = false) String lineId) {
|
||||
List<Map<String, String>> list = busiProductOperateService.selProductSizeByLineId(lineId);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过产线ID和产品尺码查询产品任务颜色列表
|
||||
*/
|
||||
@PostMapping("/selProductColorByLineIdAndSize")
|
||||
@ResponseBody
|
||||
public AjaxResult selProductColorByLineIdAndSize(@RequestParam Map<String, String> queryMap) {
|
||||
List<Map<String, String>> list = busiProductOperateService.selProductColorByLineIdAndSize(queryMap);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -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.BusiProductStock;
|
||||
import com.ruoyi.busi.service.IBusiProductStockService;
|
||||
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 2022-01-08
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/busi/productStock")
|
||||
public class BusiProductStockController extends BaseController
|
||||
{
|
||||
private String prefix = "busi/productStock";
|
||||
|
||||
@Autowired
|
||||
private IBusiProductStockService busiProductStockService;
|
||||
|
||||
@RequiresPermissions("busi:productStock:view")
|
||||
@GetMapping()
|
||||
public String productStock()
|
||||
{
|
||||
return prefix + "/productStock";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成品库存列表
|
||||
*/
|
||||
@RequiresPermissions("busi:productStock:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(BusiProductStock busiProductStock)
|
||||
{
|
||||
startPage();
|
||||
List<BusiProductStock> list = busiProductStockService.selectBusiProductStockList(busiProductStock);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出成品库存列表
|
||||
*/
|
||||
@RequiresPermissions("busi:productStock:export")
|
||||
@Log(title = "成品库存", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BusiProductStock busiProductStock)
|
||||
{
|
||||
List<BusiProductStock> list = busiProductStockService.selectBusiProductStockList(busiProductStock);
|
||||
ExcelUtil<BusiProductStock> util = new ExcelUtil<BusiProductStock>(BusiProductStock.class);
|
||||
return util.exportExcel(list, "成品库存数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成品库存
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存成品库存
|
||||
*/
|
||||
@RequiresPermissions("busi:productStock:add")
|
||||
@Log(title = "成品库存", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(BusiProductStock busiProductStock)
|
||||
{
|
||||
return toAjax(busiProductStockService.insertBusiProductStock(busiProductStock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成品库存
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") String id, ModelMap mmap)
|
||||
{
|
||||
BusiProductStock busiProductStock = busiProductStockService.selectBusiProductStockById(id);
|
||||
mmap.put("busiProductStock", busiProductStock);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存成品库存
|
||||
*/
|
||||
@RequiresPermissions("busi:productStock:edit")
|
||||
@Log(title = "成品库存", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BusiProductStock busiProductStock)
|
||||
{
|
||||
return toAjax(busiProductStockService.updateBusiProductStock(busiProductStock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成品库存
|
||||
*/
|
||||
@RequiresPermissions("busi:productStock:remove")
|
||||
@Log(title = "成品库存", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(busiProductStockService.deleteBusiProductStockByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
package com.ruoyi.busi.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
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_product_operate
|
||||
*
|
||||
* @author WangCL
|
||||
* @date 2022-01-08
|
||||
*/
|
||||
public class BusiProductOperate extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID主键 */
|
||||
private String id;
|
||||
|
||||
/** 成品库存 */
|
||||
@Excel(name = "成品库存")
|
||||
private String productStockId;
|
||||
|
||||
/** 任务 */
|
||||
@Excel(name = "任务")
|
||||
private String taskId;
|
||||
|
||||
|
||||
private String orderId;
|
||||
|
||||
/** 操作数量 */
|
||||
@Excel(name = "操作数量")
|
||||
private Long amount;
|
||||
|
||||
/** 价值 */
|
||||
@Excel(name = "价值")
|
||||
private BigDecimal productValue;
|
||||
|
||||
/** 每包数量 */
|
||||
private Long amountPerPackage;
|
||||
|
||||
/** 操作类型 */
|
||||
@Excel(name = "操作类型")
|
||||
private String oprateType;
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setProductStockId(String productStockId)
|
||||
{
|
||||
this.productStockId = productStockId;
|
||||
}
|
||||
|
||||
public String getProductStockId()
|
||||
{
|
||||
return productStockId;
|
||||
}
|
||||
public void setTaskId(String taskId)
|
||||
{
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskId()
|
||||
{
|
||||
return taskId;
|
||||
}
|
||||
public void setAmount(Long amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Long getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setProductValue(BigDecimal productValue)
|
||||
{
|
||||
this.productValue = productValue;
|
||||
}
|
||||
|
||||
public BigDecimal getProductValue()
|
||||
{
|
||||
return productValue;
|
||||
}
|
||||
public void setAmountPerPackage(Long amountPerPackage)
|
||||
{
|
||||
this.amountPerPackage = amountPerPackage;
|
||||
}
|
||||
|
||||
public Long getAmountPerPackage()
|
||||
{
|
||||
return amountPerPackage;
|
||||
}
|
||||
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("productStockId", getProductStockId())
|
||||
.append("taskId", getTaskId())
|
||||
.append("amount", getAmount())
|
||||
.append("productValue", getProductValue())
|
||||
.append("amountPerPackage", getAmountPerPackage())
|
||||
.append("oprateType", getOprateType())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
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_product_stock
|
||||
*
|
||||
* @author WangCL
|
||||
* @date 2022-01-08
|
||||
*/
|
||||
public class BusiProductStock extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID主键 */
|
||||
private String id;
|
||||
|
||||
/** 订单 */
|
||||
@Excel(name = "订单")
|
||||
private String orderId;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Long amount;
|
||||
|
||||
/** 尺码 */
|
||||
@Excel(name = "尺码")
|
||||
private String size;
|
||||
|
||||
/** 颜色 */
|
||||
@Excel(name = "颜色")
|
||||
private String color;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderId(String orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setAmount(Long amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Long getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setSize(String size)
|
||||
{
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public String getSize()
|
||||
{
|
||||
return size;
|
||||
}
|
||||
public void setColor(String color)
|
||||
{
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public String getColor()
|
||||
{
|
||||
return color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("amount", getAmount())
|
||||
.append("size", getSize())
|
||||
.append("color", getColor())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.busi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.busi.domain.BusiProductOperate;
|
||||
|
||||
/**
|
||||
* 成品操作流水Mapper接口
|
||||
*
|
||||
* @author WangCL
|
||||
* @date 2022-01-08
|
||||
*/
|
||||
public interface BusiProductOperateMapper
|
||||
{
|
||||
/**
|
||||
* 查询成品操作流水
|
||||
*
|
||||
* @param id 成品操作流水主键
|
||||
* @return 成品操作流水
|
||||
*/
|
||||
public BusiProductOperate selectBusiProductOperateById(String id);
|
||||
|
||||
/**
|
||||
* 查询成品操作流水列表
|
||||
*
|
||||
* @param busiProductOperate 成品操作流水
|
||||
* @return 成品操作流水集合
|
||||
*/
|
||||
public List<BusiProductOperate> selectBusiProductOperateList(BusiProductOperate busiProductOperate);
|
||||
|
||||
/**
|
||||
* 新增成品操作流水
|
||||
*
|
||||
* @param busiProductOperate 成品操作流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBusiProductOperate(BusiProductOperate busiProductOperate);
|
||||
|
||||
/**
|
||||
* 修改成品操作流水
|
||||
*
|
||||
* @param busiProductOperate 成品操作流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBusiProductOperate(BusiProductOperate busiProductOperate);
|
||||
|
||||
/**
|
||||
* 删除成品操作流水
|
||||
*
|
||||
* @param id 成品操作流水主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusiProductOperateById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除成品操作流水
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusiProductOperateByIds(String[] ids);
|
||||
|
||||
public List<Map<String, String>> selProductSizeByLineId(String lineId);
|
||||
|
||||
public List<Map<String, String>> selProductColorByLineIdAndSize(Map<String, String> map);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.busi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.busi.domain.BusiProductStock;
|
||||
|
||||
/**
|
||||
* 成品库存Mapper接口
|
||||
*
|
||||
* @author WangCL
|
||||
* @date 2022-01-08
|
||||
*/
|
||||
public interface BusiProductStockMapper
|
||||
{
|
||||
/**
|
||||
* 查询成品库存
|
||||
*
|
||||
* @param id 成品库存主键
|
||||
* @return 成品库存
|
||||
*/
|
||||
public BusiProductStock selectBusiProductStockById(String id);
|
||||
|
||||
/**
|
||||
* 查询成品库存列表
|
||||
*
|
||||
* @param busiProductStock 成品库存
|
||||
* @return 成品库存集合
|
||||
*/
|
||||
public List<BusiProductStock> selectBusiProductStockList(BusiProductStock busiProductStock);
|
||||
|
||||
/**
|
||||
* 新增成品库存
|
||||
*
|
||||
* @param busiProductStock 成品库存
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBusiProductStock(BusiProductStock busiProductStock);
|
||||
|
||||
/**
|
||||
* 修改成品库存
|
||||
*
|
||||
* @param busiProductStock 成品库存
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBusiProductStock(BusiProductStock busiProductStock);
|
||||
|
||||
/**
|
||||
* 删除成品库存
|
||||
*
|
||||
* @param id 成品库存主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusiProductStockById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除成品库存
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusiProductStockByIds(String[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.ruoyi.busi.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.busi.domain.BusiProductOperate;
|
||||
|
||||
/**
|
||||
* 成品操作流水Service接口
|
||||
*
|
||||
* @author WangCL
|
||||
* @date 2022-01-08
|
||||
*/
|
||||
public interface IBusiProductOperateService
|
||||
{
|
||||
/**
|
||||
* 查询成品操作流水
|
||||
*
|
||||
* @param id 成品操作流水主键
|
||||
* @return 成品操作流水
|
||||
*/
|
||||
public BusiProductOperate selectBusiProductOperateById(String id);
|
||||
|
||||
/**
|
||||
* 查询成品操作流水列表
|
||||
*
|
||||
* @param busiProductOperate 成品操作流水
|
||||
* @return 成品操作流水集合
|
||||
*/
|
||||
public List<BusiProductOperate> selectBusiProductOperateList(BusiProductOperate busiProductOperate);
|
||||
|
||||
/**
|
||||
* 新增成品操作流水
|
||||
*
|
||||
* @param busiProductOperate 成品操作流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBusiProductOperate(BusiProductOperate busiProductOperate);
|
||||
|
||||
/**
|
||||
* 修改成品操作流水
|
||||
*
|
||||
* @param busiProductOperate 成品操作流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBusiProductOperate(BusiProductOperate busiProductOperate);
|
||||
|
||||
/**
|
||||
* 批量删除成品操作流水
|
||||
*
|
||||
* @param ids 需要删除的成品操作流水主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusiProductOperateByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除成品操作流水信息
|
||||
*
|
||||
* @param id 成品操作流水主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusiProductOperateById(String id);
|
||||
|
||||
public List<Map<String, String>> selProductSizeByLineId(String lineId);
|
||||
|
||||
public List<Map<String, String>> selProductColorByLineIdAndSize(Map<String, String> map);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.busi.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.busi.domain.BusiProductStock;
|
||||
|
||||
/**
|
||||
* 成品库存Service接口
|
||||
*
|
||||
* @author WangCL
|
||||
* @date 2022-01-08
|
||||
*/
|
||||
public interface IBusiProductStockService
|
||||
{
|
||||
/**
|
||||
* 查询成品库存
|
||||
*
|
||||
* @param id 成品库存主键
|
||||
* @return 成品库存
|
||||
*/
|
||||
public BusiProductStock selectBusiProductStockById(String id);
|
||||
|
||||
/**
|
||||
* 查询成品库存列表
|
||||
*
|
||||
* @param busiProductStock 成品库存
|
||||
* @return 成品库存集合
|
||||
*/
|
||||
public List<BusiProductStock> selectBusiProductStockList(BusiProductStock busiProductStock);
|
||||
|
||||
/**
|
||||
* 新增成品库存
|
||||
*
|
||||
* @param busiProductStock 成品库存
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBusiProductStock(BusiProductStock busiProductStock);
|
||||
|
||||
/**
|
||||
* 修改成品库存
|
||||
*
|
||||
* @param busiProductStock 成品库存
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBusiProductStock(BusiProductStock busiProductStock);
|
||||
|
||||
/**
|
||||
* 批量删除成品库存
|
||||
*
|
||||
* @param ids 需要删除的成品库存主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusiProductStockByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除成品库存信息
|
||||
*
|
||||
* @param id 成品库存主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusiProductStockById(String id);
|
||||
}
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
package com.ruoyi.busi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.busi.mapper.BusiProductOperateMapper;
|
||||
import com.ruoyi.busi.domain.BusiProductOperate;
|
||||
import com.ruoyi.busi.service.IBusiProductOperateService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 成品操作流水Service业务层处理
|
||||
*
|
||||
* @author WangCL
|
||||
* @date 2022-01-08
|
||||
*/
|
||||
@Service
|
||||
public class BusiProductOperateServiceImpl implements IBusiProductOperateService
|
||||
{
|
||||
@Autowired
|
||||
private BusiProductOperateMapper busiProductOperateMapper;
|
||||
|
||||
/**
|
||||
* 查询成品操作流水
|
||||
*
|
||||
* @param id 成品操作流水主键
|
||||
* @return 成品操作流水
|
||||
*/
|
||||
@Override
|
||||
public BusiProductOperate selectBusiProductOperateById(String id)
|
||||
{
|
||||
return busiProductOperateMapper.selectBusiProductOperateById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成品操作流水列表
|
||||
*
|
||||
* @param busiProductOperate 成品操作流水
|
||||
* @return 成品操作流水
|
||||
*/
|
||||
@Override
|
||||
public List<BusiProductOperate> selectBusiProductOperateList(BusiProductOperate busiProductOperate)
|
||||
{
|
||||
return busiProductOperateMapper.selectBusiProductOperateList(busiProductOperate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成品操作流水
|
||||
*
|
||||
* @param busiProductOperate 成品操作流水
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBusiProductOperate(BusiProductOperate busiProductOperate)
|
||||
{
|
||||
busiProductOperate.setCreateTime(DateUtils.getNowDate());
|
||||
|
||||
|
||||
return busiProductOperateMapper.insertBusiProductOperate(busiProductOperate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成品操作流水
|
||||
*
|
||||
* @param busiProductOperate 成品操作流水
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBusiProductOperate(BusiProductOperate busiProductOperate)
|
||||
{
|
||||
return busiProductOperateMapper.updateBusiProductOperate(busiProductOperate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除成品操作流水
|
||||
*
|
||||
* @param ids 需要删除的成品操作流水主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBusiProductOperateByIds(String ids)
|
||||
{
|
||||
return busiProductOperateMapper.deleteBusiProductOperateByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成品操作流水信息
|
||||
*
|
||||
* @param id 成品操作流水主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBusiProductOperateById(String id)
|
||||
{
|
||||
return busiProductOperateMapper.deleteBusiProductOperateById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, String>> selProductSizeByLineId(String lineId) {
|
||||
return busiProductOperateMapper.selProductSizeByLineId(lineId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, String>> selProductColorByLineIdAndSize(Map<String, String> map) {
|
||||
return busiProductOperateMapper.selProductColorByLineIdAndSize(map);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
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.BusiProductStockMapper;
|
||||
import com.ruoyi.busi.domain.BusiProductStock;
|
||||
import com.ruoyi.busi.service.IBusiProductStockService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 成品库存Service业务层处理
|
||||
*
|
||||
* @author WangCL
|
||||
* @date 2022-01-08
|
||||
*/
|
||||
@Service
|
||||
public class BusiProductStockServiceImpl implements IBusiProductStockService
|
||||
{
|
||||
@Autowired
|
||||
private BusiProductStockMapper busiProductStockMapper;
|
||||
|
||||
/**
|
||||
* 查询成品库存
|
||||
*
|
||||
* @param id 成品库存主键
|
||||
* @return 成品库存
|
||||
*/
|
||||
@Override
|
||||
public BusiProductStock selectBusiProductStockById(String id)
|
||||
{
|
||||
return busiProductStockMapper.selectBusiProductStockById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成品库存列表
|
||||
*
|
||||
* @param busiProductStock 成品库存
|
||||
* @return 成品库存
|
||||
*/
|
||||
@Override
|
||||
public List<BusiProductStock> selectBusiProductStockList(BusiProductStock busiProductStock)
|
||||
{
|
||||
return busiProductStockMapper.selectBusiProductStockList(busiProductStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成品库存
|
||||
*
|
||||
* @param busiProductStock 成品库存
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBusiProductStock(BusiProductStock busiProductStock)
|
||||
{
|
||||
busiProductStock.setCreateTime(DateUtils.getNowDate());
|
||||
return busiProductStockMapper.insertBusiProductStock(busiProductStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成品库存
|
||||
*
|
||||
* @param busiProductStock 成品库存
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBusiProductStock(BusiProductStock busiProductStock)
|
||||
{
|
||||
busiProductStock.setUpdateTime(DateUtils.getNowDate());
|
||||
return busiProductStockMapper.updateBusiProductStock(busiProductStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除成品库存
|
||||
*
|
||||
* @param ids 需要删除的成品库存主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBusiProductStockByIds(String ids)
|
||||
{
|
||||
return busiProductStockMapper.deleteBusiProductStockByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成品库存信息
|
||||
*
|
||||
* @param id 成品库存主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBusiProductStockById(String id)
|
||||
{
|
||||
return busiProductStockMapper.deleteBusiProductStockById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
<?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.BusiProductOperateMapper">
|
||||
|
||||
<resultMap type="BusiProductOperate" id="BusiProductOperateResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="productStockId" column="product_stock_id" />
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="productValue" column="product_value" />
|
||||
<result property="amountPerPackage" column="amount_per_package" />
|
||||
<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="selectBusiProductOperateVo">
|
||||
select id, product_stock_id, task_id, amount, product_value, amount_per_package, oprate_type, create_by, create_time, remark from busi_product_operate
|
||||
</sql>
|
||||
|
||||
<select id="selectBusiProductOperateList" parameterType="BusiProductOperate" resultMap="BusiProductOperateResult">
|
||||
<include refid="selectBusiProductOperateVo"/>
|
||||
<where>
|
||||
<if test="productStockId != null and productStockId != ''"> and product_stock_id = #{productStockId}</if>
|
||||
<if test="taskId != null and taskId != ''"> and task_id = #{taskId}</if>
|
||||
<if test="oprateType != null and oprateType != ''"> and oprate_type = #{oprateType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBusiProductOperateById" parameterType="String" resultMap="BusiProductOperateResult">
|
||||
<include refid="selectBusiProductOperateVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBusiProductOperate" parameterType="BusiProductOperate" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into busi_product_operate
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productStockId != null and productStockId != ''">product_stock_id,</if>
|
||||
<if test="taskId != null">task_id,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="productValue != null">product_value,</if>
|
||||
<if test="amountPerPackage != null">amount_per_package,</if>
|
||||
<if test="oprateType != null and oprateType != ''">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="productStockId != null and productStockId != ''">#{productStockId},</if>
|
||||
<if test="taskId != null">#{taskId},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="productValue != null">#{productValue},</if>
|
||||
<if test="amountPerPackage != null">#{amountPerPackage},</if>
|
||||
<if test="oprateType != null and oprateType != ''">#{oprateType},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBusiProductOperate" parameterType="BusiProductOperate">
|
||||
update busi_product_operate
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productStockId != null and productStockId != ''">product_stock_id = #{productStockId},</if>
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="productValue != null">product_value = #{productValue},</if>
|
||||
<if test="amountPerPackage != null">amount_per_package = #{amountPerPackage},</if>
|
||||
<if test="oprateType != null and oprateType != ''">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="deleteBusiProductOperateById" parameterType="String">
|
||||
delete from busi_product_operate where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBusiProductOperateByIds" parameterType="String">
|
||||
delete from busi_product_operate where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selProductSizeByLineId" parameterType="String" resultType="java.util.Map">
|
||||
SELECT bpr.size from busi_sub_task bst
|
||||
left JOIN busi_product_require bpr on bst.product_require_id = bpr.id
|
||||
left JOIN busi_task bt on bt.id = bst.task_id
|
||||
WHERE bt.prison_line_id = #{lineId} and bt.`status`=1
|
||||
</select>
|
||||
|
||||
<select id="selProductColorByLineIdAndSize" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT bpr.color,bpr.amount,bst.completed_amount completedAmount,bst.target_amount targetAmount,bt.order_id orderId,bst.id subTaskId,bst.task_id taskId from busi_sub_task bst
|
||||
left JOIN busi_product_require bpr on bst.product_require_id = bpr.id
|
||||
left JOIN busi_task bt on bt.id = bst.task_id
|
||||
WHERE bt.prison_line_id = #{lineId} and bt.`status`=1 and bpr.size = #{size}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<?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.BusiProductStockMapper">
|
||||
|
||||
<resultMap type="BusiProductStock" id="BusiProductStockResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="size" column="size" />
|
||||
<result property="color" column="color" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBusiProductStockVo">
|
||||
select id, order_id, amount, size, color, create_by, create_time, update_by, update_time from busi_product_stock
|
||||
</sql>
|
||||
|
||||
<select id="selectBusiProductStockList" parameterType="BusiProductStock" resultMap="BusiProductStockResult">
|
||||
<include refid="selectBusiProductStockVo"/>
|
||||
<where>
|
||||
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||||
<if test="size != null and size != ''"> and size = #{size}</if>
|
||||
<if test="color != null and color != ''"> and color = #{color}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBusiProductStockById" parameterType="String" resultMap="BusiProductStockResult">
|
||||
<include refid="selectBusiProductStockVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBusiProductStock" parameterType="BusiProductStock" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into busi_product_stock
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null and orderId != ''">order_id,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="size != null and size != ''">size,</if>
|
||||
<if test="color != null and color != ''">color,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null and orderId != ''">#{orderId},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="size != null and size != ''">#{size},</if>
|
||||
<if test="color != null and color != ''">#{color},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBusiProductStock" parameterType="BusiProductStock">
|
||||
update busi_product_stock
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null and orderId != ''">order_id = #{orderId},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="size != null and size != ''">size = #{size},</if>
|
||||
<if test="color != null and color != ''">color = #{color},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBusiProductStockById" parameterType="String">
|
||||
delete from busi_product_stock where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBusiProductStockByIds" parameterType="String">
|
||||
delete from busi_product_stock where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
<!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-productOperate-add">
|
||||
<input type="hidden" name="oprateType" value="1" />
|
||||
<input id="taskId" type="hidden" name="taskId" />
|
||||
<input id="orderId" type="hidden" name="orderId"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">产线:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="lineTreeId" name="prisonLineId" type="hidden" />
|
||||
<input class="form-control" type="text" onclick="selectPrisonLineTree()" id="lineTreeName" readonly="true" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label" title="产品选择源于任务,若无对应的选项,请在任务中添加">产品选择:<i class="fa fa-question-circle-o"></i></label>
|
||||
<div class="col-sm-4">
|
||||
<select id="size" name="size" class="form-control required" >
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<select id="color" name="color" class="form-control required" >
|
||||
</select>
|
||||
</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 digits" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group"> -->
|
||||
<!-- <label class="col-sm-3 control-label">价值:</label>-->
|
||||
<!-- <div class="col-sm-8">-->
|
||||
<!-- <input name="productValue" class="form-control" type="text">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">每包数量:</label>
|
||||
<div class="col-sm-6">
|
||||
<input name="amountPerPackage" class="form-control digits" type="text">
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<a class="btn btn-info" >生成二维码</a>
|
||||
</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/productOperate"
|
||||
var sizeDatas = [[${@dict.getType('busi_size')}]];
|
||||
var colorDatas = [[${@dict.getType('busi_color')}]];
|
||||
$("#form-productOperate-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-productOperate-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("#size").change(function(){
|
||||
var lineId = $("#lineTreeId").val();
|
||||
var size = $("#size").val();
|
||||
queryColorList(lineId, size);
|
||||
})
|
||||
|
||||
$("#color").change(function(){
|
||||
var orderId = $("#color :selected").attr("orderId");
|
||||
var taskId = $("#color :selected").attr("taskId");
|
||||
$("#orderId").val(orderId);
|
||||
$("#taskId").val(taskId);
|
||||
})
|
||||
/*监区产线-新增-选择父监区产线树*/
|
||||
function selectPrisonLineTree() {
|
||||
var options = {
|
||||
title: '产线选择',
|
||||
width: "380",
|
||||
url: ctx + "busi/prisonLine/selectPrisonLineTree/" + $("#lineTreeId").val()+"?status=1",
|
||||
callBack: function(index, layer){
|
||||
var body = $.modal.getChildFrame(index);
|
||||
console.log(body);
|
||||
$("#lineTreeId").val(body.find('#treeId').val());
|
||||
$("#lineTreeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
querySizeList(body.find('#treeId').val());
|
||||
}
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
/*产品任务尺码查询*/
|
||||
function querySizeList(lineId) {
|
||||
var url = prefix + "/selProductSizeByLineId?lineId=" + lineId;
|
||||
$.operate.ajaxPost(url, {}, function (result) {
|
||||
var data = result.data;
|
||||
$("#color").empty();
|
||||
$("#size").empty().append("<option value=''>请选择尺码</option>");
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var val = data[i].size;
|
||||
var text = $.table.getDictText(sizeDatas, val);
|
||||
$("#size").append("<option value='" + val + "'>" + text + "</option>");
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/*产品任务颜色查询*/
|
||||
function queryColorList(lineId, size) {
|
||||
var url = prefix + "/selProductColorByLineIdAndSize";
|
||||
$.operate.ajaxPost(url, {
|
||||
lineId:lineId,
|
||||
size:size
|
||||
}, function (result) {
|
||||
var data = result.data;
|
||||
$("#color").empty().append("<option value=''>请选择颜色</option>");
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var val = data[i].color;
|
||||
var text = $.table.getDictText(colorDatas, val);
|
||||
var orderId = data[i].orderId;
|
||||
var taskId = data[i].taskId;
|
||||
$("#color").append("<option orderId='" + orderId + "' taskId='" + taskId + "' 'value='" + val + "'>" + text + "</option>");
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<!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-productOperate-edit" th:object="${busiProductOperate}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">成品库存:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="productStockId" th:field="*{productStockId}" 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">
|
||||
<input name="taskId" th:field="*{taskId}" 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="amount" th:field="*{amount}" 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="productValue" th:field="*{productValue}" 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="amountPerPackage" th:field="*{amountPerPackage}" 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">
|
||||
<select name="oprateType" class="form-control m-b" required>
|
||||
<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/productOperate";
|
||||
$("#form-productOperate-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-productOperate-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<!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="productStockId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>任务:</label>
|
||||
<input type="text" name="taskId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>操作类型:</label>
|
||||
<select name="oprateType">
|
||||
<option value="">所有</option>
|
||||
<option value="-1">代码生成请选择字典属性</option>
|
||||
</select>
|
||||
</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:productOperate:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="busi:productOperate:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="busi:productOperate:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="busi:productOperate: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:productOperate:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('busi:productOperate:remove')}]];
|
||||
var prefix = ctx + "busi/productOperate";
|
||||
|
||||
$(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: 'productStockId',
|
||||
title: '成品库存'
|
||||
},
|
||||
{
|
||||
field: 'taskId',
|
||||
title: '任务'
|
||||
},
|
||||
{
|
||||
field: 'amount',
|
||||
title: '操作数量'
|
||||
},
|
||||
{
|
||||
field: 'productValue',
|
||||
title: '价值'
|
||||
},
|
||||
{
|
||||
field: 'oprateType',
|
||||
title: '操作类型'
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
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>
|
||||
|
|
@ -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-productStock-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">订单:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderId" 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">
|
||||
<input name="amount" 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">
|
||||
<select name="size" class="form-control m-b" th:with="type=${@dict.getType('busi_size')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">颜色:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="color" class="form-control m-b" th:with="type=${@dict.getType('busi_color')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "busi/productStock"
|
||||
$("#form-productStock-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-productStock-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<!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-productStock-edit" th:object="${busiProductStock}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">订单:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderId" th:field="*{orderId}" 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">
|
||||
<input name="amount" th:field="*{amount}" 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">
|
||||
<select name="size" class="form-control m-b" th:with="type=${@dict.getType('busi_size')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{size}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">颜色:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="color" class="form-control m-b" th:with="type=${@dict.getType('busi_color')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{color}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "busi/productStock";
|
||||
$("#form-productStock-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-productStock-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
<!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="orderId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>尺码:</label>
|
||||
<select name="size" th:with="type=${@dict.getType('busi_size')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>颜色:</label>
|
||||
<select name="color" th:with="type=${@dict.getType('busi_color')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</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:productStock:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="busi:productStock:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="busi:productStock:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="busi:productStock: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:productStock:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('busi:productStock:remove')}]];
|
||||
var sizeDatas = [[${@dict.getType('busi_size')}]];
|
||||
var colorDatas = [[${@dict.getType('busi_color')}]];
|
||||
var prefix = ctx + "busi/productStock";
|
||||
|
||||
$(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: 'orderId',
|
||||
title: '订单'
|
||||
},
|
||||
{
|
||||
field: 'amount',
|
||||
title: '数量'
|
||||
},
|
||||
{
|
||||
field: 'size',
|
||||
title: '尺码',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(sizeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'color',
|
||||
title: '颜色',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(colorDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
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>
|
||||
Loading…
Reference in New Issue