Commit 18c71863 by liuyang

2024-07-15 原燃料入库成本核算和原燃料出库成本核算bug修复

parent d430a272
......@@ -368,9 +368,11 @@ public class HGCBTools {
BigDecimal endAmount = hgcb004 == null ? BigDecimal.ZERO : hgcb004.getEndAmount();
quantity = quantity.add(endQuantity);
amount = amount.add(endAmount);
BigDecimal price = amount.divide(quantity, 3, RoundingMode.HALF_UP);
cb003.setPrice(price);
cb003.setAmount(cb003.getQuantity().multiply(price));
if (quantity.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal price = amount.divide(quantity, 3, RoundingMode.HALF_UP);
cb003.setPrice(price);
cb003.setAmount(cb003.getQuantity().multiply(price));
}
cb003.setIsEstimate(0);
results.add(cb003);
//DaoUtils.insert(HGCB003.INSERT, cb003);
......
......@@ -274,7 +274,7 @@ public class ServiceHGCW001 extends ServiceBase {
throw new PlatException(String.format("公司[%s]会计期[%s]会计期维护为关账状态,业务账期关账失败!", hgcb001.getCompanyCode(),hgcw001.getAccountPeriod()));
}
//检查数据
HGCWTools.HgCw001.checkAllData(hgcw001);
//HGCWTools.HgCw001.checkAllData(hgcw001);
hgcw001.setAccountPeriodStatus(0); //关账
DaoUtils.update("HGCW001.updateSwitchRow", hgcw001);
......
......@@ -363,6 +363,23 @@
ID = #id#
</update>
<select id="queryInvoicing" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW012">
SELECT
<include refid="column" />
FROM ${hggpSchema}.HGCW012 WHERE REVIEW_STATUS = '1'
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
<select id="queryCheckList" parameterClass="java.util.HashMap" resultClass="com.baosight.hggp.hg.cw.domain.HGCW012">
SELECT
<include refid="column" />
......
......@@ -49,7 +49,7 @@ public class HGCWTools {
Map<String, Object> params = new HashMap<>();
params.put("companyCode", companyCode);
List<HGCW001> list = DaoBase.getInstance().query("HGCW001.getMaxAccountPeriod", params);
AssertUtils.isEmpty(list, "未找到公司对应的会计期");
AssertUtils.isEmpty(list, "未找到公司有关账状态的会计期");
return list.get(0);
}
......
......@@ -322,7 +322,7 @@
</select>
<select id="queryList" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC007A">
resultClass="com.baosight.hggp.hg.kc.domain.HGKC007B">
SELECT
A.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
A.DEP_CODE as "depCode", <!-- 部门编码 -->
......
......@@ -26,7 +26,7 @@
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="业务类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
<EF:EFCodeOption codeName="hggp.hgcb.bizType"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="accountPeriod" cname="会计期" colWidth="3"
format="yyyy-MM" depth="year" start="year" required="true"/>
......@@ -48,7 +48,7 @@
<EF:EFColumn ename="accountPeriod" cname="会计期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"/>
<EF:EFComboColumn ename="bizType" cname="业务类型" width="120" enable="false" align="center" required="true">
<EF:EFCodeOption codeName="hggp.hgsj.computeType"/>
<EF:EFCodeOption codeName="hggp.hgcb.bizType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date" enable="false"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="false" required="true"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment