Commit e9b89000 by huluobin

update

parent f1400bf8
...@@ -14,10 +14,10 @@ JOB_NAME=base-sync-finance-fee ...@@ -14,10 +14,10 @@ JOB_NAME=base-sync-finance-fee
JOB_CRON=0 0 0/1 * * ? JOB_CRON=0 0 0/1 * * ?
LOGISTICS_JOB_NAME=base-sync-logistics 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_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_NAME=base-daily-fee
DAILY_FEE_JOB_CRON=0 1 0 * * ? * DAILY_FEE_JOB_CRON=0 1 0 * * ? *
......
...@@ -20,15 +20,19 @@ ...@@ -20,15 +20,19 @@
and (t6.hq_type = t5.warehouse_type or length(trim(t5.warehouse_type)) = 0) 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 (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 (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 LEFT JOIN dc_auto_sales_forecast_stage_config t7 on t7.config_id = t5.id
and (IF(t5.screen_type = 1, and (IF(t5.screen_type = 1,
t8.first_inbound_date <= t7.duration_upper_limit or ((t8.first_inbound_date <= t7.duration_upper_limit or t7.duration_upper_limit = 0)
t8.first_inbound_date >= t7.duration_lower_limit or t8.first_inbound_date is null or and (t8.first_inbound_date >= t7.duration_lower_limit or t7.duration_lower_limit = 0)
length(trim(t8.first_inbound_date)) = 0, and (t7.duration_upper_limit != 0 or t7.duration_lower_limit != 0))
t1.daily_weighted_sales <= t7.sales_upper_limit or or t8.first_inbound_date is null
t1.daily_weighted_sales >= t7.sales_lower_limit or t1.daily_weighted_sales is null or or length(trim(t8.first_inbound_date)) = 0,
length(trim(t1.daily_weighted_sales)) = 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} where t1.bailun_sku = #{bailunSku}
and t1.warehouse_code = #{warehouseCode} and t1.warehouse_code = #{warehouseCode}
and t5.id is not null 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 @@ ...@@ -1400,7 +1400,8 @@
OR (bailun_sku_warehouse_code IN (SELECT CONCAT(bailun_sku, warehouse_code) OR (bailun_sku_warehouse_code IN (SELECT CONCAT(bailun_sku, warehouse_code)
FROM dc_base_oms_sku FROM dc_base_oms_sku
WHERE gmt_create >= #{v2} 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} and t1.id % #{shardingContext.shardingTotalCount} = #{shardingContext.shardingItem}
</select> </select>
...@@ -1415,7 +1416,8 @@ ...@@ -1415,7 +1416,8 @@
OR (bailun_sku_warehouse_code IN (SELECT CONCAT(bailun_sku, warehouse_code) OR (bailun_sku_warehouse_code IN (SELECT CONCAT(bailun_sku, warehouse_code)
FROM dc_base_oms_sku FROM dc_base_oms_sku
WHERE gmt_create &gt;= #{v2} 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} and t1.id % #{shardingContext.shardingTotalCount} = #{shardingContext.shardingItem}
limit #{pageStart}, #{pageOffset}; limit #{pageStart}, #{pageOffset};
......
...@@ -6,6 +6,7 @@ import org.springframework.stereotype.Repository; ...@@ -6,6 +6,7 @@ import org.springframework.stereotype.Repository;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@Repository @Repository
public interface DcBalanceSheetMapper { public interface DcBalanceSheetMapper {
...@@ -14,8 +15,10 @@ 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") @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); DcBalanceSheet getDcBalanceSheetInit(@Param("companyValue") Integer companyValue, @Param("companyName") String companyName, @Param("lastDay") Date lastDay);
/** /**
* 短期借款均属于广州百伦 * 短期借款均属于广州百伦
*
* @param shortTermBorrow * @param shortTermBorrow
* @param date * @param date
*/ */
...@@ -25,7 +28,8 @@ public interface DcBalanceSheetMapper { ...@@ -25,7 +28,8 @@ public interface DcBalanceSheetMapper {
/** /**
* 插入新的广州百伦资产负债表 * 插入新的广州百伦资产负债表
* 以下项默认取前一天的数据 * 以下项默认取前一天的数据
* 应收账款、存货、长期股权投资、固定资产、无形资产、长期待摊费用、应付账款、应付职工薪酬、应交税费、长期应付款、实收资本、资本公积、未分配利润 * 应收账款、存货、长期股权投资、固定资产、无形资产、长期待摊费用、应付账款、应付职工薪酬、应交税费、长期应付款、实收资本、资本公积、未分配利润
*
* @param lastDay * @param lastDay
* @param twoDaysBefore * @param twoDaysBefore
*/ */
...@@ -40,7 +44,8 @@ public interface DcBalanceSheetMapper { ...@@ -40,7 +44,8 @@ public interface DcBalanceSheetMapper {
/** /**
* 更新广州百伦资产负债表,以下项默认取前一天的数据: * 更新广州百伦资产负债表,以下项默认取前一天的数据:
* 应收账款、存货、长期股权投资、固定资产、无形资产、长期待摊费用、应付账款、应付职工薪酬、应交税费、长期应付款、实收资本、资本公积、未分配利润 * 应收账款、存货、长期股权投资、固定资产、无形资产、长期待摊费用、应付账款、应付职工薪酬、应交税费、长期应付款、实收资本、资本公积、未分配利润
*
* @param lastDay * @param lastDay
* @param twoDaysBefore * @param twoDaysBefore
*/ */
...@@ -69,7 +74,8 @@ public interface DcBalanceSheetMapper { ...@@ -69,7 +74,8 @@ public interface DcBalanceSheetMapper {
/** /**
* 插入新的香港百伦资产负债表 * 插入新的香港百伦资产负债表
* 以下项默认取前一天的数据 * 以下项默认取前一天的数据
* 长期股权投资、固定资产、递延所得税资产、实收资本、资本公积、未分配利润 * 长期股权投资、固定资产、递延所得税资产、实收资本、资本公积、未分配利润
*
* @param lastDay * @param lastDay
* @param twoDaysBefore * @param twoDaysBefore
*/ */
...@@ -82,7 +88,8 @@ public interface DcBalanceSheetMapper { ...@@ -82,7 +88,8 @@ public interface DcBalanceSheetMapper {
/** /**
* 更新香港百伦资产负债表,以下项默认取前一天的数据: * 更新香港百伦资产负债表,以下项默认取前一天的数据:
* 长期股权投资、固定资产、递延所得税资产、实收资本、资本公积、未分配利润 * 长期股权投资、固定资产、递延所得税资产、实收资本、资本公积、未分配利润
*
* @param lastDay * @param lastDay
* @param twoDaysBefore * @param twoDaysBefore
*/ */
...@@ -104,37 +111,37 @@ public interface DcBalanceSheetMapper { ...@@ -104,37 +111,37 @@ public interface DcBalanceSheetMapper {
@Insert({ @Insert({
"insert into dc_balance_sheet (id, company_value, ", "insert into dc_balance_sheet (id, company_value, ",
"company_name, monetary_fund, ", "company_name, monetary_fund, ",
"accounts_receivable, prepayment, ", "accounts_receivable, prepayment, ",
"other_accounts_receivable, inventory_amount, ", "other_accounts_receivable, inventory_amount, ",
"fixed_assets, short_term_borrow, ", "fixed_assets, short_term_borrow, ",
"accounts_payable, advance_received, ", "accounts_payable, advance_received, ",
"payable_remuneration, taxes_payable, ", "payable_remuneration, taxes_payable, ",
"other_accounts_payable, long_term_accounts_payable, ", "other_accounts_payable, long_term_accounts_payable, ",
"statistical_time, update_time)", "statistical_time, update_time)",
"values (#{id,jdbcType=INTEGER}, #{companyValue,jdbcType=INTEGER}, ", "values (#{id,jdbcType=INTEGER}, #{companyValue,jdbcType=INTEGER}, ",
"#{companyName,jdbcType=VARCHAR}, #{monetaryFund,jdbcType=DECIMAL}, ", "#{companyName,jdbcType=VARCHAR}, #{monetaryFund,jdbcType=DECIMAL}, ",
"#{accountsReceivable,jdbcType=DECIMAL}, #{prepayment,jdbcType=DECIMAL}, ", "#{accountsReceivable,jdbcType=DECIMAL}, #{prepayment,jdbcType=DECIMAL}, ",
"#{otherAccountsReceivable,jdbcType=DECIMAL}, #{inventoryAmount,jdbcType=DECIMAL}, ", "#{otherAccountsReceivable,jdbcType=DECIMAL}, #{inventoryAmount,jdbcType=DECIMAL}, ",
"#{fixedAssets,jdbcType=DECIMAL}, #{shortTermBorrow,jdbcType=DECIMAL}, ", "#{fixedAssets,jdbcType=DECIMAL}, #{shortTermBorrow,jdbcType=DECIMAL}, ",
"#{accountsPayable,jdbcType=DECIMAL}, #{advanceReceived,jdbcType=DECIMAL}, ", "#{accountsPayable,jdbcType=DECIMAL}, #{advanceReceived,jdbcType=DECIMAL}, ",
"#{payableRemuneration,jdbcType=DECIMAL}, #{taxesPayable,jdbcType=DECIMAL}, ", "#{payableRemuneration,jdbcType=DECIMAL}, #{taxesPayable,jdbcType=DECIMAL}, ",
"#{otherAccountsPayable,jdbcType=DECIMAL}, #{longTermAccountsPayable,jdbcType=DECIMAL}, ", "#{otherAccountsPayable,jdbcType=DECIMAL}, #{longTermAccountsPayable,jdbcType=DECIMAL}, ",
"#{statisticalTime,jdbcType=DATE}, #{updateTime,jdbcType=TIMESTAMP})" "#{statisticalTime,jdbcType=DATE}, #{updateTime,jdbcType=TIMESTAMP})"
}) })
int insert(DcBalanceSheet record); int insert(DcBalanceSheet record);
int insertSelective(DcBalanceSheet record); int insertSelective(DcBalanceSheet record);
@Select({ @Select({
"select", "select",
"id, company_value, company_name, monetary_fund, accounts_receivable, prepayment, ", "id, company_value, company_name, monetary_fund, accounts_receivable, prepayment, ",
"other_accounts_receivable, inventory_amount, fixed_assets, short_term_borrow, ", "other_accounts_receivable, inventory_amount, fixed_assets, short_term_borrow, ",
"accounts_payable, advance_received, payable_remuneration, taxes_payable, other_accounts_payable, ", "accounts_payable, advance_received, payable_remuneration, taxes_payable, other_accounts_payable, ",
"long_term_accounts_payable, statistical_time, update_time", "long_term_accounts_payable, statistical_time, update_time",
"from dc_balance_sheet", "from dc_balance_sheet",
"where id = #{id,jdbcType=INTEGER}" "where id = #{id,jdbcType=INTEGER}"
}) })
@ResultMap("com.bailuntec.balancesheet.mapper.DcBalanceSheetMapper.BaseResultMap") @ResultMap("com.bailuntec.balancesheet.mapper.DcBalanceSheetMapper.BaseResultMap")
DcBalanceSheet selectByPrimaryKey(Integer id); DcBalanceSheet selectByPrimaryKey(Integer id);
...@@ -175,25 +182,25 @@ public interface DcBalanceSheetMapper { ...@@ -175,25 +182,25 @@ public interface DcBalanceSheetMapper {
int updateByPrimaryKeySelective(DcBalanceSheet record); int updateByPrimaryKeySelective(DcBalanceSheet record);
@Update({ @Update({
"update dc_balance_sheet", "update dc_balance_sheet",
"set company_value = #{companyValue,jdbcType=INTEGER},", "set company_value = #{companyValue,jdbcType=INTEGER},",
"company_name = #{companyName,jdbcType=VARCHAR},", "company_name = #{companyName,jdbcType=VARCHAR},",
"monetary_fund = #{monetaryFund,jdbcType=DECIMAL},", "monetary_fund = #{monetaryFund,jdbcType=DECIMAL},",
"accounts_receivable = #{accountsReceivable,jdbcType=DECIMAL},", "accounts_receivable = #{accountsReceivable,jdbcType=DECIMAL},",
"prepayment = #{prepayment,jdbcType=DECIMAL},", "prepayment = #{prepayment,jdbcType=DECIMAL},",
"other_accounts_receivable = #{otherAccountsReceivable,jdbcType=DECIMAL},", "other_accounts_receivable = #{otherAccountsReceivable,jdbcType=DECIMAL},",
"inventory_amount = #{inventoryAmount,jdbcType=DECIMAL},", "inventory_amount = #{inventoryAmount,jdbcType=DECIMAL},",
"fixed_assets = #{fixedAssets,jdbcType=DECIMAL},", "fixed_assets = #{fixedAssets,jdbcType=DECIMAL},",
"short_term_borrow = #{shortTermBorrow,jdbcType=DECIMAL},", "short_term_borrow = #{shortTermBorrow,jdbcType=DECIMAL},",
"accounts_payable = #{accountsPayable,jdbcType=DECIMAL},", "accounts_payable = #{accountsPayable,jdbcType=DECIMAL},",
"advance_received = #{advanceReceived,jdbcType=DECIMAL},", "advance_received = #{advanceReceived,jdbcType=DECIMAL},",
"payable_remuneration = #{payableRemuneration,jdbcType=DECIMAL},", "payable_remuneration = #{payableRemuneration,jdbcType=DECIMAL},",
"taxes_payable = #{taxesPayable,jdbcType=DECIMAL},", "taxes_payable = #{taxesPayable,jdbcType=DECIMAL},",
"other_accounts_payable = #{otherAccountsPayable,jdbcType=DECIMAL},", "other_accounts_payable = #{otherAccountsPayable,jdbcType=DECIMAL},",
"long_term_accounts_payable = #{longTermAccountsPayable,jdbcType=DECIMAL},", "long_term_accounts_payable = #{longTermAccountsPayable,jdbcType=DECIMAL},",
"statistical_time = #{statisticalTime,jdbcType=DATE},", "statistical_time = #{statisticalTime,jdbcType=DATE},",
"update_time = #{updateTime,jdbcType=TIMESTAMP}", "update_time = #{updateTime,jdbcType=TIMESTAMP}",
"where id = #{id,jdbcType=INTEGER}" "where id = #{id,jdbcType=INTEGER}"
}) })
int updateByPrimaryKey(DcBalanceSheet record); int updateByPrimaryKey(DcBalanceSheet record);
} }
\ No newline at end of file
...@@ -325,7 +325,7 @@ public class AutoTurnoverJobTest { ...@@ -325,7 +325,7 @@ public class AutoTurnoverJobTest {
DcBaseStockMapper dcBaseStockMapper = sqlSession.getMapper(DcBaseStockMapper.class); DcBaseStockMapper dcBaseStockMapper = sqlSession.getMapper(DcBaseStockMapper.class);
DcBaseStock dcBaseStock = dcBaseStockMapper.selectOneByExample(DcBaseStockExample.newAndCreateCriteria() DcBaseStock dcBaseStock = dcBaseStockMapper.selectOneByExample(DcBaseStockExample.newAndCreateCriteria()
.andBailunSkuEqualTo("949299201") .andBailunSkuEqualTo("285472531")
.andWarehouseCodeEqualTo("GZBLWH") .andWarehouseCodeEqualTo("GZBLWH")
.example()); .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