Commit 1a7f3bfe by 史文博

Merge branch 'feature/form_statistics_05' into 'develop'

Feature/form statistics 05

See merge request kunlun/xyst_dinas/xyst_dinas_backend!39
parents f689c85c e20667d9
......@@ -57,6 +57,22 @@
<annotation id='ba572b97-84e3-477c-af1f-e020d05607d3' attributeId='22812966-2834-4435-816e-0c81ea0ea0eb' name='mappingType' value='many-to-one'>
</annotation>
</attribute>
<attribute id='1cbf37bb-942b-40e1-b417-c602251965fa' name='projectCoordinate' columnName='project_coordinate' title='项目坐标' type='string' default='' precision='' isArray='false'>
<annotation id='d0fdf049-9e39-45bd-acac-222960fe59ee' attributeId='73043a07-9a43-49d0-aa3a-c23fbc357db8' name='length' value='255'>
</annotation>
</attribute>
<attribute id='85d85261-d35a-478e-a787-e7563764cf20' name='province' columnName='province' title='省' type='string' default='' precision='' isArray='false'>
<annotation id='6bfbd7ec-eb08-4107-b378-0e566a765608' attributeId='2ea04bfd-dbb2-4129-bc06-7d554fdfe1f9' name='length' value='100'>
</annotation>
</attribute>
<attribute id='9e37326e-4761-400e-a1f4-51900463fb6d' name='city' columnName='city' title='市' type='string' default='' precision='' isArray='false'>
<annotation id='f4c484ea-d549-485f-8616-d9388c4dfa0f' attributeId='9ea826c2-e843-4452-b4ea-b48b7195de96' name='length' value='100'>
</annotation>
</attribute>
<attribute id='4440fd82-2912-420c-98e6-65460e775b9a' name='district' columnName='district' title='区' type='string' default='' precision='' isArray='false'>
<annotation id='1ce37e09-02c3-4ee1-8b0d-267e61322057' attributeId='ba85dc54-b353-43aa-9abd-9b1e7ba587b1' name='length' value='100'>
</annotation>
</attribute>
<childModel id='8561c49e-d5ae-4418-8714-738be6daffc3' attributeId='06a76145-09c6-4e88-b91e-66aec616b9ca' refParentAttributeId='23fc82e2-e7b6-49fc-96cc-bb947ba2cc99' name='ProjectFiledDinasDetail' tableName='xyst_dinas_project_filed_dinas_detail' domainInherit='' title='砂石明细表' >
<parent>com.beecode.bap.biztrait.datamodel.StoreSubTableRequirement</parent>
<attribute id='db24a0fd-1481-41e0-b2e7-c02793455f0a' name='dinasType' columnName='dinas_type' title='砂石类型' type='com.xyst.dinas.biz.datamodel.DinasType' default='' precision='' isArray='false'>
......
......@@ -101,6 +101,43 @@
</ref>
<description></description>
</field>
<field title='项目坐标'>
<name>projectCoordinate</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='省'>
<name>province</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='市'>
<name>city</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='区'>
<name>district</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='用砂单位'>
<name>useSandComany</name>
<type>string</type>
......
......@@ -95,6 +95,43 @@
</ref>
<description></description>
</field>
<field title='项目坐标'>
<name>projectCoordinate</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='省'>
<name>province</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='市'>
<name>city</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='区'>
<name>district</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='用砂单位'>
<name>useSandComany</name>
<type>string</type>
......
......@@ -69,6 +69,18 @@
<property name="remark" type="nstring" not-null="false">
<column name="remark" length="3000"></column>
</property>
<property name="projectCoordinate" type="nstring" not-null="false">
<column name="project_coordinate" length="255"></column>
</property>
<property name="province" type="nstring" not-null="false">
<column name="province" length="100"></column>
</property>
<property name="city" type="nstring" not-null="false">
<column name="city" length="100"></column>
</property>
<property name="district" type="nstring" not-null="false">
<column name="district" length="100"></column>
</property>
<bag name="ProjectFiledDinasDetails" lazy="true" fetch="select" inverse="true">
<key column="master_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.project.datamodel.ProjectFiledAssociatedProjectFiledDinasDetail" />
......
......@@ -37,4 +37,7 @@ public interface AdvancePaymentBalanceSumConstants {
public static final String TOTALMARGIN = "totalMargin";
/** 保证金退款额*/
public static final String MARGINREFUND = "marginRefund";
/** 销售数量*/
public static final String DEALAMOUNT = "dealAmount";
}
......@@ -36,7 +36,10 @@ public class AdvancePaymentBalanceSum {
* 预付款余额
*/
private String advanceBalance ;
/**
* 销售数量
*/
private String dealAmount ;
/**
* 一月销售额
*/
......@@ -199,5 +202,12 @@ public class AdvancePaymentBalanceSum {
public void setDecAmount(String decAmount) {
this.decAmount = decAmount;
}
public String getDealAmount() {
return dealAmount;
}
public void setDealAmount(String dealAmount) {
this.dealAmount = dealAmount;
}
}
......@@ -59,6 +59,7 @@ public class AdvancePaymentBalanceSumDaoImpl implements AdvancePaymentBalanceSum
hql.append("xx.i1 as i , ");// 预付款余额
hql.append("sum( xx.j1 ) as j , ");// 保证金总额
hql.append("sum(xx.q1) as q ");// 保证金退款额
hql.append("xx.dealMount as dealMount");//销售数量
hql.append("from (").append(
" SELECT REGIONALCOMPANY.id AS a1 , PURCHASESANDUNIT.id AS b1, CONTRACT.id AS c1, PROJECT.id AS d1, ");
if (!flag) {
......@@ -67,6 +68,7 @@ public class AdvancePaymentBalanceSumDaoImpl implements AdvancePaymentBalanceSum
hql.append(" 0.00 AS e1, ");
}
hql.append(" sum( SALESRECODE.amount ) AS f1, ");
hql.append(" sum( deal_amount ) AS dealMount ");
hql.append(
" CASE WHEN ARTIFICIAL.fund_type = 'DEPOSIT' THEN 0.00 ELSE sum( ARTIFICIAL.recharge_amount ) END AS g1, ");
hql.append(
......@@ -130,6 +132,7 @@ public class AdvancePaymentBalanceSumDaoImpl implements AdvancePaymentBalanceSum
map.put("advance_balance", resule.get(7, BigDecimal.class));
map.put("total_margin", resule.get(8, BigDecimal.class));
map.put("margin_refund", resule.get(9, BigDecimal.class));
map.put("deal_Amount", resule.get(10, BigDecimal.class));
// map.put("total_margin", BigDecimal.valueOf(resule.get(8,Double.class)));
// map.put("margin_refund", BigDecimal.valueOf(resule.get(9,Double.class)));
list.add(map);
......
......@@ -80,6 +80,7 @@ public class AdvancePaymentBalanceSumServiceImpl implements AdvancePaymentBalanc
AdvancePaymentBalanceSum.set(AdvancePaymentBalanceSumConstants.DEALDAY, nowDate.substring(8, 10));
AdvancePaymentBalanceSum.set(AdvancePaymentBalanceSumConstants.TOTALMARGIN, (BigDecimal)mp.get("total_margin"));
AdvancePaymentBalanceSum.set(AdvancePaymentBalanceSumConstants.MARGINREFUND, (BigDecimal)mp.get("margin_refund"));
AdvancePaymentBalanceSum.set(AdvancePaymentBalanceSumConstants.DEALAMOUNT,(BigDecimal)mp.get("deal_Amount"));
advancePaymentBalanceSumDao.save(AdvancePaymentBalanceSum);
state = true;
}}catch (Exception e) {
......
......@@ -74,6 +74,11 @@
<annotation id="0282d7c3-b8a4-484e-9a5f-19c264739f02" attributeId="ed6f6520-045c-4ef9-b73c-02df304faeb8" name="precision" value="12"/>
<annotation id="b3e1654e-43b7-442f-a39e-38a692542f64" attributeId="c131a126-c624-432f-b88f-b36bdd94e2fb" name="scale" value="4"/>
</attribute>
<attribute id="e714bec9-b74e-420b-afd2-9eae0271f859" name="dealAmount" columnName="deal_amount" title="销售数量" type="fixnum" default="" precision="" isArray="false">
<annotation id="597e55d9-1bd0-4f82-b90e-6521e8cd52b1" attributeId="c54aa92f-741b-4129-bdb9-0a301842647e" name="length" value="100"/>
<annotation id="97010686-d198-4357-8f02-db12bbea1cbd" attributeId="64687122-be70-4eac-b264-4a3d89e5b9d2" name="precision" value="12"/>
<annotation id="6bb2ffd8-063c-49d9-a3e9-8ac23ad75faf" attributeId="59efb6ee-3460-4923-b341-7951aa29c882" name="scale" value="4"/>
</attribute>
<hibernate>/xyst.dinas.statistics/src/main/resources/config/AdvancePaymentAndBalanceSummary.hbm.xml</hibernate>
</dataModel>
</content>
......
......@@ -50,5 +50,8 @@
<property name="marginRefund" type="big_decimal" not-null="false">
<column name="margin_refund" precision="12" scale="4"/>
</property>
<property name="dealAmount" type="big_decimal" not-null="false">
<column name="deal_amount" precision="12" scale="4"/>
</property>
</class>
</hibernate-mapping>
\ No newline at end of file
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