Browse Source

[feat] 新增仓库修改,新增字段仓库管理人联系电话,修改相关信息。

dev
zhangsiqi 5 months ago
parent
commit
5c4432259a
  1. 75
      ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java
  2. 2
      ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/StockAdjustServiceImpl.java
  3. 4
      ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/WarehousingOutHeadServiceImpl.java
  4. 2
      ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/WarehousingRecordServiceImpl.java
  5. 33
      ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml
  6. 64
      ruoyi-admin/src/main/resources/templates/stock/stockInfo/stockInfo.html

75
ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java

@ -20,11 +20,11 @@ public class StockInfo extends BaseEntity
/** 仓库编号 */ /** 仓库编号 */
@Excel(name = "仓库编号") @Excel(name = "仓库编号")
private String StockNO; private String stockNO;
/** 仓库名 */ /** 仓库名 */
@Excel(name = "仓库名") @Excel(name = "仓库名")
private String Stockname; private String stockName;
/** 仓库地址 */ /** 仓库地址 */
@Excel(name = "仓库地址") @Excel(name = "仓库地址")
@ -32,11 +32,14 @@ public class StockInfo extends BaseEntity
/** 仓库管理人 */ /** 仓库管理人 */
@Excel(name = "仓库管理人") @Excel(name = "仓库管理人")
private String stockmanager; private String stockManager;
@Excel(name = "仓库管理人电话")
private String stockManagerPhone;
/** 仓库备注 */ /** 仓库备注 */
@Excel(name = "仓库备注") @Excel(name = "仓库备注")
private String stockmemo; private String stockMemo;
/** */ /** */
private String defaltItemclass; private String defaltItemclass;
@ -58,48 +61,45 @@ public class StockInfo extends BaseEntity
} }
public String getStockNO() { public String getStockNO() {
return StockNO; return stockNO;
} }
public void setStockNO(String StockNO) { public void setStockNO(String stockNO) {
this.StockNO = StockNO; this.stockNO = stockNO;
} }
public String getStockname() { public String getStockName() {
return Stockname; return stockName;
} }
public void setStockname(String Stockname) { public void setStockName(String stockName) {
this.Stockname = Stockname; this.stockName = stockName;
} }
public void setStockAddr(String stockAddr) public String getStockAddr() {
{ return stockAddr;
this.stockAddr = stockAddr;
} }
public String getStockAddr() public void setStockAddr(String stockAddr) {
{ this.stockAddr = stockAddr;
return stockAddr;
} }
public void setStockmanager(String stockmanager)
{ public String getStockManager() {
this.stockmanager = stockmanager; return stockManager;
} }
public String getStockmanager() public void setStockManager(String stockManager) {
{ this.stockManager = stockManager;
return stockmanager;
} }
public void setStockmemo(String stockmemo)
{ public String getStockMemo() {
this.stockmemo = stockmemo; return stockMemo;
} }
public String getStockmemo() public void setStockMemo(String stockMemo) {
{ this.stockMemo = stockMemo;
return stockmemo;
} }
public void setDefaltItemclass(String defaltItemclass) public void setDefaltItemclass(String defaltItemclass)
{ {
this.defaltItemclass = defaltItemclass; this.defaltItemclass = defaltItemclass;
@ -126,15 +126,24 @@ public class StockInfo extends BaseEntity
this.updateInfoTime = updateInfoTime; this.updateInfoTime = updateInfoTime;
} }
public String getStockManagerPhone() {
return stockManagerPhone;
}
public void setStockManagerPhone(String stockManagerPhone) {
this.stockManagerPhone = stockManagerPhone;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("stockId", getStockId()) .append("stockId", getStockId())
.append("StockNO", getStockNO()) .append("stockNO", getStockNO())
.append("Stockname", getStockname()) .append("stockName", getStockName())
.append("stockAddr", getStockAddr()) .append("stockAddr", getStockAddr())
.append("stockmanager", getStockmanager()) .append("stockmanager", getStockManager())
.append("stockmemo", getStockmemo()) .append("stockManagerPhone", getStockManagerPhone())
.append("stockmemo", getStockMemo())
.append("defaltItemclass", getDefaltItemclass()) .append("defaltItemclass", getDefaltItemclass())
.append("firstAddTime", getFirstAddTime()) .append("firstAddTime", getFirstAddTime())
.append("updateInfoTime", getUpdateInfoTime()) .append("updateInfoTime", getUpdateInfoTime())

2
ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/StockAdjustServiceImpl.java

@ -68,7 +68,7 @@ public class StockAdjustServiceImpl implements IStockAdjustService {
public int insertStockAdjust(StockAdjust stockAdjust) { public int insertStockAdjust(StockAdjust stockAdjust) {
//获取仓库号 //获取仓库号
StockInfo stockInfo = new StockInfo(); StockInfo stockInfo = new StockInfo();
stockInfo.setStockname(stockAdjust.getStockName()); stockInfo.setStockName(stockAdjust.getStockName());
stockInfo = stockInfoMapper.selectStockInfoList(stockInfo).get(0); stockInfo = stockInfoMapper.selectStockInfoList(stockInfo).get(0);
stockAdjust.setStockNo(stockInfo.getStockNO()); stockAdjust.setStockNo(stockInfo.getStockNO());

4
ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/WarehousingOutHeadServiceImpl.java

@ -167,7 +167,7 @@ public class WarehousingOutHeadServiceImpl implements IWarehousingOutHeadService
} }
} }
StockInfo stockInfo = new StockInfo(); StockInfo stockInfo = new StockInfo();
stockInfo.setStockname(warehousingOutHead.getStockName()); stockInfo.setStockName(warehousingOutHead.getStockName());
List<StockInfo> getStock = stockInfoMapper.selectStockInfoList(stockInfo); List<StockInfo> getStock = stockInfoMapper.selectStockInfoList(stockInfo);
warehousingOutHead.setStockNo(getStock.get(0).getStockNO()); warehousingOutHead.setStockNo(getStock.get(0).getStockNO());
return warehousingOutHeadMapper.insertWarehousingOutHead(warehousingOutHead); return warehousingOutHeadMapper.insertWarehousingOutHead(warehousingOutHead);
@ -198,7 +198,7 @@ public class WarehousingOutHeadServiceImpl implements IWarehousingOutHeadService
warehousingRecordMapper.updateSurplusQty(warehousingRecord); warehousingRecordMapper.updateSurplusQty(warehousingRecord);
} }
StockInfo stockInfo = new StockInfo(); StockInfo stockInfo = new StockInfo();
stockInfo.setStockname(warehousingOutHead.getStockName()); stockInfo.setStockName(warehousingOutHead.getStockName());
List<StockInfo> getStock = stockInfoMapper.selectStockInfoList(stockInfo); List<StockInfo> getStock = stockInfoMapper.selectStockInfoList(stockInfo);
warehousingOutHead.setStockNo(getStock.get(0).getStockNO()); warehousingOutHead.setStockNo(getStock.get(0).getStockNO());
return warehousingOutHeadMapper.insertWarehousingOutHead(warehousingOutHead); return warehousingOutHeadMapper.insertWarehousingOutHead(warehousingOutHead);

