去掉分批数量的bug

This commit is contained in:
季圣华
2020-06-17 23:55:18 +08:00
parent 2600e4f4f5
commit 60e95d4069
6 changed files with 0 additions and 59 deletions

View File

@@ -934,10 +934,6 @@
if(listSubType == "组装单" || listSubType == "拆卸单"){
isShowMaterialTypeColumn = false; //显示
}
var isShowFinishColumn = true; //是否显示分批数量的列,true为隐藏,false为显示
if(listSubType == "销售订单"){
isShowFinishColumn = false; //显示
}
$('#materialDataShow').datagrid({
height:345,
rownumbers: true,
@@ -960,7 +956,6 @@
{ title: anotherDepotHeadName,field: 'AnotherDepotName',hidden:isShowAnotherDepot,width:90},
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
{ title: '分批数量',field: 'finishNumber',editor:'validatebox',hidden:isShowFinishColumn,width:60},
{ title: '单价',field: 'UnitPrice',editor:'validatebox',width:60},
{ title: '含税单价',field: 'TaxUnitPrice',editor:'validattebox',hidden:isShowTaxColumn,width:75},
{ title: '金额',field: 'AllPrice',editor:'validatebox',width:75},

View File

@@ -182,8 +182,6 @@ public class DepotItemController {
item.put("Unit", diEx.getMunit());
item.put("OperNumber", diEx.getOpernumber());
item.put("BasicNumber", diEx.getBasicnumber());
//统计该商品已分批出库的总数量-用于订单
item.put("finishNumber", depotItemService.getFinishNumber(diEx.getMaterialid(),diEx.getHeaderid()));
item.put("UnitPrice", diEx.getUnitprice());
item.put("TaxUnitPrice", diEx.getTaxunitprice());
item.put("AllPrice", diEx.getAllprice());

View File

@@ -106,6 +106,4 @@ public interface DepotItemMapperEx {
@Param("rows") Integer rows, @Param("pid") Integer pid);
int findStockWarningCountTotal( @Param("pid") Integer pid);
BigDecimal getFinishNumber(@Param("mid") Long mid, @Param("linkNumber") String linkNumber);
}

View File

@@ -633,20 +633,6 @@ public class DepotItemService {
return result;
}
/**
* 统计该商品已分批出库的总数量-用于订单
* @param mid
* @param headerId
* @return
*/
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public BigDecimal getFinishNumber(Long mid, Long headerId) {
DepotHead depotHead =depotHeadMapper.selectByPrimaryKey(headerId);
String linkNumber = depotHead.getLinknumber(); //关联单号
BigDecimal count = depotItemMapperEx.getFinishNumber(mid, linkNumber);
return count;
}
/**
* 库存统计
* @param depotId

View File

@@ -422,10 +422,4 @@
AND ifnull(m.delete_Flag, '0') != '1'
AND intype.BasicInNumber > 0
</select>
<select id="getFinishNumber" resultType="java.math.BigDecimal">
select sum(BasicNumber) from jsh_depotitem
where MaterialId=${mid} and headerId
in (select id from jsh_depothead where LinkNumber='${linkNumber}')
</select>
</mapper>

View File

@@ -1,30 +0,0 @@
package com.jsh.erp;
import com.alibaba.fastjson.JSON;
import com.jsh.erp.datasource.entities.Depot;
import com.jsh.erp.service.depot.DepotService;
import com.jsh.erp.service.depotItem.DepotItemService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class DepotItemTest {
@Resource
private DepotItemService depotItemService;
@Test
public void getFinishNumber() throws Exception{
BigDecimal num = depotItemService.getFinishNumber(568l,238l);
log.info("depot result:" + JSON.toJSONString(num));
}
}