增加调拨明细
This commit is contained in:
@@ -330,6 +330,7 @@ INSERT INTO `jsh_function` VALUES ('244', '030112', '库存预警', '0301', '/re
|
|||||||
INSERT INTO `jsh_function` VALUES ('245', '000107', '插件管理', '0001', '/system/plugin', '/system/PluginList', '\0', '0170', '', '电脑版', '1', 'profile', '0');
|
INSERT INTO `jsh_function` VALUES ('245', '000107', '插件管理', '0001', '/system/plugin', '/system/PluginList', '\0', '0170', '', '电脑版', '1', 'profile', '0');
|
||||||
INSERT INTO `jsh_function` VALUES ('246', '030113', '商品库存', '0301', '/report/material_stock', '/report/MaterialStock', '\0', '0605', '', '电脑版', '', 'profile', '0');
|
INSERT INTO `jsh_function` VALUES ('246', '030113', '商品库存', '0301', '/report/material_stock', '/report/MaterialStock', '\0', '0605', '', '电脑版', '', 'profile', '0');
|
||||||
INSERT INTO `jsh_function` VALUES ('247', '010105', '多属性', '0101', '/material/material_attribute', '/material/MaterialAttributeList', '\0', '0250', '', '电脑版', '1', 'profile', '0');
|
INSERT INTO `jsh_function` VALUES ('247', '010105', '多属性', '0101', '/material/material_attribute', '/material/MaterialAttributeList', '\0', '0250', '', '电脑版', '1', 'profile', '0');
|
||||||
|
INSERT INTO `jsh_function` VALUES ('248', '030150', '调拨明细', '0301', '/report/allocation_detail', '/report/AllocationDetail', '\0', '0646', '', '电脑版', '', 'profile', '0');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for jsh_in_out_item
|
-- Table structure for jsh_in_out_item
|
||||||
|
|||||||
@@ -1183,4 +1183,11 @@ alter table jsh_depot_item drop column other_field5;
|
|||||||
-- by jishenghua
|
-- by jishenghua
|
||||||
-- 移除机构表的全名字段
|
-- 移除机构表的全名字段
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
alter table jsh_depot_item add sku varchar(50) DEFAULT NULL COMMENT '多属性' after material_unit;
|
alter table jsh_depot_item add sku varchar(50) DEFAULT NULL COMMENT '多属性' after material_unit;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
-- 时间 2021年7月29日
|
||||||
|
-- by jishenghua
|
||||||
|
-- 增加调拨明细菜单
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
INSERT INTO `jsh_function` VALUES ('248', '030150', '调拨明细', '0301', '/report/allocation_detail', '/report/AllocationDetail', '\0', '0646', '', '电脑版', '', 'profile', '0');
|
||||||
|
|||||||
@@ -174,6 +174,50 @@ public class DepotHeadController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调拨明细接口 TODO:by sdw 20210724
|
||||||
|
* @param currentPage
|
||||||
|
* @param pageSize
|
||||||
|
* @param oId
|
||||||
|
* @param materialParam
|
||||||
|
* @param depotIdF 调出仓库
|
||||||
|
* @param depotId 调入仓库
|
||||||
|
* @param beginTime
|
||||||
|
* @param endTime
|
||||||
|
* @param subType
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/findAllocationDetail")
|
||||||
|
public BaseResponseInfo findallocationDetail(@RequestParam("currentPage") Integer currentPage,
|
||||||
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
|
@RequestParam("organId") Integer oId,
|
||||||
|
@RequestParam("materialParam") String materialParam,
|
||||||
|
@RequestParam("depotId") Integer depotId,
|
||||||
|
@RequestParam("depotIdF") Integer depotIdF,
|
||||||
|
@RequestParam("beginTime") String beginTime,
|
||||||
|
@RequestParam("endTime") String endTime,
|
||||||
|
@RequestParam("subType") String subType,
|
||||||
|
HttpServletRequest request)throws Exception {
|
||||||
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
try {
|
||||||
|
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
|
||||||
|
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||||
|
List<DepotHeadVo4InDetail> list = depotHeadService.findAllocationDetail(beginTime, endTime, subType, materialParam, depotId, depotIdF, oId, (currentPage-1)*pageSize, pageSize);
|
||||||
|
int total = depotHeadService.findAllocationDetailCount(beginTime, endTime, subType, materialParam, depotId, depotIdF,oId);
|
||||||
|
map.put("rows", list);
|
||||||
|
map.put("total", total);
|
||||||
|
res.code = 200;
|
||||||
|
res.data = map;
|
||||||
|
} catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
res.code = 500;
|
||||||
|
res.data = "获取数据失败";
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对账单接口
|
* 对账单接口
|
||||||
* @param currentPage
|
* @param currentPage
|
||||||
|
|||||||
@@ -87,6 +87,26 @@ public interface DepotHeadMapperEx {
|
|||||||
@Param("depotId") Integer depotId,
|
@Param("depotId") Integer depotId,
|
||||||
@Param("oId") Integer oId);
|
@Param("oId") Integer oId);
|
||||||
|
|
||||||
|
List<DepotHeadVo4InDetail> findAllocationDetail(
|
||||||
|
@Param("beginTime") String beginTime,
|
||||||
|
@Param("endTime") String endTime,
|
||||||
|
@Param("subType") String subType,
|
||||||
|
@Param("materialParam") String materialParam,
|
||||||
|
@Param("depotId") Integer depotId,
|
||||||
|
@Param("depotIdF") Integer depotIdF,
|
||||||
|
@Param("oId") Integer oId,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("rows") Integer rows);
|
||||||
|
|
||||||
|
int findAllocationDetailCount(
|
||||||
|
@Param("beginTime") String beginTime,
|
||||||
|
@Param("endTime") String endTime,
|
||||||
|
@Param("subType") String subType,
|
||||||
|
@Param("materialParam") String materialParam,
|
||||||
|
@Param("depotId") Integer depotId,
|
||||||
|
@Param("depotIdF") Integer depotIdF,
|
||||||
|
@Param("oId") Integer oId);
|
||||||
|
|
||||||
List<DepotHeadVo4StatementAccount> findStatementAccount(
|
List<DepotHeadVo4StatementAccount> findStatementAccount(
|
||||||
@Param("beginTime") String beginTime,
|
@Param("beginTime") String beginTime,
|
||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ public class DepotHeadVo4InDetail {
|
|||||||
|
|
||||||
private BigDecimal UnitPrice;
|
private BigDecimal UnitPrice;
|
||||||
|
|
||||||
|
private String mUnit;
|
||||||
|
|
||||||
|
private String newRemark;
|
||||||
|
|
||||||
private BigDecimal OperNumber;
|
private BigDecimal OperNumber;
|
||||||
|
|
||||||
private BigDecimal AllPrice;
|
private BigDecimal AllPrice;
|
||||||
@@ -80,6 +84,22 @@ public class DepotHeadVo4InDetail {
|
|||||||
UnitPrice = unitPrice;
|
UnitPrice = unitPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getmUnit() {
|
||||||
|
return mUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setmUnit(String mUnit) {
|
||||||
|
this.mUnit = mUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewRemark() {
|
||||||
|
return newRemark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewRemark(String newRemark) {
|
||||||
|
this.newRemark = newRemark;
|
||||||
|
}
|
||||||
|
|
||||||
public BigDecimal getOperNumber() {
|
public BigDecimal getOperNumber() {
|
||||||
return OperNumber;
|
return OperNumber;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -421,6 +421,26 @@ public class DepotHeadService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<DepotHeadVo4InDetail> findAllocationDetail(String beginTime, String endTime, String subType, String materialParam, Integer depotId, Integer depotIdF, Integer oId, Integer offset, Integer rows) throws Exception{
|
||||||
|
List<DepotHeadVo4InDetail> list = null;
|
||||||
|
try{
|
||||||
|
list =depotHeadMapperEx.findAllocationDetail(beginTime, endTime, subType, materialParam, depotId, depotIdF, oId, offset, rows);
|
||||||
|
}catch(Exception e){
|
||||||
|
JshException.readFail(logger, e);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int findAllocationDetailCount(String beginTime, String endTime, String subType, String materialParam, Integer depotId, Integer depotIdF,Integer oId) throws Exception{
|
||||||
|
int result = 0;
|
||||||
|
try{
|
||||||
|
result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, materialParam, depotId,depotIdF, oId);
|
||||||
|
}catch(Exception e){
|
||||||
|
JshException.readFail(logger, e);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public List<DepotHeadVo4StatementAccount> findStatementAccount(String beginTime, String endTime, Integer organId, String supType, Integer offset, Integer rows)throws Exception {
|
public List<DepotHeadVo4StatementAccount> findStatementAccount(String beginTime, String endTime, Integer organId, String supType, Integer offset, Integer rows)throws Exception {
|
||||||
List<DepotHeadVo4StatementAccount> list = null;
|
List<DepotHeadVo4StatementAccount> list = null;
|
||||||
try{
|
try{
|
||||||
|
|||||||
@@ -172,8 +172,8 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
|
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
|
||||||
select dh.number,me.bar_code, m.`name` MName,m.model,m.standard,di.unit_price,di.oper_number,di.all_price,s.supplier SName,d.dName DName,
|
select dh.number,me.bar_code, m.`name` MName,m.model,m.standard,di.unit_price,di.material_unit as mUnit,di.oper_number,di.all_price,s.supplier SName,d.dName DName,
|
||||||
date_format(dh.oper_time, '%Y-%m-%d') OperTime, concat(dh.sub_type,dh.type) as NewType
|
date_format(dh.oper_time, '%Y-%m-%d') OperTime, concat(dh.sub_type,dh.type) as NewType, concat_ws(' ',dh.remark,di.remark) as newRemark
|
||||||
from jsh_depot_head dh
|
from jsh_depot_head dh
|
||||||
inner join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
|
inner join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
|
||||||
inner join jsh_material m on m.id=di.material_id and ifnull(m.delete_flag,'0') !='1'
|
inner join jsh_material m on m.id=di.material_id and ifnull(m.delete_flag,'0') !='1'
|
||||||
@@ -303,6 +303,62 @@
|
|||||||
GROUP BY di.material_id,m.mName,m.Model,m.standard,m.categoryName) a
|
GROUP BY di.material_id,m.mName,m.Model,m.standard,m.categoryName) a
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findAllocationDetail" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
|
||||||
|
select dh.number,me.bar_code, m.`name` MName,m.model,m.standard,di.unit_price,di.material_unit as mUnit,di.oper_number,di.all_price,SName, d.dName DName,
|
||||||
|
date_format(dh.oper_time, '%Y-%m-%d') OperTime, concat(dh.sub_type,dh.type) as NewType, concat_ws(' ',dh.remark,di.remark) as newRemark
|
||||||
|
from jsh_depot_head dh
|
||||||
|
inner join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
|
||||||
|
inner join jsh_material m on m.id=di.material_id and ifnull(m.delete_flag,'0') !='1'
|
||||||
|
left join jsh_material_extend me on me.id=di.material_extend_id and ifnull(me.delete_Flag,'0') !='1'
|
||||||
|
inner join (select id,name as dName,delete_Flag from jsh_depot ) d on d.id=di.depot_id and ifnull(d.delete_Flag,'0') !='1'
|
||||||
|
<!-- 调出仓库名查询 -->
|
||||||
|
inner join (select id as aid,name as SName,delete_Flag as adelete_Flag from jsh_depot ) ddd on ddd.aid=di.another_depot_id and ifnull(ddd.adelete_Flag,'0') !='1'
|
||||||
|
where dh.oper_time >=#{beginTime} and dh.oper_time <=#{endTime}
|
||||||
|
<if test="depotIdF != null">
|
||||||
|
and di.depot_id = #{depotIdF}
|
||||||
|
</if>
|
||||||
|
<if test="depotId != null">
|
||||||
|
and di.another_depot_id = #{depotId}
|
||||||
|
</if>
|
||||||
|
<if test="subType != null">
|
||||||
|
and dh.sub_type=#{subType}
|
||||||
|
</if>
|
||||||
|
<if test="materialParam != null and materialParam !=''">
|
||||||
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||||
|
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey} or dh.remark like #{bindKey})
|
||||||
|
</if>
|
||||||
|
and ifnull(dh.delete_flag,'0') !='1'
|
||||||
|
ORDER BY oper_time DESC,number desc
|
||||||
|
<if test="offset != null and rows != null">
|
||||||
|
limit #{offset},#{rows}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findAllocationDetailCount" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from jsh_depot_head dh
|
||||||
|
inner join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
|
||||||
|
inner join jsh_material m on m.id=di.material_id and ifnull(m.delete_Flag,'0') !='1'
|
||||||
|
left join jsh_material_extend me on me.id=di.material_extend_id and ifnull(me.delete_Flag,'0') !='1'
|
||||||
|
inner join (select id,name as dName,delete_Flag from jsh_depot) d on d.id=di.depot_id and ifnull(d.delete_Flag,'0') !='1'
|
||||||
|
where dh.oper_time >=#{beginTime} and dh.oper_time <=#{endTime}
|
||||||
|
<if test="depotIdF != null">
|
||||||
|
and di.depot_id = #{depotIdF}
|
||||||
|
</if>
|
||||||
|
<if test="depotId != null">
|
||||||
|
and di.another_depot_id = #{depotId}
|
||||||
|
</if>
|
||||||
|
<if test="subType != null">
|
||||||
|
and dh.sub_type=#{subType}
|
||||||
|
</if>
|
||||||
|
<if test="materialParam != null and materialParam !=''">
|
||||||
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||||
|
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey} or dh.remark like #{bindKey})
|
||||||
|
</if>
|
||||||
|
and ifnull(dh.delete_flag,'0') !='1'
|
||||||
|
ORDER BY oper_time DESC,number desc
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="findStatementAccount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStatementAccount">
|
<select id="findStatementAccount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStatementAccount">
|
||||||
select dh.number,concat(dh.sub_type,dh.type) as type,dh.discount_last_money,dh.other_money,dh.change_amount,s.supplier supplierName,
|
select dh.number,concat(dh.sub_type,dh.type) as type,dh.discount_last_money,dh.other_money,dh.change_amount,s.supplier supplierName,
|
||||||
date_format(dh.oper_time,'%Y-%m-%d %H:%i:%S') as oTime from jsh_depot_head dh
|
date_format(dh.oper_time,'%Y-%m-%d %H:%i:%S') as oTime from jsh_depot_head dh
|
||||||
|
|||||||
Reference in New Issue
Block a user