2
ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/WarehousingRecordServiceImpl.java

@ -66,7 +66,7 @@ public class WarehousingRecordServiceImpl implements IWarehousingRecordService {
@Override @Override
public int insertWarehousingRecord(WarehousingRecord warehousingRecord) { public int insertWarehousingRecord(WarehousingRecord warehousingRecord) {
StockInfo stockInfo = new StockInfo(); StockInfo stockInfo = new StockInfo();
stockInfo.setStockname(warehousingRecord.getWarehouseName()); stockInfo.setStockName(warehousingRecord.getWarehouseName());
stockInfo = stockInfoMapper.selectStockInfoList(stockInfo).get(0); stockInfo = stockInfoMapper.selectStockInfoList(stockInfo).get(0);
warehousingRecord.setWarehouseNo(stockInfo.getStockNO()); warehousingRecord.setWarehouseNo(stockInfo.getStockNO());
warehousingRecord.setWarehousingrecordDate(new Date()); warehousingRecord.setWarehousingrecordDate(new Date());

33
ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml

@ -6,25 +6,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="StockInfo" id="StockInfoResult"> <resultMap type="StockInfo" id="StockInfoResult">
<result property="stockId" column="stock_id" /> <result property="stockId" column="stock_id" />
<result property="StockNO" column="StockNO" /> <result property="stockNO" column="StockNO" />
<result property="Stockname" column="Stockname" /> <result property="stockName" column="Stockname" />
<result property="stockAddr" column="stockAddr" /> <result property="stockAddr" column="stockAddr" />
<result property="stockmanager" column="stockmanager" /> <result property="stockManager" column="stockmanager" />
<result property="stockmemo" column="stockmemo" /> <result property="stockMemo" column="stockmemo" />
<result property="stockManagerPhone" column="stock_manager_phone" />
<result property="defaltItemclass" column="defalt_itemclass" /> <result property="defaltItemclass" column="defalt_itemclass" />
<result property="firstAddTime" column="first_add_time" /> <result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" /> <result property="updateInfoTime" column="update_info_time" />
</resultMap> </resultMap>
<sql id="selectStockInfoVo"> <sql id="selectStockInfoVo">
select stock_id, StockNO, Stockname, stockAddr, stockmanager, stockmemo, defalt_itemclass, first_add_time, update_info_time from stock_info select stock_id, StockNO, Stockname, stockAddr, stockmanager,stock_manager_phone, stockmemo,
defalt_itemclass, first_add_time, update_info_time from stock_info
</sql> </sql>
<select id="selectStockInfoList" parameterType="StockInfo" resultMap="StockInfoResult"> <select id="selectStockInfoList" parameterType="StockInfo" resultMap="StockInfoResult">
<include refid="selectStockInfoVo"/> <include refid="selectStockInfoVo"/>
<where> <where>
<if test="StockNO != null and StockNO != ''"> and StockNO like concat('%', #{StockNO}, '%')</if> <if test="stockNO != null and stockNO != ''"> and StockNO like concat('%', #{stockNO}, '%')</if>
<if test="Stockname != null and Stockname != ''"> and Stockname like concat('%', #{Stockname}, '%')</if> <if test="stockname != null and stockname != ''"> and Stockname like concat('%', #{stockname}, '%')</if>
<if test="stockAddr != null and stockAddr != ''"> and stockAddr like concat('%', #{stockAddr}, '%')</if> <if test="stockAddr != null and stockAddr != ''"> and stockAddr like concat('%', #{stockAddr}, '%')</if>
<if test="stockmanager != null and stockmanager != ''"> and stockmanager = #{stockmanager}</if> <if test="stockmanager != null and stockmanager != ''"> and stockmanager = #{stockmanager}</if>
<if test="stockmemo != null and stockmemo != ''"> and stockmemo = #{stockmemo}</if> <if test="stockmemo != null and stockmemo != ''"> and stockmemo = #{stockmemo}</if>
@ -49,19 +51,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertStockInfo" parameterType="StockInfo"> <insert id="insertStockInfo" parameterType="StockInfo">
insert into stock_info insert into stock_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="StockNO != null and StockNO != ''">StockNO,</if> <if test="stockNO != null and stockNO != ''">StockNO,</if>
<if test="Stockname != null and Stockname != ''">Stockname,</if> <if test="stockname != null and stockname != ''">Stockname,</if>
<if test="stockAddr != null and stockAddr != ''">stockAddr,</if> <if test="stockAddr != null and stockAddr != ''">stockAddr,</if>
<if test="stockmanager != null">stockmanager,</if> <if test="stockmanager != null">stockmanager,</if>
<if test="stockManagerPhone != null">stock_manager_phone,</if>
<if test="stockmemo != null">stockmemo,</if> <if test="stockmemo != null">stockmemo,</if>
<if test="defaltItemclass != null">defalt_itemclass,</if> <if test="defaltItemclass != null">defalt_itemclass,</if>
first_add_time, first_add_time,
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="StockNO != null and StockNO != ''">#{StockNO},</if> <if test="StockNO != null and StockNO != ''">#{stockNO},</if>
<if test="Stockname != null and Stockname != ''">#{Stockname},</if> <if test="Stockname != null and Stockname != ''">#{stockname},</if>
<if test="stockAddr != null and stockAddr != ''">#{stockAddr},</if> <if test="stockAddr != null and stockAddr != ''">#{stockAddr},</if>
<if test="stockmanager != null">#{stockmanager},</if> <if test="stockmanager != null">#{stockmanager},</if>
<if test="stockManagerPhone != null">#{stockManagerPhone},</if>
<if test="stockmemo != null">#{stockmemo},</if> <if test="stockmemo != null">#{stockmemo},</if>
<if test="defaltItemclass != null">#{defaltItemclass},</if> <if test="defaltItemclass != null">#{defaltItemclass},</if>
now(), now(),
@ -71,10 +75,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateStockInfo" parameterType="StockInfo"> <update id="updateStockInfo" parameterType="StockInfo">
update stock_info update stock_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="StockNO != null and StockNO != ''">StockNO = #{StockNO},</if> <if test="stockNO != null and stockNO != ''">StockNO = #{stockNO},</if>
<if test="Stockname != null and Stockname != ''">Stockname = #{Stockname},</if> <if test="stockname != null and stockname != ''">Stockname = #{stockname},</if>
<if test="stockAddr != null and stockAddr != ''">stockAddr = #{stockAddr},</if> <if test="stockAddr != null and stockAddr != ''">StockAddr = #{stockAddr},</if>
<if test="stockmanager != null">stockmanager = #{stockmanager},</if> <if test="stockmanager != null">stockmanager = #{stockmanager},</if>
<if test="stockManagerPhone != null">stock_manager_phone = #{stockManagerPhone},</if>
<if test="stockmemo != null">stockmemo = #{stockmemo},</if> <if test="stockmemo != null">stockmemo = #{stockmemo},</if>
<if test="defaltItemclass != null">defalt_itemclass = #{defaltItemclass},</if> <if test="defaltItemclass != null">defalt_itemclass = #{defaltItemclass},</if>
update_info_time = CONCAT_WS(',',NOW(),update_info_time), update_info_time = CONCAT_WS(',',NOW(),update_info_time),

64
ruoyi-admin/src/main/resources/templates/stock/stockInfo/stockInfo.html

@ -12,11 +12,11 @@
<ul> <ul>
<li> <li>
<label>仓库编号:</label> <label>仓库编号:</label>
<input type="text" name="StockNO"/> <input type="text" name="stockNO"/>
</li> </li>
<li> <li>
<label>仓库名:</label> <label>仓库名:</label>
<input type="text" name="Stockname"/> <input type="text" name="stockName"/>
</li> </li>
<li> <li>
<label>仓库地址:</label> <label>仓库地址:</label>
@ -24,7 +24,7 @@
</li> </li>
<li> <li>
<label>仓库管理人:</label> <label>仓库管理人:</label>
<input type="text" name="stockmanager"/> <input type="text" name="stockManager"/>
</li> </li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@ -69,59 +69,31 @@
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
clickToSelect: true, clickToSelect: true,
modalName: "仓库信息", modalName: "仓库信息",
columns: [{ columns: [
checkbox: true {checkbox: true},
}, {title: '仓库id',field: 'stockId',visible: false},
{ {title: '仓库编号',field: 'stockNO',},
field: 'stockId', {title: '仓库名',field: 'stockName',},
title: '仓库id', {title: '仓库地址',field: 'stockAddr',},
visible: false {title: '仓库管理人',field: 'stockManager',},
}, {title: '仓库管理人',field: 'stockManagerPhone',},
{ {title: '仓库备注',field: 'stockMemo',},
field: 'stockNO', {title: '录入时间',field: 'firstAddTime',
title: '仓库编号'
},
{
field: 'stockname',
title: '仓库名'
},
{
field: 'stockAddr',
title: '仓库地址'
},
{
field: 'stockmanager',
title: '仓库管理人'
},
{
field: 'stockmemo',
title: '仓库备注'
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) { formatter: function (value, row, index) {
console.log(row) console.log(row)
if (value == null) { if (value == null) {return " ";}
return " "; else {return value;}
} else {
return value;
}
} }
}, },
{ {title: '上次修改时间',field: 'updateInfoTime',
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) { formatter: function (value, row, index) {
if (value == null) { if (value == null) {return " ";}
return " "; else {
} else {
var vArr = value.split(',') var vArr = value.split(',')
return vArr[0]; return vArr[0];
} }
} }
} }
// { // {
// title: '操作', // title: '操作',
// align: 'center', // align: 'center',

Loading…
Cancel
Save