Browse Source

20241220

java8
qiezi 1 year ago
parent
commit
1af3aa6af4
  1. 2
      src/main/java/com/xujie/sys/modules/quote/entity/QuoteDetail.java
  2. 2
      src/main/java/com/xujie/sys/modules/quote/service/impl/QuoteServiceImpl.java
  3. 39
      src/main/java/com/xujie/sys/modules/reader/service/impl/GetInformationForExcelServiceImpl.java
  4. 5
      src/main/resources/mapper/quote/QuoteDetailMapper.xml

2
src/main/java/com/xujie/sys/modules/quote/entity/QuoteDetail.java

@ -156,6 +156,8 @@ public class QuoteDetail {
private BigDecimal quoteCurrencyTotalCost2;
private String type; // 类型
@TableField(exist = false)
private Integer engChgLevel;

2
src/main/java/com/xujie/sys/modules/quote/service/impl/QuoteServiceImpl.java

@ -286,7 +286,7 @@ public class QuoteServiceImpl extends ServiceImpl<QuoteMapper, Quote> implements
detail.setQuoteTotalCost(BigDecimal.ZERO);
detail.setQuoteProfitRate(BigDecimal.ZERO);
detail.setQuoteProfitAmount(BigDecimal.ZERO);
detail.setType("Standard TP");// 默认标准
detail.setQuoteTotalPrice(BigDecimal.ZERO);
detail.setQuoteUnitPrice(BigDecimal.ZERO);

39
src/main/java/com/xujie/sys/modules/reader/service/impl/GetInformationForExcelServiceImpl.java

@ -88,45 +88,6 @@ public class GetInformationForExcelServiceImpl extends ServiceImpl<GetInformatio
}
}
private void saveFileList(EquipmentFolderLocation location){
//获取文件夹下所有文件
//创建本地文件夹路径
File fileInfo = new File(location.getFolderPath());
//获取本地文件夹下所有文件
File[] files = fileInfo.listFiles();
//如果文件夹下面的文件是空,则退出
if (files == null ||files.length==0) {
return;
}
Map<String, List<File>> map = new HashMap<>();
for (File file : files) {
String fileName = file.getName();
int index = fileName.lastIndexOf(".");
String fileType = fileName.substring(index + 1);
if (!map.containsKey(fileType)){
List<File> list = new ArrayList<>();
list.add(file);
map.put(fileType, list);
} else {
map.get(fileType).add(file);
}
}
for (String fileType : map.keySet()) {
if (!location.getSuffix().contains(fileType)){
continue;
}
List<File> fileList = map.get(fileType);
for (File file : fileList) {
//处理文件
// 拷贝文件
// 删除文件
}
}
}
private void saveInformation(EquipmentFolderLocation equipmentFolderLocation) throws Exception {
String folderFiler = equipmentFolderLocation.getFolderPath();
//获取文件夹下所有文件

5
src/main/resources/mapper/quote/QuoteDetailMapper.xml

@ -71,16 +71,17 @@
qd.currency_total_cost2,
qd.quote_currency_total_cost1,
qd.quote_currency_total_cost2,
type,
IIF(qd.qty >= 250000 and
((qd.currency1 = 'USD' and qd.exchange_rate1 > 0) or (qd.currency2 = 'USD' and exchange_rate2 > 0))
, (qd.adjust_bom_un_yield + qd.adjust_labour_cost + qd.adjust_fabricate_cost +
qd.adjust_machine_cost) / IIF(qd.currency1 = 'USD', qd.exchange_rate1, qd.exchange_rate2)
, null) * qd.quote_profit_rate / 100 as weighted,
, null) * qd.quote_profit_rate / 100 as weighted,
IIF(qd.qty >= 5000000 and
((qd.currency1 = 'USD' and qd.exchange_rate1 > 0) or (qd.currency2 = 'USD' and exchange_rate2 > 0))
, (qd.adjust_bom_un_yield + qd.adjust_labour_cost + qd.adjust_fabricate_cost +
qd.adjust_machine_cost) / IIF(qd.currency1 = 'USD', qd.exchange_rate1, qd.exchange_rate2)
, null) * qd.quote_profit_rate / 100 -1.5 as weighted2
, null) * qd.quote_profit_rate / 100 - 1.5 as weighted2
from plm_quote_detail qd
left join part pp on qd.part_id = pp.id
<where>

Loading…
Cancel
Save