liuxiaoxu
1 month ago
9 changed files with 0 additions and 1134 deletions
@ -1,126 +0,0 @@ |
|||
package com.ruoyi.storehouse.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.storehouse.domain.WarehousingSearch; |
|||
import com.ruoyi.storehouse.service.IWarehousingSearchService; |
|||
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 2023-05-16 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/storehouse/warehousingSearch") |
|||
public class WarehousingSearchController extends BaseController |
|||
{ |
|||
private String prefix = "storehouse/warehousingSearch"; |
|||
|
|||
@Autowired |
|||
private IWarehousingSearchService warehousingSearchService; |
|||
|
|||
@RequiresPermissions("storehouse:warehousingSearch:view") |
|||
@GetMapping() |
|||
public String warehousingSearch() |
|||
{ |
|||
return prefix + "/warehousingSearch"; |
|||
} |
|||
|
|||
/** |
|||
* 查询库存列表 |
|||
*/ |
|||
@RequiresPermissions("storehouse:warehousingSearch:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(WarehousingSearch warehousingSearch) |
|||
{ |
|||
startPage(); |
|||
List<WarehousingSearch> list = warehousingSearchService.selectWarehousingSearchList(warehousingSearch); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出库存列表 |
|||
*/ |
|||
@RequiresPermissions("storehouse:warehousingSearch:export") |
|||
@Log(title = "库存", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(WarehousingSearch warehousingSearch) |
|||
{ |
|||
List<WarehousingSearch> list = warehousingSearchService.selectWarehousingSearchList(warehousingSearch); |
|||
ExcelUtil<WarehousingSearch> util = new ExcelUtil<WarehousingSearch>(WarehousingSearch.class); |
|||
return util.exportExcel(list, "库存数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增库存 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存库存 |
|||
*/ |
|||
@RequiresPermissions("storehouse:warehousingSearch:add") |
|||
@Log(title = "库存", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(WarehousingSearch warehousingSearch) |
|||
{ |
|||
return toAjax(warehousingSearchService.insertWarehousingSearch(warehousingSearch)); |
|||
} |
|||
|
|||
/** |
|||
* 修改库存 |
|||
*/ |
|||
@GetMapping("/edit/{materialCode}") |
|||
public String edit(@PathVariable("materialCode") String materialCode, ModelMap mmap) |
|||
{ |
|||
WarehousingSearch warehousingSearch = warehousingSearchService.selectWarehousingSearchById(materialCode); |
|||
mmap.put("warehousingSearch", warehousingSearch); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存库存 |
|||
*/ |
|||
@RequiresPermissions("storehouse:warehousingSearch:edit") |
|||
@Log(title = "库存", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(WarehousingSearch warehousingSearch) |
|||
{ |
|||
return toAjax(warehousingSearchService.updateWarehousingSearch(warehousingSearch)); |
|||
} |
|||
|
|||
/** |
|||
* 删除库存 |
|||
*/ |
|||
@RequiresPermissions("storehouse:warehousingSearch:remove") |
|||
@Log(title = "库存", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(warehousingSearchService.deleteWarehousingSearchByIds(ids)); |
|||
} |
|||
} |
@ -1,206 +0,0 @@ |
|||
package com.ruoyi.storehouse.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; |
|||
|
|||
/** |
|||
* 库存对象 warehousing_search |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-05-16 |
|||
*/ |
|||
public class WarehousingSearch extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 物料代码 */ |
|||
@Excel(name = "物料代码") |
|||
private String materialCode; |
|||
|
|||
/** 物料名称 */ |
|||
@Excel(name = "物料名称") |
|||
private String materialName; |
|||
|
|||
/** 物料类型 */ |
|||
@Excel(name = "物料类型") |
|||
private String materialType; |
|||
|
|||
/** 批号 */ |
|||
@Excel(name = "批号") |
|||
private String batchNumber; |
|||
|
|||
/** 规格型号 */ |
|||
@Excel(name = "规格型号") |
|||
private String specificationModel; |
|||
|
|||
/** 机种 */ |
|||
@Excel(name = "机种") |
|||
private String typeMachine; |
|||
|
|||
/** 单位 */ |
|||
@Excel(name = "单位") |
|||
private String inventoryUnit; |
|||
|
|||
/** 库存数量 */ |
|||
@Excel(name = "库存数量") |
|||
private String stockQuantity; |
|||
|
|||
/** 仓库号 */ |
|||
@Excel(name = "仓库号") |
|||
private String stockNumber; |
|||
|
|||
/** 仓库名称 */ |
|||
@Excel(name = "仓库名称") |
|||
private String stockName; |
|||
|
|||
/** 客户编号 */ |
|||
@Excel(name = "客户编号") |
|||
private String enterpriseCode; |
|||
|
|||
/** 客户名称 */ |
|||
@Excel(name = "客户名称") |
|||
private String enterpriseName; |
|||
|
|||
/** 存放地址 */ |
|||
@Excel(name = "存放地址") |
|||
private String storageLocation; |
|||
|
|||
public void setMaterialCode(String materialCode) |
|||
{ |
|||
this.materialCode = materialCode; |
|||
} |
|||
|
|||
public String getMaterialCode() |
|||
{ |
|||
return materialCode; |
|||
} |
|||
public void setMaterialName(String materialName) |
|||
{ |
|||
this.materialName = materialName; |
|||
} |
|||
|
|||
public String getMaterialName() |
|||
{ |
|||
return materialName; |
|||
} |
|||
public void setMaterialType(String materialType) |
|||
{ |
|||
this.materialType = materialType; |
|||
} |
|||
|
|||
public String getMaterialType() |
|||
{ |
|||
return materialType; |
|||
} |
|||
public void setBatchNumber(String batchNumber) |
|||
{ |
|||
this.batchNumber = batchNumber; |
|||
} |
|||
|
|||
public String getBatchNumber() |
|||
{ |
|||
return batchNumber; |
|||
} |
|||
public void setSpecificationModel(String specificationModel) |
|||
{ |
|||
this.specificationModel = specificationModel; |
|||
} |
|||
|
|||
public String getSpecificationModel() |
|||
{ |
|||
return specificationModel; |
|||
} |
|||
public void setTypeMachine(String typeMachine) |
|||
{ |
|||
this.typeMachine = typeMachine; |
|||
} |
|||
|
|||
public String getTypeMachine() |
|||
{ |
|||
return typeMachine; |
|||
} |
|||
public void setInventoryUnit(String inventoryUnit) |
|||
{ |
|||
this.inventoryUnit = inventoryUnit; |
|||
} |
|||
|
|||
public String getInventoryUnit() |
|||
{ |
|||
return inventoryUnit; |
|||
} |
|||
public void setStockQuantity(String stockQuantity) |
|||
{ |
|||
this.stockQuantity = stockQuantity; |
|||
} |
|||
|
|||
public String getStockQuantity() |
|||
{ |
|||
return stockQuantity; |
|||
} |
|||
public void setStockNumber(String stockNumber) |
|||
{ |
|||
this.stockNumber = stockNumber; |
|||
} |
|||
|
|||
public String getStockNumber() |
|||
{ |
|||
return stockNumber; |
|||
} |
|||
public void setStockName(String stockName) |
|||
{ |
|||
this.stockName = stockName; |
|||
} |
|||
|
|||
public String getStockName() |
|||
{ |
|||
return stockName; |
|||
} |
|||
public void setEnterpriseCode(String enterpriseCode) |
|||
{ |
|||
this.enterpriseCode = enterpriseCode; |
|||
} |
|||
|
|||
public String getEnterpriseCode() |
|||
{ |
|||
return enterpriseCode; |
|||
} |
|||
public void setEnterpriseName(String enterpriseName) |
|||
{ |
|||
this.enterpriseName = enterpriseName; |
|||
} |
|||
|
|||
public String getEnterpriseName() |
|||
{ |
|||
return enterpriseName; |
|||
} |
|||
public void setStorageLocation(String storageLocation) |
|||
{ |
|||
this.storageLocation = storageLocation; |
|||
} |
|||
|
|||
public String getStorageLocation() |
|||
{ |
|||
return storageLocation; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("materialCode", getMaterialCode()) |
|||
.append("materialName", getMaterialName()) |
|||
.append("materialType", getMaterialType()) |
|||
.append("batchNumber", getBatchNumber()) |
|||
.append("specificationModel", getSpecificationModel()) |
|||
.append("typeMachine", getTypeMachine()) |
|||
.append("inventoryUnit", getInventoryUnit()) |
|||
.append("stockQuantity", getStockQuantity()) |
|||
.append("stockNumber", getStockNumber()) |
|||
.append("stockName", getStockName()) |
|||
.append("enterpriseCode", getEnterpriseCode()) |
|||
.append("enterpriseName", getEnterpriseName()) |
|||
.append("storageLocation", getStorageLocation()) |
|||
.toString(); |
|||
} |
|||
} |
@ -1,61 +0,0 @@ |
|||
package com.ruoyi.storehouse.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.storehouse.domain.WarehousingSearch; |
|||
|
|||
/** |
|||
* 库存Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-05-16 |
|||
*/ |
|||
public interface WarehousingSearchMapper |
|||
{ |
|||
/** |
|||
* 查询库存 |
|||
* |
|||
* @param materialCode 库存ID |
|||
* @return 库存 |
|||
*/ |
|||
public WarehousingSearch selectWarehousingSearchById(String materialCode); |
|||
|
|||
/** |
|||
* 查询库存列表 |
|||
* |
|||
* @param warehousingSearch 库存 |
|||
* @return 库存集合 |
|||
*/ |
|||
public List<WarehousingSearch> selectWarehousingSearchList(WarehousingSearch warehousingSearch); |
|||
|
|||
/** |
|||
* 新增库存 |
|||
* |
|||
* @param warehousingSearch 库存 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertWarehousingSearch(WarehousingSearch warehousingSearch); |
|||
|
|||
/** |
|||
* 修改库存 |
|||
* |
|||
* @param warehousingSearch 库存 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateWarehousingSearch(WarehousingSearch warehousingSearch); |
|||
|
|||
/** |
|||
* 删除库存 |
|||
* |
|||
* @param materialCode 库存ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteWarehousingSearchById(String materialCode); |
|||
|
|||
/** |
|||
* 批量删除库存 |
|||
* |
|||
* @param materialCodes 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteWarehousingSearchByIds(String[] materialCodes); |
|||
} |
@ -1,61 +0,0 @@ |
|||
package com.ruoyi.storehouse.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.storehouse.domain.WarehousingSearch; |
|||
|
|||
/** |
|||
* 库存Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-05-16 |
|||
*/ |
|||
public interface IWarehousingSearchService |
|||
{ |
|||
/** |
|||
* 查询库存 |
|||
* |
|||
* @param materialCode 库存ID |
|||
* @return 库存 |
|||
*/ |
|||
public WarehousingSearch selectWarehousingSearchById(String materialCode); |
|||
|
|||
/** |
|||
* 查询库存列表 |
|||
* |
|||
* @param warehousingSearch 库存 |
|||
* @return 库存集合 |
|||
*/ |
|||
public List<WarehousingSearch> selectWarehousingSearchList(WarehousingSearch warehousingSearch); |
|||
|
|||
/** |
|||
* 新增库存 |
|||
* |
|||
* @param warehousingSearch 库存 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertWarehousingSearch(WarehousingSearch warehousingSearch); |
|||
|
|||
/** |
|||
* 修改库存 |
|||
* |
|||
* @param warehousingSearch 库存 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateWarehousingSearch(WarehousingSearch warehousingSearch); |
|||
|
|||
/** |
|||
* 批量删除库存 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteWarehousingSearchByIds(String ids); |
|||
|
|||
/** |
|||
* 删除库存信息 |
|||
* |
|||
* @param materialCode 库存ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteWarehousingSearchById(String materialCode); |
|||
} |
@ -1,94 +0,0 @@ |
|||
package com.ruoyi.storehouse.service.impl; |
|||
|
|||
import java.util.List; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.storehouse.mapper.WarehousingSearchMapper; |
|||
import com.ruoyi.storehouse.domain.WarehousingSearch; |
|||
import com.ruoyi.storehouse.service.IWarehousingSearchService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 库存Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-05-16 |
|||
*/ |
|||
@Service |
|||
public class WarehousingSearchServiceImpl implements IWarehousingSearchService |
|||
{ |
|||
@Autowired |
|||
private WarehousingSearchMapper warehousingSearchMapper; |
|||
|
|||
/** |
|||
* 查询库存 |
|||
* |
|||
* @param materialCode 库存ID |
|||
* @return 库存 |
|||
*/ |
|||
@Override |
|||
public WarehousingSearch selectWarehousingSearchById(String materialCode) |
|||
{ |
|||
return warehousingSearchMapper.selectWarehousingSearchById(materialCode); |
|||
} |
|||
|
|||
/** |
|||
* 查询库存列表 |
|||
* |
|||
* @param warehousingSearch 库存 |
|||
* @return 库存 |
|||
*/ |
|||
@Override |
|||
public List<WarehousingSearch> selectWarehousingSearchList(WarehousingSearch warehousingSearch) |
|||
{ |
|||
return warehousingSearchMapper.selectWarehousingSearchList(warehousingSearch); |
|||
} |
|||
|
|||
/** |
|||
* 新增库存 |
|||
* |
|||
* @param warehousingSearch 库存 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertWarehousingSearch(WarehousingSearch warehousingSearch) |
|||
{ |
|||
return warehousingSearchMapper.insertWarehousingSearch(warehousingSearch); |
|||
} |
|||
|
|||
/** |
|||
* 修改库存 |
|||
* |
|||
* @param warehousingSearch 库存 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateWarehousingSearch(WarehousingSearch warehousingSearch) |
|||
{ |
|||
return warehousingSearchMapper.updateWarehousingSearch(warehousingSearch); |
|||
} |
|||
|
|||
/** |
|||
* 删除库存对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteWarehousingSearchByIds(String ids) |
|||
{ |
|||
return warehousingSearchMapper.deleteWarehousingSearchByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除库存信息 |
|||
* |
|||
* @param materialCode 库存ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteWarehousingSearchById(String materialCode) |
|||
{ |
|||
return warehousingSearchMapper.deleteWarehousingSearchById(materialCode); |
|||
} |
|||
} |
@ -1,180 +0,0 @@ |
|||
<?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.storehouse.mapper.WarehousingSearchMapper"> |
|||
|
|||
<resultMap type="WarehousingSearch" id="WarehousingSearchResult"> |
|||
<result property="materialCode" column="material_code" /> |
|||
<result property="materialName" column="material_name" /> |
|||
<result property="materialType" column="material_type" /> |
|||
<result property="batchNumber" column="batch_number" /> |
|||
<result property="specificationModel" column="specification_model" /> |
|||
<result property="typeMachine" column="type_machine" /> |
|||
<result property="inventoryUnit" column="inventory_unit" /> |
|||
<result property="stockQuantity" column="stock_quantity" /> |
|||
<result property="stockNumber" column="stock_number" /> |
|||
<result property="stockName" column="stock_name" /> |
|||
<result property="enterpriseCode" column="enterprise_code" /> |
|||
<result property="enterpriseName" column="enterprise_name" /> |
|||
<result property="storageLocation" column="storage_location" /> |
|||
</resultMap> |
|||
|
|||
<!-- <sql id="selectWarehousingSearchVo">--> |
|||
<!-- select material_code, material_name, material_type, batch_number, specification_model, type_machine, inventory_unit, stock_quantity, stock_number, stock_name, enterprise_code, enterprise_name, storage_location from warehousing_search--> |
|||
<!-- </sql>--> |
|||
|
|||
<sql id="selectWarehousingSearchVo"> |
|||
SELECT |
|||
material_code, |
|||
material_name, |
|||
material_type, |
|||
batch_number, |
|||
specification_model, |
|||
type_machine, |
|||
inventory_unit, |
|||
sum( count ) AS stock_quantity, |
|||
stock_number, |
|||
stock_name, |
|||
enterprise_code, |
|||
enterprise_name, |
|||
storage_location |
|||
FROM |
|||
( |
|||
SELECT |
|||
warehousing_in_detail.material_code AS material_code, |
|||
warehousing_in_detail.material_name AS material_name, |
|||
warehousing_in_detail.material_type AS material_type, |
|||
warehousing_in_detail.batch_number AS batch_number, |
|||
warehousing_in_detail.specification_model AS specification_model, |
|||
warehousing_in_detail.type_machine AS type_machine, |
|||
warehousing_in_detail.inventory_unit AS inventory_unit, |
|||
SUM( warehousing_in_detail.warehousing_quantity ) AS `count`, |
|||
warehousing_in_info.stock_number AS stock_number, |
|||
warehousing_in_info.stock_name AS stock_name, |
|||
warehousing_in_info.enterprise_code AS enterprise_code, |
|||
warehousing_in_info.enterprise_name AS enterprise_name, |
|||
warehousing_in_detail.storage_location AS storage_location |
|||
FROM |
|||
warehousing_in_detail, |
|||
warehousing_in_info |
|||
WHERE |
|||
warehousing_in_detail.warehousing_number = warehousing_in_info.warehousing_number |
|||
GROUP BY |
|||
warehousing_in_detail.material_code,warehousing_in_detail.storage_location UNION ALL |
|||
SELECT |
|||
outbound_detail.material_code AS material_code, |
|||
outbound_detail.material_name AS material_name, |
|||
outbound_info.material_type AS material_type, |
|||
outbound_detail.batch_number AS batch_number, |
|||
outbound_detail.specification_model AS specification_model, |
|||
outbound_detail.type_machine AS type_machine, |
|||
outbound_detail.inventory_unit AS inventory_unit, |
|||
- SUM( outbound_detail.actual_count ) AS `count`, |
|||
outbound_info.stock_no AS stock_number, |
|||
outbound_info.stock_name AS stock_name, |
|||
outbound_info.enterprise_code AS enterprise_code, |
|||
outbound_info.enterprise_name AS enterprise_name, |
|||
outbound_detail.storage_location AS storage_location |
|||
FROM |
|||
outbound_detail, |
|||
outbound_info |
|||
WHERE |
|||
outbound_detail.outbound_no = outbound_info.outbound_no |
|||
GROUP BY |
|||
outbound_detail.material_code, outbound_detail.storage_location |
|||
) AS tabletemp |
|||
GROUP BY |
|||
material_code, storage_location |
|||
</sql> |
|||
|
|||
<select id="selectWarehousingSearchList" parameterType="WarehousingSearch" resultMap="WarehousingSearchResult"> |
|||
select * from (<include refid="selectWarehousingSearchVo"/>) as `temTable` |
|||
<where> |
|||
<if test="materialCode != null and materialCode != ''"> material_code like concat('%', #{materialCode}, '%')</if> |
|||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if> |
|||
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if> |
|||
<if test="batchNumber != null and batchNumber != ''"> and batch_number like concat('%', #{batchNumber}, '%')</if> |
|||
<if test="stockNumber != null and stockNumber != ''"> and stock_number like concat('%', #{stockNumber}, '%')</if> |
|||
<if test="stockName != null and stockName != ''"> and stock_name like concat('%', #{stockName}, '%')</if> |
|||
<if test="storageLocation != null and storageLocation != ''"> and storage_location like concat('%', #{storageLocation}, '%')</if> |
|||
<if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code = #{enterpriseCode}</if> |
|||
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if> |
|||
<choose> |
|||
<when test="stockQuantity != null and stockQuantity != '' and stockQuantity == 1">and stock_quantity > 0</when> |
|||
<when test="stockQuantity != null and stockQuantity != '' and stockQuantity == 0">and stock_quantity <= 0</when> |
|||
<otherwise></otherwise> |
|||
</choose> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectWarehousingSearchById" parameterType="String" resultMap="WarehousingSearchResult"> |
|||
<include refid="selectWarehousingSearchVo"/> |
|||
where material_code = #{materialCode} |
|||
</select> |
|||
|
|||
<insert id="insertWarehousingSearch" parameterType="WarehousingSearch"> |
|||
insert into warehousing_search |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="materialCode != null">material_code,</if> |
|||
<if test="materialName != null">material_name,</if> |
|||
<if test="materialType != null">material_type,</if> |
|||
<if test="batchNumber != null">batch_number,</if> |
|||
<if test="specificationModel != null">specification_model,</if> |
|||
<if test="typeMachine != null">type_machine,</if> |
|||
<if test="inventoryUnit != null">inventory_unit,</if> |
|||
<if test="stockQuantity != null">stock_quantity,</if> |
|||
<if test="stockNumber != null">stock_number,</if> |
|||
<if test="stockName != null">stock_name,</if> |
|||
<if test="enterpriseCode != null">enterprise_code,</if> |
|||
<if test="enterpriseName != null">enterprise_name,</if> |
|||
<if test="storageLocation != null">storage_location,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="materialCode != null">#{materialCode},</if> |
|||
<if test="materialName != null">#{materialName},</if> |
|||
<if test="materialType != null">#{materialType},</if> |
|||
<if test="batchNumber != null">#{batchNumber},</if> |
|||
<if test="specificationModel != null">#{specificationModel},</if> |
|||
<if test="typeMachine != null">#{typeMachine},</if> |
|||
<if test="inventoryUnit != null">#{inventoryUnit},</if> |
|||
<if test="stockQuantity != null">#{stockQuantity},</if> |
|||
<if test="stockNumber != null">#{stockNumber},</if> |
|||
<if test="stockName != null">#{stockName},</if> |
|||
<if test="enterpriseCode != null">#{enterpriseCode},</if> |
|||
<if test="enterpriseName != null">#{enterpriseName},</if> |
|||
<if test="storageLocation != null">#{storageLocation},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateWarehousingSearch" parameterType="WarehousingSearch"> |
|||
update warehousing_search |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="materialName != null">material_name = #{materialName},</if> |
|||
<if test="materialType != null">material_type = #{materialType},</if> |
|||
<if test="batchNumber != null">batch_number = #{batchNumber},</if> |
|||
<if test="specificationModel != null">specification_model = #{specificationModel},</if> |
|||
<if test="typeMachine != null">type_machine = #{typeMachine},</if> |
|||
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if> |
|||
<if test="stockQuantity != null">stock_quantity = #{stockQuantity},</if> |
|||
<if test="stockNumber != null">stock_number = #{stockNumber},</if> |
|||
<if test="stockName != null">stock_name = #{stockName},</if> |
|||
<if test="enterpriseCode != null">enterprise_code = #{enterpriseCode},</if> |
|||
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if> |
|||
<if test="storageLocation != null">storage_location = #{storageLocation},</if> |
|||
</trim> |
|||
where material_code = #{materialCode} |
|||
</update> |
|||
|
|||
<delete id="deleteWarehousingSearchById" parameterType="String"> |
|||
delete from warehousing_search where material_code = #{materialCode} |
|||
</delete> |
|||
|
|||
<delete id="deleteWarehousingSearchByIds" parameterType="String"> |
|||
delete from warehousing_search where material_code in |
|||
<foreach item="materialCode" collection="array" open="(" separator="," close=")"> |
|||
#{materialCode} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
</mapper> |
@ -1,105 +0,0 @@ |
|||
<!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-warehousingSearch-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料代码:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialCode" 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="materialName" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料类型:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="materialType" class="form-control m-b" th:with="type=${@dict.getType('ck_meterialt_type')}"> |
|||
<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">批号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="batchNumber" 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="specificationModel" 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="typeMachine" 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="inventoryUnit" 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="stockQuantity" 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="stockNumber" 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="stockName" 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="enterpriseCode" 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="enterpriseName" 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="storageLocation" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "storehouse/warehousingSearch" |
|||
$("#form-warehousingSearch-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-warehousingSearch-add').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,106 +0,0 @@ |
|||
<!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-warehousingSearch-edit" th:object="${warehousingSearch}"> |
|||
<input name="materialCode" th:field="*{materialCode}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料代码:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialCode" th:field="*{materialCode}" 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="materialName" th:field="*{materialName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料类型:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="materialType" class="form-control m-b" th:with="type=${@dict.getType('ck_meterialt_type')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{materialType}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">批号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="batchNumber" th:field="*{batchNumber}" 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="specificationModel" th:field="*{specificationModel}" 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="typeMachine" th:field="*{typeMachine}" 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="inventoryUnit" th:field="*{inventoryUnit}" 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="stockQuantity" th:field="*{stockQuantity}" 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="stockNumber" th:field="*{stockNumber}" 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="stockName" th:field="*{stockName}" 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="enterpriseCode" th:field="*{enterpriseCode}" 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="enterpriseName" th:field="*{enterpriseName}" 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="storageLocation" th:field="*{storageLocation}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "storehouse/warehousingSearch"; |
|||
$("#form-warehousingSearch-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-warehousingSearch-edit').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,195 +0,0 @@ |
|||
<!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="materialCode"/> |
|||
</li> |
|||
<li> |
|||
<label>物料名称:</label> |
|||
<input type="text" name="materialName"/> |
|||
</li> |
|||
<li> |
|||
<label>物料类型:</label> |
|||
<select name="materialType" th:with="type=${@dict.getType('ck_meterialt_type')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>批号:</label> |
|||
<input type="text" name="batchNumber"/> |
|||
</li> |
|||
<li> |
|||
<label>仓库号:</label> |
|||
<input type="text" name="stockNumber"/> |
|||
</li> |
|||
<li> |
|||
<label>仓库名称:</label> |
|||
<input type="text" name="stockName"/> |
|||
</li> |
|||
<li> |
|||
<label>客户编号:</label> |
|||
<input type="text" name="enterpriseCode"/> |
|||
</li> |
|||
<li> |
|||
<label>客户名称:</label> |
|||
<input type="text" name="enterpriseName"/> |
|||
</li> |
|||
<li> |
|||
<label>存放地址:</label> |
|||
<input type="text" name="storageLocation"/> |
|||
</li> |
|||
<li> |
|||
<label>库存大于0?:</label> |
|||
<select name="stockQuantity" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<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="storehouse:warehousingSearch:add">--> |
|||
<!-- <i class="fa fa-plus"></i> 添加--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="storehouse:warehousingSearch:edit">--> |
|||
<!-- <i class="fa fa-edit"></i> 修改--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="storehouse:warehousingSearch:remove">--> |
|||
<!-- <i class="fa fa-remove"></i> 删除--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="storehouse:warehousingSearch:export">--> |
|||
<!-- <i class="fa fa-download"></i> 导出--> |
|||
<!-- </a>--> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table" style="white-space: nowrap"></table> |
|||
<!-- <div>合计:<input type="text" name="total" id="total"/></div>--> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('storehouse:warehousingSearch:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('storehouse:warehousingSearch:remove')}]]; |
|||
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]]; |
|||
var prefix = ctx + "storehouse/warehousingSearch"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
exportUrl: prefix + "/export", |
|||
// sidePagination : "server", //分页方式:client客户端分页,server服务端分页(*) |
|||
// onLoadSuccess: function (data) { |
|||
// console.log(data) |
|||
// // var tableData = $("#bootstrap-table").bootstrapTable("getData") |
|||
// // console.log(tableData) |
|||
// let totalMoney = 0; |
|||
// for (let i=0;i<data.rows[i].length;i++) { |
|||
// totalMoney += data.rows[i].stockQuantity |
|||
// } |
|||
// console.log(totalMoney) |
|||
// $("#input[name='total']").val(totalMoney) |
|||
// }, |
|||
modalName: "库存", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'materialCode', |
|||
title: '物料代码' |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
title: '物料名称' |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'batchNumber', |
|||
title: '批号' |
|||
}, |
|||
{ |
|||
field: 'specificationModel', |
|||
title: '规格型号' |
|||
}, |
|||
{ |
|||
field: 'typeMachine', |
|||
title: '机种' |
|||
}, |
|||
{ |
|||
field: 'inventoryUnit', |
|||
title: '单位' |
|||
}, |
|||
{ |
|||
field: 'stockQuantity', |
|||
title: '库存数量', |
|||
formatter: (value, row, index) => { |
|||
if (value!==null) { |
|||
return parseFloat(value).toFixed(2) |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'stockNumber', |
|||
title: '仓库号' |
|||
}, |
|||
{ |
|||
field: 'stockName', |
|||
title: '仓库名称' |
|||
}, |
|||
{ |
|||
field: 'enterpriseCode', |
|||
title: '客户编号' |
|||
}, |
|||
{ |
|||
field: 'enterpriseName', |
|||
title: '客户名称' |
|||
}, |
|||
{ |
|||
field: 'storageLocation', |
|||
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.materialCode + '\')"><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.materialCode + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|||
// return actions.join(''); |
|||
// } |
|||
// } |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue