bug修复-03-16

product
chuang 2 years ago
parent 1e8a18b9bb
commit b401fc565a

@ -82,6 +82,7 @@ public class PurchaseorderDTO {
@Excel(name = "客户")
private String customerId;
private String supplierId;
private String id;

@ -219,8 +219,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
lineFont.setFontHeightInPoints((short) 12);
lineStyle.setFont(lineFont);
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 8));
sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 8));
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 9));
sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 9));
BigDecimal sum = BigDecimal.ZERO;
@ -240,6 +240,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
HSSFCell lineCell7 = row2.createCell(6);
HSSFCell lineCell8 = row2.createCell(7);
HSSFCell lineCell9 = row2.createCell(8);
HSSFCell lineCell10 = row2.createCell(9);
lineCell1.setCellValue(i + 1);
lineCell1.setCellStyle(lineStyle);
lineCell2.setCellValue(String.valueOf(map.get("poundDate")).equals("null") ? "" : String.valueOf(map.get("poundDate")));
@ -262,6 +263,9 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
lineCell9.setCellValue(String.valueOf(map.get("settlement")).equals("null") ? "" : String.valueOf(map.get("settlement")));
lineCell9.setCellStyle(lineStyle);
lineCell10.setCellValue(String.valueOf(map.get("purchasePrice")).equals("null") ? "" : String.valueOf(map.get("purchasePrice")));
lineCell10.setCellStyle(lineStyle);
String s = String.valueOf(map.get("settlement")).equals("null") ? "0" : String.valueOf(map.get("settlement"));
sum = sum.add(new BigDecimal(s));
@ -310,6 +314,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
HSSFCell cell8 = row1.createCell(6);
HSSFCell cell9 = row1.createCell(7);
HSSFCell cell10 = row1.createCell(8);
HSSFCell cell11 = row1.createCell(9);
cell2.setCellValue("序号");
cell2.setCellStyle(headLineStyle);
cell3.setCellValue("收货日期");
@ -328,6 +333,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
cell9.setCellStyle(headLineStyle);
cell10.setCellValue("结算重量");
cell10.setCellStyle(headLineStyle);
cell11.setCellValue("采购价");
cell11.setCellStyle(headLineStyle);
HSSFRow lowRow = sheet.createRow((short) i + 4);
HSSFCell lowCell1 = lowRow.createCell(0);
HSSFCell lowCell2 = lowRow.createCell(8);
@ -343,6 +350,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
lowRow.createCell(5).setCellStyle(lineStyle);
lowRow.createCell(6).setCellStyle(lineStyle);
lowRow.createCell(7).setCellStyle(lineStyle);
lowRow.createCell(9).setCellStyle(lineStyle);
}
}
}
@ -356,6 +364,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
sheet.autoSizeColumn(6);
sheet.autoSizeColumn(7);
sheet.autoSizeColumn(8);
sheet.autoSizeColumn(9);
sheet.setAutobreaks(true);//这个是sheet缩放设置默认打印一页要true
sheet.setMargin(Sheet.BottomMargin, 0.5);// 页边距(下)
@ -483,7 +492,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
title.getFormat().setHorizontalAlignment(HorizontalAlignment.Center);
title.applyStyle("titleStyle");
continue;
}
List<Map<String, Object>> imgList = FileCopy.getImageInfo(String.valueOf(map.get("poundPictures")));
if (imgList != null && imgList.size() > 0) {
@ -1193,7 +1202,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
String s4 = String.valueOf(map.get("contact")).equals("null") ? "" : String.valueOf(map.get("contact"));
String s1 = i + "-" + s2 + s3 + s4;
String s1 = (i+1) + "-" + s2 + s3 + s4;
File outImg = new File(templateFilePath + "vehicle\\" + s1 + "\\" + UUID.randomUUID().toString().replaceAll("-", "") + ".png");
File parentFile = outImg.getParentFile();
if (!parentFile.exists()) {
@ -1468,6 +1477,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (contractMEntities != null && contractMEntities.size() > 0) {
model.setSalesId(contractMEntities.get(0).getId());
model.setSupplierId(contractMEntities.get(0).getCode());
} else {
model.setCauseError("销售合同不存在!请添加销售合同后尝试添加!");
errList.add(model);
@ -1632,7 +1642,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
// 对方合同号
entity.setContractNo(contractMEntities.get(0).getContractNo());
// 供应商、客户ID
entity.setSupplierId(contractMEntities.get(0).getCode());
// entity.setSupplierId(contractMEntities.get(0).getCode());
// 供应商名称
entity.setSupplierName(contractMEntities.get(0).getName());
// 重量

@ -634,4 +634,33 @@
</select>
<select id="getContractDetailData">
SELECT
*
FROM
(
SELECT
a.*,
ROUND( IFNULL( IFNULL( SUM( b.settlement ), 0 )/ IFNULL( a.num, 0 )* 100, 0 ), 2 ) 完成进度,
ROUND( IFNULL( SUM( b.settlement ), 0 ), 6 ) 已完成数量,
ROUND( IFNULL( a.num, 0 )- IFNULL( SUM( b.settlement ), 0 ), 6 ) 待完成数量
FROM
jg_contract a
LEFT JOIN jg_poundlist b ON b.purchase_id = a.id
AND (
b.sales_status != 99
OR ISNULL( b.sales_status ))
AND (
b.sales_status != 0
OR ISNULL( b.sales_status ))
AND b.pound_status = '0'
AND b.delete_mark = '0'
WHERE
a.contract_type = '0'
AND a.delete_mark = '0'
GROUP BY
a.id
) aaa ${ew.customSqlSegment}
</select>
</mapper>

@ -208,6 +208,8 @@
<result property="buckleWeight" column="buckleWeight"/>
<!-- 结算重量 -->
<result property="settlement" column="settlement"/>
<!-- 采购价-->
<result property="purchasePrice" column="purchasePrice"/>
<!-- 单位-->
<result property="unit" column="unit"/>
</resultMap>
@ -230,6 +232,7 @@
ROUND(c.tare_weight,2) tareWeight,
ROUND(c.buckle_weight,2) buckleWeight,
ROUND(c.settlement,2) settlement,
ROUND( c.purchase_price, 2 ) purchasePrice,
( CASE b.unit WHEN 0 THEN '吨' ELSE '千克' END ) AS `unit`
FROM
jg_purchaseorder AS a

Loading…
Cancel
Save