Commit b1227055 authored by lanbaoming's avatar lanbaoming

2024-06-12提交发布

parent c35f1042
......@@ -51,6 +51,7 @@
<mapstruct.version>1.4.1.Final</mapstruct.version>
<hutool.version>5.6.1</hutool.version>
<pinyin4j.version>2.5.0</pinyin4j.version>
<!--lanbm 2024-06-11 修改版本 2.2.7 -->
<easyexcel.verion>2.2.7</easyexcel.verion>
<ooxml.verion>1.0</ooxml.verion>
<velocity.version>2.2</velocity.version>
......
......@@ -4,7 +4,7 @@ import com.alibaba.excel.write.handler.SheetWriteHandler;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder;
import lombok.RequiredArgsConstructor;
import org.apache.poi.POIXMLDocumentPart;
//import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePartName;
import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.openxml4j.opc.TargetMode;
......
......@@ -685,10 +685,16 @@ public class OrderQueryServiceImpl implements OrderQueryService {
dto.setOrderItemVOList(backVOList);
}
// 订单动态
List<OrderTimeDO> orderTimeList = orderTimeMapper.selectList(new LambdaQueryWrapper<OrderTimeDO>().eq(OrderTimeDO::getOrderId, orderId).orderByDesc(OrderTimeDO::getId));
// 订单动态 lanbm 2024-06-11 添加注释
// 订单的到仓时间 去动态值 businessTime
List<OrderTimeDO> orderTimeList =
orderTimeMapper.selectList(
new LambdaQueryWrapper<OrderTimeDO>().eq(OrderTimeDO::getOrderId, orderId).orderByDesc(OrderTimeDO::getId));
if (CollectionUtil.isNotEmpty(orderTimeList)) {
dto.setOrderTimeVOList(OrderTimeConvert.INSTANCE.convertList(orderTimeList));
//lanbm 2024-06-11 添加的函数
getDaoCanTiam(orderTimeList);
dto.setOrderTimeVOList(OrderTimeConvert.INSTANCE.convertList(
orderTimeList));
}
if (Objects.equals(TransportTypeShortEnum.SEA_CONTAINER.getValue(), dto.getTransportId())
|| Objects.equals(TransportTypeShortEnum.MARINE_CONTAINER.getValue(), dto.getTransportId())) {
......@@ -716,6 +722,28 @@ public class OrderQueryServiceImpl implements OrderQueryService {
return dto;
}
/*
lanbm 2024-06-11 添加的函数
*/
private void getDaoCanTiam(List<OrderTimeDO> orderTimeList) {
/*
List<OrderTimeDO> list = orderTimeList.stream().
filter(i -> i.getTitleZh() == "到仓").collect(Collectors.toList());
if (CollectionUtil.isEmpty(list)) {
return;
}*/
for (OrderTimeDO i:orderTimeList
) {
if(i.getTitleZh()!=null&&i.getTitleZh()=="到仓")
{
//i.getBusinessTime();
long l=i.getOrderId();
}
}
}
@NotNull
private List<OrderItemBackVO> fillOrderItemProperties(List<OrderItemBackVO> backVOList) {
if (CollectionUtil.isEmpty(backVOList)) {
......@@ -750,16 +778,16 @@ public class OrderQueryServiceImpl implements OrderQueryService {
item.setQQuantity(BigDecimal.ZERO.toString());
}
//入仓类型,多个用逗号分隔
OrderItemBackVO warehouseInDO = orderWarehouseInMapper.getWarehouseInByItemIdAndOrderId(item.getOrderId(),item.getOrderItemId());
if(Objects.nonNull(warehouseInDO) && StringUtils.isNotBlank(warehouseInDO.getWarehouseType())){
item.setWarehouseType(warehouseInDO.getWarehouseType()) ;
OrderItemBackVO warehouseInDO = orderWarehouseInMapper.getWarehouseInByItemIdAndOrderId(item.getOrderId(), item.getOrderItemId());
if (Objects.nonNull(warehouseInDO) && StringUtils.isNotBlank(warehouseInDO.getWarehouseType())) {
item.setWarehouseType(warehouseInDO.getWarehouseType());
}
//入仓包装单位,多个用逗号分隔
if(Objects.nonNull(warehouseInDO) && StringUtils.isNotBlank(warehouseInDO.getSpecificationType())){
item.setSpecificationType(warehouseInDO.getSpecificationType()) ;
if (Objects.nonNull(warehouseInDO) && StringUtils.isNotBlank(warehouseInDO.getSpecificationType())) {
item.setSpecificationType(warehouseInDO.getSpecificationType());
}
if(Objects.nonNull(warehouseInDO) && StringUtils.isNotBlank(warehouseInDO.getWarehouseRecordRemark())){
item.setWarehouseRecordRemark(warehouseInDO.getWarehouseRecordRemark()) ;
if (Objects.nonNull(warehouseInDO) && StringUtils.isNotBlank(warehouseInDO.getWarehouseRecordRemark())) {
item.setWarehouseRecordRemark(warehouseInDO.getWarehouseRecordRemark());
}
......@@ -895,7 +923,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
if (Objects.isNull(query.getLang())) {
query.setLang(I18nMessage.getLang());
}
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
IPage<OrderBackPageVO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString());
......@@ -907,31 +935,29 @@ public class OrderQueryServiceImpl implements OrderQueryService {
}
public void caseStatus(List<Integer> status, OrderQueryDTO query) {
if (CollectionUtils.isNotEmpty(status) && status.size() > 0) {
List<Integer> statusList = new ArrayList<>();
public void caseStatus(List<Integer> status,OrderQueryDTO query){
if (CollectionUtils.isNotEmpty(status) && status.size()>0) {
List<Integer> statusList =new ArrayList<>() ;
status.forEach(statu->{
if(statu>10000){
combinedState(statu, query,statusList);
status.forEach(statu -> {
if (statu > 10000) {
combinedState(statu, query, statusList);
}
});
statusList.stream().distinct();
List<Integer> list= new ArrayList<>() ;
list.addAll(status.stream().filter(s->s <10000).collect(Collectors.toList())) ;
List<Integer> list = new ArrayList<>();
list.addAll(status.stream().filter(s -> s < 10000).collect(Collectors.toList()));
list.addAll(statusList.stream().distinct().collect(Collectors.toList()));
query.setStatusList(list) ;
}else if(CollectionUtils.isNotEmpty(status) && status.size()==0){
status =null;
query.setStatusList(list);
} else if (CollectionUtils.isNotEmpty(status) && status.size() == 0) {
status = null;
}
}
private void combinedState(Integer asStatus, OrderQueryDTO query,List<Integer> statusList) {
private void combinedState(Integer asStatus, OrderQueryDTO query, List<Integer> statusList) {
switch (asStatus) {
......@@ -946,27 +972,27 @@ public class OrderQueryServiceImpl implements OrderQueryService {
//this.status = 5;
statusList.add(5);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if(Objects.nonNull(query.getTransportId())){
if (Objects.nonNull(query.getTransportId())) {
query.setTransportId(3);
}
query.setAirShipment(1);
//this.auditType = 0;
if(CollectionUtils.isEmpty(query.getAuditType())){
List<Integer> audits= new ArrayList<>();
query.setAuditType(audits) ;
query.getAuditType().add(0) ;
}else {
query.getAuditType().add(0) ;
if (CollectionUtils.isEmpty(query.getAuditType())) {
List<Integer> audits = new ArrayList<>();
query.setAuditType(audits);
query.getAuditType().add(0);
} else {
query.getAuditType().add(0);
}
//this.abnormalState = 0;
if(CollectionUtils.isEmpty(query.getAbnormalState())){
List<Integer> audits= new ArrayList<>();
if (CollectionUtils.isEmpty(query.getAbnormalState())) {
List<Integer> audits = new ArrayList<>();
query.setAbnormalState(audits);
query.getAbnormalState().add(0) ;
}else {
query.getAbnormalState().add(0) ;
query.getAbnormalState().add(0);
} else {
query.getAbnormalState().add(0);
}
break;
......@@ -975,20 +1001,20 @@ public class OrderQueryServiceImpl implements OrderQueryService {
//this.status = 5;
statusList.add(5);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if(Objects.nonNull(query.getTransportId())){
if (Objects.nonNull(query.getTransportId())) {
query.setTransportId(3);
}
query.setAirShipment(12) ; // 可出、备货中
query.setAirShipment(12); // 可出、备货中
break;
case 10503:
// 空运已备货
//this.status = 5;
statusList.add(5);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if(Objects.nonNull(query.getTransportId())){
if (Objects.nonNull(query.getTransportId())) {
query.setTransportId(3);
}
query.setAirShipment(4) ; // 已备货
query.setAirShipment(4); // 已备货
break;
case 10504:
// 待排单
......@@ -996,29 +1022,29 @@ public class OrderQueryServiceImpl implements OrderQueryService {
statusList.add(5);
if (Objects.nonNull(query.getTransportId()) && query.getTransportId() == 3) {
// 空运无需判断备货状态 可出、备货中、已备货
query.setAirShipment(10) ;
}else {
query.setAirShipment(10);
} else {
// 兼容空运已入仓的可出、备货中、已备货,且无异常无审批,海运的已入仓无异常无审批
query.setAirShipment(20) ;
query.setAirShipment(20);
}
//this.auditType = 0;
if(CollectionUtils.isEmpty(query.getAuditType())){
List<Integer> audits= new ArrayList<>();
if (CollectionUtils.isEmpty(query.getAuditType())) {
List<Integer> audits = new ArrayList<>();
query.setAuditType(audits) ;
query.setAuditType(audits);
query.getAuditType().add(0);
} else {
query.getAuditType().add(0);
}else {
query.getAuditType().add(0) ;
}
//this.abnormalState = 0;
if(CollectionUtils.isEmpty(query.getAbnormalState())){
List<Integer> audits= new ArrayList<>();
if (CollectionUtils.isEmpty(query.getAbnormalState())) {
List<Integer> audits = new ArrayList<>();
query.setAbnormalState(audits);
query.getAbnormalState().add(0) ;
}else {
query.getAbnormalState().add(0) ;
query.getAbnormalState().add(0);
} else {
query.getAbnormalState().add(0);
}
break;
case 132411:
......@@ -1026,7 +1052,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
//this.status = 32;
statusList.add(32);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if(Objects.nonNull(query.getTransportId())){
if (Objects.nonNull(query.getTransportId())) {
query.setTransportId(3);
}
query.setShipmentState(411);
......@@ -1036,7 +1062,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
//this.status = 32;
statusList.add(32);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if(Objects.nonNull(query.getTransportId())){
if (Objects.nonNull(query.getTransportId())) {
query.setTransportId(3);
}
query.setShipmentState(412);
......@@ -1045,21 +1071,21 @@ public class OrderQueryServiceImpl implements OrderQueryService {
// 空运已理货
//this.status = 32;
statusList.add(32);
// 空运待出查询,只查空运的订单
if(Objects.nonNull(query.getTransportId())){
// 空运待出查询,只查空运的订单
if (Objects.nonNull(query.getTransportId())) {
query.setTransportId(3);
}
query.setShipmentState( 409);
query.setShipmentState(409);
break;
case 118428:
// 空运已到港
//this.status = 18;
statusList.add(18);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if(Objects.nonNull(query.getTransportId())){
if (Objects.nonNull(query.getTransportId())) {
query.setTransportId(3);
}
query.setShipmentState( 428);
query.setShipmentState(428);
break;
}
......@@ -1085,7 +1111,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
@Override
public PageResult<OrderBackPageVO> deptOrderPage1(OrderQueryDTO query, PageVO page) {
query.setLang(I18nMessage.getLang());
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
IPage<OrderBackPageVO> mpPage = MyBatisUtils.buildPage(page);
long total = orderMapper.deptOrderCount1(query);
log.warn(I18nMessage.getLang().toString());
......@@ -1132,7 +1158,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
@Override
public PageResult<OrderBackPageVO> adminCargoControlMyOrderPage(OrderQueryDTO query, PageVO page) {
query.setLang(I18nMessage.getLang());
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
IPage<OrderBackPageVO> mpPage = MyBatisUtils.buildPage(page);
long total = orderMapper.adminCargoControlMyOrderCount(query);
log.warn(I18nMessage.getLang().toString());
......@@ -1698,7 +1724,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
@Override
public StatisticsOrderVO statisticsMyOrder(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
StatisticsOrderVO vo = orderMapper.statisticsMyOrder(query);
if (Objects.nonNull(vo)) {
vo.setTotalVolume(new BigDecimal(vo.getTotalVolume()).setScale(2, RoundingMode.HALF_UP).toString());
......@@ -1904,7 +1930,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
public FileDO makeMyOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
String sheetName = query.getLang() == 0 ? "订单管理第{0}页" : "Order Management number {0}";
if (Objects.isNull(userId)) {
userId = 0L;
......@@ -1987,7 +2013,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
*/
@Override
public List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsExcel(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
return orderMapper.getOrderExceptionStatisticsList(query);
}
......@@ -1998,7 +2024,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
*/
@Override
public List<OrderHeavyExcelVo> getHeavyOrderExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
return orderMapper.getHeavyOrderExcelList(query);
}
......@@ -2010,7 +2036,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
*/
@Override
public List<OrderReturnOrderExcelVo> getReturnOrderExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
return orderMapper.getReturnOrderExcelList(query);
}
......@@ -2022,7 +2048,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
*/
@Override
public List<OrderSaleRepayExcelVo> getSaleRepayExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
return orderMapper.getSaleRepayExcelList(query);
}
......@@ -2034,7 +2060,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
*/
@Override
public List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
return orderMapper.getCustomsDatasExcelList(query);
}
......@@ -2046,7 +2072,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
*/
@Override
public List<OrderShipDataExcelVo> getShipDatasExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
return orderMapper.getShipDatasExcelList(query);
}
......@@ -2058,7 +2084,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
*/
@Override
public List<OrderShipFeeExcelVo> getShipFeeExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
caseStatus(query.getStatus(), query);
return orderMapper.getShipFeeExcelList(query);
}
......
......@@ -1743,7 +1743,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
List<Long> productIdList = list.stream()
.map(ProductPriceBaseVO::getProductId)
.collect(Collectors.toList());
List<ProductDO> productDOList = productService.getProductList(productIdList);
List<ProductDO> productDOList =
productService.getProductList(productIdList);
Map<Long, ProductDO> productMap = productDOList.stream()
.collect(Collectors.toMap(ProductDO::getId, (v -> v), (v1, v2) -> v2));
......
package cn.iocoder.yudao.module.shipment.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.converters.string.StringImageConverter;
import lombok.Data;
import java.io.File;
import java.io.InputStream;
import java.net.URL;
@Data
@ContentRowHeight(100)
@ColumnWidth(100 / 8)
public class ImageData {
private File file;
private InputStream inputStream;
/**
* 如果string类型 必须指定转换器,string默认转换成string
*/
@ExcelProperty(converter = StringImageConverter.class)
private String string;
private byte[] byteArray;
/**
* 根据url导出
*
* @since 2.1.1
*/
private URL url;
}
......@@ -52,11 +52,11 @@ import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.*;
import java.math.BigDecimal;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
......@@ -99,8 +99,6 @@ public class ShipmentReceivableExcelExportListener {
@Resource
private ReceivableService receivableService;
// @Value("${ue.templates-url}")
// private String path;
/**
* 订单导出监听
......@@ -221,6 +219,8 @@ public class ShipmentReceivableExcelExportListener {
totalJnSeaFreight = totalJnSeaFreight.add(jnyfyf);
}
headMap.put("totalNum", totalNum);
headMap.put("totalVolume", totalVolume.doubleValue());
headMap.put("totalWeight", totalWeight.doubleValue());
......@@ -269,4 +269,6 @@ public class ShipmentReceivableExcelExportListener {
}
}
}
......@@ -23,6 +23,7 @@ import cn.iocoder.yudao.module.order.service.order.*;
import cn.iocoder.yudao.module.shipment.dal.dataobject.BoxDO;
import cn.iocoder.yudao.module.shipment.dal.dataobject.BoxMergePkgDO;
import cn.iocoder.yudao.module.shipment.dal.dataobject.BoxPkgOrderDO;
import cn.iocoder.yudao.module.shipment.dto.ImageData;
import cn.iocoder.yudao.module.shipment.service.box.BoxService;
import cn.iocoder.yudao.module.shipment.service.boxMergePkg.BoxMergePkgService;
import cn.iocoder.yudao.module.shipment.service.boxPkgOrder.BoxPkgOrderService;
......@@ -34,6 +35,7 @@ import cn.iocoder.yudao.module.wealth.service.receivable.ReceivableService;
import cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableOrderPayedFeeTypeVO;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.util.FileUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.fill.FillConfig;
import com.alibaba.fastjson.JSONObject;
......@@ -45,6 +47,7 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.context.event.EventListener;
import org.springframework.security.config.annotation.web.configurers.UrlAuthorizationConfigurer;
import org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor;
import org.springframework.stereotype.Component;
......@@ -52,6 +55,9 @@ import javax.annotation.Resource;
import java.io.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
......@@ -60,6 +66,8 @@ import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.excel.constant.ExportConstant.DATA_FORMAT;
import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.HAVE_NOT_PRELOAD_GOODS;
import java.net.URL;
/**
* 自编号订单excel导出监听
* 海运应收汇总表单
......@@ -154,6 +162,9 @@ public class ShipmentReceivableExcelExportListener2 {
getResourceAsStream(ueProperties.getTemplatesUrl()
+ "/nrlyReceivable2.xlsx");
String templateFileName=ueProperties.getTemplatesUrl()
+ "/nrlyReceivable2.xlsx";
BoxDO box = boxService.getBox(shipmentId);
WarehouseDO startWarehouse = warehouseService.getWarehouse(box.getStartWarehouseId());
WarehouseDO destWarehouse = warehouseService.getWarehouse(box.getDestWarehouseId());
......@@ -191,6 +202,20 @@ public class ShipmentReceivableExcelExportListener2 {
headMap.put("lkRight", warehouseLineDO.getLkRight());
}
//lanbm 2024-06-11 添加图片自动填充功能
ImageData imageData = new ImageData();
imageData.setUrl(new URL(
"https://jiedao-pre-production.oss-cn-shenzhen.aliyuncs.com/2024/06/11/6668347de4b001393be98e24.jpg"));
headMap.put("img1", imageData.getUrl());
headMap.put("img2", imageData.getUrl());
//end lanbm 2024-06-11 添加图片自动填充功能
if(box.getZgDate()!=null) {
//装柜日期 日期格式化
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String currentDate = sdf.format(box.getZgDate());
headMap.put("zkDate", currentDate);
}
headMap.put("selfNo", box.getSelfNo());
headMap.put("fromZh", senderInfo.getName());
headMap.put("fromEn", senderInfo.getNameEn());
......@@ -458,6 +483,17 @@ public class ShipmentReceivableExcelExportListener2 {
headMap.put("sum11", currencyFuhaoMap.get(qgCurrency) + sum11);
headMap.put("sum12", currencyFuhaoMap.get(yfCurrency) + sum12);
headMap.put("sum13", currencyFuhaoMap.get(qgCurrency) + sum13);
//按模板中的逻辑计算出来的
headMap.put("DesAgentFee",
currencyFuhaoMap.get(yfCurrency) +
sum6.multiply(new BigDecimal(0.2)).
setScale(2, RoundingMode.HALF_UP));
headMap.put("BillinTTl",
currencyFuhaoMap.get(qgCurrency)
+sum6.subtract(sum4).subtract(
sum6.multiply(new BigDecimal(0.2)).setScale(2, RoundingMode.HALF_UP)));
int sumCount = 0;
for (BoxMergePkgDO boxMergePkgDO : boxMergePkgDOS) {
Long count = boxPkgOrderService.selectCount(BoxPkgOrderDO::getPkgId, boxMergePkgDO.getId());
......@@ -487,13 +523,13 @@ public class ShipmentReceivableExcelExportListener2 {
WriteSheet sheet = EasyExcel.writerSheet(0).build();
FillConfig fillConfig = FillConfig.builder().forceNewRow(true).build();
excelWriter.fill(headMap, sheet);//填充非循环数据--表头
excelWriter.fill(list, fillConfig, sheet);//填充循环数据--表数据
excelWriter.finish();
inputStream.close();
// 获取到临时文件
File file = new File(dir + fileName);
//TODO 利用POI 合并单元格
Workbook workbook = new XSSFWorkbook(file);
Sheet poiSheet = workbook.getSheetAt(0);
......@@ -544,10 +580,103 @@ public class ShipmentReceivableExcelExportListener2 {
} else {
event.setResult("param fail");
}
}
private BigDecimal changeAmountToDestCurrency(Long fromCurrencyId, Long toCurrencyId, BigDecimal fromAmount) {
/*
@EventListener(ShipmentReceivableExcelExportPushEvent2.class)
public void shipmentReceivableExcelExportPushEvent(
ShipmentReceivableExcelExportPushEvent2 event)
throws MalformedURLException {
String sPath = "D:\\temp";
String fileName2 = sPath + File.separator + "1.xlsx";
ImageData imageData2 = new ImageData();
imageData2.setUrl(new URL(
"https://jiedao-pre-production.oss-cn-shenzhen.aliyuncs.com/2024/06/11/6668347de4b001393be98e24.jpg"));
Map<String, Object> map = new HashMap<>();
map.put("img1", imageData2.getUrl());
String templateFileName2 = "D:\\jd\\jiedao-api-boot-master\\yudao-server\\src\\main\\resources\\templates\\nrlyReceivable2.xlsx";
EasyExcel.write(fileName2).
withTemplate(templateFileName2).
sheet().doFill(map);
return;
/*
if (StringUtils.isNotBlank(event.getRequestParams())) {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
String dir = ueProperties.getTempDir().concat("/receivable/excel/");
//先不合并单元格,之后合并,把合并的传到服务器 lanbm 2024-05-25 add
String fileName = event.getUserId().toString().
concat(StrUtil.DASHED).concat(event.getUserType().toString()).
concat(StrUtil.DASHED).concat(nowTime).
concat("receivable_notMerge.xlsx");
String fileNameMerge = event.getUserId().toString().
concat(StrUtil.DASHED).concat(event.getUserType().toString()).
concat(StrUtil.DASHED).concat(nowTime).
concat("receivable_Merge.xlsx");
InputStream inputStream = null;
JSONObject jsonObject =
JSONObject.parseObject(event.getRequestParams());
Long shipmentId = jsonObject.getLong("shipmentId");
inputStream = getClass().getClassLoader().
getResourceAsStream(ueProperties.getTemplatesUrl()
+ "/nrlyReceivable2.xlsx");
String templateFileName = ueProperties.getTemplatesUrl()
+ "/nrlyReceivable2.xlsx";
Map headMap = new HashMap();
//lanbm 2024-06-11 添加图片自动填充功能
ImageData imageData = new ImageData();
imageData.setUrl(new URL(
"https://jiedao-pre-production.oss-cn-shenzhen.aliyuncs.com/2024/06/11/6668347de4b001393be98e24.jpg"));
headMap.put("img1", imageData.getUrl());
headMap.put("img2", imageData.getUrl());
//end lanbm 2024-06-11 添加图片自动填充功能
File fileDir = new File(dir);
if (!fileDir.exists()) {
// 不存在则创建一个目录
fileDir.mkdirs();
}
//ExcelWriter excelWriter =
// EasyExcel.write(dir + fileName).
// withTemplate(inputStream).build();
// WriteSheet sheet = EasyExcel.writerSheet(0).build();
// excelWriter.fill(headMap, sheet);//填充非循环数据--表头
// excelWriter.finish();
// inputStream.close();
EasyExcel.write(dir + fileName).
withTemplate(inputStream).
sheet().doFill(headMap);
} catch (Exception e) {
e.printStackTrace();
event.setResult(e.getMessage());
}
} else {
event.setResult("param fail");
}
*/
// }
private BigDecimal changeAmountToDestCurrency(Long fromCurrencyId,
Long toCurrencyId,
BigDecimal fromAmount) {
BigDecimal destAmount = BigDecimal.ZERO;
ExchangeRateRespDTO currencyRate = currencyApi.getCurrencyRate(fromCurrencyId, toCurrencyId);
destAmount = fromAmount.multiply(currencyRate.getCurrencyRate());
......
......@@ -116,7 +116,8 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
String flowKey = "";
//----------------------------------------预装---------------------------------------
if (createReqVO.getApprovalType() == BoxApprovalTypeEnum.PRELOAD.getType()) {
if (createReqVO.getApprovalType() ==
BoxApprovalTypeEnum.PRELOAD.getType()) {
//检查是否有预装订单
boxService.checkPreInstallNum(shipmentId);
......@@ -134,7 +135,8 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
boxService.updateOrderStatusByShipmentId(shipmentId, null, 0,
BoxStatusEnum.PREINSTALL_EXAMINE.getStatus(), pre_install_processing.getType(), pre_install_processing.getDesc());
} else if (createReqVO.getApprovalType() == BoxApprovalTypeEnum.SEALING_CABINET.getType()) {
} else if (createReqVO.getApprovalType() ==
BoxApprovalTypeEnum.SEALING_CABINET.getType()) {
//首先校验出货是否已经预装审核成功
Integer prStatus = boxDO.getPrStatus();
if(prStatus != PrStatusEnum.PRELOAD_APPROVAL_SUCCESS.getPrStatus()) {
......@@ -183,7 +185,8 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
boxOpLogService.createBoxOpLog(shipmentId, ulStatusEnum.getUlStatus(), ulStatusEnum.getStatusNameZh(), ulStatusEnum.getStatusNameEn(), boxApproval.getId());
}
//-------------------------------------------预装反审----------------------------------------
else if (createReqVO.getApprovalType() == BoxApprovalTypeEnum.PRELOAD_UMPIRE.getType()) {
else if (createReqVO.getApprovalType() ==
BoxApprovalTypeEnum.PRELOAD_UMPIRE.getType()) {
//预装反审
flowKey = WorkFlowEmus.SHIPMENT_PREASSEMBLE_NO.getKey();
......@@ -406,11 +409,13 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
boxService.addOrderLog(Collections.singletonList(orderId), orderShipmentLog, "");
}
//-----------------------------------------批量加价-------------------------------------------
else if(createReqVO.getApprovalType() == BoxApprovalTypeEnum.BATCH_ADD_PRICE.getType()) {
else if(createReqVO.getApprovalType() ==
BoxApprovalTypeEnum.BATCH_ADD_PRICE.getType()) {
//批量加价
flowKey = WorkFlowEmus.SHIPMENT_BATCH_ADD_PRICE.getKey();
String details = createReqVO.getDetails();
BoxOrderMarkUpVO boxOrderMarkUpVO = JSON.parseObject(details, BoxOrderMarkUpVO.class);
BoxOrderMarkUpVO boxOrderMarkUpVO =
JSON.parseObject(details, BoxOrderMarkUpVO.class);
boxService.checkOrderPayStatus(boxOrderMarkUpVO.getOrderIds());
}
//-----------------------------------------删单退场-------------------------------------------
......@@ -547,7 +552,9 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
}
Long userId = SecurityFrameworkUtils.getLoginUserId();
String bpmProcessId = bpmCreateServiceFactory.createBmp(userId, boxApproval.getId(), flowKey, boxDO.getSelfNo(), createReqVO.getCopyUserId());
String bpmProcessId = bpmCreateServiceFactory.createBmp(userId,
boxApproval.getId(), flowKey, boxDO.getSelfNo(),
createReqVO.getCopyUserId());
boxApproval.setBpmProcessId(bpmProcessId);
boxApprovalMapper.updateById(boxApproval);
// 返回
......
......@@ -2,9 +2,11 @@ package cn.iocoder.yudao.module.shipment.service.boxLadingBill;
import java.io.*;
import java.util.*;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO;
......@@ -38,6 +40,8 @@ import cn.iocoder.yudao.module.shipment.service.boxShipping.BoxShippingService;
import cn.iocoder.yudao.module.shipment.vo.boxLadingBill.BoxLadingBillCreateReqVO;
import cn.iocoder.yudao.module.shipment.vo.boxLadingBill.BoxLadingBillQueryVO;
import cn.iocoder.yudao.module.shipment.vo.boxLadingBill.BoxLadingBillUpdateReqVO;
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
......@@ -47,6 +51,7 @@ import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.PdfStamper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
......@@ -100,6 +105,12 @@ public class BoxLadingBillServiceImpl extends AbstractService<BoxLadingBillMappe
@Lazy
private BoxAgentService boxAgentService;
/*
数据字典项
*/
@Autowired
private DictDataApi dictDataApi;
@Value("${ue.templates-url}")
private String path;
......@@ -167,6 +178,19 @@ public class BoxLadingBillServiceImpl extends AbstractService<BoxLadingBillMappe
if (boxLadingBillDO == null) {
throw exception(MAKE_BILL_OF_LADING_NOT_EXISTS);
}
//包装单位 lanbm 2024-06-11 add
List<DictDataRespDTO> listPack =
dictDataApi.getDictDatas("packaging_type");
Map<String, String> PackMap = null;
if (CollectionUtil.isNotEmpty(listPack)) {
PackMap = listPack.stream().collect(
Collectors.toMap((DictDataRespDTO::getValue),
DictDataRespDTO::getLabel));
}
//end 包装单位 lanbm 2024-06-11 add
BoxShippingDO boxShippingDO =
boxShippingService.getOne(
new LambdaQueryWrapperX<BoxShippingDO>().eq(BoxShippingDO::getShipmentId,
......@@ -261,10 +285,16 @@ public class BoxLadingBillServiceImpl extends AbstractService<BoxLadingBillMappe
// }
// }
// headMap.put("description",boxLadingBillDO.getGoodsDesc()+"\r\n"+stringBuffer.toString());
//lanbm 2024-06-06 添加保存数量和单位
String sDes=boxLadingBillDO.getPackageNum()+boxLadingBillDO.getPackageUnit();
sDes+="\r\n"+boxLadingBillDO.getGoodsDesc();
headMap.put("description",sDes);
String sPackName = "";
String sUnit = boxLadingBillDO.getPackageUnit();
if (CollectionUtil.isNotEmpty(PackMap) && sUnit != null && sUnit.length() > 0) {
sPackName = sPackName = PackMap.get(sUnit);
}
String sDes = boxLadingBillDO.getPackageNum() + sPackName;
sDes += "\r\n" + boxLadingBillDO.getGoodsDesc();
headMap.put("description", sDes);
//headMap.put("description", boxLadingBillDO.getGoodsDesc());
//end lanbm 2024-06-06 添加保存数量和单位
......
......@@ -1860,7 +1860,8 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
@Override
public BoxLoadDetailBackVO boxGoodsDetail(Long shipmentId, Long secId) {
BoxLoadDetailBackVO detailBackVO = boxGoodsList(shipmentId, secId, null, 0);
BoxLoadDetailBackVO detailBackVO = boxGoodsList(shipmentId,
secId, null, 0);
//查询订单的报关费用
List<BoxLoadOrderVO> orderVOList = detailBackVO.getSectionOrderList();
......
......@@ -53,11 +53,15 @@ public class BoxApprovalController {
@Resource
private OrderApprovalService orderApprovalService;
/*
创建出货审批流程 lanbm 2024-06-11 添加注释
*/
@PostMapping("/create")
@ApiOperation("创建出货审核, use this")
@Idempotent(timeout = 10)
// //@PreAuthorize("@ss.hasPermission('ecw:box-approval:create')")
public CommonResult<Long> createBoxApproval(@Valid @RequestBody BoxApprovalCreateReqVO createReqVO) {
//@PreAuthorize("@ss.hasPermission('ecw:box-approval:create')")
public CommonResult<Long> createBoxApproval(
@Valid @RequestBody BoxApprovalCreateReqVO createReqVO) {
return success(boxApprovalService.createBoxApproval(createReqVO));
}
......
......@@ -31,7 +31,6 @@ public class BoxOpLogController {
@Resource
private BoxOpLogService boxOpLogService;
@GetMapping("/get")
@ApiOperation("获得出货操作日志")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
......@@ -41,9 +40,12 @@ public class BoxOpLogController {
return success(BoxOpLogConvert.INSTANCE.convert(boxOpLog));
}
/*
获取订单的操作日志 lanbm 2024-06-11 添加注释
*/
@GetMapping("/list")
@ApiOperation("获得出货操作日志列表, use this")
// @PreAuthorize("@ss.hasPermission('ecw:box-op-log:query')")
//@PreAuthorize("@ss.hasPermission('ecw:box-op-log:query')")
public CommonResult<List<BoxOpLogBackVO>> getBoxOpLogList(BoxOpLogQueryVO query) {
List<BoxOpLogDO> list = boxOpLogService.getBoxOpLogList(query);
List<BoxOpLogBackVO> resultList = BoxOpLogConvert.INSTANCE.convertList(list);
......
......@@ -462,7 +462,8 @@ public class BoxPreloadGoodsController {
@ApiImplicitParam(name = "secId", value = "部分ID", required = false, example = "20", dataTypeClass = Long.class)
})
public CommonResult<BoxLoadDetailBackVO> boxGoodsDetail(@RequestParam("shipmentId") Long shipmentId, @RequestParam("secId") Long secId) {
BoxLoadDetailBackVO boxLoadDetailBackVO = boxPreloadGoodsService.boxGoodsDetail(shipmentId, secId);
BoxLoadDetailBackVO boxLoadDetailBackVO =
boxPreloadGoodsService.boxGoodsDetail(shipmentId, secId);
return success(boxLoadDetailBackVO);
}
......
......@@ -450,39 +450,40 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
List<Long> idList = mpPage.getRecords().stream()
.map(ReceiptBackVO::getId)
.collect(Collectors.toList());
//根据List获取本页中所有的明细信息
LambdaQueryWrapper<ReceiptItemDO> lambdaQueryWrapper =
new LambdaQueryWrapper<>();
lambdaQueryWrapper.in(ReceiptItemDO::getReceiptId, idList);
//所有收款单的明细
List<ReceiptItemDO> listItem =
receiptItemMapper.selectList(lambdaQueryWrapper);
LambdaQueryWrapper<ReceiptAccountDO> lambdaQueryWrapper2 =
new LambdaQueryWrapper<>();
lambdaQueryWrapper2.in(ReceiptAccountDO::getReceiptId, idList);
List<ReceiptAccountDO> ReceiptAccountList =
receiptAccountMapper.selectList(lambdaQueryWrapper2);
Map<Integer, CurrencyRespDTO> currencyMap = currencyApi.getAllCurrency();
for (ReceiptBackVO r : mpPage.getRecords()
) {
String sR = getReceiptMxStatus(listItem, r.getId());
r.setMxStatus(sR);
//应收
String s1 = getYSShow(ReceiptAccountList, r.getId(), currencyMap);
r.setYsShow(s1);
//实收
String s2 = getSSShow(listItem, r.getId(), currencyMap);
r.setSsShow(s2);
//核销比例
r.setHxBiLi(getHxBili(ReceiptAccountList,
listItem, r.getId()));
//一定要判空,不然会报错
if(CollectionUtil.isNotEmpty(idList)) {
//根据List获取本页中所有的明细信息
LambdaQueryWrapper<ReceiptItemDO> lambdaQueryWrapper =
new LambdaQueryWrapper<>();
lambdaQueryWrapper.in(ReceiptItemDO::getReceiptId, idList);
//所有收款单的明细
List<ReceiptItemDO> listItem =
receiptItemMapper.selectList(lambdaQueryWrapper);
LambdaQueryWrapper<ReceiptAccountDO> lambdaQueryWrapper2 =
new LambdaQueryWrapper<>();
lambdaQueryWrapper2.in(ReceiptAccountDO::getReceiptId, idList);
List<ReceiptAccountDO> ReceiptAccountList =
receiptAccountMapper.selectList(lambdaQueryWrapper2);
Map<Integer, CurrencyRespDTO> currencyMap = currencyApi.getAllCurrency();
for (ReceiptBackVO r : mpPage.getRecords()
) {
String sR = getReceiptMxStatus(listItem, r.getId());
r.setMxStatus(sR);
//应收
String s1 = getYSShow(ReceiptAccountList, r.getId(), currencyMap);
r.setYsShow(s1);
//实收
String s2 = getSSShow(listItem, r.getId(), currencyMap);
r.setSsShow(s2);
//核销比例
r.setHxBiLi(getHxBili(ReceiptAccountList,
listItem, r.getId()));
}
}
return PageResult.of(mpPage);
}
......
......@@ -54,11 +54,19 @@ public class ReceiptItemBackVO {
@ApiModelProperty(value = "货币id")
private Long currencyId;
@ExcelProperty("创建时间")
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
@ApiModelProperty(value = "创建时间")
private Date createTime;
/*
创建人
*/
private String creator;
@ExcelProperty("收款汇率")
@ApiModelProperty(value = "收款汇率")
private String rate;
......@@ -99,4 +107,28 @@ public class ReceiptItemBackVO {
private String syValue;
/*
提交审批时间 lanbm 2024-06-07
*/
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
private Date createTimeBpm;
/*
提交审批人
*/
private String createBpm;
/*
审批通过时间 lanbm 2024-06-07
*/
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
private Date updateTimeBpm;
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
private Date updateTime;
private String updater;
}
package cn.iocoder.yudao.module.wealth.vo.receiptItem;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
/*
lanbm 2024-05-18 add
*/
......@@ -59,4 +64,16 @@ public class ReceiptItemReq extends PageParam {
*/
private String creator;
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
private Date createTime;
private String updater;
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
private Date updateTime;
/*
收款账户
*/
private String accountNo;
}
......@@ -129,6 +129,11 @@ public class ReceiptItemResp {
@ApiModelProperty(value = "创建时间")
private Date createTime;
/*
提交审批人
*/
private String createBpm;
/*
提交审批时间 lanbm 2024-06-07
*/
......@@ -142,5 +147,4 @@ public class ReceiptItemResp {
private Date updateTimeBpm;
}
......@@ -7,10 +7,14 @@ import cn.iocoder.yudao.framework.common.util.io.FileModel;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.module.ecw.api.currency.CurrencyApi;
import cn.iocoder.yudao.module.ecw.api.currency.dto.CurrencyRespDTO;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import cn.iocoder.yudao.module.wealth.convert.receiptItem.ReceiptItemConvert;
import cn.iocoder.yudao.module.wealth.dal.dataobject.receiptAccount.ReceiptAccountDO;
import cn.iocoder.yudao.module.wealth.dal.dataobject.receiptApproval.ReceiptApprovalDO;
import cn.iocoder.yudao.module.wealth.dal.dataobject.receiptItem.ReceiptItemDO;
import cn.iocoder.yudao.module.wealth.dal.mysql.receiptAccount.ReceiptAccountMapper;
import cn.iocoder.yudao.module.wealth.dal.mysql.receiptApproval.ReceiptApprovalMapper;
import cn.iocoder.yudao.module.wealth.dal.mysql.receiptItem.ReceiptItemMapper;
import cn.iocoder.yudao.module.wealth.service.receiptItem.ReceiptItemService;
import cn.iocoder.yudao.module.wealth.vo.receipt.FinanceReceiptItemCancelVo;
......@@ -22,6 +26,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -47,17 +52,25 @@ public class ReceiptItemController {
@Resource
private ReceiptAccountMapper receiptAccountMapper;
@Resource
private ReceiptItemMapper receiptItemMapper;
/*
币种 lanbm 2024-06-10 add
*/
@Resource
CurrencyApi currencyApi;
/*
lanbm 2024-05-17 add
*/
@Autowired
private AdminUserService adminUserService;
//审批信息
@Resource
private ReceiptApprovalMapper receiptApprovalMapper;
@PostMapping("/create")
@ApiOperation("创建收款明细")
//@PreAuthorize("@ss.hasPermission('ecw:receipt-item:create')")
......@@ -92,9 +105,57 @@ public class ReceiptItemController {
//BigDecimal p = receiptItemService.getWriteOffAmountByReceiptId(id);
//BigDecimal t = receiptAccountMapper.getWriteOffAmountByReceiptId(id);
getSY(v, v.getReceiptId());
SetData(v);
return success(v);
}
private void SetData(ReceiptItemBackVO v) {
List<AdminUserDO> ListUser = adminUserService.getUsersList();
Map<Long, String> userMap =
ListUser.stream().collect(
Collectors.toMap((AdminUserDO::getId),
AdminUserDO::getNickname));
String sT = "";
if (v.getCreator() != null) {
sT = userMap.get(Long.parseLong(v.getCreator()));
v.setCreator(sT);
}
if (v.getUpdater() != null && v.getUpdater().length() > 0) {
sT = userMap.get(Long.parseLong(v.getUpdater()));
v.setUpdater(sT);
}
if (v.getBmpId() == null||v.getBmpId().length()==0) {
v.setCreateBpm("");
v.setCreateTimeBpm(null);
v.setUpdateTimeBpm(null);
return;
}
LambdaQueryWrapper<ReceiptApprovalDO> lambdaQueryWrapper =
new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ReceiptApprovalDO::getBmpId, v.getBmpId());
List<ReceiptApprovalDO> list =
receiptApprovalMapper.selectList(lambdaQueryWrapper);
if (list==null||list.size() == 0) return;
//审批创建人
if (list.get(0).getCreator() != null
&& list.get(0).getCreator().length() > 0) {
sT = userMap.get(Long.parseLong(list.get(0).getCreator()));
v.setCreateBpm(sT);
//审批创建日期
if (list.get(0).getCreateTime() != null)
v.setCreateTimeBpm(list.get(0).getCreateTime());
//审批通过日期
if (list.get(0).getUpdateTime() != null)
v.setUpdateTimeBpm(list.get(0).getUpdateTime());
}
}
/*
获取剩余金额 lanbm 2024-06-10 add
*/
......@@ -138,7 +199,7 @@ public class ReceiptItemController {
bResult = t.subtract(p);
String bzName = "";
if (currencyId != null) {
int iId=Integer.parseInt(currencyId.toString());
int iId = Integer.parseInt(currencyId.toString());
bzName = currencyMap.get(iId).getTitleZh();
}
v.setSyValue(bResult.toString() + bzName);
......@@ -192,7 +253,8 @@ public class ReceiptItemController {
@PostMapping("/cancelFinanceReceiptItemWriteOff")
@ApiOperation("取消收款明细核销")
@Idempotent(timeout = 5)
public CommonResult<Boolean> cancelFinanceReceiptItemWriteOff(@RequestBody FinanceReceiptItemCancelVo financeReceiptVo) {
public CommonResult<Boolean> cancelFinanceReceiptItemWriteOff(@RequestBody FinanceReceiptItemCancelVo
financeReceiptVo) {
receiptItemService.cancelFinanceReceiptItemWriteOff(financeReceiptVo);
return success(true);
}
......@@ -213,7 +275,8 @@ public class ReceiptItemController {
@PostMapping("/cancelFinanceReceiptItemWriteOffNo")
@ApiOperation("取消收款明细反核销")
@Idempotent(timeout = 5)
public CommonResult<Boolean> cancelFinanceReceiptItemWriteOffNo(@RequestBody FinanceReceiptItemCancelVo financeReceiptVo) {
public CommonResult<Boolean> cancelFinanceReceiptItemWriteOffNo(@RequestBody FinanceReceiptItemCancelVo
financeReceiptVo) {
receiptItemService.cancelFinanceReceiptItemWriteOffNo(financeReceiptVo);
return success(true);
}
......
......@@ -6,17 +6,20 @@
resultType="cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemResp">
SELECT p.*,m.receipt_no,m.order_id,
r.order_no,r.tidan_no,a.create_time as create_time_bpm,
a.update_time as update_time_bpm
a.update_time as update_time_bpm,a.creator as createBpm
from ecw_receipt_item p
left join ecw_receipt m on p.receipt_id=m.id and m.deleted=0
left join ecw_order r on r.order_id=m.order_id and r.deleted=0
left join ecw_receipt_approval a on a.bmp_id=m.bmp_id and a.deleted=0
left join ecw_receipt_approval a on a.bmp_id=p.bmp_id and a.deleted=0
<include refid="WherePage"/>
ORDER BY m.receipt_no desc,p.create_time asc limit #{start}, #{pageSize}
</select>
<sql id="WherePage">
<where>
p.deleted=0
<if test="accountNo != null and accountNo != ''">
AND p.account_no=#{accountNo}
</if>
<if test="receiptNo != null and receiptNo != ''">
AND m.receipt_no like concat('%',#{receiptNo},'%')
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment