Explorar o código

fix:财务管理,收款明细的导出和查询sql修改

ly hai 10 meses
pai
achega
9c014753ce

+ 5 - 5
src/main/java/cn/ezhizao/project/business/collection/domain/BizCollectionDetail.java

@@ -136,10 +136,10 @@ public class BizCollectionDetail extends BaseEntity implements Serializable {
 
     @TableField(exist = false)
     @Excels({
-            @Excel(sort = 1, name = "客户名称", targetAttr = "companyName", type = Excel.Type.EXPORT),
+            @Excel(sort = 1, name = "客户名称",width = 40,targetAttr = "companyName", type = Excel.Type.EXPORT),
             @Excel(sort = 9,name = "是否是项目", targetAttr = "isProject", readConverterExp = "0=项目,1=非项目", type = Excel.Type.EXPORT),
-            @Excel(sort = 10, name = "确认所属时间", targetAttr = "actuallyDate", type = Excel.Type.EXPORT),
-            @Excel(sort = 11, name = "收款账户", targetAttr = "subsidiaryName", type = Excel.Type.EXPORT),
+            @Excel(sort = 10, name = "确认所属时间", targetAttr = "actuallyDate",dateFormat = "yyyy-MM-dd", type = Excel.Type.EXPORT),
+            @Excel(sort = 11, name = "收款账户",width = 80, targetAttr = "subsidiaryName", type = Excel.Type.EXPORT),
             @Excel(sort = 12, name = "申请人", targetAttr = "applierName",dateFormat = "yyyy-MM-dd", type = Excel.Type.EXPORT),
             @Excel(sort = 13, name = "审核人", targetAttr = "verifyName", type = Excel.Type.EXPORT),
             @Excel(sort = 14, name = "审核时间", targetAttr = "verifyDate", type = Excel.Type.EXPORT),
@@ -150,9 +150,9 @@ public class BizCollectionDetail extends BaseEntity implements Serializable {
     private BizCollection bizCollection;
     @TableField(exist = false)
     @Excels({
-            @Excel(sort = 2,name = "合同编号", targetAttr = "contractNo", type = Excel.Type.EXPORT),
+            @Excel(sort = 2,name = "合同编号",width = 40, targetAttr = "contractNo", type = Excel.Type.EXPORT),
             @Excel(sort = 3,name = "甲方", targetAttr = "boss", type = Excel.Type.EXPORT),
-            @Excel(sort = 4,name = "乙方", targetAttr = "party", type = Excel.Type.EXPORT),
+            @Excel(sort = 4,name = "乙方",width = 60, targetAttr = "party", type = Excel.Type.EXPORT),
             @Excel(sort = 6,name = "任务金额", targetAttr = "amount", type = Excel.Type.EXPORT),
             @Excel(sort = 8,name = "合同类型", targetAttr = "contractType",readConverterExp = "0=新签,1=续签", type = Excel.Type.EXPORT)
     })

+ 40 - 2
src/main/resources/mybatis/business/BizCollectionDetailMapper.xml

@@ -8,8 +8,30 @@
         <id column="id" property="id"/>
         <result column="collection_id" property="collectionId"/>
         <result column="contract_id" property="contractId"/>
-        <association property="bizCollection" column="collection_id" select="getCollection" javaType="cn.ezhizao.project.business.collection.domain.BizCollection" />
-        <association property="bizArchiveInput" column="contract_id" select="getArchiveInput" javaType="cn.ezhizao.project.business.collection.domain.vo.ArchiveVo" />
+        <result column="task_type_id" property="taskTypeId"/>
+        <result column="arrive_amount" property="arriveAmount"/>
+        <result column="arrived" property="arrived"/>
+        <result column="remark" property="remark"/>
+        <association property="bizCollection" javaType="cn.ezhizao.project.business.collection.domain.BizCollection" >
+            <id column="colId" property="id"/>
+            <result column="colCompanyName" property="companyName"/>
+            <result column="colIsProject" property="isProject"/>
+            <result column="colActuallyDate" property="actuallyDate"/>
+            <result column="colSubsidiaryName" property="subsidiaryName"/>
+            <result column="colApplierName" property="applierName"/>
+            <result column="colVerifyName" property="verifyName"/>
+            <result column="colVerifyDate" property="verifyDate"/>
+            <result column="colProjectName" property="projectName"/>
+            <result column="colProjectMainName" property="projectMainName"/>
+            <result column="colArriveDate" property="arriveDate"/>
+        </association>
+        <association property="bizArchiveInput" javaType="cn.ezhizao.project.business.collection.domain.vo.ArchiveVo" >
+            <id column="inputId" property="id"/>
+            <result column="inputParty" property="party"/>
+            <result column="inputAmount" property="amount"/>
+            <result column="inputContractType" property="contractType"/>
+            <result column="inputContractNo" property="contractNo"/>
+        </association>
     </resultMap>
     <select id="getCollection" resultType="cn.ezhizao.project.business.collection.domain.BizCollection">
         select *,user1.nick_name as applierName,user2.nick_name as verifyName,com.name as companyName from biz_collection
@@ -130,6 +152,22 @@
     </delete>
     <select id="getDetailList" resultMap="DetailResultMap">
         select detail.*,company.name as cname,
+        input.id as inputId,
+        input.party as inputParty,
+        input.amount as inputAmount,
+        input.contract_type as inputContractType,
+        input.contract_no as inputContractNo,
+        collection.id as colId,
+        collection.company_name as colCompanyName,
+        collection.is_project as colIsProject,
+        collection.actually_date as colActuallyDate,
+        collection.subsidiary_name as colSubsidiaryName,
+        user2.nick_name as colApplierName,
+        user1.nick_name as colVerifyName,
+        collection.verify_date as colVerifyDate,
+        collection.project_name as colProjectName,
+        collection.project_main_name as colProjectMainName,
+        collection.arrive_date as colArriveDate,
         (select sum(cd.arrive_amount) from biz_collection_detail cd
         left join biz_collection c on c.id =
         cd.collection_id