xs il y a 5 ans
Parent
commit
6827c48768

+ 18 - 18
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/entity/ErpCredit.java

@@ -31,8 +31,8 @@ public class ErpCredit extends DataEntity<ErpCredit>{
     private Double tenKvItsLine;//10kv线路
     private Double tenKvItesFhvFollow;//400v以下
     private String supplierName;//供应商名称
-    private List<ErpCreditChild1> erpCreditChild1s = new ArrayList<ErpCreditChild1>();
-    private List<ErpCreditChild2> erpCreditChild2s = new ArrayList<ErpCreditChild2>();
+    private List<ErpCreditEquipment> erpCreditChild1s = new ArrayList<ErpCreditEquipment>();
+    private List<ErpCreditMaterial> erpCreditChild2s = new ArrayList<ErpCreditMaterial>();
 
     public static long getSerialVersionUID() {
         return serialVersionUID;
@@ -214,22 +214,6 @@ public class ErpCredit extends DataEntity<ErpCredit>{
         this.supplierName = supplierName;
     }
 
-    public List<ErpCreditChild1> getErpCreditChild1s() {
-        return erpCreditChild1s;
-    }
-
-    public void setErpCreditChild1s(List<ErpCreditChild1> erpCreditChild1s) {
-        this.erpCreditChild1s = erpCreditChild1s;
-    }
-
-    public List<ErpCreditChild2> getErpCreditChild2s() {
-        return erpCreditChild2s;
-    }
-
-    public void setErpCreditChild2s(List<ErpCreditChild2> erpCreditChild2s) {
-        this.erpCreditChild2s = erpCreditChild2s;
-    }
-
     @Override
     public String toString() {
         return "ErpCredit{" +
@@ -259,4 +243,20 @@ public class ErpCredit extends DataEntity<ErpCredit>{
                 ", erpCreditChild2s=" + erpCreditChild2s +
                 '}';
     }
+
+    public List<ErpCreditEquipment> getErpCreditChild1s() {
+        return erpCreditChild1s;
+    }
+
+    public void setErpCreditChild1s(List<ErpCreditEquipment> erpCreditChild1s) {
+        this.erpCreditChild1s = erpCreditChild1s;
+    }
+
+    public List<ErpCreditMaterial> getErpCreditChild2s() {
+        return erpCreditChild2s;
+    }
+
+    public void setErpCreditChild2s(List<ErpCreditMaterial> erpCreditChild2s) {
+        this.erpCreditChild2s = erpCreditChild2s;
+    }
 }

+ 0 - 95
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/entity/ErpCreditChild1.java

@@ -1,95 +0,0 @@
-package com.jeeplus.modules.sg.financial.erpcredit.entity;
-
-import com.jeeplus.core.persistence.DataEntity;
-
-public class ErpCreditChild1 extends DataEntity<ErpCreditChild1> {//设备费实体类
-    private static final long serialVersionUID = 1L;
-
-    private String eqmMaterialDetails1;//设备物料描述
-    private String eqmUnit;//设备单位
-    private Double eqmNumbers;//设备台数
-    private String eqmTotalCapacity;//设备总容量
-    private Double eqmBookedFee1;//设备入账金额
-    private String eqmSupplierName;//供应商
-    private ErpCredit erpCredit;//父类
-
-    public ErpCreditChild1(){
-
-    }
-    public ErpCreditChild1(ErpCredit erpCredit) {
-        this.erpCredit = erpCredit;
-    }
-
-    public static long getSerialVersionUID() {
-        return serialVersionUID;
-    }
-
-    public String getEqmMaterialDetails1() {
-        return eqmMaterialDetails1;
-    }
-
-    public void setEqmMaterialDetails1(String eqmMaterialDetails1) {
-        this.eqmMaterialDetails1 = eqmMaterialDetails1;
-    }
-
-    public String getEqmUnit() {
-        return eqmUnit;
-    }
-
-    public void setEqmUnit(String eqmUnit) {
-        this.eqmUnit = eqmUnit;
-    }
-
-    public Double getEqmNumbers() {
-        return eqmNumbers;
-    }
-
-    public void setEqmNumbers(Double eqmNumbers) {
-        this.eqmNumbers = eqmNumbers;
-    }
-
-    public String getEqmTotalCapacity() {
-        return eqmTotalCapacity;
-    }
-
-    public void setEqmTotalCapacity(String eqmTotalCapacity) {
-        this.eqmTotalCapacity = eqmTotalCapacity;
-    }
-
-    public Double getEqmBookedFee1() {
-        return eqmBookedFee1;
-    }
-
-    public void setEqmBookedFee1(Double eqmBookedFee1) {
-        this.eqmBookedFee1 = eqmBookedFee1;
-    }
-
-    public String getEqmSupplierName() {
-        return eqmSupplierName;
-    }
-
-    public void setEqmSupplierName(String eqmSupplierName) {
-        this.eqmSupplierName = eqmSupplierName;
-    }
-
-    public ErpCredit getErpCredit() {
-        return erpCredit;
-    }
-
-    public void setErpCredit(ErpCredit erpCredit) {
-        this.erpCredit = erpCredit;
-    }
-
-    @Override
-    public String toString() {
-        return "ErpCreditChild1{" +
-                "eqmMaterialDetails1='" + eqmMaterialDetails1 + '\'' +
-                ", eqmUnit='" + eqmUnit + '\'' +
-                ", eqmNumbers=" + eqmNumbers +
-                ", eqmTotalCapacity='" + eqmTotalCapacity + '\'' +
-                ", eqmBookedFee1=" + eqmBookedFee1 +
-                ", eqmSupplierName='" + eqmSupplierName + '\'' +
-                ", erpCredit=" + erpCredit +
-                '}';
-    }
-}

+ 3 - 14
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/entity/ErpCreditChild2.java

@@ -2,7 +2,7 @@ package com.jeeplus.modules.sg.financial.erpcredit.entity;
 
 import com.jeeplus.core.persistence.DataEntity;
 
-public class ErpCreditChild2 extends DataEntity<ErpCreditChild2> {//材料费实体类
+public class ErpCreditMaterial extends DataEntity<ErpCreditMaterial> {//材料费实体类
     private static final long serialVersionUID = 1L;
     private Double mtlBookedFee2;//材料 入账金额
     private String eqmMaterialDetails2;//设备物料描述
@@ -11,10 +11,10 @@ public class ErpCreditChild2 extends DataEntity<ErpCreditChild2> {//材料费实
     private String mtlSupplierName;//供应商
     private ErpCredit erpCredit;//父类
 
-    public ErpCreditChild2(ErpCredit erpCredit) {
+    public ErpCreditMaterial(ErpCredit erpCredit) {
         this.erpCredit = erpCredit;
     }
-    public ErpCreditChild2(){
+    public ErpCreditMaterial(){
 
     }
     public static long getSerialVersionUID() {
@@ -69,15 +69,4 @@ public class ErpCreditChild2 extends DataEntity<ErpCreditChild2> {//材料费实
         this.erpCredit = erpCredit;
     }
 
-    @Override
-    public String toString() {
-        return "ErpCreditChild2{" +
-                "mtlBookedFee2=" + mtlBookedFee2 +
-                ", eqmMaterialDetails2='" + eqmMaterialDetails2 + '\'' +
-                ", mtlUnit='" + mtlUnit + '\'' +
-                ", mtlNumbers=" + mtlNumbers +
-                ", mtlSupplierName='" + mtlSupplierName + '\'' +
-                ", erpCredit=" + erpCredit +
-                '}';
-    }
 }

+ 3 - 3
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/mapper/ErpCreditChild1Mapper.java

@@ -4,12 +4,12 @@ import com.jeeplus.core.persistence.BaseEntity;
 import com.jeeplus.core.persistence.BaseMapper;
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
 import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCredit;
-import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCreditChild1;
+import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCreditEquipment;
 
 import java.util.List;
 
 @MyBatisMapper
-public interface ErpCreditChild1Mapper extends BaseMapper<ErpCreditChild1> {
+public interface ErpCreditEquipmentMapper extends BaseMapper<ErpCreditEquipment> {
 
-    public List<ErpCreditChild1> findErpCreditChild1List(List<String> strings);
+    public List<ErpCreditEquipment> findErpCreditChild1List(List<String> strings);
 }

+ 4 - 4
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/mapper/ErpCreditChild2Mapper.java

@@ -6,14 +6,14 @@ package com.jeeplus.modules.sg.financial.erpcredit.mapper;
 import com.jeeplus.core.persistence.BaseMapper;
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
 import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCredit;
-import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCreditChild1;
-import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCreditChild2;
+
+import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCreditMaterial;
 
 import java.util.List;
 
 
 @MyBatisMapper
-public interface ErpCreditChild2Mapper extends BaseMapper<ErpCreditChild2> {
+public interface ErpCreditMaterialMapper extends BaseMapper<ErpCreditMaterial> {
 
-    public List<ErpCreditChild2> findErpCreditChild2List(List<String> strings);
+    public List<ErpCreditMaterial> findErpCreditChild2List(List<String> strings);
 }

+ 15 - 15
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/mapper/xml/ErpCreditChild1Mapper.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditChild1Mapper">
+<mapper namespace="com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditEquipmentMapper">
     
 	<sql id="erpChild1Columns">
 		a.id AS "id",
@@ -19,17 +19,17 @@
 		a.eqm_supplier_name As "eqmSupplierName"
 	</sql>
 
-	<select id="get" resultType="ErpCreditChild1" >
+	<select id="get" resultType="erpCreditEquipment" >
 		SELECT 
 			<include refid="erpChild1Columns"/>
-		FROM js_erp_credit_child1 a
+		FROM js_erp_credit_equipment a
 		WHERE a.erp_credit_id = #{erpCredit.id}
 	</select>
 	
-	<select id="findList" resultType="ErpCreditChild1" >
+	<select id="findList" resultType="erpCreditEquipment" >
 		SELECT 
 			<include refid="erpChild1Columns"/>
-		FROM js_erp_credit_child1 a
+		FROM js_erp_credit_equipment a
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			${dataScope}
@@ -47,10 +47,10 @@
 		</choose>
 	</select>
 	
-	<select id="findAllList" resultType="ErpCreditChild1" >
+	<select id="findAllList" resultType="erpCreditEquipment" >
 		SELECT 
 			<include refid="erpChild1Columns"/>
-		FROM js_erp_credit_child1 a
+		FROM js_erp_credit_equipment a
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			${dataScope}
@@ -66,7 +66,7 @@
 	</select>
 	
 	<insert id="insert">
-		INSERT INTO js_erp_credit_child1(
+		INSERT INTO js_erp_credit_equipment(
 			id,
 			create_by,
 			create_date,
@@ -100,7 +100,7 @@
 	</insert>
 	
 	<update id="update">
-		UPDATE js_erp_credit_child1 SET
+		UPDATE js_erp_credit_equipment SET
 			update_by = #{updateBy.id},
 			update_date = #{updateDate},
 			remarks = #{remarks},
@@ -117,7 +117,7 @@
 	
 	<!--物理删除-->
 	<update id="delete">
-		DELETE FROM js_erp_credit_child1
+		DELETE FROM js_erp_credit_equipment
 		<choose>
 			<when test="id !=null and id != ''">
 				WHERE id = #{id}
@@ -130,7 +130,7 @@
 	
 	<!--逻辑删除-->
 	<update id="deleteByLogic">
-		UPDATE js_erp_credit_child1 SET
+		UPDATE js_erp_credit_equipment SET
 			del_flag = #{DEL_FLAG_DELETE}
 		<choose>
 			<when test="id !=null and id != ''">
@@ -144,14 +144,14 @@
 	
 	
 	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
-	<select id="findUniqueByProperty" resultType="TestDataChild11" statementType="STATEMENT">
-		select * FROM js_erp_credit_child1  where ${propertyName} = '${value}'
+	<select id="findUniqueByProperty" resultType="erpCreditEquipment" statementType="STATEMENT">
+		select * FROM js_erp_credit_equipment  where ${propertyName} = '${value}'
 	</select>
 	<!--查找多个条件-->
-	<select id="findErpCreditChild1List" parameterType="java.util.List" resultType="erpCreditChild1">
+	<select id="findErpCreditChild1List" parameterType="java.util.List" resultType="erpCreditEquipment">
 		select
 		<include refid="erpChild1Columns"/>
-		FROM js_erp_credit_child1 a
+		FROM js_erp_credit_equipment a
 		WHERE a.del_flag = '0'
 		and a.erp_credit_id in
 		<if test="list != null">

+ 14 - 14
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/mapper/xml/ErpCreditChild2Mapper.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditChild2Mapper">
+<mapper namespace="com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditMaterialMapper">
     
 	<sql id="erpChild2Columns">
 		a.id AS "id",
@@ -18,17 +18,17 @@
 		a.mtl_supplier_name As "mtlSupplierName"
 	</sql>
 
-	<select id="get" resultType="ErpCreditChild2" >
+	<select id="get" resultType="erpCreditMaterial" >
 		SELECT 
 			<include refid="erpChild2Columns"/>
-		FROM js_erp_credit_child2 a
+		FROM js_erp_credit_material a
 		WHERE a.erp_credit_id = #{erpCredit.id}
 	</select>
 	
-	<select id="findList" resultType="ErpCreditChild2" >
+	<select id="findList" resultType="erpCreditMaterial" >
 		SELECT 
 			<include refid="erpChild2Columns"/>
-		FROM js_erp_credit_child2 a
+		FROM js_erp_credit_material a
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			${dataScope}
@@ -46,10 +46,10 @@
 		</choose>
 	</select>
 	
-	<select id="findAllList" resultType="ErpCreditChild2" >
+	<select id="findAllList" resultType="erpCreditMaterial" >
 		SELECT 
 			<include refid="erpChild2Columns"/>
-		FROM js_erp_credit_child2 a
+		FROM js_erp_credit_material a
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			${dataScope}
@@ -65,7 +65,7 @@
 	</select>
 	
 	<insert id="insert">
-		INSERT INTO js_erp_credit_child2(
+		INSERT INTO js_erp_credit_material(
 			id,
 			create_by,
 			create_date,
@@ -93,7 +93,7 @@
 	</insert>
 	
 	<update id="update">
-		UPDATE js_erp_credit_child2 SET
+		UPDATE js_erp_credit_material SET
 			update_by = #{updateBy.id},
 			update_date = #{updateDate},
 			remarks = #{remarks},
@@ -107,7 +107,7 @@
 	
 	<!--物理删除-->
 	<update id="delete">
-		DELETE FROM js_erp_credit_child2
+		DELETE FROM js_erp_credit_material
 		<choose>
 			<when test="id !=null and id != ''">
 				WHERE id = #{id}
@@ -120,7 +120,7 @@
 	
 	<!--逻辑删除-->
 	<update id="deleteByLogic">
-		UPDATE js_erp_credit_child2 SET
+		UPDATE js_erp_credit_material SET
 			del_flag = #{DEL_FLAG_DELETE}
 		<choose>
 			<when test="id !=null and id != ''">
@@ -135,13 +135,13 @@
 	
 	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
 	<select id="findUniqueByProperty" resultType="ErpCreditChild2" statementType="STATEMENT">
-		select * FROM js_erp_credit_child2  where ${propertyName} = '${value}'
+		select * FROM js_erp_credit_material  where ${propertyName} = '${value}'
 	</select>
 	<!--查找多个条件-->
-	<select id="findErpCreditChild2List" parameterType="java.util.List" resultType="erpCreditChild2">
+	<select id="findErpCreditChild2List" parameterType="java.util.List" resultType="erpCreditMaterial">
 		select
 		<include refid="erpChild2Columns"/>
-		FROM js_erp_credit_child2 a
+		FROM js_erp_credit_material a
 		WHERE a.del_flag = '0'
 		and a.erp_credit_id in
 		<if test="list !=null">

+ 24 - 24
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/service/ErpCreditService.java

@@ -10,9 +10,9 @@ import com.jeeplus.core.service.CrudService;
 import com.jeeplus.modules.sg.audit.information.entity.Information;
 import com.jeeplus.modules.sg.audit.information.service.InformationService;
 import com.jeeplus.modules.sg.financial.erpcredit.entity.*;
-import com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditChild1Mapper;
-import com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditChild2Mapper;
+import com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditEquipmentMapper;
 import com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditMapper;
+import com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditMaterialMapper;
 import com.jeeplus.modules.sg.financial.erpcredit.util.ExportTemplate;
 import com.jeeplus.modules.sg.financial.erpcredit.util.ExportUtil2;
 import com.jeeplus.modules.sg.financial.settlement.entity.MaintainData;
@@ -36,9 +36,9 @@ import java.util.List;
 @Transactional(readOnly = true)
 public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
     @Autowired
-    private ErpCreditChild1Mapper erpCreditChild1Mapper;
+    private ErpCreditEquipmentMapper erpCreditEquipmentMapper;
     @Autowired
-    private ErpCreditChild2Mapper erpCreditChild2Mapper;
+    private ErpCreditMaterialMapper erpCreditMaterialMapper;
     @Autowired
     private ErpCreditMapper erpCreditMapper;
     @Autowired
@@ -49,19 +49,19 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
 
     public List<ErpCredit> getListErpCredit(List<String> strings){
         List<ErpCredit> erpCreditList = erpCreditMapper.findErpCreditList(strings);
-        List<ErpCreditChild1> erpCreditChild1List = erpCreditChild1Mapper.findErpCreditChild1List(strings);
-        List<ErpCreditChild2> erpCreditChild2List = erpCreditChild2Mapper.findErpCreditChild2List(strings);
+        List<ErpCreditEquipment> erpCreditChild1List = erpCreditEquipmentMapper.findErpCreditChild1List(strings);
+        List<ErpCreditMaterial> erpCreditChild2List = erpCreditMaterialMapper.findErpCreditChild2List(strings);
         if (null!=erpCreditList&&erpCreditList.size()>0){
             for (ErpCredit erpCredit:erpCreditList){
                 if (null!=erpCreditChild1List&&erpCreditChild1List.size()>0){
-                    for (ErpCreditChild1 erpCreditChild1:erpCreditChild1List){
-                        if (erpCredit.getId().equals(erpCreditChild1.getErpCredit().getId())){
-                            erpCredit.getErpCreditChild1s().add(erpCreditChild1);
+                    for (ErpCreditEquipment erpCreditEquipment:erpCreditChild1List){
+                        if (erpCredit.getId().equals(erpCreditEquipment.getErpCredit().getId())){
+                            erpCredit.getErpCreditChild1s().add(erpCreditEquipment);
                         }
                     }
                 }
                 if (null!=erpCreditChild2List&&erpCreditChild2List.size()>0){
-                    for (ErpCreditChild2 erpCreditChild2:erpCreditChild2List){
+                    for (ErpCreditMaterial erpCreditChild2:erpCreditChild2List){
                         if (erpCredit.getId().equals(erpCreditChild2.getErpCredit().getId())){
                             erpCredit.getErpCreditChild2s().add(erpCreditChild2);
                         }
@@ -73,8 +73,8 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
     }
     public ErpCredit get(String id) {
         ErpCredit erpCredit = super.get(id);
-        erpCredit.setErpCreditChild1s(erpCreditChild1Mapper.findList(new ErpCreditChild1(erpCredit)));
-        erpCredit.setErpCreditChild2s(erpCreditChild2Mapper.findList(new ErpCreditChild2(erpCredit)));
+        erpCredit.setErpCreditChild1s(erpCreditEquipmentMapper.findList(new ErpCreditEquipment(erpCredit)));
+        erpCredit.setErpCreditChild2s(erpCreditMaterialMapper.findList(new ErpCreditMaterial(erpCredit)));
 //        erpCredit.setErpCreditChild3s(erpCreditChild3Mapper.findList(new ErpCreditChild3(erpCredit)));
         return erpCredit;
     }
@@ -90,32 +90,32 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
     @Transactional(readOnly = false)
     public void save(ErpCredit erpCredit) {
         super.save(erpCredit);
-        for (ErpCreditChild1 erpCreditChild1 : erpCredit.getErpCreditChild1s()){
-            if (ErpCreditChild1.DEL_FLAG_NORMAL.equals(erpCredit.getDelFlag())){
+        for (ErpCreditEquipment erpCreditChild1 : erpCredit.getErpCreditChild1s()){
+            if (ErpCreditEquipment.DEL_FLAG_NORMAL.equals(erpCredit.getDelFlag())){
                 if (StringUtils.isBlank(erpCreditChild1.getId())) {
                     erpCreditChild1.setErpCredit(erpCredit);
                     erpCreditChild1.preInsert();
-                    erpCreditChild1Mapper.insert(erpCreditChild1);
+                    erpCreditEquipmentMapper.insert(erpCreditChild1);
                 }else {
                     erpCreditChild1.preUpdate();
-                    erpCreditChild1Mapper.update(erpCreditChild1);
+                    erpCreditEquipmentMapper.update(erpCreditChild1);
                 }
             }else {
-                erpCreditChild1Mapper.delete(erpCreditChild1);
+                erpCreditEquipmentMapper.delete(erpCreditChild1);
             }
         }
-        for (ErpCreditChild2 erpCreditChild2 : erpCredit.getErpCreditChild2s()){
-            if (ErpCreditChild2.DEL_FLAG_NORMAL.equals(erpCreditChild2.getDelFlag())){
+        for (ErpCreditMaterial erpCreditChild2 : erpCredit.getErpCreditChild2s()){
+            if (ErpCreditMaterial.DEL_FLAG_NORMAL.equals(erpCreditChild2.getDelFlag())){
                 if (StringUtils.isBlank(erpCreditChild2.getId())){
                     erpCreditChild2.setErpCredit(erpCredit);
                     erpCreditChild2.preInsert();
-                    erpCreditChild2Mapper.insert(erpCreditChild2);
+                    erpCreditMaterialMapper.insert(erpCreditChild2);
                 }else {
                     erpCreditChild2.preUpdate();
-                    erpCreditChild2Mapper.update(erpCreditChild2);
+                    erpCreditMaterialMapper.update(erpCreditChild2);
                 }
             }else {
-                erpCreditChild2Mapper.delete(erpCreditChild2);
+                erpCreditMaterialMapper.delete(erpCreditChild2);
             }
         }
 //        for (ErpCreditChild3 erpCreditChild3 : erpCredit.getErpCreditChild3s()){
@@ -137,8 +137,8 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
     @Transactional(readOnly = false)
     public void delete(ErpCredit erpCredit) {
         super.delete(erpCredit);
-        erpCreditChild1Mapper.delete(new ErpCreditChild1(erpCredit));
-        erpCreditChild2Mapper.delete(new ErpCreditChild2(erpCredit));
+        erpCreditEquipmentMapper.delete(new ErpCreditEquipment(erpCredit));
+        erpCreditMaterialMapper.delete(new ErpCreditMaterial(erpCredit));
 //        erpCreditChild3Mapper.delete(new ErpCreditChild3(erpCredit));
     }
 

+ 12 - 12
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ErpInfo.java

@@ -110,9 +110,9 @@ public  class ErpInfo {
         //获取erpCredit对象 list集合
         List<ErpCredit> erpCredits = getListErpCredit(list);
         //获取ErpCreditChild1对象 list集合 (设备费)
-        List<ErpCreditChild1> erpCreditChild1s = getListErpCreditChild1(list);
+        List<ErpCreditEquipment> erpCreditChild1s = getListErpCreditChild1(list);
         //获取ErpCreditChild2对象 list集合  (材料费)
-        List<ErpCreditChild2> erpCreditChild2s = getListErpCreditChild2(list);
+        List<ErpCreditMaterial> erpCreditChild2s = getListErpCreditChild2(list);
         //循环erpCredit对象 list集合
         for (ErpCredit erpCredit:erpCredits){
             tenKvLineLength=0.0;
@@ -127,7 +127,7 @@ public  class ErpInfo {
                 flag=true;
             }
             //设备费 集合 循环
-            for (ErpCreditChild1 erpCreditChild1:erpCreditChild1s){
+            for (ErpCreditEquipment erpCreditChild1:erpCreditChild1s){
                 //判断 erpCredit对象项目定义编号  与  ErpCreditChild1对象项目定义编号
                 if (erpCredit.getItemId().equals(erpCreditChild1.getErpCredit().getItemId())){
                     //把erpCreditChild1对象 添加到 List<ErpCredit>的List<ErpCreditChild1>中
@@ -136,7 +136,7 @@ public  class ErpInfo {
                 }
             }
             //材料费 集合 循环
-            for (ErpCreditChild2 erpCreditChild2:erpCreditChild2s){
+            for (ErpCreditMaterial erpCreditChild2:erpCreditChild2s){
                 //判断 erpCredit对象项目定义编号  与  ErpCreditChild2对象项目定义编号
                 if (erpCreditChild2.getErpCredit().getItemId().equals(erpCredit.getItemId())){
                     //把erpCreditChild1对象 添加到 List<ErpCredit>的List<ErpCreditChild2>中
@@ -473,15 +473,15 @@ public  class ErpInfo {
      * @param list 导入的表格 bean对象
      * @return 设备的list集合
      */
-    public static List<ErpCreditChild1> getListErpCreditChild1(List<ErpAccount> list){
+    public static List<ErpCreditEquipment> getListErpCreditChild1(List<ErpAccount> list){
         Double eqmNumbers=0.0;//设备台数
         Double eqmBookedFee=0.0;//设备入账金额
         String materialDetails="";//筛选kva
         boolean flag = true;//开关:判断集合是否重复 true-物料描述不同 false-项目定义编号相同且物料描述相同
-        ErpCreditChild1 erpCreditChild1;//设备对象
+        ErpCreditEquipment erpCreditChild1;//设备对象
         ErpCredit erpCredit;//设备父类
         ErpAccount erpAccount;//数据集合
-        List<ErpCreditChild1> creditListChild1 = new ArrayList<ErpCreditChild1>();
+        List<ErpCreditEquipment> creditListChild1 = new ArrayList<ErpCreditEquipment>();
         for (int i = 0; i < list.size(); i++) {
             flag=true;
             erpAccount=list.get(i);
@@ -517,7 +517,7 @@ public  class ErpInfo {
                         erpAccount.getMaterialDetails().contains(ErpInfo.CON_RNB)||
                         erpAccount.getMaterialDetails().contains(ErpInfo.CON_BST)||
                         erpAccount.getMaterialDetails().contains(ErpInfo.CON_HVS)){
-                    erpCreditChild1 = new ErpCreditChild1();//获取设备对象
+                    erpCreditChild1 = new ErpCreditEquipment();//获取设备对象
                     erpCredit=new ErpCredit();//获取设备 父类 主类
                     materialDetails = erpAccount.getMaterialDetails();//获取物料描述
                     //截取总容量kVA前数字
@@ -550,12 +550,12 @@ public  class ErpInfo {
      * @param erpAccounts 导入的表格 bean对象
      * @return 材料 list金额
      */
-    public static List<ErpCreditChild2> getListErpCreditChild2(List<ErpAccount> erpAccounts){
-        List<ErpCreditChild2> creditListChild2 = new ArrayList<ErpCreditChild2>();
+    public static List<ErpCreditMaterial> getListErpCreditChild2(List<ErpAccount> erpAccounts){
+        List<ErpCreditMaterial> creditListChild2 = new ArrayList<ErpCreditMaterial>();
         boolean flag = true;//判断 材料费 true-物料描述不同或者项目定义编号不同 false-仙姑定义编号物料描述相同
         double eqmBookedFee2=0.0;//材料入账金额
         double eqmNumber2=0.0;//设备台数
-        ErpCreditChild2 erpCreditChild2=null;
+        ErpCreditMaterial erpCreditChild2=null;
         ErpCredit erpCredit = null;
         ErpAccount erpAccount=null;
         for (int i = 0; i < erpAccounts.size(); i++) {
@@ -595,7 +595,7 @@ public  class ErpInfo {
                             !erpAccount.getMaterialDetails().contains(ErpInfo.CON_RNB) &&
                             !erpAccount.getMaterialDetails().contains(ErpInfo.CON_BST) &&
                             !erpAccount.getMaterialDetails().contains(ErpInfo.CON_HVS)) {
-                        erpCreditChild2 = new ErpCreditChild2();//获取材料费对象
+                        erpCreditChild2 = new ErpCreditMaterial();//获取材料费对象
                         erpCredit = new ErpCredit();//获取材料 父类 对象
                         erpCredit.setItemId(erpAccount.getProjectDefinitionCode());//添加项目id
                         erpCreditChild2.setEqmMaterialDetails2(erpAccount.getMaterialDetails());//添加物料描述

+ 0 - 462
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportUtil.java

@@ -1,462 +0,0 @@
-/**
- * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
- */
-package com.jeeplus.modules.sg.financial.erpcredit.util;
-
-import com.google.common.collect.Lists;
-import com.jeeplus.common.utils.Encodes;
-import com.jeeplus.common.utils.Reflections;
-import com.jeeplus.common.utils.excel.annotation.ExcelField;
-import com.jeeplus.modules.sys.utils.DictUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.poi.ss.usermodel.*;
-import org.apache.poi.ss.util.CellRangeAddress;
-import org.apache.poi.xssf.streaming.SXSSFWorkbook;
-import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
-import org.apache.poi.xssf.usermodel.XSSFRichTextString;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.*;
-
-/**
- * 导出Excel文件(导出“XLSX”格式,支持大数据量导出   @see org.apache.poi.ss.SpreadsheetVersion)
- * @author jeeplus
- * @version 2016-04-21
- */
-public class ExportUtil {
-
-	private static Logger log = LoggerFactory.getLogger(ExportUtil.class);
-
-	/**
-	 * 工作薄对象
-	 */
-	private SXSSFWorkbook wb;
-
-	/**
-	 * 工作表对象
-	 */
-	private Sheet sheet;
-
-	/**
-	 * 样式列表
-	 */
-	private Map<String, CellStyle> styles;
-
-	/**
-	 * 当前行号
-	 */
-	private int rownum;
-
-	/**
-	 * 注解列表(Object[]{ ExcelField, Field/Method })
-	 */
-	List<Object[]> annotationList = Lists.newArrayList();
-
-	/**
-	 * 构造函数
-	 * @param title 表格标题,传“空值”,表示无标题
-	 * @param cls 实体对象,通过annotation.ExportField获取标题
-	 */
-	public ExportUtil(String title, Class<?> cls){
-		this(title, cls, 1);
-	}
-
-	/**
-	 * 构造函数
-	 * @param title 表格标题,传“空值”,表示无标题
-	 * @param cls 实体对象,通过annotation.ExportField获取标题
-	 * @param type 导出类型(1:导出数据;2:导出模板)
-	 * @param groups 导入分组
-	 */
-	public ExportUtil(String title, Class<?> cls, int type, int... groups){
-		// Get annotation field
-		Field[] fs = cls.getDeclaredFields();
-		for (Field f : fs){
-			ExcelField ef = f.getAnnotation(ExcelField.class);
-			if (ef != null && (ef.type()==0 || ef.type()==type)){
-				if (groups!=null && groups.length>0){
-					boolean inGroup = false;
-					for (int g : groups){
-						if (inGroup){
-							break;
-						}
-						for (int efg : ef.groups()){
-							if (g == efg){
-								inGroup = true;
-								annotationList.add(new Object[]{ef, f});
-								break;
-							}
-						}
-					}
-				}else{
-					annotationList.add(new Object[]{ef, f});
-				}
-			}
-		}
-		// Get annotation method
-		Method[] ms = cls.getDeclaredMethods();
-		for (Method m : ms){
-			ExcelField ef = m.getAnnotation(ExcelField.class);
-			if (ef != null && (ef.type()==0 || ef.type()==type)){
-				if (groups!=null && groups.length>0){
-					boolean inGroup = false;
-					for (int g : groups){
-						if (inGroup){
-							break;
-						}
-						for (int efg : ef.groups()){
-							if (g == efg){
-								inGroup = true;
-								annotationList.add(new Object[]{ef, m});
-								break;
-							}
-						}
-					}
-				}else{
-					annotationList.add(new Object[]{ef, m});
-				}
-			}
-		}
-		// Field sorting
-		Collections.sort(annotationList, new Comparator<Object[]>() {
-			public int compare(Object[] o1, Object[] o2) {
-				return new Integer(((ExcelField)o1[0]).sort()).compareTo(
-						new Integer(((ExcelField)o2[0]).sort()));
-			};
-		});
-		// Initialize
-		List<String> headerList = Lists.newArrayList();
-		for (Object[] os : annotationList){
-			String t = ((ExcelField)os[0]).title();
-			// 如果是导出,则去掉注释
-			if (type==1){
-				String[] ss = StringUtils.split(t, "**", 2);
-				if (ss.length==2){
-					t = ss[0];
-				}
-			}
-			headerList.add(t);
-		}
-		initialize(title, headerList);
-	}
-
-	/**
-	 * 构造函数
-	 * @param title 表格标题,传“空值”,表示无标题
-	 * @param headers 表头数组
-	 */
-	public ExportUtil(String title, String[] headers) {
-		initialize(title, Lists.newArrayList(headers));
-	}
-
-	/**
-	 * 构造函数
-	 * @param title 表格标题,传“空值”,表示无标题
-	 * @param headerList 表头列表
-	 */
-	public ExportUtil(String title, List<String> headerList) {
-		initialize(title, headerList);
-	}
-	
-	/**
-	 * 初始化函数
-	 * @param title 表格标题,传“空值”,表示无标题
-	 * @param headerList 表头列表
-	 */
-	private void initialize(String title, List<String> headerList) {
-		this.wb = new SXSSFWorkbook(500);
-		this.sheet = wb.createSheet("Export");
-		this.styles = createStyles(wb);
-		// Create title
-		if (StringUtils.isNotBlank(title)){
-			Row titleRow = sheet.createRow(rownum++);
-			titleRow.setHeightInPoints(30);
-			Cell titleCell = titleRow.createCell(0);
-			titleCell.setCellStyle(styles.get("title"));
-			titleCell.setCellValue(title);
-			sheet.addMergedRegion(new CellRangeAddress(titleRow.getRowNum(),
-					titleRow.getRowNum(), titleRow.getRowNum(), headerList.size()-1));
-		}
-		// Create header
-		if (headerList == null){
-			throw new RuntimeException("headerList not null!");
-		}
-		Row headerRow = sheet.createRow(rownum++);
-		headerRow.setHeightInPoints(16);
-		for (int i = 0; i < headerList.size(); i++) {
-			Cell cell = headerRow.createCell(i);
-			cell.setCellStyle(styles.get("header"));
-			String[] ss = StringUtils.split(headerList.get(i), "**", 2);
-			if (ss.length==2){
-				cell.setCellValue(ss[0]);
-				Comment comment = this.sheet.createDrawingPatriarch().createCellComment(
-						new XSSFClientAnchor(0, 0, 0, 0, (short) 3, 3, (short) 5, 6));
-				comment.setString(new XSSFRichTextString(ss[1]));
-				cell.setCellComment(comment);
-			}else{
-				cell.setCellValue(headerList.get(i));
-			}
-			sheet.autoSizeColumn(i);
-		}
-		for (int i = 0; i < headerList.size(); i++) {  
-			int colWidth = sheet.getColumnWidth(i)*2;
-	        sheet.setColumnWidth(i, colWidth < 3000 ? 3000 : colWidth);  
-		}
-		log.debug("Initialize success.");
-	}
-	
-	/**
-	 * 创建表格样式
-	 * @param wb 工作薄对象
-	 * @return 样式列表
-	 */
-	private Map<String, CellStyle> createStyles(Workbook wb) {
-		Map<String, CellStyle> styles = new HashMap<String, CellStyle>();
-		
-		CellStyle style = wb.createCellStyle();
-		style.setAlignment(CellStyle.ALIGN_CENTER);
-		style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
-		Font titleFont = wb.createFont();
-		titleFont.setFontName("Arial");
-		titleFont.setFontHeightInPoints((short) 16);
-		titleFont.setBoldweight(Font.BOLDWEIGHT_BOLD);
-		style.setFont(titleFont);
-		styles.put("title", style);
-
-		style = wb.createCellStyle();
-		style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
-		style.setBorderRight(CellStyle.BORDER_THIN);
-		style.setRightBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
-		style.setBorderLeft(CellStyle.BORDER_THIN);
-		style.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
-		style.setBorderTop(CellStyle.BORDER_THIN);
-		style.setTopBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
-		style.setBorderBottom(CellStyle.BORDER_THIN);
-		style.setBottomBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
-		Font dataFont = wb.createFont();
-		dataFont.setFontName("Arial");
-		dataFont.setFontHeightInPoints((short) 10);
-		style.setFont(dataFont);
-		styles.put("data", style);
-		
-		style = wb.createCellStyle();
-		style.cloneStyleFrom(styles.get("data"));
-		style.setAlignment(CellStyle.ALIGN_LEFT);
-		styles.put("data1", style);
-
-		style = wb.createCellStyle();
-		style.cloneStyleFrom(styles.get("data"));
-		style.setAlignment(CellStyle.ALIGN_CENTER);
-		styles.put("data2", style);
-
-		style = wb.createCellStyle();
-		style.cloneStyleFrom(styles.get("data"));
-		style.setAlignment(CellStyle.ALIGN_RIGHT);
-		styles.put("data3", style);
-		
-		style = wb.createCellStyle();
-		style.cloneStyleFrom(styles.get("data"));
-//		style.setWrapText(true);
-		style.setAlignment(CellStyle.ALIGN_CENTER);
-		style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
-		style.setFillPattern(CellStyle.SOLID_FOREGROUND);
-		Font headerFont = wb.createFont();
-		headerFont.setFontName("Arial");
-		headerFont.setFontHeightInPoints((short) 10);
-		headerFont.setBoldweight(Font.BOLDWEIGHT_BOLD);
-		headerFont.setColor(IndexedColors.WHITE.getIndex());
-		style.setFont(headerFont);
-		styles.put("header", style);
-		
-		return styles;
-	}
-
-	/**
-	 * 添加一行
-	 * @return 行对象
-	 */
-	public Row addRow(){
-		return sheet.createRow(rownum++);
-	}
-	
-
-	/**
-	 * 添加一个单元格
-	 * @param row 添加的行
-	 * @param column 添加列号
-	 * @param val 添加值
-	 * @return 单元格对象
-	 */
-	public Cell addCell(Row row, int column, Object val){
-		return this.addCell(row, column, val, 0, Class.class);
-	}
-	
-	/**
-	 * 添加一个单元格
-	 * @param row 添加的行
-	 * @param column 添加列号
-	 * @param val 添加值
-	 * @param align 对齐方式(1:靠左;2:居中;3:靠右)
-	 * @return 单元格对象
-	 */
-	public Cell addCell(Row row, int column, Object val, int align, Class<?> fieldType){
-		Cell cell = row.createCell(column);
-		CellStyle style = styles.get("data"+(align>=1&&align<=3?align:""));
-		try {
-			if (val == null){
-				cell.setCellValue("");
-			} else if (val instanceof String) {
-				cell.setCellValue((String) val);
-			} else if (val instanceof Integer) {
-				cell.setCellValue((Integer) val);
-			} else if (val instanceof Long) {
-				cell.setCellValue((Long) val);
-			} else if (val instanceof Double) {
-				cell.setCellValue((Double) val);
-			} else if (val instanceof Float) {
-				cell.setCellValue((Float) val);
-			} else if (val instanceof Date) {
-				DataFormat format = wb.createDataFormat();
-	            style.setDataFormat(format.getFormat("yyyy-MM-dd"));
-				cell.setCellValue((Date) val);
-			} else {
-				if (fieldType != Class.class){
-					cell.setCellValue((String)fieldType.getMethod("setValue", Object.class).invoke(null, val));
-				}else{
-					cell.setCellValue((String)Class.forName(this.getClass().getName().replaceAll(this.getClass().getSimpleName(), 
-						"fieldtype."+val.getClass().getSimpleName()+"Type")).getMethod("setValue", Object.class).invoke(null, val));
-				}
-			}
-		} catch (Exception ex) {
-			log.info("Set cell value ["+row.getRowNum()+","+column+"] error: " + ex.toString());
-			cell.setCellValue(val.toString());
-		}
-		cell.setCellStyle(style);
-		return cell;
-	}
-
-	/**
-	 * 添加数据(通过annotation.ExportField添加数据)
-	 * @return list 数据列表
-	 */
-	public <E> ExportUtil setDataList(List<E> list){
-		for (E e : list){
-			int colunm = 0;
-			Row row = this.addRow();
-			StringBuilder sb = new StringBuilder();
-			for (Object[] os : annotationList){
-				ExcelField ef = (ExcelField)os[0];
-				Object val = null;
-				// Get entity value
-				try{
-					if (StringUtils.isNotBlank(ef.value())){
-						val = Reflections.invokeGetter(e, ef.value());
-					}else{
-						if (os[1] instanceof Field){
-							val = Reflections.invokeGetter(e, ((Field)os[1]).getName());
-						}else if (os[1] instanceof Method){
-							val = Reflections.invokeMethod(e, ((Method)os[1]).getName(), new Class[] {}, new Object[] {});
-						}
-					}
-					// If is dict, get dict label
-					if (StringUtils.isNotBlank(ef.dictType())){
-						val = DictUtils.getDictLabel(val==null?"":val.toString(), ef.dictType(), "");
-					}
-				}catch(Exception ex) {
-					// Failure to ignore
-					log.info(ex.toString());
-					val = "";
-				}
-				this.addCell(row, colunm++, val, ef.align(), ef.fieldType());
-				sb.append(val + ", ");
-			}
-			log.debug("Write success: ["+row.getRowNum()+"] "+sb.toString());
-		}
-		return this;
-	}
-	
-	/**
-	 * 输出数据流
-	 * @param os 输出数据流
-	 */
-	public ExportUtil write(OutputStream os) throws IOException{
-		wb.write(os);
-		return this;
-	}
-	
-	/**
-	 * 输出到客户端
-	 * @param fileName 输出文件名
-	 */
-	public ExportUtil write(HttpServletResponse response, String fileName) throws IOException{
-		response.reset();
-        response.setContentType("application/octet-stream; charset=utf-8");
-        response.setHeader("Content-Disposition", "attachment; filename="+Encodes.urlEncode(fileName));
-		write(response.getOutputStream());
-		return this;
-	}
-	
-	/**
-	 * 输出到文件
-	 * @param name 输出文件名
-	 */
-	public ExportUtil writeFile(String name) throws FileNotFoundException, IOException{
-		FileOutputStream os = new FileOutputStream(name);
-		this.write(os);
-		return this;
-	}
-	
-	/**
-	 * 清理临时文件
-	 */
-	public ExportUtil dispose(){
-		wb.dispose();
-		return this;
-	}
-	
-//	/**
-//	 * 导出测试
-//	 */
-//	public static void main(String[] args) throws Throwable {
-//		
-//		List<String> headerList = Lists.newArrayList();
-//		for (int i = 1; i <= 10; i++) {
-//			headerList.add("表头"+i);
-//		}
-//		
-//		List<String> dataRowList = Lists.newArrayList();
-//		for (int i = 1; i <= headerList.size(); i++) {
-//			dataRowList.add("数据"+i);
-//		}
-//		
-//		List<List<String>> dataList = Lists.newArrayList();
-//		for (int i = 1; i <=1000000; i++) {
-//			dataList.add(dataRowList);
-//		}
-//
-//		ExportExcel ee = new ExportExcel("表格标题", headerList);
-//		
-//		for (int i = 0; i < dataList.size(); i++) {
-//			Row row = ee.addRow();
-//			for (int j = 0; j < dataList.get(i).size(); j++) {
-//				ee.addCell(row, j, dataList.get(i).get(j));
-//			}
-//		}
-//		
-//		ee.writeFile("target/export.xlsx");
-//
-//		ee.dispose();
-//		
-//		log.debug("Export success.");
-//		
-//	}
-
-}

+ 14 - 14
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportUtil1.java

@@ -74,8 +74,8 @@ public class ExportUtil1 {
     //获取:一览表 实际价值
     public static Schedule getScheduleActual(Schedule schedule,ErpCredit erpCredit){
         boolean flag = false;
-        List<ErpCreditChild2> erpCreditChild2s = null;//得到材料费金额
-        List<ErpCreditChild1> erpCreditChild1s = null;//得到设备费金额
+        List<ErpCreditMaterial> erpCreditChild2s = null;//得到材料费金额
+        List<ErpCreditEquipment> erpCreditChild1s = null;//得到设备费金额
         double netAmount=0.0;//入账金额:设备费,材料费
         double actualTotalFee=0.0;//合计金额
         //循环erpCredit集合
@@ -89,7 +89,7 @@ public class ExportUtil1 {
         erpCreditChild2s = erpCredit.getErpCreditChild2s();//得到材料费
         //判断材料费
         if (erpCreditChild2s!=null&&erpCreditChild2s.size()>0){
-            for (ErpCreditChild2 erpCreditChild2:erpCreditChild2s){
+            for (ErpCreditMaterial erpCreditChild2:erpCreditChild2s){
                 if (null!=erpCreditChild2.getMtlBookedFee2()){
                     netAmount+=erpCreditChild2.getMtlBookedFee2();//得到材料费入账金额
                     flag = true;
@@ -105,7 +105,7 @@ public class ExportUtil1 {
         erpCreditChild1s = erpCredit.getErpCreditChild1s();//得到设备费
         //判断设备费
         if (null!=erpCreditChild1s&&erpCreditChild1s.size()>0){
-            for (ErpCreditChild1 erpCreditChild1:erpCreditChild1s){
+            for (ErpCreditEquipment erpCreditChild1:erpCreditChild1s){
                 if (null!=erpCreditChild1.getEqmBookedFee1()){
                     netAmount+=erpCreditChild1.getEqmBookedFee1();//得到
                     flag=true;
@@ -219,14 +219,14 @@ public class ExportUtil1 {
         Double count = 0.0;
         List<MaterialEquipment> materialEquipments = new ArrayList<MaterialEquipment>();
         MaterialEquipment materialEquipment = null;
-        List<ErpCreditChild1> erpCreditChild1s = null;
-        List<ErpCreditChild2> erpCreditChild2s = null;
+        List<ErpCreditEquipment> erpCreditChild1s = null;
+        List<ErpCreditMaterial> erpCreditChild2s = null;
         for (ErpCredit erpCredit:erpCredits){
             erpCreditChild1s=erpCredit.getErpCreditChild1s();
             erpCreditChild2s=erpCredit.getErpCreditChild2s();
             //设备详情
             if (null!=erpCreditChild1s&&erpCreditChild1s.size()>0){
-                for (ErpCreditChild1 erpCreditChild1:erpCreditChild1s){
+                for (ErpCreditEquipment erpCreditChild1:erpCreditChild1s){
                     count=0.0;
                     materialEquipment=new MaterialEquipment();
                     materialEquipment.setId(erpCredit.getItemId());
@@ -261,7 +261,7 @@ public class ExportUtil1 {
             }
             //材料详情
             if (null!=erpCreditChild2s&&erpCreditChild2s.size()>0){
-                for (ErpCreditChild2 erpCreditChild2:erpCreditChild2s){
+                for (ErpCreditMaterial erpCreditChild2:erpCreditChild2s){
                     count=0.0;
                     //得到材料费项目定义好
                     materialEquipment.setId(erpCredit.getItemId());
@@ -306,7 +306,7 @@ public class ExportUtil1 {
         DecimalFormat decimalFormat   = new DecimalFormat("#0.00");
         List<TransferOfPower1> transferOfPower1s = new ArrayList<TransferOfPower1>();
         TransferOfPower1 transferOfPower1 = null;
-        List<ErpCreditChild1> erpCreditChild1s = null;
+        List<ErpCreditEquipment> erpCreditChild1s = null;
         Double eqmNumbers = 0.0;//获取总数量
         Double eqmValue = 0.0;//相同项目定义号合计
         Double standInFee=0.0;//摊入费用
@@ -321,7 +321,7 @@ public class ExportUtil1 {
             erpCreditChild1s = erpCredit.getErpCreditChild1s();//获取集合
             if (null!=erpCreditChild1s&&erpCreditChild1s.size()>=0){
                 eqmNumbers = 0.0;
-                for (ErpCreditChild1 erpCreditChild11:erpCreditChild1s){
+                for (ErpCreditEquipment erpCreditChild11:erpCreditChild1s){
                     if (null!=erpCreditChild11.getEqmNumbers()){//当前项目定义号所有的台数合计
                         eqmNumbers+=erpCreditChild11.getEqmNumbers();
                     }
@@ -329,7 +329,7 @@ public class ExportUtil1 {
                 if (null!=erpCredit.getConsInstallFee()){//得到分摊后安装费
                     eqmNumbers=erpCredit.getConsTotalFee()/eqmNumbers;
                 }
-                for (ErpCreditChild1 erpCreditChild1:erpCreditChild1s){
+                for (ErpCreditEquipment erpCreditChild1:erpCreditChild1s){
                     if (null!=erpCredit.getTenKvModel()){//若10KV电缆、架空导线型号为空:得到设备价值
                         eqmValue = erpCreditChild1.getEqmBookedFee1()+eqmNumbers+eqmValue;//设备H6的和
                     }
@@ -394,7 +394,7 @@ public class ExportUtil1 {
         DecimalFormat decimalFormat   = new DecimalFormat("#0.00");
         DecimalFormat decimalFormat1   = new DecimalFormat("#0");
         List<TransferOfPower2> transferOfPower2s =  new ArrayList<TransferOfPower2>();
-        List<ErpCreditChild1> erpCreditChild1s = null;
+        List<ErpCreditEquipment> erpCreditChild1s = null;
         TransferOfPower2 transferOfPower2 = null;
         Double powerValue = 0.0;
         Double eqmNumbers = 0.0;//获取总数量
@@ -414,7 +414,7 @@ public class ExportUtil1 {
             }
             if (null!=erpCreditChild1s && erpCreditChild1s.size()>=0){
                 eqmNumbers = 0.0;
-                for (ErpCreditChild1 erpCreditChild11:erpCreditChild1s){
+                for (ErpCreditEquipment erpCreditChild11:erpCreditChild1s){
                     if (null!=erpCreditChild11.getEqmNumbers()){//当前项目定义号所有的台数合计
                         eqmNumbers+=erpCreditChild11.getEqmNumbers();
                     }
@@ -422,7 +422,7 @@ public class ExportUtil1 {
                 if (null!=erpCredit.getConsInstallFee()){//得到分摊后安装费
                     eqmNumbers=eqmNumbers/erpCredit.getConsTotalFee();
                 }
-                for (ErpCreditChild1 erpCreditChild1:erpCreditChild1s){
+                for (ErpCreditEquipment erpCreditChild1:erpCreditChild1s){
                     powerDeliveredAssets=0.0;
                     transferOfPower2 = new TransferOfPower2();
                     transferOfPower2.setPowerId(erpCredit.getItemId());