Browse Source

1.OW箱费用申请审批bug修改
2.新加对账获取数据接口
3.海运出口保存赋值配箱分单号
4.进场,出场记录excel导入接口bug修改
5.pod返场接口可以查询直单信息
6.OW拿箱费用相关接口bug修改

纪新园 6 months ago
parent
commit
03dde31e7e
22 changed files with 429 additions and 31 deletions
  1. 10 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/entity/TradingBox.java
  2. 5 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/fee/entity/FeeCenterItems.java
  3. 3 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/fee/vo/FinAccBillsVO.java
  4. 1 1
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/invoices/entity/FinInvoices.java
  5. 13 2
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/stl/entity/FinStlBills.java
  6. 7 3
      blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsBoxServiceImpl.java
  7. 4 1
      blade-service/blade-los/src/main/java/org/springblade/los/box/controller/TradingBoxController.java
  8. 3 3
      blade-service/blade-los/src/main/java/org/springblade/los/box/dynamics/service/impl/BoxDynamicsRecordServiceImpl.java
  9. 9 5
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/TradingBoxServiceImpl.java
  10. 2 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/mapper/BillsMapper.java
  11. 206 2
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/mapper/BillsMapper.xml
  12. 2 2
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/mapper/ContainersMapper.xml
  13. 5 2
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java
  14. 3 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/ContainersServiceImpl.java
  15. 21 6
      blade-service/blade-los/src/main/java/org/springblade/los/check/service/impl/AuditProecessServiceImpl.java
  16. 99 0
      blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/controller/FinAccBillsController.java
  17. 2 0
      blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/IFinAccBillsService.java
  18. 17 0
      blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FinAccBillsServiceImpl.java
  19. 5 2
      blade-service/blade-los/src/main/java/org/springblade/los/finance/invoices/controller/FinInvoicesController.java
  20. 2 2
      blade-service/blade-los/src/main/java/org/springblade/los/finance/invoices/service/impl/FinInvoicesServiceImpl.java
  21. 5 0
      blade-service/blade-los/src/main/java/org/springblade/los/finance/stl/controller/FinStlBillsController.java
  22. 5 0
      blade-service/blade-los/src/main/java/org/springblade/los/finance/stl/service/impl/FinStlBillsServiceImpl.java

+ 10 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/entity/TradingBox.java

@@ -85,6 +85,16 @@ public class TradingBox implements Serializable {
 	@ApiModelProperty(value = "买入公司名称")
 	private String purchaseCompanyName;
 	/**
+	 * ownerId
+	 */
+	@ApiModelProperty(value = "owner")
+	private Long ownerId;
+	/**
+	 * owner名称
+	 */
+	@ApiModelProperty(value = "owner名称")
+	private String ownerName;
+	/**
 	 * 买入时间
 	 */
 	@ApiModelProperty(value = "买入时间")

+ 5 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/fee/entity/FeeCenterItems.java

@@ -327,6 +327,11 @@ public class FeeCenterItems implements Serializable {
 	 */
 	@ApiModelProperty(value = "是否生成费用明细")
 	private String whetherGenerateCost;
+	/**
+	 * 免箱使天数
+	 */
+	@ApiModelProperty(value = "免箱使天数")
+	private Integer freeDay;
 
 	/**
 	 * 财务日期

+ 3 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/fee/vo/FinAccBillsVO.java

@@ -27,6 +27,7 @@ import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 业务-财务账单视图实体类
@@ -293,4 +294,6 @@ public class FinAccBillsVO extends FinAccBills {
 	 */
 	private BigDecimal appliedInvoiceCurrentAmount;
 
+	private List<FinAccBillsVO> finAccBillsVOList;
+
 }

+ 1 - 1
blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/invoices/entity/FinInvoices.java

@@ -279,7 +279,7 @@ public class FinInvoices implements Serializable {
 	 * 是否转换为人民币(0 否 1是)
 	 */
 	@ApiModelProperty(value = "是否转换为人民币(0 否 1是)")
-	private Integer isExchangeToCny;
+	private String isExchangeToCny;
 	/**
 	 * 业务类型,用于检索费用
 	 */

+ 13 - 2
blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/stl/entity/FinStlBills.java

@@ -75,6 +75,11 @@ public class FinStlBills implements Serializable {
 	@ApiModelProperty(value = "创建人")
 	private String createUserName;
 	/**
+	 * 核销人
+	 */
+	@TableField(exist = false)
+	private String createUserNames;
+	/**
 	 * 创建部门 Id
 	 */
 	@ApiModelProperty(value = "创建部门 Id")
@@ -553,12 +558,18 @@ public class FinStlBills implements Serializable {
 	@ApiModelProperty(value = "订舱代理英文名称")
 	private String bookingAgentEnName;
 	/**
-	 * 原汇率,外币转为本币的汇率
+	 * 汇率
 	 */
-	@ApiModelProperty(value = "原汇率,外币转为本币的汇率")
+	@ApiModelProperty(value = "汇率")
 	private BigDecimal exrate;
 
 	/**
+	 * 是否转换为人民币(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否转换为人民币(0 否 1是)")
+	private String isExchangeToCny;
+
+	/**
 	 * 预收时间
 	 */
 	@TableField(exist = false)

+ 7 - 3
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsBoxServiceImpl.java

@@ -156,8 +156,8 @@ public class ReportsBoxServiceImpl implements IReportsBoxService {
 				lambdaQueryWrapper.eq(FeeCenterItems::getTenantId, AuthUtil.getTenantId())
 					.eq(FeeCenterItems::getIsDeleted, 0)
 					.eq(FeeCenterItems::getPid, tradingBox.getId())
-					.eq(FeeCenterItems::getAccountDate, accDate);
-				if (MagicValues.PER_DIEM.equals(type)) {
+					.eq(ObjectUtils.isNotNull(accDate),FeeCenterItems::getAccountDate, accDate);
+				if (MagicValues.PER_DIEM.equals(groupCode)) {
 					lambdaQueryWrapper.eq(FeeCenterItems::getFeeType, "2");
 				} else {
 					lambdaQueryWrapper.eq(FeeCenterItems::getFeeType, "1");
@@ -203,7 +203,11 @@ public class ReportsBoxServiceImpl implements IReportsBoxService {
 						ExpenseApplicationFeeReports reports = new ExpenseApplicationFeeReports();
 						reports.setPid(item.getPid());
 						reports.setStlPid(item.getStlPid());
-						reports.setCorpCnName(item.getShortName());
+						if (ObjectUtils.isNotNull(item.getShortName())){
+							reports.setCorpCnName(item.getShortName());
+						}else{
+							reports.setCorpCnName(item.getCorpCnName());
+						}
 						reports.setFeeCnName(item.getFeeCnName());
 						reports.setDc(item.getDc());
 						reports.setRemarks(item.getRemarks());

+ 4 - 1
blade-service/blade-los/src/main/java/org/springblade/los/box/controller/TradingBoxController.java

@@ -90,6 +90,8 @@ public class TradingBoxController extends BladeController {
 			.like(ObjectUtils.isNotNull(tradingBox.getContractNo()), TradingBox::getContractNo, tradingBox.getContractNo())
 			.eq(ObjectUtils.isNotNull(tradingBox.getPurchaseCompanyId()), TradingBox::getPurchaseCompanyId, tradingBox.getPurchaseCompanyId())
 			.like(ObjectUtils.isNotNull(tradingBox.getPurchaseCompanyName()), TradingBox::getPurchaseCompanyName, tradingBox.getPurchaseCompanyName())
+			.eq(ObjectUtils.isNotNull(tradingBox.getOwnerId()), TradingBox::getOwnerId, tradingBox.getOwnerId())
+			.like(ObjectUtils.isNotNull(tradingBox.getOwnerName()), TradingBox::getOwnerName, tradingBox.getOwnerName())
 			.eq(ObjectUtils.isNotNull(tradingBox.getStatus()), TradingBox::getStatus, tradingBox.getStatus())
 			.like(ObjectUtils.isNotNull(tradingBox.getCode()), TradingBox::getCode, tradingBox.getCode())
 			.like(ObjectUtils.isNotNull(tradingBox.getContainerNumber()), TradingBox::getContainerNumber, tradingBox.getContainerNumber())
@@ -166,12 +168,13 @@ public class TradingBoxController extends BladeController {
 	@ApiOperation(value = "分页", notes = "传入tradingBox")
 	public void exportTradingBoxOut(TradingBox tradingBox, HttpServletResponse response) {
 		LambdaQueryWrapper<TradingBox> lambdaQueryWrapper = new LambdaQueryWrapper<>();
-
 		lambdaQueryWrapper.eq(TradingBox::getTenantId, AuthUtil.getTenantId())
 			.eq(TradingBox::getIsDeleted, 0)
 			.like(ObjectUtils.isNotNull(tradingBox.getSysNo()), TradingBox::getSysNo, tradingBox.getSysNo())//业务编号
 			.like(ObjectUtils.isNotNull(tradingBox.getContractNo()), TradingBox::getContractNo, tradingBox.getContractNo())//合同号
 			.like(ObjectUtils.isNotNull(tradingBox.getPurchaseCompanyId()), TradingBox::getPurchaseCompanyId, tradingBox.getPurchaseCompanyId())//买入公司id
+			.eq(ObjectUtils.isNotNull(tradingBox.getOwnerId()), TradingBox::getOwnerId, tradingBox.getOwnerId())
+			.like(ObjectUtils.isNotNull(tradingBox.getOwnerName()), TradingBox::getOwnerName, tradingBox.getOwnerName())
 			.eq(ObjectUtils.isNotNull(tradingBox.getStatus()), TradingBox::getStatus, tradingBox.getStatus())//状态
 			.eq(ObjectUtils.isNotNull(tradingBox.getCreateUser()), TradingBox::getCreateUser, tradingBox.getCreateUser())//制单人
 			.eq(ObjectUtils.isNotNull(tradingBox.getUpdateUser()), TradingBox::getUpdateUser, tradingBox.getUpdateUser())//修改人

+ 3 - 3
blade-service/blade-los/src/main/java/org/springblade/los/box/dynamics/service/impl/BoxDynamicsRecordServiceImpl.java

@@ -174,7 +174,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
 			boxTypeList = cntrTypesService.list(new LambdaQueryWrapper<BCntrTypes>()
 				.eq(BCntrTypes::getTenantId, AuthUtil.getTenantId())
 				.eq(BCntrTypes::getIsDeleted, 0)
-				.in(BCntrTypes::getCode95, boxType));
+				.in(BCntrTypes::getCode, boxType));
 		}
 		String blacklist = sysClient.getParamService("box.blacklist");
 		if (ObjectUtils.isNotNull(blacklist)) {
@@ -222,7 +222,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
 			recordItems.setContainerNumber(item.getContainerNumber());
 			recordItems.setBoxCode(item.getBoxCode());
 			recordItems.setObjective(item.getObjective());
-			BCntrTypes cntrTypes = boxTypeList.stream().filter(e -> e.getCode95().equals(item.getBoxType())).findFirst().orElse(null);
+			BCntrTypes cntrTypes = boxTypeList.stream().filter(e -> e.getCode().equals(item.getBoxType())).findFirst().orElse(null);
 			if (cntrTypes == null) {
 				throw new RuntimeException("请先维护箱型:" + item.getBoxType() + "基础资料");
 			} else {
@@ -1455,7 +1455,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
 							&& item.getBoxCode().equals(e.getCntrNo())).collect(Collectors.toList());
 						if (!containerItemList.isEmpty()) {
 							List<Long> billsIds = containerItemList.stream().map(Containers::getPid).distinct().collect(Collectors.toList());
-							bills = billsList.stream().filter(e -> "MH".equals(e.getBillType()) && billsIds.contains(e.getId())).findFirst().orElse(null);
+							bills = billsList.stream().filter(e -> "MH,DD".contains(e.getBillType()) && billsIds.contains(e.getId())).findFirst().orElse(null);
 						}
 					}
 					if (bills == null) {

+ 9 - 5
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/TradingBoxServiceImpl.java

@@ -2766,6 +2766,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
 			feeCenterItems.setPodCode(tradingBox.getPodCode());
 			feeCenterItems.setPodCnName(tradingBox.getPodCname());
 			feeCenterItems.setPodEnName(tradingBox.getPodEname());
+			feeCenterItems.setFreeDay(tradingBox.getFreeDay());
 			feeCenterItems.setMblno(item.getMblno());
 			feeCenterItems.setHblno(item.getHblno());
 			feeCenterItems.setEtd(item.getEtd());
@@ -2849,13 +2850,12 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
 			feeCenterItems.setPrice(amount);
 			feeCenterItems.setRemarks(text);
 			feeCenterItems.setOutboundDate(tradingBox.getRentDate());
-			if (new BigDecimal("0.00").compareTo(feeCenterItems.getAmount()) != 0) {
-				feeCenterItemsList.add(feeCenterItems);
-			}
+			feeCenterItemsList.add(feeCenterItems);
 			item.setUpdateTime(new Date());
 			item.setUpdateUserName(AuthUtil.getUserName());
 			item.setUpdateUser(AuthUtil.getUserId());
 			item.setRentEndDate(tradingBox.getRentDate());
+			item.setCount(item.getCount() + 1);
 		}
 		tradingBoxItemService.updateBatchById(putBoxItemsList);
 		if (!feeCenterItemsList.isEmpty()) {
@@ -2907,6 +2907,9 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
 				calendar.setTime(item.getRentStartDate());
 				calendar.add(Calendar.DAY_OF_MONTH, -1);
 				item.setRentEndDate(calendar.getTime());
+				if (item.getRentEndDate().compareTo(item.getPolPickUpDate()) < 0) {
+					item.setRentEndDate(item.getPolPickUpDate());
+				}
 				itemList.add(item);
 			}
 		}
@@ -2953,7 +2956,8 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
 			feeCenter.setFeeCnName(centerItems.getFeeCnName());
 			feeCenter.setFeeEnName(centerItems.getFeeEnName());
 			feeCenter.setCurCode(centerItems.getCurCode());
-			feeCenter.setCntrNo(centerItems.getCntrNo());
+			feeCenter.setCntrNo(tradingBox.getFeeCenterItemsList().stream().filter(e -> e.getUnitNo().equals(item))
+				.map(FeeCenterItems::getCntrNo).collect(Collectors.joining(",")));
 			feeCenter.setUnitNo(centerItems.getUnitNo());
 			feeCenter.setStorageDate(centerItems.getStorageDate());
 			feeCenter.setDays(centerItems.getDays());
@@ -3032,7 +3036,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
 		List<FeeCenterItems> feeCenterItemsList = new ArrayList<>();
 		for (FeeCenter item : feeCenterList) {
 			List<FeeCenterItems> feeCenterItems = tradingBox.getFeeCenterItemsList().stream()
-				.filter(e -> e.getCntrNo().equals(item.getCntrNo())).collect(Collectors.toList());
+				.filter(e -> e.getUnitNo().equals(item.getUnitNo())).collect(Collectors.toList());
 			for (FeeCenterItems centerItems : feeCenterItems) {
 				centerItems.setUpdateTime(new Date());
 				centerItems.setUpdateUserName(AuthUtil.getUserName());

+ 2 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/mapper/BillsMapper.java

@@ -62,4 +62,6 @@ public interface BillsMapper extends BaseMapper<Bills> {
 									@Param("date") String date,@Param("type") String type,@Param("userId") Long userId);
 
     List<String> cntrTypeList(@Param("billId")String billId);
+
+	List<FinAccBillsVO> listAccBillV2(@Param("acc")ListAccBillVO finAccBills);
 }

+ 206 - 2
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/mapper/BillsMapper.xml

@@ -398,7 +398,7 @@
         </if>
         <if test="acc.mblno != null and acc.mblno != ''">
             <if test="acc.vagueM == null or acc.vagueM == ''">
-                AND fee.mblno like CONCAT(CONCAT('%', #{acc.mblno}), '%')
+                AND find_in_set(fee.mblno,#{acc.mblno})
             </if>
             <if test="acc.vagueM != null and acc.vagueM != ''">
                 and find_in_set(fee.mblno,#{acc.mblno})
@@ -406,7 +406,7 @@
         </if>
         <if test="acc.hblno != null and acc.hblno != ''">
             <if test="acc.vagueH == null or acc.vagueH == ''">
-                AND fee.hblno like CONCAT(CONCAT('%', #{acc.hblno}), '%')
+                and find_in_set(fee.hblno,#{acc.hblno})
             </if>
             <if test="acc.vagueH != null and acc.vagueH != ''">
                 and find_in_set(fee.hblno,#{acc.hblno})
@@ -899,5 +899,209 @@
         where is_deleted = '0'
           and pid = #{billId}
     </select>
+    <select id="listAccBillV2" resultType="org.springblade.los.finance.fee.vo.FinAccBillsVO">
+        SELECT
+        acc.*,
+        fee.business_type as businessType,
+        fee.bill_type as billType,
+        fee.id as sourceId,
+        fee.cur_code as curCode,
+        fee.account_year as accountYear,
+        fee.account_month as accountMonth,
+        fee.account_day as accountDay,
+        fee.src_type as srcType,
+        fee.src_id as srcId,
+        fee.src_cn_name as srcCnName,
+        fee.src_en_name as srcEnName,
+        fee.line_id as lineId,
+        fee.line_cn_name as lineCnName,
+        fee.line_en_name as lineEnName,
+        fee.cntr_no as cntrNo,
+        SUM(fee.quantity) as quantity,
+        fee.unit_no as unitNo,
+        SUM(fee.price) as price,
+        fee.fee_id as feeId,
+        fee.fee_code as feeCode,
+        fee.fee_cn_name as feeCnName,
+        fee.fee_en_name as feeEnName,
+        fee.exrate as exrate,
+        fee.is_tax as isTax,
+        fee.tax_type as taxType,
+        fee.tax_rate as taxRate,
+        fee.surcharge_rate as surchargeRate,
+        SUM(fee.amount_discount) as amountDiscount,
+        SUM(fee.amount_net) as amountNet,
+        SUM(fee.amount_tax) as amountTax,
+        SUM(fee.amount) as amount,
+        SUM(fee.amount_tax_loc) as amountTaxLoc,
+        SUM(fee.amount_net_loc) as amountNetLoc,
+        SUM(fee.amount_discount_loc) as amountDiscountLoc,
+        SUM(fee.amount_loc) as amountLoc,
+        SUM(fee.stl_ttl_amount) as stlTtlAmount,
+        SUM(fee.invoice_amount_loc) as invoiceAmountLoc,
+        IF
+        ( sum( fee.uninvoiced_amount ), sum( fee.uninvoiced_amount ), 0.00 ) AS uninvoicedAmount,
+        IF
+        ( sum( fee.unsettled_amount ), sum( fee.unsettled_amount ), 0.00 ) AS unsettledAmount,
+        IF
+        ( sum( fee.applied_amount ), sum( fee.applied_amount ), 0.00 ) AS appliedAmount,
+        IF
+        ( sum( fee.applied_amount_stl ), sum( fee.applied_amount_stl ), 0.00 ) AS appliedAmountStl,
+        IF
+        ( sum( fee.reconciliation_amount ), sum( fee.reconciliation_amount ), 0.00 ) AS reconciliationAmount,
+        IF
+        ( sum( fee.applied_invoice_amount ), sum( fee.applied_invoice_amount ), 0.00 ) AS appliedInvoiceAmount,
+        IF
+        ( sum( fee.applied_invoice_amount_stl ), sum( fee.applied_invoice_amount_stl ), 0.00 ) AS
+        appliedInvoiceAmountStl,
+        fee.is_signfor as isSignfor,
+        fee.signfor_id as signforId,
+        fee.signfor_name as signforName,
+        fee.signfor_date as signforDate,
+        acc.quantity_cntr_descr as quantityCntrDescr,
+        corp.account_period_type as accountPeriodType
+        FROM
+        los_fee_center fee
+        LEFT JOIN los_b_corps corp ON corp.id = fee.corp_id
+        LEFT JOIN los_fin_acc_bills acc ON acc.id = fee.acc_bill_id
+        WHERE
+        acc.is_deleted = '0'
+        AND fee.is_deleted = '0'
+        <if test='acc.branchId != null and acc.branchId != ""'>
+            and acc.branch_id = #{acc.branchId}
+        </if>
+        <if test='acc.type != null and acc.type != "" and acc.type == "1"'>
+            <if test='acc.isChecked != null and acc.isChecked == "0"'>
+                and acc.is_checked in (0,1,2)
+            </if>
+            <if test='acc.isChecked != null and acc.isChecked == "1"'>
+                and acc.is_checked in (0,1)
+            </if>
+            <if test='acc.isChecked != null and acc.isChecked == "2"'>
+                and acc.is_checked = 0
+            </if>
+            <if test='acc.isChecked != null and acc.isChecked == "3"'>
+                and acc.is_checked = 1
+            </if>
+            <if test='acc.isChecked != null and acc.isChecked == "4"'>
+                and acc.is_checked = 2
+            </if>
+        </if>
+        <if test='acc.type != null and acc.type != "" and acc.type == "4"'>
+            and acc.invoice_status != 3
+        </if>
+        <if test='acc.type != null and acc.type != "" and acc.type == "5"'>
+            and fee.voucher_status = '0'
+        </if>
+        <if test="acc.dc != null and acc.dc != ''">
+            and fee.dc = #{acc.dc}
+        </if>
+        <if test="acc.auditStatus != null and acc.auditStatus !=''">
+            and fee.audit_status = #{acc.auditStatus}
+        </if>
+        <if test="acc.corpCnName != null and acc.corpCnName != ''">
+            and fee.corp_id = #{acc.corpCnName}
+        </if>
+        <if test="acc.isSignfor != null">
+            and fee.is_signfor = #{acc.isSignfor}
+        </if>
+        <if test="acc.curCode != null and acc.curCode != ''">
+            and fee.cur_code = #{acc.curCode}
+        </if>
+        <if test="acc.srcType != null and acc.srcType != ''">
+            and fee.src_type = #{acc.srcType}
+        </if>
+        <if test="acc.srcCnName != null and acc.srcCnName != ''">
+            and fee.src_id = #{acc.srcCnName}
+        </if>
+        <if test="acc.isCleared != null">
+            and acc.is_cleared = #{acc.isCleared}
+        </if>
+        <if test="acc.feeCnName != null and acc.feeCnName != ''">
+            and find_in_set (fee.fee_cn_name,#{acc.feeCnName})
+        </if>
+        <if test="acc.billNo != null and acc.billNo != ''">
+            and find_in_set(fee.bill_no,#{acc.billNo})
+        </if>
+        <if test="acc.accBillNo != null and acc.accBillNo != ''">
+            and find_in_set(fee.acc_bill_no,#{acc.accBillNo})
+        </if>
+        <if test="acc.mblno != null and acc.mblno != ''">
+            <if test="acc.vagueM == null or acc.vagueM == ''">
+                AND find_in_set(fee.mblno,#{acc.mblno})
+            </if>
+            <if test="acc.vagueM != null and acc.vagueM != ''">
+                and find_in_set(fee.mblno,#{acc.mblno})
+            </if>
+        </if>
+        <if test="acc.hblno != null and acc.hblno != ''">
+            <if test="acc.vagueH == null or acc.vagueH == ''">
+                and find_in_set(fee.hblno,#{acc.hblno})
+            </if>
+            <if test="acc.vagueH != null and acc.vagueH != ''">
+                and find_in_set(fee.hblno,#{acc.hblno})
+            </if>
+        </if>
+        <if test="acc.billDateStart != null and acc.billDateStart != ''">
+            and DATE_FORMAT(acc.bill_date,'%Y-%m-%d') &gt;= DATE_FORMAT(#{acc.billDateStart},'%Y-%m-%d')
+        </if>
+        <if test="acc.billDateEnd != null and acc.billDateEnd != ''">
+            and DATE_FORMAT(acc.bill_date,'%Y-%m-%d') &lt;= DATE_FORMAT(#{acc.billDateEnd},'%Y-%m-%d')
+        </if>
+        <if test="acc.businessDateStart != null and acc.businessDateStart != ''">
+            and DATE_FORMAT(acc.business_date,'%Y-%m-%d') &gt;= DATE_FORMAT(#{acc.businessDateStart},'%Y-%m-%d')
+        </if>
+        <if test="acc.businessDateEnd != null and acc.businessDateEnd != ''">
+            and DATE_FORMAT(acc.business_date,'%Y-%m-%d') &lt;= DATE_FORMAT(#{acc.businessDateEnd},'%Y-%m-%d')
+        </if>
+        <if test="acc.approveTimeStart != null and acc.approveTimeStart != ''">
+            and fee.approve_time &gt;= #{acc.approveTimeStart}
+        </if>
+        <if test="acc.approveTimeEnd != null and acc.approveTimeEnd != ''">
+            and fee.approve_time &lt;= #{acc.approveTimeEnd}
+        </if>
+        <if test="acc.signforDateStart != null and acc.signforDateStart != '' ">
+            and fee.signfor_date &gt;= #{acc.signforDateStart}
+        </if>
+        <if test="acc.signforDateEnd != null and acc.signforDateEnd != '' ">
+            and fee.signfor_date &lt;= #{acc.signforDateEnd}
+        </if>
+        <if test="acc.queryAmount != null and acc.queryAmount != ''">
+            and (acc.amount_dr_loc = #{acc.queryAmount} or acc.amount_cr_loc = #{acc.queryAmount})
+        </if>
+        <if test="acc.businessType != null and acc.businessType != ''">
+            and find_in_set(fee.business_type,#{acc.businessType})
+        </if>
+        <if test="acc.invoiceStatus != null">
+            and fee.invoice_status = #{acc.invoiceStatus}
+        </if>
+        <if test="acc.vesselCnName != null and acc.vesselCnName != ''">
+            and ( acc.vessel_cn_name like concat('%', #{acc.vesselCnName}, '%') or acc.vessel_en_name like concat('%',
+            #{acc.vesselCnName}, '%') )
+        </if>
+        <if test="acc.voyageNo != null and acc.voyageNo != ''">
+            and acc.voyage_no like concat('%', #{acc.voyageNo}, '%')
+        </if>
+        <if test="acc.checkBillNo != null and acc.checkBillNo != ''">
+            and fee.check_bill_no like concat('%', #{acc.checkBillNo}, '%')
+        </if>
+        <if test="acc.threeInspectionsNo != null and acc.threeInspectionsNo != ''">
+            and acc.three_inspections_no like concat('%', #{acc.threeInspectionsNo}, '%')
+        </if>
+        <if test="acc.receivableAdvance != null">
+            and (acc.amount_dr_loc = #{acc.receivableAdvance} or acc.amount_cr_loc = #{acc.receivableAdvance})
+        </if>
+        <if test="acc.invoiceNo != null and acc.invoiceNo != ''">
+            and fee.invoice_no like concat('%', #{acc.invoiceNo}, '%')
+        </if>
+        <if test="acc.createUserName != null and acc.createUserName != ''">
+            and acc.create_user = #{acc.createUserName}
+        </if>
+        <if test="acc.bookingNo != null and acc.bookingNo != ''">
+            and acc.booking_no like concat('%', #{acc.bookingNo}, '%')
+        </if>
+        GROUP BY acc.branch_id, acc.corp_id,acc.business_bill_id,acc.amount_dr,fee.cur_code,acc.mblno,acc.hblno
+        ORDER BY acc.create_time
+    </select>
 
 </mapper>

+ 2 - 2
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/mapper/ContainersMapper.xml

@@ -108,7 +108,7 @@
         AND se.tenant_id = #{data.tenantId}
         AND sc.is_deleted = '0'
         AND se.is_deleted = '0'
-        and se.bill_type = 'MH'
+          and find_in_set(se.bill_type,'MH,DD')
         <if test="data.businessType != null and data.businessType != ''">
             and se.business_type = #{data.businessType}
         </if>
@@ -209,7 +209,7 @@
         AND se.tenant_id = #{data.tenantId}
         AND sc.is_deleted = '0'
         AND se.is_deleted = '0'
-        and se.bill_type = 'MH'
+        and find_in_set(se.bill_type,'MH,DD')
         <if test="data.businessType != null and data.businessType != ''">
             and se.business_type = #{data.businessType}
         </if>

+ 5 - 2
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java

@@ -606,6 +606,9 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				if (ObjectUtils.isNotNull(item.getMeasurement())) {
 					measurement = measurement.add(item.getMeasurement());
 				}
+				if (ObjectUtils.isNull(item.getHblno())) {
+					item.setHblno(bills.getHblno());
+				}
 				item.setPid(bills.getId());
 				if ("MH".equals(bills.getBillType())) {
 					item.setHblno(bills.getHblno());
@@ -1827,7 +1830,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			if (item.getBillStatus() == 3) {
 				throw new RuntimeException("单据已完成,退舱失败");
 			}
-			if ("MH".equals(item.getBillType())) {
+			/*if ("MH".equals(item.getBillType())) {
 				List<PreContainers> preContainers = new ArrayList<>();
 				if (!preContainersList.isEmpty()) {
 					preContainers = preContainersList.stream().filter(e -> e.getPid().equals(item.getId()))
@@ -1836,7 +1839,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				if (!preContainers.isEmpty()) {
 					this.revokeSelectedContainerNumber(item, preContainers);
 				}
-			}
+			}*/
 			item.setBillStatus(1);
 			item.setBookingWithdrawTime(new Date());
 		}

+ 3 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/ContainersServiceImpl.java

@@ -535,6 +535,9 @@ public class ContainersServiceImpl extends ServiceImpl<ContainersMapper, Contain
 				.eq(Containers::getIsDeleted, 0)
 				.eq(Containers::getPid, containers.getPid())
 				.eq(Containers::getCntrNo, containers.getCntrNo()));
+			if (ObjectUtils.isNull(containers.getHblno())) {
+				containers.setHblno(bills.getHblno());
+			}
 			if (containers.getId() == null) {
 				if (ObjectUtils.isNotNull(containers.getCntrNo()) && !cntrNoCount.isEmpty()) {
 					throw new RuntimeException("箱号不允许重复");

+ 21 - 6
blade-service/blade-los/src/main/java/org/springblade/los/check/service/impl/AuditProecessServiceImpl.java

@@ -63,6 +63,7 @@ import org.springblade.los.finance.invoices.entity.FinInvoices;
 import org.springblade.los.finance.invoices.mapper.FinInvoicesMapper;
 import org.springblade.los.finance.stl.entity.FinStlBills;
 import org.springblade.los.finance.stl.mapper.FinStlBillsMapper;
+import org.springblade.system.feign.ISysClient;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
@@ -114,6 +115,8 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 
 	private final MktSlotMapper mktSlotMapper;
 
+	private final ISysClient sysClient;
+
 
 	@Override
 	public IPage<LosAuditProecessVO> selectAuditProecessPage(IPage<LosAuditProecessVO> page, LosAuditProecessVO auditProecess) {
@@ -2114,12 +2117,24 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 				data.setCreateTime(new Date());
 				data.setCreateUser(AuthUtil.getUserId());
 				data.setCreateUserName(AuthUtil.getUserName());
-				data.setCreateDept(item.getBranchId());
-				data.setCreateDeptName(item.getBranchName());
-				data.setBranchId(item.getBranchId());
-				data.setBranchName(item.getBranchName());
-				data.setDeptId(Long.parseLong(item.getBranchId()));
-				data.setDeptName(item.getBranchName());
+				if (ObjectUtils.isNull(item.getBranchId())){
+					data.setCreateDept(AuthUtil.getDeptId());
+					R<String> res = sysClient.getDeptName(Long.parseLong(AuthUtil.getDeptId()));
+					if (res.isSuccess()){
+						data.setCreateDeptName(res.getData());
+						data.setBranchName(res.getData());
+						data.setDeptName(res.getData());
+					}
+					data.setBranchId(item.getBranchId());
+					data.setDeptId(Long.parseLong(AuthUtil.getDeptId()));
+				}else{
+					data.setCreateDept(item.getBranchId());
+					data.setCreateDeptName(item.getBranchName());
+					data.setBranchId(item.getBranchId());
+					data.setBranchName(item.getBranchName());
+					data.setDeptId(Long.parseLong(item.getBranchId()));
+					data.setDeptName(item.getBranchName());
+				}
 				data.setBookingAgentId(item.getBookingAgentId());
 				data.setBookingAgentCnName(item.getBookingAgentCnName());
 				data.setBookingAgentEnName(item.getBookingAgentEnName());

+ 99 - 0
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/controller/FinAccBillsController.java

@@ -19,6 +19,7 @@ package org.springblade.los.finance.fee.controller;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -404,6 +405,104 @@ public class FinAccBillsController extends BladeController {
 	/**
 	 * 财务账单(对账)
 	 */
+	@GetMapping("/listAccBillV2")
+	public R<List<FinAccBillsVO>> listAccBillV2(ListAccBillVO listAccBillVO, Query query) {
+		String type = listAccBillVO.getType();
+		if ("2".equals(listAccBillVO.getType())) {
+			//收
+			if ("D".equals(listAccBillVO.getDc())) {
+				listAccBillVO.setType("2");
+			} else if ("C".equals(listAccBillVO.getDc())) {
+				//付
+				listAccBillVO.setType("3");
+			} else {
+				listAccBillVO.setType(null);
+			}
+		} else if ("3".equals(listAccBillVO.getType())) {
+			listAccBillVO.setType("4");
+		}
+		if (ObjectUtils.isNotNull(listAccBillVO.getIsCleared()) && 0 == listAccBillVO.getIsCleared()) {
+			listAccBillVO.setIsCleared(null);
+		}
+		if (ObjectUtils.isNotNull(listAccBillVO.getIsSignfor()) && 0 == listAccBillVO.getIsSignfor()) {
+			listAccBillVO.setIsSignfor(null);
+		}
+		if (ObjectUtils.isNotNull(listAccBillVO.getInvoiceStatus()) && 0 == listAccBillVO.getInvoiceStatus()) {
+			listAccBillVO.setInvoiceStatus(null);
+		}
+		if (ObjectUtils.isNotNull(listAccBillVO.getAuditStatus()) && "0".equals(listAccBillVO.getAuditStatus())) {
+			listAccBillVO.setAuditStatus(null);
+		}
+		if (ObjectUtils.isNotNull(listAccBillVO.getHblno()) && listAccBillVO.getHblno().contains(",")) {
+			listAccBillVO.setVagueH("1");
+		}
+		if (ObjectUtils.isNotNull(listAccBillVO.getMblno()) && listAccBillVO.getMblno().contains(",")) {
+			listAccBillVO.setVagueM("1");
+		}
+		List<FinAccBillsVO> list = finAccBillsService.listAccBillV2( listAccBillVO);
+		List<FinAccBillsVO> listAll = finAccBillsService.listAccBill(listAccBillVO);
+		for (FinAccBillsVO item : list) {
+			List<FinAccBillsVO> accBillsVOList = listAll.stream().filter(e -> e.getBranchId().equals(item.getBranchId()) &&
+				e.getCorpId().equals(item.getCorpId()) && e.getBusinessBillId().equals(item.getBusinessBillId()) &&
+				e.getAccountDc().equals(item.getAccountDc()) && e.getMblno().equals(item.getMblno()) &&
+				e.getHblno().equals(item.getHblno()) && e.getCurCode().equals(item.getCurCode())).collect(Collectors.toList());
+			if (!accBillsVOList.isEmpty()){
+				List<FinAccBillsVO> finAccBillsVOList = new ArrayList<>();
+				for (FinAccBillsVO accBillsVO : accBillsVOList){
+					accBillsVO.setQuantityCntrTypesDescr(accBillsVO.getQuantityCntrDescr());
+					BigDecimal amount = accBillsVO.getAppliedAmount().subtract(accBillsVO.getAppliedAmountStl());
+					accBillsVO.setAppliedCurrentStlAmount(accBillsVO.getAmount().subtract(amount).subtract(accBillsVO.getStlTtlAmount()));
+					accBillsVO.setAppliedInvoiceCurrentStlAmount(accBillsVO.getAmount().subtract(accBillsVO.getStlTtlAmount()));
+					accBillsVO.setReconciliationCurrentAmount(accBillsVO.getAmount().subtract(accBillsVO.getReconciliationAmount()));
+					BigDecimal invoice = accBillsVO.getAppliedInvoiceAmount().subtract(accBillsVO.getAppliedInvoiceAmountStl());
+					accBillsVO.setAppliedInvoiceCurrentAmount(accBillsVO.getAmount().subtract(invoice).subtract(accBillsVO.getUninvoicedAmount()));
+					if ("2".equals(type)) {
+						//收
+						if ("D".equals(listAccBillVO.getDc())) {
+							if (new BigDecimal("0.00").compareTo(accBillsVO.getAppliedInvoiceCurrentStlAmount()) != 0) {
+								finAccBillsVOList.add(accBillsVO);
+							}
+						} else if ("C".equals(listAccBillVO.getDc())) {
+							if (new BigDecimal("0.00").compareTo(accBillsVO.getAppliedCurrentStlAmount()) != 0) {
+								finAccBillsVOList.add(accBillsVO);
+							}
+						} else {
+							if (new BigDecimal("0.00").compareTo(accBillsVO.getAppliedInvoiceCurrentStlAmount()) != 0) {
+								finAccBillsVOList.add(accBillsVO);
+								continue;
+							}
+							if (new BigDecimal("0.00").compareTo(accBillsVO.getAppliedCurrentStlAmount()) != 0) {
+								finAccBillsVOList.add(accBillsVO);
+								continue;
+							}
+						}
+					} else if ("3".equals(type)) {
+						if (new BigDecimal("0.00").compareTo(accBillsVO.getAppliedInvoiceCurrentAmount()) != 0) {
+							finAccBillsVOList.add(accBillsVO);
+						}
+					} else if ("1".equals(type)) {
+						if (new BigDecimal("0.00").compareTo(accBillsVO.getReconciliationCurrentAmount()) != 0) {
+							finAccBillsVOList.add(accBillsVO);
+						}
+					} else if ("5".equals(type)) {
+						finAccBillsVOList.add(accBillsVO);
+					}
+				}
+				if (!finAccBillsVOList.isEmpty()){
+					item.setFinAccBillsVOList(finAccBillsVOList);
+					item.setAppliedCurrentStlAmount(finAccBillsVOList.stream().map(FinAccBillsVO::getAppliedCurrentStlAmount).reduce(BigDecimal.ZERO,BigDecimal::add));
+					item.setAppliedInvoiceCurrentStlAmount(finAccBillsVOList.stream().map(FinAccBillsVO::getAppliedInvoiceCurrentStlAmount).reduce(BigDecimal.ZERO,BigDecimal::add));
+					item.setReconciliationCurrentAmount(finAccBillsVOList.stream().map(FinAccBillsVO::getReconciliationCurrentAmount).reduce(BigDecimal.ZERO,BigDecimal::add));
+					item.setAppliedInvoiceCurrentAmount(finAccBillsVOList.stream().map(FinAccBillsVO::getAppliedInvoiceCurrentAmount).reduce(BigDecimal.ZERO,BigDecimal::add));
+				}
+			}
+		}
+		return R.data(list);
+	}
+
+	/**
+	 * 财务账单(对账)
+	 */
 	@GetMapping("/listAccBillByCorp")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "类别", notes = "传入finAccBills")

+ 2 - 0
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/IFinAccBillsService.java

@@ -82,4 +82,6 @@ public interface IFinAccBillsService extends IService<FinAccBills> {
     List<Map<String, Object>> listFeeCountByCorp(String dc,Long corpId);
 
 	List<FeeCountByCorpExcel> listFeeCountByCorpExport(String dc, Long corpId);
+
+	List<FinAccBillsVO> listAccBillV2(ListAccBillVO listAccBillVO);
 }

+ 17 - 0
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FinAccBillsServiceImpl.java

@@ -464,6 +464,23 @@ public class FinAccBillsServiceImpl extends ServiceImpl<FinAccBillsMapper, FinAc
 		}
 	}
 
+	@Override
+	public List<FinAccBillsVO> listAccBillV2(ListAccBillVO finAccBills) {
+		if (!AuthUtil.getUserRole().contains("总部") && !AuthUtil.getUserRole().contains("admin")) {
+			finAccBills.setBranchId(AuthUtil.getDeptId());
+		} else {
+
+			if (StringUtil.isNotBlank(finAccBills.getBranchId())  && "1".equals(finAccBills.getType())) {
+				finAccBills.setBranchId(finAccBills.getBranchId());
+			}
+			else
+			{
+				finAccBills.setBranchId(null);
+			}
+		}
+		return billsMapper.listAccBillV2(finAccBills);
+	}
+
 	private static <T> Predicate<T> distinctByKey(Function<? super T, ?> keyExtractor) {
 		Set<Object> seen = ConcurrentHashMap.newKeySet();
 		return t -> seen.add(keyExtractor.apply(t));

+ 5 - 2
blade-service/blade-los/src/main/java/org/springblade/los/finance/invoices/controller/FinInvoicesController.java

@@ -35,6 +35,7 @@ import org.springblade.los.finance.fee.entity.FinAccBills;
 import org.springblade.los.finance.invoices.entity.FinInvoices;
 import org.springblade.los.finance.invoices.service.IFinInvoicesService;
 import org.springblade.los.finance.invoices.vo.FinInvoicesVO;
+import org.springblade.los.finance.stl.entity.FinStlBills;
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
@@ -81,6 +82,8 @@ public class FinInvoicesController extends BladeController {
 				.like(FinInvoices::getInvCorpEnName, finInvoices.getInvCorpCnName()))
 			.like(ObjectUtils.isNotNull(finInvoices.getInvoiceNo()), FinInvoices::getInvoiceNo, finInvoices.getInvoiceNo())
 			.eq(ObjectUtils.isNotNull(finInvoices.getTaxType()), FinInvoices::getTaxType, finInvoices.getTaxType())
+			.eq(ObjectUtils.isNotNull(finInvoices.getInvoiceDate()), FinInvoices::getTaxType, finInvoices.getTaxType())
+			.like(ObjectUtils.isNotNull(finInvoices.getCreateUserName()), FinInvoices::getCreateUserName, finInvoices.getCreateUserName())
 			.like(ObjectUtils.isNotNull(finInvoices.getBusinessNo()), FinInvoices::getBusinessNo, finInvoices.getBusinessNo())
 			.like(ObjectUtils.isNotNull(finInvoices.getMblno()), FinInvoices::getMblno, finInvoices.getMblno())
 			.like(ObjectUtils.isNotNull(finInvoices.getHblno()), FinInvoices::getHblno, finInvoices.getHblno())
@@ -94,8 +97,8 @@ public class FinInvoicesController extends BladeController {
 			.like(ObjectUtils.isNotNull(finInvoices.getBookingNo()), FinInvoices::getBookingNo, finInvoices.getBookingNo())
 			.eq(ObjectUtils.isNotNull(finInvoices.getBillStatus()), FinInvoices::getBillStatus, finInvoices.getBillStatus())
 			.eq(ObjectUtils.isNotNull(finInvoices.getInvCurCode()), FinInvoices::getInvCurCode, finInvoices.getInvCurCode())
-			.ge(ObjectUtils.isNotNull(finInvoices.getInvoiceDateStart()), FinInvoices::getBillDate, finInvoices.getInvoiceDateStart())
-			.le(ObjectUtils.isNotNull(finInvoices.getInvoiceDateEnd()), FinInvoices::getBillDate, finInvoices.getInvoiceDateEnd())
+			.ge(ObjectUtils.isNotNull(finInvoices.getInvoiceDateStart()), FinInvoices::getInvoiceDate, finInvoices.getInvoiceDateStart())
+			.le(ObjectUtils.isNotNull(finInvoices.getInvoiceDateEnd()), FinInvoices::getInvoiceDate, finInvoices.getInvoiceDateEnd())
 			.ge(ObjectUtils.isNotNull(finInvoices.getAccountDateFrom()), FinInvoices::getAccountDateFrom, finInvoices.getAccountDateFrom())
 			.le(ObjectUtils.isNotNull(finInvoices.getAccountDateTo()), FinInvoices::getAccountDateTo, finInvoices.getAccountDateTo())
 			.orderByDesc(FinInvoices::getCreateTime);

+ 2 - 2
blade-service/blade-los/src/main/java/org/springblade/los/finance/invoices/service/impl/FinInvoicesServiceImpl.java

@@ -181,7 +181,7 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
 					}
 				} else {
 					item.setCurrentAmountLoc(item.getCurrentAmount().multiply(finInvoices.getExrate()));
-					if (1 == finInvoices.getIsExchangeToCny()) {
+					if ("1".equals(finInvoices.getIsExchangeToCny())) {
 						item.setCurrentAmountEx(item.getCurrentAmount().multiply(finInvoices.getExrate()));
 					} else {
 						item.setCurrentAmountEx(item.getCurrentAmount().multiply(item.getExrate()));
@@ -1099,7 +1099,7 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
 				item.setUpdateUser(AuthUtil.getUserId());
 				item.setUpdateUserName(AuthUtil.getUserName());
 				if (!exrateType.equals(item.getCurCode())) {
-					if (0 == finInvoices.getIsExchangeToCny()) {
+					if ("0".equals(finInvoices.getIsExchangeToCny())) {
 						amount = amount.add(item.getCurrentAmount().multiply(item.getExrate()));
 					} else {
 						amount = amount.add(item.getCurrentAmount().multiply(finInvoices.getExrate()));

+ 5 - 0
blade-service/blade-los/src/main/java/org/springblade/los/finance/stl/controller/FinStlBillsController.java

@@ -81,6 +81,8 @@ public class FinStlBillsController extends BladeController {
 			.eq(ObjectUtils.isNotNull(finStlBills.getBusinessTypes()), FinStlBills::getBusinessTypes, finStlBills.getBusinessTypes())
 			.eq(ObjectUtils.isNotNull(finStlBills.getStatus()), FinStlBills::getStatus, finStlBills.getStatus())
 			.eq(ObjectUtils.isNotNull(finStlBills.getBillStatus()), FinStlBills::getBillStatus, finStlBills.getBillStatus())
+			.like(ObjectUtils.isNotNull(finStlBills.getCreateUserName()), FinStlBills::getCreateUserName, finStlBills.getCreateUserName())
+			.like(ObjectUtils.isNotNull(finStlBills.getCreateUserNames()), FinStlBills::getCreateUserName, finStlBills.getCreateUserNames())
 			.like(ObjectUtils.isNotNull(finStlBills.getBusinessNo()), FinStlBills::getBusinessNo, finStlBills.getBusinessNo())
 			.like(ObjectUtils.isNotNull(finStlBills.getAccountNo()), FinStlBills::getAccountNo, finStlBills.getAccountNo())
 			.like(ObjectUtils.isNotNull(finStlBills.getCheckNo()), FinStlBills::getCheckNo, finStlBills.getCheckNo())
@@ -122,6 +124,9 @@ public class FinStlBillsController extends BladeController {
 			lambdaQueryWrapper.eq(ObjectUtils.isNotNull(finStlBills.getBranchId()), FinStlBills::getBranchId, finStlBills.getBranchId());
 		}
 		IPage<FinStlBills> pages = finStlBillsService.page(Condition.getPage(query), lambdaQueryWrapper);
+		for (FinStlBills item: pages.getRecords()){
+			item.setCreateUserNames(item.getCreateUserName());
+		}
 		return R.data(pages);
 	}
 

+ 5 - 0
blade-service/blade-los/src/main/java/org/springblade/los/finance/stl/service/impl/FinStlBillsServiceImpl.java

@@ -165,6 +165,9 @@ public class FinStlBillsServiceImpl extends ServiceImpl<FinStlBillsMapper, FinSt
 		if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 			deptName = res.getData();
 		}
+		if (ObjectUtils.isNull(finStlBills.getBillDate())) {
+			finStlBills.setBillDate(new Date());
+		}
 		if (ObjectUtils.isNotNull(finStlBills.getBillDate()) && "STL,FFSQ".contains(finStlBills.getBusinessType())) {
 			LocalDate date = finStlBills.getBillDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
 			int year = date.getYear();
@@ -2006,6 +2009,8 @@ public class FinStlBillsServiceImpl extends ServiceImpl<FinStlBillsMapper, FinSt
 				.eq(FinInvoices::getStatus, "3")
 				.apply("find_in_set(id,'" + billId + "')"));
 			if (!finInvoices.isEmpty()) {
+				finStlBills.setExrate(finInvoices.get(0).getExrate());
+				finStlBills.setIsExchangeToCny(finInvoices.get(0).getIsExchangeToCny()+"");
 				finStlBills.setCorpId(finInvoices.get(0).getCorpId());
 				finStlBills.setCorpCnName(finInvoices.get(0).getCorpCnName());
 				finStlBills.setCorpEnName(finInvoices.get(0).getCorpEnName());