Commit e9b89000 by huluobin

update

parent f1400bf8
......@@ -14,10 +14,10 @@ JOB_NAME=base-sync-finance-fee
JOB_CRON=0 0 0/1 * * ?
LOGISTICS_JOB_NAME=base-sync-logistics
LOGISTICS_JOB_CRON=0 01 7 * * ? *
LOGISTICS_JOB_CRON=0/1 * * * * ?
MANAGECOST_JOB_NAME=base-sync-managecost
MANAGECOST_JOB_CRON=0 45 23 * * ? *
MANAGECOST_JOB_CRON=0/1 * * * * ?
DAILY_FEE_JOB_NAME=base-daily-fee
DAILY_FEE_JOB_CRON=0 1 0 * * ? *
......
......@@ -20,15 +20,19 @@
and (t6.hq_type = t5.warehouse_type or length(trim(t5.warehouse_type)) = 0)
and (t2.product_type = t5.category or length(trim(t5.category)) = 0)
and (t6.area_id = t5.warehouse_area_id or length(trim(t5.warehouse_area_id)) = 0)
# and t5.is_delete = 0
and t5.is_delete = 0
LEFT JOIN dc_auto_sales_forecast_stage_config t7 on t7.config_id = t5.id
and (IF(t5.screen_type = 1,
t8.first_inbound_date <= t7.duration_upper_limit or
t8.first_inbound_date >= t7.duration_lower_limit or t8.first_inbound_date is null or
length(trim(t8.first_inbound_date)) = 0,
t1.daily_weighted_sales <= t7.sales_upper_limit or
t1.daily_weighted_sales >= t7.sales_lower_limit or t1.daily_weighted_sales is null or
length(trim(t1.daily_weighted_sales)) = 0))
((t8.first_inbound_date <= t7.duration_upper_limit or t7.duration_upper_limit = 0)
and (t8.first_inbound_date >= t7.duration_lower_limit or t7.duration_lower_limit = 0)
and (t7.duration_upper_limit != 0 or t7.duration_lower_limit != 0))
or t8.first_inbound_date is null
or length(trim(t8.first_inbound_date)) = 0,
((t1.daily_weighted_sales <= t7.sales_upper_limit or t7.sales_upper_limit = 0)
and (t1.daily_weighted_sales >= t7.sales_lower_limit or t7.sales_lower_limit = 0)
and (t7.sales_upper_limit != 0 or t7.sales_lower_limit != 0))
or t1.daily_weighted_sales is null
or length(trim(t1.daily_weighted_sales)) = 0))
where t1.bailun_sku = #{bailunSku}
and t1.warehouse_code = #{warehouseCode}
and t5.id is not null
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1400,7 +1400,8 @@
OR (bailun_sku_warehouse_code IN (SELECT CONCAT(bailun_sku, warehouse_code)
FROM dc_base_oms_sku
WHERE gmt_create >= #{v2}
AND bailun_sku_quantity_ordered > bailun_sku_quantity_picked))
# AND bailun_sku_quantity_ordered > bailun_sku_quantity_picked
))
)
and t1.id % #{shardingContext.shardingTotalCount} = #{shardingContext.shardingItem}
</select>
......@@ -1415,7 +1416,8 @@
OR (bailun_sku_warehouse_code IN (SELECT CONCAT(bailun_sku, warehouse_code)
FROM dc_base_oms_sku
WHERE gmt_create &gt;= #{v2}
AND bailun_sku_quantity_ordered > bailun_sku_quantity_picked))
# AND bailun_sku_quantity_ordered > bailun_sku_quantity_picked
))
)
and t1.id % #{shardingContext.shardingTotalCount} = #{shardingContext.shardingItem}
limit #{pageStart}, #{pageOffset};
......
......@@ -6,6 +6,7 @@ import org.springframework.stereotype.Repository;
import java.math.BigDecimal;
import java.util.Date;
@Repository
public interface DcBalanceSheetMapper {
......@@ -14,8 +15,10 @@ public interface DcBalanceSheetMapper {
@Select("select * from dc_balance_sheet where statistical_time = #{lastDay} and company_value = #{companyValue} and company_name = #{companyName} limit 1")
DcBalanceSheet getDcBalanceSheetInit(@Param("companyValue") Integer companyValue, @Param("companyName") String companyName, @Param("lastDay") Date lastDay);
/**
* 短期借款均属于广州百伦
*
* @param shortTermBorrow
* @param date
*/
......@@ -26,6 +29,7 @@ public interface DcBalanceSheetMapper {
* 插入新的广州百伦资产负债表
* 以下项默认取前一天的数据
* 应收账款、存货、长期股权投资、固定资产、无形资产、长期待摊费用、应付账款、应付职工薪酬、应交税费、长期应付款、实收资本、资本公积、未分配利润
*
* @param lastDay
* @param twoDaysBefore
*/
......@@ -41,6 +45,7 @@ public interface DcBalanceSheetMapper {
/**
* 更新广州百伦资产负债表,以下项默认取前一天的数据:
* 应收账款、存货、长期股权投资、固定资产、无形资产、长期待摊费用、应付账款、应付职工薪酬、应交税费、长期应付款、实收资本、资本公积、未分配利润
*
* @param lastDay
* @param twoDaysBefore
*/
......@@ -70,6 +75,7 @@ public interface DcBalanceSheetMapper {
* 插入新的香港百伦资产负债表
* 以下项默认取前一天的数据
* 长期股权投资、固定资产、递延所得税资产、实收资本、资本公积、未分配利润
*
* @param lastDay
* @param twoDaysBefore
*/
......@@ -83,6 +89,7 @@ public interface DcBalanceSheetMapper {
/**
* 更新香港百伦资产负债表,以下项默认取前一天的数据:
* 长期股权投资、固定资产、递延所得税资产、实收资本、资本公积、未分配利润
*
* @param lastDay
* @param twoDaysBefore
*/
......
......@@ -2,39 +2,39 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bailuntec.balancesheet.mapper.DcBalanceSheetMapper">
<resultMap id="BaseResultMap" type="com.bailuntec.balancesheet.entity.DcBalanceSheet">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="company_value" jdbcType="INTEGER" property="companyValue" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="monetary_fund" jdbcType="DECIMAL" property="monetaryFund" />
<result column="bank_account_balance" jdbcType="DECIMAL" property="bankAccountBalance" />
<result column="withdraw_amount" jdbcType="DECIMAL" property="withdrawAmount" />
<result column="platform_balance" jdbcType="DECIMAL" property="platformBalance" />
<result column="accounts_receivable" jdbcType="DECIMAL" property="accountsReceivable" />
<result column="prepayment" jdbcType="DECIMAL" property="prepayment" />
<result column="logistics_prepayment" jdbcType="DECIMAL" property="logisticsPrepayment" />
<result column="finished_prepayment" jdbcType="DECIMAL" property="finishedPrepayment" />
<result column="semi_prepayment" jdbcType="DECIMAL" property="semiPrepayment" />
<result column="other_accounts_receivable" jdbcType="DECIMAL" property="otherAccountsReceivable" />
<result column="inventory_amount" jdbcType="DECIMAL" property="inventoryAmount" />
<result column="fba_inventory_amount" jdbcType="DECIMAL" property="fbaInventoryAmount" />
<result column="not_fba_inventory_amount" jdbcType="DECIMAL" property="notFbaInventoryAmount" />
<result column="fba_transfer_amount" jdbcType="DECIMAL" property="fbaTransferAmount" />
<result column="not_fba_transfer_amount" jdbcType="DECIMAL" property="notFbaTransferAmount" />
<result column="semi_inventory_amount" jdbcType="DECIMAL" property="semiInventoryAmount" />
<result column="semi_transfer_amount" jdbcType="DECIMAL" property="semiTransferAmount" />
<result column="fixed_assets" jdbcType="DECIMAL" property="fixedAssets" />
<result column="short_term_borrow" jdbcType="DECIMAL" property="shortTermBorrow" />
<result column="accounts_payable" jdbcType="DECIMAL" property="accountsPayable" />
<result column="logistics_accounts_payable" jdbcType="DECIMAL" property="logisticsAccountsPayable" />
<result column="finished_accounts_payable" jdbcType="DECIMAL" property="finishedAccountsPayable" />
<result column="semi_accounts_payable" jdbcType="DECIMAL" property="semiAccountsPayable" />
<result column="advance_received" jdbcType="DECIMAL" property="advanceReceived" />
<result column="payable_remuneration" jdbcType="DECIMAL" property="payableRemuneration" />
<result column="taxes_payable" jdbcType="DECIMAL" property="taxesPayable" />
<result column="other_accounts_payable" jdbcType="DECIMAL" property="otherAccountsPayable" />
<result column="long_term_accounts_payable" jdbcType="DECIMAL" property="longTermAccountsPayable" />
<result column="statistical_time" jdbcType="DATE" property="statisticalTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="company_value" jdbcType="INTEGER" property="companyValue"/>
<result column="company_name" jdbcType="VARCHAR" property="companyName"/>
<result column="monetary_fund" jdbcType="DECIMAL" property="monetaryFund"/>
<result column="bank_account_balance" jdbcType="DECIMAL" property="bankAccountBalance"/>
<result column="withdraw_amount" jdbcType="DECIMAL" property="withdrawAmount"/>
<result column="platform_balance" jdbcType="DECIMAL" property="platformBalance"/>
<result column="accounts_receivable" jdbcType="DECIMAL" property="accountsReceivable"/>
<result column="prepayment" jdbcType="DECIMAL" property="prepayment"/>
<result column="logistics_prepayment" jdbcType="DECIMAL" property="logisticsPrepayment"/>
<result column="finished_prepayment" jdbcType="DECIMAL" property="finishedPrepayment"/>
<result column="semi_prepayment" jdbcType="DECIMAL" property="semiPrepayment"/>
<result column="other_accounts_receivable" jdbcType="DECIMAL" property="otherAccountsReceivable"/>
<result column="inventory_amount" jdbcType="DECIMAL" property="inventoryAmount"/>
<result column="fba_inventory_amount" jdbcType="DECIMAL" property="fbaInventoryAmount"/>
<result column="not_fba_inventory_amount" jdbcType="DECIMAL" property="notFbaInventoryAmount"/>
<result column="fba_transfer_amount" jdbcType="DECIMAL" property="fbaTransferAmount"/>
<result column="not_fba_transfer_amount" jdbcType="DECIMAL" property="notFbaTransferAmount"/>
<result column="semi_inventory_amount" jdbcType="DECIMAL" property="semiInventoryAmount"/>
<result column="semi_transfer_amount" jdbcType="DECIMAL" property="semiTransferAmount"/>
<result column="fixed_assets" jdbcType="DECIMAL" property="fixedAssets"/>
<result column="short_term_borrow" jdbcType="DECIMAL" property="shortTermBorrow"/>
<result column="accounts_payable" jdbcType="DECIMAL" property="accountsPayable"/>
<result column="logistics_accounts_payable" jdbcType="DECIMAL" property="logisticsAccountsPayable"/>
<result column="finished_accounts_payable" jdbcType="DECIMAL" property="finishedAccountsPayable"/>
<result column="semi_accounts_payable" jdbcType="DECIMAL" property="semiAccountsPayable"/>
<result column="advance_received" jdbcType="DECIMAL" property="advanceReceived"/>
<result column="payable_remuneration" jdbcType="DECIMAL" property="payableRemuneration"/>
<result column="taxes_payable" jdbcType="DECIMAL" property="taxesPayable"/>
<result column="other_accounts_payable" jdbcType="DECIMAL" property="otherAccountsPayable"/>
<result column="long_term_accounts_payable" jdbcType="DECIMAL" property="longTermAccountsPayable"/>
<result column="statistical_time" jdbcType="DATE" property="statisticalTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
id, company_value, company_name, monetary_fund, accounts_receivable, prepayment,
......
......@@ -325,7 +325,7 @@ public class AutoTurnoverJobTest {
DcBaseStockMapper dcBaseStockMapper = sqlSession.getMapper(DcBaseStockMapper.class);
DcBaseStock dcBaseStock = dcBaseStockMapper.selectOneByExample(DcBaseStockExample.newAndCreateCriteria()
.andBailunSkuEqualTo("949299201")
.andBailunSkuEqualTo("285472531")
.andWarehouseCodeEqualTo("GZBLWH")
.example());
......
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