解决库存状态统计的bug
This commit is contained in:
@@ -1385,7 +1385,6 @@
|
|||||||
$("#Debt").val(discountlastmoney-res.changeamount);
|
$("#Debt").val(discountlastmoney-res.changeamount);
|
||||||
$("#AccountDay").val(res.accountday); //结算天数
|
$("#AccountDay").val(res.accountday); //结算天数
|
||||||
preTotalPrice = res.totalprice; //记录前一次合计金额,用于扣预付款
|
preTotalPrice = res.totalprice; //记录前一次合计金额,用于扣预付款
|
||||||
$("#AllocationProjectId").val(res.allocationprojectid);
|
|
||||||
oldNumber = res.number; //记录编辑前的单据编号
|
oldNumber = res.number; //记录编辑前的单据编号
|
||||||
oldId = res.id; //记录单据Id
|
oldId = res.id; //记录单据Id
|
||||||
var editTitle = listTitle.replace("列表","信息");
|
var editTitle = listTitle.replace("列表","信息");
|
||||||
@@ -1470,7 +1469,6 @@
|
|||||||
function showDepotHead(index){
|
function showDepotHead(index){
|
||||||
var res = $("#tableData").datagrid("getRows")[index];
|
var res = $("#tableData").datagrid("getRows")[index];
|
||||||
var manyAccountMoney = 0; //多账户合计-零售
|
var manyAccountMoney = 0; //多账户合计-零售
|
||||||
$("#ProjectIdShow").text(res.projectName);
|
|
||||||
$("#NumberShow").text(res.number);
|
$("#NumberShow").text(res.number);
|
||||||
$("#OperTimeShow").text(res.opertimeStr);
|
$("#OperTimeShow").text(res.opertimeStr);
|
||||||
$('#OrganIdShow').text(res.organName);
|
$('#OrganIdShow').text(res.organName);
|
||||||
@@ -1540,7 +1538,6 @@
|
|||||||
}
|
}
|
||||||
$("#payTypeShow").text(res.paytype);
|
$("#payTypeShow").text(res.paytype);
|
||||||
var TotalPrice = res.totalprice;
|
var TotalPrice = res.totalprice;
|
||||||
$("#AllocationProjectIdShow").text(res.allocationProjectName);
|
|
||||||
var showTitle = listTitle.replace("列表","信息");
|
var showTitle = listTitle.replace("列表","信息");
|
||||||
$('#depotHeadDlgShow').show().dialog('open').dialog('setTitle','<img src="/js/easyui/themes/icons/list.png"/> 查看' + showTitle);
|
$('#depotHeadDlgShow').show().dialog('open').dialog('setTitle','<img src="/js/easyui/themes/icons/list.png"/> 查看' + showTitle);
|
||||||
$(".window-mask").css({ width: webW ,height: webH});
|
$(".window-mask").css({ width: webW ,height: webH});
|
||||||
@@ -1778,7 +1775,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var OrganId = null, ProjectId = null,AllocationProjectId = null;
|
var OrganId = null;
|
||||||
var ChangeAmount = $.trim($("#ChangeAmount").val())-0;
|
var ChangeAmount = $.trim($("#ChangeAmount").val())-0;
|
||||||
var TotalPrice = $("#depotHeadFM .datagrid-footer [field='AllPrice'] div").text();
|
var TotalPrice = $("#depotHeadFM .datagrid-footer [field='AllPrice'] div").text();
|
||||||
if($('#OrganId').length){
|
if($('#OrganId').length){
|
||||||
@@ -1829,8 +1826,6 @@
|
|||||||
var infoStr=JSON.stringify({
|
var infoStr=JSON.stringify({
|
||||||
Type: listType,
|
Type: listType,
|
||||||
SubType: listSubType,
|
SubType: listSubType,
|
||||||
ProjectId: ProjectId,
|
|
||||||
AllocationProjectId: AllocationProjectId,
|
|
||||||
DefaultNumber: $.trim($("#Number").attr("data-defaultNumber")),//初始编号
|
DefaultNumber: $.trim($("#Number").attr("data-defaultNumber")),//初始编号
|
||||||
Number: $.trim($("#Number").val()),
|
Number: $.trim($("#Number").val()),
|
||||||
LinkNumber: $.trim($("#LinkNumber").val()),
|
LinkNumber: $.trim($("#LinkNumber").val()),
|
||||||
|
|||||||
@@ -298,8 +298,10 @@ public class DepotItemController {
|
|||||||
item.put("thisSum", thisSum);
|
item.put("thisSum", thisSum);
|
||||||
for(MaterialExtend me:meList) {
|
for(MaterialExtend me:meList) {
|
||||||
if(me.getMaterialId().longValue() == diEx.getMId().longValue()) {
|
if(me.getMaterialId().longValue() == diEx.getMId().longValue()) {
|
||||||
item.put("UnitPrice", me.getPurchaseDecimal());
|
if(me.getPurchaseDecimal()!=null) {
|
||||||
item.put("thisAllPrice", thisSum.multiply(me.getPurchaseDecimal()));
|
item.put("UnitPrice", me.getPurchaseDecimal());
|
||||||
|
item.put("thisAllPrice", thisSum.multiply(me.getPurchaseDecimal()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dataArray.add(item);
|
dataArray.add(item);
|
||||||
|
|||||||
@@ -117,8 +117,6 @@ public interface DepotHeadMapperEx {
|
|||||||
|
|
||||||
List<DepotHead> getDepotHeadListByHandsPersonIds(@Param("handsPersonIds") String[] handsPersonIds);
|
List<DepotHead> getDepotHeadListByHandsPersonIds(@Param("handsPersonIds") String[] handsPersonIds);
|
||||||
|
|
||||||
List<DepotHead> getDepotHeadListByDepotIds(@Param("depotIds") String[] depotIds);
|
|
||||||
|
|
||||||
BigDecimal getBuyAndSaleStatistics(
|
BigDecimal getBuyAndSaleStatistics(
|
||||||
@Param("type") String type,
|
@Param("type") String type,
|
||||||
@Param("subType") String subType,
|
@Param("subType") String subType,
|
||||||
|
|||||||
@@ -238,21 +238,6 @@ public class DepotService {
|
|||||||
}
|
}
|
||||||
String [] idArray=ids.split(",");
|
String [] idArray=ids.split(",");
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验单据主表 jsh_depothead
|
|
||||||
* */
|
|
||||||
List<DepotHead> depotHeadList=null;
|
|
||||||
try{
|
|
||||||
depotHeadList= depotHeadMapperEx.getDepotHeadListByDepotIds(idArray);
|
|
||||||
}catch(Exception e){
|
|
||||||
JshException.readFail(logger, e);
|
|
||||||
}
|
|
||||||
if(depotHeadList!=null&&depotHeadList.size()>0){
|
|
||||||
logger.error("异常码[{}],异常提示[{}],参数,DepotIds[{}]",
|
|
||||||
ExceptionConstants.DELETE_FORCE_CONFIRM_CODE,ExceptionConstants.DELETE_FORCE_CONFIRM_MSG,ids);
|
|
||||||
throw new BusinessRunTimeException(ExceptionConstants.DELETE_FORCE_CONFIRM_CODE,
|
|
||||||
ExceptionConstants.DELETE_FORCE_CONFIRM_MSG);
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 校验单据子表 jsh_depotitem
|
* 校验单据子表 jsh_depotitem
|
||||||
* */
|
* */
|
||||||
|
|||||||
@@ -306,13 +306,11 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDetailByNumber" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
|
<select id="getDetailByNumber" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
|
||||||
select dh.*, d.name ProjectName, s.supplier OrganName, p.name HandsPersonName, a.name AccountName, dd.name AllocationProjectName
|
select dh.*, s.supplier OrganName, p.name HandsPersonName, a.name AccountName
|
||||||
from jsh_depothead dh
|
from jsh_depothead dh
|
||||||
left join jsh_depot d on dh.ProjectId=d.id and ifnull(d.delete_Flag,'0') !='1'
|
|
||||||
left join jsh_supplier s on dh.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1'
|
left join jsh_supplier s on dh.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1'
|
||||||
left join jsh_person p on dh.HandsPersonId=p.id and ifnull(p.delete_Flag,'0') !='1'
|
left join jsh_person p on dh.HandsPersonId=p.id and ifnull(p.delete_Flag,'0') !='1'
|
||||||
left join jsh_account a on dh.AccountId=a.id and ifnull(a.delete_Flag,'0') !='1'
|
left join jsh_account a on dh.AccountId=a.id and ifnull(a.delete_Flag,'0') !='1'
|
||||||
left join jsh_depot dd on dh.AllocationProjectId=dd.id and ifnull(dd.delete_Flag,'0') !='1'
|
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="number != null">
|
<if test="number != null">
|
||||||
and dh.Number='${number}'
|
and dh.Number='${number}'
|
||||||
@@ -374,26 +372,6 @@
|
|||||||
)
|
)
|
||||||
and ifnull(delete_Flag,'0') !='1'
|
and ifnull(delete_Flag,'0') !='1'
|
||||||
</select>
|
</select>
|
||||||
<select id="getDepotHeadListByDepotIds" resultMap="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="com.jsh.erp.datasource.mappers.DepotHeadMapper.Base_Column_List" />
|
|
||||||
from jsh_depothead
|
|
||||||
where 1=1
|
|
||||||
and
|
|
||||||
(ProjectId in (
|
|
||||||
<foreach collection="depotIds" item="depotId" separator=",">
|
|
||||||
#{depotId}
|
|
||||||
</foreach>
|
|
||||||
)
|
|
||||||
OR
|
|
||||||
AllocationProjectId in (
|
|
||||||
<foreach collection="depotIds" item="depotId" separator=",">
|
|
||||||
#{depotId}
|
|
||||||
</foreach>
|
|
||||||
)
|
|
||||||
)
|
|
||||||
and ifnull(delete_Flag,'0') !='1'
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getBuyAndSaleStatistics" resultType="java.math.BigDecimal">
|
<select id="getBuyAndSaleStatistics" resultType="java.math.BigDecimal">
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
Reference in New Issue
Block a user