liuxiaoxu
1 month ago
9 changed files with 0 additions and 1429 deletions
@ -1,229 +0,0 @@ |
|||
package com.ruoyi.storehouse.controller; |
|||
|
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
import com.ruoyi.storehouse.domain.WarehousingStagnantMaterial; |
|||
import com.ruoyi.storehouse.service.IWarehousingStagnantMaterialService; |
|||
import com.ruoyi.storehouse.utils.DateCheckUtil; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.time.format.DateTimeFormatter; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 呆滞物料Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-05-12 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/storehouse/warehousingStagnantMaterial") |
|||
public class WarehousingStagnantMaterialController extends BaseController |
|||
{ |
|||
private String prefix = "storehouse/warehousingStagnantMaterial"; |
|||
|
|||
@Autowired |
|||
private IWarehousingStagnantMaterialService warehousingStagnantMaterialService; |
|||
|
|||
@RequiresPermissions("storehouse:warehousingStagnantMaterial:view") |
|||
@GetMapping() |
|||
public String warehousingStagnantMaterial() |
|||
{ |
|||
return prefix + "/warehousingStagnantMaterial"; |
|||
} |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
*/ |
|||
@RequiresPermissions("storehouse:warehousingStagnantMaterial:list") |
|||
@PostMapping("/listIn") |
|||
@ResponseBody |
|||
public TableDataInfo listIn(WarehousingStagnantMaterial warehousingStagnantMaterial) |
|||
{ |
|||
startPage(); |
|||
List<WarehousingStagnantMaterial> list = warehousingStagnantMaterialService.selectStagnantMaterialInList(warehousingStagnantMaterial); |
|||
return getDataTable(list); |
|||
} |
|||
@RequiresPermissions("storehouse:warehousingStagnantMaterial:list") |
|||
@PostMapping("/listOut") |
|||
@ResponseBody |
|||
public TableDataInfo listOut(WarehousingStagnantMaterial warehousingStagnantMaterial) |
|||
{ |
|||
startPage(); |
|||
List<WarehousingStagnantMaterial> list = warehousingStagnantMaterialService.selectStagnantMaterialOutList(warehousingStagnantMaterial); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
@RequiresPermissions("storehouse:warehousingStagnantMaterial:list") |
|||
@PostMapping("/listYL") |
|||
@ResponseBody |
|||
public TableDataInfo listYL(WarehousingStagnantMaterial warehousingStagnantMaterial) |
|||
{ |
|||
startPage(); |
|||
List<WarehousingStagnantMaterial> list = warehousingStagnantMaterialService.selectStagnantMaterialYLList(warehousingStagnantMaterial); |
|||
List<WarehousingStagnantMaterial> list1 = new ArrayList<>(); |
|||
for (int i=0;i<list.size();i++) { |
|||
//原料一年算呆滞
|
|||
LocalDate date = LocalDate.now(); |
|||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
|||
System.out.println(date.format(formatter)); |
|||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|||
String dateData = list.get(i).getDate(); |
|||
String now = date.format(formatter); |
|||
boolean b = DateCheckUtil.checkIsOneYear(dateData, now); |
|||
System.out.println(b); |
|||
if (!b) { |
|||
list1.add(list.get(i)); |
|||
} |
|||
|
|||
} |
|||
return getDataTable(list1); |
|||
} |
|||
@RequiresPermissions("storehouse:warehousingStagnantMaterial:list") |
|||
@PostMapping("/listCP") |
|||
@ResponseBody |
|||
public TableDataInfo listCP(WarehousingStagnantMaterial warehousingStagnantMaterial) |
|||
{ |
|||
startPage(); |
|||
List<WarehousingStagnantMaterial> list = warehousingStagnantMaterialService.selectStagnantMaterialCPList(warehousingStagnantMaterial); |
|||
List<WarehousingStagnantMaterial> list2 = new ArrayList<>(); |
|||
for (int i=0;i<list.size();i++) { |
|||
//成品半年算呆滞
|
|||
LocalDate date = LocalDate.now(); |
|||
LocalDate sixMonthsAgo = LocalDate.now().plusMonths(-6); |
|||
LocalDate dateData = LocalDate.parse(list.get(i).getDate()); |
|||
if (dateData.isBefore(sixMonthsAgo)) { |
|||
list2.add(list.get(i)); |
|||
} |
|||
} |
|||
return getDataTable(list2); |
|||
} |
|||
|
|||
@RequiresPermissions("storehouse:warehousingStagnantMaterial:list") |
|||
@PostMapping("/listALL") |
|||
@ResponseBody |
|||
public TableDataInfo listALL(WarehousingStagnantMaterial warehousingStagnantMaterial) |
|||
{ |
|||
startPage(); |
|||
List<WarehousingStagnantMaterial> listALL = warehousingStagnantMaterialService.selectStagnantMaterialALLList(warehousingStagnantMaterial); |
|||
List<WarehousingStagnantMaterial> list1 = new ArrayList<>(); |
|||
List<WarehousingStagnantMaterial> list2 = new ArrayList<>(); |
|||
List<WarehousingStagnantMaterial> list = new ArrayList<>(); |
|||
for (int i=0;i<listALL.size();i++) { |
|||
if (listALL.get(0).getMaterialType().equals("原料")) { |
|||
//原料一年算呆滞
|
|||
LocalDate date = LocalDate.now(); |
|||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
|||
System.out.println(date.format(formatter)); |
|||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|||
String dateData = listALL.get(i).getDate(); |
|||
String now = date.format(formatter); |
|||
boolean b = DateCheckUtil.checkIsOneYear(dateData, now); |
|||
System.out.println(b); |
|||
if (!b) { |
|||
list1.add(listALL.get(i)); |
|||
} |
|||
} else if (listALL.get(0).getMaterialType().equals("成品")) { |
|||
//成品半年算呆滞
|
|||
LocalDate date = LocalDate.now(); |
|||
LocalDate sixMonthsAgo = LocalDate.now().plusMonths(-6); |
|||
LocalDate dateData = LocalDate.parse(listALL.get(i).getDate()); |
|||
if (dateData.isBefore(sixMonthsAgo)) { |
|||
list2.add(listALL.get(i)); |
|||
} |
|||
} |
|||
} |
|||
for(WarehousingStagnantMaterial j:list1){ |
|||
list.add(j); |
|||
} |
|||
for(WarehousingStagnantMaterial k:list2){ |
|||
list.add(k); |
|||
} |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
|
|||
@PostMapping("/getAllCount") |
|||
@ResponseBody |
|||
public Integer getAllCount() { |
|||
return null; |
|||
} |
|||
//
|
|||
// /**
|
|||
// * 导出呆滞物料列表
|
|||
// */
|
|||
// @RequiresPermissions("storehouse:warehousingStagnantMaterial:export")
|
|||
// @Log(title = "呆滞物料", businessType = BusinessType.EXPORT)
|
|||
// @PostMapping("/export")
|
|||
// @ResponseBody
|
|||
// public AjaxResult export(WarehousingStagnantMaterial warehousingStagnantMaterial)
|
|||
// {
|
|||
// List<WarehousingStagnantMaterial> list = warehousingStagnantMaterialService.selectWarehousingStagnantMaterialList(warehousingStagnantMaterial);
|
|||
// ExcelUtil<WarehousingStagnantMaterial> util = new ExcelUtil<WarehousingStagnantMaterial>(WarehousingStagnantMaterial.class);
|
|||
// return util.exportExcel(list, "呆滞物料数据");
|
|||
// }
|
|||
//
|
|||
// /**
|
|||
// * 新增呆滞物料
|
|||
// */
|
|||
// @GetMapping("/add")
|
|||
// public String add()
|
|||
// {
|
|||
// return prefix + "/add";
|
|||
// }
|
|||
//
|
|||
// /**
|
|||
// * 新增保存呆滞物料
|
|||
// */
|
|||
// @RequiresPermissions("storehouse:warehousingStagnantMaterial:add")
|
|||
// @Log(title = "呆滞物料", businessType = BusinessType.INSERT)
|
|||
// @PostMapping("/add")
|
|||
// @ResponseBody
|
|||
// public AjaxResult addSave(WarehousingStagnantMaterial warehousingStagnantMaterial)
|
|||
// {
|
|||
// return toAjax(warehousingStagnantMaterialService.insertWarehousingStagnantMaterial(warehousingStagnantMaterial));
|
|||
// }
|
|||
//
|
|||
// /**
|
|||
// * 修改呆滞物料
|
|||
// */
|
|||
// @GetMapping("/edit/{date}")
|
|||
// public String edit(@PathVariable("date") String date, ModelMap mmap)
|
|||
// {
|
|||
// WarehousingStagnantMaterial warehousingStagnantMaterial = warehousingStagnantMaterialService.selectWarehousingStagnantMaterialById(date);
|
|||
// mmap.put("warehousingStagnantMaterial", warehousingStagnantMaterial);
|
|||
// return prefix + "/edit";
|
|||
// }
|
|||
//
|
|||
// /**
|
|||
// * 修改保存呆滞物料
|
|||
// */
|
|||
// @RequiresPermissions("storehouse:warehousingStagnantMaterial:edit")
|
|||
// @Log(title = "呆滞物料", businessType = BusinessType.UPDATE)
|
|||
// @PostMapping("/edit")
|
|||
// @ResponseBody
|
|||
// public AjaxResult editSave(WarehousingStagnantMaterial warehousingStagnantMaterial)
|
|||
// {
|
|||
// return toAjax(warehousingStagnantMaterialService.updateWarehousingStagnantMaterial(warehousingStagnantMaterial));
|
|||
// }
|
|||
//
|
|||
// /**
|
|||
// * 删除呆滞物料
|
|||
// */
|
|||
// @RequiresPermissions("storehouse:warehousingStagnantMaterial:remove")
|
|||
// @Log(title = "呆滞物料", businessType = BusinessType.DELETE)
|
|||
// @PostMapping( "/remove")
|
|||
// @ResponseBody
|
|||
// public AjaxResult remove(String ids)
|
|||
// {
|
|||
// return toAjax(warehousingStagnantMaterialService.deleteWarehousingStagnantMaterialByIds(ids));
|
|||
// }
|
|||
} |
@ -1,164 +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_stagnant_material |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-05-12 |
|||
*/ |
|||
public class WarehousingStagnantMaterial extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 日期 */ |
|||
@Excel(name = "日期") |
|||
private String date; |
|||
|
|||
/** 仓库号 */ |
|||
@Excel(name = "仓库号") |
|||
private String stockNumber; |
|||
|
|||
/** 仓库名称 */ |
|||
@Excel(name = "仓库名称") |
|||
private String stockName; |
|||
|
|||
/** 物料代码 */ |
|||
@Excel(name = "物料代码") |
|||
private String materialCode; |
|||
|
|||
/** 物料名称 */ |
|||
@Excel(name = "物料名称") |
|||
private String materialName; |
|||
|
|||
/** 物料类型 */ |
|||
@Excel(name = "物料类型") |
|||
private String materialType; |
|||
|
|||
/** 规格型号 */ |
|||
@Excel(name = "规格型号") |
|||
private String specificationModel; |
|||
|
|||
/** 机种 */ |
|||
@Excel(name = "机种") |
|||
private String typeMachine; |
|||
|
|||
/** 单位 */ |
|||
@Excel(name = "单位") |
|||
private String inventoryUnit; |
|||
|
|||
/** 库存数 */ |
|||
@Excel(name = "库存数") |
|||
private String inventoryQuantity; |
|||
|
|||
public void setDate(String date) |
|||
{ |
|||
this.date = date; |
|||
} |
|||
|
|||
public String getDate() |
|||
{ |
|||
return date; |
|||
} |
|||
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 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 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 setInventoryQuantity(String inventoryQuantity) |
|||
{ |
|||
this.inventoryQuantity = inventoryQuantity; |
|||
} |
|||
|
|||
public String getInventoryQuantity() |
|||
{ |
|||
return inventoryQuantity; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("date", getDate()) |
|||
.append("stockNumber", getStockNumber()) |
|||
.append("stockName", getStockName()) |
|||
.append("materialCode", getMaterialCode()) |
|||
.append("materialName", getMaterialName()) |
|||
.append("materialType", getMaterialType()) |
|||
.append("specificationModel", getSpecificationModel()) |
|||
.append("typeMachine", getTypeMachine()) |
|||
.append("inventoryUnit", getInventoryUnit()) |
|||
.append("inventoryQuantity", getInventoryQuantity()) |
|||
.toString(); |
|||
} |
|||
} |
@ -1,72 +0,0 @@ |
|||
package com.ruoyi.storehouse.mapper; |
|||
|
|||
import com.ruoyi.storehouse.domain.WarehousingStagnantMaterial; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 呆滞物料Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-05-12 |
|||
*/ |
|||
public interface WarehousingStagnantMaterialMapper |
|||
{ |
|||
/** |
|||
* 查询呆滞物料 |
|||
* |
|||
* @param date 呆滞物料ID |
|||
* @return 呆滞物料 |
|||
*/ |
|||
public WarehousingStagnantMaterial selectWarehousingStagnantMaterialById(String date); |
|||
|
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
// public List<WarehousingStagnantMaterial> selectWarehousingStagnantMaterialList(WarehousingStagnantMaterial warehousingStagnantMaterial);
|
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialInList(WarehousingStagnantMaterial warehousingStagnantMaterial); |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialOutList(WarehousingStagnantMaterial warehousingStagnantMaterial); |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialYLList(WarehousingStagnantMaterial warehousingStagnantMaterial); |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialCPList(WarehousingStagnantMaterial warehousingStagnantMaterial); |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialALLList(WarehousingStagnantMaterial warehousingStagnantMaterial); |
|||
|
|||
} |
@ -1,102 +0,0 @@ |
|||
package com.ruoyi.storehouse.service; |
|||
|
|||
import com.ruoyi.storehouse.domain.WarehousingStagnantMaterial; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 呆滞物料Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-05-12 |
|||
*/ |
|||
public interface IWarehousingStagnantMaterialService |
|||
{ |
|||
/** |
|||
* 查询呆滞物料 |
|||
* |
|||
* @param date 呆滞物料ID |
|||
* @return 呆滞物料 |
|||
*/ |
|||
public WarehousingStagnantMaterial selectWarehousingStagnantMaterialById(String date); |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
// public List<WarehousingStagnantMaterial> selectWarehousingStagnantMaterialList(WarehousingStagnantMaterial warehousingStagnantMaterial);
|
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialInList(WarehousingStagnantMaterial warehousingStagnantMaterial); |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialOutList(WarehousingStagnantMaterial warehousingStagnantMaterial); |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialYLList(WarehousingStagnantMaterial warehousingStagnantMaterial); |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialCPList(WarehousingStagnantMaterial warehousingStagnantMaterial); |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料集合 |
|||
*/ |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialALLList(WarehousingStagnantMaterial warehousingStagnantMaterial); |
|||
|
|||
// /**
|
|||
// * 新增呆滞物料
|
|||
// *
|
|||
// * @param warehousingStagnantMaterial 呆滞物料
|
|||
// * @return 结果
|
|||
// */
|
|||
// public int insertWarehousingStagnantMaterial(WarehousingStagnantMaterial warehousingStagnantMaterial);
|
|||
//
|
|||
// /**
|
|||
// * 修改呆滞物料
|
|||
// *
|
|||
// * @param warehousingStagnantMaterial 呆滞物料
|
|||
// * @return 结果
|
|||
// */
|
|||
// public int updateWarehousingStagnantMaterial(WarehousingStagnantMaterial warehousingStagnantMaterial);
|
|||
//
|
|||
// /**
|
|||
// * 批量删除呆滞物料
|
|||
// *
|
|||
// * @param ids 需要删除的数据ID
|
|||
// * @return 结果
|
|||
// */
|
|||
// public int deleteWarehousingStagnantMaterialByIds(String ids);
|
|||
//
|
|||
// /**
|
|||
// * 删除呆滞物料信息
|
|||
// *
|
|||
// * @param date 呆滞物料ID
|
|||
// * @return 结果
|
|||
// */
|
|||
// public int deleteWarehousingStagnantMaterialById(String date);
|
|||
} |
@ -1,153 +0,0 @@ |
|||
package com.ruoyi.storehouse.service.impl; |
|||
|
|||
import com.ruoyi.storehouse.domain.WarehousingStagnantMaterial; |
|||
import com.ruoyi.storehouse.mapper.WarehousingStagnantMaterialMapper; |
|||
import com.ruoyi.storehouse.service.IWarehousingStagnantMaterialService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 呆滞物料Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-05-12 |
|||
*/ |
|||
@Service |
|||
public class WarehousingStagnantMaterialServiceImpl implements IWarehousingStagnantMaterialService |
|||
{ |
|||
@Autowired |
|||
private WarehousingStagnantMaterialMapper warehousingStagnantMaterialMapper; |
|||
|
|||
/** |
|||
* 查询呆滞物料 |
|||
* |
|||
* @param date 呆滞物料ID |
|||
* @return 呆滞物料 |
|||
*/ |
|||
@Override |
|||
public WarehousingStagnantMaterial selectWarehousingStagnantMaterialById(String date) |
|||
{ |
|||
return warehousingStagnantMaterialMapper.selectWarehousingStagnantMaterialById(date); |
|||
} |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料 |
|||
*/ |
|||
// @Override
|
|||
// public List<WarehousingStagnantMaterial> selectWarehousingStagnantMaterialList(WarehousingStagnantMaterial warehousingStagnantMaterial)
|
|||
// {
|
|||
// return warehousingStagnantMaterialMapper.selectWarehousingStagnantMaterialList(warehousingStagnantMaterial);
|
|||
// }
|
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料 |
|||
*/ |
|||
@Override |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialInList(WarehousingStagnantMaterial warehousingStagnantMaterial) |
|||
{ |
|||
return warehousingStagnantMaterialMapper.selectStagnantMaterialInList(warehousingStagnantMaterial); |
|||
} |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料 |
|||
*/ |
|||
@Override |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialOutList(WarehousingStagnantMaterial warehousingStagnantMaterial) |
|||
{ |
|||
return warehousingStagnantMaterialMapper.selectStagnantMaterialOutList(warehousingStagnantMaterial); |
|||
} |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料 |
|||
*/ |
|||
@Override |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialYLList(WarehousingStagnantMaterial warehousingStagnantMaterial) |
|||
{ |
|||
return warehousingStagnantMaterialMapper.selectStagnantMaterialYLList(warehousingStagnantMaterial); |
|||
} |
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料 |
|||
*/ |
|||
@Override |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialCPList(WarehousingStagnantMaterial warehousingStagnantMaterial) |
|||
{ |
|||
return warehousingStagnantMaterialMapper.selectStagnantMaterialCPList(warehousingStagnantMaterial); |
|||
} |
|||
|
|||
/** |
|||
* 查询呆滞物料列表 |
|||
* |
|||
* @param warehousingStagnantMaterial 呆滞物料 |
|||
* @return 呆滞物料 |
|||
*/ |
|||
@Override |
|||
public List<WarehousingStagnantMaterial> selectStagnantMaterialALLList(WarehousingStagnantMaterial warehousingStagnantMaterial) |
|||
{ |
|||
return warehousingStagnantMaterialMapper.selectStagnantMaterialALLList(warehousingStagnantMaterial); |
|||
} |
|||
//
|
|||
// /**
|
|||
// * 新增呆滞物料
|
|||
// *
|
|||
// * @param warehousingStagnantMaterial 呆滞物料
|
|||
// * @return 结果
|
|||
// */
|
|||
// @Override
|
|||
// public int insertWarehousingStagnantMaterial(WarehousingStagnantMaterial warehousingStagnantMaterial)
|
|||
// {
|
|||
// return warehousingStagnantMaterialMapper.insertWarehousingStagnantMaterial(warehousingStagnantMaterial);
|
|||
// }
|
|||
//
|
|||
// /**
|
|||
// * 修改呆滞物料
|
|||
// *
|
|||
// * @param warehousingStagnantMaterial 呆滞物料
|
|||
// * @return 结果
|
|||
// */
|
|||
// @Override
|
|||
// public int updateWarehousingStagnantMaterial(WarehousingStagnantMaterial warehousingStagnantMaterial)
|
|||
// {
|
|||
// return warehousingStagnantMaterialMapper.updateWarehousingStagnantMaterial(warehousingStagnantMaterial);
|
|||
// }
|
|||
//
|
|||
// /**
|
|||
// * 删除呆滞物料对象
|
|||
// *
|
|||
// * @param ids 需要删除的数据ID
|
|||
// * @return 结果
|
|||
// */
|
|||
// @Override
|
|||
// public int deleteWarehousingStagnantMaterialByIds(String ids)
|
|||
// {
|
|||
// return warehousingStagnantMaterialMapper.deleteWarehousingStagnantMaterialByIds(Convert.toStrArray(ids));
|
|||
// }
|
|||
//
|
|||
// /**
|
|||
// * 删除呆滞物料信息
|
|||
// *
|
|||
// * @param date 呆滞物料ID
|
|||
// * @return 结果
|
|||
// */
|
|||
// @Override
|
|||
// public int deleteWarehousingStagnantMaterialById(String date)
|
|||
// {
|
|||
// return warehousingStagnantMaterialMapper.deleteWarehousingStagnantMaterialById(date);
|
|||
// }
|
|||
} |
@ -1,401 +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.WarehousingStagnantMaterialMapper"> |
|||
|
|||
<resultMap type="WarehousingStagnantMaterial" id="WarehousingStagnantMaterialResult"> |
|||
<result property="date" column="date" /> |
|||
<result property="stockNumber" column="stock_number" /> |
|||
<result property="stockName" column="stock_name" /> |
|||
<result property="materialCode" column="material_code" /> |
|||
<result property="materialName" column="material_name" /> |
|||
<result property="materialType" column="material_type" /> |
|||
<result property="specificationModel" column="specification_model" /> |
|||
<result property="typeMachine" column="type_machine" /> |
|||
<result property="inventoryUnit" column="inventory_unit" /> |
|||
<result property="inventoryQuantity" column="inventory_quantity" /> |
|||
</resultMap> |
|||
|
|||
<!-- <sql id="selectWarehousingStagnantMaterialVo">--> |
|||
<!-- select date, stock_number, stock_name, material_code, material_name, material_type, specification_model, type_machine, inventory_unit, inventory_quantity from warehousing_stagnant_material--> |
|||
<!-- </sql>--> |
|||
<sql id="selectStagnantMaterialInVo"> |
|||
-- SELECT |
|||
-- max(wii.warehousing_date) AS `date`, |
|||
-- wii.stock_number, |
|||
-- wii.stock_name, |
|||
-- wid.material_code, |
|||
-- wid.material_name, |
|||
-- wid.specification_model, |
|||
-- wid.type_machine, |
|||
-- wid.inventory_unit, |
|||
-- wid.material_type |
|||
-- FROM |
|||
-- warehousing_in_info wii, |
|||
-- warehousing_in_detail wid |
|||
-- WHERE |
|||
-- wii.warehousing_number = wid.warehousing_number |
|||
-- GROUP by material_code |
|||
-- having DATEDIFF(now(),MAX(wii.warehousing_date))>30 |
|||
SELECT |
|||
`date`, |
|||
aaa.stock_number, |
|||
aaa.stock_name, |
|||
aaa.material_code, |
|||
aaa.material_name, |
|||
aaa.specification_model, |
|||
aaa.type_machine, |
|||
aaa.inventory_unit, |
|||
aaa.material_type, |
|||
bbb.stock_quantity AS inventory_quantity |
|||
FROM |
|||
( |
|||
SELECT |
|||
max( wii.warehousing_date ) AS `date`, |
|||
wii.stock_number, |
|||
wii.stock_name, |
|||
wid.material_code, |
|||
wid.material_name, |
|||
wid.specification_model, |
|||
wid.type_machine, |
|||
wid.inventory_unit, |
|||
wid.material_type |
|||
FROM |
|||
warehousing_in_info wii, |
|||
warehousing_in_detail wid |
|||
WHERE |
|||
wii.warehousing_number = wid.warehousing_number |
|||
GROUP BY |
|||
material_code |
|||
HAVING |
|||
DATEDIFF( |
|||
now(), |
|||
MAX( wii.warehousing_date ))> 30 |
|||
) AS `aaa`, |
|||
( |
|||
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 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 |
|||
) AS tabletemp |
|||
GROUP BY |
|||
material_code |
|||
) AS `bbb` |
|||
WHERE aaa.material_code = bbb.material_code |
|||
</sql> |
|||
<sql id="selectStagnantMaterialOutVo"> |
|||
-- SELECT |
|||
-- SUBSTRING(oi.outbound_date,1,10) AS `date`, |
|||
-- oi.stock_no AS stock_number, |
|||
-- oi.stock_name, |
|||
-- od.material_code, |
|||
-- od.material_name, |
|||
-- od.specification_model, |
|||
-- od.type_machine, |
|||
-- od.inventory_unit, |
|||
-- oi.material_type |
|||
-- FROM |
|||
-- outbound_info oi, |
|||
-- outbound_detail od |
|||
-- WHERE |
|||
-- oi.outbound_no = od.outbound_no |
|||
-- GROUP by material_code |
|||
-- having DATEDIFF(now(),MAX(SUBSTRING(oi.outbound_date,1,10)))>30 |
|||
SELECT |
|||
`date`, |
|||
ccc.stock_number, |
|||
ccc.stock_name, |
|||
ccc.material_code, |
|||
ccc.material_name, |
|||
ccc.specification_model, |
|||
ccc.type_machine, |
|||
ccc.inventory_unit, |
|||
ccc.material_type, |
|||
bbb.stock_quantity AS inventory_quantity |
|||
FROM |
|||
( |
|||
SELECT |
|||
SUBSTRING(oi.outbound_date,1,10) AS `date`, |
|||
oi.stock_no AS stock_number, |
|||
oi.stock_name, |
|||
od.material_code, |
|||
od.material_name, |
|||
od.specification_model, |
|||
od.type_machine, |
|||
od.inventory_unit, |
|||
oi.material_type |
|||
FROM |
|||
outbound_info oi, |
|||
outbound_detail od |
|||
WHERE |
|||
oi.outbound_no = od.outbound_no |
|||
GROUP by material_code |
|||
having DATEDIFF(now(),MAX(SUBSTRING(oi.outbound_date,1,10)))>30 |
|||
) AS `ccc`, |
|||
( |
|||
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 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 |
|||
) AS tabletemp |
|||
GROUP BY |
|||
material_code |
|||
) AS `bbb` |
|||
WHERE ccc.material_code = bbb.material_code |
|||
</sql> |
|||
<sql id="selectStockQuantityInVo"> |
|||
SELECT |
|||
`date`, |
|||
aaa.stock_number, |
|||
aaa.stock_name, |
|||
aaa.material_code, |
|||
aaa.material_name, |
|||
aaa.specification_model, |
|||
aaa.type_machine, |
|||
aaa.inventory_unit, |
|||
aaa.material_type, |
|||
bbb.stock_quantity AS inventory_quantity |
|||
FROM |
|||
( |
|||
SELECT |
|||
max( wii.warehousing_date ) AS `date`, |
|||
wii.stock_number, |
|||
wii.stock_name, |
|||
wid.material_code, |
|||
wid.material_name, |
|||
wid.specification_model, |
|||
wid.type_machine, |
|||
wid.inventory_unit, |
|||
wid.material_type |
|||
FROM |
|||
warehousing_in_info wii, |
|||
warehousing_in_detail wid |
|||
WHERE |
|||
wii.warehousing_number = wid.warehousing_number |
|||
GROUP BY |
|||
material_code |
|||
) AS `aaa`, |
|||
( |
|||
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 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 |
|||
) AS tabletemp |
|||
GROUP BY |
|||
material_code |
|||
) AS `bbb` |
|||
WHERE aaa.material_code = bbb.material_code AND bbb.stock_quantity > 0 |
|||
</sql> |
|||
|
|||
<!-- <select id="selectWarehousingStagnantMaterialList" parameterType="WarehousingStagnantMaterial" resultMap="WarehousingStagnantMaterialResult">--> |
|||
<!-- <include refid="selectStagnantMaterialInVo"/>--> |
|||
<!-- <where> --> |
|||
<!-- <if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>--> |
|||
<!-- </where>--> |
|||
<!-- </select>--> |
|||
<select id="selectStagnantMaterialInList" parameterType="WarehousingStagnantMaterial" resultMap="WarehousingStagnantMaterialResult"> |
|||
select * from |
|||
(<include refid="selectStagnantMaterialInVo"/>) as `in` |
|||
<where> |
|||
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if> |
|||
</where> |
|||
</select> |
|||
<select id="selectStagnantMaterialOutList" parameterType="WarehousingStagnantMaterial" resultMap="WarehousingStagnantMaterialResult"> |
|||
select * from |
|||
(<include refid="selectStagnantMaterialOutVo"/>) as `out` |
|||
<where> |
|||
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if> |
|||
</where> |
|||
</select> |
|||
<select id="selectStagnantMaterialALLList" parameterType="WarehousingStagnantMaterial" resultMap="WarehousingStagnantMaterialResult"> |
|||
select * from |
|||
(<include refid="selectStockQuantityInVo"/>) as `temp` |
|||
<where> |
|||
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if> |
|||
<if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</if> |
|||
</where> |
|||
</select> |
|||
<select id="selectStagnantMaterialYLList" parameterType="WarehousingStagnantMaterial" resultMap="WarehousingStagnantMaterialResult"> |
|||
select * from |
|||
(<include refid="selectStockQuantityInVo"/>) as `temp` |
|||
<where> |
|||
material_type like '原料' |
|||
<!-- <if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>--> |
|||
<if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</if> |
|||
</where> |
|||
</select> |
|||
<select id="selectStagnantMaterialCPList" parameterType="WarehousingStagnantMaterial" resultMap="WarehousingStagnantMaterialResult"> |
|||
select * from |
|||
(<include refid="selectStockQuantityInVo"/>) as `temp` |
|||
<where> |
|||
material_type like '成品' |
|||
<!-- <if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>--> |
|||
<if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</if> |
|||
</where> |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
@ -1,25 +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-warehousingStagnantMaterial-add"> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "storehouse/warehousingStagnantMaterial" |
|||
$("#form-warehousingStagnantMaterial-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-warehousingStagnantMaterial-add').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,26 +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-warehousingStagnantMaterial-edit" th:object="${warehousingStagnantMaterial}"> |
|||
<input name="date" th:field="*{date}" type="hidden"> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "storehouse/warehousingStagnantMaterial"; |
|||
$("#form-warehousingStagnantMaterial-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-warehousingStagnantMaterial-edit').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,257 +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> |
|||
<select name="materialType" th:with="type=${@dict.getType('stagnant_material_type')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>物料代码:</label> |
|||
<input name="materialCode"> |
|||
</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:warehousingStagnantMaterial:add">--> |
|||
<!-- <i class="fa fa-plus"></i> 添加--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="storehouse:warehousingStagnantMaterial:edit">--> |
|||
<!-- <i class="fa fa-edit"></i> 修改--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="storehouse:warehousingStagnantMaterial:remove">--> |
|||
<!-- <i class="fa fa-remove"></i> 删除--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="storehouse:warehousingStagnantMaterial: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('storehouse:warehousingStagnantMaterial:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('storehouse:warehousingStagnantMaterial:remove')}]]; |
|||
var materialTypeDatas = [[${@dict.getType('stagnant_material_type')}]]; |
|||
var prefix = ctx + "storehouse/warehousingStagnantMaterial"; |
|||
|
|||
$(function() { |
|||
// searchDetail(); |
|||
|
|||
showALLData(); |
|||
}); |
|||
|
|||
//根据物料类型搜索 |
|||
function searchDetail() { |
|||
var materialType = $("#formId select[name='materialType']").val() |
|||
console.log(materialType) |
|||
if (materialType === "原料") { |
|||
//显示原料信息 |
|||
showMaterialYL(); |
|||
} else if (materialType === "成品") { |
|||
//显示成品信息 |
|||
showMaterialCP(); |
|||
} else { |
|||
$.modal.alertError("出错了!") |
|||
} |
|||
} |
|||
|
|||
//显示原料信息 |
|||
function showMaterialYL() { |
|||
$("#bootstrap-table").bootstrapTable("destroy") |
|||
var options = { |
|||
url: prefix + "/listYL", |
|||
modalName: "呆滞物料", |
|||
columns: [ |
|||
{ |
|||
field: 'date', |
|||
title: '日期' |
|||
}, |
|||
{ |
|||
field: 'stockNumber', |
|||
title: '仓库号' |
|||
}, |
|||
{ |
|||
field: 'stockName', |
|||
title: '仓库名称' |
|||
}, |
|||
{ |
|||
field: 'materialCode', |
|||
title: '物料代码' |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
title: '物料名称' |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'specificationModel', |
|||
title: '规格型号' |
|||
}, |
|||
// { |
|||
// field: 'typeMachine', |
|||
// title: '机种' |
|||
// }, |
|||
{ |
|||
field: 'inventoryUnit', |
|||
title: '单位' |
|||
}, |
|||
{ |
|||
field: 'inventoryQuantity', |
|||
title: '库存数', |
|||
formatter: (value, row, index) => { |
|||
if (value !== null || value !== '') { |
|||
return parseFloat(value).toFixed(2) |
|||
} |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
} |
|||
|
|||
//显示成品信息 |
|||
function showMaterialCP() { |
|||
$("#bootstrap-table").bootstrapTable("destroy") |
|||
var options = { |
|||
url: prefix + "/listCP", |
|||
modalName: "呆滞物料", |
|||
columns: [ |
|||
{ |
|||
field: 'date', |
|||
title: '日期' |
|||
}, |
|||
{ |
|||
field: 'stockNumber', |
|||
title: '仓库号' |
|||
}, |
|||
{ |
|||
field: 'stockName', |
|||
title: '仓库名称' |
|||
}, |
|||
{ |
|||
field: 'materialCode', |
|||
title: '物料代码' |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
title: '物料名称' |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'specificationModel', |
|||
title: '规格型号' |
|||
}, |
|||
{ |
|||
field: 'typeMachine', |
|||
title: '机种' |
|||
}, |
|||
{ |
|||
field: 'inventoryUnit', |
|||
title: '单位' |
|||
}, |
|||
{ |
|||
field: 'inventoryQuantity', |
|||
title: '库存数', |
|||
formatter: (value, row, index) => { |
|||
if (value !== null || value !== '') { |
|||
return parseFloat(value).toFixed(2) |
|||
} |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
} |
|||
|
|||
function showALLData() { |
|||
var options = { |
|||
url: prefix + "/listALL", |
|||
modalName: "呆滞物料", |
|||
columns: [ |
|||
{ |
|||
field: 'date', |
|||
title: '日期' |
|||
}, |
|||
{ |
|||
field: 'stockNumber', |
|||
title: '仓库号' |
|||
}, |
|||
{ |
|||
field: 'stockName', |
|||
title: '仓库名称' |
|||
}, |
|||
{ |
|||
field: 'materialCode', |
|||
title: '物料代码' |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
title: '物料名称' |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'specificationModel', |
|||
title: '规格型号' |
|||
}, |
|||
// { |
|||
// field: 'typeMachine', |
|||
// title: '机种' |
|||
// }, |
|||
{ |
|||
field: 'inventoryUnit', |
|||
title: '单位' |
|||
}, |
|||
{ |
|||
field: 'inventoryQuantity', |
|||
title: '库存数', |
|||
formatter: (value, row, index) => { |
|||
if (value !== null || value !== '') { |
|||
return parseFloat(value).toFixed(2) |
|||
} |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
} |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue