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.
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
*/
......@@ -25,7 +28,8 @@ public interface DcBalanceSheetMapper {
/**
* 插入新的广州百伦资产负债表
* 以下项默认取前一天的数据
* 应收账款、存货、长期股权投资、固定资产、无形资产、长期待摊费用、应付账款、应付职工薪酬、应交税费、长期应付款、实收资本、资本公积、未分配利润
* 应收账款、存货、长期股权投资、固定资产、无形资产、长期待摊费用、应付账款、应付职工薪酬、应交税费、长期应付款、实收资本、资本公积、未分配利润
*
* @param lastDay
* @param twoDaysBefore
*/
......@@ -40,7 +44,8 @@ public interface DcBalanceSheetMapper {
/**
* 更新广州百伦资产负债表,以下项默认取前一天的数据:
* 应收账款、存货、长期股权投资、固定资产、无形资产、长期待摊费用、应付账款、应付职工薪酬、应交税费、长期应付款、实收资本、资本公积、未分配利润
* 应收账款、存货、长期股权投资、固定资产、无形资产、长期待摊费用、应付账款、应付职工薪酬、应交税费、长期应付款、实收资本、资本公积、未分配利润
*
* @param lastDay
* @param twoDaysBefore
*/
......@@ -69,7 +74,8 @@ public interface DcBalanceSheetMapper {
/**
* 插入新的香港百伦资产负债表
* 以下项默认取前一天的数据
* 长期股权投资、固定资产、递延所得税资产、实收资本、资本公积、未分配利润
* 长期股权投资、固定资产、递延所得税资产、实收资本、资本公积、未分配利润
*
* @param lastDay
* @param twoDaysBefore
*/
......@@ -82,7 +88,8 @@ public interface DcBalanceSheetMapper {
/**
* 更新香港百伦资产负债表,以下项默认取前一天的数据:
* 长期股权投资、固定资产、递延所得税资产、实收资本、资本公积、未分配利润
* 长期股权投资、固定资产、递延所得税资产、实收资本、资本公积、未分配利润
*
* @param lastDay
* @param twoDaysBefore
*/
......@@ -104,37 +111,37 @@ public interface DcBalanceSheetMapper {
@Insert({
"insert into dc_balance_sheet (id, company_value, ",
"company_name, monetary_fund, ",
"accounts_receivable, prepayment, ",
"other_accounts_receivable, inventory_amount, ",
"fixed_assets, short_term_borrow, ",
"accounts_payable, advance_received, ",
"payable_remuneration, taxes_payable, ",
"other_accounts_payable, long_term_accounts_payable, ",
"statistical_time, update_time)",
"values (#{id,jdbcType=INTEGER}, #{companyValue,jdbcType=INTEGER}, ",
"#{companyName,jdbcType=VARCHAR}, #{monetaryFund,jdbcType=DECIMAL}, ",
"#{accountsReceivable,jdbcType=DECIMAL}, #{prepayment,jdbcType=DECIMAL}, ",
"#{otherAccountsReceivable,jdbcType=DECIMAL}, #{inventoryAmount,jdbcType=DECIMAL}, ",
"#{fixedAssets,jdbcType=DECIMAL}, #{shortTermBorrow,jdbcType=DECIMAL}, ",
"#{accountsPayable,jdbcType=DECIMAL}, #{advanceReceived,jdbcType=DECIMAL}, ",
"#{payableRemuneration,jdbcType=DECIMAL}, #{taxesPayable,jdbcType=DECIMAL}, ",
"#{otherAccountsPayable,jdbcType=DECIMAL}, #{longTermAccountsPayable,jdbcType=DECIMAL}, ",
"#{statisticalTime,jdbcType=DATE}, #{updateTime,jdbcType=TIMESTAMP})"
"insert into dc_balance_sheet (id, company_value, ",
"company_name, monetary_fund, ",
"accounts_receivable, prepayment, ",
"other_accounts_receivable, inventory_amount, ",
"fixed_assets, short_term_borrow, ",
"accounts_payable, advance_received, ",
"payable_remuneration, taxes_payable, ",
"other_accounts_payable, long_term_accounts_payable, ",
"statistical_time, update_time)",
"values (#{id,jdbcType=INTEGER}, #{companyValue,jdbcType=INTEGER}, ",
"#{companyName,jdbcType=VARCHAR}, #{monetaryFund,jdbcType=DECIMAL}, ",
"#{accountsReceivable,jdbcType=DECIMAL}, #{prepayment,jdbcType=DECIMAL}, ",
"#{otherAccountsReceivable,jdbcType=DECIMAL}, #{inventoryAmount,jdbcType=DECIMAL}, ",
"#{fixedAssets,jdbcType=DECIMAL}, #{shortTermBorrow,jdbcType=DECIMAL}, ",
"#{accountsPayable,jdbcType=DECIMAL}, #{advanceReceived,jdbcType=DECIMAL}, ",
"#{payableRemuneration,jdbcType=DECIMAL}, #{taxesPayable,jdbcType=DECIMAL}, ",
"#{otherAccountsPayable,jdbcType=DECIMAL}, #{longTermAccountsPayable,jdbcType=DECIMAL}, ",
"#{statisticalTime,jdbcType=DATE}, #{updateTime,jdbcType=TIMESTAMP})"
})
int insert(DcBalanceSheet record);
int insertSelective(DcBalanceSheet record);
@Select({
"select",
"id, company_value, company_name, monetary_fund, accounts_receivable, prepayment, ",
"other_accounts_receivable, inventory_amount, fixed_assets, short_term_borrow, ",
"accounts_payable, advance_received, payable_remuneration, taxes_payable, other_accounts_payable, ",
"long_term_accounts_payable, statistical_time, update_time",
"from dc_balance_sheet",
"where id = #{id,jdbcType=INTEGER}"
"select",
"id, company_value, company_name, monetary_fund, accounts_receivable, prepayment, ",
"other_accounts_receivable, inventory_amount, fixed_assets, short_term_borrow, ",
"accounts_payable, advance_received, payable_remuneration, taxes_payable, other_accounts_payable, ",
"long_term_accounts_payable, statistical_time, update_time",
"from dc_balance_sheet",
"where id = #{id,jdbcType=INTEGER}"
})
@ResultMap("com.bailuntec.balancesheet.mapper.DcBalanceSheetMapper.BaseResultMap")
DcBalanceSheet selectByPrimaryKey(Integer id);
......@@ -175,25 +182,25 @@ public interface DcBalanceSheetMapper {
int updateByPrimaryKeySelective(DcBalanceSheet record);
@Update({
"update dc_balance_sheet",
"set company_value = #{companyValue,jdbcType=INTEGER},",
"company_name = #{companyName,jdbcType=VARCHAR},",
"monetary_fund = #{monetaryFund,jdbcType=DECIMAL},",
"accounts_receivable = #{accountsReceivable,jdbcType=DECIMAL},",
"prepayment = #{prepayment,jdbcType=DECIMAL},",
"other_accounts_receivable = #{otherAccountsReceivable,jdbcType=DECIMAL},",
"inventory_amount = #{inventoryAmount,jdbcType=DECIMAL},",
"fixed_assets = #{fixedAssets,jdbcType=DECIMAL},",
"short_term_borrow = #{shortTermBorrow,jdbcType=DECIMAL},",
"accounts_payable = #{accountsPayable,jdbcType=DECIMAL},",
"advance_received = #{advanceReceived,jdbcType=DECIMAL},",
"payable_remuneration = #{payableRemuneration,jdbcType=DECIMAL},",
"taxes_payable = #{taxesPayable,jdbcType=DECIMAL},",
"other_accounts_payable = #{otherAccountsPayable,jdbcType=DECIMAL},",
"long_term_accounts_payable = #{longTermAccountsPayable,jdbcType=DECIMAL},",
"statistical_time = #{statisticalTime,jdbcType=DATE},",
"update_time = #{updateTime,jdbcType=TIMESTAMP}",
"where id = #{id,jdbcType=INTEGER}"
"update dc_balance_sheet",
"set company_value = #{companyValue,jdbcType=INTEGER},",
"company_name = #{companyName,jdbcType=VARCHAR},",
"monetary_fund = #{monetaryFund,jdbcType=DECIMAL},",
"accounts_receivable = #{accountsReceivable,jdbcType=DECIMAL},",
"prepayment = #{prepayment,jdbcType=DECIMAL},",
"other_accounts_receivable = #{otherAccountsReceivable,jdbcType=DECIMAL},",
"inventory_amount = #{inventoryAmount,jdbcType=DECIMAL},",
"fixed_assets = #{fixedAssets,jdbcType=DECIMAL},",
"short_term_borrow = #{shortTermBorrow,jdbcType=DECIMAL},",
"accounts_payable = #{accountsPayable,jdbcType=DECIMAL},",
"advance_received = #{advanceReceived,jdbcType=DECIMAL},",
"payable_remuneration = #{payableRemuneration,jdbcType=DECIMAL},",
"taxes_payable = #{taxesPayable,jdbcType=DECIMAL},",
"other_accounts_payable = #{otherAccountsPayable,jdbcType=DECIMAL},",
"long_term_accounts_payable = #{longTermAccountsPayable,jdbcType=DECIMAL},",
"statistical_time = #{statisticalTime,jdbcType=DATE},",
"update_time = #{updateTime,jdbcType=TIMESTAMP}",
"where id = #{id,jdbcType=INTEGER}"
})
int updateByPrimaryKey(DcBalanceSheet record);
}
\ No newline at end of file
}
......@@ -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