feat: 变更 calculate 相关材料编码
This commit is contained in:
@@ -10,7 +10,7 @@ from commons.models.fuzhou_transportation_bureau import FuzhouTransportationBure
|
||||
|
||||
class AsphaltDomesticCalculator(Calculator):
|
||||
name = "国产沥青"
|
||||
material_id = "06.60.61.00"
|
||||
material_id = "3001001001"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
|
@@ -5,7 +5,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class AsphaltDomesticModifierCalculator(Calculator):
|
||||
name = "国产改性沥青"
|
||||
material_id = "06.12.61.00"
|
||||
material_id = "3001002002"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
|
@@ -11,7 +11,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class AsphaltImportedCalculator(Calculator):
|
||||
name = "进口沥青"
|
||||
material_id = "06.60.60.00"
|
||||
material_id = "3001001002"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
|
@@ -5,7 +5,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class AsphaltImportedModifierCalculator(Calculator):
|
||||
name = "进口改性沥青"
|
||||
material_id = "06.12.60.00"
|
||||
material_id = "3001002002"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
@@ -13,7 +13,7 @@ class AsphaltImportedModifierCalculator(Calculator):
|
||||
query = PriceResult.get_query(self.year, self.month, name='进口沥青')
|
||||
asphalt = query.first()
|
||||
fluctuating_1 = asphalt.fluctuating_recommend if asphalt else 0
|
||||
if not asphalt.price_recommend:
|
||||
if not asphalt or not asphalt.price_recommend:
|
||||
return 0, 0
|
||||
|
||||
query = PriceResult.get_query(self.year, self.month, name='改性剂')
|
||||
|
@@ -12,7 +12,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class Cement325Calculator(Calculator):
|
||||
name = "32.5 水泥"
|
||||
material_id = "09.60.60.00"
|
||||
material_id = "5509001"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
|
@@ -12,7 +12,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class Cement425Calculator(Calculator):
|
||||
name = "42.5 水泥"
|
||||
material_id = "09.61.60.00"
|
||||
material_id = "5509002"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
|
@@ -8,7 +8,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class ModifierCalculator(Calculator):
|
||||
name = "改性剂"
|
||||
material_id = "03.62.61.00"
|
||||
material_id = "0000001"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
|
@@ -12,7 +12,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class Oil0Calculator(Calculator):
|
||||
name = "柴油(0)"
|
||||
material_id = "69.61.60.00"
|
||||
material_id = "3003003"
|
||||
unit = "kg"
|
||||
spec = "0#"
|
||||
|
||||
|
@@ -10,7 +10,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class Oil89Calculator(Calculator):
|
||||
name = "汽油(89)"
|
||||
material_id = "69.60.60.00"
|
||||
material_id = "3003002001"
|
||||
unit = "kg"
|
||||
spec = "89#"
|
||||
|
||||
|
@@ -11,7 +11,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class Oil92Calculator(Calculator):
|
||||
name = "汽油(92)"
|
||||
material_id = "69.60.61.00"
|
||||
material_id = "3003002002"
|
||||
unit = "kg"
|
||||
spec = "92#"
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
from sqlalchemy import func
|
||||
|
||||
from calculators import Calculator
|
||||
from commons.models.data_fujian import DataFujian
|
||||
from commons.models.data_network import DataNetwork
|
||||
@@ -11,7 +9,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class SteelPlateCalculator(Calculator):
|
||||
name = "中厚板"
|
||||
material_id = "17.01.61.00"
|
||||
material_id = "2003005"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
from sqlalchemy import func
|
||||
|
||||
from calculators import Calculator
|
||||
from commons.models.data_fujian import DataFujian
|
||||
from commons.models.data_network import DataNetwork
|
||||
@@ -8,12 +6,11 @@ from commons.models.fuzhou_highway_bureau import FuzhouHighwayBureau
|
||||
from commons.models.fuzhou_transportation_bureau import FuzhouTransportationBureau
|
||||
from commons.models.price_result import PriceResult
|
||||
from commons.models.sanming_steel import SanmingSteel
|
||||
from commons.models.steel_rebar import SteelRebar
|
||||
|
||||
|
||||
class Reber300Calculator(Calculator):
|
||||
name = "光圆钢筋"
|
||||
material_id = "15.05.60.00"
|
||||
material_id = "2001001"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
|
@@ -13,7 +13,7 @@ from commons.models.steel_rebar import SteelRebar
|
||||
|
||||
class Reber400Calculator(Calculator):
|
||||
name = "带肋钢筋"
|
||||
material_id = "15.03.60.00"
|
||||
material_id = "2001002"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
|
@@ -9,7 +9,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class SteelSectionCalculator(Calculator):
|
||||
name = "型钢"
|
||||
material_id = "16.05.60.00"
|
||||
material_id = "2003004"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
|
@@ -9,7 +9,7 @@ from commons.models.price_result import PriceResult
|
||||
|
||||
class SteelStrandCalculator(Calculator):
|
||||
name = "钢绞线"
|
||||
material_id = "19.04.60.00"
|
||||
material_id = "2001008"
|
||||
unit = "t"
|
||||
spec = ""
|
||||
|
||||
|
@@ -128,17 +128,17 @@ class Collector:
|
||||
name=name,
|
||||
spec=spec,
|
||||
price=round(price, 2),
|
||||
price_fuzhou=round(price_fuzhou, 2),
|
||||
price_xiamen=round(price_xiamen, 2),
|
||||
price_putian=round(price_putian, 2),
|
||||
price_sanming=round(price_sanming, 2),
|
||||
price_quanzhou=round(price_quanzhou, 2),
|
||||
price_zhangzhou=round(price_zhangzhou, 2),
|
||||
price_nanpin=round(price_nanpin, 2),
|
||||
price_longyan=round(price_longyan, 2),
|
||||
price_ningde=round(price_ningde, 2),
|
||||
price_pintan=round(price_pintan, 2),
|
||||
price_zhangzhoukfq=round(price_zhangzhoukfq, 2),
|
||||
price_fuzhou=round(price_fuzhou or 0, 2),
|
||||
price_xiamen=round(price_xiamen or 0, 2),
|
||||
price_putian=round(price_putian or 0, 2),
|
||||
price_sanming=round(price_sanming or 0, 2),
|
||||
price_quanzhou=round(price_quanzhou or 0, 2),
|
||||
price_zhangzhou=round(price_zhangzhou or 0, 2),
|
||||
price_nanpin=round(price_nanpin or 0, 2),
|
||||
price_longyan=round(price_longyan or 0, 2),
|
||||
price_ningde=round(price_ningde or 0, 2),
|
||||
price_pintan=round(price_pintan or 0, 2),
|
||||
price_zhangzhoukfq=round(price_zhangzhoukfq or 0, 2),
|
||||
tax=tax,
|
||||
type=2,
|
||||
unit=unit,
|
||||
|
@@ -51,5 +51,5 @@ if __name__ == '__main__':
|
||||
calculate(2022, i+1)
|
||||
for i in range(0, 12):
|
||||
calculate(2023, i+1)
|
||||
for i in range(0, 5):
|
||||
for i in range(0, 9):
|
||||
calculate(2024, i+1)
|
||||
|
@@ -17,5 +17,5 @@ if __name__ == '__main__':
|
||||
collect(2022, i + 1)
|
||||
for i in range(0, 12):
|
||||
collect(2023, i + 1)
|
||||
for i in range(0, 5):
|
||||
for i in range(0, 9):
|
||||
collect(2024, i + 1)
|
||||
|
Reference in New Issue
Block a user