解决单据入库数据的bug

This commit is contained in:
季圣华
2018-12-22 12:25:29 +08:00
parent be6a174441
commit 9750415a38
3 changed files with 11 additions and 10 deletions

View File

@@ -342,8 +342,8 @@
mpList: mPropertyList
}),
success: function (res) {
if(res && res.code === 200 && res.data) {
$("#tableData").datagrid('loadData', res.data.rows);
if(res && res.code === 200) {
$("#tableData").datagrid('loadData', res.data);
}
},
//此处添加错误处理

View File

@@ -359,7 +359,7 @@ public class DepotItemController {
Long mId = Long.parseLong(tempUpdatedJson.get("MaterialId").toString());
//以下进行单位换算
String UnitName = findUnitName(mId); //查询计量单位名称
if (!UnitName.equals("")) {
if (!StringUtil.isEmpty(UnitName)) {
String UnitList = UnitName.substring(0, UnitName.indexOf("("));
String RatioList = UnitName.substring(UnitName.indexOf("("));
String basicUnit = UnitList.substring(0, UnitList.indexOf(",")); //基本单位

View File

@@ -148,7 +148,7 @@
</select>
<select id="findByAllCount" resultType="java.lang.Integer">
select count(1)
select count(1) from (select di.Id
from jsh_depotitem di
inner join jsh_material m on di.MaterialId=m.id
where 1=1
@@ -158,6 +158,7 @@
<if test="materialIds != null">
and MaterialId in (${materialIds})
</if>
group by MaterialId) cc
</select>
<select id="findByTypeInIsPrev" resultType="java.lang.Double">
@@ -180,7 +181,7 @@
or
(SubType='礼品充值' and AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime &gt;= '${MonthTime}-01 00:00:00'
and dh.OperTime &lt;= '${MonthTime}-31 59:59:59'
and dh.OperTime &lt;= '${MonthTime}-31 23:59:59'
</select>
<select id="findByTypeOutIsPrev" resultType="java.lang.Double">
@@ -195,7 +196,7 @@
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 23:59:59'
</select>
@@ -219,7 +220,7 @@
or
(SubType='礼品充值' and AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime &gt;= '${MonthTime}-01 00:00:00'
and dh.OperTime &lt;= '${MonthTime}-31 59:59:59'
and dh.OperTime &lt;= '${MonthTime}-31 23:59:59'
</select>
<select id="findPriceByTypeOutIsPrev" resultType="java.lang.Double">
@@ -234,21 +235,21 @@
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 23:59:59'
</select>
<select id="buyOrSaleNumber" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and type='${type}' and subType='${subType}'
and MaterialId =${MId} and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 23:59:59'
</select>
<select id="buyOrSalePrice" resultType="java.lang.Double">
select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and type='${type}' and subType='${subType}'
and MaterialId =${MId} and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 23:59:59'
</select>
<select id="findGiftByTypeIn" resultType="java.lang.Double">