Browse Source

成本报表 事故单

liuchaohui 2 years ago
parent
commit
46dddd2d4c

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationAccident.java

@@ -71,13 +71,15 @@ public class SyCostAllocationAccident implements Serializable {
     @Excel(name = "金额", width = 15)
     @ApiModelProperty(value = "金额")
     private java.math.BigDecimal amount;
-
+    private java.math.BigDecimal amountrmb;//人民币
     /**币种*/
     @Excel(name = "币种", width = 15)
     @ApiModelProperty(value = "币种")
     private String moneyType;
 
     private String accidentNumber;
+    private String accidentType;//事故类型
+    private String accidentTheme;//事故单主题
     private String responsibilityPerson1;
     private String accidentData;
     private String customer;

+ 5 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationAccidentMapper.xml

@@ -18,12 +18,15 @@
 
 	<select id="queryByCostAccident" resultType="org.jeecg.modules.cost.entity.SyCostAllocationAccident">
 		select
-			its.u8_invoice as accidentNum,its.accident_sum as amount,its.money_type,it.accident_number,it.responsibility_person1,
+			its.u8_invoice as accidentNum,its.money_type,it.accident_number,its.accident_type,it.accident_theme,
+			case when its.money_type='美元' then ifnull(it.total_money,0) end as amount,
+			case when its.money_type='人民币' then ifnull(it.total_money,0) end as amountrmb,
+			CONCAT_WS(',',it.responsibility_person1,it.responsibility_person2,it.responsibility_person3,it.responsibility_person4) as responsibilityPerson1,
 			it.accident_data,it.factory as accidentUndertaker,it.customer,it.style_number,its.plan_number,it.plan_personnel,
 			it.business_people,it.garment_sales_order,material,it.quality_control,finance_remark
 		from incident_ticket it
 		join incident_ticket_children its on it.id=its.incident_ticket_id
-		where its.plan_number = 'SYE228'
+		where its.plan_number = #{code}
 	</select>
 	<!--
 	SELECT ah.cPBVCode as accidentNum,ven.cVenAbbName as accidentUndertaker,sum(A.iOriSum) as amount,sum(a.iSum) as rmbamount