Browse Source

estimated time col changed

master
Ubuntu 3 years ago
parent
commit
fc16ed3aa3
  1. 3
      smart_service/apis/publish_api.py
  2. 2
      smart_service/apis/update_validation.py
  3. 8
      smart_service/fixtures/client_script.json
  4. 2
      smart_service/transactions/doctype/publish/publish.py
  5. 15
      smart_service/transactions/doctype/publish_temp_doc/publish_temp_doc.json
  6. 4
      smart_service/transactions/doctype/system_mapping/system_mapping.py
  7. 14
      smart_service/transactions/doctype/system_mapping_sub_system/system_mapping_sub_system.json

3
smart_service/apis/publish_api.py

@ -126,7 +126,8 @@ def json_grouping(args, language):
subsystem_out = []
for j in subsystem[d][i]:
subsys = frappe.db.sql('''select `tabSystem Mapping_Sub System`.idx as subSystemdisplayorder, systems,sub_systems, symptom, component, estimated_time, rts, mat, cover_image, `tabSub Systems`.myid,
subsys = frappe.db.sql('''select `tabSystem Mapping_Sub System`.idx as subSystemdisplayorder, systems,sub_systems, symptom, component,
estimate_time as estimated_time, rts, mat, cover_image, `tabSub Systems`.myid,
`tabSystem Mapping_Sub System`.active_status,`tabSystem Mapping_Sub System`.cover_image
from {4}.`tabSystem Mapping_Sub System` inner join {4}.`tabSub Systems` on `tabSystem Mapping_Sub System`.sub_systems = `tabSub Systems`.name
where `tabSystem Mapping_Sub System`.parent like '{0}-{3}%' and systems='{1}' and sub_systems='{2}';'''.format(

2
smart_service/apis/update_validation.py

@ -202,7 +202,7 @@ def check_vehicle_update(vehicle_list):
subsystem_out = []
for j in appendDict[d][i]:
subsys = frappe.db.sql('''select `tabSystem Mapping_Sub System`.idx as subSystemdisplayorder, systems,sub_systems, symptom,
component, estimated_time, rts, mat, cover_image, `tabSub Systems`.myid,`tabSystem Mapping_Sub System`.active_status,
component, estimate_time as estimated_time, rts, mat, cover_image, `tabSub Systems`.myid,`tabSystem Mapping_Sub System`.active_status,
`tabSystem Mapping_Sub System`.cover_image from {4}.`tabSystem Mapping_Sub System` inner join {4}.`tabSub Systems` on
`tabSystem Mapping_Sub System`.sub_systems = `tabSub Systems`.name where `tabSystem Mapping_Sub System`.parent like '{0}-{3}%' and
systems='{1}' and sub_systems='{2}' and `tabSystem Mapping_Sub System`.active_status = 'Active';'''.format(d, i, j, l_id, current_db_name), as_dict=True)

8
smart_service/fixtures/client_script.json

File diff suppressed because one or more lines are too long

2
smart_service/transactions/doctype/publish/publish.py

@ -189,5 +189,5 @@ def get_system(doc):
if system_map:
for s in system_map:
doc = frappe.get_doc("System Mapping",s.name)
system = frappe.db.sql("""select systems,sub_systems,active_status,symptom,component,estimated_time,rts,component,mat,procedure_status,`procedure` from {0}.`tabSystem Mapping_Sub System` where parent = '{1}' and procedure_is_published = '0'""".format(current_db_name,s.name),as_dict=True)
system = frappe.db.sql("""select systems,sub_systems,active_status,symptom,component,estimate_time,rts,component,mat,procedure_status,`procedure` from {0}.`tabSystem Mapping_Sub System` where parent = '{1}' and procedure_is_published = '0'""".format(current_db_name,s.name),as_dict=True)
return system

15
smart_service/transactions/doctype/publish_temp_doc/publish_temp_doc.json

@ -11,7 +11,7 @@
"column_break_4",
"symptom",
"component",
"estimated_time",
"estimate_time",
"rts",
"mat",
"cover_image",
@ -60,11 +60,6 @@
"fieldtype": "Check",
"label": "Component"
},
{
"fieldname": "estimated_time",
"fieldtype": "Duration",
"label": "Estimated Time"
},
{
"fieldname": "rts",
"fieldtype": "Data",
@ -98,12 +93,18 @@
"in_list_view": 1,
"label": "Procedure Status",
"read_only": 1
},
{
"fieldname": "estimate_time",
"fieldtype": "Float",
"label": "Estimated Time",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-11-25 17:15:47.559805",
"modified": "2022-04-09 15:44:31.084747",
"modified_by": "Administrator",
"module": "Transactions",
"name": "Publish_Temp Doc",

4
smart_service/transactions/doctype/system_mapping/system_mapping.py

@ -8,7 +8,7 @@ class SystemMapping(Document):
def validate(self):
###If anything change to be set Published flag as 0
current_db_name = frappe.conf.get("db_name")
systems = frappe.db.sql("""select systems,sub_systems,active_status,estimated_time,idx,rts,mat,cover_image,`procedure`
systems = frappe.db.sql("""select systems,sub_systems,active_status,estimate_time,idx,rts,mat,cover_image,`procedure`
from {0}.`tabSystem Mapping_Sub System` where parent = '{1}'""".format(current_db_name,self.name),as_dict=True)
if systems:
for prev_system in systems:
@ -26,7 +26,7 @@ class SystemMapping(Document):
if prev_system.procedure != cur_system.procedure:
cur_system.procedure_is_published = "0"
update_procedure(current_db_name,self.name,str(cur_system.idx))
if prev_system.estimated_time != cur_system.estimated_time:
if prev_system.estimate_time != cur_system.estimate_time:
cur_system.procedure_is_published = "0"
update_procedure(current_db_name,self.name,str(cur_system.idx))
if prev_system.rts != cur_system.rts:

14
smart_service/transactions/doctype/system_mapping_sub_system/system_mapping_sub_system.json

@ -13,7 +13,7 @@
"column_break_4",
"symptom",
"component",
"estimated_time",
"estimate_time",
"rts",
"mat",
"cover_image",
@ -63,11 +63,6 @@
"fieldtype": "Check",
"label": "Component"
},
{
"fieldname": "estimated_time",
"fieldtype": "Data",
"label": "Estimated Time"
},
{
"fieldname": "rts",
"fieldtype": "Data",
@ -123,12 +118,17 @@
"fieldname": "cover_image",
"fieldtype": "Attach Image",
"label": "Cover Image"
},
{
"fieldname": "estimate_time",
"fieldtype": "Float",
"label": "Estimated Time"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2022-03-15 13:21:41.072236",
"modified": "2022-04-09 15:24:09.686783",
"modified_by": "Administrator",
"module": "Transactions",
"name": "System Mapping_Sub System",

Loading…
Cancel
Save